@randock/nameshift-api-client 0.0.221 → 0.0.222

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.
@@ -20,6 +20,7 @@ src/apis/StripePublicApi.ts
20
20
  src/apis/SubscriptionsApi.ts
21
21
  src/apis/SubscriptionsPublicApi.ts
22
22
  src/apis/TasksApi.ts
23
+ src/apis/TaxPublicApi.ts
23
24
  src/apis/UsersApi.ts
24
25
  src/apis/UsersPublicApi.ts
25
26
  src/apis/index.ts
@@ -228,6 +229,8 @@ src/models/UpdateSubscriptionBillingPeriodicityInput.ts
228
229
  src/models/UpdateSubscriptionInput.ts
229
230
  src/models/UsBankAccountDetails.ts
230
231
  src/models/UserPasswordResetDto.ts
232
+ src/models/ValidateTaxNumberDto.ts
233
+ src/models/ValidateTaxNumberInput.ts
231
234
  src/models/ValidationError.ts
232
235
  src/models/ValidationException.ts
233
236
  src/models/VerifyLeadInput.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.221
1
+ ## @randock/nameshift-api-client@0.0.222
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install @randock/nameshift-api-client@0.0.221 --save
39
+ npm install @randock/nameshift-api-client@0.0.222 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
44
44
  ```
45
45
  npm install PATH_TO_GENERATED_PACKAGE --save
46
46
  ```
47
- 5687002a732a4dba570df2940ccbd2a817ded6832833d8428930a5cd6b52b1c2094214438818668712fe97b3a7fd4bf7
47
+ 452950bd6384b4e8c360af8762d48dc68a5fb7e219a53ddb2037c80b95dc7d75c14ba2dd0a3765f332cc16d215ae07a5
@@ -16,6 +16,10 @@ export interface DefaultApiPublicAdsControllerAdwordsConversionExportRequest {
16
16
  timezone: string;
17
17
  conversion: string;
18
18
  }
19
+ export interface DefaultApiPublicSumsubControllerHandleWebhookRequest {
20
+ xPayloadDigest: string;
21
+ xPayloadDigestAlg: string;
22
+ }
19
23
  /**
20
24
  *
21
25
  */
@@ -26,4 +30,14 @@ export declare class DefaultApi extends runtime.BaseAPI {
26
30
  /**
27
31
  */
28
32
  publicAdsControllerAdwordsConversionExport(requestParameters: DefaultApiPublicAdsControllerAdwordsConversionExportRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
33
+ /**
34
+ * Handles incoming webhook events from SumSub.
35
+ *
36
+ */
37
+ publicSumsubControllerHandleWebhookRaw(requestParameters: DefaultApiPublicSumsubControllerHandleWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
38
+ /**
39
+ * Handles incoming webhook events from SumSub.
40
+ *
41
+ */
42
+ publicSumsubControllerHandleWebhook(requestParameters: DefaultApiPublicSumsubControllerHandleWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
29
43
  }
@@ -129,6 +129,59 @@ var DefaultApi = /** @class */ (function (_super) {
129
129
  });
130
130
  });
131
131
  };
132
+ /**
133
+ * Handles incoming webhook events from SumSub.
134
+ *
135
+ */
136
+ DefaultApi.prototype.publicSumsubControllerHandleWebhookRaw = function (requestParameters, initOverrides) {
137
+ return __awaiter(this, void 0, void 0, function () {
138
+ var queryParameters, headerParameters, response;
139
+ return __generator(this, function (_a) {
140
+ switch (_a.label) {
141
+ case 0:
142
+ if (requestParameters['xPayloadDigest'] == null) {
143
+ throw new runtime.RequiredError('xPayloadDigest', 'Required parameter "xPayloadDigest" was null or undefined when calling publicSumsubControllerHandleWebhook().');
144
+ }
145
+ if (requestParameters['xPayloadDigestAlg'] == null) {
146
+ throw new runtime.RequiredError('xPayloadDigestAlg', 'Required parameter "xPayloadDigestAlg" was null or undefined when calling publicSumsubControllerHandleWebhook().');
147
+ }
148
+ queryParameters = {};
149
+ headerParameters = {};
150
+ if (requestParameters['xPayloadDigest'] != null) {
151
+ headerParameters['x-payload-digest'] = String(requestParameters['xPayloadDigest']);
152
+ }
153
+ if (requestParameters['xPayloadDigestAlg'] != null) {
154
+ headerParameters['x-payload-digest-alg'] = String(requestParameters['xPayloadDigestAlg']);
155
+ }
156
+ return [4 /*yield*/, this.request({
157
+ path: "/sumsub/webhook",
158
+ method: 'POST',
159
+ headers: headerParameters,
160
+ query: queryParameters,
161
+ }, initOverrides)];
162
+ case 1:
163
+ response = _a.sent();
164
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
165
+ }
166
+ });
167
+ });
168
+ };
169
+ /**
170
+ * Handles incoming webhook events from SumSub.
171
+ *
172
+ */
173
+ DefaultApi.prototype.publicSumsubControllerHandleWebhook = function (requestParameters, initOverrides) {
174
+ return __awaiter(this, void 0, void 0, function () {
175
+ return __generator(this, function (_a) {
176
+ switch (_a.label) {
177
+ case 0: return [4 /*yield*/, this.publicSumsubControllerHandleWebhookRaw(requestParameters, initOverrides)];
178
+ case 1:
179
+ _a.sent();
180
+ return [2 /*return*/];
181
+ }
182
+ });
183
+ });
184
+ };
132
185
  return DefaultApi;
