@cubist-labs/cubesigner-sdk 0.4.259 → 0.4.260

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/src/schema.ts CHANGED
@@ -884,6 +884,12 @@ export interface paths {
884
884
  * but extends the output with an `id_token`.
885
885
  *
886
886
  * This `id_token` can then be used with any CubeSigner endpoint that requires an OIDC token.
887
+ * Callers must request *at least* scopes `tweet.read` and `users.read` during auth with twitter.
888
+ *
889
+ * By default, the id token does not contain a confirmed email;
890
+ * callers can request this field be populated by requesting the `users.email` scope
891
+ * and adding `fetch_email` as a URL parameter to this route.
892
+ *
887
893
  *
888
894
  * > [!IMPORTANT]
889
895
  * > This endpoint will fail unless the org is configured to allow the issuer `https://shim.oauth2.cubist.dev/twitter` and client ID being used for Twitter.
@@ -947,6 +953,33 @@ export interface paths {
947
953
  */
948
954
  patch: operations["siweComplete"];
949
955
  };
956
+ "/v0/org/{org_id}/oidc/siws": {
957
+ /**
958
+ * Initiate login via Sign-in With Solana (SIWS).
959
+ * @description Initiate login via Sign-in With Solana (SIWS).
960
+ *
961
+ * This endpoint generates a challenge which can be answered (via the corresponding PATCH endpoint)
962
+ * to obtain an OIDC token. The OIDC token can then be exchanged for a user session via the standard
963
+ * OIDC auth route.
964
+ *
965
+ * > [!IMPORTANT]
966
+ * > For this endpoint to succeed, the org must be configured to:
967
+ * > Allow the issuer `https://shim.oauth2.cubist.dev/siws` with the Org ID as the client ID
968
+ */
969
+ post: operations["siwsInit"];
970
+ /**
971
+ * Complete login via Sign-in With Solana (SIWS)
972
+ * @description Complete login via Sign-in With Solana (SIWS)
973
+ *
974
+ * If the challenge (issued by the corresponding POST endpoint) is answered correctly, this endpoint
975
+ * generates an OIDC token that can then be exchanged for a user session via the standard OIDC auth route.
976
+ *
977
+ * > [!IMPORTANT]
978
+ * > For this endpoint to succeed, the org must be configured to:
979
+ * > Allow the issuer `https://shim.oauth2.cubist.dev/siws` with the Org ID as the client ID
980
+ */
981
+ patch: operations["siwsComplete"];
982
+ };
950
983
  "/v0/org/{org_id}/oidc/telegram": {
951
984
  /**
952
985
  * Allows a user to authenticate with the telegram API using the tgWebAppData value
@@ -1310,6 +1343,13 @@ export interface paths {
1310
1343
  *
1311
1344
  * If a `role` query parameter is provided, **ALL** session for **THAT ROLE** are revoked
1312
1345
  * (if the current user has permissions to revoke sessions for the role).
1346
+ *
1347
+ * If a `role_created_by` query parameter is provided, **ROLE** sessions created by **THAT USER**
1348
+ * are revoked (gated by the same permissions as revoking that user's own sessions: the current
1349
+ * user must be that user or an org owner). User sessions are not affected. Unless the current
1350
+ * user is an org owner, only sessions for roles the current user is **still a member of** are
1351
+ * revoked (so a user cannot revoke sessions for a role they have since been removed from); org
1352
+ * owners revoke across all roles.
1313
1353
  */
1314
1354
  delete: operations["revokeSessions"];
1315
1355
  };
@@ -2870,6 +2910,8 @@ export interface components {
2870
2910
  | "KeyNotFound"
2871
2911
  | "SiweChallengeNotFound"
2872
2912
  | "SiweInvalidRequest"
2913
+ | "SiwsChallengeNotFound"
2914
+ | "SiwsInvalidRequest"
2873
2915
  | "UserExportDerivedKey"
2874
2916
  | "UserExportPublicKeyInvalid"
2875
2917
  | "NistP256PublicKeyInvalid"
@@ -2930,6 +2972,7 @@ export interface components {
2930
2972
  | "LimitWindowTooLong"
2931
2973
  | "Erc20ContractDisallowed"
2932
2974
  | "EmptyRuleError"
2975
+ | "PolicyFieldValidationError"
2933
2976
  | "OptionalListEmpty"
2934
2977
  | "MultipleExclusiveFieldsProvided"
2935
2978
  | "DuplicateFieldEntry"
@@ -3014,6 +3057,7 @@ export interface components {
3014
3057
  | "InvalidPolicyReference"
3015
3058
  | "PolicyEngineDisabled"
3016
3059
  | "InvalidWasmPolicy"
3060
+ | "CelProgramTooLarge"
3017
3061
  | "InvalidPolicy"
3018
3062
  | "RedundantDerivationPath"
3019
3063
  | "ImportKeyMissing"
@@ -3192,6 +3236,8 @@ export interface components {
3192
3236
  | "EmailOtpAuth"
3193
3237
  | "SiweInit"
3194
3238
  | "SiweComplete"
3239
+ | "SiwsInit"
3240
+ | "SiwsComplete"
3195
3241
  | "TelegramAuth"
3196
3242
  | "CreateOidcUser"
3197
3243
  | "DeleteOidcUser"
@@ -3212,6 +3258,7 @@ export interface components {
3212
3258
  | "RpcGetTransaction"
3213
3259
  | "RpcListTransactions"
3214
3260
  | "RpcRetryTransaction"
3261
+ | "RpcCancelTransaction"
3215
3262
  | "RpcBinance"
3216
3263
  | "RpcBybit"
3217
3264
  | "RpcCoinbase"
@@ -3273,6 +3320,18 @@ export interface components {
3273
3320
  recvWindow?: number | null;
3274
3321
  };
3275
3322
  /** @description Parameters envelope for all Binance RPC methods. */
3323
+ BinanceDepositHistoryParams: components["schemas"]["DepositHistoryRequest"] & {
3324
+ dryRun?: components["schemas"]["BinanceDryRunMode"] | null;
3325
+ keyId: components["schemas"]["Id"];
3326
+ /**
3327
+ * Format: float
3328
+ * @description Optional "receive window", i.e., for how long the request stays valid.
3329
+ * May only be specified in milliseconds, with up to three decimal places of precision.
3330
+ * If omitted, defaults to 10000. Must not be greater than 60000.
3331
+ */
3332
+ recvWindow?: number | null;
3333
+ };
3334
+ /** @description Parameters envelope for all Binance RPC methods. */
3276
3335
  BinanceDepositParams: components["schemas"]["DepositRequest"] & {
3277
3336
  dryRun?: components["schemas"]["BinanceDryRunMode"] | null;
3278
3337
  keyId: components["schemas"]["Id"];
@@ -3362,6 +3421,11 @@ export interface components {
3362
3421
  method: "cs_binanceDeposit";
3363
3422
  params: components["schemas"]["BinanceDepositParams"];
3364
3423
  }
3424
+ | {
3425
+ /** @enum {string} */
3426
+ method: "cs_binanceDepositHistory";
3427
+ params: components["schemas"]["BinanceDepositHistoryParams"];
3428
+ }
3365
3429
  | {
3366
3430
  /** @enum {string} */
3367
3431
  method: "cs_binanceListSubAccounts";
@@ -4250,6 +4314,11 @@ export interface components {
4250
4314
  CancelInvitationRequest: {
4251
4315
  email: components["schemas"]["Email"];
4252
4316
  };
4317
+ /** @description Parameters for the [`cs_cancelTransaction`](RpcMethod::CancelTransaction) method. */
4318
+ CancelTransactionRequest: {
4319
+ /** @description The transaction id. */
4320
+ id: string;
4321
+ };
4253
4322
  /**
4254
4323
  * @description Supported Canton environments.
4255
4324
  * @enum {string}
@@ -4400,6 +4469,8 @@ export interface components {
4400
4469
  withdrawFee?: string | null;
4401
4470
  /** @description Step size for withdrawal amounts, as a decimal string. */
4402
4471
  withdrawIntegerMultiple?: string | null;
4472
+ /** @description Minimum internal transfer amount */
4473
+ withdrawInternalMin?: string | null;
4403
4474
  /** @description Maximum withdrawal amount, as a decimal string. */
4404
4475
  withdrawMax?: string | null;
4405
4476
  /** @description Minimum withdrawal amount, as a decimal string. */
@@ -4990,6 +5061,11 @@ export interface components {
4990
5061
  method: "cs_retryTransaction";
4991
5062
  params: components["schemas"]["RetryTransactionRequest"];
4992
5063
  },
5064
+ {
5065
+ /** @enum {string} */
5066
+ method: "cs_cancelTransaction";
5067
+ params: components["schemas"]["CancelTransactionRequest"];
5068
+ },
4993
5069
  {
4994
5070
  /** @enum {string} */
4995
5071
  method: "cs_getTransaction";
@@ -5034,6 +5110,121 @@ export interface components {
5034
5110
  /** @description Custom EVM chains. */
5035
5111
  evm: components["schemas"]["EvmCustomChain"][];
5036
5112
  };
5113
+ /** @description One deposit entry in [`DepositHistoryResponse`]. */
5114
+ DepositHistoryEntry: {
5115
+ /** @description Destination address the deposit was sent to. */
5116
+ address: string;
5117
+ /**
5118
+ * @description Secondary address identifier (e.g. memo for XRP, tag for XLM). Empty
5119
+ * string when the asset does not use one.
5120
+ */
5121
+ addressTag?: string | null;
5122
+ /** @description Deposit amount, as a decimal string. */
5123
+ amount: string;
5124
+ /** @description Asset symbol (e.g. `"USDT"`, `"BTC"`). */
5125
+ coin: string;
5126
+ /**
5127
+ * Format: int64
5128
+ * @description Represents deposit completion datetime, available for deposits after 6-Mar-2025.
5129
+ */
5130
+ completeTime?: number | null;
5131
+ /** @description On-chain confirmation progress (e.g. `"1/1"`). */
5132
+ confirmTimes?: string | null;
5133
+ /** @description Binance-assigned deposit id. */
5134
+ id?: string | null;
5135
+ /**
5136
+ * Format: int64
5137
+ * @description Time the deposit record was created (ms since epoch).
5138
+ */
5139
+ insertTime: number;
5140
+ /** @description Blockchain network identifier (e.g. `"BSC"`, `"ETH"`). */
5141
+ network: string;
5142
+ /** @description Returned when 'includeSource' in the request is set to true */
5143
+ sourceAddress?: string | null;
5144
+ /**
5145
+ * Format: int32
5146
+ * @description Deposit status. Binance values: `0` = pending, `6` = credited but
5147
+ * cannot withdraw, `7` = wrong deposit, `8` = waiting user confirm,
5148
+ * `1` = success. Left as `u8` for forward compatibility.
5149
+ */
5150
+ status: number;
5151
+ /**
5152
+ * Format: int32
5153
+ * @description `0` = external transfer, `1` = internal (Binance↔Binance) transfer.
5154
+ */
5155
+ transferType: number;
5156
+ /**
5157
+ * Format: int32
5158
+ * @description 0: travel rule not required OR info already provided and funds ready to use;
5159
+ * 1: travel rule required to provide deposit info
5160
+ */
5161
+ travelRuleStatus: number;
5162
+ /** @description On-chain transaction hash of the deposit. */
5163
+ txId: string;
5164
+ /**
5165
+ * Format: int32
5166
+ * @description Confirmations after which the deposit is unlocked for trading.
5167
+ */
5168
+ unlockConfirm?: number | null;
5169
+ /**
5170
+ * Format: int32
5171
+ * @description Destination wallet: `0` = spot wallet, `1` = funding wallet.
5172
+ */
5173
+ walletType: number;
5174
+ };
5175
+ /**
5176
+ * @description Parameters for `GET /sapi/v1/capital/deposit/hisrec`.
5177
+ *
5178
+ * Returns the calling account's deposit history. All filters are optional;
5179
+ * if `start_time`/`end_time` are omitted, Binance returns the most recent 90
5180
+ * days. Use `tx_id` to look up a specific deposit by its on-chain
5181
+ * transaction hash, or `coin`/`status` to narrow the result set.
5182
+ */
5183
+ DepositHistoryRequest: {
5184
+ /** @description Filter to a specific asset (e.g. `"USDT"`, `"BTC"`). */
5185
+ coin?: string | null;
5186
+ /**
5187
+ * Format: int64
5188
+ * @description Window end (ms since epoch, Binance default: present timestamp).
5189
+ */
5190
+ endTime?: number | null;
5191
+ /**
5192
+ * @description If `true`, include the deposit's source address in each entry. Binance
5193
+ * defaults to `false`.
5194
+ */
5195
+ includeSource?: boolean | null;
5196
+ /**
5197
+ * Format: int32
5198
+ * @description Page size (Binance default and max: 1000).
5199
+ */
5200
+ limit?: number | null;
5201
+ /**
5202
+ * Format: int32
5203
+ * @description Pagination offset (Binance default: 0).
5204
+ */
5205
+ offset?: number | null;
5206
+ /**
5207
+ * Format: int64
5208
+ * @description Window start (ms since epoch, Binance default: 90 days from current timestamp).
5209
+ */
5210
+ startTime?: number | null;
5211
+ /**
5212
+ * Format: int32
5213
+ * @description Filter by deposit status. Binance values: `0` = pending, `6` = credited
5214
+ * but cannot withdraw, `7` = wrong deposit, `8` = waiting user confirm,
5215
+ * `1` = success, `2` = rejected. Left as `u8` for forward compatibility.
5216
+ */
5217
+ status?: number | null;
5218
+ /** @description Look up a specific deposit by its on-chain transaction hash. */
5219
+ txId?: string | null;
5220
+ };
5221
+ /**
5222
+ * @description Response returned by `cs_binanceDepositHistory`.
5223
+ *
5224
+ * Binance returns a top-level JSON array; this newtype preserves that wire
5225
+ * format while giving the response a named type in the OpenAPI schema.
5226
+ */
5227
+ DepositHistoryResponse: components["schemas"]["DepositHistoryEntry"][];
5037
5228
  /**
5038
5229
  * @description Parameters for `GET /sapi/v1/capital/deposit/address`.
5039
5230
  *
@@ -5917,6 +6108,7 @@ export interface components {
5917
6108
  | "sign:binance:withdraw"
5918
6109
  | "sign:binance:withdrawHistory"
5919
6110
  | "sign:binance:deposit"
6111
+ | "sign:binance:depositHistory"
5920
6112
  | "sign:binance:listSubAccounts"
5921
6113
  | "sign:binance:coinInfo"
5922
6114
  | "sign:bybit:*"
@@ -6161,6 +6353,7 @@ export interface components {
6161
6353
  | "rpc:createTransaction:*"
6162
6354
  | "rpc:createTransaction:evm"
6163
6355
  | "rpc:retryTransaction"
6356
+ | "rpc:cancelTransaction"
6164
6357
  | "rpc:getTransaction"
6165
6358
  | "rpc:listTransactions"
6166
6359
  | "rpc:binance"
@@ -6313,6 +6506,8 @@ export interface components {
6313
6506
  | "SiweChallengeExpired"
6314
6507
  | "SiweMessageNotValid"
6315
6508
  | "SiweMessageInvalidSignature"
6509
+ | "SiwsChallengeExpired"
6510
+ | "SiwsMessageInvalid"
6316
6511
  | "Acl";
6317
6512
  /**
6318
6513
  * @description Specifies a fork of the `BeaconChain`, to prevent replay attacks.
@@ -6861,6 +7056,7 @@ export interface components {
6861
7056
  | components["schemas"]["WithdrawResponse"]
6862
7057
  | components["schemas"]["WithdrawHistoryResponse"]
6863
7058
  | components["schemas"]["DepositResponse"]
7059
+ | components["schemas"]["DepositHistoryResponse"]
6864
7060
  | components["schemas"]["ListSubAccountsResponse"]
6865
7061
  | components["schemas"]["CoinInfoResponse"]
6866
7062
  | components["schemas"]["BybitQueryUserResponse"]
@@ -7590,6 +7786,7 @@ export interface components {
7590
7786
  | "BinanceWithdraw"
7591
7787
  | "BinanceWithdrawHistory"
7592
7788
  | "BinanceDeposit"
7789
+ | "BinanceDepositHistory"
7593
7790
  | "BinanceListSubAccounts"
7594
7791
  | "BinanceCoinInfo"
7595
7792
  | "BlobSign"
@@ -8629,6 +8826,7 @@ export interface components {
8629
8826
  | "PsbtSigningDisallowed"
8630
8827
  | "BabylonStakingDisallowed"
8631
8828
  | "TimeLocked"
8829
+ | "CelPolicyDenied"
8632
8830
  | "BabylonStakingNetwork"
8633
8831
  | "BabylonStakingParamsVersion"
8634
8832
  | "BabylonStakingExplicitParams"
@@ -8648,7 +8846,8 @@ export interface components {
8648
8846
  | "WasmPolicyDenied"
8649
8847
  | "WasmPolicyFailed"
8650
8848
  | "WebhookPoliciesDisabled"
8651
- | "DeniedByWebhook";
8849
+ | "DeniedByWebhook"
8850
+ | "ExplicitlyDenied";
8652
8851
  /** @description A struct containing all the information about a specific version of a policy. */
8653
8852
  PolicyInfo: {
8654
8853
  /** @description The access-control entries for the policy. */
@@ -9401,13 +9600,9 @@ export interface components {
9401
9600
  | components["schemas"]["SignerClientErrorCode"]
9402
9601
  | components["schemas"]["RpcEvmErrorCode"];
9403
9602
  /** @enum {string} */
9404
- RpcApiErrorOwnCodes: "MfaRequired" | "ConcurrentTransactionFailed";
9603
+ RpcApiErrorOwnCodes: "MfaRequired" | "ConcurrentTransactionFailed" | "InvalidTxStatus";
9405
9604
  /** @enum {string} */
9406
- RpcEvmErrorCode:
9407
- | "SubmissionFailed"
9408
- | "FailedToReserveNonce"
9409
- | "InvalidTxStatus"
9410
- | "MissingTxFrom";
9605
+ RpcEvmErrorCode: "SubmissionFailed" | "FailedToReserveNonce" | "MissingTxField" | "Signer";
9411
9606
  /**
9412
9607
  * @description The RPC API method and matching parameters.
9413
9608
  *
@@ -9578,6 +9773,37 @@ export interface components {
9578
9773
  /** @description Optional policy evaluation tree, if requested */
9579
9774
  policy_eval_tree?: unknown;
9580
9775
  };
9776
+ /**
9777
+ * @description The structured input to a Sign-In With Solana request (`SolanaSignInInput` in the spec).
9778
+ *
9779
+ * The relying party fills in `domain`/`address`/`uri`/... and the wallet renders it into the
9780
+ * human-readable message (see [SignInInput::to_message_text]) that it signs.
9781
+ */
9782
+ SignInInput: {
9783
+ /** @description The base58-encoded Solana (ed25519) public key performing the sign-in. */
9784
+ address: string;
9785
+ chainId?: components["schemas"]["SolanaNetwork"] | null;
9786
+ /** @description The RFC 3986 authority that is requesting the sign-in. */
9787
+ domain: string;
9788
+ /** @description The ISO 8601 datetime string after which the signed message is no longer valid. */
9789
+ expirationTime?: string | null;
9790
+ /** @description The ISO 8601 datetime string of the time the message was issued. */
9791
+ issuedAt?: string | null;
9792
+ /** @description A randomized token used to prevent replay attacks; at least 8 alphanumeric characters. */
9793
+ nonce?: string | null;
9794
+ /** @description The ISO 8601 datetime string before which the signed message is not yet valid. */
9795
+ notBefore?: string | null;
9796
+ /** @description A system-specific identifier that may be used to uniquely refer to the sign-in request. */
9797
+ requestId?: string | null;
9798
+ /** @description A list of RFC 3986 URIs the user wishes to have resolved as part of the authentication. */
9799
+ resources?: string[] | null;
9800
+ /** @description A human-readable ASCII assertion that the user will sign; must not contain a newline. */
9801
+ statement?: string | null;
9802
+ /** @description An RFC 3986 URI referring to the resource that is the subject of the sign-in. */
9803
+ uri?: string | null;
9804
+ /** @description The version of the message (currently always `1`). */
9805
+ version?: string | null;
9806
+ };
9581
9807
  SignResponse: {
9582
9808
  /** @description Optional policy evaluation tree. */
9583
9809
  policy_eval_tree?: unknown;
@@ -9686,6 +9912,56 @@ export interface components {
9686
9912
  /** @description The message to sign following the EIP-191 standard. */
9687
9913
  message: string;
9688
9914
  };
9915
+ /** @description Answer to a Sign-in with Solana challenge. */
9916
+ SiwsCompleteRequest: {
9917
+ challenge_id: components["schemas"]["Id"];
9918
+ /** @description The base58-encoded ed25519 signature of `signed_message`. */
9919
+ signature: string;
9920
+ /** @description The base58-encoded UTF-8 bytes of the message that was signed (the rendered `SignInInput`). */
9921
+ signed_message: string;
9922
+ };
9923
+ /** @description Returned upon a successful SIWS authentication. */
9924
+ SiwsCompleteResponse: {
9925
+ /** @description The OIDC token corresponding to the user with the requested SIWS identity. */
9926
+ id_token: string;
9927
+ };
9928
+ /**
9929
+ * @description Initialize the request to sign in with Solana. The response will contain a structured
9930
+ * `SignInInput` that the client must render to text, sign, and submit via the corresponding PATCH
9931
+ * endpoint within 5 minutes.
9932
+ */
9933
+ SiwsInitRequest: {
9934
+ /** @description The base58-encoded Solana (ed25519) public key performing the signing. */
9935
+ address: string;
9936
+ chain_id?: components["schemas"]["SolanaNetwork"] | null;
9937
+ /** @description The RFC 3986 authority that is requesting the signing. */
9938
+ domain: string;
9939
+ /** @description The ISO 8601 datetime string that, if present, indicates when the signed authentication message is no longer valid. */
9940
+ expiration_time?: string | null;
9941
+ /** @description The ISO 8601 datetime string that, if present, indicates when the signed authentication message will become valid. */
9942
+ not_before?: string | null;
9943
+ /** @description A system-specific identifier that may be used to uniquely refer to the sign-in request. */
9944
+ request_id?: string | null;
9945
+ /** @description A list of RFC 3986 URIs the user wishes to have resolved as part of authentication by the relying party. */
9946
+ resources?: string[];
9947
+ /** @description A human-readable ASCII assertion that the user will sign, and it must not contain '\n' (the byte 0x0a). */
9948
+ statement?: string | null;
9949
+ /** @description An RFC 3986 URI referring to the resource that is the subject of the signing (as in the subject of a claim). */
9950
+ uri?: string | null;
9951
+ };
9952
+ /**
9953
+ * @description A challenge returned in response to a Sign-In with Solana request.
9954
+ *
9955
+ * Contains a structured [SignInInput] that the client must render to its canonical text and sign
9956
+ * (ed25519) with the requested key in order to complete authentication.
9957
+ *
9958
+ * The client has until the message expires (but no more than 5 minutes) to complete the challenge.
9959
+ */
9960
+ SiwsInitResponse: {
9961
+ /** @description The ID of the challenge (to include in the request when calling the PATCH ('complete') endpoint) */
9962
+ challenge_id: string;
9963
+ sign_in_input: components["schemas"]["SignInInput"];
9964
+ };
9689
9965
  /** @description A Solana address and the cluster it is on. */
9690
9966
  SolanaAddressInfo: {
9691
9967
  /**
@@ -9700,6 +9976,19 @@ export interface components {
9700
9976
  * @enum {string}
9701
9977
  */
9702
9978
  SolanaCluster: "mainnet" | "devnet";
9979
+ /**
9980
+ * @description The Solana network a SIWS message is bound to (the `Chain ID` field).
9981
+ * @enum {string}
9982
+ */
9983
+ SolanaNetwork:
9984
+ | "mainnet"
9985
+ | "testnet"
9986
+ | "devnet"
9987
+ | "localnet"
9988
+ | "solana:mainnet"
9989
+ | "solana:testnet"
9990
+ | "solana:devnet"
9991
+ | "solana:localnet";
9703
9992
  /**
9704
9993
  * @description Solana signing request
9705
9994
  * @example {
@@ -12996,6 +13285,32 @@ export interface components {
12996
13285
  };
12997
13286
  };
12998
13287
  };
13288
+ /** @description Returned upon a successful SIWS authentication. */
13289
+ SiwsCompleteResponse: {
13290
+ content: {
13291
+ "application/json": {
13292
+ /** @description The OIDC token corresponding to the user with the requested SIWS identity. */
13293
+ id_token: string;
13294
+ };
13295
+ };
13296
+ };
13297
+ /**
13298
+ * @description A challenge returned in response to a Sign-In with Solana request.
13299
+ *
13300
+ * Contains a structured [SignInInput] that the client must render to its canonical text and sign
13301
+ * (ed25519) with the requested key in order to complete authentication.
13302
+ *
13303
+ * The client has until the message expires (but no more than 5 minutes) to complete the challenge.
13304
+ */
13305
+ SiwsInitResponse: {
13306
+ content: {
13307
+ "application/json": {
13308
+ /** @description The ID of the challenge (to include in the request when calling the PATCH ('complete') endpoint) */
13309
+ challenge_id: string;
13310
+ sign_in_input: components["schemas"]["SignInInput"];
13311
+ };
13312
+ };
13313
+ };
12999
13314
  StakeResponse: {
13000
13315
  content: {
13001
13316
  "application/json": ({
@@ -16155,12 +16470,21 @@ export interface operations {
16155
16470
  * but extends the output with an `id_token`.
16156
16471
  *
16157
16472
  * This `id_token` can then be used with any CubeSigner endpoint that requires an OIDC token.
16473
+ * Callers must request *at least* scopes `tweet.read` and `users.read` during auth with twitter.
16474
+ *
16475
+ * By default, the id token does not contain a confirmed email;
16476
+ * callers can request this field be populated by requesting the `users.email` scope
16477
+ * and adding `fetch_email` as a URL parameter to this route.
16478
+ *
16158
16479
  *
16159
16480
  * > [!IMPORTANT]
16160
16481
  * > This endpoint will fail unless the org is configured to allow the issuer `https://shim.oauth2.cubist.dev/twitter` and client ID being used for Twitter.
16161
16482
  */
16162
16483
  oauth2Twitter: {
16163
16484
  parameters: {
16485
+ query?: {
16486
+ fetch_email?: boolean | null;
16487
+ };
16164
16488
  path: {
16165
16489
  /**
16166
16490
  * @description Name or ID of the desired Org
@@ -16333,6 +16657,77 @@ export interface operations {
16333
16657
  };
16334
16658
  };
16335
16659
  };
16660
+ /**
16661
+ * Initiate login via Sign-in With Solana (SIWS).
16662
+ * @description Initiate login via Sign-in With Solana (SIWS).
16663
+ *
16664
+ * This endpoint generates a challenge which can be answered (via the corresponding PATCH endpoint)
16665
+ * to obtain an OIDC token. The OIDC token can then be exchanged for a user session via the standard
16666
+ * OIDC auth route.
16667
+ *
16668
+ * > [!IMPORTANT]
16669
+ * > For this endpoint to succeed, the org must be configured to:
16670
+ * > Allow the issuer `https://shim.oauth2.cubist.dev/siws` with the Org ID as the client ID
16671
+ */
16672
+ siwsInit: {
16673
+ parameters: {
16674
+ path: {
16675
+ /**
16676
+ * @description Name or ID of the desired Org
16677
+ * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
16678
+ */
16679
+ org_id: string;
16680
+ };
16681
+ };
16682
+ requestBody: {
16683
+ content: {
16684
+ "application/json": components["schemas"]["SiwsInitRequest"];
16685
+ };
16686
+ };
16687
+ responses: {
16688
+ 200: components["responses"]["SiwsInitResponse"];
16689
+ default: {
16690
+ content: {
16691
+ "application/json": components["schemas"]["ErrorResponse"];
16692
+ };
16693
+ };
16694
+ };
16695
+ };
16696
+ /**
16697
+ * Complete login via Sign-in With Solana (SIWS)
16698
+ * @description Complete login via Sign-in With Solana (SIWS)
16699
+ *
16700
+ * If the challenge (issued by the corresponding POST endpoint) is answered correctly, this endpoint
16701
+ * generates an OIDC token that can then be exchanged for a user session via the standard OIDC auth route.
16702
+ *
16703
+ * > [!IMPORTANT]
16704
+ * > For this endpoint to succeed, the org must be configured to:
16705
+ * > Allow the issuer `https://shim.oauth2.cubist.dev/siws` with the Org ID as the client ID
16706
+ */
16707
+ siwsComplete: {
16708
+ parameters: {
16709
+ path: {
16710
+ /**
16711
+ * @description Name or ID of the desired Org
16712
+ * @example Org#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
16713
+ */
16714
+ org_id: string;
16715
+ };
16716
+ };
16717
+ requestBody: {
16718
+ content: {
16719
+ "application/json": components["schemas"]["SiwsCompleteRequest"];
16720
+ };
16721
+ };
16722
+ responses: {
16723
+ 200: components["responses"]["SiwsCompleteResponse"];
16724
+ default: {
16725
+ content: {
16726
+ "application/json": components["schemas"]["ErrorResponse"];
16727
+ };
16728
+ };
16729
+ };
16730
+ };
16336
16731
  /**
16337
16732
  * Allows a user to authenticate with the telegram API using the tgWebAppData value
16338
16733
  * @description Allows a user to authenticate with the telegram API using the tgWebAppData value
@@ -17677,16 +18072,23 @@ export interface operations {
17677
18072
  "page.start"?: string | null;
17678
18073
  /**
17679
18074
  * @description If provided, the name or ID of a role to operate on.
17680
- * Cannot be specified together with `user`.
18075
+ * Cannot be specified together with other selectors.
17681
18076
  * @example my-role
17682
18077
  */
17683
18078
  role?: string | null;
17684
18079
  /**
17685
18080
  * @description If provided, the ID of a user to operate on.
17686
- * Cannot be specified together with `role`.
18081
+ * Cannot be specified together with other selectors.
17687
18082
  * @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
17688
18083
  */
17689
18084
  user?: string | null;
18085
+ /**
18086
+ * @description If provided, the ID of the user whose created role sessions to operate on.
18087
+ * Selects all *role* sessions created by that user (user sessions are not affected).
18088
+ * Cannot be specified together with other selectors.
18089
+ * @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
18090
+ */
18091
+ role_created_by?: string | null;
17690
18092
  };
17691
18093
  path: {
17692
18094
  /**
@@ -17749,22 +18151,36 @@ export interface operations {
17749
18151
  *
17750
18152
  * If a `role` query parameter is provided, **ALL** session for **THAT ROLE** are revoked
17751
18153
  * (if the current user has permissions to revoke sessions for the role).
18154
+ *
18155
+ * If a `role_created_by` query parameter is provided, **ROLE** sessions created by **THAT USER**
18156
+ * are revoked (gated by the same permissions as revoking that user's own sessions: the current
18157
+ * user must be that user or an org owner). User sessions are not affected. Unless the current
18158
+ * user is an org owner, only sessions for roles the current user is **still a member of** are
18159
+ * revoked (so a user cannot revoke sessions for a role they have since been removed from); org
18160
+ * owners revoke across all roles.
17752
18161
  */
17753
18162
  revokeSessions: {
17754
18163
  parameters: {
17755
18164
  query?: {
17756
18165
  /**
17757
18166
  * @description If provided, the name or ID of a role to operate on.
17758
- * Cannot be specified together with `user`.
18167
+ * Cannot be specified together with other selectors.
17759
18168
  * @example my-role
17760
18169
  */
17761
18170
  role?: string | null;
17762
18171
  /**
17763
18172
  * @description If provided, the ID of a user to operate on.
17764
- * Cannot be specified together with `role`.
18173
+ * Cannot be specified together with other selectors.
17765
18174
  * @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
17766
18175
  */
17767
18176
  user?: string | null;
18177
+ /**
18178
+ * @description If provided, the ID of the user whose created role sessions to operate on.
18179
+ * Selects all *role* sessions created by that user (user sessions are not affected).
18180
+ * Cannot be specified together with other selectors.
18181
+ * @example User#124dfe3e-3bbd-487d-80c0-53c55e8ab87a
18182
+ */
18183
+ role_created_by?: string | null;
17768
18184
  };
17769
18185
  path: {
17770
18186
  /**
@@ -18604,6 +19020,9 @@ export interface operations {
18604
19020
  */
18605
19021
  deleteOidcUser: {
18606
19022
  parameters: {
19023
+ query?: {
19024
+ revoke_role_sessions_they_created?: boolean | null;
19025
+ };
18607
19026
  path: {
18608
19027
  /**
18609
19028
  * @description Name or ID of the desired Org
@@ -18745,6 +19164,9 @@ export interface operations {
18745
19164
  */
18746
19165
  deleteUser: {
18747
19166
  parameters: {
19167
+ query?: {
19168
+ revoke_role_sessions_they_created?: boolean | null;
19169
+ };
18748
19170
  path: {
18749
19171
  /**
18750
19172
  * @description Name or ID of the desired Org