@dynamic-labs/sdk-api 0.129.0 → 0.130.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-api",
3
- "version": "0.129.0",
3
+ "version": "0.130.0",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -1768,12 +1768,12 @@ export interface YieldVaultWithdrawOptionsRequest {
1768
1768
  */
1769
1769
  export declare class SDKApi extends runtime.BaseAPI {
1770
1770
  /**
1771
- * Sets the source wallet address and chain on an initiated flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow still being initiated and by CORS. At most one live token exists per flow at a time. When re-attaching from the signing state, the existing session token must be supplied to prove the caller is the original signer.
1771
+ * Sets the source wallet address and chain on a flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow\'s state and by CORS. A source can be attached while the flow is initiated, source_attached, quoted or signing, so a payer can switch source before broadcasting. Unlike quote, prepare, broadcast and cancel, which always require the session token, attach needs no token for the first attach or while the flow is source_attached or quoted. From signing, the current session token must be supplied (X-Dynamic-Flow-Session-Token) to prove the caller is the original signer; otherwise the request is rejected with 403 session_token_invalid. Once the flow has been broadcasted or source_detected, or has reached a terminal state, the request is rejected with 409 flow_invalid_transition. Each attach mints a new session token and invalidates the previous one, so at most one live token exists per flow at a time.
1772
1772
  * Attach a source to a flow and mint a session token
1773
1773
  */
1774
1774
  attachFlowSourceRaw(requestParameters: AttachFlowSourceRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<FlowSourceResponse>>;
1775
1775
  /**
1776
- * Sets the source wallet address and chain on an initiated flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow still being initiated and by CORS. At most one live token exists per flow at a time. When re-attaching from the signing state, the existing session token must be supplied to prove the caller is the original signer.
1776
+ * Sets the source wallet address and chain on a flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow\'s state and by CORS. A source can be attached while the flow is initiated, source_attached, quoted or signing, so a payer can switch source before broadcasting. Unlike quote, prepare, broadcast and cancel, which always require the session token, attach needs no token for the first attach or while the flow is source_attached or quoted. From signing, the current session token must be supplied (X-Dynamic-Flow-Session-Token) to prove the caller is the original signer; otherwise the request is rejected with 403 session_token_invalid. Once the flow has been broadcasted or source_detected, or has reached a terminal state, the request is rejected with 409 flow_invalid_transition. Each attach mints a new session token and invalidates the previous one, so at most one live token exists per flow at a time.
1777
1777
  * Attach a source to a flow and mint a session token
1778
1778
  */
1779
1779
  attachFlowSource(requestParameters: AttachFlowSourceRequest, initOverrides?: RequestInit): Promise<FlowSourceResponse>;
@@ -422,7 +422,7 @@ import { YieldVaultRewardsResponseFromJSON } from '../models/YieldVaultRewardsRe
422
422
  */
423
423
  class SDKApi extends BaseAPI {
424
424
  /**
425
- * Sets the source wallet address and chain on an initiated flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow still being initiated and by CORS. At most one live token exists per flow at a time. When re-attaching from the signing state, the existing session token must be supplied to prove the caller is the original signer.
425
+ * Sets the source wallet address and chain on a flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow\'s state and by CORS. A source can be attached while the flow is initiated, source_attached, quoted or signing, so a payer can switch source before broadcasting. Unlike quote, prepare, broadcast and cancel, which always require the session token, attach needs no token for the first attach or while the flow is source_attached or quoted. From signing, the current session token must be supplied (X-Dynamic-Flow-Session-Token) to prove the caller is the original signer; otherwise the request is rejected with 403 session_token_invalid. Once the flow has been broadcasted or source_detected, or has reached a terminal state, the request is rejected with 409 flow_invalid_transition. Each attach mints a new session token and invalidates the previous one, so at most one live token exists per flow at a time.
426
426
  * Attach a source to a flow and mint a session token
427
427
  */
428
428
  async attachFlowSourceRaw(requestParameters, initOverrides) {
@@ -451,7 +451,7 @@ class SDKApi extends BaseAPI {
451
451
  return new JSONApiResponse(response, (jsonValue) => FlowSourceResponseFromJSON(jsonValue));
452
452
  }
453
453
  /**
454
- * Sets the source wallet address and chain on an initiated flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow still being initiated and by CORS. At most one live token exists per flow at a time. When re-attaching from the signing state, the existing session token must be supplied to prove the caller is the original signer.
454
+ * Sets the source wallet address and chain on a flow and mints the capability sessionToken used to drive the rest of the lifecycle. No API key or token is required (the browser has neither at this point) — the endpoint is gated by the flow\'s state and by CORS. A source can be attached while the flow is initiated, source_attached, quoted or signing, so a payer can switch source before broadcasting. Unlike quote, prepare, broadcast and cancel, which always require the session token, attach needs no token for the first attach or while the flow is source_attached or quoted. From signing, the current session token must be supplied (X-Dynamic-Flow-Session-Token) to prove the caller is the original signer; otherwise the request is rejected with 403 session_token_invalid. Once the flow has been broadcasted or source_detected, or has reached a terminal state, the request is rejected with 409 flow_invalid_transition. Each attach mints a new session token and invalidates the previous one, so at most one live token exists per flow at a time.
455
455
  * Attach a source to a flow and mint a session token
456
456
  */
457
457
  async attachFlowSource(requestParameters, initOverrides) {
@@ -23,6 +23,10 @@ export interface BackupKeySharesToLocationsServerRequest {
23
23
  backupKeySharesToLocationsRequest: BackupKeySharesToLocationsRequest;
24
24
  xDynServerSigningProof?: string;
25
25
  }
26
+ export interface CancelFlowServerRequest {
27
+ environmentId: string;
28
+ flowId: string;
29
+ }
26
30
  export interface CreateBusinessAccountServerRequest {
27
31
  environmentId: string;
28
32
  xDynServerSigningProof?: string;
@@ -225,6 +229,16 @@ export declare class ServerApi extends runtime.BaseAPI {
225
229
  * Server — create backup action and event for multiple locations without performing actual backup
226
230
  */
227
231
  backupKeySharesToLocationsServer(requestParameters: BackupKeySharesToLocationsServerRequest, initOverrides?: RequestInit): Promise<BackupKeySharesToLocationsResponse>;
232
+ /**
233
+ * Cancels a flow that is still initiated, meaning no source has been attached yet. Returns 400 if flowId is not a valid UUID and 409 if the flow is in any other state. Requires an environment API token with the flow.write scope.
234
+ * Cancel a flow
235
+ */
236
+ cancelFlowServerRaw(requestParameters: CancelFlowServerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Flow>>;
237
+ /**
238
+ * Cancels a flow that is still initiated, meaning no source has been attached yet. Returns 400 if flowId is not a valid UUID and 409 if the flow is in any other state. Requires an environment API token with the flow.write scope.
239
+ * Cancel a flow
240
+ */
241
+ cancelFlowServer(requestParameters: CancelFlowServerRequest, initOverrides?: RequestInit): Promise<Flow>;
228
242
  /**
229
243
  * Create a business account from the server SDK. The authenticated service user becomes the first `owner` member. Gated by the `enable-business-accounts` feature flag.
230
244
  * Server — create a business account
@@ -356,10 +370,12 @@ export declare class ServerApi extends runtime.BaseAPI {
356
370
  */
357
371
  getFlowFeeClaimBalancesServer(requestParameters: GetFlowFeeClaimBalancesServerRequest, initOverrides?: RequestInit): Promise<FlowFeeBalancesResponse>;
358
372
  /**
373
+ * Returns the flow with its full, unredacted details, including destination addresses, the settlement transaction hash, and the settlement and destination configuration. Call it as GET /server/{environmentId}/flow/{flowId}; the path segment is the flow ID. Requires an environment API token with the flow.write scope.
359
374
  * Get a flow by ID
360
375
  */
361
376
  getFlowServerRaw(requestParameters: GetFlowServerRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<Flow>>;
362
377
  /**
378
+ * Returns the flow with its full, unredacted details, including destination addresses, the settlement transaction hash, and the settlement and destination configuration. Call it as GET /server/{environmentId}/flow/{flowId}; the path segment is the flow ID. Requires an environment API token with the flow.write scope.
363
379
  * Get a flow by ID
364
380
  */
365
381
  getFlowServer(requestParameters: GetFlowServerRequest, initOverrides?: RequestInit): Promise<Flow>;
@@ -333,6 +333,35 @@ class ServerApi extends BaseAPI {
333
333
  const response = await this.backupKeySharesToLocationsServerRaw(requestParameters, initOverrides);
334
334
  return await response.value();
335
335
  }
336
+ /**
337
+ * Cancels a flow that is still initiated, meaning no source has been attached yet. Returns 400 if flowId is not a valid UUID and 409 if the flow is in any other state. Requires an environment API token with the flow.write scope.
338
+ * Cancel a flow
339
+ */
340
+ async cancelFlowServerRaw(requestParameters, initOverrides) {
341
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
342
+ throw new RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling cancelFlowServer.');
343
+ }
344
+ if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
345
+ throw new RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling cancelFlowServer.');
346
+ }
347
+ const queryParameters = {};
348
+ const headerParameters = {};
349
+ const response = await this.request({
350
+ path: `/server/{environmentId}/flow/{flowId}/cancel`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
351
+ method: 'POST',
352
+ headers: headerParameters,
353
+ query: queryParameters,
354
+ }, initOverrides);
355
+ return new JSONApiResponse(response, (jsonValue) => FlowFromJSON(jsonValue));
356
+ }
357
+ /**
358
+ * Cancels a flow that is still initiated, meaning no source has been attached yet. Returns 400 if flowId is not a valid UUID and 409 if the flow is in any other state. Requires an environment API token with the flow.write scope.
359
+ * Cancel a flow
360
+ */
361
+ async cancelFlowServer(requestParameters, initOverrides) {
362
+ const response = await this.cancelFlowServerRaw(requestParameters, initOverrides);
363
+ return await response.value();
364
+ }
336
365
  /**
337
366
  * Create a business account from the server SDK. The authenticated service user becomes the first `owner` member. Gated by the `enable-business-accounts` feature flag.
338
367
  * Server — create a business account
@@ -769,6 +798,7 @@ class ServerApi extends BaseAPI {
769
798
  return await response.value();
770
799
  }
771
800
  /**
801
+ * Returns the flow with its full, unredacted details, including destination addresses, the settlement transaction hash, and the settlement and destination configuration. Call it as GET /server/{environmentId}/flow/{flowId}; the path segment is the flow ID. Requires an environment API token with the flow.write scope.
772
802
  * Get a flow by ID
773
803
  */
774
804
  async getFlowServerRaw(requestParameters, initOverrides) {
@@ -789,6 +819,7 @@ class ServerApi extends BaseAPI {
789
819
  return new JSONApiResponse(response, (jsonValue) => FlowFromJSON(jsonValue));
790
820
  }
791
821
  /**
822
+ * Returns the flow with its full, unredacted details, including destination addresses, the settlement transaction hash, and the settlement and destination configuration. Call it as GET /server/{environmentId}/flow/{flowId}; the path segment is the flow ID. Requires an environment API token with the flow.write scope.
792
823
  * Get a flow by ID
793
824
  */
794
825
  async getFlowServer(requestParameters, initOverrides) {
package/src/index.js CHANGED
@@ -604,6 +604,7 @@ export { NextViewEnum, NextViewEnumFromJSON, NextViewEnumFromJSONTyped, NextView
604
604
  export { NonceResponseFromJSON, NonceResponseFromJSONTyped, NonceResponseToJSON } from './models/NonceResponse.js';
605
605
  export { NoncesResponseFromJSON, NoncesResponseFromJSONTyped, NoncesResponseToJSON } from './models/NoncesResponse.js';
606
606
  export { NotFoundFromJSON, NotFoundFromJSONTyped, NotFoundToJSON } from './models/NotFound.js';
607
+ export { NotFoundWithoutCodeFromJSON, NotFoundWithoutCodeFromJSONTyped, NotFoundWithoutCodeToJSON } from './models/NotFoundWithoutCode.js';
607
608
  export { OAuthAccountFromJSON, OAuthAccountFromJSONTyped, OAuthAccountToJSON } from './models/OAuthAccount.js';
608
609
  export { OauthInitAuthRequestFromJSON, OauthInitAuthRequestFromJSONTyped, OauthInitAuthRequestToJSON } from './models/OauthInitAuthRequest.js';
609
610
  export { OauthProviderLoginUrlFromJSON, OauthProviderLoginUrlFromJSONTyped, OauthProviderLoginUrlToJSON } from './models/OauthProviderLoginUrl.js';
@@ -57,7 +57,7 @@ export interface FlowCreateRequest {
57
57
  */
58
58
  feeConfig?: FlowFeeConfig;
59
59
  /**
60
- * Seconds until the flow expires (default 3600, clamped server-side)
60
+ * Seconds until the flow expires. Default 86400 (24 hours); values above 31536000 (365 days) are clamped. Expiry applies only before the payment is broadcast.
61
61
  * @type {number}
62
62
  * @memberof FlowCreateRequest
63
63
  */
@@ -57,7 +57,7 @@ export interface FlowPaymentLinkCreateRequest {
57
57
  */
58
58
  feeConfig?: FlowFeeConfig;
59
59
  /**
60
- * Seconds until the flow expires (default 3600, clamped server-side)
60
+ * Seconds until the flow expires. Default 86400 (24 hours); values above 31536000 (365 days) are clamped. Expiry applies only before the payment is broadcast.
61
61
  * @type {number}
62
62
  * @memberof FlowPaymentLinkCreateRequest
63
63
  */
@@ -23,7 +23,7 @@ export interface FlowSourceResponse {
23
23
  */
24
24
  sessionExpiresAt: Date;
25
25
  /**
26
- * Opaque capability token for authenticating subsequent calls on this flow (quote/prepare/broadcast). Minted by the source endpoint and returned exactly once — store it immediately. At most one live token exists per flow at a time. Format: dft_<base64url>.
26
+ * Opaque capability token for authenticating subsequent calls on this flow (quote, prepare, broadcast, cancel). Minted by the source endpoint and returned exactly once — store it immediately. At most one live token exists per flow at a time. Format: dft_<base64url>.
27
27
  * @type {string}
28
28
  * @memberof FlowSourceResponse
29
29
  */
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Dashboard API
3
+ * Dashboard API documentation
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface NotFoundWithoutCode
16
+ */
17
+ export interface NotFoundWithoutCode {
18
+ /**
19
+ * Human-readable error message
20
+ * @type {string}
21
+ * @memberof NotFoundWithoutCode
22
+ */
23
+ error: string;
24
+ }
25
+ export declare function NotFoundWithoutCodeFromJSON(json: any): NotFoundWithoutCode;
26
+ export declare function NotFoundWithoutCodeFromJSONTyped(json: any, ignoreDiscriminator: boolean): NotFoundWithoutCode;
27
+ export declare function NotFoundWithoutCodeToJSON(value?: NotFoundWithoutCode | null): any;
@@ -0,0 +1,37 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Dashboard API
5
+ * Dashboard API documentation
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ function NotFoundWithoutCodeFromJSON(json) {
15
+ return NotFoundWithoutCodeFromJSONTyped(json);
16
+ }
17
+ function NotFoundWithoutCodeFromJSONTyped(json, ignoreDiscriminator) {
18
+ if ((json === undefined) || (json === null)) {
19
+ return json;
20
+ }
21
+ return {
22
+ 'error': json['error'],
23
+ };
24
+ }
25
+ function NotFoundWithoutCodeToJSON(value) {
26
+ if (value === undefined) {
27
+ return undefined;
28
+ }
29
+ if (value === null) {
30
+ return null;
31
+ }
32
+ return {
33
+ 'error': value.error,
34
+ };
35
+ }
36
+
37
+ export { NotFoundWithoutCodeFromJSON, NotFoundWithoutCodeFromJSONTyped, NotFoundWithoutCodeToJSON };
@@ -551,6 +551,7 @@ export * from './NextViewEnum';
551
551
  export * from './NonceResponse';
552
552
  export * from './NoncesResponse';
553
553
  export * from './NotFound';
554
+ export * from './NotFoundWithoutCode';
554
555
  export * from './OAuthAccount';
555
556
  export * from './OauthInitAuthRequest';
556
557
  export * from './OauthProviderLoginUrl';