@forteplatforms/sdk 1.0.140 → 1.0.141

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.
@@ -38,12 +38,12 @@ export interface AdminVerifyUserContactMethodRequest {
38
38
  contactMethodId: string;
39
39
  verificationCode: string;
40
40
  }
41
- export interface CreatePaymentOperationRequest {
41
+ export interface CreatePayment1Request {
42
42
  projectId: string;
43
43
  userId: string;
44
44
  createPaymentRequest: CreatePaymentRequest;
45
45
  }
46
- export interface CreatePaymentPreviewOperationRequest {
46
+ export interface CreatePaymentPreview1Request {
47
47
  projectId: string;
48
48
  userId: string;
49
49
  createPaymentPreviewRequest: CreatePaymentPreviewRequest;
@@ -313,16 +313,16 @@ export declare class ProjectsServerApi extends runtime.BaseAPI {
313
313
  adminVerifyUserContactMethod(requestParameters: AdminVerifyUserContactMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContactMethod>;
314
314
  /**
315
315
  */
316
- createPaymentRaw(requestParameters: CreatePaymentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatePaymentResponse>>;
316
+ createPayment1Raw(requestParameters: CreatePayment1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatePaymentResponse>>;
317
317
  /**
318
318
  */
319
- createPayment(requestParameters: CreatePaymentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatePaymentResponse>;
319
+ createPayment1(requestParameters: CreatePayment1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatePaymentResponse>;
320
320
  /**
321
321
  */
322
- createPaymentPreviewRaw(requestParameters: CreatePaymentPreviewOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatePaymentPreviewResponse>>;
322
+ createPaymentPreview1Raw(requestParameters: CreatePaymentPreview1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatePaymentPreviewResponse>>;
323
323
  /**
324
324
  */
325
- createPaymentPreview(requestParameters: CreatePaymentPreviewOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatePaymentPreviewResponse>;
325
+ createPaymentPreview1(requestParameters: CreatePaymentPreview1Request, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatePaymentPreviewResponse>;
326
326
  /**
327
327
  */
328
328
  createPaymentTriggerRaw(requestParameters: CreatePaymentTriggerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaymentTriggerConfig>>;
@@ -347,20 +347,20 @@ var ProjectsServerApi = /** @class */ (function (_super) {
347
347
  };
348
348
  /**
349
349
  */
350
- ProjectsServerApi.prototype.createPaymentRaw = function (requestParameters, initOverrides) {
350
+ ProjectsServerApi.prototype.createPayment1Raw = function (requestParameters, initOverrides) {
351
351
  return __awaiter(this, void 0, void 0, function () {
352
352
  var queryParameters, headerParameters, urlPath, response;
353
353
  return __generator(this, function (_a) {
354
354
  switch (_a.label) {
355
355
  case 0:
356
356
  if (requestParameters['projectId'] == null) {
357
- throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling createPayment().');
357
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling createPayment1().');
358
358
  }
359
359
  if (requestParameters['userId'] == null) {
360
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createPayment().');
360
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createPayment1().');
361
361
  }
362
362
  if (requestParameters['createPaymentRequest'] == null) {
363
- throw new runtime.RequiredError('createPaymentRequest', 'Required parameter "createPaymentRequest" was null or undefined when calling createPayment().');
363
+ throw new runtime.RequiredError('createPaymentRequest', 'Required parameter "createPaymentRequest" was null or undefined when calling createPayment1().');
364
364
  }
365
365
  queryParameters = {};
366
366
  headerParameters = {};
@@ -384,12 +384,12 @@ var ProjectsServerApi = /** @class */ (function (_super) {
384
384
  };
385
385
  /**
386
386
  */
387
- ProjectsServerApi.prototype.createPayment = function (requestParameters, initOverrides) {
387
+ ProjectsServerApi.prototype.createPayment1 = function (requestParameters, initOverrides) {
388
388
  return __awaiter(this, void 0, void 0, function () {
389
389
  var response;
390
390
  return __generator(this, function (_a) {
391
391
  switch (_a.label) {
392
- case 0: return [4 /*yield*/, this.createPaymentRaw(requestParameters, initOverrides)];
392
+ case 0: return [4 /*yield*/, this.createPayment1Raw(requestParameters, initOverrides)];
393
393
  case 1:
394
394
  response = _a.sent();
395
395
  return [4 /*yield*/, response.value()];
@@ -400,20 +400,20 @@ var ProjectsServerApi = /** @class */ (function (_super) {
400
400
  };
401
401
  /**
402
402
  */
403
- ProjectsServerApi.prototype.createPaymentPreviewRaw = function (requestParameters, initOverrides) {
403
+ ProjectsServerApi.prototype.createPaymentPreview1Raw = function (requestParameters, initOverrides) {
404
404
  return __awaiter(this, void 0, void 0, function () {
405
405
  var queryParameters, headerParameters, urlPath, response;
406
406
  return __generator(this, function (_a) {
407
407
  switch (_a.label) {
408
408
  case 0:
409
409
  if (requestParameters['projectId'] == null) {
410
- throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling createPaymentPreview().');
410
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling createPaymentPreview1().');
411
411
  }
412
412
  if (requestParameters['userId'] == null) {
413
- throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createPaymentPreview().');
413
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling createPaymentPreview1().');
414
414
  }
415
415
  if (requestParameters['createPaymentPreviewRequest'] == null) {
416
- throw new runtime.RequiredError('createPaymentPreviewRequest', 'Required parameter "createPaymentPreviewRequest" was null or undefined when calling createPaymentPreview().');
416
+ throw new runtime.RequiredError('createPaymentPreviewRequest', 'Required parameter "createPaymentPreviewRequest" was null or undefined when calling createPaymentPreview1().');
417
417
  }
418
418
  queryParameters = {};
419
419
  headerParameters = {};
@@ -437,12 +437,12 @@ var ProjectsServerApi = /** @class */ (function (_super) {
437
437
  };
438
438
  /**
439
439
  */
440
- ProjectsServerApi.prototype.createPaymentPreview = function (requestParameters, initOverrides) {
440
+ ProjectsServerApi.prototype.createPaymentPreview1 = function (requestParameters, initOverrides) {
441
441
  return __awaiter(this, void 0, void 0, function () {
442
442
  var response;
443
443
  return __generator(this, function (_a) {
444
444
  switch (_a.label) {
445
- case 0: return [4 /*yield*/, this.createPaymentPreviewRaw(requestParameters, initOverrides)];
445
+ case 0: return [4 /*yield*/, this.createPaymentPreview1Raw(requestParameters, initOverrides)];
446
446
  case 1:
447
447
  response = _a.sent();
448
448
  return [4 /*yield*/, response.value()];
@@ -10,11 +10,19 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { AddContactMethodRequest, ContactMethod, LoginUserResponse, PaginatedResponsePaymentObject, RegisterUserRequest, RegisterUserResponse, RenewSessionTokenResponse, UserObject } from '../models/index';
13
+ import type { AddContactMethodRequest, ContactMethod, CreatePaymentPreviewRequest, CreatePaymentPreviewResponse, CreatePaymentRequest, CreatePaymentResponse, LoginUserResponse, PaginatedResponsePaymentObject, RegisterUserRequest, RegisterUserResponse, RenewSessionTokenResponse, UserObject } from '../models/index';
14
14
  export interface CreateContactMethodRequest {
15
15
  projectId: string;
16
16
  addContactMethodRequest: AddContactMethodRequest;
17
17
  }
18
+ export interface CreatePaymentOperationRequest {
19
+ projectId: string;
20
+ createPaymentRequest: CreatePaymentRequest;
21
+ }
22
+ export interface CreatePaymentPreviewOperationRequest {
23
+ projectId: string;
24
+ createPaymentPreviewRequest: CreatePaymentPreviewRequest;
25
+ }
18
26
  export interface DeleteContactMethodRequest {
19
27
  projectId: string;
20
28
  contactMethodId: string;
@@ -70,6 +78,18 @@ export declare class UsersServerApi extends runtime.BaseAPI {
70
78
  /**
71
79
  */
72
80
  createContactMethod(requestParameters: CreateContactMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ContactMethod>;
81
+ /**
82
+ */
83
+ createPaymentRaw(requestParameters: CreatePaymentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatePaymentResponse>>;
84
+ /**
85
+ */
86
+ createPayment(requestParameters: CreatePaymentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatePaymentResponse>;
87
+ /**
88
+ */
89
+ createPaymentPreviewRaw(requestParameters: CreatePaymentPreviewOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatePaymentPreviewResponse>>;
90
+ /**
91
+ */
92
+ createPaymentPreview(requestParameters: CreatePaymentPreviewOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatePaymentPreviewResponse>;
73
93
  /**
74
94
  */
75
95
  deleteContactMethodRaw(requestParameters: DeleteContactMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
@@ -124,6 +124,104 @@ var UsersServerApi = /** @class */ (function (_super) {
124
124
  });
125
125
  });
126
126
  };
127
+ /**
128
+ */
129
+ UsersServerApi.prototype.createPaymentRaw = function (requestParameters, initOverrides) {
130
+ return __awaiter(this, void 0, void 0, function () {
131
+ var queryParameters, headerParameters, urlPath, response;
132
+ return __generator(this, function (_a) {
133
+ switch (_a.label) {
134
+ case 0:
135
+ if (requestParameters['projectId'] == null) {
136
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling createPayment().');
137
+ }
138
+ if (requestParameters['createPaymentRequest'] == null) {
139
+ throw new runtime.RequiredError('createPaymentRequest', 'Required parameter "createPaymentRequest" was null or undefined when calling createPayment().');
140
+ }
141
+ queryParameters = {};
142
+ headerParameters = {};
143
+ headerParameters['Content-Type'] = 'application/json';
144
+ urlPath = "/api/v1/{projectId}/users/me/payments";
145
+ urlPath = urlPath.replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters['projectId'])));
146
+ return [4 /*yield*/, this.request({
147
+ path: urlPath,
148
+ method: 'POST',
149
+ headers: headerParameters,
150
+ query: queryParameters,
151
+ body: (0, index_1.CreatePaymentRequestToJSON)(requestParameters['createPaymentRequest']),
152
+ }, initOverrides)];
153
+ case 1:
154
+ response = _a.sent();
155
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CreatePaymentResponseFromJSON)(jsonValue); })];
156
+ }
157
+ });
158
+ });
159
+ };
160
+ /**
161
+ */
162
+ UsersServerApi.prototype.createPayment = function (requestParameters, initOverrides) {
163
+ return __awaiter(this, void 0, void 0, function () {
164
+ var response;
165
+ return __generator(this, function (_a) {
166
+ switch (_a.label) {
167
+ case 0: return [4 /*yield*/, this.createPaymentRaw(requestParameters, initOverrides)];
168
+ case 1:
169
+ response = _a.sent();
170
+ return [4 /*yield*/, response.value()];
171
+ case 2: return [2 /*return*/, _a.sent()];
172
+ }
173
+ });
174
+ });
175
+ };
176
+ /**
177
+ */
178
+ UsersServerApi.prototype.createPaymentPreviewRaw = function (requestParameters, initOverrides) {
179
+ return __awaiter(this, void 0, void 0, function () {
180
+ var queryParameters, headerParameters, urlPath, response;
181
+ return __generator(this, function (_a) {
182
+ switch (_a.label) {
183
+ case 0:
184
+ if (requestParameters['projectId'] == null) {
185
+ throw new runtime.RequiredError('projectId', 'Required parameter "projectId" was null or undefined when calling createPaymentPreview().');
186
+ }
187
+ if (requestParameters['createPaymentPreviewRequest'] == null) {
188
+ throw new runtime.RequiredError('createPaymentPreviewRequest', 'Required parameter "createPaymentPreviewRequest" was null or undefined when calling createPaymentPreview().');
189
+ }
190
+ queryParameters = {};
191
+ headerParameters = {};
192
+ headerParameters['Content-Type'] = 'application/json';
193
+ urlPath = "/api/v1/{projectId}/users/me/payments/preview";
194
+ urlPath = urlPath.replace("{".concat("projectId", "}"), encodeURIComponent(String(requestParameters['projectId'])));
195
+ return [4 /*yield*/, this.request({
196
+ path: urlPath,
197
+ method: 'POST',
198
+ headers: headerParameters,
199
+ query: queryParameters,
200
+ body: (0, index_1.CreatePaymentPreviewRequestToJSON)(requestParameters['createPaymentPreviewRequest']),
201
+ }, initOverrides)];
202
+ case 1:
203
+ response = _a.sent();
204
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CreatePaymentPreviewResponseFromJSON)(jsonValue); })];
205
+ }
206
+ });
207
+ });
208
+ };
209
+ /**
210
+ */
211
+ UsersServerApi.prototype.createPaymentPreview = function (requestParameters, initOverrides) {
212
+ return __awaiter(this, void 0, void 0, function () {
213
+ var response;
214
+ return __generator(this, function (_a) {
215
+ switch (_a.label) {
216
+ case 0: return [4 /*yield*/, this.createPaymentPreviewRaw(requestParameters, initOverrides)];
217
+ case 1:
218
+ response = _a.sent();
219
+ return [4 /*yield*/, response.value()];
220
+ case 2: return [2 /*return*/, _a.sent()];
221
+ }
222
+ });
223
+ });
224
+ };
127
225
  /**
128
226
  */
129
227
  UsersServerApi.prototype.deleteContactMethodRaw = function (requestParameters, initOverrides) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forteplatforms/sdk",
3
- "version": "1.0.140",
3
+ "version": "1.0.141",
4
4
  "description": "Official TypeScript SDK for Forte Platforms",
5
5
  "author": "Forte Platforms <support@forteplatforms.com>",
6
6
  "repository": {