@turnkey/sdk-types 0.4.0-beta.5 → 0.4.0-beta.6

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @turnkey/sdk-types
2
2
 
3
+ ## 0.4.0-beta.6
4
+
5
+ ### Minor Changes
6
+
7
+ - @turnkey/react-wallet-kit and @turnkey/core beta release
8
+
3
9
  ## 0.4.0-beta.5
4
10
 
5
11
  ### Minor Changes
@@ -180,7 +180,7 @@ export type v1ActivityResponse = {
180
180
  activity: v1Activity;
181
181
  };
182
182
  export type v1ActivityStatus = "ACTIVITY_STATUS_CREATED" | "ACTIVITY_STATUS_PENDING" | "ACTIVITY_STATUS_COMPLETED" | "ACTIVITY_STATUS_FAILED" | "ACTIVITY_STATUS_CONSENSUS_NEEDED" | "ACTIVITY_STATUS_REJECTED";
183
- export type 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" | "ACTIVITY_TYPE_EMAIL_AUTH_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6" | "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS" | "ACTIVITY_TYPE_DELETE_WALLETS" | "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2" | "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION" | "ACTIVITY_TYPE_INIT_OTP_AUTH" | "ACTIVITY_TYPE_OTP_AUTH" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7" | "ACTIVITY_TYPE_UPDATE_WALLET" | "ACTIVITY_TYPE_UPDATE_POLICY_V2" | "ACTIVITY_TYPE_CREATE_USERS_V3" | "ACTIVITY_TYPE_INIT_OTP_AUTH_V2" | "ACTIVITY_TYPE_INIT_OTP" | "ACTIVITY_TYPE_VERIFY_OTP" | "ACTIVITY_TYPE_OTP_LOGIN" | "ACTIVITY_TYPE_STAMP_LOGIN" | "ACTIVITY_TYPE_OAUTH_LOGIN" | "ACTIVITY_TYPE_UPDATE_USER_NAME" | "ACTIVITY_TYPE_UPDATE_USER_EMAIL" | "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER" | "ACTIVITY_TYPE_INIT_FIAT_ON_RAMP" | "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE" | "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE" | "ACTIVITY_TYPE_ENABLE_AUTH_PROXY" | "ACTIVITY_TYPE_DISABLE_AUTH_PROXY" | "ACTIVITY_TYPE_UPDATE_AUTH_PROXY_CONFIG";
183
+ export type 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" | "ACTIVITY_TYPE_EMAIL_AUTH_V2" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V6" | "ACTIVITY_TYPE_DELETE_PRIVATE_KEYS" | "ACTIVITY_TYPE_DELETE_WALLETS" | "ACTIVITY_TYPE_CREATE_READ_WRITE_SESSION_V2" | "ACTIVITY_TYPE_DELETE_SUB_ORGANIZATION" | "ACTIVITY_TYPE_INIT_OTP_AUTH" | "ACTIVITY_TYPE_OTP_AUTH" | "ACTIVITY_TYPE_CREATE_SUB_ORGANIZATION_V7" | "ACTIVITY_TYPE_UPDATE_WALLET" | "ACTIVITY_TYPE_UPDATE_POLICY_V2" | "ACTIVITY_TYPE_CREATE_USERS_V3" | "ACTIVITY_TYPE_INIT_OTP_AUTH_V2" | "ACTIVITY_TYPE_INIT_OTP" | "ACTIVITY_TYPE_VERIFY_OTP" | "ACTIVITY_TYPE_OTP_LOGIN" | "ACTIVITY_TYPE_STAMP_LOGIN" | "ACTIVITY_TYPE_OAUTH_LOGIN" | "ACTIVITY_TYPE_UPDATE_USER_NAME" | "ACTIVITY_TYPE_UPDATE_USER_EMAIL" | "ACTIVITY_TYPE_UPDATE_USER_PHONE_NUMBER" | "ACTIVITY_TYPE_INIT_FIAT_ON_RAMP" | "ACTIVITY_TYPE_CREATE_SMART_CONTRACT_INTERFACE" | "ACTIVITY_TYPE_DELETE_SMART_CONTRACT_INTERFACE" | "ACTIVITY_TYPE_ENABLE_AUTH_PROXY" | "ACTIVITY_TYPE_DISABLE_AUTH_PROXY" | "ACTIVITY_TYPE_UPDATE_AUTH_PROXY_CONFIG" | "ACTIVITY_TYPE_CREATE_OAUTH2_CREDENTIAL" | "ACTIVITY_TYPE_UPDATE_OAUTH2_CREDENTIAL" | "ACTIVITY_TYPE_DELETE_OAUTH2_CREDENTIAL" | "ACTIVITY_TYPE_OAUTH2_AUTHENTICATE";
184
184
  export type v1AddressFormat = "ADDRESS_FORMAT_UNCOMPRESSED" | "ADDRESS_FORMAT_COMPRESSED" | "ADDRESS_FORMAT_ETHEREUM" | "ADDRESS_FORMAT_SOLANA" | "ADDRESS_FORMAT_COSMOS" | "ADDRESS_FORMAT_TRON" | "ADDRESS_FORMAT_SUI" | "ADDRESS_FORMAT_APTOS" | "ADDRESS_FORMAT_BITCOIN_MAINNET_P2PKH" | "ADDRESS_FORMAT_BITCOIN_MAINNET_P2SH" | "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WPKH" | "ADDRESS_FORMAT_BITCOIN_MAINNET_P2WSH" | "ADDRESS_FORMAT_BITCOIN_MAINNET_P2TR" | "ADDRESS_FORMAT_BITCOIN_TESTNET_P2PKH" | "ADDRESS_FORMAT_BITCOIN_TESTNET_P2SH" | "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WPKH" | "ADDRESS_FORMAT_BITCOIN_TESTNET_P2WSH" | "ADDRESS_FORMAT_BITCOIN_TESTNET_P2TR" | "ADDRESS_FORMAT_BITCOIN_SIGNET_P2PKH" | "ADDRESS_FORMAT_BITCOIN_SIGNET_P2SH" | "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WPKH" | "ADDRESS_FORMAT_BITCOIN_SIGNET_P2WSH" | "ADDRESS_FORMAT_BITCOIN_SIGNET_P2TR" | "ADDRESS_FORMAT_BITCOIN_REGTEST_P2PKH" | "ADDRESS_FORMAT_BITCOIN_REGTEST_P2SH" | "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WPKH" | "ADDRESS_FORMAT_BITCOIN_REGTEST_P2WSH" | "ADDRESS_FORMAT_BITCOIN_REGTEST_P2TR" | "ADDRESS_FORMAT_SEI" | "ADDRESS_FORMAT_XLM" | "ADDRESS_FORMAT_DOGE_MAINNET" | "ADDRESS_FORMAT_DOGE_TESTNET" | "ADDRESS_FORMAT_TON_V3R2" | "ADDRESS_FORMAT_TON_V4R2" | "ADDRESS_FORMAT_TON_V5R1" | "ADDRESS_FORMAT_XRP";
