@dynamic-labs/sdk-api 0.0.532 → 0.0.534

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.0.532",
3
+ "version": "0.0.534",
4
4
  "author": "Dynamic Labs",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
@@ -23,6 +23,7 @@ require('../models/MfaBackupCodeAcknowledgement.cjs');
23
23
  require('../models/CustomFieldType.cjs');
24
24
  require('../models/KycFieldType.cjs');
25
25
  var BillingSubscription = require('../models/BillingSubscription.cjs');
26
+ var BillingSubscriptionCoupon = require('../models/BillingSubscriptionCoupon.cjs');
26
27
  require('../models/BillingSubscriptionPlanTypeEnum.cjs');
27
28
  require('../models/UnprocessableEntityErrorCode.cjs');
28
29
  require('../models/ChainEnum.cjs');
@@ -73,6 +74,46 @@ require('../models/WhenToImplementEnum.cjs');
73
74
  *
74
75
  */
75
76
  class OrganizationsApi extends runtime.BaseAPI {
77
+ /**
78
+ * Add coupon to subscription
79
+ */
80
+ applyCouponForSubscriptionRaw(requestParameters, initOverrides) {
81
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
82
+ if (requestParameters.organizationId === null || requestParameters.organizationId === undefined) {
83
+ throw new runtime.RequiredError('organizationId', 'Required parameter requestParameters.organizationId was null or undefined when calling applyCouponForSubscription.');
84
+ }
85
+ if (requestParameters.billingSubscriptionCoupon === null || requestParameters.billingSubscriptionCoupon === undefined) {
86
+ throw new runtime.RequiredError('billingSubscriptionCoupon', 'Required parameter requestParameters.billingSubscriptionCoupon was null or undefined when calling applyCouponForSubscription.');
87
+ }
88
+ const queryParameters = {};
89
+ const headerParameters = {};
90
+ headerParameters['Content-Type'] = 'application/json';
91
+ if (this.configuration && this.configuration.accessToken) {
92
+ const token = this.configuration.accessToken;
93
+ const tokenString = yield token("bearerAuth", []);
94
+ if (tokenString) {
95
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
96
+ }
97
+ }
98
+ const response = yield this.request({
99
+ path: `/organizations/{organizationId}/billing/subscription/coupon`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters.organizationId))),
100
+ method: 'PUT',
101
+ headers: headerParameters,
102
+ query: queryParameters,
103
+ body: BillingSubscriptionCoupon.BillingSubscriptionCouponToJSON(requestParameters.billingSubscriptionCoupon),
104
+ }, initOverrides);
105
+ return new runtime.JSONApiResponse(response, (jsonValue) => BillingSubscription.BillingSubscriptionFromJSON(jsonValue));
106
+ });
107
+ }
108
+ /**
109
+ * Add coupon to subscription
110
+ */
111
+ applyCouponForSubscription(requestParameters, initOverrides) {
112
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
113
+ const response = yield this.applyCouponForSubscriptionRaw(requestParameters, initOverrides);
114
+ return yield response.value();
115
+ });
116
+ }
76
117
  /**
77
118
  * Creates organization
78
119
  */
@@ -10,7 +10,11 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import { BillingSubscription, Organization, OrganizationFields, OrganizationRequest, OrganizationResponse, OrganizationsResponse } from '../models';
13
+ import { BillingSubscription, BillingSubscriptionCoupon, Organization, OrganizationFields, OrganizationRequest, OrganizationResponse, OrganizationsResponse } from '../models';
14
+ export interface ApplyCouponForSubscriptionRequest {
15
+ organizationId: string;
16
+ billingSubscriptionCoupon: BillingSubscriptionCoupon;
17
+ }
14
18
  export interface CreateOrganizationRequest {
15
19
  organizationRequest: OrganizationRequest;
16
20
  }
