diff options
author | Özgür Kesim <oec-taler@kesim.org> | 2023-09-12 13:52:55 +0200 |
---|---|---|
committer | Özgür Kesim <oec-taler@kesim.org> | 2023-09-12 13:52:55 +0200 |
commit | 121a6da78504204ddf34bf05b5136e09fab0261e (patch) | |
tree | cd220a6e7168e9888b0f83219242f23744fa2cc2 /packages/merchant-backoffice-ui/src/declaration.d.ts | |
parent | 5495551071a3fdc36c38deb4c1cf6f4aa5b98bd4 (diff) | |
parent | ee8993f11cf81721cc30b4473e40124c2fee0dff (diff) |
Merge branch 'master' into age-withdraw
Diffstat (limited to 'packages/merchant-backoffice-ui/src/declaration.d.ts')
-rw-r--r-- | packages/merchant-backoffice-ui/src/declaration.d.ts | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/packages/merchant-backoffice-ui/src/declaration.d.ts b/packages/merchant-backoffice-ui/src/declaration.d.ts index 5ca9c1e09..c3e6ea3da 100644 --- a/packages/merchant-backoffice-ui/src/declaration.d.ts +++ b/packages/merchant-backoffice-ui/src/declaration.d.ts @@ -107,6 +107,16 @@ interface RegexAccountRestriction { // human hints. human_hint_i18n?: { [lang_tag: string]: string }; } +interface LoginToken { + token: string, + expiration: Timestamp, +} +// token used to get loginToken +// must forget after used +declare const __ac_token: unique symbol; +type AccessToken = string & { + [__ac_token]: true; +}; export namespace ExchangeBackend { interface WireResponse { @@ -491,6 +501,35 @@ export namespace MerchantBackend { }; } // DELETE /private/instances/$INSTANCE + interface LoginTokenRequest { + // Scope of the token (which kinds of operations it will allow) + scope: "readonly" | "write"; + + // Server may impose its own upper bound + // on the token validity duration + duration?: RelativeTime; + + // Can this token be refreshed? + // Defaults to false. + refreshable?: boolean; + } + interface LoginTokenSuccessResponse { + // The login token that can be used to access resources + // that are in scope for some time. Must be prefixed + // with "Bearer " when used in the "Authorization" HTTP header. + // Will already begin with the RFC 8959 prefix. + token: string; + + // Scope of the token (which kinds of operations it will allow) + scope: "readonly" | "write"; + + // Server may impose its own upper bound + // on the token validity duration + expiration: Timestamp; + + // Can this token be refreshed? + refreshable: boolean; + } } namespace KYC { |