diff --git a/api/public_api.swagger.json b/api/public_api.swagger.json index 93edb2f..b0c594c 100644 --- a/api/public_api.swagger.json +++ b/api/public_api.swagger.json @@ -91,6 +91,58 @@ "tags": ["Activities"] } }, + "/public/v1/query/get_api_key": { + "post": { + "summary": "Get API key", + "description": "Get details about an API key", + "operationId": "GetApiKey", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetApiKeyResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetApiKeyRequest" + } + } + ], + "tags": ["API keys"] + } + }, + "/public/v1/query/get_api_keys": { + "post": { + "summary": "Get API key", + "description": "Get details about API keys for a user", + "operationId": "GetApiKeys", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/GetApiKeysResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/GetApiKeysRequest" + } + } + ], + "tags": ["API keys"] + } + }, "/public/v1/query/get_authenticator": { "post": { "summary": "Get Authenticator", @@ -975,6 +1027,32 @@ "tags": ["Wallets"] } }, + "/public/v1/submit/export_wallet_account": { + "post": { + "summary": "Export Wallet Account", + "description": "Exports a Wallet Account", + "operationId": "ExportWalletAccount", + "responses": { + "200": { + "description": "A successful response.", + "schema": { + "$ref": "#/definitions/ActivityResponse" + } + } + }, + "parameters": [ + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ExportWalletAccountRequest" + } + } + ], + "tags": ["Wallets"] + } + }, "/public/v1/submit/init_user_email_recovery": { "post": { "summary": "Init Email Recovery", @@ -1509,7 +1587,8 @@ "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY", "ACTIVITY_TYPE_EXPORT_WALLET", "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4", - "ACTIVITY_TYPE_EMAIL_AUTH" + "ACTIVITY_TYPE_EMAIL_AUTH", + "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" ] }, "AddressFormat": { @@ -2632,6 +2711,11 @@ "$ref": "#/definitions/WalletAccountParams" }, "description": "A list of wallet Accounts." + }, + "mnemonicLength": { + "type": "string", + "format": "uint64", + "description": "Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24." } }, "required": ["walletName", "accounts"] @@ -3052,7 +3136,7 @@ }, "expirationSeconds": { "type": "string", - "description": "Optional window (in seconds) indicating how long the API Key should last. Default to 30 minutes." + "description": "Expiration window (in seconds) indicating how long the API key is valid. If not provided, a default of 15 minutes will be used." }, "emailCustomization": { "$ref": "#/definitions/EmailCustomization", @@ -3162,6 +3246,55 @@ }, "required": ["privateKeyId", "exportBundle"] }, + "ExportWalletAccountIntent": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Address to identify Wallet Account." + }, + "targetPublicKey": { + "type": "string", + "description": "Client-side public key generated by the user, to which the export bundle will be encrypted." + } + }, + "required": ["address", "targetPublicKey"] + }, + "ExportWalletAccountRequest": { + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": ["ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT"] + }, + "timestampMs": { + "type": "string", + "description": "Timestamp (in milliseconds) of the request, used to verify liveness of user requests." + }, + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "parameters": { + "$ref": "#/definitions/ExportWalletAccountIntent" + } + }, + "required": ["type", "timestampMs", "organizationId", "parameters"] + }, + "ExportWalletAccountResult": { + "type": "object", + "properties": { + "address": { + "type": "string", + "description": "Address to identify Wallet Account." + }, + "exportBundle": { + "type": "string", + "description": "Export bundle containing a private key encrypted by the client's target public key." + } + }, + "required": ["address", "exportBundle"] + }, "ExportWalletIntent": { "type": "object", "properties": { @@ -3231,7 +3364,8 @@ "enum": [ "FEATURE_NAME_ROOT_USER_EMAIL_RECOVERY", "FEATURE_NAME_WEBAUTHN_ORIGINS", - "FEATURE_NAME_EMAIL_AUTH" + "FEATURE_NAME_EMAIL_AUTH", + "FEATURE_NAME_EMAIL_RECOVERY" ] }, "GetActivitiesRequest": { @@ -3290,6 +3424,58 @@ }, "required": ["organizationId", "activityId"] }, + "GetApiKeyRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "apiKeyId": { + "type": "string", + "description": "Unique identifier for a given API key." + } + }, + "required": ["organizationId", "apiKeyId"] + }, + "GetApiKeyResponse": { + "type": "object", + "properties": { + "apiKey": { + "$ref": "#/definitions/ApiKey", + "description": "An API key." + } + }, + "required": ["apiKey"] + }, + "GetApiKeysRequest": { + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Unique identifier for a given Organization." + }, + "userId": { + "type": "string", + "description": "Unique identifier for a given User." + } + }, + "required": ["organizationId"] + }, + "GetApiKeysResponse": { + "type": "object", + "properties": { + "apiKeys": { + "type": "array", + "items": { + "type": "object", + "$ref": "#/definitions/ApiKey" + }, + "description": "A list of API keys." + } + }, + "required": ["apiKeys"] + }, "GetAuthenticatorRequest": { "type": "object", "properties": { @@ -3613,6 +3799,10 @@ "targetPublicKey": { "type": "string", "description": "Client-side public key generated by the user, to which the recovery bundle will be encrypted." + }, + "expirationSeconds": { + "type": "string", + "description": "Expiration window (in seconds) indicating how long the recovery credential is valid. If not provided, a default of 15 minutes will be used." } }, "required": ["email", "targetPublicKey"] @@ -3818,6 +4008,9 @@ }, "emailAuthIntent": { "$ref": "#/definitions/EmailAuthIntent" + }, + "exportWalletAccountIntent": { + "$ref": "#/definitions/ExportWalletAccountIntent" } }, "required": ["createOrganizationIntent"] @@ -4395,6 +4588,9 @@ }, "emailAuthResult": { "$ref": "#/definitions/EmailAuthResult" + }, + "exportWalletAccountResult": { + "$ref": "#/definitions/ExportWalletAccountResult" } } }, @@ -5304,6 +5500,10 @@ }, "updatedAt": { "$ref": "#/definitions/external.data.v1.Timestamp" + }, + "exported": { + "type": "boolean", + "description": "True when a given Account is exported, false otherwise." } }, "required": [ @@ -5315,7 +5515,8 @@ "addressFormat", "address", "createdAt", - "updatedAt" + "updatedAt", + "exported" ] }, "WalletAccountParams": { @@ -5354,6 +5555,11 @@ "$ref": "#/definitions/WalletAccountParams" }, "description": "A list of wallet Accounts." + }, + "mnemonicLength": { + "type": "string", + "format": "uint64", + "description": "Length of mnemonic to generate the Wallet seed. Defaults to 12. Accepted values: 12, 15, 18, 21, 24." } }, "required": ["walletName", "accounts"]