From ec57612cdd9689e88578308fa3400748959491a7 Mon Sep 17 00:00:00 2001 From: Omkar Shanbhag Date: Wed, 30 Oct 2024 16:14:37 -0700 Subject: [PATCH 1/3] add stamping codegen to sdk-browser --- packages/sdk-browser/scripts/codegen.js | 18 +- .../src/__generated__/sdk-client-base.ts | 2832 ++++++++++------- .../src/__generated__/sdk_api_types.ts | 651 +--- 3 files changed, 1929 insertions(+), 1572 deletions(-) diff --git a/packages/sdk-browser/scripts/codegen.js b/packages/sdk-browser/scripts/codegen.js index 9eca45c1..10a5390c 100644 --- a/packages/sdk-browser/scripts/codegen.js +++ b/packages/sdk-browser/scripts/codegen.js @@ -245,7 +245,7 @@ const generateSDKClientFromSwagger = async (swaggerSpec, targetPath) => { const imports = []; imports.push( - 'import { TERMINAL_ACTIVITY_STATUSES, TActivityResponse, TActivityStatus } from "@turnkey/http";' + 'import { TERMINAL_ACTIVITY_STATUSES, TActivityResponse, TActivityStatus, TSignedRequest } from "@turnkey/http";' ); imports.push( @@ -451,6 +451,22 @@ export class TurnkeySDKClientBase { }` ); } + // generate a stamping method for each method + codeBuffer.push( + `\n\tstamp${operationNameWithoutNamespace} = async (input: SdkApiTypes.${inputType}): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "${endpointPath}"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }` + ); } // End of the TurnkeySDKClient Class Definition diff --git a/packages/sdk-browser/src/__generated__/sdk-client-base.ts b/packages/sdk-browser/src/__generated__/sdk-client-base.ts index 7c80ad80..0212d401 100644 --- a/packages/sdk-browser/src/__generated__/sdk-client-base.ts +++ b/packages/sdk-browser/src/__generated__/sdk-client-base.ts @@ -1,18 +1,10 @@ /* @generated by codegen. DO NOT EDIT BY HAND */ -import { - TERMINAL_ACTIVITY_STATUSES, - TActivityResponse, - TActivityStatus, -} from "@turnkey/http"; +import { TERMINAL_ACTIVITY_STATUSES, TActivityResponse, TActivityStatus, TSignedRequest } from "@turnkey/http"; import type { definitions } from "../__inputs__/public_api.types"; -import { - GrpcStatus, - TurnkeyRequestError, - TurnkeySDKClientConfig, -} from "../__types__/base"; +import { GrpcStatus, TurnkeyRequestError, TurnkeySDKClientConfig } from "../__types__/base"; import { VERSION } from "../__generated__/version"; @@ -20,6 +12,7 @@ import type * as SdkApiTypes from "./sdk_api_types"; import { StorageKeys, getStorageValue } from "../storage"; + export class TurnkeySDKClientBase { config: TurnkeySDKClientConfig; @@ -34,22 +27,22 @@ export class TurnkeySDKClientBase { const fullUrl = this.config.apiBaseUrl + url; const stringifiedBody = JSON.stringify(body); var headers: Record = { - "X-Client-Version": VERSION, - }; + "X-Client-Version": VERSION + } if (this.config.stamper) { const stamp = await this.config.stamper.stamp(stringifiedBody); - headers[stamp.stampHeaderName] = stamp.stampHeaderValue; + headers[stamp.stampHeaderName] = stamp.stampHeaderValue } - if (this.config.readOnlySession) { - headers["X-Session"] = this.config.readOnlySession; + if (this.config.readOnlySession){ + headers["X-Session"] = this.config.readOnlySession } const response = await fetch(fullUrl, { method: "POST", headers: headers, body: stringifiedBody, - redirect: "follow", + redirect: "follow" }); if (!response.ok) { @@ -75,8 +68,7 @@ export class TurnkeySDKClientBase { const pollingDuration = this.config.activityPoller?.intervalMs ?? 1000; const maxRetries = this.config.activityPoller?.numRetries ?? 3; - const sleep = (ms: number) => - new Promise((resolve) => setTimeout(resolve, ms)); + const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); const handleResponse = (activityData: TActivityResponse): TResponseType => { const { result, status } = activityData.activity; @@ -84,7 +76,7 @@ export class TurnkeySDKClientBase { if (status === "ACTIVITY_STATUS_COMPLETED") { return { ...result[`${resultKey}` as keyof definitions["v1Result"]], - ...activityData, + ...activityData } as TResponseType; } @@ -95,19 +87,15 @@ export class TurnkeySDKClientBase { const pollStatus = async (activityId: string): Promise => { const pollBody = { activityId }; - const pollData = (await this.getActivity(pollBody)) as TActivityResponse; + const pollData = await this.getActivity(pollBody) as TActivityResponse; if (attempts > maxRetries) { return handleResponse(pollData); } attempts += 1; - - if ( - !TERMINAL_ACTIVITY_STATUSES.includes( - pollData.activity.status as TActivityStatus - ) - ) { + + if (!TERMINAL_ACTIVITY_STATUSES.includes(pollData.activity.status as TActivityStatus)) { await sleep(pollingDuration); return pollStatus(activityId); } @@ -115,16 +103,9 @@ export class TurnkeySDKClientBase { return handleResponse(pollData); }; - const responseData = (await this.request( - url, - body - )) as TActivityResponse; - - if ( - !TERMINAL_ACTIVITY_STATUSES.includes( - responseData.activity.status as TActivityStatus - ) - ) { + const responseData = await this.request(url, body) as TActivityResponse; + + if (!TERMINAL_ACTIVITY_STATUSES.includes(responseData.activity.status as TActivityStatus)) { return pollStatus(responseData.activity.id); } @@ -135,1250 +116,1947 @@ export class TurnkeySDKClientBase { url: string, body: TBodyType ): Promise { - const activityData = (await this.request(url, body)) as TActivityResponse; + const activityData = await this.request(url, body) as TActivityResponse; return { ...activityData["activity"]["result"], - ...activityData, + ...activityData } as TResponseType; } - getActivity = async ( - input: SdkApiTypes.TGetActivityBody - ): Promise => { + + getActivity = async (input: SdkApiTypes.TGetActivityBody): Promise => { return this.request("/public/v1/query/get_activity", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getApiKey = async ( - input: SdkApiTypes.TGetApiKeyBody - ): Promise => { + stampGetActivity = async (input: SdkApiTypes.TGetActivityBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_activity"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getApiKey = async (input: SdkApiTypes.TGetApiKeyBody): Promise => { return this.request("/public/v1/query/get_api_key", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getApiKeys = async ( - input: SdkApiTypes.TGetApiKeysBody = {} - ): Promise => { + stampGetApiKey = async (input: SdkApiTypes.TGetApiKeyBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getApiKeys = async (input: SdkApiTypes.TGetApiKeysBody = {}): Promise => { return this.request("/public/v1/query/get_api_keys", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getAttestationDocument = async ( - input: SdkApiTypes.TGetAttestationDocumentBody - ): Promise => { + stampGetApiKeys = async (input: SdkApiTypes.TGetApiKeysBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getAttestationDocument = async (input: SdkApiTypes.TGetAttestationDocumentBody): Promise => { return this.request("/public/v1/query/get_attestation", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getAuthenticator = async ( - input: SdkApiTypes.TGetAuthenticatorBody - ): Promise => { + stampGetAttestationDocument = async (input: SdkApiTypes.TGetAttestationDocumentBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_attestation"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getAuthenticator = async (input: SdkApiTypes.TGetAuthenticatorBody): Promise => { return this.request("/public/v1/query/get_authenticator", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getAuthenticators = async ( - input: SdkApiTypes.TGetAuthenticatorsBody - ): Promise => { + stampGetAuthenticator = async (input: SdkApiTypes.TGetAuthenticatorBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticator"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getAuthenticators = async (input: SdkApiTypes.TGetAuthenticatorsBody): Promise => { return this.request("/public/v1/query/get_authenticators", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getOauthProviders = async ( - input: SdkApiTypes.TGetOauthProvidersBody - ): Promise => { + stampGetAuthenticators = async (input: SdkApiTypes.TGetAuthenticatorsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticators"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getOauthProviders = async (input: SdkApiTypes.TGetOauthProvidersBody): Promise => { return this.request("/public/v1/query/get_oauth_providers", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getOrganization = async ( - input: SdkApiTypes.TGetOrganizationBody = {} - ): Promise => { + stampGetOauthProviders = async (input: SdkApiTypes.TGetOauthProvidersBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_oauth_providers"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getOrganization = async (input: SdkApiTypes.TGetOrganizationBody = {}): Promise => { return this.request("/public/v1/query/get_organization", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getOrganizationConfigs = async ( - input: SdkApiTypes.TGetOrganizationConfigsBody - ): Promise => { + stampGetOrganization = async (input: SdkApiTypes.TGetOrganizationBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getOrganizationConfigs = async (input: SdkApiTypes.TGetOrganizationConfigsBody): Promise => { return this.request("/public/v1/query/get_organization_configs", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getPolicy = async ( - input: SdkApiTypes.TGetPolicyBody - ): Promise => { + stampGetOrganizationConfigs = async (input: SdkApiTypes.TGetOrganizationConfigsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization_configs"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getPolicy = async (input: SdkApiTypes.TGetPolicyBody): Promise => { return this.request("/public/v1/query/get_policy", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getPrivateKey = async ( - input: SdkApiTypes.TGetPrivateKeyBody - ): Promise => { + stampGetPolicy = async (input: SdkApiTypes.TGetPolicyBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_policy"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getPrivateKey = async (input: SdkApiTypes.TGetPrivateKeyBody): Promise => { return this.request("/public/v1/query/get_private_key", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getUser = async ( - input: SdkApiTypes.TGetUserBody - ): Promise => { + stampGetPrivateKey = async (input: SdkApiTypes.TGetPrivateKeyBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_private_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getUser = async (input: SdkApiTypes.TGetUserBody): Promise => { return this.request("/public/v1/query/get_user", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getWallet = async ( - input: SdkApiTypes.TGetWalletBody - ): Promise => { + stampGetUser = async (input: SdkApiTypes.TGetUserBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_user"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getWallet = async (input: SdkApiTypes.TGetWalletBody): Promise => { return this.request("/public/v1/query/get_wallet", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getActivities = async ( - input: SdkApiTypes.TGetActivitiesBody = {} - ): Promise => { + stampGetWallet = async (input: SdkApiTypes.TGetWalletBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getActivities = async (input: SdkApiTypes.TGetActivitiesBody = {}): Promise => { return this.request("/public/v1/query/list_activities", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getPolicies = async ( - input: SdkApiTypes.TGetPoliciesBody = {} - ): Promise => { + stampGetActivities = async (input: SdkApiTypes.TGetActivitiesBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_activities"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getPolicies = async (input: SdkApiTypes.TGetPoliciesBody = {}): Promise => { return this.request("/public/v1/query/list_policies", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - listPrivateKeyTags = async ( - input: SdkApiTypes.TListPrivateKeyTagsBody - ): Promise => { + stampGetPolicies = async (input: SdkApiTypes.TGetPoliciesBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_policies"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + listPrivateKeyTags = async (input: SdkApiTypes.TListPrivateKeyTagsBody): Promise => { return this.request("/public/v1/query/list_private_key_tags", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getPrivateKeys = async ( - input: SdkApiTypes.TGetPrivateKeysBody = {} - ): Promise => { + stampListPrivateKeyTags = async (input: SdkApiTypes.TListPrivateKeyTagsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_key_tags"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getPrivateKeys = async (input: SdkApiTypes.TGetPrivateKeysBody = {}): Promise => { return this.request("/public/v1/query/list_private_keys", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getSubOrgIds = async ( - input: SdkApiTypes.TGetSubOrgIdsBody = {} - ): Promise => { + stampGetPrivateKeys = async (input: SdkApiTypes.TGetPrivateKeysBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getSubOrgIds = async (input: SdkApiTypes.TGetSubOrgIdsBody = {}): Promise => { return this.request("/public/v1/query/list_suborgs", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - listUserTags = async ( - input: SdkApiTypes.TListUserTagsBody = {} - ): Promise => { + stampGetSubOrgIds = async (input: SdkApiTypes.TGetSubOrgIdsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_suborgs"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + listUserTags = async (input: SdkApiTypes.TListUserTagsBody = {}): Promise => { return this.request("/public/v1/query/list_user_tags", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getUsers = async ( - input: SdkApiTypes.TGetUsersBody = {} - ): Promise => { + stampListUserTags = async (input: SdkApiTypes.TListUserTagsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_user_tags"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getUsers = async (input: SdkApiTypes.TGetUsersBody = {}): Promise => { return this.request("/public/v1/query/list_users", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getWalletAccounts = async ( - input: SdkApiTypes.TGetWalletAccountsBody - ): Promise => { + stampGetUsers = async (input: SdkApiTypes.TGetUsersBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_users"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getWalletAccounts = async (input: SdkApiTypes.TGetWalletAccountsBody): Promise => { return this.request("/public/v1/query/list_wallet_accounts", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getWallets = async ( - input: SdkApiTypes.TGetWalletsBody = {} - ): Promise => { + stampGetWalletAccounts = async (input: SdkApiTypes.TGetWalletAccountsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallet_accounts"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getWallets = async (input: SdkApiTypes.TGetWalletsBody = {}): Promise => { return this.request("/public/v1/query/list_wallets", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } + - getWhoami = async ( - input: SdkApiTypes.TGetWhoamiBody = {} - ): Promise => { + stampGetWallets = async (input: SdkApiTypes.TGetWalletsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallets"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + getWhoami = async (input: SdkApiTypes.TGetWhoamiBody = {}): Promise => { return this.request("/public/v1/query/whoami", { ...input, - organizationId: input.organizationId ?? this.config.organizationId, + organizationId: input.organizationId ?? this.config.organizationId }); - }; + } - approveActivity = async ( - input: SdkApiTypes.TApproveActivityBody - ): Promise => { - const { organizationId, timestampMs, ...rest } = input; - const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.activityDecision("/public/v1/submit/approve_activity", { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_APPROVE_ACTIVITY", - }); - }; - createApiKeys = async ( - input: SdkApiTypes.TCreateApiKeysBody - ): Promise => { - const { organizationId, timestampMs, ...rest } = input; - const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_api_keys", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2", - }, - "createApiKeysResult" - ); - }; - - createApiOnlyUsers = async ( - input: SdkApiTypes.TCreateApiOnlyUsersBody - ): Promise => { - const { organizationId, timestampMs, ...rest } = input; - const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_api_only_users", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS", - }, - "createApiOnlyUsersResult" - ); - }; - - createAuthenticators = async ( - input: SdkApiTypes.TCreateAuthenticatorsBody - ): Promise => { + stampGetWhoami = async (input: SdkApiTypes.TGetWhoamiBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/whoami"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + approveActivity = async (input: SdkApiTypes.TApproveActivityBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_authenticators", + return this.activityDecision("/public/v1/submit/approve_activity", { parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2", - }, - "createAuthenticatorsResult" - ); - }; - - createInvitations = async ( - input: SdkApiTypes.TCreateInvitationsBody - ): Promise => { + type: "ACTIVITY_TYPE_APPROVE_ACTIVITY" + }); + } + + + stampApproveActivity = async (input: SdkApiTypes.TApproveActivityBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/approve_activity"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createApiKeys = async (input: SdkApiTypes.TCreateApiKeysBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_invitations", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_INVITATIONS", - }, - "createInvitationsResult" - ); - }; - - createOauthProviders = async ( - input: SdkApiTypes.TCreateOauthProvidersBody - ): Promise => { + return this.command("/public/v1/submit/create_api_keys", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2" + }, "createApiKeysResult"); + } + + + stampCreateApiKeys = async (input: SdkApiTypes.TCreateApiKeysBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createApiOnlyUsers = async (input: SdkApiTypes.TCreateApiOnlyUsersBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_oauth_providers", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS", - }, - "createOauthProvidersResult" - ); - }; - - createPolicies = async ( - input: SdkApiTypes.TCreatePoliciesBody - ): Promise => { + return this.command("/public/v1/submit/create_api_only_users", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" + }, "createApiOnlyUsersResult"); + } + + + stampCreateApiOnlyUsers = async (input: SdkApiTypes.TCreateApiOnlyUsersBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createAuthenticators = async (input: SdkApiTypes.TCreateAuthenticatorsBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_policies", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_POLICIES", - }, - "createPoliciesResult" - ); - }; - - createPolicy = async ( - input: SdkApiTypes.TCreatePolicyBody - ): Promise => { + return this.command("/public/v1/submit/create_authenticators", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" + }, "createAuthenticatorsResult"); + } + + + stampCreateAuthenticators = async (input: SdkApiTypes.TCreateAuthenticatorsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_authenticators"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createInvitations = async (input: SdkApiTypes.TCreateInvitationsBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_policy", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_POLICY_V3", - }, - "createPolicyResult" - ); - }; - - createPrivateKeyTag = async ( - input: SdkApiTypes.TCreatePrivateKeyTagBody - ): Promise => { + return this.command("/public/v1/submit/create_invitations", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_INVITATIONS" + }, "createInvitationsResult"); + } + + + stampCreateInvitations = async (input: SdkApiTypes.TCreateInvitationsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_invitations"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createOauthProviders = async (input: SdkApiTypes.TCreateOauthProvidersBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_private_key_tag", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG", - }, - "createPrivateKeyTagResult" - ); - }; - - createPrivateKeys = async ( - input: SdkApiTypes.TCreatePrivateKeysBody - ): Promise => { + return this.command("/public/v1/submit/create_oauth_providers", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS" + }, "createOauthProvidersResult"); + } + + + stampCreateOauthProviders = async (input: SdkApiTypes.TCreateOauthProvidersBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_oauth_providers"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createPolicies = async (input: SdkApiTypes.TCreatePoliciesBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_private_keys", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2", - }, - "createPrivateKeysResultV2" - ); - }; - - createReadOnlySession = async ( - input: SdkApiTypes.TCreateReadOnlySessionBody - ): Promise => { + return this.command("/public/v1/submit/create_policies", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_POLICIES" + }, "createPoliciesResult"); + } + + + stampCreatePolicies = async (input: SdkApiTypes.TCreatePoliciesBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policies"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createPolicy = async (input: SdkApiTypes.TCreatePolicyBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_read_only_session", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION", - }, - "createReadOnlySessionResult" - ); - }; - - createReadWriteSession = async ( - input: SdkApiTypes.TCreateReadWriteSessionBody - ): Promise => { + return this.command("/public/v1/submit/create_policy", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_POLICY_V3" + }, "createPolicyResult"); + } + + + stampCreatePolicy = async (input: SdkApiTypes.TCreatePolicyBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policy"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createPrivateKeyTag = async (input: SdkApiTypes.TCreatePrivateKeyTagBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_read_write_session", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2", - }, - "createReadWriteSessionResultV2" - ); - }; - - createSubOrganization = async ( - input: SdkApiTypes.TCreateSubOrganizationBody - ): Promise => { + return this.command("/public/v1/submit/create_private_key_tag", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" + }, "createPrivateKeyTagResult"); + } + + + stampCreatePrivateKeyTag = async (input: SdkApiTypes.TCreatePrivateKeyTagBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_key_tag"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createPrivateKeys = async (input: SdkApiTypes.TCreatePrivateKeysBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_sub_organization", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7", - }, - "createSubOrganizationResultV7" - ); - }; - - createUserTag = async ( - input: SdkApiTypes.TCreateUserTagBody - ): Promise => { + return this.command("/public/v1/submit/create_private_keys", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" + }, "createPrivateKeysResultV2"); + } + + + stampCreatePrivateKeys = async (input: SdkApiTypes.TCreatePrivateKeysBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createReadOnlySession = async (input: SdkApiTypes.TCreateReadOnlySessionBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_user_tag", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_USER_TAG", - }, - "createUserTagResult" - ); - }; - - createUsers = async ( - input: SdkApiTypes.TCreateUsersBody - ): Promise => { + return this.command("/public/v1/submit/create_read_only_session", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION" + }, "createReadOnlySessionResult"); + } + + + stampCreateReadOnlySession = async (input: SdkApiTypes.TCreateReadOnlySessionBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_only_session"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createReadWriteSession = async (input: SdkApiTypes.TCreateReadWriteSessionBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_users", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_USERS_V2", - }, - "createUsersResult" - ); - }; - - createWallet = async ( - input: SdkApiTypes.TCreateWalletBody - ): Promise => { + return this.command("/public/v1/submit/create_read_write_session", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2" + }, "createReadWriteSessionResultV2"); + } + + + stampCreateReadWriteSession = async (input: SdkApiTypes.TCreateReadWriteSessionBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_write_session"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createSubOrganization = async (input: SdkApiTypes.TCreateSubOrganizationBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_wallet", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_WALLET", - }, - "createWalletResult" - ); - }; - - createWalletAccounts = async ( - input: SdkApiTypes.TCreateWalletAccountsBody - ): Promise => { + return this.command("/public/v1/submit/create_sub_organization", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7" + }, "createSubOrganizationResultV7"); + } + + + stampCreateSubOrganization = async (input: SdkApiTypes.TCreateSubOrganizationBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_sub_organization"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createUserTag = async (input: SdkApiTypes.TCreateUserTagBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/create_wallet_accounts", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS", - }, - "createWalletAccountsResult" - ); - }; - - deleteApiKeys = async ( - input: SdkApiTypes.TDeleteApiKeysBody - ): Promise => { + return this.command("/public/v1/submit/create_user_tag", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_USER_TAG" + }, "createUserTagResult"); + } + + + stampCreateUserTag = async (input: SdkApiTypes.TCreateUserTagBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_user_tag"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createUsers = async (input: SdkApiTypes.TCreateUsersBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_api_keys", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_API_KEYS", - }, - "deleteApiKeysResult" - ); - }; - - deleteAuthenticators = async ( - input: SdkApiTypes.TDeleteAuthenticatorsBody - ): Promise => { + return this.command("/public/v1/submit/create_users", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_USERS_V2" + }, "createUsersResult"); + } + + + stampCreateUsers = async (input: SdkApiTypes.TCreateUsersBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_users"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createWallet = async (input: SdkApiTypes.TCreateWalletBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_authenticators", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS", - }, - "deleteAuthenticatorsResult" - ); - }; - - deleteInvitation = async ( - input: SdkApiTypes.TDeleteInvitationBody - ): Promise => { + return this.command("/public/v1/submit/create_wallet", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_WALLET" + }, "createWalletResult"); + } + + + stampCreateWallet = async (input: SdkApiTypes.TCreateWalletBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + createWalletAccounts = async (input: SdkApiTypes.TCreateWalletAccountsBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_invitation", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_INVITATION", - }, - "deleteInvitationResult" - ); - }; - - deleteOauthProviders = async ( - input: SdkApiTypes.TDeleteOauthProvidersBody - ): Promise => { + return this.command("/public/v1/submit/create_wallet_accounts", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" + }, "createWalletAccountsResult"); + } + + + stampCreateWalletAccounts = async (input: SdkApiTypes.TCreateWalletAccountsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deleteApiKeys = async (input: SdkApiTypes.TDeleteApiKeysBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_oauth_providers", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS", - }, - "deleteOauthProvidersResult" - ); - }; - - deletePolicy = async ( - input: SdkApiTypes.TDeletePolicyBody - ): Promise => { + return this.command("/public/v1/submit/delete_api_keys", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_API_KEYS" + }, "deleteApiKeysResult"); + } + + + stampDeleteApiKeys = async (input: SdkApiTypes.TDeleteApiKeysBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deleteAuthenticators = async (input: SdkApiTypes.TDeleteAuthenticatorsBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_policy", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_POLICY", - }, - "deletePolicyResult" - ); - }; - - deletePrivateKeyTags = async ( - input: SdkApiTypes.TDeletePrivateKeyTagsBody - ): Promise => { + return this.command("/public/v1/submit/delete_authenticators", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" + }, "deleteAuthenticatorsResult"); + } + + + stampDeleteAuthenticators = async (input: SdkApiTypes.TDeleteAuthenticatorsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_authenticators"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deleteInvitation = async (input: SdkApiTypes.TDeleteInvitationBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_private_key_tags", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS", - }, - "deletePrivateKeyTagsResult" - ); - }; - - deletePrivateKeys = async ( - input: SdkApiTypes.TDeletePrivateKeysBody - ): Promise => { + return this.command("/public/v1/submit/delete_invitation", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_INVITATION" + }, "deleteInvitationResult"); + } + + + stampDeleteInvitation = async (input: SdkApiTypes.TDeleteInvitationBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_invitation"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deleteOauthProviders = async (input: SdkApiTypes.TDeleteOauthProvidersBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_private_keys", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS", - }, - "deletePrivateKeysResult" - ); - }; - - deleteSubOrganization = async ( - input: SdkApiTypes.TDeleteSubOrganizationBody - ): Promise => { + return this.command("/public/v1/submit/delete_oauth_providers", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS" + }, "deleteOauthProvidersResult"); + } + + + stampDeleteOauthProviders = async (input: SdkApiTypes.TDeleteOauthProvidersBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_oauth_providers"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deletePolicy = async (input: SdkApiTypes.TDeletePolicyBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_sub_organization", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION", - }, - "deleteSubOrganizationResult" - ); - }; - - deleteUserTags = async ( - input: SdkApiTypes.TDeleteUserTagsBody - ): Promise => { + return this.command("/public/v1/submit/delete_policy", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_POLICY" + }, "deletePolicyResult"); + } + + + stampDeletePolicy = async (input: SdkApiTypes.TDeletePolicyBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_policy"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deletePrivateKeyTags = async (input: SdkApiTypes.TDeletePrivateKeyTagsBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_user_tags", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_USER_TAGS", - }, - "deleteUserTagsResult" - ); - }; - - deleteUsers = async ( - input: SdkApiTypes.TDeleteUsersBody - ): Promise => { + return this.command("/public/v1/submit/delete_private_key_tags", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" + }, "deletePrivateKeyTagsResult"); + } + + + stampDeletePrivateKeyTags = async (input: SdkApiTypes.TDeletePrivateKeyTagsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_key_tags"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deletePrivateKeys = async (input: SdkApiTypes.TDeletePrivateKeysBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_users", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_USERS", - }, - "deleteUsersResult" - ); - }; - - deleteWallets = async ( - input: SdkApiTypes.TDeleteWalletsBody - ): Promise => { + return this.command("/public/v1/submit/delete_private_keys", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS" + }, "deletePrivateKeysResult"); + } + + + stampDeletePrivateKeys = async (input: SdkApiTypes.TDeletePrivateKeysBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deleteSubOrganization = async (input: SdkApiTypes.TDeleteSubOrganizationBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/delete_wallets", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_WALLETS", - }, - "deleteWalletsResult" - ); - }; - - emailAuth = async ( - input: SdkApiTypes.TEmailAuthBody - ): Promise => { + return this.command("/public/v1/submit/delete_sub_organization", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION" + }, "deleteSubOrganizationResult"); + } + + + stampDeleteSubOrganization = async (input: SdkApiTypes.TDeleteSubOrganizationBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_sub_organization"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deleteUserTags = async (input: SdkApiTypes.TDeleteUserTagsBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/email_auth", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_EMAIL_AUTH_V2", - }, - "emailAuthResult" - ); - }; - - exportPrivateKey = async ( - input: SdkApiTypes.TExportPrivateKeyBody - ): Promise => { + return this.command("/public/v1/submit/delete_user_tags", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_USER_TAGS" + }, "deleteUserTagsResult"); + } + + + stampDeleteUserTags = async (input: SdkApiTypes.TDeleteUserTagsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_user_tags"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deleteUsers = async (input: SdkApiTypes.TDeleteUsersBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/export_private_key", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY", - }, - "exportPrivateKeyResult" - ); - }; - - exportWallet = async ( - input: SdkApiTypes.TExportWalletBody - ): Promise => { + return this.command("/public/v1/submit/delete_users", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_USERS" + }, "deleteUsersResult"); + } + + + stampDeleteUsers = async (input: SdkApiTypes.TDeleteUsersBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_users"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + deleteWallets = async (input: SdkApiTypes.TDeleteWalletsBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/export_wallet", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_EXPORT_WALLET", - }, - "exportWalletResult" - ); - }; - - exportWalletAccount = async ( - input: SdkApiTypes.TExportWalletAccountBody - ): Promise => { + return this.command("/public/v1/submit/delete_wallets", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_WALLETS" + }, "deleteWalletsResult"); + } + + + stampDeleteWallets = async (input: SdkApiTypes.TDeleteWalletsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallets"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + emailAuth = async (input: SdkApiTypes.TEmailAuthBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/export_wallet_account", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT", - }, - "exportWalletAccountResult" - ); - }; - - importPrivateKey = async ( - input: SdkApiTypes.TImportPrivateKeyBody - ): Promise => { + return this.command("/public/v1/submit/email_auth", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_EMAIL_AUTH_V2" + }, "emailAuthResult"); + } + + + stampEmailAuth = async (input: SdkApiTypes.TEmailAuthBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/email_auth"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + exportPrivateKey = async (input: SdkApiTypes.TExportPrivateKeyBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/import_private_key", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY", - }, - "importPrivateKeyResult" - ); - }; - - importWallet = async ( - input: SdkApiTypes.TImportWalletBody - ): Promise => { + return this.command("/public/v1/submit/export_private_key", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" + }, "exportPrivateKeyResult"); + } + + + stampExportPrivateKey = async (input: SdkApiTypes.TExportPrivateKeyBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_private_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + exportWallet = async (input: SdkApiTypes.TExportWalletBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/import_wallet", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_IMPORT_WALLET", - }, - "importWalletResult" - ); - }; - - initImportPrivateKey = async ( - input: SdkApiTypes.TInitImportPrivateKeyBody - ): Promise => { + return this.command("/public/v1/submit/export_wallet", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_EXPORT_WALLET" + }, "exportWalletResult"); + } + + + stampExportWallet = async (input: SdkApiTypes.TExportWalletBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + exportWalletAccount = async (input: SdkApiTypes.TExportWalletAccountBody): Promise => { + const { organizationId, timestampMs, ...rest } = input; + const currentUser = await getStorageValue(StorageKeys.CurrentUser); + return this.command("/public/v1/submit/export_wallet_account", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" + }, "exportWalletAccountResult"); + } + + + stampExportWalletAccount = async (input: SdkApiTypes.TExportWalletAccountBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_wallet_account"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + importPrivateKey = async (input: SdkApiTypes.TImportPrivateKeyBody): Promise => { + const { organizationId, timestampMs, ...rest } = input; + const currentUser = await getStorageValue(StorageKeys.CurrentUser); + return this.command("/public/v1/submit/import_private_key", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY" + }, "importPrivateKeyResult"); + } + + + stampImportPrivateKey = async (input: SdkApiTypes.TImportPrivateKeyBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/import_private_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + importWallet = async (input: SdkApiTypes.TImportWalletBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/init_import_private_key", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY", - }, - "initImportPrivateKeyResult" - ); - }; - - initImportWallet = async ( - input: SdkApiTypes.TInitImportWalletBody - ): Promise => { + return this.command("/public/v1/submit/import_wallet", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_IMPORT_WALLET" + }, "importWalletResult"); + } + + + stampImportWallet = async (input: SdkApiTypes.TImportWalletBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/import_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + initImportPrivateKey = async (input: SdkApiTypes.TInitImportPrivateKeyBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/init_import_wallet", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_INIT_IMPORT_WALLET", - }, - "initImportWalletResult" - ); - }; - - initOtpAuth = async ( - input: SdkApiTypes.TInitOtpAuthBody - ): Promise => { + return this.command("/public/v1/submit/init_import_private_key", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY" + }, "initImportPrivateKeyResult"); + } + + + stampInitImportPrivateKey = async (input: SdkApiTypes.TInitImportPrivateKeyBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_import_private_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + initImportWallet = async (input: SdkApiTypes.TInitImportWalletBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/init_otp_auth", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_INIT_OTP_AUTH", - }, - "initOtpAuthResult" - ); - }; - - initUserEmailRecovery = async ( - input: SdkApiTypes.TInitUserEmailRecoveryBody - ): Promise => { + return this.command("/public/v1/submit/init_import_wallet", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_INIT_IMPORT_WALLET" + }, "initImportWalletResult"); + } + + + stampInitImportWallet = async (input: SdkApiTypes.TInitImportWalletBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_import_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + initOtpAuth = async (input: SdkApiTypes.TInitOtpAuthBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/init_user_email_recovery", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY", - }, - "initUserEmailRecoveryResult" - ); - }; - - oauth = async ( - input: SdkApiTypes.TOauthBody - ): Promise => { + return this.command("/public/v1/submit/init_otp_auth", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_INIT_OTP_AUTH" + }, "initOtpAuthResult"); + } + + + stampInitOtpAuth = async (input: SdkApiTypes.TInitOtpAuthBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_otp_auth"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + initUserEmailRecovery = async (input: SdkApiTypes.TInitUserEmailRecoveryBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/oauth", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_OAUTH", - }, - "oauthResult" - ); - }; - - otpAuth = async ( - input: SdkApiTypes.TOtpAuthBody - ): Promise => { + return this.command("/public/v1/submit/init_user_email_recovery", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" + }, "initUserEmailRecoveryResult"); + } + + + stampInitUserEmailRecovery = async (input: SdkApiTypes.TInitUserEmailRecoveryBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_user_email_recovery"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + oauth = async (input: SdkApiTypes.TOauthBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/otp_auth", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_OTP_AUTH", - }, - "otpAuthResult" - ); - }; - - recoverUser = async ( - input: SdkApiTypes.TRecoverUserBody - ): Promise => { + return this.command("/public/v1/submit/oauth", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_OAUTH" + }, "oauthResult"); + } + + + stampOauth = async (input: SdkApiTypes.TOauthBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/oauth"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + otpAuth = async (input: SdkApiTypes.TOtpAuthBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/recover_user", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_RECOVER_USER", - }, - "recoverUserResult" - ); - }; - - rejectActivity = async ( - input: SdkApiTypes.TRejectActivityBody - ): Promise => { + return this.command("/public/v1/submit/otp_auth", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_OTP_AUTH" + }, "otpAuthResult"); + } + + + stampOtpAuth = async (input: SdkApiTypes.TOtpAuthBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/otp_auth"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + recoverUser = async (input: SdkApiTypes.TRecoverUserBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.activityDecision("/public/v1/submit/reject_activity", { + return this.command("/public/v1/submit/recover_user", { parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_REJECT_ACTIVITY", - }); - }; + type: "ACTIVITY_TYPE_RECOVER_USER" + }, "recoverUserResult"); + } + + + stampRecoverUser = async (input: SdkApiTypes.TRecoverUserBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/recover_user"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } - removeOrganizationFeature = async ( - input: SdkApiTypes.TRemoveOrganizationFeatureBody - ): Promise => { + + rejectActivity = async (input: SdkApiTypes.TRejectActivityBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/remove_organization_feature", + return this.activityDecision("/public/v1/submit/reject_activity", { parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE", - }, - "removeOrganizationFeatureResult" - ); - }; - - setOrganizationFeature = async ( - input: SdkApiTypes.TSetOrganizationFeatureBody - ): Promise => { + type: "ACTIVITY_TYPE_REJECT_ACTIVITY" + }); + } + + + stampRejectActivity = async (input: SdkApiTypes.TRejectActivityBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/reject_activity"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + removeOrganizationFeature = async (input: SdkApiTypes.TRemoveOrganizationFeatureBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/set_organization_feature", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE", - }, - "setOrganizationFeatureResult" - ); - }; - - signRawPayload = async ( - input: SdkApiTypes.TSignRawPayloadBody - ): Promise => { + return this.command("/public/v1/submit/remove_organization_feature", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" + }, "removeOrganizationFeatureResult"); + } + + + stampRemoveOrganizationFeature = async (input: SdkApiTypes.TRemoveOrganizationFeatureBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/remove_organization_feature"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + setOrganizationFeature = async (input: SdkApiTypes.TSetOrganizationFeatureBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/sign_raw_payload", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", - }, - "signRawPayloadResult" - ); - }; - - signRawPayloads = async ( - input: SdkApiTypes.TSignRawPayloadsBody - ): Promise => { + return this.command("/public/v1/submit/set_organization_feature", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" + }, "setOrganizationFeatureResult"); + } + + + stampSetOrganizationFeature = async (input: SdkApiTypes.TSetOrganizationFeatureBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/set_organization_feature"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + signRawPayload = async (input: SdkApiTypes.TSignRawPayloadBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/sign_raw_payloads", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS", - }, - "signRawPayloadsResult" - ); - }; - - signTransaction = async ( - input: SdkApiTypes.TSignTransactionBody - ): Promise => { + return this.command("/public/v1/submit/sign_raw_payload", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" + }, "signRawPayloadResult"); + } + + + stampSignRawPayload = async (input: SdkApiTypes.TSignRawPayloadBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payload"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + signRawPayloads = async (input: SdkApiTypes.TSignRawPayloadsBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/sign_transaction", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2", - }, - "signTransactionResult" - ); - }; - - updatePolicy = async ( - input: SdkApiTypes.TUpdatePolicyBody - ): Promise => { + return this.command("/public/v1/submit/sign_raw_payloads", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS" + }, "signRawPayloadsResult"); + } + + + stampSignRawPayloads = async (input: SdkApiTypes.TSignRawPayloadsBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payloads"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + signTransaction = async (input: SdkApiTypes.TSignTransactionBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/update_policy", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_POLICY", - }, - "updatePolicyResult" - ); - }; - - updatePrivateKeyTag = async ( - input: SdkApiTypes.TUpdatePrivateKeyTagBody - ): Promise => { + return this.command("/public/v1/submit/sign_transaction", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" + }, "signTransactionResult"); + } + + + stampSignTransaction = async (input: SdkApiTypes.TSignTransactionBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_transaction"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + updatePolicy = async (input: SdkApiTypes.TUpdatePolicyBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/update_private_key_tag", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG", - }, - "updatePrivateKeyTagResult" - ); - }; - - updateRootQuorum = async ( - input: SdkApiTypes.TUpdateRootQuorumBody - ): Promise => { + return this.command("/public/v1/submit/update_policy", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_POLICY" + }, "updatePolicyResult"); + } + + + stampUpdatePolicy = async (input: SdkApiTypes.TUpdatePolicyBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_policy"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + updatePrivateKeyTag = async (input: SdkApiTypes.TUpdatePrivateKeyTagBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/update_root_quorum", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM", - }, - "updateRootQuorumResult" - ); - }; - - updateUser = async ( - input: SdkApiTypes.TUpdateUserBody - ): Promise => { + return this.command("/public/v1/submit/update_private_key_tag", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" + }, "updatePrivateKeyTagResult"); + } + + + stampUpdatePrivateKeyTag = async (input: SdkApiTypes.TUpdatePrivateKeyTagBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_private_key_tag"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + updateRootQuorum = async (input: SdkApiTypes.TUpdateRootQuorumBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/update_user", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_USER", - }, - "updateUserResult" - ); - }; - - updateUserTag = async ( - input: SdkApiTypes.TUpdateUserTagBody - ): Promise => { + return this.command("/public/v1/submit/update_root_quorum", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" + }, "updateRootQuorumResult"); + } + + + stampUpdateRootQuorum = async (input: SdkApiTypes.TUpdateRootQuorumBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_root_quorum"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + updateUser = async (input: SdkApiTypes.TUpdateUserBody): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command( - "/public/v1/submit/update_user_tag", - { - parameters: rest, - organizationId: - organizationId ?? - currentUser?.organization?.organizationId ?? - this.config.organizationId, - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_USER_TAG", - }, - "updateUserTagResult" - ); - }; -} + return this.command("/public/v1/submit/update_user", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_USER" + }, "updateUserResult"); + } + + + stampUpdateUser = async (input: SdkApiTypes.TUpdateUserBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + + + updateUserTag = async (input: SdkApiTypes.TUpdateUserTagBody): Promise => { + const { organizationId, timestampMs, ...rest } = input; + const currentUser = await getStorageValue(StorageKeys.CurrentUser); + return this.command("/public/v1/submit/update_user_tag", { + parameters: rest, + organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_USER_TAG" + }, "updateUserTagResult"); + } + + + stampUpdateUserTag = async (input: SdkApiTypes.TUpdateUserTagBody): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user_tag"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + } + +} \ No newline at end of file diff --git a/packages/sdk-browser/src/__generated__/sdk_api_types.ts b/packages/sdk-browser/src/__generated__/sdk_api_types.ts index acc36539..a7a6ffa6 100644 --- a/packages/sdk-browser/src/__generated__/sdk_api_types.ts +++ b/packages/sdk-browser/src/__generated__/sdk_api_types.ts @@ -2,793 +2,456 @@ import type { operations, definitions } from "../__inputs__/public_api.types"; -import type { - queryOverrideParams, - commandOverrideParams, -} from "../__types__/base"; +import type { queryOverrideParams, commandOverrideParams } from "../__types__/base"; -export type TGetActivityResponse = - operations["PublicApiService_GetActivity"]["responses"]["200"]["schema"]; +export type TGetActivityResponse = operations["PublicApiService_GetActivity"]["responses"]["200"]["schema"]; export type TGetActivityInput = { body: TGetActivityBody }; -export type TGetActivityBody = Omit< - operations["PublicApiService_GetActivity"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetActivityBody = Omit & queryOverrideParams; -export type TGetApiKeyResponse = - operations["PublicApiService_GetApiKey"]["responses"]["200"]["schema"]; +export type TGetApiKeyResponse = operations["PublicApiService_GetApiKey"]["responses"]["200"]["schema"]; export type TGetApiKeyInput = { body: TGetApiKeyBody }; -export type TGetApiKeyBody = Omit< - operations["PublicApiService_GetApiKey"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetApiKeyBody = Omit & queryOverrideParams; -export type TGetApiKeysResponse = - operations["PublicApiService_GetApiKeys"]["responses"]["200"]["schema"]; +export type TGetApiKeysResponse = operations["PublicApiService_GetApiKeys"]["responses"]["200"]["schema"]; export type TGetApiKeysInput = { body: TGetApiKeysBody }; -export type TGetApiKeysBody = Omit< - operations["PublicApiService_GetApiKeys"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetApiKeysBody = Omit & queryOverrideParams; -export type TGetAttestationDocumentResponse = - operations["PublicApiService_GetAttestationDocument"]["responses"]["200"]["schema"]; +export type TGetAttestationDocumentResponse = operations["PublicApiService_GetAttestationDocument"]["responses"]["200"]["schema"]; -export type TGetAttestationDocumentInput = { - body: TGetAttestationDocumentBody; -}; +export type TGetAttestationDocumentInput = { body: TGetAttestationDocumentBody }; -export type TGetAttestationDocumentBody = Omit< - operations["PublicApiService_GetAttestationDocument"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetAttestationDocumentBody = Omit & queryOverrideParams; -export type TGetAuthenticatorResponse = - operations["PublicApiService_GetAuthenticator"]["responses"]["200"]["schema"]; +export type TGetAuthenticatorResponse = operations["PublicApiService_GetAuthenticator"]["responses"]["200"]["schema"]; export type TGetAuthenticatorInput = { body: TGetAuthenticatorBody }; -export type TGetAuthenticatorBody = Omit< - operations["PublicApiService_GetAuthenticator"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetAuthenticatorBody = Omit & queryOverrideParams; -export type TGetAuthenticatorsResponse = - operations["PublicApiService_GetAuthenticators"]["responses"]["200"]["schema"]; +export type TGetAuthenticatorsResponse = operations["PublicApiService_GetAuthenticators"]["responses"]["200"]["schema"]; export type TGetAuthenticatorsInput = { body: TGetAuthenticatorsBody }; -export type TGetAuthenticatorsBody = Omit< - operations["PublicApiService_GetAuthenticators"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetAuthenticatorsBody = Omit & queryOverrideParams; -export type TGetOauthProvidersResponse = - operations["PublicApiService_GetOauthProviders"]["responses"]["200"]["schema"]; +export type TGetOauthProvidersResponse = operations["PublicApiService_GetOauthProviders"]["responses"]["200"]["schema"]; export type TGetOauthProvidersInput = { body: TGetOauthProvidersBody }; -export type TGetOauthProvidersBody = Omit< - operations["PublicApiService_GetOauthProviders"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetOauthProvidersBody = Omit & queryOverrideParams; -export type TGetOrganizationResponse = - operations["PublicApiService_GetOrganization"]["responses"]["200"]["schema"]; +export type TGetOrganizationResponse = operations["PublicApiService_GetOrganization"]["responses"]["200"]["schema"]; export type TGetOrganizationInput = { body: TGetOrganizationBody }; -export type TGetOrganizationBody = Omit< - operations["PublicApiService_GetOrganization"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetOrganizationBody = Omit & queryOverrideParams; -export type TGetOrganizationConfigsResponse = - operations["PublicApiService_GetOrganizationConfigs"]["responses"]["200"]["schema"]; +export type TGetOrganizationConfigsResponse = operations["PublicApiService_GetOrganizationConfigs"]["responses"]["200"]["schema"]; -export type TGetOrganizationConfigsInput = { - body: TGetOrganizationConfigsBody; -}; +export type TGetOrganizationConfigsInput = { body: TGetOrganizationConfigsBody }; -export type TGetOrganizationConfigsBody = Omit< - operations["PublicApiService_GetOrganizationConfigs"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetOrganizationConfigsBody = Omit & queryOverrideParams; -export type TGetPolicyResponse = - operations["PublicApiService_GetPolicy"]["responses"]["200"]["schema"]; +export type TGetPolicyResponse = operations["PublicApiService_GetPolicy"]["responses"]["200"]["schema"]; export type TGetPolicyInput = { body: TGetPolicyBody }; -export type TGetPolicyBody = Omit< - operations["PublicApiService_GetPolicy"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetPolicyBody = Omit & queryOverrideParams; -export type TGetPrivateKeyResponse = - operations["PublicApiService_GetPrivateKey"]["responses"]["200"]["schema"]; +export type TGetPrivateKeyResponse = operations["PublicApiService_GetPrivateKey"]["responses"]["200"]["schema"]; export type TGetPrivateKeyInput = { body: TGetPrivateKeyBody }; -export type TGetPrivateKeyBody = Omit< - operations["PublicApiService_GetPrivateKey"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetPrivateKeyBody = Omit & queryOverrideParams; -export type TGetUserResponse = - operations["PublicApiService_GetUser"]["responses"]["200"]["schema"]; +export type TGetUserResponse = operations["PublicApiService_GetUser"]["responses"]["200"]["schema"]; export type TGetUserInput = { body: TGetUserBody }; -export type TGetUserBody = Omit< - operations["PublicApiService_GetUser"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetUserBody = Omit & queryOverrideParams; -export type TGetWalletResponse = - operations["PublicApiService_GetWallet"]["responses"]["200"]["schema"]; +export type TGetWalletResponse = operations["PublicApiService_GetWallet"]["responses"]["200"]["schema"]; export type TGetWalletInput = { body: TGetWalletBody }; -export type TGetWalletBody = Omit< - operations["PublicApiService_GetWallet"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetWalletBody = Omit & queryOverrideParams; -export type TGetActivitiesResponse = - operations["PublicApiService_GetActivities"]["responses"]["200"]["schema"]; +export type TGetActivitiesResponse = operations["PublicApiService_GetActivities"]["responses"]["200"]["schema"]; export type TGetActivitiesInput = { body: TGetActivitiesBody }; -export type TGetActivitiesBody = Omit< - operations["PublicApiService_GetActivities"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetActivitiesBody = Omit & queryOverrideParams; -export type TGetPoliciesResponse = - operations["PublicApiService_GetPolicies"]["responses"]["200"]["schema"]; +export type TGetPoliciesResponse = operations["PublicApiService_GetPolicies"]["responses"]["200"]["schema"]; export type TGetPoliciesInput = { body: TGetPoliciesBody }; -export type TGetPoliciesBody = Omit< - operations["PublicApiService_GetPolicies"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetPoliciesBody = Omit & queryOverrideParams; -export type TListPrivateKeyTagsResponse = - operations["PublicApiService_ListPrivateKeyTags"]["responses"]["200"]["schema"]; +export type TListPrivateKeyTagsResponse = operations["PublicApiService_ListPrivateKeyTags"]["responses"]["200"]["schema"]; export type TListPrivateKeyTagsInput = { body: TListPrivateKeyTagsBody }; -export type TListPrivateKeyTagsBody = Omit< - operations["PublicApiService_ListPrivateKeyTags"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TListPrivateKeyTagsBody = Omit & queryOverrideParams; -export type TGetPrivateKeysResponse = - operations["PublicApiService_GetPrivateKeys"]["responses"]["200"]["schema"]; +export type TGetPrivateKeysResponse = operations["PublicApiService_GetPrivateKeys"]["responses"]["200"]["schema"]; export type TGetPrivateKeysInput = { body: TGetPrivateKeysBody }; -export type TGetPrivateKeysBody = Omit< - operations["PublicApiService_GetPrivateKeys"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetPrivateKeysBody = Omit & queryOverrideParams; -export type TGetSubOrgIdsResponse = - operations["PublicApiService_GetSubOrgIds"]["responses"]["200"]["schema"]; +export type TGetSubOrgIdsResponse = operations["PublicApiService_GetSubOrgIds"]["responses"]["200"]["schema"]; export type TGetSubOrgIdsInput = { body: TGetSubOrgIdsBody }; -export type TGetSubOrgIdsBody = Omit< - operations["PublicApiService_GetSubOrgIds"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetSubOrgIdsBody = Omit & queryOverrideParams; -export type TListUserTagsResponse = - operations["PublicApiService_ListUserTags"]["responses"]["200"]["schema"]; +export type TListUserTagsResponse = operations["PublicApiService_ListUserTags"]["responses"]["200"]["schema"]; export type TListUserTagsInput = { body: TListUserTagsBody }; -export type TListUserTagsBody = Omit< - operations["PublicApiService_ListUserTags"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TListUserTagsBody = Omit & queryOverrideParams; -export type TGetUsersResponse = - operations["PublicApiService_GetUsers"]["responses"]["200"]["schema"]; +export type TGetUsersResponse = operations["PublicApiService_GetUsers"]["responses"]["200"]["schema"]; export type TGetUsersInput = { body: TGetUsersBody }; -export type TGetUsersBody = Omit< - operations["PublicApiService_GetUsers"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetUsersBody = Omit & queryOverrideParams; -export type TGetWalletAccountsResponse = - operations["PublicApiService_GetWalletAccounts"]["responses"]["200"]["schema"]; +export type TGetWalletAccountsResponse = operations["PublicApiService_GetWalletAccounts"]["responses"]["200"]["schema"]; export type TGetWalletAccountsInput = { body: TGetWalletAccountsBody }; -export type TGetWalletAccountsBody = Omit< - operations["PublicApiService_GetWalletAccounts"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetWalletAccountsBody = Omit & queryOverrideParams; -export type TGetWalletsResponse = - operations["PublicApiService_GetWallets"]["responses"]["200"]["schema"]; +export type TGetWalletsResponse = operations["PublicApiService_GetWallets"]["responses"]["200"]["schema"]; export type TGetWalletsInput = { body: TGetWalletsBody }; -export type TGetWalletsBody = Omit< - operations["PublicApiService_GetWallets"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetWalletsBody = Omit & queryOverrideParams; -export type TGetWhoamiResponse = - operations["PublicApiService_GetWhoami"]["responses"]["200"]["schema"]; +export type TGetWhoamiResponse = operations["PublicApiService_GetWhoami"]["responses"]["200"]["schema"]; export type TGetWhoamiInput = { body: TGetWhoamiBody }; -export type TGetWhoamiBody = Omit< - operations["PublicApiService_GetWhoami"]["parameters"]["body"]["body"], - "organizationId" -> & - queryOverrideParams; +export type TGetWhoamiBody = Omit & queryOverrideParams; -export type TApproveActivityResponse = - operations["PublicApiService_ApproveActivity"]["responses"]["200"]["schema"]["activity"]["result"] & - definitions["v1ActivityResponse"]; +export type TApproveActivityResponse = operations["PublicApiService_ApproveActivity"]["responses"]["200"]["schema"]["activity"]["result"] & definitions["v1ActivityResponse"]; export type TApproveActivityInput = { body: TApproveActivityBody }; -export type TApproveActivityBody = - operations["PublicApiService_ApproveActivity"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TApproveActivityBody = operations["PublicApiService_ApproveActivity"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateApiKeysResponse = - operations["PublicApiService_CreateApiKeys"]["responses"]["200"]["schema"]["activity"]["result"]["createApiKeysResult"] & - definitions["v1ActivityResponse"]; +export type TCreateApiKeysResponse = operations["PublicApiService_CreateApiKeys"]["responses"]["200"]["schema"]["activity"]["result"]["createApiKeysResult"] & definitions["v1ActivityResponse"]; export type TCreateApiKeysInput = { body: TCreateApiKeysBody }; -export type TCreateApiKeysBody = - operations["PublicApiService_CreateApiKeys"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateApiKeysBody = operations["PublicApiService_CreateApiKeys"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateApiOnlyUsersResponse = - operations["PublicApiService_CreateApiOnlyUsers"]["responses"]["200"]["schema"]["activity"]["result"]["createApiOnlyUsersResult"] & - definitions["v1ActivityResponse"]; +export type TCreateApiOnlyUsersResponse = operations["PublicApiService_CreateApiOnlyUsers"]["responses"]["200"]["schema"]["activity"]["result"]["createApiOnlyUsersResult"] & definitions["v1ActivityResponse"]; export type TCreateApiOnlyUsersInput = { body: TCreateApiOnlyUsersBody }; -export type TCreateApiOnlyUsersBody = - operations["PublicApiService_CreateApiOnlyUsers"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateApiOnlyUsersBody = operations["PublicApiService_CreateApiOnlyUsers"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateAuthenticatorsResponse = - operations["PublicApiService_CreateAuthenticators"]["responses"]["200"]["schema"]["activity"]["result"]["createAuthenticatorsResult"] & - definitions["v1ActivityResponse"]; +export type TCreateAuthenticatorsResponse = operations["PublicApiService_CreateAuthenticators"]["responses"]["200"]["schema"]["activity"]["result"]["createAuthenticatorsResult"] & definitions["v1ActivityResponse"]; export type TCreateAuthenticatorsInput = { body: TCreateAuthenticatorsBody }; -export type TCreateAuthenticatorsBody = - operations["PublicApiService_CreateAuthenticators"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateAuthenticatorsBody = operations["PublicApiService_CreateAuthenticators"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateInvitationsResponse = - operations["PublicApiService_CreateInvitations"]["responses"]["200"]["schema"]["activity"]["result"]["createInvitationsResult"] & - definitions["v1ActivityResponse"]; +export type TCreateInvitationsResponse = operations["PublicApiService_CreateInvitations"]["responses"]["200"]["schema"]["activity"]["result"]["createInvitationsResult"] & definitions["v1ActivityResponse"]; export type TCreateInvitationsInput = { body: TCreateInvitationsBody }; -export type TCreateInvitationsBody = - operations["PublicApiService_CreateInvitations"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateInvitationsBody = operations["PublicApiService_CreateInvitations"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateOauthProvidersResponse = - operations["PublicApiService_CreateOauthProviders"]["responses"]["200"]["schema"]["activity"]["result"]["createOauthProvidersResult"] & - definitions["v1ActivityResponse"]; +export type TCreateOauthProvidersResponse = operations["PublicApiService_CreateOauthProviders"]["responses"]["200"]["schema"]["activity"]["result"]["createOauthProvidersResult"] & definitions["v1ActivityResponse"]; export type TCreateOauthProvidersInput = { body: TCreateOauthProvidersBody }; -export type TCreateOauthProvidersBody = - operations["PublicApiService_CreateOauthProviders"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateOauthProvidersBody = operations["PublicApiService_CreateOauthProviders"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreatePoliciesResponse = - operations["PublicApiService_CreatePolicies"]["responses"]["200"]["schema"]["activity"]["result"]["createPoliciesResult"] & - definitions["v1ActivityResponse"]; +export type TCreatePoliciesResponse = operations["PublicApiService_CreatePolicies"]["responses"]["200"]["schema"]["activity"]["result"]["createPoliciesResult"] & definitions["v1ActivityResponse"]; export type TCreatePoliciesInput = { body: TCreatePoliciesBody }; -export type TCreatePoliciesBody = - operations["PublicApiService_CreatePolicies"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreatePoliciesBody = operations["PublicApiService_CreatePolicies"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreatePolicyResponse = - operations["PublicApiService_CreatePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["createPolicyResult"] & - definitions["v1ActivityResponse"]; +export type TCreatePolicyResponse = operations["PublicApiService_CreatePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["createPolicyResult"] & definitions["v1ActivityResponse"]; export type TCreatePolicyInput = { body: TCreatePolicyBody }; -export type TCreatePolicyBody = - operations["PublicApiService_CreatePolicy"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreatePolicyBody = operations["PublicApiService_CreatePolicy"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreatePrivateKeyTagResponse = - operations["PublicApiService_CreatePrivateKeyTag"]["responses"]["200"]["schema"]["activity"]["result"]["createPrivateKeyTagResult"] & - definitions["v1ActivityResponse"]; +export type TCreatePrivateKeyTagResponse = operations["PublicApiService_CreatePrivateKeyTag"]["responses"]["200"]["schema"]["activity"]["result"]["createPrivateKeyTagResult"] & definitions["v1ActivityResponse"]; export type TCreatePrivateKeyTagInput = { body: TCreatePrivateKeyTagBody }; -export type TCreatePrivateKeyTagBody = - operations["PublicApiService_CreatePrivateKeyTag"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreatePrivateKeyTagBody = operations["PublicApiService_CreatePrivateKeyTag"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreatePrivateKeysResponse = - operations["PublicApiService_CreatePrivateKeys"]["responses"]["200"]["schema"]["activity"]["result"]["createPrivateKeysResultV2"] & - definitions["v1ActivityResponse"]; +export type TCreatePrivateKeysResponse = operations["PublicApiService_CreatePrivateKeys"]["responses"]["200"]["schema"]["activity"]["result"]["createPrivateKeysResultV2"] & definitions["v1ActivityResponse"]; export type TCreatePrivateKeysInput = { body: TCreatePrivateKeysBody }; -export type TCreatePrivateKeysBody = - operations["PublicApiService_CreatePrivateKeys"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreatePrivateKeysBody = operations["PublicApiService_CreatePrivateKeys"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateReadOnlySessionResponse = - operations["PublicApiService_CreateReadOnlySession"]["responses"]["200"]["schema"]["activity"]["result"]["createReadOnlySessionResult"] & - definitions["v1ActivityResponse"]; +export type TCreateReadOnlySessionResponse = operations["PublicApiService_CreateReadOnlySession"]["responses"]["200"]["schema"]["activity"]["result"]["createReadOnlySessionResult"] & definitions["v1ActivityResponse"]; export type TCreateReadOnlySessionInput = { body: TCreateReadOnlySessionBody }; -export type TCreateReadOnlySessionBody = - operations["PublicApiService_CreateReadOnlySession"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateReadOnlySessionBody = operations["PublicApiService_CreateReadOnlySession"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateReadWriteSessionResponse = - operations["PublicApiService_CreateReadWriteSession"]["responses"]["200"]["schema"]["activity"]["result"]["createReadWriteSessionResultV2"] & - definitions["v1ActivityResponse"]; +export type TCreateReadWriteSessionResponse = operations["PublicApiService_CreateReadWriteSession"]["responses"]["200"]["schema"]["activity"]["result"]["createReadWriteSessionResultV2"] & definitions["v1ActivityResponse"]; -export type TCreateReadWriteSessionInput = { - body: TCreateReadWriteSessionBody; -}; +export type TCreateReadWriteSessionInput = { body: TCreateReadWriteSessionBody }; -export type TCreateReadWriteSessionBody = - operations["PublicApiService_CreateReadWriteSession"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateReadWriteSessionBody = operations["PublicApiService_CreateReadWriteSession"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateSubOrganizationResponse = - operations["PublicApiService_CreateSubOrganization"]["responses"]["200"]["schema"]["activity"]["result"]["createSubOrganizationResultV7"] & - definitions["v1ActivityResponse"]; +export type TCreateSubOrganizationResponse = operations["PublicApiService_CreateSubOrganization"]["responses"]["200"]["schema"]["activity"]["result"]["createSubOrganizationResultV7"] & definitions["v1ActivityResponse"]; export type TCreateSubOrganizationInput = { body: TCreateSubOrganizationBody }; -export type TCreateSubOrganizationBody = - operations["PublicApiService_CreateSubOrganization"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateSubOrganizationBody = operations["PublicApiService_CreateSubOrganization"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateUserTagResponse = - operations["PublicApiService_CreateUserTag"]["responses"]["200"]["schema"]["activity"]["result"]["createUserTagResult"] & - definitions["v1ActivityResponse"]; +export type TCreateUserTagResponse = operations["PublicApiService_CreateUserTag"]["responses"]["200"]["schema"]["activity"]["result"]["createUserTagResult"] & definitions["v1ActivityResponse"]; export type TCreateUserTagInput = { body: TCreateUserTagBody }; -export type TCreateUserTagBody = - operations["PublicApiService_CreateUserTag"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateUserTagBody = operations["PublicApiService_CreateUserTag"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateUsersResponse = - operations["PublicApiService_CreateUsers"]["responses"]["200"]["schema"]["activity"]["result"]["createUsersResult"] & - definitions["v1ActivityResponse"]; +export type TCreateUsersResponse = operations["PublicApiService_CreateUsers"]["responses"]["200"]["schema"]["activity"]["result"]["createUsersResult"] & definitions["v1ActivityResponse"]; export type TCreateUsersInput = { body: TCreateUsersBody }; -export type TCreateUsersBody = - operations["PublicApiService_CreateUsers"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateUsersBody = operations["PublicApiService_CreateUsers"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateWalletResponse = - operations["PublicApiService_CreateWallet"]["responses"]["200"]["schema"]["activity"]["result"]["createWalletResult"] & - definitions["v1ActivityResponse"]; +export type TCreateWalletResponse = operations["PublicApiService_CreateWallet"]["responses"]["200"]["schema"]["activity"]["result"]["createWalletResult"] & definitions["v1ActivityResponse"]; export type TCreateWalletInput = { body: TCreateWalletBody }; -export type TCreateWalletBody = - operations["PublicApiService_CreateWallet"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateWalletBody = operations["PublicApiService_CreateWallet"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TCreateWalletAccountsResponse = - operations["PublicApiService_CreateWalletAccounts"]["responses"]["200"]["schema"]["activity"]["result"]["createWalletAccountsResult"] & - definitions["v1ActivityResponse"]; +export type TCreateWalletAccountsResponse = operations["PublicApiService_CreateWalletAccounts"]["responses"]["200"]["schema"]["activity"]["result"]["createWalletAccountsResult"] & definitions["v1ActivityResponse"]; export type TCreateWalletAccountsInput = { body: TCreateWalletAccountsBody }; -export type TCreateWalletAccountsBody = - operations["PublicApiService_CreateWalletAccounts"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TCreateWalletAccountsBody = operations["PublicApiService_CreateWalletAccounts"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeleteApiKeysResponse = - operations["PublicApiService_DeleteApiKeys"]["responses"]["200"]["schema"]["activity"]["result"]["deleteApiKeysResult"] & - definitions["v1ActivityResponse"]; +export type TDeleteApiKeysResponse = operations["PublicApiService_DeleteApiKeys"]["responses"]["200"]["schema"]["activity"]["result"]["deleteApiKeysResult"] & definitions["v1ActivityResponse"]; export type TDeleteApiKeysInput = { body: TDeleteApiKeysBody }; -export type TDeleteApiKeysBody = - operations["PublicApiService_DeleteApiKeys"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeleteApiKeysBody = operations["PublicApiService_DeleteApiKeys"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeleteAuthenticatorsResponse = - operations["PublicApiService_DeleteAuthenticators"]["responses"]["200"]["schema"]["activity"]["result"]["deleteAuthenticatorsResult"] & - definitions["v1ActivityResponse"]; +export type TDeleteAuthenticatorsResponse = operations["PublicApiService_DeleteAuthenticators"]["responses"]["200"]["schema"]["activity"]["result"]["deleteAuthenticatorsResult"] & definitions["v1ActivityResponse"]; export type TDeleteAuthenticatorsInput = { body: TDeleteAuthenticatorsBody }; -export type TDeleteAuthenticatorsBody = - operations["PublicApiService_DeleteAuthenticators"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeleteAuthenticatorsBody = operations["PublicApiService_DeleteAuthenticators"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeleteInvitationResponse = - operations["PublicApiService_DeleteInvitation"]["responses"]["200"]["schema"]["activity"]["result"]["deleteInvitationResult"] & - definitions["v1ActivityResponse"]; +export type TDeleteInvitationResponse = operations["PublicApiService_DeleteInvitation"]["responses"]["200"]["schema"]["activity"]["result"]["deleteInvitationResult"] & definitions["v1ActivityResponse"]; export type TDeleteInvitationInput = { body: TDeleteInvitationBody }; -export type TDeleteInvitationBody = - operations["PublicApiService_DeleteInvitation"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeleteInvitationBody = operations["PublicApiService_DeleteInvitation"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeleteOauthProvidersResponse = - operations["PublicApiService_DeleteOauthProviders"]["responses"]["200"]["schema"]["activity"]["result"]["deleteOauthProvidersResult"] & - definitions["v1ActivityResponse"]; +export type TDeleteOauthProvidersResponse = operations["PublicApiService_DeleteOauthProviders"]["responses"]["200"]["schema"]["activity"]["result"]["deleteOauthProvidersResult"] & definitions["v1ActivityResponse"]; export type TDeleteOauthProvidersInput = { body: TDeleteOauthProvidersBody }; -export type TDeleteOauthProvidersBody = - operations["PublicApiService_DeleteOauthProviders"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeleteOauthProvidersBody = operations["PublicApiService_DeleteOauthProviders"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeletePolicyResponse = - operations["PublicApiService_DeletePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["deletePolicyResult"] & - definitions["v1ActivityResponse"]; +export type TDeletePolicyResponse = operations["PublicApiService_DeletePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["deletePolicyResult"] & definitions["v1ActivityResponse"]; export type TDeletePolicyInput = { body: TDeletePolicyBody }; -export type TDeletePolicyBody = - operations["PublicApiService_DeletePolicy"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeletePolicyBody = operations["PublicApiService_DeletePolicy"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeletePrivateKeyTagsResponse = - operations["PublicApiService_DeletePrivateKeyTags"]["responses"]["200"]["schema"]["activity"]["result"]["deletePrivateKeyTagsResult"] & - definitions["v1ActivityResponse"]; +export type TDeletePrivateKeyTagsResponse = operations["PublicApiService_DeletePrivateKeyTags"]["responses"]["200"]["schema"]["activity"]["result"]["deletePrivateKeyTagsResult"] & definitions["v1ActivityResponse"]; export type TDeletePrivateKeyTagsInput = { body: TDeletePrivateKeyTagsBody }; -export type TDeletePrivateKeyTagsBody = - operations["PublicApiService_DeletePrivateKeyTags"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeletePrivateKeyTagsBody = operations["PublicApiService_DeletePrivateKeyTags"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeletePrivateKeysResponse = - operations["PublicApiService_DeletePrivateKeys"]["responses"]["200"]["schema"]["activity"]["result"]["deletePrivateKeysResult"] & - definitions["v1ActivityResponse"]; +export type TDeletePrivateKeysResponse = operations["PublicApiService_DeletePrivateKeys"]["responses"]["200"]["schema"]["activity"]["result"]["deletePrivateKeysResult"] & definitions["v1ActivityResponse"]; export type TDeletePrivateKeysInput = { body: TDeletePrivateKeysBody }; -export type TDeletePrivateKeysBody = - operations["PublicApiService_DeletePrivateKeys"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeletePrivateKeysBody = operations["PublicApiService_DeletePrivateKeys"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeleteSubOrganizationResponse = - operations["PublicApiService_DeleteSubOrganization"]["responses"]["200"]["schema"]["activity"]["result"]["deleteSubOrganizationResult"] & - definitions["v1ActivityResponse"]; +export type TDeleteSubOrganizationResponse = operations["PublicApiService_DeleteSubOrganization"]["responses"]["200"]["schema"]["activity"]["result"]["deleteSubOrganizationResult"] & definitions["v1ActivityResponse"]; export type TDeleteSubOrganizationInput = { body: TDeleteSubOrganizationBody }; -export type TDeleteSubOrganizationBody = - operations["PublicApiService_DeleteSubOrganization"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeleteSubOrganizationBody = operations["PublicApiService_DeleteSubOrganization"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeleteUserTagsResponse = - operations["PublicApiService_DeleteUserTags"]["responses"]["200"]["schema"]["activity"]["result"]["deleteUserTagsResult"] & - definitions["v1ActivityResponse"]; +export type TDeleteUserTagsResponse = operations["PublicApiService_DeleteUserTags"]["responses"]["200"]["schema"]["activity"]["result"]["deleteUserTagsResult"] & definitions["v1ActivityResponse"]; export type TDeleteUserTagsInput = { body: TDeleteUserTagsBody }; -export type TDeleteUserTagsBody = - operations["PublicApiService_DeleteUserTags"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeleteUserTagsBody = operations["PublicApiService_DeleteUserTags"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeleteUsersResponse = - operations["PublicApiService_DeleteUsers"]["responses"]["200"]["schema"]["activity"]["result"]["deleteUsersResult"] & - definitions["v1ActivityResponse"]; +export type TDeleteUsersResponse = operations["PublicApiService_DeleteUsers"]["responses"]["200"]["schema"]["activity"]["result"]["deleteUsersResult"] & definitions["v1ActivityResponse"]; export type TDeleteUsersInput = { body: TDeleteUsersBody }; -export type TDeleteUsersBody = - operations["PublicApiService_DeleteUsers"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeleteUsersBody = operations["PublicApiService_DeleteUsers"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TDeleteWalletsResponse = - operations["PublicApiService_DeleteWallets"]["responses"]["200"]["schema"]["activity"]["result"]["deleteWalletsResult"] & - definitions["v1ActivityResponse"]; +export type TDeleteWalletsResponse = operations["PublicApiService_DeleteWallets"]["responses"]["200"]["schema"]["activity"]["result"]["deleteWalletsResult"] & definitions["v1ActivityResponse"]; export type TDeleteWalletsInput = { body: TDeleteWalletsBody }; -export type TDeleteWalletsBody = - operations["PublicApiService_DeleteWallets"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TDeleteWalletsBody = operations["PublicApiService_DeleteWallets"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TEmailAuthResponse = - operations["PublicApiService_EmailAuth"]["responses"]["200"]["schema"]["activity"]["result"]["emailAuthResult"] & - definitions["v1ActivityResponse"]; +export type TEmailAuthResponse = operations["PublicApiService_EmailAuth"]["responses"]["200"]["schema"]["activity"]["result"]["emailAuthResult"] & definitions["v1ActivityResponse"]; export type TEmailAuthInput = { body: TEmailAuthBody }; -export type TEmailAuthBody = - operations["PublicApiService_EmailAuth"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TEmailAuthBody = operations["PublicApiService_EmailAuth"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TExportPrivateKeyResponse = - operations["PublicApiService_ExportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["exportPrivateKeyResult"] & - definitions["v1ActivityResponse"]; +export type TExportPrivateKeyResponse = operations["PublicApiService_ExportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["exportPrivateKeyResult"] & definitions["v1ActivityResponse"]; export type TExportPrivateKeyInput = { body: TExportPrivateKeyBody }; -export type TExportPrivateKeyBody = - operations["PublicApiService_ExportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TExportPrivateKeyBody = operations["PublicApiService_ExportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TExportWalletResponse = - operations["PublicApiService_ExportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["exportWalletResult"] & - definitions["v1ActivityResponse"]; +export type TExportWalletResponse = operations["PublicApiService_ExportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["exportWalletResult"] & definitions["v1ActivityResponse"]; export type TExportWalletInput = { body: TExportWalletBody }; -export type TExportWalletBody = - operations["PublicApiService_ExportWallet"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TExportWalletBody = operations["PublicApiService_ExportWallet"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TExportWalletAccountResponse = - operations["PublicApiService_ExportWalletAccount"]["responses"]["200"]["schema"]["activity"]["result"]["exportWalletAccountResult"] & - definitions["v1ActivityResponse"]; +export type TExportWalletAccountResponse = operations["PublicApiService_ExportWalletAccount"]["responses"]["200"]["schema"]["activity"]["result"]["exportWalletAccountResult"] & definitions["v1ActivityResponse"]; export type TExportWalletAccountInput = { body: TExportWalletAccountBody }; -export type TExportWalletAccountBody = - operations["PublicApiService_ExportWalletAccount"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TExportWalletAccountBody = operations["PublicApiService_ExportWalletAccount"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TImportPrivateKeyResponse = - operations["PublicApiService_ImportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["importPrivateKeyResult"] & - definitions["v1ActivityResponse"]; +export type TImportPrivateKeyResponse = operations["PublicApiService_ImportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["importPrivateKeyResult"] & definitions["v1ActivityResponse"]; export type TImportPrivateKeyInput = { body: TImportPrivateKeyBody }; -export type TImportPrivateKeyBody = - operations["PublicApiService_ImportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TImportPrivateKeyBody = operations["PublicApiService_ImportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TImportWalletResponse = - operations["PublicApiService_ImportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["importWalletResult"] & - definitions["v1ActivityResponse"]; +export type TImportWalletResponse = operations["PublicApiService_ImportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["importWalletResult"] & definitions["v1ActivityResponse"]; export type TImportWalletInput = { body: TImportWalletBody }; -export type TImportWalletBody = - operations["PublicApiService_ImportWallet"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TImportWalletBody = operations["PublicApiService_ImportWallet"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TInitImportPrivateKeyResponse = - operations["PublicApiService_InitImportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["initImportPrivateKeyResult"] & - definitions["v1ActivityResponse"]; +export type TInitImportPrivateKeyResponse = operations["PublicApiService_InitImportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["initImportPrivateKeyResult"] & definitions["v1ActivityResponse"]; export type TInitImportPrivateKeyInput = { body: TInitImportPrivateKeyBody }; -export type TInitImportPrivateKeyBody = - operations["PublicApiService_InitImportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TInitImportPrivateKeyBody = operations["PublicApiService_InitImportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TInitImportWalletResponse = - operations["PublicApiService_InitImportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["initImportWalletResult"] & - definitions["v1ActivityResponse"]; +export type TInitImportWalletResponse = operations["PublicApiService_InitImportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["initImportWalletResult"] & definitions["v1ActivityResponse"]; export type TInitImportWalletInput = { body: TInitImportWalletBody }; -export type TInitImportWalletBody = - operations["PublicApiService_InitImportWallet"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TInitImportWalletBody = operations["PublicApiService_InitImportWallet"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TInitOtpAuthResponse = - operations["PublicApiService_InitOtpAuth"]["responses"]["200"]["schema"]["activity"]["result"]["initOtpAuthResult"] & - definitions["v1ActivityResponse"]; +export type TInitOtpAuthResponse = operations["PublicApiService_InitOtpAuth"]["responses"]["200"]["schema"]["activity"]["result"]["initOtpAuthResult"] & definitions["v1ActivityResponse"]; export type TInitOtpAuthInput = { body: TInitOtpAuthBody }; -export type TInitOtpAuthBody = - operations["PublicApiService_InitOtpAuth"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TInitOtpAuthBody = operations["PublicApiService_InitOtpAuth"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TInitUserEmailRecoveryResponse = - operations["PublicApiService_InitUserEmailRecovery"]["responses"]["200"]["schema"]["activity"]["result"]["initUserEmailRecoveryResult"] & - definitions["v1ActivityResponse"]; +export type TInitUserEmailRecoveryResponse = operations["PublicApiService_InitUserEmailRecovery"]["responses"]["200"]["schema"]["activity"]["result"]["initUserEmailRecoveryResult"] & definitions["v1ActivityResponse"]; export type TInitUserEmailRecoveryInput = { body: TInitUserEmailRecoveryBody }; -export type TInitUserEmailRecoveryBody = - operations["PublicApiService_InitUserEmailRecovery"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TInitUserEmailRecoveryBody = operations["PublicApiService_InitUserEmailRecovery"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TOauthResponse = - operations["PublicApiService_Oauth"]["responses"]["200"]["schema"]["activity"]["result"]["oauthResult"] & - definitions["v1ActivityResponse"]; +export type TOauthResponse = operations["PublicApiService_Oauth"]["responses"]["200"]["schema"]["activity"]["result"]["oauthResult"] & definitions["v1ActivityResponse"]; export type TOauthInput = { body: TOauthBody }; -export type TOauthBody = - operations["PublicApiService_Oauth"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TOauthBody = operations["PublicApiService_Oauth"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TOtpAuthResponse = - operations["PublicApiService_OtpAuth"]["responses"]["200"]["schema"]["activity"]["result"]["otpAuthResult"] & - definitions["v1ActivityResponse"]; +export type TOtpAuthResponse = operations["PublicApiService_OtpAuth"]["responses"]["200"]["schema"]["activity"]["result"]["otpAuthResult"] & definitions["v1ActivityResponse"]; export type TOtpAuthInput = { body: TOtpAuthBody }; -export type TOtpAuthBody = - operations["PublicApiService_OtpAuth"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TOtpAuthBody = operations["PublicApiService_OtpAuth"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TRecoverUserResponse = - operations["PublicApiService_RecoverUser"]["responses"]["200"]["schema"]["activity"]["result"]["recoverUserResult"] & - definitions["v1ActivityResponse"]; +export type TRecoverUserResponse = operations["PublicApiService_RecoverUser"]["responses"]["200"]["schema"]["activity"]["result"]["recoverUserResult"] & definitions["v1ActivityResponse"]; export type TRecoverUserInput = { body: TRecoverUserBody }; -export type TRecoverUserBody = - operations["PublicApiService_RecoverUser"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TRecoverUserBody = operations["PublicApiService_RecoverUser"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TRejectActivityResponse = - operations["PublicApiService_RejectActivity"]["responses"]["200"]["schema"]["activity"]["result"] & - definitions["v1ActivityResponse"]; +export type TRejectActivityResponse = operations["PublicApiService_RejectActivity"]["responses"]["200"]["schema"]["activity"]["result"] & definitions["v1ActivityResponse"]; export type TRejectActivityInput = { body: TRejectActivityBody }; -export type TRejectActivityBody = - operations["PublicApiService_RejectActivity"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TRejectActivityBody = operations["PublicApiService_RejectActivity"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TRemoveOrganizationFeatureResponse = - operations["PublicApiService_RemoveOrganizationFeature"]["responses"]["200"]["schema"]["activity"]["result"]["removeOrganizationFeatureResult"] & - definitions["v1ActivityResponse"]; +export type TRemoveOrganizationFeatureResponse = operations["PublicApiService_RemoveOrganizationFeature"]["responses"]["200"]["schema"]["activity"]["result"]["removeOrganizationFeatureResult"] & definitions["v1ActivityResponse"]; -export type TRemoveOrganizationFeatureInput = { - body: TRemoveOrganizationFeatureBody; -}; +export type TRemoveOrganizationFeatureInput = { body: TRemoveOrganizationFeatureBody }; -export type TRemoveOrganizationFeatureBody = - operations["PublicApiService_RemoveOrganizationFeature"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TRemoveOrganizationFeatureBody = operations["PublicApiService_RemoveOrganizationFeature"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TSetOrganizationFeatureResponse = - operations["PublicApiService_SetOrganizationFeature"]["responses"]["200"]["schema"]["activity"]["result"]["setOrganizationFeatureResult"] & - definitions["v1ActivityResponse"]; +export type TSetOrganizationFeatureResponse = operations["PublicApiService_SetOrganizationFeature"]["responses"]["200"]["schema"]["activity"]["result"]["setOrganizationFeatureResult"] & definitions["v1ActivityResponse"]; -export type TSetOrganizationFeatureInput = { - body: TSetOrganizationFeatureBody; -}; +export type TSetOrganizationFeatureInput = { body: TSetOrganizationFeatureBody }; -export type TSetOrganizationFeatureBody = - operations["PublicApiService_SetOrganizationFeature"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TSetOrganizationFeatureBody = operations["PublicApiService_SetOrganizationFeature"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TSignRawPayloadResponse = - operations["PublicApiService_SignRawPayload"]["responses"]["200"]["schema"]["activity"]["result"]["signRawPayloadResult"] & - definitions["v1ActivityResponse"]; +export type TSignRawPayloadResponse = operations["PublicApiService_SignRawPayload"]["responses"]["200"]["schema"]["activity"]["result"]["signRawPayloadResult"] & definitions["v1ActivityResponse"]; export type TSignRawPayloadInput = { body: TSignRawPayloadBody }; -export type TSignRawPayloadBody = - operations["PublicApiService_SignRawPayload"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TSignRawPayloadBody = operations["PublicApiService_SignRawPayload"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TSignRawPayloadsResponse = - operations["PublicApiService_SignRawPayloads"]["responses"]["200"]["schema"]["activity"]["result"]["signRawPayloadsResult"] & - definitions["v1ActivityResponse"]; +export type TSignRawPayloadsResponse = operations["PublicApiService_SignRawPayloads"]["responses"]["200"]["schema"]["activity"]["result"]["signRawPayloadsResult"] & definitions["v1ActivityResponse"]; export type TSignRawPayloadsInput = { body: TSignRawPayloadsBody }; -export type TSignRawPayloadsBody = - operations["PublicApiService_SignRawPayloads"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TSignRawPayloadsBody = operations["PublicApiService_SignRawPayloads"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TSignTransactionResponse = - operations["PublicApiService_SignTransaction"]["responses"]["200"]["schema"]["activity"]["result"]["signTransactionResult"] & - definitions["v1ActivityResponse"]; +export type TSignTransactionResponse = operations["PublicApiService_SignTransaction"]["responses"]["200"]["schema"]["activity"]["result"]["signTransactionResult"] & definitions["v1ActivityResponse"]; export type TSignTransactionInput = { body: TSignTransactionBody }; -export type TSignTransactionBody = - operations["PublicApiService_SignTransaction"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TSignTransactionBody = operations["PublicApiService_SignTransaction"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TUpdatePolicyResponse = - operations["PublicApiService_UpdatePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["updatePolicyResult"] & - definitions["v1ActivityResponse"]; +export type TUpdatePolicyResponse = operations["PublicApiService_UpdatePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["updatePolicyResult"] & definitions["v1ActivityResponse"]; export type TUpdatePolicyInput = { body: TUpdatePolicyBody }; -export type TUpdatePolicyBody = - operations["PublicApiService_UpdatePolicy"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TUpdatePolicyBody = operations["PublicApiService_UpdatePolicy"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TUpdatePrivateKeyTagResponse = - operations["PublicApiService_UpdatePrivateKeyTag"]["responses"]["200"]["schema"]["activity"]["result"]["updatePrivateKeyTagResult"] & - definitions["v1ActivityResponse"]; +export type TUpdatePrivateKeyTagResponse = operations["PublicApiService_UpdatePrivateKeyTag"]["responses"]["200"]["schema"]["activity"]["result"]["updatePrivateKeyTagResult"] & definitions["v1ActivityResponse"]; export type TUpdatePrivateKeyTagInput = { body: TUpdatePrivateKeyTagBody }; -export type TUpdatePrivateKeyTagBody = - operations["PublicApiService_UpdatePrivateKeyTag"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TUpdatePrivateKeyTagBody = operations["PublicApiService_UpdatePrivateKeyTag"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TUpdateRootQuorumResponse = - operations["PublicApiService_UpdateRootQuorum"]["responses"]["200"]["schema"]["activity"]["result"]["updateRootQuorumResult"] & - definitions["v1ActivityResponse"]; +export type TUpdateRootQuorumResponse = operations["PublicApiService_UpdateRootQuorum"]["responses"]["200"]["schema"]["activity"]["result"]["updateRootQuorumResult"] & definitions["v1ActivityResponse"]; export type TUpdateRootQuorumInput = { body: TUpdateRootQuorumBody }; -export type TUpdateRootQuorumBody = - operations["PublicApiService_UpdateRootQuorum"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TUpdateRootQuorumBody = operations["PublicApiService_UpdateRootQuorum"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TUpdateUserResponse = - operations["PublicApiService_UpdateUser"]["responses"]["200"]["schema"]["activity"]["result"]["updateUserResult"] & - definitions["v1ActivityResponse"]; +export type TUpdateUserResponse = operations["PublicApiService_UpdateUser"]["responses"]["200"]["schema"]["activity"]["result"]["updateUserResult"] & definitions["v1ActivityResponse"]; export type TUpdateUserInput = { body: TUpdateUserBody }; -export type TUpdateUserBody = - operations["PublicApiService_UpdateUser"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TUpdateUserBody = operations["PublicApiService_UpdateUser"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TUpdateUserTagResponse = - operations["PublicApiService_UpdateUserTag"]["responses"]["200"]["schema"]["activity"]["result"]["updateUserTagResult"] & - definitions["v1ActivityResponse"]; +export type TUpdateUserTagResponse = operations["PublicApiService_UpdateUserTag"]["responses"]["200"]["schema"]["activity"]["result"]["updateUserTagResult"] & definitions["v1ActivityResponse"]; export type TUpdateUserTagInput = { body: TUpdateUserTagBody }; -export type TUpdateUserTagBody = - operations["PublicApiService_UpdateUserTag"]["parameters"]["body"]["body"]["parameters"] & - commandOverrideParams; +export type TUpdateUserTagBody = operations["PublicApiService_UpdateUserTag"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; -export type TNOOPCodegenAnchorResponse = - operations["PublicApiService_NOOPCodegenAnchor"]["responses"]["200"]["schema"]; +export type TNOOPCodegenAnchorResponse = operations["PublicApiService_NOOPCodegenAnchor"]["responses"]["200"]["schema"]; \ No newline at end of file From f76f241b22fea4b19c970df888c1e4cdaaaa392d Mon Sep 17 00:00:00 2001 From: Omkar Shanbhag Date: Wed, 30 Oct 2024 16:30:16 -0700 Subject: [PATCH 2/3] add to sdk server + prettier --- .../src/__generated__/sdk-client-base.ts | 2274 ++++++++++------- .../src/__generated__/sdk_api_types.ts | 651 +++-- packages/sdk-server/scripts/codegen.js | 18 +- .../src/__generated__/sdk-client-base.ts | 1246 +++++++++ 4 files changed, 3178 insertions(+), 1011 deletions(-) diff --git a/packages/sdk-browser/src/__generated__/sdk-client-base.ts b/packages/sdk-browser/src/__generated__/sdk-client-base.ts index 0212d401..7b544e6d 100644 --- a/packages/sdk-browser/src/__generated__/sdk-client-base.ts +++ b/packages/sdk-browser/src/__generated__/sdk-client-base.ts @@ -1,10 +1,19 @@ /* @generated by codegen. DO NOT EDIT BY HAND */ -import { TERMINAL_ACTIVITY_STATUSES, TActivityResponse, TActivityStatus, TSignedRequest } from "@turnkey/http"; +import { + TERMINAL_ACTIVITY_STATUSES, + TActivityResponse, + TActivityStatus, + TSignedRequest, +} from "@turnkey/http"; import type { definitions } from "../__inputs__/public_api.types"; -import { GrpcStatus, TurnkeyRequestError, TurnkeySDKClientConfig } from "../__types__/base"; +import { + GrpcStatus, + TurnkeyRequestError, + TurnkeySDKClientConfig, +} from "../__types__/base"; import { VERSION } from "../__generated__/version"; @@ -12,7 +21,6 @@ import type * as SdkApiTypes from "./sdk_api_types"; import { StorageKeys, getStorageValue } from "../storage"; - export class TurnkeySDKClientBase { config: TurnkeySDKClientConfig; @@ -27,22 +35,22 @@ export class TurnkeySDKClientBase { const fullUrl = this.config.apiBaseUrl + url; const stringifiedBody = JSON.stringify(body); var headers: Record = { - "X-Client-Version": VERSION - } + "X-Client-Version": VERSION, + }; if (this.config.stamper) { const stamp = await this.config.stamper.stamp(stringifiedBody); - headers[stamp.stampHeaderName] = stamp.stampHeaderValue + headers[stamp.stampHeaderName] = stamp.stampHeaderValue; } - if (this.config.readOnlySession){ - headers["X-Session"] = this.config.readOnlySession + if (this.config.readOnlySession) { + headers["X-Session"] = this.config.readOnlySession; } const response = await fetch(fullUrl, { method: "POST", headers: headers, body: stringifiedBody, - redirect: "follow" + redirect: "follow", }); if (!response.ok) { @@ -68,7 +76,8 @@ export class TurnkeySDKClientBase { const pollingDuration = this.config.activityPoller?.intervalMs ?? 1000; const maxRetries = this.config.activityPoller?.numRetries ?? 3; - const sleep = (ms: number) => new Promise(resolve => setTimeout(resolve, ms)); + const sleep = (ms: number) => + new Promise((resolve) => setTimeout(resolve, ms)); const handleResponse = (activityData: TActivityResponse): TResponseType => { const { result, status } = activityData.activity; @@ -76,7 +85,7 @@ export class TurnkeySDKClientBase { if (status === "ACTIVITY_STATUS_COMPLETED") { return { ...result[`${resultKey}` as keyof definitions["v1Result"]], - ...activityData + ...activityData, } as TResponseType; } @@ -87,15 +96,19 @@ export class TurnkeySDKClientBase { const pollStatus = async (activityId: string): Promise => { const pollBody = { activityId }; - const pollData = await this.getActivity(pollBody) as TActivityResponse; + const pollData = (await this.getActivity(pollBody)) as TActivityResponse; if (attempts > maxRetries) { return handleResponse(pollData); } attempts += 1; - - if (!TERMINAL_ACTIVITY_STATUSES.includes(pollData.activity.status as TActivityStatus)) { + + if ( + !TERMINAL_ACTIVITY_STATUSES.includes( + pollData.activity.status as TActivityStatus + ) + ) { await sleep(pollingDuration); return pollStatus(activityId); } @@ -103,9 +116,16 @@ export class TurnkeySDKClientBase { return handleResponse(pollData); }; - const responseData = await this.request(url, body) as TActivityResponse; - - if (!TERMINAL_ACTIVITY_STATUSES.includes(responseData.activity.status as TActivityStatus)) { + const responseData = (await this.request( + url, + body + )) as TActivityResponse; + + if ( + !TERMINAL_ACTIVITY_STATUSES.includes( + responseData.activity.status as TActivityStatus + ) + ) { return pollStatus(responseData.activity.id); } @@ -116,24 +136,26 @@ export class TurnkeySDKClientBase { url: string, body: TBodyType ): Promise { - const activityData = await this.request(url, body) as TActivityResponse; + const activityData = (await this.request(url, body)) as TActivityResponse; return { ...activityData["activity"]["result"], - ...activityData + ...activityData, } as TResponseType; } - - getActivity = async (input: SdkApiTypes.TGetActivityBody): Promise => { + getActivity = async ( + input: SdkApiTypes.TGetActivityBody + ): Promise => { return this.request("/public/v1/query/get_activity", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetActivity = async (input: SdkApiTypes.TGetActivityBody): Promise => { + stampGetActivity = async ( + input: SdkApiTypes.TGetActivityBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -145,18 +167,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getApiKey = async (input: SdkApiTypes.TGetApiKeyBody): Promise => { + getApiKey = async ( + input: SdkApiTypes.TGetApiKeyBody + ): Promise => { return this.request("/public/v1/query/get_api_key", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetApiKey = async (input: SdkApiTypes.TGetApiKeyBody): Promise => { + stampGetApiKey = async ( + input: SdkApiTypes.TGetApiKeyBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -168,18 +192,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getApiKeys = async (input: SdkApiTypes.TGetApiKeysBody = {}): Promise => { + getApiKeys = async ( + input: SdkApiTypes.TGetApiKeysBody = {} + ): Promise => { return this.request("/public/v1/query/get_api_keys", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetApiKeys = async (input: SdkApiTypes.TGetApiKeysBody): Promise => { + stampGetApiKeys = async ( + input: SdkApiTypes.TGetApiKeysBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -191,18 +217,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getAttestationDocument = async (input: SdkApiTypes.TGetAttestationDocumentBody): Promise => { + getAttestationDocument = async ( + input: SdkApiTypes.TGetAttestationDocumentBody + ): Promise => { return this.request("/public/v1/query/get_attestation", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetAttestationDocument = async (input: SdkApiTypes.TGetAttestationDocumentBody): Promise => { + stampGetAttestationDocument = async ( + input: SdkApiTypes.TGetAttestationDocumentBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -214,22 +242,25 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getAuthenticator = async (input: SdkApiTypes.TGetAuthenticatorBody): Promise => { + getAuthenticator = async ( + input: SdkApiTypes.TGetAuthenticatorBody + ): Promise => { return this.request("/public/v1/query/get_authenticator", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetAuthenticator = async (input: SdkApiTypes.TGetAuthenticatorBody): Promise => { + stampGetAuthenticator = async ( + input: SdkApiTypes.TGetAuthenticatorBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticator"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_authenticator"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -237,22 +268,25 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getAuthenticators = async (input: SdkApiTypes.TGetAuthenticatorsBody): Promise => { + getAuthenticators = async ( + input: SdkApiTypes.TGetAuthenticatorsBody + ): Promise => { return this.request("/public/v1/query/get_authenticators", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetAuthenticators = async (input: SdkApiTypes.TGetAuthenticatorsBody): Promise => { + stampGetAuthenticators = async ( + input: SdkApiTypes.TGetAuthenticatorsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticators"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_authenticators"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -260,22 +294,25 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getOauthProviders = async (input: SdkApiTypes.TGetOauthProvidersBody): Promise => { + getOauthProviders = async ( + input: SdkApiTypes.TGetOauthProvidersBody + ): Promise => { return this.request("/public/v1/query/get_oauth_providers", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetOauthProviders = async (input: SdkApiTypes.TGetOauthProvidersBody): Promise => { + stampGetOauthProviders = async ( + input: SdkApiTypes.TGetOauthProvidersBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_oauth_providers"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_oauth_providers"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -283,22 +320,25 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getOrganization = async (input: SdkApiTypes.TGetOrganizationBody = {}): Promise => { + getOrganization = async ( + input: SdkApiTypes.TGetOrganizationBody = {} + ): Promise => { return this.request("/public/v1/query/get_organization", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetOrganization = async (input: SdkApiTypes.TGetOrganizationBody): Promise => { + stampGetOrganization = async ( + input: SdkApiTypes.TGetOrganizationBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_organization"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -306,22 +346,25 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getOrganizationConfigs = async (input: SdkApiTypes.TGetOrganizationConfigsBody): Promise => { + getOrganizationConfigs = async ( + input: SdkApiTypes.TGetOrganizationConfigsBody + ): Promise => { return this.request("/public/v1/query/get_organization_configs", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetOrganizationConfigs = async (input: SdkApiTypes.TGetOrganizationConfigsBody): Promise => { + stampGetOrganizationConfigs = async ( + input: SdkApiTypes.TGetOrganizationConfigsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization_configs"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_organization_configs"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -329,18 +372,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getPolicy = async (input: SdkApiTypes.TGetPolicyBody): Promise => { + getPolicy = async ( + input: SdkApiTypes.TGetPolicyBody + ): Promise => { return this.request("/public/v1/query/get_policy", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetPolicy = async (input: SdkApiTypes.TGetPolicyBody): Promise => { + stampGetPolicy = async ( + input: SdkApiTypes.TGetPolicyBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -352,18 +397,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getPrivateKey = async (input: SdkApiTypes.TGetPrivateKeyBody): Promise => { + getPrivateKey = async ( + input: SdkApiTypes.TGetPrivateKeyBody + ): Promise => { return this.request("/public/v1/query/get_private_key", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetPrivateKey = async (input: SdkApiTypes.TGetPrivateKeyBody): Promise => { + stampGetPrivateKey = async ( + input: SdkApiTypes.TGetPrivateKeyBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -375,18 +422,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getUser = async (input: SdkApiTypes.TGetUserBody): Promise => { + getUser = async ( + input: SdkApiTypes.TGetUserBody + ): Promise => { return this.request("/public/v1/query/get_user", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetUser = async (input: SdkApiTypes.TGetUserBody): Promise => { + stampGetUser = async ( + input: SdkApiTypes.TGetUserBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -398,18 +447,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getWallet = async (input: SdkApiTypes.TGetWalletBody): Promise => { + getWallet = async ( + input: SdkApiTypes.TGetWalletBody + ): Promise => { return this.request("/public/v1/query/get_wallet", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetWallet = async (input: SdkApiTypes.TGetWalletBody): Promise => { + stampGetWallet = async ( + input: SdkApiTypes.TGetWalletBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -421,18 +472,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getActivities = async (input: SdkApiTypes.TGetActivitiesBody = {}): Promise => { + getActivities = async ( + input: SdkApiTypes.TGetActivitiesBody = {} + ): Promise => { return this.request("/public/v1/query/list_activities", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetActivities = async (input: SdkApiTypes.TGetActivitiesBody): Promise => { + stampGetActivities = async ( + input: SdkApiTypes.TGetActivitiesBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -444,18 +497,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getPolicies = async (input: SdkApiTypes.TGetPoliciesBody = {}): Promise => { + getPolicies = async ( + input: SdkApiTypes.TGetPoliciesBody = {} + ): Promise => { return this.request("/public/v1/query/list_policies", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetPolicies = async (input: SdkApiTypes.TGetPoliciesBody): Promise => { + stampGetPolicies = async ( + input: SdkApiTypes.TGetPoliciesBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -467,22 +522,25 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - listPrivateKeyTags = async (input: SdkApiTypes.TListPrivateKeyTagsBody): Promise => { + listPrivateKeyTags = async ( + input: SdkApiTypes.TListPrivateKeyTagsBody + ): Promise => { return this.request("/public/v1/query/list_private_key_tags", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampListPrivateKeyTags = async (input: SdkApiTypes.TListPrivateKeyTagsBody): Promise => { + stampListPrivateKeyTags = async ( + input: SdkApiTypes.TListPrivateKeyTagsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_key_tags"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/list_private_key_tags"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -490,22 +548,25 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getPrivateKeys = async (input: SdkApiTypes.TGetPrivateKeysBody = {}): Promise => { + getPrivateKeys = async ( + input: SdkApiTypes.TGetPrivateKeysBody = {} + ): Promise => { return this.request("/public/v1/query/list_private_keys", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetPrivateKeys = async (input: SdkApiTypes.TGetPrivateKeysBody): Promise => { + stampGetPrivateKeys = async ( + input: SdkApiTypes.TGetPrivateKeysBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_keys"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/list_private_keys"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -513,18 +574,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getSubOrgIds = async (input: SdkApiTypes.TGetSubOrgIdsBody = {}): Promise => { + getSubOrgIds = async ( + input: SdkApiTypes.TGetSubOrgIdsBody = {} + ): Promise => { return this.request("/public/v1/query/list_suborgs", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetSubOrgIds = async (input: SdkApiTypes.TGetSubOrgIdsBody): Promise => { + stampGetSubOrgIds = async ( + input: SdkApiTypes.TGetSubOrgIdsBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -536,18 +599,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - listUserTags = async (input: SdkApiTypes.TListUserTagsBody = {}): Promise => { + listUserTags = async ( + input: SdkApiTypes.TListUserTagsBody = {} + ): Promise => { return this.request("/public/v1/query/list_user_tags", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampListUserTags = async (input: SdkApiTypes.TListUserTagsBody): Promise => { + stampListUserTags = async ( + input: SdkApiTypes.TListUserTagsBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -559,18 +624,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getUsers = async (input: SdkApiTypes.TGetUsersBody = {}): Promise => { + getUsers = async ( + input: SdkApiTypes.TGetUsersBody = {} + ): Promise => { return this.request("/public/v1/query/list_users", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetUsers = async (input: SdkApiTypes.TGetUsersBody): Promise => { + stampGetUsers = async ( + input: SdkApiTypes.TGetUsersBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -582,22 +649,25 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getWalletAccounts = async (input: SdkApiTypes.TGetWalletAccountsBody): Promise => { + getWalletAccounts = async ( + input: SdkApiTypes.TGetWalletAccountsBody + ): Promise => { return this.request("/public/v1/query/list_wallet_accounts", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetWalletAccounts = async (input: SdkApiTypes.TGetWalletAccountsBody): Promise => { + stampGetWalletAccounts = async ( + input: SdkApiTypes.TGetWalletAccountsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallet_accounts"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/list_wallet_accounts"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -605,18 +675,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getWallets = async (input: SdkApiTypes.TGetWalletsBody = {}): Promise => { + getWallets = async ( + input: SdkApiTypes.TGetWalletsBody = {} + ): Promise => { return this.request("/public/v1/query/list_wallets", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetWallets = async (input: SdkApiTypes.TGetWalletsBody): Promise => { + stampGetWallets = async ( + input: SdkApiTypes.TGetWalletsBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -628,18 +700,20 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - getWhoami = async (input: SdkApiTypes.TGetWhoamiBody = {}): Promise => { + getWhoami = async ( + input: SdkApiTypes.TGetWhoamiBody = {} + ): Promise => { return this.request("/public/v1/query/whoami", { ...input, - organizationId: input.organizationId ?? this.config.organizationId + organizationId: input.organizationId ?? this.config.organizationId, }); - } - + }; - stampGetWhoami = async (input: SdkApiTypes.TGetWhoamiBody): Promise => { + stampGetWhoami = async ( + input: SdkApiTypes.TGetWhoamiBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -651,27 +725,32 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - approveActivity = async (input: SdkApiTypes.TApproveActivityBody): Promise => { + approveActivity = async ( + input: SdkApiTypes.TApproveActivityBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.activityDecision("/public/v1/submit/approve_activity", - { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_APPROVE_ACTIVITY" - }); - } - + return this.activityDecision("/public/v1/submit/approve_activity", { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_APPROVE_ACTIVITY", + }); + }; - stampApproveActivity = async (input: SdkApiTypes.TApproveActivityBody): Promise => { + stampApproveActivity = async ( + input: SdkApiTypes.TApproveActivityBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/approve_activity"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/approve_activity"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -679,26 +758,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - createApiKeys = async (input: SdkApiTypes.TCreateApiKeysBody): Promise => { + createApiKeys = async ( + input: SdkApiTypes.TCreateApiKeysBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_api_keys", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2" - }, "createApiKeysResult"); - } - + return this.command( + "/public/v1/submit/create_api_keys", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2", + }, + "createApiKeysResult" + ); + }; - stampCreateApiKeys = async (input: SdkApiTypes.TCreateApiKeysBody): Promise => { + stampCreateApiKeys = async ( + input: SdkApiTypes.TCreateApiKeysBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_keys"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_api_keys"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -706,26 +795,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - createApiOnlyUsers = async (input: SdkApiTypes.TCreateApiOnlyUsersBody): Promise => { + createApiOnlyUsers = async ( + input: SdkApiTypes.TCreateApiOnlyUsersBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_api_only_users", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" - }, "createApiOnlyUsersResult"); - } - + return this.command( + "/public/v1/submit/create_api_only_users", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS", + }, + "createApiOnlyUsersResult" + ); + }; - stampCreateApiOnlyUsers = async (input: SdkApiTypes.TCreateApiOnlyUsersBody): Promise => { + stampCreateApiOnlyUsers = async ( + input: SdkApiTypes.TCreateApiOnlyUsersBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -733,26 +832,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - createAuthenticators = async (input: SdkApiTypes.TCreateAuthenticatorsBody): Promise => { + createAuthenticators = async ( + input: SdkApiTypes.TCreateAuthenticatorsBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_authenticators", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" - }, "createAuthenticatorsResult"); - } - + return this.command( + "/public/v1/submit/create_authenticators", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2", + }, + "createAuthenticatorsResult" + ); + }; - stampCreateAuthenticators = async (input: SdkApiTypes.TCreateAuthenticatorsBody): Promise => { + stampCreateAuthenticators = async ( + input: SdkApiTypes.TCreateAuthenticatorsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_authenticators"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_authenticators"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -760,26 +869,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - createInvitations = async (input: SdkApiTypes.TCreateInvitationsBody): Promise => { + createInvitations = async ( + input: SdkApiTypes.TCreateInvitationsBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_invitations", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_INVITATIONS" - }, "createInvitationsResult"); - } - + return this.command( + "/public/v1/submit/create_invitations", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_INVITATIONS", + }, + "createInvitationsResult" + ); + }; - stampCreateInvitations = async (input: SdkApiTypes.TCreateInvitationsBody): Promise => { + stampCreateInvitations = async ( + input: SdkApiTypes.TCreateInvitationsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_invitations"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_invitations"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -787,26 +906,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - createOauthProviders = async (input: SdkApiTypes.TCreateOauthProvidersBody): Promise => { + createOauthProviders = async ( + input: SdkApiTypes.TCreateOauthProvidersBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_oauth_providers", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS" - }, "createOauthProvidersResult"); - } - + return this.command( + "/public/v1/submit/create_oauth_providers", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS", + }, + "createOauthProvidersResult" + ); + }; - stampCreateOauthProviders = async (input: SdkApiTypes.TCreateOauthProvidersBody): Promise => { + stampCreateOauthProviders = async ( + input: SdkApiTypes.TCreateOauthProvidersBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_oauth_providers"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_oauth_providers"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -814,26 +943,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - createPolicies = async (input: SdkApiTypes.TCreatePoliciesBody): Promise => { + createPolicies = async ( + input: SdkApiTypes.TCreatePoliciesBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_policies", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_POLICIES" - }, "createPoliciesResult"); - } - + return this.command( + "/public/v1/submit/create_policies", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_POLICIES", + }, + "createPoliciesResult" + ); + }; - stampCreatePolicies = async (input: SdkApiTypes.TCreatePoliciesBody): Promise => { + stampCreatePolicies = async ( + input: SdkApiTypes.TCreatePoliciesBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policies"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_policies"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -841,22 +980,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - createPolicy = async (input: SdkApiTypes.TCreatePolicyBody): Promise => { + createPolicy = async ( + input: SdkApiTypes.TCreatePolicyBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_policy", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_POLICY_V3" - }, "createPolicyResult"); - } - + return this.command( + "/public/v1/submit/create_policy", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_POLICY_V3", + }, + "createPolicyResult" + ); + }; - stampCreatePolicy = async (input: SdkApiTypes.TCreatePolicyBody): Promise => { + stampCreatePolicy = async ( + input: SdkApiTypes.TCreatePolicyBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -868,26 +1016,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - createPrivateKeyTag = async (input: SdkApiTypes.TCreatePrivateKeyTagBody): Promise => { + createPrivateKeyTag = async ( + input: SdkApiTypes.TCreatePrivateKeyTagBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_private_key_tag", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" - }, "createPrivateKeyTagResult"); - } - + return this.command( + "/public/v1/submit/create_private_key_tag", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG", + }, + "createPrivateKeyTagResult" + ); + }; - stampCreatePrivateKeyTag = async (input: SdkApiTypes.TCreatePrivateKeyTagBody): Promise => { + stampCreatePrivateKeyTag = async ( + input: SdkApiTypes.TCreatePrivateKeyTagBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_key_tag"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_private_key_tag"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -895,26 +1053,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - createPrivateKeys = async (input: SdkApiTypes.TCreatePrivateKeysBody): Promise => { + createPrivateKeys = async ( + input: SdkApiTypes.TCreatePrivateKeysBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_private_keys", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" - }, "createPrivateKeysResultV2"); - } - + return this.command( + "/public/v1/submit/create_private_keys", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2", + }, + "createPrivateKeysResultV2" + ); + }; - stampCreatePrivateKeys = async (input: SdkApiTypes.TCreatePrivateKeysBody): Promise => { + stampCreatePrivateKeys = async ( + input: SdkApiTypes.TCreatePrivateKeysBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_keys"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_private_keys"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -922,26 +1090,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - createReadOnlySession = async (input: SdkApiTypes.TCreateReadOnlySessionBody): Promise => { + createReadOnlySession = async ( + input: SdkApiTypes.TCreateReadOnlySessionBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_read_only_session", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION" - }, "createReadOnlySessionResult"); - } - + return this.command( + "/public/v1/submit/create_read_only_session", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION", + }, + "createReadOnlySessionResult" + ); + }; - stampCreateReadOnlySession = async (input: SdkApiTypes.TCreateReadOnlySessionBody): Promise => { + stampCreateReadOnlySession = async ( + input: SdkApiTypes.TCreateReadOnlySessionBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_only_session"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_read_only_session"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -949,26 +1127,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - createReadWriteSession = async (input: SdkApiTypes.TCreateReadWriteSessionBody): Promise => { + createReadWriteSession = async ( + input: SdkApiTypes.TCreateReadWriteSessionBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_read_write_session", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2" - }, "createReadWriteSessionResultV2"); - } - + return this.command( + "/public/v1/submit/create_read_write_session", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2", + }, + "createReadWriteSessionResultV2" + ); + }; - stampCreateReadWriteSession = async (input: SdkApiTypes.TCreateReadWriteSessionBody): Promise => { + stampCreateReadWriteSession = async ( + input: SdkApiTypes.TCreateReadWriteSessionBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_write_session"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_read_write_session"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -976,26 +1164,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - createSubOrganization = async (input: SdkApiTypes.TCreateSubOrganizationBody): Promise => { + createSubOrganization = async ( + input: SdkApiTypes.TCreateSubOrganizationBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_sub_organization", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7" - }, "createSubOrganizationResultV7"); - } - + return this.command( + "/public/v1/submit/create_sub_organization", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7", + }, + "createSubOrganizationResultV7" + ); + }; - stampCreateSubOrganization = async (input: SdkApiTypes.TCreateSubOrganizationBody): Promise => { + stampCreateSubOrganization = async ( + input: SdkApiTypes.TCreateSubOrganizationBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_sub_organization"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_sub_organization"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1003,26 +1201,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - createUserTag = async (input: SdkApiTypes.TCreateUserTagBody): Promise => { + createUserTag = async ( + input: SdkApiTypes.TCreateUserTagBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_user_tag", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_USER_TAG" - }, "createUserTagResult"); - } - + return this.command( + "/public/v1/submit/create_user_tag", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_USER_TAG", + }, + "createUserTagResult" + ); + }; - stampCreateUserTag = async (input: SdkApiTypes.TCreateUserTagBody): Promise => { + stampCreateUserTag = async ( + input: SdkApiTypes.TCreateUserTagBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_user_tag"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_user_tag"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1030,22 +1238,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - createUsers = async (input: SdkApiTypes.TCreateUsersBody): Promise => { + createUsers = async ( + input: SdkApiTypes.TCreateUsersBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_users", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_USERS_V2" - }, "createUsersResult"); - } - + return this.command( + "/public/v1/submit/create_users", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_USERS_V2", + }, + "createUsersResult" + ); + }; - stampCreateUsers = async (input: SdkApiTypes.TCreateUsersBody): Promise => { + stampCreateUsers = async ( + input: SdkApiTypes.TCreateUsersBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1057,22 +1274,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - createWallet = async (input: SdkApiTypes.TCreateWalletBody): Promise => { + createWallet = async ( + input: SdkApiTypes.TCreateWalletBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_wallet", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_WALLET" - }, "createWalletResult"); - } - + return this.command( + "/public/v1/submit/create_wallet", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_WALLET", + }, + "createWalletResult" + ); + }; - stampCreateWallet = async (input: SdkApiTypes.TCreateWalletBody): Promise => { + stampCreateWallet = async ( + input: SdkApiTypes.TCreateWalletBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1084,26 +1310,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - createWalletAccounts = async (input: SdkApiTypes.TCreateWalletAccountsBody): Promise => { + createWalletAccounts = async ( + input: SdkApiTypes.TCreateWalletAccountsBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/create_wallet_accounts", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" - }, "createWalletAccountsResult"); - } - + return this.command( + "/public/v1/submit/create_wallet_accounts", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS", + }, + "createWalletAccountsResult" + ); + }; - stampCreateWalletAccounts = async (input: SdkApiTypes.TCreateWalletAccountsBody): Promise => { + stampCreateWalletAccounts = async ( + input: SdkApiTypes.TCreateWalletAccountsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1111,26 +1347,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - deleteApiKeys = async (input: SdkApiTypes.TDeleteApiKeysBody): Promise => { + deleteApiKeys = async ( + input: SdkApiTypes.TDeleteApiKeysBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_api_keys", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_API_KEYS" - }, "deleteApiKeysResult"); - } - + return this.command( + "/public/v1/submit/delete_api_keys", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_API_KEYS", + }, + "deleteApiKeysResult" + ); + }; - stampDeleteApiKeys = async (input: SdkApiTypes.TDeleteApiKeysBody): Promise => { + stampDeleteApiKeys = async ( + input: SdkApiTypes.TDeleteApiKeysBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1138,26 +1384,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - deleteAuthenticators = async (input: SdkApiTypes.TDeleteAuthenticatorsBody): Promise => { + deleteAuthenticators = async ( + input: SdkApiTypes.TDeleteAuthenticatorsBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_authenticators", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" - }, "deleteAuthenticatorsResult"); - } - + return this.command( + "/public/v1/submit/delete_authenticators", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS", + }, + "deleteAuthenticatorsResult" + ); + }; - stampDeleteAuthenticators = async (input: SdkApiTypes.TDeleteAuthenticatorsBody): Promise => { + stampDeleteAuthenticators = async ( + input: SdkApiTypes.TDeleteAuthenticatorsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_authenticators"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_authenticators"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1165,26 +1421,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - deleteInvitation = async (input: SdkApiTypes.TDeleteInvitationBody): Promise => { + deleteInvitation = async ( + input: SdkApiTypes.TDeleteInvitationBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_invitation", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_INVITATION" - }, "deleteInvitationResult"); - } - + return this.command( + "/public/v1/submit/delete_invitation", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_INVITATION", + }, + "deleteInvitationResult" + ); + }; - stampDeleteInvitation = async (input: SdkApiTypes.TDeleteInvitationBody): Promise => { + stampDeleteInvitation = async ( + input: SdkApiTypes.TDeleteInvitationBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_invitation"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_invitation"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1192,26 +1458,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - deleteOauthProviders = async (input: SdkApiTypes.TDeleteOauthProvidersBody): Promise => { + deleteOauthProviders = async ( + input: SdkApiTypes.TDeleteOauthProvidersBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_oauth_providers", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS" - }, "deleteOauthProvidersResult"); - } - + return this.command( + "/public/v1/submit/delete_oauth_providers", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS", + }, + "deleteOauthProvidersResult" + ); + }; - stampDeleteOauthProviders = async (input: SdkApiTypes.TDeleteOauthProvidersBody): Promise => { + stampDeleteOauthProviders = async ( + input: SdkApiTypes.TDeleteOauthProvidersBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_oauth_providers"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_oauth_providers"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1219,22 +1495,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - deletePolicy = async (input: SdkApiTypes.TDeletePolicyBody): Promise => { + deletePolicy = async ( + input: SdkApiTypes.TDeletePolicyBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_policy", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_POLICY" - }, "deletePolicyResult"); - } - + return this.command( + "/public/v1/submit/delete_policy", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_POLICY", + }, + "deletePolicyResult" + ); + }; - stampDeletePolicy = async (input: SdkApiTypes.TDeletePolicyBody): Promise => { + stampDeletePolicy = async ( + input: SdkApiTypes.TDeletePolicyBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1246,26 +1531,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - deletePrivateKeyTags = async (input: SdkApiTypes.TDeletePrivateKeyTagsBody): Promise => { + deletePrivateKeyTags = async ( + input: SdkApiTypes.TDeletePrivateKeyTagsBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_private_key_tags", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" - }, "deletePrivateKeyTagsResult"); - } - + return this.command( + "/public/v1/submit/delete_private_key_tags", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS", + }, + "deletePrivateKeyTagsResult" + ); + }; - stampDeletePrivateKeyTags = async (input: SdkApiTypes.TDeletePrivateKeyTagsBody): Promise => { + stampDeletePrivateKeyTags = async ( + input: SdkApiTypes.TDeletePrivateKeyTagsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_key_tags"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_private_key_tags"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1273,26 +1568,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - deletePrivateKeys = async (input: SdkApiTypes.TDeletePrivateKeysBody): Promise => { + deletePrivateKeys = async ( + input: SdkApiTypes.TDeletePrivateKeysBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_private_keys", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS" - }, "deletePrivateKeysResult"); - } - + return this.command( + "/public/v1/submit/delete_private_keys", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS", + }, + "deletePrivateKeysResult" + ); + }; - stampDeletePrivateKeys = async (input: SdkApiTypes.TDeletePrivateKeysBody): Promise => { + stampDeletePrivateKeys = async ( + input: SdkApiTypes.TDeletePrivateKeysBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_keys"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_private_keys"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1300,26 +1605,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - deleteSubOrganization = async (input: SdkApiTypes.TDeleteSubOrganizationBody): Promise => { + deleteSubOrganization = async ( + input: SdkApiTypes.TDeleteSubOrganizationBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_sub_organization", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION" - }, "deleteSubOrganizationResult"); - } - + return this.command( + "/public/v1/submit/delete_sub_organization", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION", + }, + "deleteSubOrganizationResult" + ); + }; - stampDeleteSubOrganization = async (input: SdkApiTypes.TDeleteSubOrganizationBody): Promise => { + stampDeleteSubOrganization = async ( + input: SdkApiTypes.TDeleteSubOrganizationBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_sub_organization"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_sub_organization"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1327,26 +1642,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - deleteUserTags = async (input: SdkApiTypes.TDeleteUserTagsBody): Promise => { + deleteUserTags = async ( + input: SdkApiTypes.TDeleteUserTagsBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_user_tags", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_USER_TAGS" - }, "deleteUserTagsResult"); - } - + return this.command( + "/public/v1/submit/delete_user_tags", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_USER_TAGS", + }, + "deleteUserTagsResult" + ); + }; - stampDeleteUserTags = async (input: SdkApiTypes.TDeleteUserTagsBody): Promise => { + stampDeleteUserTags = async ( + input: SdkApiTypes.TDeleteUserTagsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_user_tags"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_user_tags"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1354,22 +1679,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - deleteUsers = async (input: SdkApiTypes.TDeleteUsersBody): Promise => { + deleteUsers = async ( + input: SdkApiTypes.TDeleteUsersBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_users", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_USERS" - }, "deleteUsersResult"); - } - + return this.command( + "/public/v1/submit/delete_users", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_USERS", + }, + "deleteUsersResult" + ); + }; - stampDeleteUsers = async (input: SdkApiTypes.TDeleteUsersBody): Promise => { + stampDeleteUsers = async ( + input: SdkApiTypes.TDeleteUsersBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1381,22 +1715,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - deleteWallets = async (input: SdkApiTypes.TDeleteWalletsBody): Promise => { + deleteWallets = async ( + input: SdkApiTypes.TDeleteWalletsBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/delete_wallets", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_DELETE_WALLETS" - }, "deleteWalletsResult"); - } - + return this.command( + "/public/v1/submit/delete_wallets", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_DELETE_WALLETS", + }, + "deleteWalletsResult" + ); + }; - stampDeleteWallets = async (input: SdkApiTypes.TDeleteWalletsBody): Promise => { + stampDeleteWallets = async ( + input: SdkApiTypes.TDeleteWalletsBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1408,22 +1751,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - emailAuth = async (input: SdkApiTypes.TEmailAuthBody): Promise => { + emailAuth = async ( + input: SdkApiTypes.TEmailAuthBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/email_auth", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_EMAIL_AUTH_V2" - }, "emailAuthResult"); - } - + return this.command( + "/public/v1/submit/email_auth", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_EMAIL_AUTH_V2", + }, + "emailAuthResult" + ); + }; - stampEmailAuth = async (input: SdkApiTypes.TEmailAuthBody): Promise => { + stampEmailAuth = async ( + input: SdkApiTypes.TEmailAuthBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1435,26 +1787,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - exportPrivateKey = async (input: SdkApiTypes.TExportPrivateKeyBody): Promise => { + exportPrivateKey = async ( + input: SdkApiTypes.TExportPrivateKeyBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/export_private_key", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" - }, "exportPrivateKeyResult"); - } - + return this.command( + "/public/v1/submit/export_private_key", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY", + }, + "exportPrivateKeyResult" + ); + }; - stampExportPrivateKey = async (input: SdkApiTypes.TExportPrivateKeyBody): Promise => { + stampExportPrivateKey = async ( + input: SdkApiTypes.TExportPrivateKeyBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_private_key"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/export_private_key"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1462,22 +1824,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - exportWallet = async (input: SdkApiTypes.TExportWalletBody): Promise => { + exportWallet = async ( + input: SdkApiTypes.TExportWalletBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/export_wallet", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_EXPORT_WALLET" - }, "exportWalletResult"); - } - + return this.command( + "/public/v1/submit/export_wallet", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_EXPORT_WALLET", + }, + "exportWalletResult" + ); + }; - stampExportWallet = async (input: SdkApiTypes.TExportWalletBody): Promise => { + stampExportWallet = async ( + input: SdkApiTypes.TExportWalletBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1489,26 +1860,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - exportWalletAccount = async (input: SdkApiTypes.TExportWalletAccountBody): Promise => { + exportWalletAccount = async ( + input: SdkApiTypes.TExportWalletAccountBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/export_wallet_account", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" - }, "exportWalletAccountResult"); - } - + return this.command( + "/public/v1/submit/export_wallet_account", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT", + }, + "exportWalletAccountResult" + ); + }; - stampExportWalletAccount = async (input: SdkApiTypes.TExportWalletAccountBody): Promise => { + stampExportWalletAccount = async ( + input: SdkApiTypes.TExportWalletAccountBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_wallet_account"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/export_wallet_account"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1516,26 +1897,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - importPrivateKey = async (input: SdkApiTypes.TImportPrivateKeyBody): Promise => { + importPrivateKey = async ( + input: SdkApiTypes.TImportPrivateKeyBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/import_private_key", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY" - }, "importPrivateKeyResult"); - } - + return this.command( + "/public/v1/submit/import_private_key", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY", + }, + "importPrivateKeyResult" + ); + }; - stampImportPrivateKey = async (input: SdkApiTypes.TImportPrivateKeyBody): Promise => { + stampImportPrivateKey = async ( + input: SdkApiTypes.TImportPrivateKeyBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/import_private_key"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/import_private_key"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1543,22 +1934,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - importWallet = async (input: SdkApiTypes.TImportWalletBody): Promise => { + importWallet = async ( + input: SdkApiTypes.TImportWalletBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/import_wallet", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_IMPORT_WALLET" - }, "importWalletResult"); - } - + return this.command( + "/public/v1/submit/import_wallet", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_IMPORT_WALLET", + }, + "importWalletResult" + ); + }; - stampImportWallet = async (input: SdkApiTypes.TImportWalletBody): Promise => { + stampImportWallet = async ( + input: SdkApiTypes.TImportWalletBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1570,26 +1970,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - initImportPrivateKey = async (input: SdkApiTypes.TInitImportPrivateKeyBody): Promise => { + initImportPrivateKey = async ( + input: SdkApiTypes.TInitImportPrivateKeyBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/init_import_private_key", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY" - }, "initImportPrivateKeyResult"); - } - + return this.command( + "/public/v1/submit/init_import_private_key", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY", + }, + "initImportPrivateKeyResult" + ); + }; - stampInitImportPrivateKey = async (input: SdkApiTypes.TInitImportPrivateKeyBody): Promise => { + stampInitImportPrivateKey = async ( + input: SdkApiTypes.TInitImportPrivateKeyBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_import_private_key"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/init_import_private_key"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1597,26 +2007,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - initImportWallet = async (input: SdkApiTypes.TInitImportWalletBody): Promise => { + initImportWallet = async ( + input: SdkApiTypes.TInitImportWalletBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/init_import_wallet", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_INIT_IMPORT_WALLET" - }, "initImportWalletResult"); - } - + return this.command( + "/public/v1/submit/init_import_wallet", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_INIT_IMPORT_WALLET", + }, + "initImportWalletResult" + ); + }; - stampInitImportWallet = async (input: SdkApiTypes.TInitImportWalletBody): Promise => { + stampInitImportWallet = async ( + input: SdkApiTypes.TInitImportWalletBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_import_wallet"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/init_import_wallet"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1624,22 +2044,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - initOtpAuth = async (input: SdkApiTypes.TInitOtpAuthBody): Promise => { + initOtpAuth = async ( + input: SdkApiTypes.TInitOtpAuthBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/init_otp_auth", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_INIT_OTP_AUTH" - }, "initOtpAuthResult"); - } - + return this.command( + "/public/v1/submit/init_otp_auth", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_INIT_OTP_AUTH", + }, + "initOtpAuthResult" + ); + }; - stampInitOtpAuth = async (input: SdkApiTypes.TInitOtpAuthBody): Promise => { + stampInitOtpAuth = async ( + input: SdkApiTypes.TInitOtpAuthBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1651,26 +2080,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - initUserEmailRecovery = async (input: SdkApiTypes.TInitUserEmailRecoveryBody): Promise => { + initUserEmailRecovery = async ( + input: SdkApiTypes.TInitUserEmailRecoveryBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/init_user_email_recovery", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" - }, "initUserEmailRecoveryResult"); - } - + return this.command( + "/public/v1/submit/init_user_email_recovery", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY", + }, + "initUserEmailRecoveryResult" + ); + }; - stampInitUserEmailRecovery = async (input: SdkApiTypes.TInitUserEmailRecoveryBody): Promise => { + stampInitUserEmailRecovery = async ( + input: SdkApiTypes.TInitUserEmailRecoveryBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_user_email_recovery"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/init_user_email_recovery"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1678,22 +2117,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - oauth = async (input: SdkApiTypes.TOauthBody): Promise => { + oauth = async ( + input: SdkApiTypes.TOauthBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/oauth", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_OAUTH" - }, "oauthResult"); - } - + return this.command( + "/public/v1/submit/oauth", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_OAUTH", + }, + "oauthResult" + ); + }; - stampOauth = async (input: SdkApiTypes.TOauthBody): Promise => { + stampOauth = async ( + input: SdkApiTypes.TOauthBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1705,22 +2153,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - otpAuth = async (input: SdkApiTypes.TOtpAuthBody): Promise => { + otpAuth = async ( + input: SdkApiTypes.TOtpAuthBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/otp_auth", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_OTP_AUTH" - }, "otpAuthResult"); - } - + return this.command( + "/public/v1/submit/otp_auth", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_OTP_AUTH", + }, + "otpAuthResult" + ); + }; - stampOtpAuth = async (input: SdkApiTypes.TOtpAuthBody): Promise => { + stampOtpAuth = async ( + input: SdkApiTypes.TOtpAuthBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1732,22 +2189,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - recoverUser = async (input: SdkApiTypes.TRecoverUserBody): Promise => { + recoverUser = async ( + input: SdkApiTypes.TRecoverUserBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/recover_user", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_RECOVER_USER" - }, "recoverUserResult"); - } - + return this.command( + "/public/v1/submit/recover_user", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_RECOVER_USER", + }, + "recoverUserResult" + ); + }; - stampRecoverUser = async (input: SdkApiTypes.TRecoverUserBody): Promise => { + stampRecoverUser = async ( + input: SdkApiTypes.TRecoverUserBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1759,27 +2225,32 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - rejectActivity = async (input: SdkApiTypes.TRejectActivityBody): Promise => { + rejectActivity = async ( + input: SdkApiTypes.TRejectActivityBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.activityDecision("/public/v1/submit/reject_activity", - { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_REJECT_ACTIVITY" - }); - } - + return this.activityDecision("/public/v1/submit/reject_activity", { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_REJECT_ACTIVITY", + }); + }; - stampRejectActivity = async (input: SdkApiTypes.TRejectActivityBody): Promise => { + stampRejectActivity = async ( + input: SdkApiTypes.TRejectActivityBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/reject_activity"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/reject_activity"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1787,26 +2258,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - removeOrganizationFeature = async (input: SdkApiTypes.TRemoveOrganizationFeatureBody): Promise => { + removeOrganizationFeature = async ( + input: SdkApiTypes.TRemoveOrganizationFeatureBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/remove_organization_feature", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" - }, "removeOrganizationFeatureResult"); - } - + return this.command( + "/public/v1/submit/remove_organization_feature", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE", + }, + "removeOrganizationFeatureResult" + ); + }; - stampRemoveOrganizationFeature = async (input: SdkApiTypes.TRemoveOrganizationFeatureBody): Promise => { + stampRemoveOrganizationFeature = async ( + input: SdkApiTypes.TRemoveOrganizationFeatureBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/remove_organization_feature"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/remove_organization_feature"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1814,26 +2295,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - setOrganizationFeature = async (input: SdkApiTypes.TSetOrganizationFeatureBody): Promise => { + setOrganizationFeature = async ( + input: SdkApiTypes.TSetOrganizationFeatureBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/set_organization_feature", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" - }, "setOrganizationFeatureResult"); - } - + return this.command( + "/public/v1/submit/set_organization_feature", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE", + }, + "setOrganizationFeatureResult" + ); + }; - stampSetOrganizationFeature = async (input: SdkApiTypes.TSetOrganizationFeatureBody): Promise => { + stampSetOrganizationFeature = async ( + input: SdkApiTypes.TSetOrganizationFeatureBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/set_organization_feature"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/set_organization_feature"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1841,26 +2332,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - signRawPayload = async (input: SdkApiTypes.TSignRawPayloadBody): Promise => { + signRawPayload = async ( + input: SdkApiTypes.TSignRawPayloadBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/sign_raw_payload", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" - }, "signRawPayloadResult"); - } - + return this.command( + "/public/v1/submit/sign_raw_payload", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2", + }, + "signRawPayloadResult" + ); + }; - stampSignRawPayload = async (input: SdkApiTypes.TSignRawPayloadBody): Promise => { + stampSignRawPayload = async ( + input: SdkApiTypes.TSignRawPayloadBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payload"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payload"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1868,26 +2369,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - signRawPayloads = async (input: SdkApiTypes.TSignRawPayloadsBody): Promise => { + signRawPayloads = async ( + input: SdkApiTypes.TSignRawPayloadsBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/sign_raw_payloads", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS" - }, "signRawPayloadsResult"); - } - + return this.command( + "/public/v1/submit/sign_raw_payloads", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS", + }, + "signRawPayloadsResult" + ); + }; - stampSignRawPayloads = async (input: SdkApiTypes.TSignRawPayloadsBody): Promise => { + stampSignRawPayloads = async ( + input: SdkApiTypes.TSignRawPayloadsBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payloads"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payloads"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1895,26 +2406,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - signTransaction = async (input: SdkApiTypes.TSignTransactionBody): Promise => { + signTransaction = async ( + input: SdkApiTypes.TSignTransactionBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/sign_transaction", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" - }, "signTransactionResult"); - } - + return this.command( + "/public/v1/submit/sign_transaction", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_SIGN_TRANSACTION_V2", + }, + "signTransactionResult" + ); + }; - stampSignTransaction = async (input: SdkApiTypes.TSignTransactionBody): Promise => { + stampSignTransaction = async ( + input: SdkApiTypes.TSignTransactionBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/sign_transaction"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/sign_transaction"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1922,22 +2443,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - updatePolicy = async (input: SdkApiTypes.TUpdatePolicyBody): Promise => { + updatePolicy = async ( + input: SdkApiTypes.TUpdatePolicyBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/update_policy", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_POLICY" - }, "updatePolicyResult"); - } - + return this.command( + "/public/v1/submit/update_policy", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_POLICY", + }, + "updatePolicyResult" + ); + }; - stampUpdatePolicy = async (input: SdkApiTypes.TUpdatePolicyBody): Promise => { + stampUpdatePolicy = async ( + input: SdkApiTypes.TUpdatePolicyBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -1949,26 +2479,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - updatePrivateKeyTag = async (input: SdkApiTypes.TUpdatePrivateKeyTagBody): Promise => { + updatePrivateKeyTag = async ( + input: SdkApiTypes.TUpdatePrivateKeyTagBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/update_private_key_tag", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" - }, "updatePrivateKeyTagResult"); - } - + return this.command( + "/public/v1/submit/update_private_key_tag", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG", + }, + "updatePrivateKeyTagResult" + ); + }; - stampUpdatePrivateKeyTag = async (input: SdkApiTypes.TUpdatePrivateKeyTagBody): Promise => { + stampUpdatePrivateKeyTag = async ( + input: SdkApiTypes.TUpdatePrivateKeyTagBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_private_key_tag"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/update_private_key_tag"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -1976,26 +2516,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - updateRootQuorum = async (input: SdkApiTypes.TUpdateRootQuorumBody): Promise => { + updateRootQuorum = async ( + input: SdkApiTypes.TUpdateRootQuorumBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/update_root_quorum", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" - }, "updateRootQuorumResult"); - } - + return this.command( + "/public/v1/submit/update_root_quorum", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM", + }, + "updateRootQuorumResult" + ); + }; - stampUpdateRootQuorum = async (input: SdkApiTypes.TUpdateRootQuorumBody): Promise => { + stampUpdateRootQuorum = async ( + input: SdkApiTypes.TUpdateRootQuorumBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_root_quorum"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/update_root_quorum"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -2003,22 +2553,31 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } + }; - - updateUser = async (input: SdkApiTypes.TUpdateUserBody): Promise => { + updateUser = async ( + input: SdkApiTypes.TUpdateUserBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/update_user", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_USER" - }, "updateUserResult"); - } - + return this.command( + "/public/v1/submit/update_user", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_USER", + }, + "updateUserResult" + ); + }; - stampUpdateUser = async (input: SdkApiTypes.TUpdateUserBody): Promise => { + stampUpdateUser = async ( + input: SdkApiTypes.TUpdateUserBody + ): Promise => { if (!this.config.stamper) { return undefined; } @@ -2030,26 +2589,36 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - + }; - updateUserTag = async (input: SdkApiTypes.TUpdateUserTagBody): Promise => { + updateUserTag = async ( + input: SdkApiTypes.TUpdateUserTagBody + ): Promise => { const { organizationId, timestampMs, ...rest } = input; const currentUser = await getStorageValue(StorageKeys.CurrentUser); - return this.command("/public/v1/submit/update_user_tag", { - parameters: rest, - organizationId: organizationId ?? (currentUser?.organization?.organizationId ?? this.config.organizationId), - timestampMs: timestampMs ?? String(Date.now()), - type: "ACTIVITY_TYPE_UPDATE_USER_TAG" - }, "updateUserTagResult"); - } - + return this.command( + "/public/v1/submit/update_user_tag", + { + parameters: rest, + organizationId: + organizationId ?? + currentUser?.organization?.organizationId ?? + this.config.organizationId, + timestampMs: timestampMs ?? String(Date.now()), + type: "ACTIVITY_TYPE_UPDATE_USER_TAG", + }, + "updateUserTagResult" + ); + }; - stampUpdateUserTag = async (input: SdkApiTypes.TUpdateUserTagBody): Promise => { + stampUpdateUserTag = async ( + input: SdkApiTypes.TUpdateUserTagBody + ): Promise => { if (!this.config.stamper) { return undefined; } - const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user_tag"; + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/update_user_tag"; const body = JSON.stringify(input); const stamp = await this.config.stamper.stamp(body); return { @@ -2057,6 +2626,5 @@ export class TurnkeySDKClientBase { stamp: stamp, url: fullUrl, }; - } - -} \ No newline at end of file + }; +} diff --git a/packages/sdk-browser/src/__generated__/sdk_api_types.ts b/packages/sdk-browser/src/__generated__/sdk_api_types.ts index a7a6ffa6..acc36539 100644 --- a/packages/sdk-browser/src/__generated__/sdk_api_types.ts +++ b/packages/sdk-browser/src/__generated__/sdk_api_types.ts @@ -2,456 +2,793 @@ import type { operations, definitions } from "../__inputs__/public_api.types"; -import type { queryOverrideParams, commandOverrideParams } from "../__types__/base"; +import type { + queryOverrideParams, + commandOverrideParams, +} from "../__types__/base"; -export type TGetActivityResponse = operations["PublicApiService_GetActivity"]["responses"]["200"]["schema"]; +export type TGetActivityResponse = + operations["PublicApiService_GetActivity"]["responses"]["200"]["schema"]; export type TGetActivityInput = { body: TGetActivityBody }; -export type TGetActivityBody = Omit & queryOverrideParams; +export type TGetActivityBody = Omit< + operations["PublicApiService_GetActivity"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetApiKeyResponse = operations["PublicApiService_GetApiKey"]["responses"]["200"]["schema"]; +export type TGetApiKeyResponse = + operations["PublicApiService_GetApiKey"]["responses"]["200"]["schema"]; export type TGetApiKeyInput = { body: TGetApiKeyBody }; -export type TGetApiKeyBody = Omit & queryOverrideParams; +export type TGetApiKeyBody = Omit< + operations["PublicApiService_GetApiKey"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetApiKeysResponse = operations["PublicApiService_GetApiKeys"]["responses"]["200"]["schema"]; +export type TGetApiKeysResponse = + operations["PublicApiService_GetApiKeys"]["responses"]["200"]["schema"]; export type TGetApiKeysInput = { body: TGetApiKeysBody }; -export type TGetApiKeysBody = Omit & queryOverrideParams; +export type TGetApiKeysBody = Omit< + operations["PublicApiService_GetApiKeys"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetAttestationDocumentResponse = operations["PublicApiService_GetAttestationDocument"]["responses"]["200"]["schema"]; +export type TGetAttestationDocumentResponse = + operations["PublicApiService_GetAttestationDocument"]["responses"]["200"]["schema"]; -export type TGetAttestationDocumentInput = { body: TGetAttestationDocumentBody }; +export type TGetAttestationDocumentInput = { + body: TGetAttestationDocumentBody; +}; -export type TGetAttestationDocumentBody = Omit & queryOverrideParams; +export type TGetAttestationDocumentBody = Omit< + operations["PublicApiService_GetAttestationDocument"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetAuthenticatorResponse = operations["PublicApiService_GetAuthenticator"]["responses"]["200"]["schema"]; +export type TGetAuthenticatorResponse = + operations["PublicApiService_GetAuthenticator"]["responses"]["200"]["schema"]; export type TGetAuthenticatorInput = { body: TGetAuthenticatorBody }; -export type TGetAuthenticatorBody = Omit & queryOverrideParams; +export type TGetAuthenticatorBody = Omit< + operations["PublicApiService_GetAuthenticator"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetAuthenticatorsResponse = operations["PublicApiService_GetAuthenticators"]["responses"]["200"]["schema"]; +export type TGetAuthenticatorsResponse = + operations["PublicApiService_GetAuthenticators"]["responses"]["200"]["schema"]; export type TGetAuthenticatorsInput = { body: TGetAuthenticatorsBody }; -export type TGetAuthenticatorsBody = Omit & queryOverrideParams; +export type TGetAuthenticatorsBody = Omit< + operations["PublicApiService_GetAuthenticators"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetOauthProvidersResponse = operations["PublicApiService_GetOauthProviders"]["responses"]["200"]["schema"]; +export type TGetOauthProvidersResponse = + operations["PublicApiService_GetOauthProviders"]["responses"]["200"]["schema"]; export type TGetOauthProvidersInput = { body: TGetOauthProvidersBody }; -export type TGetOauthProvidersBody = Omit & queryOverrideParams; +export type TGetOauthProvidersBody = Omit< + operations["PublicApiService_GetOauthProviders"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetOrganizationResponse = operations["PublicApiService_GetOrganization"]["responses"]["200"]["schema"]; +export type TGetOrganizationResponse = + operations["PublicApiService_GetOrganization"]["responses"]["200"]["schema"]; export type TGetOrganizationInput = { body: TGetOrganizationBody }; -export type TGetOrganizationBody = Omit & queryOverrideParams; +export type TGetOrganizationBody = Omit< + operations["PublicApiService_GetOrganization"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetOrganizationConfigsResponse = operations["PublicApiService_GetOrganizationConfigs"]["responses"]["200"]["schema"]; +export type TGetOrganizationConfigsResponse = + operations["PublicApiService_GetOrganizationConfigs"]["responses"]["200"]["schema"]; -export type TGetOrganizationConfigsInput = { body: TGetOrganizationConfigsBody }; +export type TGetOrganizationConfigsInput = { + body: TGetOrganizationConfigsBody; +}; -export type TGetOrganizationConfigsBody = Omit & queryOverrideParams; +export type TGetOrganizationConfigsBody = Omit< + operations["PublicApiService_GetOrganizationConfigs"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetPolicyResponse = operations["PublicApiService_GetPolicy"]["responses"]["200"]["schema"]; +export type TGetPolicyResponse = + operations["PublicApiService_GetPolicy"]["responses"]["200"]["schema"]; export type TGetPolicyInput = { body: TGetPolicyBody }; -export type TGetPolicyBody = Omit & queryOverrideParams; +export type TGetPolicyBody = Omit< + operations["PublicApiService_GetPolicy"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetPrivateKeyResponse = operations["PublicApiService_GetPrivateKey"]["responses"]["200"]["schema"]; +export type TGetPrivateKeyResponse = + operations["PublicApiService_GetPrivateKey"]["responses"]["200"]["schema"]; export type TGetPrivateKeyInput = { body: TGetPrivateKeyBody }; -export type TGetPrivateKeyBody = Omit & queryOverrideParams; +export type TGetPrivateKeyBody = Omit< + operations["PublicApiService_GetPrivateKey"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetUserResponse = operations["PublicApiService_GetUser"]["responses"]["200"]["schema"]; +export type TGetUserResponse = + operations["PublicApiService_GetUser"]["responses"]["200"]["schema"]; export type TGetUserInput = { body: TGetUserBody }; -export type TGetUserBody = Omit & queryOverrideParams; +export type TGetUserBody = Omit< + operations["PublicApiService_GetUser"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetWalletResponse = operations["PublicApiService_GetWallet"]["responses"]["200"]["schema"]; +export type TGetWalletResponse = + operations["PublicApiService_GetWallet"]["responses"]["200"]["schema"]; export type TGetWalletInput = { body: TGetWalletBody }; -export type TGetWalletBody = Omit & queryOverrideParams; +export type TGetWalletBody = Omit< + operations["PublicApiService_GetWallet"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetActivitiesResponse = operations["PublicApiService_GetActivities"]["responses"]["200"]["schema"]; +export type TGetActivitiesResponse = + operations["PublicApiService_GetActivities"]["responses"]["200"]["schema"]; export type TGetActivitiesInput = { body: TGetActivitiesBody }; -export type TGetActivitiesBody = Omit & queryOverrideParams; +export type TGetActivitiesBody = Omit< + operations["PublicApiService_GetActivities"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetPoliciesResponse = operations["PublicApiService_GetPolicies"]["responses"]["200"]["schema"]; +export type TGetPoliciesResponse = + operations["PublicApiService_GetPolicies"]["responses"]["200"]["schema"]; export type TGetPoliciesInput = { body: TGetPoliciesBody }; -export type TGetPoliciesBody = Omit & queryOverrideParams; +export type TGetPoliciesBody = Omit< + operations["PublicApiService_GetPolicies"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TListPrivateKeyTagsResponse = operations["PublicApiService_ListPrivateKeyTags"]["responses"]["200"]["schema"]; +export type TListPrivateKeyTagsResponse = + operations["PublicApiService_ListPrivateKeyTags"]["responses"]["200"]["schema"]; export type TListPrivateKeyTagsInput = { body: TListPrivateKeyTagsBody }; -export type TListPrivateKeyTagsBody = Omit & queryOverrideParams; +export type TListPrivateKeyTagsBody = Omit< + operations["PublicApiService_ListPrivateKeyTags"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetPrivateKeysResponse = operations["PublicApiService_GetPrivateKeys"]["responses"]["200"]["schema"]; +export type TGetPrivateKeysResponse = + operations["PublicApiService_GetPrivateKeys"]["responses"]["200"]["schema"]; export type TGetPrivateKeysInput = { body: TGetPrivateKeysBody }; -export type TGetPrivateKeysBody = Omit & queryOverrideParams; +export type TGetPrivateKeysBody = Omit< + operations["PublicApiService_GetPrivateKeys"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetSubOrgIdsResponse = operations["PublicApiService_GetSubOrgIds"]["responses"]["200"]["schema"]; +export type TGetSubOrgIdsResponse = + operations["PublicApiService_GetSubOrgIds"]["responses"]["200"]["schema"]; export type TGetSubOrgIdsInput = { body: TGetSubOrgIdsBody }; -export type TGetSubOrgIdsBody = Omit & queryOverrideParams; +export type TGetSubOrgIdsBody = Omit< + operations["PublicApiService_GetSubOrgIds"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TListUserTagsResponse = operations["PublicApiService_ListUserTags"]["responses"]["200"]["schema"]; +export type TListUserTagsResponse = + operations["PublicApiService_ListUserTags"]["responses"]["200"]["schema"]; export type TListUserTagsInput = { body: TListUserTagsBody }; -export type TListUserTagsBody = Omit & queryOverrideParams; +export type TListUserTagsBody = Omit< + operations["PublicApiService_ListUserTags"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetUsersResponse = operations["PublicApiService_GetUsers"]["responses"]["200"]["schema"]; +export type TGetUsersResponse = + operations["PublicApiService_GetUsers"]["responses"]["200"]["schema"]; export type TGetUsersInput = { body: TGetUsersBody }; -export type TGetUsersBody = Omit & queryOverrideParams; +export type TGetUsersBody = Omit< + operations["PublicApiService_GetUsers"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetWalletAccountsResponse = operations["PublicApiService_GetWalletAccounts"]["responses"]["200"]["schema"]; +export type TGetWalletAccountsResponse = + operations["PublicApiService_GetWalletAccounts"]["responses"]["200"]["schema"]; export type TGetWalletAccountsInput = { body: TGetWalletAccountsBody }; -export type TGetWalletAccountsBody = Omit & queryOverrideParams; +export type TGetWalletAccountsBody = Omit< + operations["PublicApiService_GetWalletAccounts"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetWalletsResponse = operations["PublicApiService_GetWallets"]["responses"]["200"]["schema"]; +export type TGetWalletsResponse = + operations["PublicApiService_GetWallets"]["responses"]["200"]["schema"]; export type TGetWalletsInput = { body: TGetWalletsBody }; -export type TGetWalletsBody = Omit & queryOverrideParams; +export type TGetWalletsBody = Omit< + operations["PublicApiService_GetWallets"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TGetWhoamiResponse = operations["PublicApiService_GetWhoami"]["responses"]["200"]["schema"]; +export type TGetWhoamiResponse = + operations["PublicApiService_GetWhoami"]["responses"]["200"]["schema"]; export type TGetWhoamiInput = { body: TGetWhoamiBody }; -export type TGetWhoamiBody = Omit & queryOverrideParams; +export type TGetWhoamiBody = Omit< + operations["PublicApiService_GetWhoami"]["parameters"]["body"]["body"], + "organizationId" +> & + queryOverrideParams; -export type TApproveActivityResponse = operations["PublicApiService_ApproveActivity"]["responses"]["200"]["schema"]["activity"]["result"] & definitions["v1ActivityResponse"]; +export type TApproveActivityResponse = + operations["PublicApiService_ApproveActivity"]["responses"]["200"]["schema"]["activity"]["result"] & + definitions["v1ActivityResponse"]; export type TApproveActivityInput = { body: TApproveActivityBody }; -export type TApproveActivityBody = operations["PublicApiService_ApproveActivity"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TApproveActivityBody = + operations["PublicApiService_ApproveActivity"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateApiKeysResponse = operations["PublicApiService_CreateApiKeys"]["responses"]["200"]["schema"]["activity"]["result"]["createApiKeysResult"] & definitions["v1ActivityResponse"]; +export type TCreateApiKeysResponse = + operations["PublicApiService_CreateApiKeys"]["responses"]["200"]["schema"]["activity"]["result"]["createApiKeysResult"] & + definitions["v1ActivityResponse"]; export type TCreateApiKeysInput = { body: TCreateApiKeysBody }; -export type TCreateApiKeysBody = operations["PublicApiService_CreateApiKeys"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateApiKeysBody = + operations["PublicApiService_CreateApiKeys"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateApiOnlyUsersResponse = operations["PublicApiService_CreateApiOnlyUsers"]["responses"]["200"]["schema"]["activity"]["result"]["createApiOnlyUsersResult"] & definitions["v1ActivityResponse"]; +export type TCreateApiOnlyUsersResponse = + operations["PublicApiService_CreateApiOnlyUsers"]["responses"]["200"]["schema"]["activity"]["result"]["createApiOnlyUsersResult"] & + definitions["v1ActivityResponse"]; export type TCreateApiOnlyUsersInput = { body: TCreateApiOnlyUsersBody }; -export type TCreateApiOnlyUsersBody = operations["PublicApiService_CreateApiOnlyUsers"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateApiOnlyUsersBody = + operations["PublicApiService_CreateApiOnlyUsers"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateAuthenticatorsResponse = operations["PublicApiService_CreateAuthenticators"]["responses"]["200"]["schema"]["activity"]["result"]["createAuthenticatorsResult"] & definitions["v1ActivityResponse"]; +export type TCreateAuthenticatorsResponse = + operations["PublicApiService_CreateAuthenticators"]["responses"]["200"]["schema"]["activity"]["result"]["createAuthenticatorsResult"] & + definitions["v1ActivityResponse"]; export type TCreateAuthenticatorsInput = { body: TCreateAuthenticatorsBody }; -export type TCreateAuthenticatorsBody = operations["PublicApiService_CreateAuthenticators"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateAuthenticatorsBody = + operations["PublicApiService_CreateAuthenticators"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateInvitationsResponse = operations["PublicApiService_CreateInvitations"]["responses"]["200"]["schema"]["activity"]["result"]["createInvitationsResult"] & definitions["v1ActivityResponse"]; +export type TCreateInvitationsResponse = + operations["PublicApiService_CreateInvitations"]["responses"]["200"]["schema"]["activity"]["result"]["createInvitationsResult"] & + definitions["v1ActivityResponse"]; export type TCreateInvitationsInput = { body: TCreateInvitationsBody }; -export type TCreateInvitationsBody = operations["PublicApiService_CreateInvitations"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateInvitationsBody = + operations["PublicApiService_CreateInvitations"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateOauthProvidersResponse = operations["PublicApiService_CreateOauthProviders"]["responses"]["200"]["schema"]["activity"]["result"]["createOauthProvidersResult"] & definitions["v1ActivityResponse"]; +export type TCreateOauthProvidersResponse = + operations["PublicApiService_CreateOauthProviders"]["responses"]["200"]["schema"]["activity"]["result"]["createOauthProvidersResult"] & + definitions["v1ActivityResponse"]; export type TCreateOauthProvidersInput = { body: TCreateOauthProvidersBody }; -export type TCreateOauthProvidersBody = operations["PublicApiService_CreateOauthProviders"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateOauthProvidersBody = + operations["PublicApiService_CreateOauthProviders"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreatePoliciesResponse = operations["PublicApiService_CreatePolicies"]["responses"]["200"]["schema"]["activity"]["result"]["createPoliciesResult"] & definitions["v1ActivityResponse"]; +export type TCreatePoliciesResponse = + operations["PublicApiService_CreatePolicies"]["responses"]["200"]["schema"]["activity"]["result"]["createPoliciesResult"] & + definitions["v1ActivityResponse"]; export type TCreatePoliciesInput = { body: TCreatePoliciesBody }; -export type TCreatePoliciesBody = operations["PublicApiService_CreatePolicies"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreatePoliciesBody = + operations["PublicApiService_CreatePolicies"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreatePolicyResponse = operations["PublicApiService_CreatePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["createPolicyResult"] & definitions["v1ActivityResponse"]; +export type TCreatePolicyResponse = + operations["PublicApiService_CreatePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["createPolicyResult"] & + definitions["v1ActivityResponse"]; export type TCreatePolicyInput = { body: TCreatePolicyBody }; -export type TCreatePolicyBody = operations["PublicApiService_CreatePolicy"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreatePolicyBody = + operations["PublicApiService_CreatePolicy"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreatePrivateKeyTagResponse = operations["PublicApiService_CreatePrivateKeyTag"]["responses"]["200"]["schema"]["activity"]["result"]["createPrivateKeyTagResult"] & definitions["v1ActivityResponse"]; +export type TCreatePrivateKeyTagResponse = + operations["PublicApiService_CreatePrivateKeyTag"]["responses"]["200"]["schema"]["activity"]["result"]["createPrivateKeyTagResult"] & + definitions["v1ActivityResponse"]; export type TCreatePrivateKeyTagInput = { body: TCreatePrivateKeyTagBody }; -export type TCreatePrivateKeyTagBody = operations["PublicApiService_CreatePrivateKeyTag"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreatePrivateKeyTagBody = + operations["PublicApiService_CreatePrivateKeyTag"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreatePrivateKeysResponse = operations["PublicApiService_CreatePrivateKeys"]["responses"]["200"]["schema"]["activity"]["result"]["createPrivateKeysResultV2"] & definitions["v1ActivityResponse"]; +export type TCreatePrivateKeysResponse = + operations["PublicApiService_CreatePrivateKeys"]["responses"]["200"]["schema"]["activity"]["result"]["createPrivateKeysResultV2"] & + definitions["v1ActivityResponse"]; export type TCreatePrivateKeysInput = { body: TCreatePrivateKeysBody }; -export type TCreatePrivateKeysBody = operations["PublicApiService_CreatePrivateKeys"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreatePrivateKeysBody = + operations["PublicApiService_CreatePrivateKeys"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateReadOnlySessionResponse = operations["PublicApiService_CreateReadOnlySession"]["responses"]["200"]["schema"]["activity"]["result"]["createReadOnlySessionResult"] & definitions["v1ActivityResponse"]; +export type TCreateReadOnlySessionResponse = + operations["PublicApiService_CreateReadOnlySession"]["responses"]["200"]["schema"]["activity"]["result"]["createReadOnlySessionResult"] & + definitions["v1ActivityResponse"]; export type TCreateReadOnlySessionInput = { body: TCreateReadOnlySessionBody }; -export type TCreateReadOnlySessionBody = operations["PublicApiService_CreateReadOnlySession"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateReadOnlySessionBody = + operations["PublicApiService_CreateReadOnlySession"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateReadWriteSessionResponse = operations["PublicApiService_CreateReadWriteSession"]["responses"]["200"]["schema"]["activity"]["result"]["createReadWriteSessionResultV2"] & definitions["v1ActivityResponse"]; +export type TCreateReadWriteSessionResponse = + operations["PublicApiService_CreateReadWriteSession"]["responses"]["200"]["schema"]["activity"]["result"]["createReadWriteSessionResultV2"] & + definitions["v1ActivityResponse"]; -export type TCreateReadWriteSessionInput = { body: TCreateReadWriteSessionBody }; +export type TCreateReadWriteSessionInput = { + body: TCreateReadWriteSessionBody; +}; -export type TCreateReadWriteSessionBody = operations["PublicApiService_CreateReadWriteSession"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateReadWriteSessionBody = + operations["PublicApiService_CreateReadWriteSession"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateSubOrganizationResponse = operations["PublicApiService_CreateSubOrganization"]["responses"]["200"]["schema"]["activity"]["result"]["createSubOrganizationResultV7"] & definitions["v1ActivityResponse"]; +export type TCreateSubOrganizationResponse = + operations["PublicApiService_CreateSubOrganization"]["responses"]["200"]["schema"]["activity"]["result"]["createSubOrganizationResultV7"] & + definitions["v1ActivityResponse"]; export type TCreateSubOrganizationInput = { body: TCreateSubOrganizationBody }; -export type TCreateSubOrganizationBody = operations["PublicApiService_CreateSubOrganization"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateSubOrganizationBody = + operations["PublicApiService_CreateSubOrganization"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateUserTagResponse = operations["PublicApiService_CreateUserTag"]["responses"]["200"]["schema"]["activity"]["result"]["createUserTagResult"] & definitions["v1ActivityResponse"]; +export type TCreateUserTagResponse = + operations["PublicApiService_CreateUserTag"]["responses"]["200"]["schema"]["activity"]["result"]["createUserTagResult"] & + definitions["v1ActivityResponse"]; export type TCreateUserTagInput = { body: TCreateUserTagBody }; -export type TCreateUserTagBody = operations["PublicApiService_CreateUserTag"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateUserTagBody = + operations["PublicApiService_CreateUserTag"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateUsersResponse = operations["PublicApiService_CreateUsers"]["responses"]["200"]["schema"]["activity"]["result"]["createUsersResult"] & definitions["v1ActivityResponse"]; +export type TCreateUsersResponse = + operations["PublicApiService_CreateUsers"]["responses"]["200"]["schema"]["activity"]["result"]["createUsersResult"] & + definitions["v1ActivityResponse"]; export type TCreateUsersInput = { body: TCreateUsersBody }; -export type TCreateUsersBody = operations["PublicApiService_CreateUsers"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateUsersBody = + operations["PublicApiService_CreateUsers"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateWalletResponse = operations["PublicApiService_CreateWallet"]["responses"]["200"]["schema"]["activity"]["result"]["createWalletResult"] & definitions["v1ActivityResponse"]; +export type TCreateWalletResponse = + operations["PublicApiService_CreateWallet"]["responses"]["200"]["schema"]["activity"]["result"]["createWalletResult"] & + definitions["v1ActivityResponse"]; export type TCreateWalletInput = { body: TCreateWalletBody }; -export type TCreateWalletBody = operations["PublicApiService_CreateWallet"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateWalletBody = + operations["PublicApiService_CreateWallet"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TCreateWalletAccountsResponse = operations["PublicApiService_CreateWalletAccounts"]["responses"]["200"]["schema"]["activity"]["result"]["createWalletAccountsResult"] & definitions["v1ActivityResponse"]; +export type TCreateWalletAccountsResponse = + operations["PublicApiService_CreateWalletAccounts"]["responses"]["200"]["schema"]["activity"]["result"]["createWalletAccountsResult"] & + definitions["v1ActivityResponse"]; export type TCreateWalletAccountsInput = { body: TCreateWalletAccountsBody }; -export type TCreateWalletAccountsBody = operations["PublicApiService_CreateWalletAccounts"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TCreateWalletAccountsBody = + operations["PublicApiService_CreateWalletAccounts"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeleteApiKeysResponse = operations["PublicApiService_DeleteApiKeys"]["responses"]["200"]["schema"]["activity"]["result"]["deleteApiKeysResult"] & definitions["v1ActivityResponse"]; +export type TDeleteApiKeysResponse = + operations["PublicApiService_DeleteApiKeys"]["responses"]["200"]["schema"]["activity"]["result"]["deleteApiKeysResult"] & + definitions["v1ActivityResponse"]; export type TDeleteApiKeysInput = { body: TDeleteApiKeysBody }; -export type TDeleteApiKeysBody = operations["PublicApiService_DeleteApiKeys"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeleteApiKeysBody = + operations["PublicApiService_DeleteApiKeys"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeleteAuthenticatorsResponse = operations["PublicApiService_DeleteAuthenticators"]["responses"]["200"]["schema"]["activity"]["result"]["deleteAuthenticatorsResult"] & definitions["v1ActivityResponse"]; +export type TDeleteAuthenticatorsResponse = + operations["PublicApiService_DeleteAuthenticators"]["responses"]["200"]["schema"]["activity"]["result"]["deleteAuthenticatorsResult"] & + definitions["v1ActivityResponse"]; export type TDeleteAuthenticatorsInput = { body: TDeleteAuthenticatorsBody }; -export type TDeleteAuthenticatorsBody = operations["PublicApiService_DeleteAuthenticators"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeleteAuthenticatorsBody = + operations["PublicApiService_DeleteAuthenticators"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeleteInvitationResponse = operations["PublicApiService_DeleteInvitation"]["responses"]["200"]["schema"]["activity"]["result"]["deleteInvitationResult"] & definitions["v1ActivityResponse"]; +export type TDeleteInvitationResponse = + operations["PublicApiService_DeleteInvitation"]["responses"]["200"]["schema"]["activity"]["result"]["deleteInvitationResult"] & + definitions["v1ActivityResponse"]; export type TDeleteInvitationInput = { body: TDeleteInvitationBody }; -export type TDeleteInvitationBody = operations["PublicApiService_DeleteInvitation"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeleteInvitationBody = + operations["PublicApiService_DeleteInvitation"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeleteOauthProvidersResponse = operations["PublicApiService_DeleteOauthProviders"]["responses"]["200"]["schema"]["activity"]["result"]["deleteOauthProvidersResult"] & definitions["v1ActivityResponse"]; +export type TDeleteOauthProvidersResponse = + operations["PublicApiService_DeleteOauthProviders"]["responses"]["200"]["schema"]["activity"]["result"]["deleteOauthProvidersResult"] & + definitions["v1ActivityResponse"]; export type TDeleteOauthProvidersInput = { body: TDeleteOauthProvidersBody }; -export type TDeleteOauthProvidersBody = operations["PublicApiService_DeleteOauthProviders"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeleteOauthProvidersBody = + operations["PublicApiService_DeleteOauthProviders"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeletePolicyResponse = operations["PublicApiService_DeletePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["deletePolicyResult"] & definitions["v1ActivityResponse"]; +export type TDeletePolicyResponse = + operations["PublicApiService_DeletePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["deletePolicyResult"] & + definitions["v1ActivityResponse"]; export type TDeletePolicyInput = { body: TDeletePolicyBody }; -export type TDeletePolicyBody = operations["PublicApiService_DeletePolicy"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeletePolicyBody = + operations["PublicApiService_DeletePolicy"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeletePrivateKeyTagsResponse = operations["PublicApiService_DeletePrivateKeyTags"]["responses"]["200"]["schema"]["activity"]["result"]["deletePrivateKeyTagsResult"] & definitions["v1ActivityResponse"]; +export type TDeletePrivateKeyTagsResponse = + operations["PublicApiService_DeletePrivateKeyTags"]["responses"]["200"]["schema"]["activity"]["result"]["deletePrivateKeyTagsResult"] & + definitions["v1ActivityResponse"]; export type TDeletePrivateKeyTagsInput = { body: TDeletePrivateKeyTagsBody }; -export type TDeletePrivateKeyTagsBody = operations["PublicApiService_DeletePrivateKeyTags"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeletePrivateKeyTagsBody = + operations["PublicApiService_DeletePrivateKeyTags"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeletePrivateKeysResponse = operations["PublicApiService_DeletePrivateKeys"]["responses"]["200"]["schema"]["activity"]["result"]["deletePrivateKeysResult"] & definitions["v1ActivityResponse"]; +export type TDeletePrivateKeysResponse = + operations["PublicApiService_DeletePrivateKeys"]["responses"]["200"]["schema"]["activity"]["result"]["deletePrivateKeysResult"] & + definitions["v1ActivityResponse"]; export type TDeletePrivateKeysInput = { body: TDeletePrivateKeysBody }; -export type TDeletePrivateKeysBody = operations["PublicApiService_DeletePrivateKeys"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeletePrivateKeysBody = + operations["PublicApiService_DeletePrivateKeys"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeleteSubOrganizationResponse = operations["PublicApiService_DeleteSubOrganization"]["responses"]["200"]["schema"]["activity"]["result"]["deleteSubOrganizationResult"] & definitions["v1ActivityResponse"]; +export type TDeleteSubOrganizationResponse = + operations["PublicApiService_DeleteSubOrganization"]["responses"]["200"]["schema"]["activity"]["result"]["deleteSubOrganizationResult"] & + definitions["v1ActivityResponse"]; export type TDeleteSubOrganizationInput = { body: TDeleteSubOrganizationBody }; -export type TDeleteSubOrganizationBody = operations["PublicApiService_DeleteSubOrganization"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeleteSubOrganizationBody = + operations["PublicApiService_DeleteSubOrganization"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeleteUserTagsResponse = operations["PublicApiService_DeleteUserTags"]["responses"]["200"]["schema"]["activity"]["result"]["deleteUserTagsResult"] & definitions["v1ActivityResponse"]; +export type TDeleteUserTagsResponse = + operations["PublicApiService_DeleteUserTags"]["responses"]["200"]["schema"]["activity"]["result"]["deleteUserTagsResult"] & + definitions["v1ActivityResponse"]; export type TDeleteUserTagsInput = { body: TDeleteUserTagsBody }; -export type TDeleteUserTagsBody = operations["PublicApiService_DeleteUserTags"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeleteUserTagsBody = + operations["PublicApiService_DeleteUserTags"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeleteUsersResponse = operations["PublicApiService_DeleteUsers"]["responses"]["200"]["schema"]["activity"]["result"]["deleteUsersResult"] & definitions["v1ActivityResponse"]; +export type TDeleteUsersResponse = + operations["PublicApiService_DeleteUsers"]["responses"]["200"]["schema"]["activity"]["result"]["deleteUsersResult"] & + definitions["v1ActivityResponse"]; export type TDeleteUsersInput = { body: TDeleteUsersBody }; -export type TDeleteUsersBody = operations["PublicApiService_DeleteUsers"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeleteUsersBody = + operations["PublicApiService_DeleteUsers"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TDeleteWalletsResponse = operations["PublicApiService_DeleteWallets"]["responses"]["200"]["schema"]["activity"]["result"]["deleteWalletsResult"] & definitions["v1ActivityResponse"]; +export type TDeleteWalletsResponse = + operations["PublicApiService_DeleteWallets"]["responses"]["200"]["schema"]["activity"]["result"]["deleteWalletsResult"] & + definitions["v1ActivityResponse"]; export type TDeleteWalletsInput = { body: TDeleteWalletsBody }; -export type TDeleteWalletsBody = operations["PublicApiService_DeleteWallets"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TDeleteWalletsBody = + operations["PublicApiService_DeleteWallets"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TEmailAuthResponse = operations["PublicApiService_EmailAuth"]["responses"]["200"]["schema"]["activity"]["result"]["emailAuthResult"] & definitions["v1ActivityResponse"]; +export type TEmailAuthResponse = + operations["PublicApiService_EmailAuth"]["responses"]["200"]["schema"]["activity"]["result"]["emailAuthResult"] & + definitions["v1ActivityResponse"]; export type TEmailAuthInput = { body: TEmailAuthBody }; -export type TEmailAuthBody = operations["PublicApiService_EmailAuth"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TEmailAuthBody = + operations["PublicApiService_EmailAuth"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TExportPrivateKeyResponse = operations["PublicApiService_ExportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["exportPrivateKeyResult"] & definitions["v1ActivityResponse"]; +export type TExportPrivateKeyResponse = + operations["PublicApiService_ExportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["exportPrivateKeyResult"] & + definitions["v1ActivityResponse"]; export type TExportPrivateKeyInput = { body: TExportPrivateKeyBody }; -export type TExportPrivateKeyBody = operations["PublicApiService_ExportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TExportPrivateKeyBody = + operations["PublicApiService_ExportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TExportWalletResponse = operations["PublicApiService_ExportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["exportWalletResult"] & definitions["v1ActivityResponse"]; +export type TExportWalletResponse = + operations["PublicApiService_ExportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["exportWalletResult"] & + definitions["v1ActivityResponse"]; export type TExportWalletInput = { body: TExportWalletBody }; -export type TExportWalletBody = operations["PublicApiService_ExportWallet"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TExportWalletBody = + operations["PublicApiService_ExportWallet"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TExportWalletAccountResponse = operations["PublicApiService_ExportWalletAccount"]["responses"]["200"]["schema"]["activity"]["result"]["exportWalletAccountResult"] & definitions["v1ActivityResponse"]; +export type TExportWalletAccountResponse = + operations["PublicApiService_ExportWalletAccount"]["responses"]["200"]["schema"]["activity"]["result"]["exportWalletAccountResult"] & + definitions["v1ActivityResponse"]; export type TExportWalletAccountInput = { body: TExportWalletAccountBody }; -export type TExportWalletAccountBody = operations["PublicApiService_ExportWalletAccount"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TExportWalletAccountBody = + operations["PublicApiService_ExportWalletAccount"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TImportPrivateKeyResponse = operations["PublicApiService_ImportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["importPrivateKeyResult"] & definitions["v1ActivityResponse"]; +export type TImportPrivateKeyResponse = + operations["PublicApiService_ImportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["importPrivateKeyResult"] & + definitions["v1ActivityResponse"]; export type TImportPrivateKeyInput = { body: TImportPrivateKeyBody }; -export type TImportPrivateKeyBody = operations["PublicApiService_ImportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TImportPrivateKeyBody = + operations["PublicApiService_ImportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TImportWalletResponse = operations["PublicApiService_ImportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["importWalletResult"] & definitions["v1ActivityResponse"]; +export type TImportWalletResponse = + operations["PublicApiService_ImportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["importWalletResult"] & + definitions["v1ActivityResponse"]; export type TImportWalletInput = { body: TImportWalletBody }; -export type TImportWalletBody = operations["PublicApiService_ImportWallet"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TImportWalletBody = + operations["PublicApiService_ImportWallet"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TInitImportPrivateKeyResponse = operations["PublicApiService_InitImportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["initImportPrivateKeyResult"] & definitions["v1ActivityResponse"]; +export type TInitImportPrivateKeyResponse = + operations["PublicApiService_InitImportPrivateKey"]["responses"]["200"]["schema"]["activity"]["result"]["initImportPrivateKeyResult"] & + definitions["v1ActivityResponse"]; export type TInitImportPrivateKeyInput = { body: TInitImportPrivateKeyBody }; -export type TInitImportPrivateKeyBody = operations["PublicApiService_InitImportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TInitImportPrivateKeyBody = + operations["PublicApiService_InitImportPrivateKey"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TInitImportWalletResponse = operations["PublicApiService_InitImportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["initImportWalletResult"] & definitions["v1ActivityResponse"]; +export type TInitImportWalletResponse = + operations["PublicApiService_InitImportWallet"]["responses"]["200"]["schema"]["activity"]["result"]["initImportWalletResult"] & + definitions["v1ActivityResponse"]; export type TInitImportWalletInput = { body: TInitImportWalletBody }; -export type TInitImportWalletBody = operations["PublicApiService_InitImportWallet"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TInitImportWalletBody = + operations["PublicApiService_InitImportWallet"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TInitOtpAuthResponse = operations["PublicApiService_InitOtpAuth"]["responses"]["200"]["schema"]["activity"]["result"]["initOtpAuthResult"] & definitions["v1ActivityResponse"]; +export type TInitOtpAuthResponse = + operations["PublicApiService_InitOtpAuth"]["responses"]["200"]["schema"]["activity"]["result"]["initOtpAuthResult"] & + definitions["v1ActivityResponse"]; export type TInitOtpAuthInput = { body: TInitOtpAuthBody }; -export type TInitOtpAuthBody = operations["PublicApiService_InitOtpAuth"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TInitOtpAuthBody = + operations["PublicApiService_InitOtpAuth"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TInitUserEmailRecoveryResponse = operations["PublicApiService_InitUserEmailRecovery"]["responses"]["200"]["schema"]["activity"]["result"]["initUserEmailRecoveryResult"] & definitions["v1ActivityResponse"]; +export type TInitUserEmailRecoveryResponse = + operations["PublicApiService_InitUserEmailRecovery"]["responses"]["200"]["schema"]["activity"]["result"]["initUserEmailRecoveryResult"] & + definitions["v1ActivityResponse"]; export type TInitUserEmailRecoveryInput = { body: TInitUserEmailRecoveryBody }; -export type TInitUserEmailRecoveryBody = operations["PublicApiService_InitUserEmailRecovery"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TInitUserEmailRecoveryBody = + operations["PublicApiService_InitUserEmailRecovery"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TOauthResponse = operations["PublicApiService_Oauth"]["responses"]["200"]["schema"]["activity"]["result"]["oauthResult"] & definitions["v1ActivityResponse"]; +export type TOauthResponse = + operations["PublicApiService_Oauth"]["responses"]["200"]["schema"]["activity"]["result"]["oauthResult"] & + definitions["v1ActivityResponse"]; export type TOauthInput = { body: TOauthBody }; -export type TOauthBody = operations["PublicApiService_Oauth"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TOauthBody = + operations["PublicApiService_Oauth"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TOtpAuthResponse = operations["PublicApiService_OtpAuth"]["responses"]["200"]["schema"]["activity"]["result"]["otpAuthResult"] & definitions["v1ActivityResponse"]; +export type TOtpAuthResponse = + operations["PublicApiService_OtpAuth"]["responses"]["200"]["schema"]["activity"]["result"]["otpAuthResult"] & + definitions["v1ActivityResponse"]; export type TOtpAuthInput = { body: TOtpAuthBody }; -export type TOtpAuthBody = operations["PublicApiService_OtpAuth"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TOtpAuthBody = + operations["PublicApiService_OtpAuth"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TRecoverUserResponse = operations["PublicApiService_RecoverUser"]["responses"]["200"]["schema"]["activity"]["result"]["recoverUserResult"] & definitions["v1ActivityResponse"]; +export type TRecoverUserResponse = + operations["PublicApiService_RecoverUser"]["responses"]["200"]["schema"]["activity"]["result"]["recoverUserResult"] & + definitions["v1ActivityResponse"]; export type TRecoverUserInput = { body: TRecoverUserBody }; -export type TRecoverUserBody = operations["PublicApiService_RecoverUser"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TRecoverUserBody = + operations["PublicApiService_RecoverUser"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TRejectActivityResponse = operations["PublicApiService_RejectActivity"]["responses"]["200"]["schema"]["activity"]["result"] & definitions["v1ActivityResponse"]; +export type TRejectActivityResponse = + operations["PublicApiService_RejectActivity"]["responses"]["200"]["schema"]["activity"]["result"] & + definitions["v1ActivityResponse"]; export type TRejectActivityInput = { body: TRejectActivityBody }; -export type TRejectActivityBody = operations["PublicApiService_RejectActivity"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TRejectActivityBody = + operations["PublicApiService_RejectActivity"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TRemoveOrganizationFeatureResponse = operations["PublicApiService_RemoveOrganizationFeature"]["responses"]["200"]["schema"]["activity"]["result"]["removeOrganizationFeatureResult"] & definitions["v1ActivityResponse"]; +export type TRemoveOrganizationFeatureResponse = + operations["PublicApiService_RemoveOrganizationFeature"]["responses"]["200"]["schema"]["activity"]["result"]["removeOrganizationFeatureResult"] & + definitions["v1ActivityResponse"]; -export type TRemoveOrganizationFeatureInput = { body: TRemoveOrganizationFeatureBody }; +export type TRemoveOrganizationFeatureInput = { + body: TRemoveOrganizationFeatureBody; +}; -export type TRemoveOrganizationFeatureBody = operations["PublicApiService_RemoveOrganizationFeature"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TRemoveOrganizationFeatureBody = + operations["PublicApiService_RemoveOrganizationFeature"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TSetOrganizationFeatureResponse = operations["PublicApiService_SetOrganizationFeature"]["responses"]["200"]["schema"]["activity"]["result"]["setOrganizationFeatureResult"] & definitions["v1ActivityResponse"]; +export type TSetOrganizationFeatureResponse = + operations["PublicApiService_SetOrganizationFeature"]["responses"]["200"]["schema"]["activity"]["result"]["setOrganizationFeatureResult"] & + definitions["v1ActivityResponse"]; -export type TSetOrganizationFeatureInput = { body: TSetOrganizationFeatureBody }; +export type TSetOrganizationFeatureInput = { + body: TSetOrganizationFeatureBody; +}; -export type TSetOrganizationFeatureBody = operations["PublicApiService_SetOrganizationFeature"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TSetOrganizationFeatureBody = + operations["PublicApiService_SetOrganizationFeature"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TSignRawPayloadResponse = operations["PublicApiService_SignRawPayload"]["responses"]["200"]["schema"]["activity"]["result"]["signRawPayloadResult"] & definitions["v1ActivityResponse"]; +export type TSignRawPayloadResponse = + operations["PublicApiService_SignRawPayload"]["responses"]["200"]["schema"]["activity"]["result"]["signRawPayloadResult"] & + definitions["v1ActivityResponse"]; export type TSignRawPayloadInput = { body: TSignRawPayloadBody }; -export type TSignRawPayloadBody = operations["PublicApiService_SignRawPayload"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TSignRawPayloadBody = + operations["PublicApiService_SignRawPayload"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TSignRawPayloadsResponse = operations["PublicApiService_SignRawPayloads"]["responses"]["200"]["schema"]["activity"]["result"]["signRawPayloadsResult"] & definitions["v1ActivityResponse"]; +export type TSignRawPayloadsResponse = + operations["PublicApiService_SignRawPayloads"]["responses"]["200"]["schema"]["activity"]["result"]["signRawPayloadsResult"] & + definitions["v1ActivityResponse"]; export type TSignRawPayloadsInput = { body: TSignRawPayloadsBody }; -export type TSignRawPayloadsBody = operations["PublicApiService_SignRawPayloads"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TSignRawPayloadsBody = + operations["PublicApiService_SignRawPayloads"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TSignTransactionResponse = operations["PublicApiService_SignTransaction"]["responses"]["200"]["schema"]["activity"]["result"]["signTransactionResult"] & definitions["v1ActivityResponse"]; +export type TSignTransactionResponse = + operations["PublicApiService_SignTransaction"]["responses"]["200"]["schema"]["activity"]["result"]["signTransactionResult"] & + definitions["v1ActivityResponse"]; export type TSignTransactionInput = { body: TSignTransactionBody }; -export type TSignTransactionBody = operations["PublicApiService_SignTransaction"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TSignTransactionBody = + operations["PublicApiService_SignTransaction"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TUpdatePolicyResponse = operations["PublicApiService_UpdatePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["updatePolicyResult"] & definitions["v1ActivityResponse"]; +export type TUpdatePolicyResponse = + operations["PublicApiService_UpdatePolicy"]["responses"]["200"]["schema"]["activity"]["result"]["updatePolicyResult"] & + definitions["v1ActivityResponse"]; export type TUpdatePolicyInput = { body: TUpdatePolicyBody }; -export type TUpdatePolicyBody = operations["PublicApiService_UpdatePolicy"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TUpdatePolicyBody = + operations["PublicApiService_UpdatePolicy"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TUpdatePrivateKeyTagResponse = operations["PublicApiService_UpdatePrivateKeyTag"]["responses"]["200"]["schema"]["activity"]["result"]["updatePrivateKeyTagResult"] & definitions["v1ActivityResponse"]; +export type TUpdatePrivateKeyTagResponse = + operations["PublicApiService_UpdatePrivateKeyTag"]["responses"]["200"]["schema"]["activity"]["result"]["updatePrivateKeyTagResult"] & + definitions["v1ActivityResponse"]; export type TUpdatePrivateKeyTagInput = { body: TUpdatePrivateKeyTagBody }; -export type TUpdatePrivateKeyTagBody = operations["PublicApiService_UpdatePrivateKeyTag"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TUpdatePrivateKeyTagBody = + operations["PublicApiService_UpdatePrivateKeyTag"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TUpdateRootQuorumResponse = operations["PublicApiService_UpdateRootQuorum"]["responses"]["200"]["schema"]["activity"]["result"]["updateRootQuorumResult"] & definitions["v1ActivityResponse"]; +export type TUpdateRootQuorumResponse = + operations["PublicApiService_UpdateRootQuorum"]["responses"]["200"]["schema"]["activity"]["result"]["updateRootQuorumResult"] & + definitions["v1ActivityResponse"]; export type TUpdateRootQuorumInput = { body: TUpdateRootQuorumBody }; -export type TUpdateRootQuorumBody = operations["PublicApiService_UpdateRootQuorum"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TUpdateRootQuorumBody = + operations["PublicApiService_UpdateRootQuorum"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TUpdateUserResponse = operations["PublicApiService_UpdateUser"]["responses"]["200"]["schema"]["activity"]["result"]["updateUserResult"] & definitions["v1ActivityResponse"]; +export type TUpdateUserResponse = + operations["PublicApiService_UpdateUser"]["responses"]["200"]["schema"]["activity"]["result"]["updateUserResult"] & + definitions["v1ActivityResponse"]; export type TUpdateUserInput = { body: TUpdateUserBody }; -export type TUpdateUserBody = operations["PublicApiService_UpdateUser"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TUpdateUserBody = + operations["PublicApiService_UpdateUser"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TUpdateUserTagResponse = operations["PublicApiService_UpdateUserTag"]["responses"]["200"]["schema"]["activity"]["result"]["updateUserTagResult"] & definitions["v1ActivityResponse"]; +export type TUpdateUserTagResponse = + operations["PublicApiService_UpdateUserTag"]["responses"]["200"]["schema"]["activity"]["result"]["updateUserTagResult"] & + definitions["v1ActivityResponse"]; export type TUpdateUserTagInput = { body: TUpdateUserTagBody }; -export type TUpdateUserTagBody = operations["PublicApiService_UpdateUserTag"]["parameters"]["body"]["body"]["parameters"] & commandOverrideParams; +export type TUpdateUserTagBody = + operations["PublicApiService_UpdateUserTag"]["parameters"]["body"]["body"]["parameters"] & + commandOverrideParams; -export type TNOOPCodegenAnchorResponse = operations["PublicApiService_NOOPCodegenAnchor"]["responses"]["200"]["schema"]; \ No newline at end of file +export type TNOOPCodegenAnchorResponse = + operations["PublicApiService_NOOPCodegenAnchor"]["responses"]["200"]["schema"]; diff --git a/packages/sdk-server/scripts/codegen.js b/packages/sdk-server/scripts/codegen.js index 2f0c2261..0de10500 100644 --- a/packages/sdk-server/scripts/codegen.js +++ b/packages/sdk-server/scripts/codegen.js @@ -245,7 +245,7 @@ const generateSDKClientFromSwagger = async (swaggerSpec, targetPath) => { const imports = []; imports.push( - 'import { TERMINAL_ACTIVITY_STATUSES, TActivityResponse, TActivityStatus } from "@turnkey/http";' + 'import { TERMINAL_ACTIVITY_STATUSES, TActivityResponse, TActivityStatus, TSignedRequest } from "@turnkey/http";' ); imports.push( @@ -440,6 +440,22 @@ export class TurnkeySDKClientBase { }` ); } + // generate a stamping method for each method + codeBuffer.push( + `\n\tstamp${operationNameWithoutNamespace} = async (input: SdkApiTypes.${inputType}): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "${endpointPath}"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }` + ); } // End of the TurnkeySDKClient Class Definition diff --git a/packages/sdk-server/src/__generated__/sdk-client-base.ts b/packages/sdk-server/src/__generated__/sdk-client-base.ts index 0a26dff7..45d532b5 100644 --- a/packages/sdk-server/src/__generated__/sdk-client-base.ts +++ b/packages/sdk-server/src/__generated__/sdk-client-base.ts @@ -4,6 +4,7 @@ import { TERMINAL_ACTIVITY_STATUSES, TActivityResponse, TActivityStatus, + TSignedRequest, } from "@turnkey/http"; import type { definitions } from "../__inputs__/public_api.types"; @@ -143,6 +144,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetActivity = async ( + input: SdkApiTypes.TGetActivityBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_activity"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getApiKey = async ( input: SdkApiTypes.TGetApiKeyBody ): Promise => { @@ -152,6 +169,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetApiKey = async ( + input: SdkApiTypes.TGetApiKeyBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getApiKeys = async ( input: SdkApiTypes.TGetApiKeysBody = {} ): Promise => { @@ -161,6 +194,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetApiKeys = async ( + input: SdkApiTypes.TGetApiKeysBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getAttestationDocument = async ( input: SdkApiTypes.TGetAttestationDocumentBody ): Promise => { @@ -170,6 +219,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetAttestationDocument = async ( + input: SdkApiTypes.TGetAttestationDocumentBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_attestation"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getAuthenticator = async ( input: SdkApiTypes.TGetAuthenticatorBody ): Promise => { @@ -179,6 +244,23 @@ export class TurnkeySDKClientBase { }); }; + stampGetAuthenticator = async ( + input: SdkApiTypes.TGetAuthenticatorBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_authenticator"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getAuthenticators = async ( input: SdkApiTypes.TGetAuthenticatorsBody ): Promise => { @@ -188,6 +270,23 @@ export class TurnkeySDKClientBase { }); }; + stampGetAuthenticators = async ( + input: SdkApiTypes.TGetAuthenticatorsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_authenticators"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getOauthProviders = async ( input: SdkApiTypes.TGetOauthProvidersBody ): Promise => { @@ -197,6 +296,23 @@ export class TurnkeySDKClientBase { }); }; + stampGetOauthProviders = async ( + input: SdkApiTypes.TGetOauthProvidersBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_oauth_providers"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getOrganization = async ( input: SdkApiTypes.TGetOrganizationBody = {} ): Promise => { @@ -206,6 +322,23 @@ export class TurnkeySDKClientBase { }); }; + stampGetOrganization = async ( + input: SdkApiTypes.TGetOrganizationBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_organization"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getOrganizationConfigs = async ( input: SdkApiTypes.TGetOrganizationConfigsBody ): Promise => { @@ -215,6 +348,23 @@ export class TurnkeySDKClientBase { }); }; + stampGetOrganizationConfigs = async ( + input: SdkApiTypes.TGetOrganizationConfigsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/get_organization_configs"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getPolicy = async ( input: SdkApiTypes.TGetPolicyBody ): Promise => { @@ -224,6 +374,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetPolicy = async ( + input: SdkApiTypes.TGetPolicyBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_policy"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getPrivateKey = async ( input: SdkApiTypes.TGetPrivateKeyBody ): Promise => { @@ -233,6 +399,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetPrivateKey = async ( + input: SdkApiTypes.TGetPrivateKeyBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_private_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getUser = async ( input: SdkApiTypes.TGetUserBody ): Promise => { @@ -242,6 +424,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetUser = async ( + input: SdkApiTypes.TGetUserBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_user"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getWallet = async ( input: SdkApiTypes.TGetWalletBody ): Promise => { @@ -251,6 +449,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetWallet = async ( + input: SdkApiTypes.TGetWalletBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getActivities = async ( input: SdkApiTypes.TGetActivitiesBody = {} ): Promise => { @@ -260,6 +474,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetActivities = async ( + input: SdkApiTypes.TGetActivitiesBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_activities"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getPolicies = async ( input: SdkApiTypes.TGetPoliciesBody = {} ): Promise => { @@ -269,6 +499,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetPolicies = async ( + input: SdkApiTypes.TGetPoliciesBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_policies"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + listPrivateKeyTags = async ( input: SdkApiTypes.TListPrivateKeyTagsBody ): Promise => { @@ -278,6 +524,23 @@ export class TurnkeySDKClientBase { }); }; + stampListPrivateKeyTags = async ( + input: SdkApiTypes.TListPrivateKeyTagsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/list_private_key_tags"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getPrivateKeys = async ( input: SdkApiTypes.TGetPrivateKeysBody = {} ): Promise => { @@ -287,6 +550,23 @@ export class TurnkeySDKClientBase { }); }; + stampGetPrivateKeys = async ( + input: SdkApiTypes.TGetPrivateKeysBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/list_private_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getSubOrgIds = async ( input: SdkApiTypes.TGetSubOrgIdsBody = {} ): Promise => { @@ -296,6 +576,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetSubOrgIds = async ( + input: SdkApiTypes.TGetSubOrgIdsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_suborgs"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + listUserTags = async ( input: SdkApiTypes.TListUserTagsBody = {} ): Promise => { @@ -305,6 +601,22 @@ export class TurnkeySDKClientBase { }); }; + stampListUserTags = async ( + input: SdkApiTypes.TListUserTagsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_user_tags"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getUsers = async ( input: SdkApiTypes.TGetUsersBody = {} ): Promise => { @@ -314,6 +626,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetUsers = async ( + input: SdkApiTypes.TGetUsersBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_users"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getWalletAccounts = async ( input: SdkApiTypes.TGetWalletAccountsBody ): Promise => { @@ -323,6 +651,23 @@ export class TurnkeySDKClientBase { }); }; + stampGetWalletAccounts = async ( + input: SdkApiTypes.TGetWalletAccountsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/query/list_wallet_accounts"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getWallets = async ( input: SdkApiTypes.TGetWalletsBody = {} ): Promise => { @@ -332,6 +677,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetWallets = async ( + input: SdkApiTypes.TGetWalletsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallets"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + getWhoami = async ( input: SdkApiTypes.TGetWhoamiBody = {} ): Promise => { @@ -341,6 +702,22 @@ export class TurnkeySDKClientBase { }); }; + stampGetWhoami = async ( + input: SdkApiTypes.TGetWhoamiBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/query/whoami"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + approveActivity = async ( input: SdkApiTypes.TApproveActivityBody ): Promise => { @@ -353,6 +730,23 @@ export class TurnkeySDKClientBase { }); }; + stampApproveActivity = async ( + input: SdkApiTypes.TApproveActivityBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/approve_activity"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createApiKeys = async ( input: SdkApiTypes.TCreateApiKeysBody ): Promise => { @@ -369,6 +763,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateApiKeys = async ( + input: SdkApiTypes.TCreateApiKeysBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_api_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createApiOnlyUsers = async ( input: SdkApiTypes.TCreateApiOnlyUsersBody ): Promise => { @@ -385,6 +796,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateApiOnlyUsers = async ( + input: SdkApiTypes.TCreateApiOnlyUsersBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createAuthenticators = async ( input: SdkApiTypes.TCreateAuthenticatorsBody ): Promise => { @@ -401,6 +829,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateAuthenticators = async ( + input: SdkApiTypes.TCreateAuthenticatorsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_authenticators"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createInvitations = async ( input: SdkApiTypes.TCreateInvitationsBody ): Promise => { @@ -417,6 +862,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateInvitations = async ( + input: SdkApiTypes.TCreateInvitationsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_invitations"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createOauthProviders = async ( input: SdkApiTypes.TCreateOauthProvidersBody ): Promise => { @@ -433,6 +895,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateOauthProviders = async ( + input: SdkApiTypes.TCreateOauthProvidersBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_oauth_providers"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createPolicies = async ( input: SdkApiTypes.TCreatePoliciesBody ): Promise => { @@ -449,6 +928,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreatePolicies = async ( + input: SdkApiTypes.TCreatePoliciesBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_policies"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createPolicy = async ( input: SdkApiTypes.TCreatePolicyBody ): Promise => { @@ -465,6 +961,22 @@ export class TurnkeySDKClientBase { ); }; + stampCreatePolicy = async ( + input: SdkApiTypes.TCreatePolicyBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policy"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createPrivateKeyTag = async ( input: SdkApiTypes.TCreatePrivateKeyTagBody ): Promise => { @@ -481,6 +993,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreatePrivateKeyTag = async ( + input: SdkApiTypes.TCreatePrivateKeyTagBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_private_key_tag"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createPrivateKeys = async ( input: SdkApiTypes.TCreatePrivateKeysBody ): Promise => { @@ -497,6 +1026,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreatePrivateKeys = async ( + input: SdkApiTypes.TCreatePrivateKeysBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_private_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createReadOnlySession = async ( input: SdkApiTypes.TCreateReadOnlySessionBody ): Promise => { @@ -513,6 +1059,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateReadOnlySession = async ( + input: SdkApiTypes.TCreateReadOnlySessionBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_read_only_session"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createReadWriteSession = async ( input: SdkApiTypes.TCreateReadWriteSessionBody ): Promise => { @@ -529,6 +1092,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateReadWriteSession = async ( + input: SdkApiTypes.TCreateReadWriteSessionBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_read_write_session"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createSubOrganization = async ( input: SdkApiTypes.TCreateSubOrganizationBody ): Promise => { @@ -545,6 +1125,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateSubOrganization = async ( + input: SdkApiTypes.TCreateSubOrganizationBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_sub_organization"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createUserTag = async ( input: SdkApiTypes.TCreateUserTagBody ): Promise => { @@ -561,6 +1158,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateUserTag = async ( + input: SdkApiTypes.TCreateUserTagBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_user_tag"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createUsers = async ( input: SdkApiTypes.TCreateUsersBody ): Promise => { @@ -577,6 +1191,22 @@ export class TurnkeySDKClientBase { ); }; + stampCreateUsers = async ( + input: SdkApiTypes.TCreateUsersBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_users"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createWallet = async ( input: SdkApiTypes.TCreateWalletBody ): Promise => { @@ -593,6 +1223,22 @@ export class TurnkeySDKClientBase { ); }; + stampCreateWallet = async ( + input: SdkApiTypes.TCreateWalletBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + createWalletAccounts = async ( input: SdkApiTypes.TCreateWalletAccountsBody ): Promise => { @@ -609,6 +1255,23 @@ export class TurnkeySDKClientBase { ); }; + stampCreateWalletAccounts = async ( + input: SdkApiTypes.TCreateWalletAccountsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deleteApiKeys = async ( input: SdkApiTypes.TDeleteApiKeysBody ): Promise => { @@ -625,6 +1288,23 @@ export class TurnkeySDKClientBase { ); }; + stampDeleteApiKeys = async ( + input: SdkApiTypes.TDeleteApiKeysBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deleteAuthenticators = async ( input: SdkApiTypes.TDeleteAuthenticatorsBody ): Promise => { @@ -641,6 +1321,23 @@ export class TurnkeySDKClientBase { ); }; + stampDeleteAuthenticators = async ( + input: SdkApiTypes.TDeleteAuthenticatorsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_authenticators"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deleteInvitation = async ( input: SdkApiTypes.TDeleteInvitationBody ): Promise => { @@ -657,6 +1354,23 @@ export class TurnkeySDKClientBase { ); }; + stampDeleteInvitation = async ( + input: SdkApiTypes.TDeleteInvitationBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_invitation"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deleteOauthProviders = async ( input: SdkApiTypes.TDeleteOauthProvidersBody ): Promise => { @@ -673,6 +1387,23 @@ export class TurnkeySDKClientBase { ); }; + stampDeleteOauthProviders = async ( + input: SdkApiTypes.TDeleteOauthProvidersBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_oauth_providers"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deletePolicy = async ( input: SdkApiTypes.TDeletePolicyBody ): Promise => { @@ -689,6 +1420,22 @@ export class TurnkeySDKClientBase { ); }; + stampDeletePolicy = async ( + input: SdkApiTypes.TDeletePolicyBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_policy"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deletePrivateKeyTags = async ( input: SdkApiTypes.TDeletePrivateKeyTagsBody ): Promise => { @@ -705,6 +1452,23 @@ export class TurnkeySDKClientBase { ); }; + stampDeletePrivateKeyTags = async ( + input: SdkApiTypes.TDeletePrivateKeyTagsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_private_key_tags"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deletePrivateKeys = async ( input: SdkApiTypes.TDeletePrivateKeysBody ): Promise => { @@ -721,6 +1485,23 @@ export class TurnkeySDKClientBase { ); }; + stampDeletePrivateKeys = async ( + input: SdkApiTypes.TDeletePrivateKeysBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_private_keys"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deleteSubOrganization = async ( input: SdkApiTypes.TDeleteSubOrganizationBody ): Promise => { @@ -737,6 +1518,23 @@ export class TurnkeySDKClientBase { ); }; + stampDeleteSubOrganization = async ( + input: SdkApiTypes.TDeleteSubOrganizationBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_sub_organization"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deleteUserTags = async ( input: SdkApiTypes.TDeleteUserTagsBody ): Promise => { @@ -753,6 +1551,23 @@ export class TurnkeySDKClientBase { ); }; + stampDeleteUserTags = async ( + input: SdkApiTypes.TDeleteUserTagsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/delete_user_tags"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deleteUsers = async ( input: SdkApiTypes.TDeleteUsersBody ): Promise => { @@ -769,6 +1584,22 @@ export class TurnkeySDKClientBase { ); }; + stampDeleteUsers = async ( + input: SdkApiTypes.TDeleteUsersBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_users"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + deleteWallets = async ( input: SdkApiTypes.TDeleteWalletsBody ): Promise => { @@ -785,6 +1616,22 @@ export class TurnkeySDKClientBase { ); }; + stampDeleteWallets = async ( + input: SdkApiTypes.TDeleteWalletsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallets"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + emailAuth = async ( input: SdkApiTypes.TEmailAuthBody ): Promise => { @@ -801,6 +1648,22 @@ export class TurnkeySDKClientBase { ); }; + stampEmailAuth = async ( + input: SdkApiTypes.TEmailAuthBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/email_auth"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + exportPrivateKey = async ( input: SdkApiTypes.TExportPrivateKeyBody ): Promise => { @@ -817,6 +1680,23 @@ export class TurnkeySDKClientBase { ); }; + stampExportPrivateKey = async ( + input: SdkApiTypes.TExportPrivateKeyBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/export_private_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + exportWallet = async ( input: SdkApiTypes.TExportWalletBody ): Promise => { @@ -833,6 +1713,22 @@ export class TurnkeySDKClientBase { ); }; + stampExportWallet = async ( + input: SdkApiTypes.TExportWalletBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/export_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + exportWalletAccount = async ( input: SdkApiTypes.TExportWalletAccountBody ): Promise => { @@ -849,6 +1745,23 @@ export class TurnkeySDKClientBase { ); }; + stampExportWalletAccount = async ( + input: SdkApiTypes.TExportWalletAccountBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/export_wallet_account"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + importPrivateKey = async ( input: SdkApiTypes.TImportPrivateKeyBody ): Promise => { @@ -865,6 +1778,23 @@ export class TurnkeySDKClientBase { ); }; + stampImportPrivateKey = async ( + input: SdkApiTypes.TImportPrivateKeyBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/import_private_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + importWallet = async ( input: SdkApiTypes.TImportWalletBody ): Promise => { @@ -881,6 +1811,22 @@ export class TurnkeySDKClientBase { ); }; + stampImportWallet = async ( + input: SdkApiTypes.TImportWalletBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/import_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + initImportPrivateKey = async ( input: SdkApiTypes.TInitImportPrivateKeyBody ): Promise => { @@ -897,6 +1843,23 @@ export class TurnkeySDKClientBase { ); }; + stampInitImportPrivateKey = async ( + input: SdkApiTypes.TInitImportPrivateKeyBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/init_import_private_key"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + initImportWallet = async ( input: SdkApiTypes.TInitImportWalletBody ): Promise => { @@ -913,6 +1876,23 @@ export class TurnkeySDKClientBase { ); }; + stampInitImportWallet = async ( + input: SdkApiTypes.TInitImportWalletBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/init_import_wallet"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + initOtpAuth = async ( input: SdkApiTypes.TInitOtpAuthBody ): Promise => { @@ -929,6 +1909,22 @@ export class TurnkeySDKClientBase { ); }; + stampInitOtpAuth = async ( + input: SdkApiTypes.TInitOtpAuthBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/init_otp_auth"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + initUserEmailRecovery = async ( input: SdkApiTypes.TInitUserEmailRecoveryBody ): Promise => { @@ -945,6 +1941,23 @@ export class TurnkeySDKClientBase { ); }; + stampInitUserEmailRecovery = async ( + input: SdkApiTypes.TInitUserEmailRecoveryBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/init_user_email_recovery"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + oauth = async ( input: SdkApiTypes.TOauthBody ): Promise => { @@ -961,6 +1974,22 @@ export class TurnkeySDKClientBase { ); }; + stampOauth = async ( + input: SdkApiTypes.TOauthBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/oauth"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + otpAuth = async ( input: SdkApiTypes.TOtpAuthBody ): Promise => { @@ -977,6 +2006,22 @@ export class TurnkeySDKClientBase { ); }; + stampOtpAuth = async ( + input: SdkApiTypes.TOtpAuthBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/otp_auth"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + recoverUser = async ( input: SdkApiTypes.TRecoverUserBody ): Promise => { @@ -993,6 +2038,22 @@ export class TurnkeySDKClientBase { ); }; + stampRecoverUser = async ( + input: SdkApiTypes.TRecoverUserBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/recover_user"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + rejectActivity = async ( input: SdkApiTypes.TRejectActivityBody ): Promise => { @@ -1005,6 +2066,23 @@ export class TurnkeySDKClientBase { }); }; + stampRejectActivity = async ( + input: SdkApiTypes.TRejectActivityBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/reject_activity"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + removeOrganizationFeature = async ( input: SdkApiTypes.TRemoveOrganizationFeatureBody ): Promise => { @@ -1021,6 +2099,23 @@ export class TurnkeySDKClientBase { ); }; + stampRemoveOrganizationFeature = async ( + input: SdkApiTypes.TRemoveOrganizationFeatureBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/remove_organization_feature"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + setOrganizationFeature = async ( input: SdkApiTypes.TSetOrganizationFeatureBody ): Promise => { @@ -1037,6 +2132,23 @@ export class TurnkeySDKClientBase { ); }; + stampSetOrganizationFeature = async ( + input: SdkApiTypes.TSetOrganizationFeatureBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/set_organization_feature"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + signRawPayload = async ( input: SdkApiTypes.TSignRawPayloadBody ): Promise => { @@ -1053,6 +2165,23 @@ export class TurnkeySDKClientBase { ); }; + stampSignRawPayload = async ( + input: SdkApiTypes.TSignRawPayloadBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payload"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + signRawPayloads = async ( input: SdkApiTypes.TSignRawPayloadsBody ): Promise => { @@ -1069,6 +2198,23 @@ export class TurnkeySDKClientBase { ); }; + stampSignRawPayloads = async ( + input: SdkApiTypes.TSignRawPayloadsBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/sign_raw_payloads"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + signTransaction = async ( input: SdkApiTypes.TSignTransactionBody ): Promise => { @@ -1085,6 +2231,23 @@ export class TurnkeySDKClientBase { ); }; + stampSignTransaction = async ( + input: SdkApiTypes.TSignTransactionBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/sign_transaction"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + updatePolicy = async ( input: SdkApiTypes.TUpdatePolicyBody ): Promise => { @@ -1101,6 +2264,22 @@ export class TurnkeySDKClientBase { ); }; + stampUpdatePolicy = async ( + input: SdkApiTypes.TUpdatePolicyBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_policy"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + updatePrivateKeyTag = async ( input: SdkApiTypes.TUpdatePrivateKeyTagBody ): Promise => { @@ -1117,6 +2296,23 @@ export class TurnkeySDKClientBase { ); }; + stampUpdatePrivateKeyTag = async ( + input: SdkApiTypes.TUpdatePrivateKeyTagBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/update_private_key_tag"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + updateRootQuorum = async ( input: SdkApiTypes.TUpdateRootQuorumBody ): Promise => { @@ -1133,6 +2329,23 @@ export class TurnkeySDKClientBase { ); }; + stampUpdateRootQuorum = async ( + input: SdkApiTypes.TUpdateRootQuorumBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/update_root_quorum"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + updateUser = async ( input: SdkApiTypes.TUpdateUserBody ): Promise => { @@ -1149,6 +2362,22 @@ export class TurnkeySDKClientBase { ); }; + stampUpdateUser = async ( + input: SdkApiTypes.TUpdateUserBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/update_user"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; + updateUserTag = async ( input: SdkApiTypes.TUpdateUserTagBody ): Promise => { @@ -1164,4 +2393,21 @@ export class TurnkeySDKClientBase { "updateUserTagResult" ); }; + + stampUpdateUserTag = async ( + input: SdkApiTypes.TUpdateUserTagBody + ): Promise => { + if (!this.config.stamper) { + return undefined; + } + const fullUrl = + this.config.apiBaseUrl + "/public/v1/submit/update_user_tag"; + const body = JSON.stringify(input); + const stamp = await this.config.stamper.stamp(body); + return { + body: body, + stamp: stamp, + url: fullUrl, + }; + }; } From 3dd74ac3c279c4061eba1e6ac7566197f0f9a186 Mon Sep 17 00:00:00 2001 From: Omkar Shanbhag Date: Thu, 31 Oct 2024 12:08:57 -0700 Subject: [PATCH 3/3] add changeset --- .changeset/chilled-vans-melt.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/chilled-vans-melt.md diff --git a/.changeset/chilled-vans-melt.md b/.changeset/chilled-vans-melt.md new file mode 100644 index 00000000..ac7807ec --- /dev/null +++ b/.changeset/chilled-vans-melt.md @@ -0,0 +1,6 @@ +--- +"@turnkey/sdk-browser": minor +"@turnkey/sdk-server": minor +--- + +Added functionality for constructing and returning stamped requests for all packages