@dynamic-labs/sdk-api 0.90.0 → 0.92.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.90.0",
3
+ "version": "0.92.0",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -15,6 +15,7 @@ function BusinessAccountForbiddenFromJSONTyped(json, ignoreDiscriminator) {
15
15
  }
16
16
  return {
17
17
  'error': !runtime.exists(json, 'error') ? undefined : json['error'],
18
+ 'code': !runtime.exists(json, 'code') ? undefined : json['code'],
18
19
  'approvalRequirements': !runtime.exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(BusinessAccountApprovalRequirementStatus.BusinessAccountApprovalRequirementStatusFromJSON)),
19
20
  };
20
21
  }
@@ -27,6 +28,7 @@ function BusinessAccountForbiddenToJSON(value) {
27
28
  }
28
29
  return {
29
30
  'error': value.error,
31
+ 'code': value.code,
30
32
  'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(BusinessAccountApprovalRequirementStatus.BusinessAccountApprovalRequirementStatusToJSON)),
31
33
  };
32
34
  }
@@ -22,6 +22,12 @@ export interface BusinessAccountForbidden {
22
22
  * @memberof BusinessAccountForbidden
23
23
  */
24
24
  error?: string;
25
+ /**
26
+ * Machine-readable reason for the 403, set only by endpoints that distinguish rejections. Flow endpoints use sanctions_blocked, session_token_invalid and risk_blocked.
27
+ * @type {string}
28
+ * @memberof BusinessAccountForbidden
29
+ */
30
+ code?: string;
25
31
  /**
26
32
  *
27
33
  * @type {Array<BusinessAccountApprovalRequirementStatus>}
@@ -11,6 +11,7 @@ function BusinessAccountForbiddenFromJSONTyped(json, ignoreDiscriminator) {
11
11
  }
12
12
  return {
13
13
  'error': !exists(json, 'error') ? undefined : json['error'],
14
+ 'code': !exists(json, 'code') ? undefined : json['code'],
14
15
  'approvalRequirements': !exists(json, 'approvalRequirements') ? undefined : (json['approvalRequirements'].map(BusinessAccountApprovalRequirementStatusFromJSON)),
15
16
  };
16
17
  }
@@ -23,6 +24,7 @@ function BusinessAccountForbiddenToJSON(value) {
23
24
  }
24
25
  return {
25
26
  'error': value.error,
27
+ 'code': value.code,
26
28
  'approvalRequirements': value.approvalRequirements === undefined ? undefined : (value.approvalRequirements.map(BusinessAccountApprovalRequirementStatusToJSON)),
27
29
  };
28
30
  }
@@ -14,6 +14,7 @@ var FlowRiskStateEnum = require('./FlowRiskStateEnum.cjs');
14
14
  var FlowSettlementData = require('./FlowSettlementData.cjs');
15
15
  var FlowSettlementStateEnum = require('./FlowSettlementStateEnum.cjs');
16
16
  var FlowSourceTypeEnum = require('./FlowSourceTypeEnum.cjs');
17
+ var FlowTokenInfo = require('./FlowTokenInfo.cjs');
17
18
  var FlowUIConfig = require('./FlowUIConfig.cjs');
18
19
  var SettlementConfigInput = require('./SettlementConfigInput.cjs');
19
20
 
@@ -31,6 +32,7 @@ function FlowFromJSONTyped(json, ignoreDiscriminator) {
31
32
  'amount': json['amount'],
32
33
  'amountUsd': !runtime.exists(json, 'amountUsd') ? undefined : json['amountUsd'],
33
34
  'currency': json['currency'],
35
+ 'currencyTokenInfo': !runtime.exists(json, 'currencyTokenInfo') ? undefined : FlowTokenInfo.FlowTokenInfoFromJSON(json['currencyTokenInfo']),
34
36
  'memo': !runtime.exists(json, 'memo') ? undefined : json['memo'],
35
37
  'userId': !runtime.exists(json, 'userId') ? undefined : json['userId'],
36
38
  'executionState': FlowExecutionStateEnum.FlowExecutionStateEnumFromJSON(json['executionState']),
@@ -80,6 +82,7 @@ function FlowToJSON(value) {
80
82
  'amount': value.amount,
81
83
  'amountUsd': value.amountUsd,
82
84
  'currency': value.currency,
85
+ 'currencyTokenInfo': FlowTokenInfo.FlowTokenInfoToJSON(value.currencyTokenInfo),
83
86
  'memo': value.memo,
84
87
  'userId': value.userId,
85
88
  'executionState': FlowExecutionStateEnum.FlowExecutionStateEnumToJSON(value.executionState),
@@ -20,6 +20,7 @@ import { FlowRiskStateEnum } from './FlowRiskStateEnum';
20
20
  import { FlowSettlementData } from './FlowSettlementData';
21
21
  import { FlowSettlementStateEnum } from './FlowSettlementStateEnum';
22
22
  import { FlowSourceTypeEnum } from './FlowSourceTypeEnum';
23
+ import { FlowTokenInfo } from './FlowTokenInfo';
23
24
  import { FlowUIConfig } from './FlowUIConfig';
24
25
  import { SettlementConfigInput } from './SettlementConfigInput';
25
26
  /**
@@ -58,6 +59,12 @@ export interface Flow {
58
59
  * @memberof Flow
59
60
  */
60
61
  currency: string;
62
+ /**
63
+ *
64
+ * @type {FlowTokenInfo}
65
+ * @memberof Flow
66
+ */
67
+ currencyTokenInfo?: FlowTokenInfo;
61
68
  /**
62
69
  * Arbitrary metadata attached to the flow
63
70
  * @type {object}
@@ -10,6 +10,7 @@ import { FlowRiskStateEnumFromJSON, FlowRiskStateEnumToJSON } from './FlowRiskSt
10
10
  import { FlowSettlementDataFromJSON, FlowSettlementDataToJSON } from './FlowSettlementData.js';
11
11
  import { FlowSettlementStateEnumFromJSON, FlowSettlementStateEnumToJSON } from './FlowSettlementStateEnum.js';
12
12
  import { FlowSourceTypeEnumFromJSON, FlowSourceTypeEnumToJSON } from './FlowSourceTypeEnum.js';
13
+ import { FlowTokenInfoFromJSON, FlowTokenInfoToJSON } from './FlowTokenInfo.js';
13
14
  import { FlowUIConfigFromJSON, FlowUIConfigToJSON } from './FlowUIConfig.js';
14
15
  import { SettlementConfigInputFromJSON, SettlementConfigInputToJSON } from './SettlementConfigInput.js';
15
16
 
@@ -27,6 +28,7 @@ function FlowFromJSONTyped(json, ignoreDiscriminator) {
27
28
  'amount': json['amount'],
28
29
  'amountUsd': !exists(json, 'amountUsd') ? undefined : json['amountUsd'],
29
30
  'currency': json['currency'],
31
+ 'currencyTokenInfo': !exists(json, 'currencyTokenInfo') ? undefined : FlowTokenInfoFromJSON(json['currencyTokenInfo']),
30
32
  'memo': !exists(json, 'memo') ? undefined : json['memo'],
31
33
  'userId': !exists(json, 'userId') ? undefined : json['userId'],
32
34
  'executionState': FlowExecutionStateEnumFromJSON(json['executionState']),
@@ -76,6 +78,7 @@ function FlowToJSON(value) {
76
78
  'amount': value.amount,
77
79
  'amountUsd': value.amountUsd,
78
80
  'currency': value.currency,
81
+ 'currencyTokenInfo': FlowTokenInfoToJSON(value.currencyTokenInfo),
79
82
  'memo': value.memo,
80
83
  'userId': value.userId,
81
84
  'executionState': FlowExecutionStateEnumToJSON(value.executionState),
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  /**
13
- * Token metadata returned alongside a flow quote.
13
+ * Token metadata returned alongside a flow or flow quote.
14
14
  * @export
15
15
  * @interface FlowTokenInfo
16
16
  */
@@ -14,6 +14,7 @@ function ForbiddenFromJSONTyped(json, ignoreDiscriminator) {
14
14
  }
15
15
  return {
16
16
  'error': !runtime.exists(json, 'error') ? undefined : json['error'],
17
+ 'code': !runtime.exists(json, 'code') ? undefined : json['code'],
17
18
  };
18
19
  }
