UNPKG

@turnkey/sdk-server

Version:

JavaScript Server SDK

1,216 lines (1,215 loc) 84.7 kB
import { TERMINAL_ACTIVITY_STATUSES } from '@turnkey/http'; import { TurnkeyRequestError } from '../__types__/base.mjs'; import { VERSION } from './version.mjs'; /* @generated by codegen. DO NOT EDIT BY HAND */ class TurnkeySDKClientBase { constructor(config) { this.getActivity = async (input) => { return this.request("/public/v1/query/get_activity", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetActivity = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_activity"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getApiKey = async (input) => { return this.request("/public/v1/query/get_api_key", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetApiKey = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_key"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getApiKeys = async (input = {}) => { return this.request("/public/v1/query/get_api_keys", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetApiKeys = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_api_keys"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getAttestationDocument = async (input) => { return this.request("/public/v1/query/get_attestation", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetAttestationDocument = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_attestation"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getAuthenticator = async (input) => { return this.request("/public/v1/query/get_authenticator", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetAuthenticator = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticator"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getAuthenticators = async (input) => { return this.request("/public/v1/query/get_authenticators", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetAuthenticators = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_authenticators"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getOauthProviders = async (input) => { return this.request("/public/v1/query/get_oauth_providers", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetOauthProviders = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_oauth_providers"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getOrganization = async (input = {}) => { return this.request("/public/v1/query/get_organization", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetOrganization = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getOrganizationConfigs = async (input) => { return this.request("/public/v1/query/get_organization_configs", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetOrganizationConfigs = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_organization_configs"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getPolicy = async (input) => { return this.request("/public/v1/query/get_policy", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetPolicy = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_policy"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getPolicyEvaluations = async (input) => { return this.request("/public/v1/query/get_policy_evaluations", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetPolicyEvaluations = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_policy_evaluations"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getPrivateKey = async (input) => { return this.request("/public/v1/query/get_private_key", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetPrivateKey = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_private_key"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getSmartContractInterface = async (input) => { return this.request("/public/v1/query/get_smart_contract_interface", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetSmartContractInterface = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_smart_contract_interface"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getUser = async (input) => { return this.request("/public/v1/query/get_user", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetUser = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_user"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getWallet = async (input) => { return this.request("/public/v1/query/get_wallet", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetWallet = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getWalletAccount = async (input) => { return this.request("/public/v1/query/get_wallet_account", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetWalletAccount = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/get_wallet_account"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getActivities = async (input = {}) => { return this.request("/public/v1/query/list_activities", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetActivities = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_activities"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getPolicies = async (input = {}) => { return this.request("/public/v1/query/list_policies", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetPolicies = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_policies"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.listPrivateKeyTags = async (input) => { return this.request("/public/v1/query/list_private_key_tags", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampListPrivateKeyTags = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_key_tags"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getPrivateKeys = async (input = {}) => { return this.request("/public/v1/query/list_private_keys", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetPrivateKeys = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_private_keys"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getSmartContractInterfaces = async (input) => { return this.request("/public/v1/query/list_smart_contract_interfaces", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetSmartContractInterfaces = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_smart_contract_interfaces"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getSubOrgIds = async (input = {}) => { return this.request("/public/v1/query/list_suborgs", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetSubOrgIds = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_suborgs"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.listUserTags = async (input = {}) => { return this.request("/public/v1/query/list_user_tags", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampListUserTags = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_user_tags"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getUsers = async (input = {}) => { return this.request("/public/v1/query/list_users", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetUsers = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_users"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getVerifiedSubOrgIds = async (input) => { return this.request("/public/v1/query/list_verified_suborgs", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetVerifiedSubOrgIds = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_verified_suborgs"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getWalletAccounts = async (input) => { return this.request("/public/v1/query/list_wallet_accounts", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetWalletAccounts = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallet_accounts"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getWallets = async (input = {}) => { return this.request("/public/v1/query/list_wallets", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetWallets = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/list_wallets"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.getWhoami = async (input = {}) => { return this.request("/public/v1/query/whoami", { ...input, organizationId: input.organizationId ?? this.config.organizationId, }); }; this.stampGetWhoami = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/query/whoami"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.approveActivity = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.activityDecision("/public/v1/submit/approve_activity", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_APPROVE_ACTIVITY", }); }; this.stampApproveActivity = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/approve_activity"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createApiKeys = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_api_keys", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2", }, "createApiKeysResult"); }; this.stampCreateApiKeys = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_keys"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createApiOnlyUsers = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_api_only_users", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_API_ONLY_USERS", }, "createApiOnlyUsersResult"); }; this.stampCreateApiOnlyUsers = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_api_only_users"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createAuthenticators = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_authenticators", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2", }, "createAuthenticatorsResult"); }; this.stampCreateAuthenticators = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_authenticators"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createInvitations = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_invitations", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_INVITATIONS", }, "createInvitationsResult"); }; this.stampCreateInvitations = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_invitations"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createOauthProviders = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_oauth_providers", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS", }, "createOauthProvidersResult"); }; this.stampCreateOauthProviders = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_oauth_providers"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createPolicies = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_policies", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_POLICIES", }, "createPoliciesResult"); }; this.stampCreatePolicies = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policies"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createPolicy = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_policy", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_POLICY_V3", }, "createPolicyResult"); }; this.stampCreatePolicy = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_policy"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createPrivateKeyTag = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_private_key_tag", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG", }, "createPrivateKeyTagResult"); }; this.stampCreatePrivateKeyTag = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_key_tag"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createPrivateKeys = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_private_keys", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2", }, "createPrivateKeysResultV2"); }; this.stampCreatePrivateKeys = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_private_keys"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createReadOnlySession = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_read_only_session", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION", }, "createReadOnlySessionResult"); }; this.stampCreateReadOnlySession = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_only_session"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createReadWriteSession = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_read_write_session", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2", }, "createReadWriteSessionResultV2"); }; this.stampCreateReadWriteSession = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_read_write_session"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createSmartContractInterface = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_smart_contract_interface", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE", }, "createSmartContractInterfaceResult"); }; this.stampCreateSmartContractInterface = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_smart_contract_interface"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createSubOrganization = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_sub_organization", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7", }, "createSubOrganizationResultV7"); }; this.stampCreateSubOrganization = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_sub_organization"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createUserTag = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_user_tag", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_USER_TAG", }, "createUserTagResult"); }; this.stampCreateUserTag = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_user_tag"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createUsers = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_users", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_USERS_V3", }, "createUsersResult"); }; this.stampCreateUsers = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_users"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createWallet = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_wallet", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_WALLET", }, "createWalletResult"); }; this.stampCreateWallet = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.createWalletAccounts = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/create_wallet_accounts", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS", }, "createWalletAccountsResult"); }; this.stampCreateWalletAccounts = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/create_wallet_accounts"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deleteApiKeys = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_api_keys", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_API_KEYS", }, "deleteApiKeysResult"); }; this.stampDeleteApiKeys = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_api_keys"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deleteAuthenticators = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_authenticators", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_AUTHENTICATORS", }, "deleteAuthenticatorsResult"); }; this.stampDeleteAuthenticators = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_authenticators"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deleteInvitation = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_invitation", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_INVITATION", }, "deleteInvitationResult"); }; this.stampDeleteInvitation = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_invitation"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deleteOauthProviders = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_oauth_providers", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS", }, "deleteOauthProvidersResult"); }; this.stampDeleteOauthProviders = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_oauth_providers"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deletePolicy = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_policy", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_POLICY", }, "deletePolicyResult"); }; this.stampDeletePolicy = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_policy"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deletePrivateKeyTags = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_private_key_tags", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS", }, "deletePrivateKeyTagsResult"); }; this.stampDeletePrivateKeyTags = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_key_tags"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deletePrivateKeys = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_private_keys", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS", }, "deletePrivateKeysResult"); }; this.stampDeletePrivateKeys = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_private_keys"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deleteSmartContractInterface = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_smart_contract_interface", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE", }, "deleteSmartContractInterfaceResult"); }; this.stampDeleteSmartContractInterface = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_smart_contract_interface"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deleteSubOrganization = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_sub_organization", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION", }, "deleteSubOrganizationResult"); }; this.stampDeleteSubOrganization = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_sub_organization"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deleteUserTags = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_user_tags", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_USER_TAGS", }, "deleteUserTagsResult"); }; this.stampDeleteUserTags = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_user_tags"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deleteUsers = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_users", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_USERS", }, "deleteUsersResult"); }; this.stampDeleteUsers = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_users"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.deleteWallets = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/delete_wallets", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_DELETE_WALLETS", }, "deleteWalletsResult"); }; this.stampDeleteWallets = async (input) => { if (!this.stamper) { return undefined; } const fullUrl = this.config.apiBaseUrl + "/public/v1/submit/delete_wallets"; const body = JSON.stringify(input); const stamp = await this.stamper.stamp(body); return { body: body, stamp: stamp, url: fullUrl, }; }; this.emailAuth = async (input) => { const { organizationId, timestampMs, ...rest } = input; return this.command("/public/v1/submit/email_auth", { parameters: rest, organizationId: organizationId ?? this.config.organizationId, timestampMs: timestampMs ?? String(Date.now()), type: "ACTIVITY_TYPE_EMAIL_AUTH_V2", }, "emailAuthResult"); }; this.stampEmailAuth = async (input) => { if (!this.stamper) { return undefined; } const fullUrl