@turnkey/http 2.9.1 → 2.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,6 +15,10 @@ export type paths = {
15
15
  /** Get details about API keys for a user */
16
16
  post: operations["PublicApiService_GetApiKeys"];
17
17
  };
18
+ "/public/v1/query/get_attestation": {
19
+ /** Get the attestation document corresponding to an enclave. */
20
+ post: operations["PublicApiService_GetAttestationDocument"];
21
+ };
18
22
  "/public/v1/query/get_authenticator": {
19
23
  /** Get details about an authenticator */
20
24
  post: operations["PublicApiService_GetAuthenticator"];
@@ -23,6 +27,10 @@ export type paths = {
23
27
  /** Get details about authenticators for a user */
24
28
  post: operations["PublicApiService_GetAuthenticators"];
25
29
  };
30
+ "/public/v1/query/get_oauth_providers": {
31
+ /** Get details about Oauth providers for a user */
32
+ post: operations["PublicApiService_GetOauthProviders"];
33
+ };
26
34
  "/public/v1/query/get_organization": {
27
35
  /** Get details about an Organization */
28
36
  post: operations["PublicApiService_GetOrganization"];
@@ -103,6 +111,14 @@ export type paths = {
103
111
  /** Create Invitations to join an existing Organization */
104
112
  post: operations["PublicApiService_CreateInvitations"];
105
113
  };
114
+ "/public/v1/submit/create_oauth_providers": {
115
+ /** Creates Oauth providers for a specified user - BETA */
116
+ post: operations["PublicApiService_CreateOauthProviders"];
117
+ };
118
+ "/public/v1/submit/create_policies": {
119
+ /** Create new Policies */
120
+ post: operations["PublicApiService_CreatePolicies"];
121
+ };
106
122
  "/public/v1/submit/create_policy": {
107
123
  /** Create a new Policy */
108
124
  post: operations["PublicApiService_CreatePolicy"];
@@ -115,6 +131,14 @@ export type paths = {
115
131
  /** Create new Private Keys */
116
132
  post: operations["PublicApiService_CreatePrivateKeys"];
117
133
  };
134
+ "/public/v1/submit/create_read_only_session": {
135
+ /** Create a read only session for a user (valid for 1 hour) */
136
+ post: operations["PublicApiService_CreateReadOnlySession"];
137
+ };
138
+ "/public/v1/submit/create_read_write_session": {
139
+ /** Create a read write session for a user */
140
+ post: operations["PublicApiService_CreateReadWriteSession"];
141
+ };
118
142
  "/public/v1/submit/create_sub_organization": {
119
143
  /** Create a new Sub-Organization */
120
144
  post: operations["PublicApiService_CreateSubOrganization"];
@@ -147,6 +171,10 @@ export type paths = {
147
171
  /** Delete an existing Invitation */
148
172
  post: operations["PublicApiService_DeleteInvitation"];
149
173
  };
174
+ "/public/v1/submit/delete_oauth_providers": {
175
+ /** Removes Oauth providers for a specified user - BETA */
176
+ post: operations["PublicApiService_DeleteOauthProviders"];
177
+ };
150
178
  "/public/v1/submit/delete_policy": {
151
179
  /** Delete an existing Policy */
152
180
  post: operations["PublicApiService_DeletePolicy"];
@@ -199,6 +227,10 @@ export type paths = {
199
227
  /** Initializes a new email recovery */
200
228
  post: operations["PublicApiService_InitUserEmailRecovery"];
201
229
  };
230
+ "/public/v1/submit/oauth": {
231
+ /** Authenticate a user with an Oidc token (Oauth) - BETA */
232
+ post: operations["PublicApiService_Oauth"];
233
+ };
202
234
  "/public/v1/submit/recover_user": {
203
235
  /** Completes the process of recovering a user by adding an authenticator */
204
236
  post: operations["PublicApiService_RecoverUser"];
@@ -219,6 +251,10 @@ export type paths = {
219
251
  /** Sign a raw payload */
220
252
  post: operations["PublicApiService_SignRawPayload"];
221
253
  };
254
+ "/public/v1/submit/sign_raw_payloads": {
255
+ /** Sign multiple raw payloads with the same signing parameters */
256
+ post: operations["PublicApiService_SignRawPayloads"];
257
+ };
222
258
  "/public/v1/submit/sign_transaction": {
223
259
  /** Sign a transaction */
224
260
  post: operations["PublicApiService_SignTransaction"];
@@ -347,6 +383,8 @@ export type definitions = {
347
383
  canReject: boolean;
348
384
  createdAt: definitions["externaldatav1Timestamp"];
349
385
  updatedAt: definitions["externaldatav1Timestamp"];
386
+ /** @description Failure reason of the intended action. */
387
+ failure?: definitions["rpcStatus"];
350
388
  };
351
389
  v1ActivityResponse: {
352
390
  /** @description An action that can that can be taken within the Turnkey infrastructure. */
@@ -355,7 +393,7 @@ export type definitions = {
355
393
  /** @enum {string} */
356
394
  v1ActivityStatus: "ACTIVITY_STATUS_CREATED" | "ACTIVITY_STATUS_PENDING" | "ACTIVITY_STATUS_COMPLETED" | "ACTIVITY_STATUS_FAILED" | "ACTIVITY_STATUS_CONSENSUS_NEEDED" | "ACTIVITY_STATUS_REJECTED";
357
395
  /** @enum {string} */
358
- v1ActivityType: "ACTIVITY_TYPE_CREATE_API_KEYS" | "ACTIVITY_TYPE_CREATE_USERS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS" | "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD" | "ACTIVITY_TYPE_CREATE_INVITATIONS" | "ACTIVITY_TYPE_ACCEPT_INVITATION" | "ACTIVITY_TYPE_CREATE_POLICY" | "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY" | "ACTIVITY_TYPE_DELETE_USERS" | "ACTIVITY_TYPE_DELETE_API_KEYS" | "ACTIVITY_TYPE_DELETE_INVITATION" | "ACTIVITY_TYPE_DELETE_ORGANIZATION" | "ACTIVITY_TYPE_DELETE_POLICY" | "ACTIVITY_TYPE_CREATE_USER_TAG" | "ACTIVITY_TYPE_DELETE_USER_TAGS" | "ACTIVITY_TYPE_CREATE_ORGANIZATION" | "ACTIVITY_TYPE_SIGN_TRANSACTION" | "ACTIVITY_TYPE_APPROVE_ACTIVITY" | "ACTIVITY_TYPE_REJECT_ACTIVITY" | "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" | "ACTIVITY_TYPE_CREATE_AUTHENTICATORS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" | "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" | "ACTIVITY_TYPE_SET_PAYMENT_METHOD" | "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER" | "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD" | "ACTIVITY_TYPE_CREATE_POLICY_V2" | "ACTIVITY_TYPE_CREATE_POLICY_V3" | "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" | "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" | "ACTIVITY_TYPE_UPDATE_USER_TAG" | "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" | "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" | "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2" | "ACTIVITY_TYPE_CREATE_USERS_V2" | "ACTIVITY_TYPE_ACCEPT_INVITATION_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2" | "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" | "ACTIVITY_TYPE_UPDATE_USER" | "ACTIVITY_TYPE_UPDATE_POLICY" | "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" | "ACTIVITY_TYPE_CREATE_WALLET" | "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" | "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" | "ACTIVITY_TYPE_RECOVER_USER" | "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" | "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" | "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" | "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" | "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" | "ACTIVITY_TYPE_EXPORT_WALLET" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4" | "ACTIVITY_TYPE_EMAIL_AUTH" | "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" | "ACTIVITY_TYPE_INIT_IMPORT_WALLET" | "ACTIVITY_TYPE_IMPORT_WALLET" | "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY" | "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY";
396
+ v1ActivityType: "ACTIVITY_TYPE_CREATE_API_KEYS" | "ACTIVITY_TYPE_CREATE_USERS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS" | "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD" | "ACTIVITY_TYPE_CREATE_INVITATIONS" | "ACTIVITY_TYPE_ACCEPT_INVITATION" | "ACTIVITY_TYPE_CREATE_POLICY" | "ACTIVITY_TYPE_DISABLE_PRIVATE_KEY" | "ACTIVITY_TYPE_DELETE_USERS" | "ACTIVITY_TYPE_DELETE_API_KEYS" | "ACTIVITY_TYPE_DELETE_INVITATION" | "ACTIVITY_TYPE_DELETE_ORGANIZATION" | "ACTIVITY_TYPE_DELETE_POLICY" | "ACTIVITY_TYPE_CREATE_USER_TAG" | "ACTIVITY_TYPE_DELETE_USER_TAGS" | "ACTIVITY_TYPE_CREATE_ORGANIZATION" | "ACTIVITY_TYPE_SIGN_TRANSACTION" | "ACTIVITY_TYPE_APPROVE_ACTIVITY" | "ACTIVITY_TYPE_REJECT_ACTIVITY" | "ACTIVITY_TYPE_DELETE_AUTHENTICATORS" | "ACTIVITY_TYPE_CREATE_AUTHENTICATORS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEY_TAG" | "ACTIVITY_TYPE_DELETE_PRIVATE_KEY_TAGS" | "ACTIVITY_TYPE_SET_PAYMENT_METHOD" | "ACTIVITY_TYPE_ACTIVATE_BILLING_TIER" | "ACTIVITY_TYPE_DELETE_PAYMENT_METHOD" | "ACTIVITY_TYPE_CREATE_POLICY_V2" | "ACTIVITY_TYPE_CREATE_POLICY_V3" | "ACTIVITY_TYPE_CREATE_API_ONLY_USERS" | "ACTIVITY_TYPE_UPDATE_ROOT_QUORUM" | "ACTIVITY_TYPE_UPDATE_USER_TAG" | "ACTIVITY_TYPE_UPDATE_PRIVATE_KEY_TAG" | "ACTIVITY_TYPE_CREATE_AUTHENTICATORS_V2" | "ACTIVITY_TYPE_CREATE_ORGANIZATION_V2" | "ACTIVITY_TYPE_CREATE_USERS_V2" | "ACTIVITY_TYPE_ACCEPT_INVITATION_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V2" | "ACTIVITY_TYPE_UPDATE_ALLOWED_ORIGINS" | "ACTIVITY_TYPE_CREATE_PRIVATE_KEYS_V2" | "ACTIVITY_TYPE_UPDATE_USER" | "ACTIVITY_TYPE_UPDATE_POLICY" | "ACTIVITY_TYPE_SET_PAYMENT_METHOD_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V3" | "ACTIVITY_TYPE_CREATE_WALLET" | "ACTIVITY_TYPE_CREATE_WALLET_ACCOUNTS" | "ACTIVITY_TYPE_INIT_USER_EMAIL_RECOVERY" | "ACTIVITY_TYPE_RECOVER_USER" | "ACTIVITY_TYPE_SET_ORGANIZATION_FEATURE" | "ACTIVITY_TYPE_REMOVE_ORGANIZATION_FEATURE" | "ACTIVITY_TYPE_SIGN_RAW_PAYLOAD_V2" | "ACTIVITY_TYPE_SIGN_TRANSACTION_V2" | "ACTIVITY_TYPE_EXPORT_PRIVATE_KEY" | "ACTIVITY_TYPE_EXPORT_WALLET" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4" | "ACTIVITY_TYPE_EMAIL_AUTH" | "ACTIVITY_TYPE_EXPORT_WALLET_ACCOUNT" | "ACTIVITY_TYPE_INIT_IMPORT_WALLET" | "ACTIVITY_TYPE_IMPORT_WALLET" | "ACTIVITY_TYPE_INIT_IMPORT_PRIVATE_KEY" | "ACTIVITY_TYPE_IMPORT_PRIVATE_KEY" | "ACTIVITY_TYPE_CREATE_POLICIES" | "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS" | "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION" | "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS" | "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5" | "ACTIVITY_TYPE_OAUTH" | "ACTIVITY_TYPE_CREATE_API_KEYS_V2" | "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION";
359
397
  /** @enum {string} */
360
398
  v1AddressFormat: "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS" | "ADDRESS_FORMAT_TRON";
361
399
  v1ApiKey: {
@@ -373,6 +411,8 @@ export type definitions = {
373
411
  */
374
412
  expirationSeconds?: string;
375
413
  };
414
+ /** @enum {string} */
415
+ v1ApiKeyCurve: "API_KEY_CURVE_P256" | "API_KEY_CURVE_SECP256K1";
376
416
  v1ApiKeyParams: {
377
417
  /** @description Human-readable name for an API Key. */
378
418
  apiKeyName: string;
@@ -381,6 +421,16 @@ export type definitions = {
381
421
  /** @description Optional window (in seconds) indicating how long the API Key should last. */
382
422
  expirationSeconds?: string;
383
423
  };
424
+ v1ApiKeyParamsV2: {
425
+ /** @description Human-readable name for an API Key. */
426
+ apiKeyName: string;
427
+ /** @description The public component of a cryptographic key pair used to sign messages and transactions. */
428
+ publicKey: string;
429
+ /** @description The curve type to be used for processing API key signatures. */
430
+ curveType: definitions["v1ApiKeyCurve"];
431
+ /** @description Optional window (in seconds) indicating how long the API Key should last. */
432
+ expirationSeconds?: string;
433
+ };
384
434
  v1ApiOnlyUserParams: {
385
435
  /** @description The name of the new API-only User. */
386
436
  userName: string;
@@ -465,14 +515,20 @@ export type definitions = {
465
515
  /** @description Unique identifier for a given User. */
466
516
  userId: string;
467
517
  };
518
+ v1CreateApiKeysIntentV2: {
519
+ /** @description A list of API Keys. */
520
+ apiKeys: definitions["v1ApiKeyParamsV2"][];
521
+ /** @description Unique identifier for a given User. */
522
+ userId: string;
523
+ };
468
524
  v1CreateApiKeysRequest: {
469
525
  /** @enum {string} */
470
- type: "ACTIVITY_TYPE_CREATE_API_KEYS";
526
+ type: "ACTIVITY_TYPE_CREATE_API_KEYS_V2";
471
527
  /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
472
528
  timestampMs: string;
473
529
  /** @description Unique identifier for a given Organization. */
474
530
  organizationId: string;
475
- parameters: definitions["v1CreateApiKeysIntent"];
531
+ parameters: definitions["v1CreateApiKeysIntentV2"];
476
532
  };
477
533
  v1CreateApiKeysResult: {
478
534
  /** @description A list of API Key IDs. */
@@ -537,6 +593,25 @@ export type definitions = {
537
593
  /** @description A list of Invitation IDs */
538
594
  invitationIds: string[];
539
595
  };
596
+ v1CreateOauthProvidersIntent: {
597
+ /** @description The ID of the User to add an Oauth provider to */
598
+ userId: string;
599
+ /** @description A list of Oauth providers. */
600
+ oauthProviders: definitions["v1OauthProviderParams"][];
601
+ };
602
+ v1CreateOauthProvidersRequest: {
603
+ /** @enum {string} */
604
+ type: "ACTIVITY_TYPE_CREATE_OAUTH_PROVIDERS";
605
+ /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
606
+ timestampMs: string;
607
+ /** @description Unique identifier for a given Organization. */
608
+ organizationId: string;
609
+ parameters: definitions["v1CreateOauthProvidersIntent"];
610
+ };
611
+ v1CreateOauthProvidersResult: {
612
+ /** @description A list of unique identifiers for Oauth Providers */
613
+ providerIds: string[];
614
+ };
540
615
  v1CreateOrganizationIntent: {
541
616
  /** @description Human-readable name for an Organization. */
542
617
  organizationName: string;
@@ -561,6 +636,23 @@ export type definitions = {
561
636
  /** @description Unique identifier for a given Organization. */
562
637
  organizationId: string;
563
638
  };
639
+ v1CreatePoliciesIntent: {
640
+ /** @description An array of policy intents to be created. */
641
+ policies: definitions["v1CreatePolicyIntentV3"][];
642
+ };
643
+ v1CreatePoliciesRequest: {
644
+ /** @enum {string} */
645
+ type: "ACTIVITY_TYPE_CREATE_POLICIES";
646
+ /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
647
+ timestampMs: string;
648
+ /** @description Unique identifier for a given Organization. */
649
+ organizationId: string;
650
+ parameters: definitions["v1CreatePoliciesIntent"];
651
+ };
652
+ v1CreatePoliciesResult: {
653
+ /** @description A list of unique identifiers for the created policies. */
654
+ policyIds: string[];
655
+ };
564
656
  v1CreatePolicyIntent: {
565
657
  /** @description Human-readable name for a Policy. */
566
658
  policyName: string;
@@ -649,6 +741,68 @@ export type definitions = {
649
741
  /** @description A list of Private Key IDs and addresses. */
650
742
  privateKeys: definitions["v1PrivateKeyResult"][];
651
743
  };
744
+ v1CreateReadOnlySessionIntent: {
745
+ [key: string]: unknown;
746
+ };
747
+ v1CreateReadOnlySessionRequest: {
748
+ /** @enum {string} */
749
+ type: "ACTIVITY_TYPE_CREATE_READ_ONLY_SESSION";
750
+ /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
751
+ timestampMs: string;
752
+ /** @description Unique identifier for a given Organization. */
753
+ organizationId: string;
754
+ parameters: definitions["v1CreateReadOnlySessionIntent"];
755
+ };
756
+ v1CreateReadOnlySessionResult: {
757
+ /** @description Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons. */
758
+ organizationId: string;
759
+ /** @description Human-readable name for an Organization. */
760
+ organizationName: string;
761
+ /** @description Unique identifier for a given User. */
762
+ userId: string;
763
+ /** @description Human-readable name for a User. */
764
+ username: string;
765
+ /** @description String representing a read only session */
766
+ session: string;
767
+ /**
768
+ * Format: uint64
769
+ * @description UTC timestamp in seconds representing the expiry time for the read only session.
770
+ */
771
+ sessionExpiry: string;
772
+ };
773
+ v1CreateReadWriteSessionIntent: {
774
+ /** @description Client-side public key generated by the user, to which the read write session bundle (credentials) will be encrypted. */
775
+ targetPublicKey: string;
776
+ /** @description Email of the user to create a read write session for */
777
+ email: string;
778
+ /** @description Optional human-readable name for an API Key. If none provided, default to Read Write Session - <Timestamp> */
779
+ apiKeyName?: string;
780
+ /** @description Expiration window (in seconds) indicating how long the API key is valid. If not provided, a default of 15 minutes will be used. */
781
+ expirationSeconds?: string;
782
+ };
783
+ v1CreateReadWriteSessionRequest: {
784
+ /** @enum {string} */
785
+ type: "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION";
786
+ /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
787
+ timestampMs: string;
788
+ /** @description Unique identifier for a given Organization. */
789
+ organizationId: string;
790
+ parameters: definitions["v1CreateReadWriteSessionIntent"];
791
+ };
792
+ v1CreateReadWriteSessionResult: {
793
+ /** @description Unique identifier for a given Organization. If the request is being made by a user and their Sub-Organization ID is unknown, this can be the Parent Organization ID. However, using the Sub-Organization ID is preferred due to performance reasons. */
794
+ organizationId: string;
795
+ /** @description Human-readable name for an Organization. */
796
+ organizationName: string;
797
+ /** @description Unique identifier for a given User. */
798
+ userId: string;
799
+ /** @description Human-readable name for a User. */
800
+ username: string;
801
+ /** @description Unique identifier for the created API key. */
802
+ apiKeyId: string;
803
+ /** @description HPKE encrypted credential bundle */
804
+ credentialBundle: string;
805
+ };
652
806
  v1CreateSubOrganizationIntent: {
653
807
  /** @description Name for this sub-organization */
654
808
  name: string;
@@ -696,14 +850,31 @@ export type definitions = {
696
850
  /** @description Disable email auth for the sub-organization */
697
851
  disableEmailAuth?: boolean;
698
852
  };
853
+ v1CreateSubOrganizationIntentV5: {
854
+ /** @description Name for this sub-organization */
855
+ subOrganizationName: string;
856
+ /** @description Root users to create within this sub-organization */
857
+ rootUsers: definitions["v1RootUserParamsV2"][];
858
+ /**
859
+ * Format: int32
860
+ * @description The threshold of unique approvals to reach root quorum. This value must be less than or equal to the number of root users
861
+ */
862
+ rootQuorumThreshold: number;
863
+ /** @description The wallet to create for the sub-organization */
864
+ wallet?: definitions["v1WalletParams"];
865
+ /** @description Disable email recovery for the sub-organization */
866
+ disableEmailRecovery?: boolean;
867
+ /** @description Disable email auth for the sub-organization */
868
+ disableEmailAuth?: boolean;
869
+ };
699
870
  v1CreateSubOrganizationRequest: {
700
871
  /** @enum {string} */
701
- type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V4";
872
+ type: "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V5";
702
873
  /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
703
874
  timestampMs: string;
704
875
  /** @description Unique identifier for a given Organization. */
705
876
  organizationId: string;
706
- parameters: definitions["v1CreateSubOrganizationIntentV4"];
877
+ parameters: definitions["v1CreateSubOrganizationIntentV5"];
707
878
  };
708
879
  v1CreateSubOrganizationResult: {
709
880
  subOrganizationId: string;
@@ -720,6 +891,11 @@ export type definitions = {
720
891
  wallet?: definitions["v1WalletResult"];
721
892
  rootUserIds?: string[];
722
893
  };
894
+ v1CreateSubOrganizationResultV5: {
895
+ subOrganizationId: string;
896
+ wallet?: definitions["v1WalletResult"];
897
+ rootUserIds?: string[];
898
+ };
723
899
  v1CreateUserTagIntent: {
724
900
  /** @description Human-readable name for a User Tag. */
725
901
  userTagName: string;
@@ -811,7 +987,7 @@ export type definitions = {
811
987
  rk: boolean;
812
988
  };
813
989
  /** @enum {string} */
814
- v1CredentialType: "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR" | "CREDENTIAL_TYPE_API_KEY_P256" | "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256";
990
+ v1CredentialType: "CREDENTIAL_TYPE_WEBAUTHN_AUTHENTICATOR" | "CREDENTIAL_TYPE_API_KEY_P256" | "CREDENTIAL_TYPE_RECOVER_USER_KEY_P256" | "CREDENTIAL_TYPE_API_KEY_SECP256K1";
815
991
  /** @enum {string} */
816
992
  v1Curve: "CURVE_SECP256K1" | "CURVE_ED25519";
817
993
  v1DeleteApiKeysIntent: {
@@ -869,6 +1045,25 @@ export type definitions = {
869
1045
  /** @description Unique identifier for a given Invitation. */
870
1046
  invitationId: string;
871
1047
  };
1048
+ v1DeleteOauthProvidersIntent: {
1049
+ /** @description The ID of the User to remove an Oauth provider from */
1050
+ userId: string;
1051
+ /** @description Unique identifier for a given Provider. */
1052
+ providerIds: string[];
1053
+ };
1054
+ v1DeleteOauthProvidersRequest: {
1055
+ /** @enum {string} */
1056
+ type: "ACTIVITY_TYPE_DELETE_OAUTH_PROVIDERS";
1057
+ /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
1058
+ timestampMs: string;
1059
+ /** @description Unique identifier for a given Organization. */
1060
+ organizationId: string;
1061
+ parameters: definitions["v1DeleteOauthProvidersIntent"];
1062
+ };
1063
+ v1DeleteOauthProvidersResult: {
1064
+ /** @description A list of unique identifiers for Oauth Providers */
1065
+ providerIds: string[];
1066
+ };
872
1067
  v1DeleteOrganizationIntent: {
873
1068
  /** @description Unique identifier for a given Organization. */
874
1069
  organizationId: string;
@@ -997,7 +1192,7 @@ export type definitions = {
997
1192
  v1EmailCustomizationParams: {
998
1193
  /** @description The name of the application. */
999
1194
  appName?: string;
1000
- /** @description A URL pointing to a logo. Note this logo will be resized to fit into 340px x 124px. */
1195
+ /** @description A URL pointing to a logo in PNG format. Note this logo will be resized to fit into 340px x 124px. */
1001
1196
  logoUrl?: string;
1002
1197
  /** @description A template for the URL to be used in a magic link button, e.g. `https://dapp.xyz/%s`. The auth bundle will be interpolated into the `%s`. */
1003
1198
  magicLinkTemplate?: string;
@@ -1117,6 +1312,19 @@ export type definitions = {
1117
1312
  /** @description A list of API keys. */
1118
1313
  apiKeys: definitions["v1ApiKey"][];
1119
1314
  };
1315
+ v1GetAttestationDocumentRequest: {
1316
+ /** @description Unique identifier for a given Organization. */
1317
+ organizationId: string;
1318
+ /** @description The enclave type, one of: ump, notarizer, signer, evm-parser */
1319
+ enclaveType: string;
1320
+ };
1321
+ v1GetAttestationDocumentResponse: {
1322
+ /**
1323
+ * Format: byte
1324
+ * @description Raw (CBOR-encoded) attestation document
1325
+ */
1326
+ attestationDocument: string;
1327
+ };
1120
1328
  v1GetAuthenticatorRequest: {
1121
1329
  /** @description Unique identifier for a given Organization. */
1122
1330
  organizationId: string;
@@ -1137,6 +1345,16 @@ export type definitions = {
1137
1345
  /** @description A list of authenticators. */
1138
1346
  authenticators: definitions["v1Authenticator"][];
1139
1347
  };
1348
+ v1GetOauthProvidersRequest: {
1349
+ /** @description Unique identifier for a given Organization. */
1350
+ organizationId: string;
1351
+ /** @description Unique identifier for a given User. */
1352
+ userId?: string;
1353
+ };
1354
+ v1GetOauthProvidersResponse: {
1355
+ /** @description A list of Oauth Providers */
1356
+ oauthProviders: definitions["v1OauthProvider"][];
1357
+ };
1140
1358
  v1GetOrganizationRequest: {
1141
1359
  /** @description Unique identifier for a given Organization. */
1142
1360
  organizationId: string;
@@ -1184,7 +1402,7 @@ export type definitions = {
1184
1402
  v1GetSubOrgIdsRequest: {
1185
1403
  /** @description Unique identifier for the parent Organization. This is used to find sub-organizations within it. */
1186
1404
  organizationId: string;
1187
- /** @description Specifies the type of filter to apply, i.e 'CREDENTIAL_ID', 'NAME', 'USERNAME', 'EMAIL' or 'PUBLIC_KEY' */
1405
+ /** @description Specifies the type of filter to apply, i.e 'CREDENTIAL_ID', 'NAME', 'USERNAME', 'EMAIL', 'OIDC_TOKEN' or 'PUBLIC_KEY' */
1188
1406
  filterType?: string;
1189
1407
  /** @description The value of the filter to apply for the specified type. For example, a specific email or name string. */
1190
1408
  filterValue?: string;
@@ -1369,7 +1587,7 @@ export type definitions = {
1369
1587
  userId: string;
1370
1588
  };
1371
1589
  v1Intent: {
1372
- createOrganizationIntent: definitions["v1CreateOrganizationIntent"];
1590
+ createOrganizationIntent?: definitions["v1CreateOrganizationIntent"];
1373
1591
  createAuthenticatorsIntent?: definitions["v1CreateAuthenticatorsIntent"];
1374
1592
  createUsersIntent?: definitions["v1CreateUsersIntent"];
1375
1593
  createPrivateKeysIntent?: definitions["v1CreatePrivateKeysIntent"];
@@ -1430,6 +1648,15 @@ export type definitions = {
1430
1648
  importWalletIntent?: definitions["v1ImportWalletIntent"];
1431
1649
  initImportPrivateKeyIntent?: definitions["v1InitImportPrivateKeyIntent"];
1432
1650
  importPrivateKeyIntent?: definitions["v1ImportPrivateKeyIntent"];
1651
+ createPoliciesIntent?: definitions["v1CreatePoliciesIntent"];
1652
+ signRawPayloadsIntent?: definitions["v1SignRawPayloadsIntent"];
1653
+ createReadOnlySessionIntent?: definitions["v1CreateReadOnlySessionIntent"];
1654
+ createOauthProvidersIntent?: definitions["v1CreateOauthProvidersIntent"];
1655
+ deleteOauthProvidersIntent?: definitions["v1DeleteOauthProvidersIntent"];
1656
+ createSubOrganizationIntentV5?: definitions["v1CreateSubOrganizationIntentV5"];
1657
+ oauthIntent?: definitions["v1OauthIntent"];
1658
+ createApiKeysIntentV2?: definitions["v1CreateApiKeysIntentV2"];
1659
+ createReadWriteSessionIntent?: definitions["v1CreateReadWriteSessionIntent"];
1433
1660
  };
1434
1661
  v1Invitation: {
1435
1662
  /** @description Unique identifier for a given Invitation object. */
@@ -1484,6 +1711,55 @@ export type definitions = {
1484
1711
  v1NOOPCodegenAnchorResponse: {
1485
1712
  stamp: definitions["v1WebAuthnStamp"];
1486
1713
  };
1714
+ v1OauthIntent: {
1715
+ /** @description Base64 encoded OIDC token */
1716
+ oidcToken: string;
1717
+ /** @description Client-side public key generated by the user, to which the oauth bundle (credentials) will be encrypted. */
1718
+ targetPublicKey: string;
1719
+ /** @description Optional human-readable name for an API Key. If none provided, default to Oauth - <Timestamp> */
1720
+ apiKeyName?: string;
1721
+ /** @description Expiration window (in seconds) indicating how long the API key is valid. If not provided, a default of 15 minutes will be used. */
1722
+ expirationSeconds?: string;
1723
+ };
1724
+ v1OauthProvider: {
1725
+ /** @description Unique identifier for an OAuth Provider */
1726
+ providerId: string;
1727
+ /** @description Human-readable name to identify a Provider. */
1728
+ providerName: string;
1729
+ /** @description The URL at which to fetch the OIDC token signers */
1730
+ jwksUri: string;
1731
+ /** @description Expected audience ('aud' attribute of the signed token) which represents the app ID */
1732
+ audience: string;
1733
+ /** @description Expected subject ('sub' attribute of the signed token) which represents the user ID */
1734
+ subject: string;
1735
+ createdAt: definitions["externaldatav1Timestamp"];
1736
+ updatedAt: definitions["externaldatav1Timestamp"];
1737
+ };
1738
+ v1OauthProviderParams: {
1739
+ /** @description Human-readable name to identify a Provider. */
1740
+ providerName: string;
1741
+ /** @description The URL at which to fetch the OIDC token signers */
1742
+ jwksUri: string;
1743
+ /** @description Base64 encoded OIDC token */
1744
+ oidcToken: string;
1745
+ };
1746
+ v1OauthRequest: {
1747
+ /** @enum {string} */
1748
+ type: "ACTIVITY_TYPE_OAUTH";
1749
+ /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
1750
+ timestampMs: string;
1751
+ /** @description Unique identifier for a given Organization. */
1752
+ organizationId: string;
1753
+ parameters: definitions["v1OauthIntent"];
1754
+ };
1755
+ v1OauthResult: {
1756
+ /** @description Unique identifier for the authenticating User. */
1757
+ userId: string;
1758
+ /** @description Unique identifier for the created API key. */
1759
+ apiKeyId: string;
1760
+ /** @description HPKE encrypted credential bundle */
1761
+ credentialBundle: string;
1762
+ };
1487
1763
  /** @enum {string} */
1488
1764
  v1Operator: "OPERATOR_EQUAL" | "OPERATOR_MORE_THAN" | "OPERATOR_MORE_THAN_OR_EQUAL" | "OPERATOR_LESS_THAN" | "OPERATOR_LESS_THAN_OR_EQUAL" | "OPERATOR_CONTAINS" | "OPERATOR_NOT_EQUAL" | "OPERATOR_IN" | "OPERATOR_NOT_IN" | "OPERATOR_CONTAINS_ONE" | "OPERATOR_CONTAINS_ALL";
1489
1765
  v1OrganizationData: {
@@ -1669,6 +1945,14 @@ export type definitions = {
1669
1945
  importWalletResult?: definitions["v1ImportWalletResult"];
1670
1946
  initImportPrivateKeyResult?: definitions["v1InitImportPrivateKeyResult"];
1671
1947
  importPrivateKeyResult?: definitions["v1ImportPrivateKeyResult"];
1948
+ createPoliciesResult?: definitions["v1CreatePoliciesResult"];
1949
+ signRawPayloadsResult?: definitions["v1SignRawPayloadsResult"];
1950
+ createReadOnlySessionResult?: definitions["v1CreateReadOnlySessionResult"];
1951
+ createOauthProvidersResult?: definitions["v1CreateOauthProvidersResult"];
1952
+ deleteOauthProvidersResult?: definitions["v1DeleteOauthProvidersResult"];
1953
+ createSubOrganizationResultV5?: definitions["v1CreateSubOrganizationResultV5"];
1954
+ oauthResult?: definitions["v1OauthResult"];
1955
+ createReadWriteSessionResult?: definitions["v1CreateReadWriteSessionResult"];
1672
1956
  };
1673
1957
  v1RootUserParams: {
1674
1958
  /** @description Human-readable name for a User. */
@@ -1680,6 +1964,18 @@ export type definitions = {
1680
1964
  /** @description A list of Authenticator parameters. */
1681
1965
  authenticators: definitions["v1AuthenticatorParamsV2"][];
1682
1966
  };
1967
+ v1RootUserParamsV2: {
1968
+ /** @description Human-readable name for a User. */
1969
+ userName: string;
1970
+ /** @description The user's email address. */
1971
+ userEmail?: string;
1972
+ /** @description A list of API Key parameters. */
1973
+ apiKeys: definitions["v1ApiKeyParams"][];
1974
+ /** @description A list of Authenticator parameters. */
1975
+ authenticators: definitions["v1AuthenticatorParamsV2"][];
1976
+ /** @description A list of Oauth providers. */
1977
+ oauthProviders: definitions["v1OauthProviderParams"][];
1978
+ };
1683
1979
  v1Selector: {
1684
1980
  subject?: string;
1685
1981
  operator?: definitions["v1Operator"];
@@ -1776,6 +2072,28 @@ export type definitions = {
1776
2072
  /** @description Component of an ECSDA signature. */
1777
2073
  v: string;
1778
2074
  };
2075
+ v1SignRawPayloadsIntent: {
2076
+ /** @description A Wallet account address, Private Key address, or Private Key identifier. */
2077
+ signWith: string;
2078
+ /** @description An array of raw unsigned payloads to be signed. */
2079
+ payloads: string[];
2080
+ /** @description Encoding of the `payload` string. Turnkey uses this information to convert `payload` into bytes with the correct decoder (e.g. hex, utf8). */
2081
+ encoding: definitions["v1PayloadEncoding"];
2082
+ /** @description Hash function to apply to payload bytes before signing. This field must be set to HASH_FUNCTION_NOT_APPLICABLE for EdDSA/ed25519 signature requests; configurable payload hashing is not supported by RFC 8032. */
2083
+ hashFunction: definitions["v1HashFunction"];
2084
+ };
2085
+ v1SignRawPayloadsRequest: {
2086
+ /** @enum {string} */
2087
+ type: "ACTIVITY_TYPE_SIGN_RAW_PAYLOADS";
2088
+ /** @description Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
2089
+ timestampMs: string;
2090
+ /** @description Unique identifier for a given Organization. */
2091
+ organizationId: string;
2092
+ parameters: definitions["v1SignRawPayloadsIntent"];
2093
+ };
2094
+ v1SignRawPayloadsResult: {
2095
+ signatures?: definitions["v1SignRawPayloadResult"][];
2096
+ };
1779
2097
  v1SignTransactionIntent: {
1780
2098
  /** @description Unique identifier for a given Private Key. */
1781
2099
  privateKeyId: string;
@@ -1948,6 +2266,8 @@ export type definitions = {
1948
2266
  apiKeys: definitions["v1ApiKey"][];
1949
2267
  /** @description A list of User Tag IDs. */
1950
2268
  userTags: string[];
2269
+ /** @description A list of Oauth Providers. */
2270
+ oauthProviders: definitions["v1OauthProvider"][];
1951
2271
  createdAt: definitions["externaldatav1Timestamp"];
1952
2272
  updatedAt: definitions["externaldatav1Timestamp"];
1953
2273
  };
@@ -2027,8 +2347,6 @@ export type definitions = {
2027
2347
  address: string;
2028
2348
  createdAt: definitions["externaldatav1Timestamp"];
2029
2349
  updatedAt: definitions["externaldatav1Timestamp"];
2030
- /** @description True when a given Account is exported, false otherwise. */
2031
- exported: boolean;
2032
2350
  };
2033
2351
  v1WalletAccountParams: {
2034
2352
  /** @description Cryptographic curve used to generate a wallet Account. */
@@ -2122,6 +2440,24 @@ export type operations = {
2122
2440
  };
2123
2441
  };
2124
2442
  };
2443
+ /** Get the attestation document corresponding to an enclave. */
2444
+ PublicApiService_GetAttestationDocument: {
2445
+ parameters: {
2446
+ body: {
2447
+ body: definitions["v1GetAttestationDocumentRequest"];
2448
+ };
2449
+ };
2450
+ responses: {
2451
+ /** A successful response. */
2452
+ 200: {
2453
+ schema: definitions["v1GetAttestationDocumentResponse"];
2454
+ };
2455
+ /** An unexpected error response. */
2456
+ default: {
2457
+ schema: definitions["rpcStatus"];
2458
+ };
2459
+ };
2460
+ };
2125
2461
  /** Get details about an authenticator */
2126
2462
  PublicApiService_GetAuthenticator: {
2127
2463
  parameters: {
@@ -2158,6 +2494,24 @@ export type operations = {
2158
2494
  };
2159
2495
  };
2160
2496
  };
2497
+ /** Get details about Oauth providers for a user */
2498
+ PublicApiService_GetOauthProviders: {
2499
+ parameters: {
2500
+ body: {
2501
+ body: definitions["v1GetOauthProvidersRequest"];
2502
+ };
2503
+ };
2504
+ responses: {
2505
+ /** A successful response. */
2506
+ 200: {
2507
+ schema: definitions["v1GetOauthProvidersResponse"];
2508
+ };
2509
+ /** An unexpected error response. */
2510
+ default: {
2511
+ schema: definitions["rpcStatus"];
2512
+ };
2513
+ };
2514
+ };
2161
2515
  /** Get details about an Organization */
2162
2516
  PublicApiService_GetOrganization: {
2163
2517
  parameters: {
@@ -2518,6 +2872,42 @@ export type operations = {
2518
2872
  };
2519
2873
  };
2520
2874
  };
2875
+ /** Creates Oauth providers for a specified user - BETA */
2876
+ PublicApiService_CreateOauthProviders: {
2877
+ parameters: {
2878
+ body: {
2879
+ body: definitions["v1CreateOauthProvidersRequest"];
2880
+ };
2881
+ };
2882
+ responses: {
2883
+ /** A successful response. */
2884
+ 200: {
2885
+ schema: definitions["v1ActivityResponse"];
2886
+ };
2887
+ /** An unexpected error response. */
2888
+ default: {
2889
+ schema: definitions["rpcStatus"];
2890
+ };
2891
+ };
2892
+ };
2893
+ /** Create new Policies */
2894
+ PublicApiService_CreatePolicies: {
2895
+ parameters: {
2896
+ body: {
2897
+ body: definitions["v1CreatePoliciesRequest"];
2898
+ };
2899
+ };
2900
+ responses: {
2901
+ /** A successful response. */
2902
+ 200: {
2903
+ schema: definitions["v1ActivityResponse"];
2904
+ };
2905
+ /** An unexpected error response. */
2906
+ default: {
2907
+ schema: definitions["rpcStatus"];
2908
+ };
2909
+ };
2910
+ };
2521
2911
  /** Create a new Policy */
2522
2912
  PublicApiService_CreatePolicy: {
2523
2913
  parameters: {
@@ -2572,6 +2962,42 @@ export type operations = {
2572
2962
  };
2573
2963
  };
2574
2964
  };
2965
+ /** Create a read only session for a user (valid for 1 hour) */
2966
+ PublicApiService_CreateReadOnlySession: {
2967
+ parameters: {
2968
+ body: {
2969
+ body: definitions["v1CreateReadOnlySessionRequest"];
2970
+ };
2971
+ };
2972
+ responses: {
2973
+ /** A successful response. */
2974
+ 200: {
2975
+ schema: definitions["v1ActivityResponse"];
2976
+ };
2977
+ /** An unexpected error response. */
2978
+ default: {
2979
+ schema: definitions["rpcStatus"];
2980
+ };
2981
+ };
2982
+ };
2983
+ /** Create a read write session for a user */
2984
+ PublicApiService_CreateReadWriteSession: {
2985
+ parameters: {
2986
+ body: {
2987
+ body: definitions["v1CreateReadWriteSessionRequest"];
2988
+ };
2989
+ };
2990
+ responses: {
2991
+ /** A successful response. */
2992
+ 200: {
2993
+ schema: definitions["v1ActivityResponse"];
2994
+ };
2995
+ /** An unexpected error response. */
2996
+ default: {
2997
+ schema: definitions["rpcStatus"];
2998
+ };
2999
+ };
3000
+ };
2575
3001
  /** Create a new Sub-Organization */
2576
3002
  PublicApiService_CreateSubOrganization: {
2577
3003
  parameters: {
@@ -2716,6 +3142,24 @@ export type operations = {
2716
3142
  };
2717
3143
  };
2718
3144
  };
3145
+ /** Removes Oauth providers for a specified user - BETA */
3146
+ PublicApiService_DeleteOauthProviders: {
3147
+ parameters: {
3148
+ body: {
3149
+ body: definitions["v1DeleteOauthProvidersRequest"];
3150
+ };
3151
+ };
3152
+ responses: {
3153
+ /** A successful response. */
3154
+ 200: {
3155
+ schema: definitions["v1ActivityResponse"];
3156
+ };
3157
+ /** An unexpected error response. */
3158
+ default: {
3159
+ schema: definitions["rpcStatus"];
3160
+ };
3161
+ };
3162
+ };
2719
3163
  /** Delete an existing Policy */
2720
3164
  PublicApiService_DeletePolicy: {
2721
3165
  parameters: {
@@ -2950,6 +3394,24 @@ export type operations = {
2950
3394
  };
2951
3395
  };
2952
3396
  };
3397
+ /** Authenticate a user with an Oidc token (Oauth) - BETA */
3398
+ PublicApiService_Oauth: {
3399
+ parameters: {
3400
+ body: {
3401
+ body: definitions["v1OauthRequest"];
3402
+ };
3403
+ };
3404
+ responses: {
3405
+ /** A successful response. */
3406
+ 200: {
3407
+ schema: definitions["v1ActivityResponse"];
3408
+ };
3409
+ /** An unexpected error response. */
3410
+ default: {
3411
+ schema: definitions["rpcStatus"];
3412
+ };
3413
+ };
3414
+ };
2953
3415
  /** Completes the process of recovering a user by adding an authenticator */
2954
3416
  PublicApiService_RecoverUser: {
2955
3417
  parameters: {
@@ -3040,6 +3502,24 @@ export type operations = {
3040
3502
  };
3041
3503
  };
3042
3504
  };
3505
+ /** Sign multiple raw payloads with the same signing parameters */
3506
+ PublicApiService_SignRawPayloads: {
3507
+ parameters: {
3508
+ body: {
3509
+ body: definitions["v1SignRawPayloadsRequest"];
3510
+ };
3511
+ };
3512
+ responses: {
3513
+ /** A successful response. */
3514
+ 200: {
3515
+ schema: definitions["v1ActivityResponse"];
3516
+ };
3517
+ /** An unexpected error response. */
3518
+ default: {
3519
+ schema: definitions["rpcStatus"];
3520
+ };
3521
+ };
3522
+ };
3043
3523
  /** Sign a transaction */
3044
3524
  PublicApiService_SignTransaction: {
3045
3525
  parameters: {