@@ -31,6 +35,14 @@ export interface UpgradeSubscriptionForOrganizationRequest {
31
35
  *
32
36
  */
33
37
  export declare class OrganizationsApi extends runtime.BaseAPI {
38
+ /**
39
+ * Add coupon to subscription
40
+ */
41
+ applyCouponForSubscriptionRaw(requestParameters: ApplyCouponForSubscriptionRequest, initOverrides?: RequestInit): Promise<runtime.ApiResponse<BillingSubscription>>;
42
+ /**
43
+ * Add coupon to subscription
44
+ */
45
+ applyCouponForSubscription(requestParameters: ApplyCouponForSubscriptionRequest, initOverrides?: RequestInit): Promise<BillingSubscription>;
34
46
  /**
35
47
  * Creates organization
36
48
  */
@@ -19,6 +19,7 @@ import '../models/MfaBackupCodeAcknowledgement.js';
19
19
  import '../models/CustomFieldType.js';
20
20
  import '../models/KycFieldType.js';
21
21
  import { BillingSubscriptionFromJSON } from '../models/BillingSubscription.js';
22
+ import { BillingSubscriptionCouponToJSON } from '../models/BillingSubscriptionCoupon.js';
22
23
  import '../models/BillingSubscriptionPlanTypeEnum.js';
23
24
  import '../models/UnprocessableEntityErrorCode.js';
24
25
  import '../models/ChainEnum.js';
@@ -69,6 +70,46 @@ import '../models/WhenToImplementEnum.js';
69
70
  *
70
71
  */
71
72
  class OrganizationsApi extends BaseAPI {
73
+ /**
74
+ * Add coupon to subscription
75
+ */
76
+ applyCouponForSubscriptionRaw(requestParameters, initOverrides) {
77
+ return __awaiter(this, void 0, void 0, function* () {
78
+ if (requestParameters.organizationId === null || requestParameters.organizationId === undefined) {
79
+ throw new RequiredError('organizationId', 'Required parameter requestParameters.organizationId was null or undefined when calling applyCouponForSubscription.');
80
+ }
81
+ if (requestParameters.billingSubscriptionCoupon === null || requestParameters.billingSubscriptionCoupon === undefined) {
82
+ throw new RequiredError('billingSubscriptionCoupon', 'Required parameter requestParameters.billingSubscriptionCoupon was null or undefined when calling applyCouponForSubscription.');
83
+ }
84
+ const queryParameters = {};
85
+ const headerParameters = {};
86
+ headerParameters['Content-Type'] = 'application/json';
87
+ if (this.configuration && this.configuration.accessToken) {
88
+ const token = this.configuration.accessToken;
89
+ const tokenString = yield token("bearerAuth", []);
90
+ if (tokenString) {
91
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
92
+ }
93
+ }
94
+ const response = yield this.request({
95
+ path: `/organizations/{organizationId}/billing/subscription/coupon`.replace(`{${"organizationId"}}`, encodeURIComponent(String(requestParameters.organizationId))),
96
+ method: 'PUT',
97
+ headers: headerParameters,
98
+ query: queryParameters,
99
+ body: BillingSubscriptionCouponToJSON(requestParameters.billingSubscriptionCoupon),
100
+ }, initOverrides);
101
+ return new JSONApiResponse(response, (jsonValue) => BillingSubscriptionFromJSON(jsonValue));
102
+ });
103
+ }
104
+ /**
105
+ * Add coupon to subscription
106
+ */
107
+ applyCouponForSubscription(requestParameters, initOverrides) {
108
+ return __awaiter(this, void 0, void 0, function* () {
109
+ const response = yield this.applyCouponForSubscriptionRaw(requestParameters, initOverrides);
110
+ return yield response.value();
111
+ });
112
+ }
72
113
  /**
73
114
  * Creates organization
74
115
  */
package/src/index.cjs CHANGED
@@ -54,6 +54,7 @@ var AuthenticatorTransportProtocol = require('./models/AuthenticatorTransportPro
54
54
  var BadRequest = require('./models/BadRequest.cjs');
55
55
  var BaseUser = require('./models/BaseUser.cjs');
56
56
  var BillingSubscription = require('./models/BillingSubscription.cjs');
57
+ var BillingSubscriptionCoupon = require('./models/BillingSubscriptionCoupon.cjs');
57
58
  var BillingSubscriptionPeriod = require('./models/BillingSubscriptionPeriod.cjs');
58
59
  var BillingSubscriptionPlanTypeEnum = require('./models/BillingSubscriptionPlanTypeEnum.cjs');
59
60
  var BulkUserCreateResponse = require('./models/BulkUserCreateResponse.cjs');
@@ -526,6 +527,9 @@ exports.BaseUserToJSON = BaseUser.BaseUserToJSON;
526
527
  exports.BillingSubscriptionFromJSON = BillingSubscription.BillingSubscriptionFromJSON;
527
528
  exports.BillingSubscriptionFromJSONTyped = BillingSubscription.BillingSubscriptionFromJSONTyped;
528
529
  exports.BillingSubscriptionToJSON = BillingSubscription.BillingSubscriptionToJSON;
530
+ exports.BillingSubscriptionCouponFromJSON = BillingSubscriptionCoupon.BillingSubscriptionCouponFromJSON;
531
+ exports.BillingSubscriptionCouponFromJSONTyped = BillingSubscriptionCoupon.BillingSubscriptionCouponFromJSONTyped;
532
+ exports.BillingSubscriptionCouponToJSON = BillingSubscriptionCoupon.BillingSubscriptionCouponToJSON;
529
533
  exports.BillingSubscriptionPeriodFromJSON = BillingSubscriptionPeriod.BillingSubscriptionPeriodFromJSON;
530
534
  exports.BillingSubscriptionPeriodFromJSONTyped = BillingSubscriptionPeriod.BillingSubscriptionPeriodFromJSONTyped;
531
535
  exports.BillingSubscriptionPeriodToJSON = BillingSubscriptionPeriod.BillingSubscriptionPeriodToJSON;
package/src/index.js CHANGED
@@ -50,6 +50,7 @@ export { AuthenticatorTransportProtocol, AuthenticatorTransportProtocolFromJSON,
50
50
  export { BadRequestFromJSON, BadRequestFromJSONTyped, BadRequestToJSON } from './models/BadRequest.js';
51
51
  export { BaseUserFromJSON, BaseUserFromJSONTyped, BaseUserToJSON } from './models/BaseUser.js';
52
52
  export { BillingSubscriptionFromJSON, BillingSubscriptionFromJSONTyped, BillingSubscriptionToJSON } from './models/BillingSubscription.js';
53
+ export { BillingSubscriptionCouponFromJSON, BillingSubscriptionCouponFromJSONTyped, BillingSubscriptionCouponToJSON } from './models/BillingSubscriptionCoupon.js';
53
54
  export { BillingSubscriptionPeriodFromJSON, BillingSubscriptionPeriodFromJSONTyped, BillingSubscriptionPeriodToJSON } from './models/BillingSubscriptionPeriod.js';
54
55
  export { BillingSubscriptionPlanTypeEnum, BillingSubscriptionPlanTypeEnumFromJSON, BillingSubscriptionPlanTypeEnumFromJSONTyped, BillingSubscriptionPlanTypeEnumToJSON } from './models/BillingSubscriptionPlanTypeEnum.js';
55
56
  export { BulkUserCreateResponseFromJSON, BulkUserCreateResponseFromJSONTyped, BulkUserCreateResponseToJSON } from './models/BulkUserCreateResponse.js';
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var runtime = require('../runtime.cjs');
6
+ var BillingSubscriptionCoupon = require('./BillingSubscriptionCoupon.cjs');
6
7
  var BillingSubscriptionPeriod = require('./BillingSubscriptionPeriod.cjs');
7
8
  var BillingSubscriptionPlanTypeEnum = require('./BillingSubscriptionPlanTypeEnum.cjs');
8
9
 
@@ -27,6 +28,7 @@ function BillingSubscriptionFromJSONTyped(json, ignoreDiscriminator) {
27
28
  'currentBillingPeriod': !runtime.exists(json, 'currentBillingPeriod') ? undefined : BillingSubscriptionPeriod.BillingSubscriptionPeriodFromJSON(json['currentBillingPeriod']),
28
29
  'version': json['version'],
29
30
  'shouldLockEnvironmentSwitch': !runtime.exists(json, 'shouldLockEnvironmentSwitch') ? undefined : json['shouldLockEnvironmentSwitch'],
31
+ 'coupons': !runtime.exists(json, 'coupons') ? undefined : (json['coupons'].map(BillingSubscriptionCoupon.BillingSubscriptionCouponFromJSON)),
30
32
  };
31
33
  }
32
34
  function BillingSubscriptionToJSON(value) {
@@ -49,6 +51,7 @@ function BillingSubscriptionToJSON(value) {
49
51
  'currentBillingPeriod': BillingSubscriptionPeriod.BillingSubscriptionPeriodToJSON(value.currentBillingPeriod),
50
52
  'version': value.version,
51
53
  'shouldLockEnvironmentSwitch': value.shouldLockEnvironmentSwitch,
54
+ 'coupons': value.coupons === undefined ? undefined : (value.coupons.map(BillingSubscriptionCoupon.BillingSubscriptionCouponToJSON)),
52
55
  };
53
56
  }
54
57
 
@@ -9,6 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import { BillingSubscriptionCoupon } from './BillingSubscriptionCoupon';
12
13
  import { BillingSubscriptionPeriod } from './BillingSubscriptionPeriod';
13
14
  import { BillingSubscriptionPlanTypeEnum } from './BillingSubscriptionPlanTypeEnum';
14
15
  /**
@@ -89,6 +90,12 @@ export interface BillingSubscription {
89
90
  * @memberof BillingSubscription
90
91
  */
91
92
  shouldLockEnvironmentSwitch?: boolean;
93
+ /**
94
+ *
95
+ * @type {Array<BillingSubscriptionCoupon>}
96
+ * @memberof BillingSubscription
97
+ */
98
+ coupons?: Array<BillingSubscriptionCoupon>;
92
99
  }
93
100
  export declare function BillingSubscriptionFromJSON(json: any): BillingSubscription;
94
101
  export declare function BillingSubscriptionFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingSubscription;
@@ -1,4 +1,5 @@
1
1
  import { exists } from '../runtime.js';
2
+ import { BillingSubscriptionCouponFromJSON, BillingSubscriptionCouponToJSON } from './BillingSubscriptionCoupon.js';
2
3
  import { BillingSubscriptionPeriodFromJSON, BillingSubscriptionPeriodToJSON } from './BillingSubscriptionPeriod.js';
3
4
  import { BillingSubscriptionPlanTypeEnumFromJSON, BillingSubscriptionPlanTypeEnumToJSON } from './BillingSubscriptionPlanTypeEnum.js';
4
5
 
@@ -23,6 +24,7 @@ function BillingSubscriptionFromJSONTyped(json, ignoreDiscriminator) {
23
24
  'currentBillingPeriod': !exists(json, 'currentBillingPeriod') ? undefined : BillingSubscriptionPeriodFromJSON(json['currentBillingPeriod']),
24
25
  'version': json['version'],
25
26
  'shouldLockEnvironmentSwitch': !exists(json, 'shouldLockEnvironmentSwitch') ? undefined : json['shouldLockEnvironmentSwitch'],
27
+ 'coupons': !exists(json, 'coupons') ? undefined : (json['coupons'].map(BillingSubscriptionCouponFromJSON)),
26
28
  };
27
29
  }
28
30
  function BillingSubscriptionToJSON(value) {
@@ -45,6 +47,7 @@ function BillingSubscriptionToJSON(value) {
45
47
  'currentBillingPeriod': BillingSubscriptionPeriodToJSON(value.currentBillingPeriod),
46
48
  'version': value.version,
47
49
  'shouldLockEnvironmentSwitch': value.shouldLockEnvironmentSwitch,
50
+ 'coupons': value.coupons === undefined ? undefined : (value.coupons.map(BillingSubscriptionCouponToJSON)),
48
51
  };
49
52
  }
50
53
 
@@ -0,0 +1,43 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ /* tslint:disable */
6
+ /* eslint-disable */
7
+ /**
8
+ * Dashboard API
9
+ * Dashboard API documentation
10
+ *
11
+ * The version of the OpenAPI document: 1.0.0
12
+ *
13
+ *
14
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
15
+ * https://openapi-generator.tech
16
+ * Do not edit the class manually.
17
+ */
18
+ function BillingSubscriptionCouponFromJSON(json) {
19
+ return BillingSubscriptionCouponFromJSONTyped(json);
20
+ }
21
+ function BillingSubscriptionCouponFromJSONTyped(json, ignoreDiscriminator) {
22
+ if ((json === undefined) || (json === null)) {
23
+ return json;
24
+ }
25
+ return {
26
+ 'coupon': json['coupon'],
27
+ };
28
+ }
29
+ function BillingSubscriptionCouponToJSON(value) {
30
+ if (value === undefined) {
31
+ return undefined;
32
+ }
33
+ if (value === null) {
34
+ return null;
35
+ }
36
+ return {
37
+ 'coupon': value.coupon,
38
+ };
39
+ }
40
+
41
+ exports.BillingSubscriptionCouponFromJSON = BillingSubscriptionCouponFromJSON;
42
+ exports.BillingSubscriptionCouponFromJSONTyped = BillingSubscriptionCouponFromJSONTyped;
43
+ exports.BillingSubscriptionCouponToJSON = BillingSubscriptionCouponToJSON;
@@ -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 BillingSubscriptionCoupon
16
+ */
17
+ export interface BillingSubscriptionCoupon {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof BillingSubscriptionCoupon
22
+ */
23
+ coupon: string;
24
+ }
25
+ export declare function BillingSubscriptionCouponFromJSON(json: any): BillingSubscriptionCoupon;
26
+ export declare function BillingSubscriptionCouponFromJSONTyped(json: any, ignoreDiscriminator: boolean): BillingSubscriptionCoupon;
27
+ export declare function BillingSubscriptionCouponToJSON(value?: BillingSubscriptionCoupon | 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 BillingSubscriptionCouponFromJSON(json) {
15
+ return BillingSubscriptionCouponFromJSONTyped(json);
16
+ }
17
+ function BillingSubscriptionCouponFromJSONTyped(json, ignoreDiscriminator) {
18
+ if ((json === undefined) || (json === null)) {
19
+ return json;
20
+ }
21
+ return {
22
+ 'coupon': json['coupon'],
23
+ };
24
+ }
25
+ function BillingSubscriptionCouponToJSON(value) {
26
+ if (value === undefined) {
27
+ return undefined;
28
+ }
29
+ if (value === null) {
30
+ return null;
31
+ }
32
+ return {
33
+ 'coupon': value.coupon,
34
+ };
35
+ }
36
+
37
+ export { BillingSubscriptionCouponFromJSON, BillingSubscriptionCouponFromJSONTyped, BillingSubscriptionCouponToJSON };
@@ -15,6 +15,7 @@ function ProjectSettingsSdkWalletConnectFromJSONTyped(json, ignoreDiscriminator)
15
15
  return {
16
16
  'projectId': !runtime.exists(json, 'projectId') ? undefined : json['projectId'],
17
17
  'v2Enabled': !runtime.exists(json, 'v2Enabled') ? undefined : json['v2Enabled'],
18
+ 'walletProjectId': !runtime.exists(json, 'walletProjectId') ? undefined : json['walletProjectId'],
18
19
  };
19
20
  }
20
21
  function ProjectSettingsSdkWalletConnectToJSON(value) {
@@ -27,6 +28,7 @@ function ProjectSettingsSdkWalletConnectToJSON(value) {
27
28
  return {
28
29
  'projectId': value.projectId,
29
30
  'v2Enabled': value.v2Enabled,
31
+ 'walletProjectId': value.walletProjectId,
30
32
  };
31
33
  }
32
34
 
@@ -27,6 +27,12 @@ export interface ProjectSettingsSdkWalletConnect {
27
27
  * @memberof ProjectSettingsSdkWalletConnect
28
28
  */
29
29
  v2Enabled?: boolean;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ProjectSettingsSdkWalletConnect
34
+ */
35
+ walletProjectId?: string;
30
36
  }
31
37
  export declare function ProjectSettingsSdkWalletConnectFromJSON(json: any): ProjectSettingsSdkWalletConnect;
32
38
  export declare function ProjectSettingsSdkWalletConnectFromJSONTyped(json: any, ignoreDiscriminator: boolean): ProjectSettingsSdkWalletConnect;
@@ -11,6 +11,7 @@ function ProjectSettingsSdkWalletConnectFromJSONTyped(json, ignoreDiscriminator)
11
11
  return {
12
12
  'projectId': !exists(json, 'projectId') ? undefined : json['projectId'],
13
13
  'v2Enabled': !exists(json, 'v2Enabled') ? undefined : json['v2Enabled'],
14
+ 'walletProjectId': !exists(json, 'walletProjectId') ? undefined : json['walletProjectId'],
14
15
  };
15
16
  }
16
17
  function ProjectSettingsSdkWalletConnectToJSON(value) {
@@ -23,6 +24,7 @@ function ProjectSettingsSdkWalletConnectToJSON(value) {
23
24
  return {
24
25
  'projectId': value.projectId,
25
26
  'v2Enabled': value.v2Enabled,
27
+ 'walletProjectId': value.walletProjectId,
26
28
  };
27
29
  }
28
30
 
@@ -20,6 +20,7 @@ export * from './AuthenticatorTransportProtocol';
20
20
  export * from './BadRequest';
21
21
  export * from './BaseUser';
22
22
  export * from './BillingSubscription';
23
+ export * from './BillingSubscriptionCoupon';
23
24
  export * from './BillingSubscriptionPeriod';
24
25
  export * from './BillingSubscriptionPlanTypeEnum';
25
26
  export * from './BulkUserCreateResponse';