185
185
  export type v1ApiKey = {
186
186
  /** A User credential that can be used to authenticate to Turnkey. */
@@ -364,6 +364,26 @@ export type v1CreateInvitationsResult = {
364
364
  /** A list of Invitation IDs */
365
365
  invitationIds: string[];
366
366
  };
367
+ export type v1CreateOauth2CredentialIntent = {
368
+ /** The OAuth 2.0 provider */
369
+ provider: v1Oauth2Provider;
370
+ /** The Client ID issued by the OAuth 2.0 provider */
371
+ clientId: string;
372
+ /** The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key */
373
+ encryptedClientSecret: string;
374
+ };
375
+ export type v1CreateOauth2CredentialRequest = {
376
+ type: string;
377
+ /** Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
378
+ timestampMs: string;
379
+ /** Unique identifier for a given Organization. */
380
+ organizationId: string;
381
+ parameters: v1CreateOauth2CredentialIntent;
382
+ };
383
+ export type v1CreateOauth2CredentialResult = {
384
+ /** Unique identifier of the OAuth 2.0 credential that was created */
385
+ oauth2CredentialId: string;
386
+ };
367
387
  export type v1CreateOauthProvidersIntent = {
368
388
  /** The ID of the User to add an Oauth provider to */
369
389
  userId: string;
@@ -876,6 +896,22 @@ export type v1DeleteInvitationResult = {
876
896
  /** Unique identifier for a given Invitation. */
877
897
  invitationId: string;
878
898
  };
899
+ export type v1DeleteOauth2CredentialIntent = {
900
+ /** The ID of the OAuth 2.0 credential to delete */
901
+ oauth2CredentialId: string;
902
+ };
903
+ export type v1DeleteOauth2CredentialRequest = {
904
+ type: string;
905
+ /** Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
906
+ timestampMs: string;
907
+ /** Unique identifier for a given Organization. */
908
+ organizationId: string;
909
+ parameters: v1DeleteOauth2CredentialIntent;
910
+ };
911
+ export type v1DeleteOauth2CredentialResult = {
912
+ /** Unique identifier of the OAuth 2.0 credential that was deleted */
913
+ oauth2CredentialId: string;
914
+ };
879
915
  export type v1DeleteOauthProvidersIntent = {
880
916
  /** The ID of the User to remove an Oauth provider from */
881
917
  userId: string;
@@ -1262,6 +1298,15 @@ export type v1GetAuthenticatorsResponse = {
1262
1298
  /** A list of authenticators. */
1263
1299
  authenticators: v1Authenticator[];
1264
1300
  };
1301
+ export type v1GetOauth2CredentialRequest = {
1302
+ /** Unique identifier for a given Organization. */
1303
+ organizationId: string;
1304
+ /** Unique identifier for a given OAuth 2.0 Credential. */
1305
+ oauth2CredentialId: string;
1306
+ };
1307
+ export type v1GetOauth2CredentialResponse = {
1308
+ oauth2Credential: v1Oauth2Credential;
1309
+ };
1265
1310
  export type v1GetOauthProvidersRequest = {
1266
1311
  /** Unique identifier for a given organization. */
1267
1312
  organizationId: string;
@@ -1788,6 +1833,10 @@ export type v1Intent = {
1788
1833
  enableAuthProxyIntent?: v1EnableAuthProxyIntent;
1789
1834
  disableAuthProxyIntent?: v1DisableAuthProxyIntent;
1790
1835
  updateAuthProxyConfigIntent?: v1UpdateAuthProxyConfigIntent;
1836
+ createOauth2CredentialIntent?: v1CreateOauth2CredentialIntent;
1837
+ updateOauth2CredentialIntent?: v1UpdateOauth2CredentialIntent;
1838
+ deleteOauth2CredentialIntent?: v1DeleteOauth2CredentialIntent;
1839
+ oauth2AuthenticateIntent?: v1Oauth2AuthenticateIntent;
1791
1840
  };
1792
1841
  export type v1Invitation = {
1793
1842
  /** Unique identifier for a given Invitation object. */
@@ -1820,6 +1869,13 @@ export type v1InvitationParams = {
1820
1869
  senderUserId: string;
1821
1870
  };
1822
1871
  export type v1InvitationStatus = "INVITATION_STATUS_CREATED" | "INVITATION_STATUS_ACCEPTED" | "INVITATION_STATUS_REVOKED";
1872
+ export type v1ListOauth2CredentialsRequest = {
1873
+ /** Unique identifier for a given Organization. */
1874
+ organizationId: string;
1875
+ };
1876
+ export type v1ListOauth2CredentialsResponse = {
1877
+ oauth2Credentials: v1Oauth2Credential[];
1878
+ };
1823
1879
  export type v1ListPrivateKeyTagsRequest = {
1824
1880
  /** Unique identifier for a given organization. */
1825
1881
  organizationId: string;
@@ -1840,6 +1896,45 @@ export type v1MnemonicLanguage = "MNEMONIC_LANGUAGE_ENGLISH" | "MNEMONIC_LANGUAG
1840
1896
  export type v1NOOPCodegenAnchorResponse = {
1841
1897
  stamp: v1WebAuthnStamp;
1842
1898
  };
1899
+ export type v1Oauth2AuthenticateIntent = {
1900
+ /** The OAuth 2.0 credential id whose client_id and client_secret will be used in the OAuth 2.0 flow */
1901
+ oauth2CredentialId: string;
1902
+ /** The auth_code provided by the OAuth 2.0 provider to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow */
1903
+ authCode: string;
1904
+ /** The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider */
1905
+ redirectUri: string;
1906
+ /** The code verifier used by OAuth 2.0 PKCE providers */
1907
+ codeVerifier: string;
1908
+ /** An optional nonce used by the client to prevent replay/substitution of an ID token */
1909
+ nonce?: string;
1910
+ };
1911
+ export type v1Oauth2AuthenticateRequest = {
1912
+ type: string;
1913
+ /** Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
1914
+ timestampMs: string;
1915
+ /** Unique identifier for a given Organization. */
1916
+ organizationId: string;
1917
+ parameters: v1Oauth2AuthenticateIntent;
1918
+ };
1919
+ export type v1Oauth2AuthenticateResult = {
1920
+ /** Base64 encoded OIDC token issued by Turnkey to be used with the LoginWithOAuth activity */
1921
+ oidcToken: string;
1922
+ };
1923
+ export type v1Oauth2Credential = {
1924
+ /** Unique identifier for a given OAuth 2.0 Credential. */
1925
+ oauth2CredentialId: string;
1926
+ /** Unique identifier for an Organization. */
1927
+ organizationId: string;
1928
+ /** The provider for a given OAuth 2.0 Credential. */
1929
+ provider: v1Oauth2Provider;
1930
+ /** The client id for a given OAuth 2.0 Credential. */
1931
+ clientId: string;
1932
+ /** The encrypted client secret for a given OAuth 2.0 Credential encrypted to the TLS Fetcher quorum key. */
1933
+ encryptedClientSecret: string;
1934
+ createdAt: externaldatav1Timestamp;
1935
+ updatedAt: externaldatav1Timestamp;
1936
+ };
1937
+ export type v1Oauth2Provider = "OAUTH2_PROVIDER_X" | "OAUTH2_PROVIDER_DISCORD";
1843
1938
  export type v1OauthIntent = {
1844
1939
  /** Base64 encoded OIDC token */
1845
1940
  oidcToken: string;
@@ -2174,6 +2269,10 @@ export type v1Result = {
2174
2269
  enableAuthProxyResult?: v1EnableAuthProxyResult;
2175
2270
  disableAuthProxyResult?: v1DisableAuthProxyResult;
2176
2271
  updateAuthProxyConfigResult?: v1UpdateAuthProxyConfigResult;
2272
+ createOauth2CredentialResult?: v1CreateOauth2CredentialResult;
2273
+ updateOauth2CredentialResult?: v1UpdateOauth2CredentialResult;
2274
+ deleteOauth2CredentialResult?: v1DeleteOauth2CredentialResult;
2275
+ oauth2AuthenticateResult?: v1Oauth2AuthenticateResult;
2177
2276
  };
2178
2277
  export type v1RootUserParams = {
2179
2278
  /** Human-readable name for a User. */
@@ -2413,11 +2512,35 @@ export type v1UpdateAuthProxyConfigIntent = {
2413
2512
  otpAlphanumeric?: boolean;
2414
2513
  /** Desired OTP code length (6–9). */
2415
2514
  otpLength?: number;
2515
+ /** A map of OAuth 2.0 provider and their respective credential ID to use for the OAuth 2.0 authentication flow. */
2516
+ oauth2ProviderCredentialIds?: Record<string, any>;
2416
2517
  };
2417
2518
  export type v1UpdateAuthProxyConfigResult = {
2418
2519
  /** Unique identifier for a given User. (representing the turnkey signer user id) */
2419
2520
  configId?: string;
2420
2521
  };
2522
+ export type v1UpdateOauth2CredentialIntent = {
2523
+ /** The ID of the OAuth 2.0 credential to update */
2524
+ oauth2CredentialId: string;
2525
+ /** The OAuth 2.0 provider */
2526
+ provider: v1Oauth2Provider;
2527
+ /** The Client ID issued by the OAuth 2.0 provider */
2528
+ clientId: string;
2529
+ /** The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key */
2530
+ encryptedClientSecret: string;
2531
+ };
2532
+ export type v1UpdateOauth2CredentialRequest = {
2533
+ type: string;
2534
+ /** Timestamp (in milliseconds) of the request, used to verify liveness of user requests. */
2535
+ timestampMs: string;
2536
+ /** Unique identifier for a given Organization. */
2537
+ organizationId: string;
2538
+ parameters: v1UpdateOauth2CredentialIntent;
2539
+ };
2540
+ export type v1UpdateOauth2CredentialResult = {
2541
+ /** Unique identifier of the OAuth 2.0 credential that was updated */
2542
+ oauth2CredentialId: string;
2543
+ };
2421
2544
  export type v1UpdatePolicyIntent = {
2422
2545
  /** Unique identifier for a given Policy. */
2423
2546
  policyId: string;
@@ -2868,6 +2991,17 @@ export type TGetAuthenticatorsBody = {
2868
2991
  export type TGetAuthenticatorsInput = {
2869
2992
  body: TGetAuthenticatorsBody;
2870
2993
  };
2994
+ export type TGetOauth2CredentialResponse = {
2995
+ oauth2Credential: v1Oauth2Credential;
2996
+ };
2997
+ export type TGetOauth2CredentialBody = {
2998
+ organizationId?: string;
2999
+ /** Unique identifier for a given OAuth 2.0 Credential. */
3000
+ oauth2CredentialId: string;
3001
+ };
3002
+ export type TGetOauth2CredentialInput = {
3003
+ body: TGetOauth2CredentialBody;
3004
+ };
2871
3005
  export type TGetOauthProvidersResponse = {
2872
3006
  /** A list of Oauth providers. */
2873
3007
  oauthProviders: v1OauthProvider[];
@@ -3003,6 +3137,15 @@ export type TGetActivitiesBody = {
3003
3137
  export type TGetActivitiesInput = {
3004
3138
  body: TGetActivitiesBody;
3005
3139
  };
3140
+ export type TListOauth2CredentialsResponse = {
3141
+ oauth2Credentials: v1Oauth2Credential[];
3142
+ };
3143
+ export type TListOauth2CredentialsBody = {
3144
+ organizationId?: string;
3145
+ };
3146
+ export type TListOauth2CredentialsInput = {
3147
+ body: TListOauth2CredentialsBody;
3148
+ };
3006
3149
  export type TGetPoliciesResponse = {
3007
3150
  /** A list of policies. */
3008
3151
  policies: v1Policy[];
@@ -3209,6 +3352,24 @@ export type TCreateInvitationsBody = {
3209
3352
  export type TCreateInvitationsInput = {
3210
3353
  body: TCreateInvitationsBody;
3211
3354
  };
3355
+ export type TCreateOauth2CredentialResponse = {
3356
+ activity: v1Activity;
3357
+ /** Unique identifier of the OAuth 2.0 credential that was created */
3358
+ oauth2CredentialId: string;
3359
+ };
3360
+ export type TCreateOauth2CredentialBody = {
3361
+ timestampMs?: string;
3362
+ organizationId?: string;
3363
+ /** The OAuth 2.0 provider */
3364
+ provider: v1Oauth2Provider;
3365
+ /** The Client ID issued by the OAuth 2.0 provider */
3366
+ clientId: string;
3367
+ /** The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key */
3368
+ encryptedClientSecret: string;
3369
+ };
3370
+ export type TCreateOauth2CredentialInput = {
3371
+ body: TCreateOauth2CredentialBody;
3372
+ };
3212
3373
  export type TCreateOauthProvidersResponse = {
3213
3374
  activity: v1Activity;
3214
3375
  /** A list of unique identifiers for Oauth Providers */
@@ -3512,6 +3673,20 @@ export type TDeleteInvitationBody = {
3512
3673
  export type TDeleteInvitationInput = {
3513
3674
  body: TDeleteInvitationBody;
3514
3675
  };
3676
+ export type TDeleteOauth2CredentialResponse = {
3677
+ activity: v1Activity;
3678
+ /** Unique identifier of the OAuth 2.0 credential that was deleted */
3679
+ oauth2CredentialId: string;
3680
+ };
3681
+ export type TDeleteOauth2CredentialBody = {
3682
+ timestampMs?: string;
3683
+ organizationId?: string;
3684
+ /** The ID of the OAuth 2.0 credential to delete */
3685
+ oauth2CredentialId: string;
3686
+ };
3687
+ export type TDeleteOauth2CredentialInput = {
3688
+ body: TDeleteOauth2CredentialBody;
3689
+ };
3515
3690
  export type TDeleteOauthProvidersResponse = {
3516
3691
  activity: v1Activity;
3517
3692
  /** A list of unique identifiers for Oauth Providers */
@@ -3956,6 +4131,28 @@ export type TOauthBody = {
3956
4131
  export type TOauthInput = {
3957
4132
  body: TOauthBody;
3958
4133
  };
4134
+ export type TOauth2AuthenticateResponse = {
4135
+ activity: v1Activity;
4136
+ /** Base64 encoded OIDC token issued by Turnkey to be used with the LoginWithOAuth activity */
4137
+ oidcToken: string;
4138
+ };
4139
+ export type TOauth2AuthenticateBody = {
4140
+ timestampMs?: string;
4141
+ organizationId?: string;
4142
+ /** The OAuth 2.0 credential id whose client_id and client_secret will be used in the OAuth 2.0 flow */
4143
+ oauth2CredentialId: string;
4144
+ /** The auth_code provided by the OAuth 2.0 provider to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow */
4145
+ authCode: string;
4146
+ /** The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider */
4147
+ redirectUri: string;
4148
+ /** The code verifier used by OAuth 2.0 PKCE providers */
4149
+ codeVerifier: string;
4150
+ /** An optional nonce used by the client to prevent replay/substitution of an ID token */
4151
+ nonce?: string;
4152
+ };
4153
+ export type TOauth2AuthenticateInput = {
4154
+ body: TOauth2AuthenticateBody;
4155
+ };
3959
4156
  export type TOauthLoginResponse = {
3960
4157
  activity: v1Activity;
3961
4158
  /** Signed JWT containing an expiry, public key, session type, user id, and organization id */
@@ -4159,6 +4356,26 @@ export type TStampLoginBody = {
4159
4356
  export type TStampLoginInput = {
4160
4357
  body: TStampLoginBody;
4161
4358
  };
4359
+ export type TUpdateOauth2CredentialResponse = {
4360
+ activity: v1Activity;
4361
+ /** Unique identifier of the OAuth 2.0 credential that was updated */
4362
+ oauth2CredentialId: string;
4363
+ };
4364
+ export type TUpdateOauth2CredentialBody = {
4365
+ timestampMs?: string;
4366
+ organizationId?: string;
4367
+ /** The ID of the OAuth 2.0 credential to update */
4368
+ oauth2CredentialId: string;
4369
+ /** The OAuth 2.0 provider */
4370
+ provider: v1Oauth2Provider;
4371
+ /** The Client ID issued by the OAuth 2.0 provider */
4372
+ clientId: string;
4373
+ /** The client secret issued by the OAuth 2.0 provider encrypted to the TLS Fetcher quorum key */
4374
+ encryptedClientSecret: string;
4375
+ };
4376
+ export type TUpdateOauth2CredentialInput = {
4377
+ body: TUpdateOauth2CredentialBody;
4378
+ };
4162
4379
  export type TUpdatePolicyResponse = {
4163
4380
  activity: v1Activity;
4164
4381
  /** Unique identifier for a given Policy. */
@@ -4371,6 +4588,25 @@ export type ProxyTGetAccountBody = {
4371
4588
  export type ProxyTGetAccountInput = {
4372
4589
  body: ProxyTGetAccountBody;
4373
4590
  };
4591
+ export type ProxyTOAuth2AuthenticateResponse = {
4592
+ /** A Turnkey issued OIDC token to be used with the LoginWithOAuth activity */
4593
+ oidcToken: string;
4594
+ };
4595
+ export type ProxyTOAuth2AuthenticateBody = {
4596
+ /** The OAuth 2.0 provider to authenticate with */
4597
+ provider: v1Oauth2Provider;
4598
+ /** The auth_code provided by the OAuth 2.0 to the end user to be exchanged for a Bearer token in the OAuth 2.0 flow */
4599
+ authCode: string;
4600
+ /** The URI the user is redirected to after they have authenticated with the OAuth 2.0 provider */
4601
+ redirectUri: string;
4602
+ /** The code verifier used by OAuth 2.0 PKCE providers */
4603
+ codeVerifier: string;
4604
+ /** An optional nonce used by the client to prevent replay/substitution of an ID token */
4605
+ nonce?: string;
4606
+ };
4607
+ export type ProxyTOAuth2AuthenticateInput = {
4608
+ body: ProxyTOAuth2AuthenticateBody;
4609
+ };
4374
4610
  export type ProxyTOAuthLoginResponse = {
4375
4611
  /** Signed JWT containing an expiry, public key, session type, user id, and organization id */
4376
4612
  session: string;