@dynamic-labs/sdk-api-core 0.115.0 → 0.117.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-core",
3
- "version": "0.115.0",
3
+ "version": "0.117.0",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -136,6 +136,7 @@ var Flow = require('../models/Flow.cjs');
136
136
  var FlowAttachSourceRequest = require('../models/FlowAttachSourceRequest.cjs');
137
137
  require('../models/FlowCurrencyEnum.cjs');
138
138
  require('../models/FlowSourceTypeEnum.cjs');
139
+ var FlowExchangesResponse = require('../models/FlowExchangesResponse.cjs');
139
140
  require('../models/FlowExecutionStateEnum.cjs');
140
141
  require('../models/FlowModeEnum.cjs');
141
142
  var FlowPrepareSigningRequest = require('../models/FlowPrepareSigningRequest.cjs');
@@ -1191,6 +1192,9 @@ class SDKApi extends runtime.BaseAPI {
1191
1192
  const queryParameters = {};
1192
1193
  const headerParameters = {};
1193
1194
  headerParameters['Content-Type'] = 'application/json';
1195
+ if (requestParameters.xDynOrganizationId !== undefined && requestParameters.xDynOrganizationId !== null) {
1196
+ headerParameters['x-dyn-organization-id'] = String(requestParameters.xDynOrganizationId);
1197
+ }
1194
1198
  const response = await this.request({
1195
1199
  path: `/sdk/{environmentId}/ssoProvider`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))),
1196
1200
  method: 'POST',
@@ -4440,6 +4444,61 @@ class SDKApi extends runtime.BaseAPI {
4440
4444
  const response = await this.getFlowRaw(requestParameters, initOverrides);
4441
4445
  return await response.value();
4442
4446
  }
4447
+ /**
4448
+ * Lists the exchanges that can be attached as this flow\'s source, checked against the environment\'s enabled exchanges and the flow\'s currency and settlement. It does not check whether the flow can still change source.
4449
+ * Get the exchanges a flow can be paid with
4450
+ */
4451
+ async getFlowExchangesRaw(requestParameters, initOverrides) {
4452
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4453
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowExchanges.');
4454
+ }
4455
+ if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
4456
+ throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling getFlowExchanges.');
4457
+ }
4458
+ const queryParameters = {};
4459
+ const headerParameters = {};
4460
+ const response = await this.request({
4461
+ path: `/sdk/{environmentId}/flow/{flowId}/exchanges`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
4462
+ method: 'GET',
4463
+ headers: headerParameters,
4464
+ query: queryParameters,
4465
+ }, initOverrides);
4466
+ return new runtime.JSONApiResponse(response, (jsonValue) => FlowExchangesResponse.FlowExchangesResponseFromJSON(jsonValue));
4467
+ }
4468
+ /**
4469
+ * Lists the exchanges that can be attached as this flow\'s source, checked against the environment\'s enabled exchanges and the flow\'s currency and settlement. It does not check whether the flow can still change source.
4470
+ * Get the exchanges a flow can be paid with
4471
+ */
4472
+ async getFlowExchanges(requestParameters, initOverrides) {
4473
+ const response = await this.getFlowExchangesRaw(requestParameters, initOverrides);
4474
+ return await response.value();
4475
+ }
4476
+ /**
4477
+ * Options call for this endpoint
4478
+ */
4479
+ async getFlowExchangesOptionsRaw(requestParameters, initOverrides) {
4480
+ if (requestParameters.environmentId === null || requestParameters.environmentId === undefined) {
4481
+ throw new runtime.RequiredError('environmentId', 'Required parameter requestParameters.environmentId was null or undefined when calling getFlowExchangesOptions.');
4482
+ }
4483
+ if (requestParameters.flowId === null || requestParameters.flowId === undefined) {
4484
+ throw new runtime.RequiredError('flowId', 'Required parameter requestParameters.flowId was null or undefined when calling getFlowExchangesOptions.');
4485
+ }
4486
+ const queryParameters = {};
4487
+ const headerParameters = {};
4488
+ const response = await this.request({
4489
+ path: `/sdk/{environmentId}/flow/{flowId}/exchanges`.replace(`{${"environmentId"}}`, encodeURIComponent(String(requestParameters.environmentId))).replace(`{${"flowId"}}`, encodeURIComponent(String(requestParameters.flowId))),
4490
+ method: 'OPTIONS',
4491
+ headers: headerParameters,
4492
+ query: queryParameters,
4493
+ }, initOverrides);
4494
+ return new runtime.VoidApiResponse(response);
4495
+ }
4496
+ /**
4497
+ * Options call for this endpoint
4498
+ */
4499
+ async getFlowExchangesOptions(requestParameters, initOverrides) {
4500
+ await this.getFlowExchangesOptionsRaw(requestParameters, initOverrides);
4501
+ }
4443
4502
  /**
4444
4503
  * Options call for this endpoint
4445
4504
  */