133
186
  }(runtime.BaseAPI));
134
187
  exports.DefaultApi = DefaultApi;
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.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
+ import * as runtime from '../runtime';
13
+ import type { ValidateTaxNumberDto, ValidateTaxNumberInput } from '../models/index';
14
+ export interface TaxPublicApiValidateNumberRequest {
15
+ validateTaxNumberInput: ValidateTaxNumberInput;
16
+ }
17
+ /**
18
+ *
19
+ */
20
+ export declare class TaxPublicApi extends runtime.BaseAPI {
21
+ /**
22
+ * Validate a tax number
23
+ */
24
+ validateNumberRaw(requestParameters: TaxPublicApiValidateNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ValidateTaxNumberDto>>;
25
+ /**
26
+ * Validate a tax number
27
+ */
28
+ validateNumber(requestParameters: TaxPublicApiValidateNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ValidateTaxNumberDto>;
29
+ }
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift API
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __extends = (this && this.__extends) || (function () {
16
+ var extendStatics = function (d, b) {
17
+ extendStatics = Object.setPrototypeOf ||
18
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
20
+ return extendStatics(d, b);
21
+ };
22
+ return function (d, b) {
23
+ if (typeof b !== "function" && b !== null)
24
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
25
+ extendStatics(d, b);
26
+ function __() { this.constructor = d; }
27
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
28
+ };
29
+ })();
30
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
31
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
32
+ return new (P || (P = Promise))(function (resolve, reject) {
33
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
34
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
35
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
36
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
37
+ });
38
+ };
39
+ var __generator = (this && this.__generator) || function (thisArg, body) {
40
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
41
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
42
+ function verb(n) { return function (v) { return step([n, v]); }; }
43
+ function step(op) {
44
+ if (f) throw new TypeError("Generator is already executing.");
45
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
46
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
47
+ if (y = 0, t) op = [op[0] & 2, t.value];
48
+ switch (op[0]) {
49
+ case 0: case 1: t = op; break;
50
+ case 4: _.label++; return { value: op[1], done: false };
51
+ case 5: _.label++; y = op[1]; op = [0]; continue;
52
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
53
+ default:
54
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
55
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
56
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
57
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
58
+ if (t[2]) _.ops.pop();
59
+ _.trys.pop(); continue;
60
+ }
61
+ op = body.call(thisArg, _);
62
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
63
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
64
+ }
65
+ };
66
+ Object.defineProperty(exports, "__esModule", { value: true });
67
+ exports.TaxPublicApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var TaxPublicApi = /** @class */ (function (_super) {
74
+ __extends(TaxPublicApi, _super);
75
+ function TaxPublicApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Validate a tax number
80
+ */
81
+ TaxPublicApi.prototype.validateNumberRaw = function (requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, response;
84
+ return __generator(this, function (_a) {
85
+ switch (_a.label) {
86
+ case 0:
87
+ if (requestParameters['validateTaxNumberInput'] == null) {
88
+ throw new runtime.RequiredError('validateTaxNumberInput', 'Required parameter "validateTaxNumberInput" was null or undefined when calling validateNumber().');
89
+ }
90
+ queryParameters = {};
91
+ headerParameters = {};
92
+ headerParameters['Content-Type'] = 'application/json';
93
+ return [4 /*yield*/, this.request({
94
+ path: "/tax/validate-number",
95
+ method: 'POST',
96
+ headers: headerParameters,
97
+ query: queryParameters,
98
+ body: (0, index_1.ValidateTaxNumberInputToJSON)(requestParameters['validateTaxNumberInput']),
99
+ }, initOverrides)];
100
+ case 1:
101
+ response = _a.sent();
102
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ValidateTaxNumberDtoFromJSON)(jsonValue); })];
103
+ }
104
+ });
105
+ });
106
+ };
107
+ /**
108
+ * Validate a tax number
109
+ */
110
+ TaxPublicApi.prototype.validateNumber = function (requestParameters, initOverrides) {
111
+ return __awaiter(this, void 0, void 0, function () {
112
+ var response;
113
+ return __generator(this, function (_a) {
114
+ switch (_a.label) {
115
+ case 0: return [4 /*yield*/, this.validateNumberRaw(requestParameters, initOverrides)];
116
+ case 1:
117
+ response = _a.sent();
118
+ return [4 /*yield*/, response.value()];
119
+ case 2: return [2 /*return*/, _a.sent()];
120
+ }
121
+ });
122
+ });
123
+ };
124
+ return TaxPublicApi;
125
+ }(runtime.BaseAPI));
126
+ exports.TaxPublicApi = TaxPublicApi;
@@ -15,5 +15,6 @@ export * from './StripePublicApi';
15
15
  export * from './SubscriptionsApi';