19
20
  function ForbiddenToJSON(value) {
@@ -25,6 +26,7 @@ function ForbiddenToJSON(value) {
25
26
  }
26
27
  return {
27
28
  'error': value.error,
29
+ 'code': value.code,
28
30
  };
29
31
  }
30
32
 
@@ -21,6 +21,12 @@ export interface Forbidden {
21
21
  * @memberof Forbidden
22
22
  */
23
23
  error?: string;
24
+ /**
25
+ * Machine-readable reason for the 403, set only by endpoints that distinguish rejections. Flow endpoints use sanctions_blocked, session_token_invalid and risk_blocked.
26
+ * @type {string}
27
+ * @memberof Forbidden
28
+ */
29
+ code?: string;
24
30
  }
25
31
  export declare function ForbiddenFromJSON(json: any): Forbidden;
26
32
  export declare function ForbiddenFromJSONTyped(json: any, ignoreDiscriminator: boolean): Forbidden;
@@ -10,6 +10,7 @@ function ForbiddenFromJSONTyped(json, ignoreDiscriminator) {
10
10
  }
11
11
  return {
12
12
  'error': !exists(json, 'error') ? undefined : json['error'],
13
+ 'code': !exists(json, 'code') ? undefined : json['code'],
13
14
  };
14
15
  }
15
16
  function ForbiddenToJSON(value) {
@@ -21,6 +22,7 @@ function ForbiddenToJSON(value) {
21
22
  }
22
23
  return {
23
24
  'error': value.error,
25
+ 'code': value.code,
24
26
  };
25
27
  }
26
28