Access api service definition type

Hierarchy

  • Service

Properties

access: {
    authorize: ServiceMethod<{
        can: "access/authorize";
        nb: Pick<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, RequiredKeys<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }>> & Partial<Pick<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, never>>;
        with: `did:key:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, AccessAuthorizeSuccess, Schema.Error>;
    claim: ServiceMethod<{
        can: "access/claim";
        with: {
            [Marker]?: {
                protocol: "did:";
            } | {
                protocol: "did:";
            };
            length: number;
            [iterator]() => IterableIterator<string>;
            anchor(name) => string;
            at(index) => undefined | string;
            big() => string;
            blink() => string;
            bold() => string;
            charAt(pos) => string;
            charCodeAt(index) => number;
            codePointAt(pos) => undefined | number;
            concat(...strings) => string;
            endsWith(searchString, endPosition?) => boolean;
            fixed() => string;
            fontcolor(color) => string;
            fontsize(size) => string;
            fontsize(size) => string;
            includes(searchString, position?) => boolean;
            indexOf(searchString, position?) => number;
            italics() => string;
            lastIndexOf(searchString, position?) => number;
            link(url) => string;
            localeCompare(that) => number;
            localeCompare(that, locales?, options?) => number;
            match(regexp) => null | RegExpMatchArray;
            match(matcher) => null | RegExpMatchArray;
            matchAll(regexp) => IterableIterator<RegExpMatchArray>;
            normalize(form) => string;
            normalize(form?) => string;
            padEnd(maxLength, fillString?) => string;
            padStart(maxLength, fillString?) => string;
            repeat(count) => string;
            replace(searchValue, replaceValue) => string;
            replace(searchValue, replacer) => string;
            replace(searchValue, replaceValue) => string;
            replace(searchValue, replacer) => string;
            replaceAll(searchValue, replaceValue) => string;
            replaceAll(searchValue, replacer) => string;
            search(regexp) => number;
            search(searcher) => number;
            slice(start?, end?) => string;
            small() => string;
            split(separator, limit?) => string[];
            split(splitter, limit?) => string[];
            startsWith(searchString, position?) => boolean;
            strike() => string;
            sub() => string;
            substr(from, length?) => string;
            substring(start, end?) => string;
            sup() => string;
            toLocaleLowerCase(locales?) => string;
            toLocaleUpperCase(locales?) => string;
            toLowerCase() => string;
            toString() => string;
            toUpperCase() => string;
            trim() => string;
            trimEnd() => string;
            trimLeft() => string;
            trimRight() => string;
            trimStart() => string;
            valueOf() => string;
            valueOf() => Object;
        };
    }, AccessClaimSuccess, AccessClaimFailure>;
    confirm: ServiceMethod<{
        can: "access/confirm";
        nb: Pick<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            aud: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            cause: Link<unknown, number, number, 1>;
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, RequiredKeys<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            aud: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            cause: Link<unknown, number, number, 1>;
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }>> & Partial<Pick<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            aud: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            cause: Link<unknown, number, number, 1>;
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, never>>;
        with: `did:${string}:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, AccessConfirmSuccess, AccessConfirmFailure>;
    delegate: ServiceMethod<{
        can: "access/delegate";
        nb: Pick<{
            delegations: AccessDelegateDelegations;
        }, "delegations"> & Partial<Pick<{
            delegations: AccessDelegateDelegations;
        }, never>>;
        with: `did:key:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, Unit, AccessDelegateFailure>;
}

Type declaration

  • authorize: ServiceMethod<{
        can: "access/authorize";
        nb: Pick<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, RequiredKeys<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }>> & Partial<Pick<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, never>>;
        with: `did:key:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, AccessAuthorizeSuccess, Schema.Error>
  • claim: ServiceMethod<{
        can: "access/claim";
        with: {
            [Marker]?: {
                protocol: "did:";
            } | {
                protocol: "did:";
            };
            length: number;
            [iterator]() => IterableIterator<string>;
            anchor(name) => string;
            at(index) => undefined | string;
            big() => string;
            blink() => string;
            bold() => string;
            charAt(pos) => string;
            charCodeAt(index) => number;
            codePointAt(pos) => undefined | number;
            concat(...strings) => string;
            endsWith(searchString, endPosition?) => boolean;
            fixed() => string;
            fontcolor(color) => string;
            fontsize(size) => string;
            fontsize(size) => string;
            includes(searchString, position?) => boolean;
            indexOf(searchString, position?) => number;
            italics() => string;
            lastIndexOf(searchString, position?) => number;
            link(url) => string;
            localeCompare(that) => number;
            localeCompare(that, locales?, options?) => number;
            match(regexp) => null | RegExpMatchArray;
            match(matcher) => null | RegExpMatchArray;
            matchAll(regexp) => IterableIterator<RegExpMatchArray>;
            normalize(form) => string;
            normalize(form?) => string;
            padEnd(maxLength, fillString?) => string;
            padStart(maxLength, fillString?) => string;
            repeat(count) => string;
            replace(searchValue, replaceValue) => string;
            replace(searchValue, replacer) => string;
            replace(searchValue, replaceValue) => string;
            replace(searchValue, replacer) => string;
            replaceAll(searchValue, replaceValue) => string;
            replaceAll(searchValue, replacer) => string;
            search(regexp) => number;
            search(searcher) => number;
            slice(start?, end?) => string;
            small() => string;
            split(separator, limit?) => string[];
            split(splitter, limit?) => string[];
            startsWith(searchString, position?) => boolean;
            strike() => string;
            sub() => string;
            substr(from, length?) => string;
            substring(start, end?) => string;
            sup() => string;
            toLocaleLowerCase(locales?) => string;
            toLocaleUpperCase(locales?) => string;
            toLowerCase() => string;
            toString() => string;
            toUpperCase() => string;
            trim() => string;
            trimEnd() => string;
            trimLeft() => string;
            trimRight() => string;
            trimStart() => string;
            valueOf() => string;
            valueOf() => Object;
        };
    }, AccessClaimSuccess, AccessClaimFailure>
  • confirm: ServiceMethod<{
        can: "access/confirm";
        nb: Pick<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            aud: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            cause: Link<unknown, number, number, 1>;
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, RequiredKeys<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            aud: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            cause: Link<unknown, number, number, 1>;
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }>> & Partial<Pick<{
            att: Schema.InferStruct<{
                can: Schema.StringSchema<string, unknown>;
            }>[];
            aud: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            cause: Link<unknown, number, number, 1>;
            iss: `did:mailto:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, never>>;
        with: `did:${string}:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, AccessConfirmSuccess, AccessConfirmFailure>
  • delegate: ServiceMethod<{
        can: "access/delegate";
        nb: Pick<{
            delegations: AccessDelegateDelegations;
        }, "delegations"> & Partial<Pick<{
            delegations: AccessDelegateDelegations;
        }, never>>;
        with: `did:key:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, Unit, AccessDelegateFailure>
plan: {
    get: ServiceMethod<{
        can: "plan/get";
        with: `did:mailto:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, PlanGetSuccess, PlanGetFailure>;
    set: ServiceMethod<{
        can: "plan/set";
        nb: Pick<{
            product: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, "product"> & Partial<Pick<{
            product: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, never>>;
        with: `did:mailto:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, Unit, PlanSetFailure>;
}

Type declaration

  • get: ServiceMethod<{
        can: "plan/get";
        with: `did:mailto:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, PlanGetSuccess, PlanGetFailure>
  • set: ServiceMethod<{
        can: "plan/set";
        nb: Pick<{
            product: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, "product"> & Partial<Pick<{
            product: `did:${string}:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, never>>;
        with: `did:mailto:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, Unit, PlanSetFailure>
provider: {
    add: ServiceMethod<{
        can: "provider/add";
        nb: Pick<{
            consumer: `did:key:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            provider: `did:web:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, RequiredKeys<{
            consumer: `did:key:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            provider: `did:web:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }>> & Partial<Pick<{
            consumer: `did:key:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            provider: `did:web:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, never>>;
        with: `did:mailto:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, ProviderAddSuccess, ProviderAddFailure>;
}

Type declaration

  • add: ServiceMethod<{
        can: "provider/add";
        nb: Pick<{
            consumer: `did:key:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            provider: `did:web:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, RequiredKeys<{
            consumer: `did:key:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            provider: `did:web:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }>> & Partial<Pick<{
            consumer: `did:key:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
            provider: `did:web:${string}` & `did:${string}` & Phantom<{
                protocol: "did:";
            }>;
        }, never>>;
        with: `did:mailto:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, ProviderAddSuccess, ProviderAddFailure>
space: {
    info: ServiceMethod<{
        can: "space/info";
        with: `did:key:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, SpaceInfoResult, SpaceUnknown | Schema.Error>;
}

Type declaration

subscription: {
    list: ServiceMethod<{
        can: "subscription/list";
        nb: any;
        with: `did:mailto:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, SubscriptionListSuccess, Schema.Error>;
}

Type declaration

ucan: {
    revoke: ServiceMethod<{
        can: "ucan/revoke";
        nb: Pick<{
            proof: undefined | UCANLink<Capabilities, MulticodecCode<number, string>, SigAlg>[];
            ucan: UCANLink<Capabilities, MulticodecCode<number, string>, SigAlg>;
        }, "ucan"> & Partial<Pick<{
            proof: undefined | UCANLink<Capabilities, MulticodecCode<number, string>, SigAlg>[];
            ucan: UCANLink<Capabilities, MulticodecCode<number, string>, SigAlg>;
        }, "proof">>;
        with: `did:${string}:${string}` & `did:${string}` & Phantom<{
            protocol: "did:";
        }> & `${string}:${string}`;
    }, Timestamp, UCANRevokeFailure>;
}

Type declaration

Generated using TypeDoc