summaryrefslogtreecommitdiff
path: root/packages/merchant-backoffice-ui/src/declaration.d.ts
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2023-09-11 15:07:55 -0300
committerSebastian <sebasjm@gmail.com>2023-09-11 15:08:08 -0300
commit8c20f4b27946679267bb44255721a9f14ae1077a (patch)
tree389d7dac804af0e17652240094947e710f503dd3 /packages/merchant-backoffice-ui/src/declaration.d.ts
parente2422b68ebb2a29fb2e4d86f8a8cf9ec2a33e099 (diff)
downloadwallet-core-8c20f4b27946679267bb44255721a9f14ae1077a.tar.gz
wallet-core-8c20f4b27946679267bb44255721a9f14ae1077a.tar.bz2
wallet-core-8c20f4b27946679267bb44255721a9f14ae1077a.zip
new login token
Diffstat (limited to 'packages/merchant-backoffice-ui/src/declaration.d.ts')
-rw-r--r--packages/merchant-backoffice-ui/src/declaration.d.ts39
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 {