16
16
  export * from './SubscriptionsPublicApi';
17
17
  export * from './TasksApi';
18
+ export * from './TaxPublicApi';
18
19
  export * from './UsersApi';
19
20
  export * from './UsersPublicApi';
@@ -33,5 +33,6 @@ __exportStar(require("./StripePublicApi"), exports);
33
33
  __exportStar(require("./SubscriptionsApi"), exports);
34
34
  __exportStar(require("./SubscriptionsPublicApi"), exports);
35
35
  __exportStar(require("./TasksApi"), exports);
36
+ __exportStar(require("./TaxPublicApi"), exports);
36
37
  __exportStar(require("./UsersApi"), exports);
37
38
  __exportStar(require("./UsersPublicApi"), exports);
@@ -48,7 +48,7 @@ export interface AccountDto {
48
48
  * @type {AccountOnboardingDto}
49
49
  * @memberof AccountDto
50
50
  */
51
- onboarding: AccountOnboardingDto | null;
51
+ onboarding: AccountOnboardingDto;
52
52
  /**
53
53
  *
54
54
  * @type {AccountPayoutDto}
@@ -20,7 +20,7 @@ export interface AccountOnboardingDto {
20
20
  * @type {string}
21
21
  * @memberof AccountOnboardingDto
22
22
  */
23
- accountId: string;
23
+ accountId: string | null;
24
24
  /**
25
25
  *
26
26
  * @type {string}
@@ -46,6 +46,7 @@ export interface AccountOnboardingDto {
46
46
  export declare const AccountOnboardingDtoStatusEnum: {
47
47
  readonly PENDING: "pending";
48
48
  readonly ACTIVE: "active";
49
+ readonly REJECTED: "rejected";
49
50
  };
50
51
  export type AccountOnboardingDtoStatusEnum = typeof AccountOnboardingDtoStatusEnum[keyof typeof AccountOnboardingDtoStatusEnum];
51
52
  /**
@@ -53,6 +54,7 @@ export type AccountOnboardingDtoStatusEnum = typeof AccountOnboardingDtoStatusEn
53
54
  */
54
55
  export declare const AccountOnboardingDtoProviderEnum: {
55
56
  readonly STRIPE: "stripe";
57
+ readonly SUMSUB: "sumsub";
56
58
  };
57
59
  export type AccountOnboardingDtoProviderEnum = typeof AccountOnboardingDtoProviderEnum[keyof typeof AccountOnboardingDtoProviderEnum];
58
60
  /**
@@ -24,13 +24,15 @@ exports.AccountOnboardingDtoToJSONTyped = AccountOnboardingDtoToJSONTyped;
24
24
  */
25
25
  exports.AccountOnboardingDtoStatusEnum = {
26
26
  PENDING: 'pending',
27
- ACTIVE: 'active'
27
+ ACTIVE: 'active',
28
+ REJECTED: 'rejected'
28
29
  };
29
30
  /**
30
31
  * @export
31
32
  */
32
33
  exports.AccountOnboardingDtoProviderEnum = {
33
- STRIPE: 'stripe'
34
+ STRIPE: 'stripe',
35
+ SUMSUB: 'sumsub'
34
36
  };
35
37
  /**
36
38
  * Check if a given object implements the AccountOnboardingDto interface.
@@ -28,7 +28,7 @@ export interface BillingInformationDto {
28
28
  * @type {string}
29
29
  * @memberof BillingInformationDto
30
30
  */
31
- email: string;
31
+ email: string | null;
32
32
  /**
33
33
  *
34
34
  * @type {string}
@@ -50,7 +50,7 @@ export interface IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFe
50
50
  * @type {AccountOnboardingDto}
51
51
  * @memberof IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto
52
52
  */
53
- onboarding: AccountOnboardingDto | null;
53
+ onboarding: AccountOnboardingDto;
54
54
  /**
55
55
  *
56
56
  * @type {AccountPayoutDto}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.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 ValidateTaxNumberDto
16
+ */
17
+ export interface ValidateTaxNumberDto {
18
+ /**
19
+ *
20
+ * @type {boolean}
21
+ * @memberof ValidateTaxNumberDto
22
+ */
23
+ valid: boolean;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ValidateTaxNumberDto
28
+ */
29
+ countryCode: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ValidateTaxNumberDto
34
+ */
35
+ taxNumber: string;
36
+ /**
37
+ *
38
+ * @type {string}
39
+ * @memberof ValidateTaxNumberDto
40
+ */
41
+ companyName: string | null;
42
+ /**
43
+ *
44
+ * @type {string}
45
+ * @memberof ValidateTaxNumberDto
46
+ */
47
+ address: string | null;
48
+ }
49
+ /**
50
+ * Check if a given object implements the ValidateTaxNumberDto interface.
51
+ */
52
+ export declare function instanceOfValidateTaxNumberDto(value: object): value is ValidateTaxNumberDto;
53
+ export declare function ValidateTaxNumberDtoFromJSON(json: any): ValidateTaxNumberDto;
54
+ export declare function ValidateTaxNumberDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidateTaxNumberDto;
55
+ export declare function ValidateTaxNumberDtoToJSON(json: any): ValidateTaxNumberDto;
56
+ export declare function ValidateTaxNumberDtoToJSONTyped(value?: ValidateTaxNumberDto | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift API
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfValidateTaxNumberDto = instanceOfValidateTaxNumberDto;
17
+ exports.ValidateTaxNumberDtoFromJSON = ValidateTaxNumberDtoFromJSON;
18
+ exports.ValidateTaxNumberDtoFromJSONTyped = ValidateTaxNumberDtoFromJSONTyped;
19
+ exports.ValidateTaxNumberDtoToJSON = ValidateTaxNumberDtoToJSON;
20
+ exports.ValidateTaxNumberDtoToJSONTyped = ValidateTaxNumberDtoToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ValidateTaxNumberDto interface.
23
+ */
24
+ function instanceOfValidateTaxNumberDto(value) {
25
+ if (!('valid' in value) || value['valid'] === undefined)
26
+ return false;
27
+ if (!('countryCode' in value) || value['countryCode'] === undefined)
28
+ return false;
29
+ if (!('taxNumber' in value) || value['taxNumber'] === undefined)
30
+ return false;
31
+ if (!('companyName' in value) || value['companyName'] === undefined)
32
+ return false;
33
+ if (!('address' in value) || value['address'] === undefined)
34
+ return false;
35
+ return true;
36
+ }
37
+ function ValidateTaxNumberDtoFromJSON(json) {
38
+ return ValidateTaxNumberDtoFromJSONTyped(json, false);
39
+ }
40
+ function ValidateTaxNumberDtoFromJSONTyped(json, ignoreDiscriminator) {
41
+ if (json == null) {
42
+ return json;
43
+ }
44
+ return {
45
+ 'valid': json['valid'],
46
+ 'countryCode': json['countryCode'],
47
+ 'taxNumber': json['taxNumber'],
48
+ 'companyName': json['companyName'],
49
+ 'address': json['address'],
50
+ };
51
+ }
52
+ function ValidateTaxNumberDtoToJSON(json) {
53
+ return ValidateTaxNumberDtoToJSONTyped(json, false);
54
+ }
55
+ function ValidateTaxNumberDtoToJSONTyped(value, ignoreDiscriminator) {
56
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
57
+ if (value == null) {
58
+ return value;
59
+ }
60
+ return {
61
+ 'valid': value['valid'],
62
+ 'countryCode': value['countryCode'],
63
+ 'taxNumber': value['taxNumber'],
64
+ 'companyName': value['companyName'],
65
+ 'address': value['address'],
66
+ };
67
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Nameshift
3
+ * Nameshift API
4
+ *
5
+ * The version of the OpenAPI document: 1.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 ValidateTaxNumberInput
16
+ */
17
+ export interface ValidateTaxNumberInput {
18
+ /**
19
+ *
20
+ * @type {string}
21
+ * @memberof ValidateTaxNumberInput
22
+ */
23
+ countryCode: string;
24
+ /**
25
+ *
26
+ * @type {string}
27
+ * @memberof ValidateTaxNumberInput
28
+ */
29
+ taxNumber: string;
30
+ /**
31
+ *
32
+ * @type {string}
33
+ * @memberof ValidateTaxNumberInput
34
+ */
35
+ taxNumberType: string;
36
+ }
37
+ /**
38
+ * Check if a given object implements the ValidateTaxNumberInput interface.
39
+ */
40
+ export declare function instanceOfValidateTaxNumberInput(value: object): value is ValidateTaxNumberInput;
41
+ export declare function ValidateTaxNumberInputFromJSON(json: any): ValidateTaxNumberInput;
42
+ export declare function ValidateTaxNumberInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidateTaxNumberInput;
43
+ export declare function ValidateTaxNumberInputToJSON(json: any): ValidateTaxNumberInput;
44
+ export declare function ValidateTaxNumberInputToJSONTyped(value?: ValidateTaxNumberInput | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Nameshift
6
+ * Nameshift API
7
+ *
8
+ * The version of the OpenAPI document: 1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.instanceOfValidateTaxNumberInput = instanceOfValidateTaxNumberInput;
17
+ exports.ValidateTaxNumberInputFromJSON = ValidateTaxNumberInputFromJSON;
18
+ exports.ValidateTaxNumberInputFromJSONTyped = ValidateTaxNumberInputFromJSONTyped;
19
+ exports.ValidateTaxNumberInputToJSON = ValidateTaxNumberInputToJSON;
20
+ exports.ValidateTaxNumberInputToJSONTyped = ValidateTaxNumberInputToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the ValidateTaxNumberInput interface.
23
+ */
24
+ function instanceOfValidateTaxNumberInput(value) {
25
+ if (!('countryCode' in value) || value['countryCode'] === undefined)
26
+ return false;
27
+ if (!('taxNumber' in value) || value['taxNumber'] === undefined)
28
+ return false;
29
+ if (!('taxNumberType' in value) || value['taxNumberType'] === undefined)
30
+ return false;
31
+ return true;
32
+ }
33
+ function ValidateTaxNumberInputFromJSON(json) {
34
+ return ValidateTaxNumberInputFromJSONTyped(json, false);
35
+ }
36
+ function ValidateTaxNumberInputFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'countryCode': json['countryCode'],
42
+ 'taxNumber': json['taxNumber'],
43
+ 'taxNumberType': json['taxNumberType'],
44
+ };
45
+ }
46
+ function ValidateTaxNumberInputToJSON(json) {
47
+ return ValidateTaxNumberInputToJSONTyped(json, false);
48
+ }
49
+ function ValidateTaxNumberInputToJSONTyped(value, ignoreDiscriminator) {
50
+ if (ignoreDiscriminator === void 0) { ignoreDiscriminator = false; }
51
+ if (value == null) {
52
+ return value;
53
+ }
54
+ return {
55
+ 'countryCode': value['countryCode'],
56
+ 'taxNumber': value['taxNumber'],
57
+ 'taxNumberType': value['taxNumberType'],
58
+ };
59
+ }
@@ -202,6 +202,8 @@ export * from './UpdateSubscriptionBillingPeriodicityInput';
202
202
  export * from './UpdateSubscriptionInput';
203
203
  export * from './UsBankAccountDetails';
204
204
  export * from './UserPasswordResetDto';
205
+ export * from './ValidateTaxNumberDto';
206
+ export * from './ValidateTaxNumberInput';
205
207
  export * from './ValidationError';
206
208
  export * from './ValidationException';
207
209
  export * from './VerifyLeadInput';
@@ -220,6 +220,8 @@ __exportStar(require("./UpdateSubscriptionBillingPeriodicityInput"), exports);
220
220
  __exportStar(require("./UpdateSubscriptionInput"), exports);
221
221
  __exportStar(require("./UsBankAccountDetails"), exports);
222
222
  __exportStar(require("./UserPasswordResetDto"), exports);
223
+ __exportStar(require("./ValidateTaxNumberDto"), exports);
224
+ __exportStar(require("./ValidateTaxNumberInput"), exports);
223
225
  __exportStar(require("./ValidationError"), exports);
224
226
  __exportStar(require("./ValidationException"), exports);
225
227
  __exportStar(require("./VerifyLeadInput"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.221",
3
+ "version": "0.0.222",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -22,6 +22,11 @@ export interface DefaultApiPublicAdsControllerAdwordsConversionExportRequest {
22
22
  conversion: string;
23
23
  }
24
24
 
25
+ export interface DefaultApiPublicSumsubControllerHandleWebhookRequest {
26
+ xPayloadDigest: string;
27
+ xPayloadDigestAlg: string;
28
+ }
29
+
25
30
  /**
26
31
  *
27
32
  */
@@ -86,4 +91,53 @@ export class DefaultApi extends runtime.BaseAPI {
86
91
  await this.publicAdsControllerAdwordsConversionExportRaw(requestParameters, initOverrides);
87
92
  }
88
93
 
94
+ /**
95
+ * Handles incoming webhook events from SumSub.
96
+ *
97
+ */
98
+ async publicSumsubControllerHandleWebhookRaw(requestParameters: DefaultApiPublicSumsubControllerHandleWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
99
+ if (requestParameters['xPayloadDigest'] == null) {
100
+ throw new runtime.RequiredError(
101
+ 'xPayloadDigest',
102
+ 'Required parameter "xPayloadDigest" was null or undefined when calling publicSumsubControllerHandleWebhook().'
103
+ );
104
+ }
105
+
106
+ if (requestParameters['xPayloadDigestAlg'] == null) {
107
+ throw new runtime.RequiredError(
108
+ 'xPayloadDigestAlg',
109
+ 'Required parameter "xPayloadDigestAlg" was null or undefined when calling publicSumsubControllerHandleWebhook().'
110
+ );
111
+ }
112
+
113
+ const queryParameters: any = {};
114
+
115
+ const headerParameters: runtime.HTTPHeaders = {};
116
+
117
+ if (requestParameters['xPayloadDigest'] != null) {
118
+ headerParameters['x-payload-digest'] = String(requestParameters['xPayloadDigest']);
119
+ }
120
+
121
+ if (requestParameters['xPayloadDigestAlg'] != null) {
122
+ headerParameters['x-payload-digest-alg'] = String(requestParameters['xPayloadDigestAlg']);
123
+ }
124
+
125
+ const response = await this.request({
126
+ path: `/sumsub/webhook`,
127
+ method: 'POST',
128
+ headers: headerParameters,
129
+ query: queryParameters,
130
+ }, initOverrides);
131
+
132
+ return new runtime.VoidApiResponse(response);
133
+ }
134
+
135
+ /**
136
+ * Handles incoming webhook events from SumSub.
137
+ *
138
+ */
139
+ async publicSumsubControllerHandleWebhook(requestParameters: DefaultApiPublicSumsubControllerHandleWebhookRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
140
+ await this.publicSumsubControllerHandleWebhookRaw(requestParameters, initOverrides);
141
+ }
142
+
89
143
  }
@@ -0,0 +1,76 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.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
+
15
+
16
+ import * as runtime from '../runtime';
17
+ import type {
18
+ ThrottlerException,
19
+ ValidateTaxNumberDto,
20
+ ValidateTaxNumberInput,
21
+ } from '../models/index';
22
+ import {
23
+ ThrottlerExceptionFromJSON,
24
+ ThrottlerExceptionToJSON,
25
+ ValidateTaxNumberDtoFromJSON,
26
+ ValidateTaxNumberDtoToJSON,
27
+ ValidateTaxNumberInputFromJSON,
28
+ ValidateTaxNumberInputToJSON,
29
+ } from '../models/index';
30
+
31
+ export interface TaxPublicApiValidateNumberRequest {
32
+ validateTaxNumberInput: ValidateTaxNumberInput;
33
+ }
34
+
35
+ /**
36
+ *
37
+ */
38
+ export class TaxPublicApi extends runtime.BaseAPI {
39
+
40
+ /**
41
+ * Validate a tax number
42
+ */
43
+ async validateNumberRaw(requestParameters: TaxPublicApiValidateNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ValidateTaxNumberDto>> {
44
+ if (requestParameters['validateTaxNumberInput'] == null) {
45
+ throw new runtime.RequiredError(
46
+ 'validateTaxNumberInput',
47
+ 'Required parameter "validateTaxNumberInput" was null or undefined when calling validateNumber().'
48
+ );
49
+ }
50
+
51
+ const queryParameters: any = {};
52
+
53
+ const headerParameters: runtime.HTTPHeaders = {};
54
+
55
+ headerParameters['Content-Type'] = 'application/json';
56
+
57
+ const response = await this.request({
58
+ path: `/tax/validate-number`,
59
+ method: 'POST',
60
+ headers: headerParameters,
61
+ query: queryParameters,
62
+ body: ValidateTaxNumberInputToJSON(requestParameters['validateTaxNumberInput']),
63
+ }, initOverrides);
64
+
65
+ return new runtime.JSONApiResponse(response, (jsonValue) => ValidateTaxNumberDtoFromJSON(jsonValue));
66
+ }
67
+
68
+ /**
69
+ * Validate a tax number
70
+ */
71
+ async validateNumber(requestParameters: TaxPublicApiValidateNumberRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ValidateTaxNumberDto> {
72
+ const response = await this.validateNumberRaw(requestParameters, initOverrides);
73
+ return await response.value();
74
+ }
75
+
76
+ }
package/src/apis/index.ts CHANGED
@@ -17,5 +17,6 @@ export * from './StripePublicApi';
17
17
  export * from './SubscriptionsApi';
18
18
  export * from './SubscriptionsPublicApi';
19
19
  export * from './TasksApi';
20
+ export * from './TaxPublicApi';
20
21
  export * from './UsersApi';
21
22
  export * from './UsersPublicApi';
@@ -77,7 +77,7 @@ export interface AccountDto {
77
77
  * @type {AccountOnboardingDto}
78
78
  * @memberof AccountDto
79
79
  */
80
- onboarding: AccountOnboardingDto | null;
80
+ onboarding: AccountOnboardingDto;
81
81
  /**
82
82
  *
83
83
  * @type {AccountPayoutDto}
@@ -24,7 +24,7 @@ export interface AccountOnboardingDto {
24
24
  * @type {string}
25
25
  * @memberof AccountOnboardingDto
26
26
  */
27
- accountId: string;
27
+ accountId: string | null;
28
28
  /**
29
29
  *
30
30
  * @type {string}
@@ -51,7 +51,8 @@ export interface AccountOnboardingDto {
51
51
  */
52
52
  export const AccountOnboardingDtoStatusEnum = {
53
53
  PENDING: 'pending',
54
- ACTIVE: 'active'
54
+ ACTIVE: 'active',
55
+ REJECTED: 'rejected'
55
56
  } as const;
56
57
  export type AccountOnboardingDtoStatusEnum = typeof AccountOnboardingDtoStatusEnum[keyof typeof AccountOnboardingDtoStatusEnum];
57
58
 
@@ -59,7 +60,8 @@ export type AccountOnboardingDtoStatusEnum = typeof AccountOnboardingDtoStatusEn
59
60
  * @export
60
61
  */
61
62
  export const AccountOnboardingDtoProviderEnum = {
62
- STRIPE: 'stripe'
63
+ STRIPE: 'stripe',
64
+ SUMSUB: 'sumsub'
63
65
  } as const;
64
66
  export type AccountOnboardingDtoProviderEnum = typeof AccountOnboardingDtoProviderEnum[keyof typeof AccountOnboardingDtoProviderEnum];
65
67
 
@@ -45,7 +45,7 @@ export interface BillingInformationDto {
45
45
  * @type {string}
46
46
  * @memberof BillingInformationDto
47
47
  */
48
- email: string;
48
+ email: string | null;
49
49
  /**
50
50
  *
51
51
  * @type {string}
@@ -91,7 +91,7 @@ export interface IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFe
91
91
  * @type {AccountOnboardingDto}
92
92
  * @memberof IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto
93
93
  */
94
- onboarding: AccountOnboardingDto | null;
94
+ onboarding: AccountOnboardingDto;
95
95
  /**
96
96
  *
97
97
  * @type {AccountPayoutDto}
@@ -0,0 +1,102 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.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
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ValidateTaxNumberDto
20
+ */
21
+ export interface ValidateTaxNumberDto {
22
+ /**
23
+ *
24
+ * @type {boolean}
25
+ * @memberof ValidateTaxNumberDto
26
+ */
27
+ valid: boolean;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ValidateTaxNumberDto
32
+ */
33
+ countryCode: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ValidateTaxNumberDto
38
+ */
39
+ taxNumber: string;
40
+ /**
41
+ *
42
+ * @type {string}
43
+ * @memberof ValidateTaxNumberDto
44
+ */
45
+ companyName: string | null;
46
+ /**
47
+ *
48
+ * @type {string}
49
+ * @memberof ValidateTaxNumberDto
50
+ */
51
+ address: string | null;
52
+ }
53
+
54
+ /**
55
+ * Check if a given object implements the ValidateTaxNumberDto interface.
56
+ */
57
+ export function instanceOfValidateTaxNumberDto(value: object): value is ValidateTaxNumberDto {
58
+ if (!('valid' in value) || value['valid'] === undefined) return false;
59
+ if (!('countryCode' in value) || value['countryCode'] === undefined) return false;
60
+ if (!('taxNumber' in value) || value['taxNumber'] === undefined) return false;
61
+ if (!('companyName' in value) || value['companyName'] === undefined) return false;
62
+ if (!('address' in value) || value['address'] === undefined) return false;
63
+ return true;
64
+ }
65
+
66
+ export function ValidateTaxNumberDtoFromJSON(json: any): ValidateTaxNumberDto {
67
+ return ValidateTaxNumberDtoFromJSONTyped(json, false);
68
+ }
69
+
70
+ export function ValidateTaxNumberDtoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidateTaxNumberDto {
71
+ if (json == null) {
72
+ return json;
73
+ }
74
+ return {
75
+
76
+ 'valid': json['valid'],
77
+ 'countryCode': json['countryCode'],
78
+ 'taxNumber': json['taxNumber'],
79
+ 'companyName': json['companyName'],
80
+ 'address': json['address'],
81
+ };
82
+ }
83
+
84
+ export function ValidateTaxNumberDtoToJSON(json: any): ValidateTaxNumberDto {
85
+ return ValidateTaxNumberDtoToJSONTyped(json, false);
86
+ }
87
+
88
+ export function ValidateTaxNumberDtoToJSONTyped(value?: ValidateTaxNumberDto | null, ignoreDiscriminator: boolean = false): any {
89
+ if (value == null) {
90
+ return value;
91
+ }
92
+
93
+ return {
94
+
95
+ 'valid': value['valid'],
96
+ 'countryCode': value['countryCode'],
97
+ 'taxNumber': value['taxNumber'],
98
+ 'companyName': value['companyName'],
99
+ 'address': value['address'],
100
+ };
101
+ }
102
+
@@ -0,0 +1,84 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Nameshift
5
+ * Nameshift API
6
+ *
7
+ * The version of the OpenAPI document: 1.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
+
15
+ import { mapValues } from '../runtime';
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface ValidateTaxNumberInput
20
+ */
21
+ export interface ValidateTaxNumberInput {
22
+ /**
23
+ *
24
+ * @type {string}
25
+ * @memberof ValidateTaxNumberInput
26
+ */
27
+ countryCode: string;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof ValidateTaxNumberInput
32
+ */
33
+ taxNumber: string;
34
+ /**
35
+ *
36
+ * @type {string}
37
+ * @memberof ValidateTaxNumberInput
38
+ */
39
+ taxNumberType: string;
40
+ }
41
+
42
+ /**
43
+ * Check if a given object implements the ValidateTaxNumberInput interface.
44
+ */
45
+ export function instanceOfValidateTaxNumberInput(value: object): value is ValidateTaxNumberInput {
46
+ if (!('countryCode' in value) || value['countryCode'] === undefined) return false;
47
+ if (!('taxNumber' in value) || value['taxNumber'] === undefined) return false;
48
+ if (!('taxNumberType' in value) || value['taxNumberType'] === undefined) return false;
49
+ return true;
50
+ }
51
+
52
+ export function ValidateTaxNumberInputFromJSON(json: any): ValidateTaxNumberInput {
53
+ return ValidateTaxNumberInputFromJSONTyped(json, false);
54
+ }
55
+
56
+ export function ValidateTaxNumberInputFromJSONTyped(json: any, ignoreDiscriminator: boolean): ValidateTaxNumberInput {
57
+ if (json == null) {
58
+ return json;
59
+ }
60
+ return {
61
+
62
+ 'countryCode': json['countryCode'],
63
+ 'taxNumber': json['taxNumber'],
64
+ 'taxNumberType': json['taxNumberType'],
65
+ };
66
+ }
67
+
68
+ export function ValidateTaxNumberInputToJSON(json: any): ValidateTaxNumberInput {
69
+ return ValidateTaxNumberInputToJSONTyped(json, false);
70
+ }
71
+
72
+ export function ValidateTaxNumberInputToJSONTyped(value?: ValidateTaxNumberInput | null, ignoreDiscriminator: boolean = false): any {
73
+ if (value == null) {
74
+ return value;
75
+ }
76
+
77
+ return {
78
+
79
+ 'countryCode': value['countryCode'],
80
+ 'taxNumber': value['taxNumber'],
81
+ 'taxNumberType': value['taxNumberType'],
82
+ };
83
+ }
84
+
@@ -204,6 +204,8 @@ export * from './UpdateSubscriptionBillingPeriodicityInput';
204
204
  export * from './UpdateSubscriptionInput';
205
205
  export * from './UsBankAccountDetails';
206
206
  export * from './UserPasswordResetDto';
207
+ export * from './ValidateTaxNumberDto';
208
+ export * from './ValidateTaxNumberInput';
207
209
  export * from './ValidationError';
208
210
  export * from './ValidationException';
209
211
  export * from './VerifyLeadInput';