@randock/nameshift-api-client 0.0.199 → 0.0.200

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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.199
1
+ ## @randock/nameshift-api-client@0.0.200
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.199 --save
39
+ npm install @randock/nameshift-api-client@0.0.200 --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
- 8a9c6c60ce5babfa85725463d2777f12d3b47cb5d3d86a03e0f4214bd0489f7a7623f48a32dc0821a193c95614a8d79b
47
+ 0c8e77a81c9238e79be6074bd4f27e923ef51907af01da8a00670f58c988181194325028dd6d3a3fadeb16054f9eb66b
@@ -21,6 +21,9 @@ export interface BuyersApiBulkReadBuyerLeadMessageRequest {
21
21
  leadId: string;
22
22
  batchReadBuyerLeadMessageInput: BatchReadBuyerLeadMessageInput;
23
23
  }
24
+ export interface BuyersApiCancelSubscriptionRequest {
25
+ subscriptionId: string;
26
+ }
24
27
  export interface BuyersApiCreateBuyerLeadMessageRequest {
25
28
  leadId: string;
26
29
  createBuyerLeadMessageInput: CreateBuyerLeadMessageInput;
@@ -114,6 +117,14 @@ export declare class BuyersApi extends runtime.BaseAPI {
114
117
  *
115
118
  */
116
119
  buyerMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BuyerSecurityUserDto>;
120
+ /**
121
+ *
122
+ */
123
+ cancelSubscriptionRaw(requestParameters: BuyersApiCancelSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
124
+ /**
125
+ *
126
+ */
127
+ cancelSubscription(requestParameters: BuyersApiCancelSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
117
128
  /**
118
129
  *
119
130
  */
@@ -285,6 +285,57 @@ var BuyersApi = /** @class */ (function (_super) {
285
285
  });
286
286
  });
287
287
  };
288
+ /**
289
+ *
290
+ */
291
+ BuyersApi.prototype.cancelSubscriptionRaw = function (requestParameters, initOverrides) {
292
+ return __awaiter(this, void 0, void 0, function () {
293
+ var queryParameters, headerParameters, token, tokenString, response;
294
+ return __generator(this, function (_a) {
295
+ switch (_a.label) {
296
+ case 0:
297
+ if (requestParameters['subscriptionId'] == null) {
298
+ throw new runtime.RequiredError('subscriptionId', 'Required parameter "subscriptionId" was null or undefined when calling cancelSubscription().');
299
+ }
300
+ queryParameters = {};
301
+ headerParameters = {};
302
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
303
+ token = this.configuration.accessToken;
304
+ return [4 /*yield*/, token("bearer", [])];
305
+ case 1:
306
+ tokenString = _a.sent();
307
+ if (tokenString) {
308
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
309
+ }
310
+ _a.label = 2;
311
+ case 2: return [4 /*yield*/, this.request({
312
+ path: "/buyers/private/subscriptions/{subscriptionId}/cancel".replace("{".concat("subscriptionId", "}"), encodeURIComponent(String(requestParameters['subscriptionId']))),
313
+ method: 'PATCH',
314
+ headers: headerParameters,
315
+ query: queryParameters,
316
+ }, initOverrides)];
317
+ case 3:
318
+ response = _a.sent();
319
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
320
+ }
321
+ });
322
+ });
323
+ };
324
+ /**
325
+ *
326
+ */
327
+ BuyersApi.prototype.cancelSubscription = function (requestParameters, initOverrides) {
328
+ return __awaiter(this, void 0, void 0, function () {
329
+ return __generator(this, function (_a) {
330
+ switch (_a.label) {
331
+ case 0: return [4 /*yield*/, this.cancelSubscriptionRaw(requestParameters, initOverrides)];
332
+ case 1:
333
+ _a.sent();
334
+ return [2 /*return*/];
335
+ }
336
+ });
337
+ });
338
+ };
288
339
  /**
289
340
  *
290
341
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.199",
3
+ "version": "0.0.200",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -92,6 +92,10 @@ export interface BuyersApiBulkReadBuyerLeadMessageRequest {
92
92
  batchReadBuyerLeadMessageInput: BatchReadBuyerLeadMessageInput;
93
93
  }
94
94
 
95
+ export interface BuyersApiCancelSubscriptionRequest {
96
+ subscriptionId: string;
97
+ }
98
+
95
99
  export interface BuyersApiCreateBuyerLeadMessageRequest {
96
100
  leadId: string;
97
101
  createBuyerLeadMessageInput: CreateBuyerLeadMessageInput;
@@ -335,6 +339,46 @@ export class BuyersApi extends runtime.BaseAPI {
335
339
  return await response.value();
336
340
  }
337
341
 
342
+ /**
343
+ *
344
+ */
345
+ async cancelSubscriptionRaw(requestParameters: BuyersApiCancelSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
346
+ if (requestParameters['subscriptionId'] == null) {
347
+ throw new runtime.RequiredError(
348
+ 'subscriptionId',
349
+ 'Required parameter "subscriptionId" was null or undefined when calling cancelSubscription().'
350
+ );
351
+ }
352
+
353
+ const queryParameters: any = {};
354
+
355
+ const headerParameters: runtime.HTTPHeaders = {};
356
+
357
+ if (this.configuration && this.configuration.accessToken) {
358
+ const token = this.configuration.accessToken;
359
+ const tokenString = await token("bearer", []);
360
+
361
+ if (tokenString) {
362
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
363
+ }
364
+ }
365
+ const response = await this.request({
366
+ path: `/buyers/private/subscriptions/{subscriptionId}/cancel`.replace(`{${"subscriptionId"}}`, encodeURIComponent(String(requestParameters['subscriptionId']))),
367
+ method: 'PATCH',
368
+ headers: headerParameters,
369
+ query: queryParameters,
370
+ }, initOverrides);
371
+
372
+ return new runtime.VoidApiResponse(response);
373
+ }
374
+
375
+ /**
376
+ *
377
+ */
378
+ async cancelSubscription(requestParameters: BuyersApiCancelSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
379
+ await this.cancelSubscriptionRaw(requestParameters, initOverrides);
380
+ }
381
+
338
382
  /**
339
383
  *
340
384
  */