@randock/nameshift-api-client 0.0.45 → 0.0.46

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.45
1
+ ## @randock/nameshift-api-client@0.0.46
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.45 --save
39
+ npm install @randock/nameshift-api-client@0.0.46 --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
- 42ab85e9bd267885ec375e8f8164a892461cb559fe762f33442e3936a114b971465b6602ee7575059ca69099810d20e8
47
+ a9c724ec99fb249cafd505ede72b282e2d318028e90ed27fef4ad80e4159758b7cd7309af516faf2f7bf67716accb528
@@ -11,6 +11,9 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import type { CreateLeadMessageInput, IntersectionLeadDtoWithLeadDetailsDto, IntersectionLeadDtoWithListFieldsDto, ListLeadMessagesDto, ObjectId, PutLeadInput } from '../models/index';
14
+ export interface LeadsApiAcceptLeadOfferRequest {
15
+ leadId: string;
16
+ }
14
17
  export interface LeadsApiCreateMessageRequest {
15
18
  leadId: string;
16
19
  createLeadMessageInput: CreateLeadMessageInput;
@@ -29,6 +32,14 @@ export interface LeadsApiPutOfferRequest {
29
32
  *
30
33
  */
31
34
  export declare class LeadsApi extends runtime.BaseAPI {
35
+ /**
36
+ *
37
+ */
38
+ acceptLeadOfferRaw(requestParameters: LeadsApiAcceptLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
39
+ /**
40
+ *
41
+ */
42
+ acceptLeadOffer(requestParameters: LeadsApiAcceptLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
32
43
  /**
33
44
  *
34
45
  */
@@ -75,6 +75,57 @@ var LeadsApi = /** @class */ (function (_super) {
75
75
  function LeadsApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ *
80
+ */
81
+ LeadsApi.prototype.acceptLeadOfferRaw = function (requestParameters, initOverrides) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, token, tokenString, response;
84
+ return __generator(this, function (_a) {
85
+ switch (_a.label) {
86
+ case 0:
87
+ if (requestParameters['leadId'] == null) {
88
+ throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling acceptLeadOffer().');
89
+ }
90
+ queryParameters = {};
91
+ headerParameters = {};
92
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
93
+ token = this.configuration.accessToken;
94
+ return [4 /*yield*/, token("bearer", [])];
95
+ case 1:
96
+ tokenString = _a.sent();
97
+ if (tokenString) {
98
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
99
+ }
100
+ _a.label = 2;
101
+ case 2: return [4 /*yield*/, this.request({
102
+ path: "/leads/{leadId}/status/accept".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
103
+ method: 'PATCH',
104
+ headers: headerParameters,
105
+ query: queryParameters,
106
+ }, initOverrides)];
107
+ case 3:
108
+ response = _a.sent();
109
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
110
+ }
111
+ });
112
+ });
113
+ };
114
+ /**
115
+ *
116
+ */
117
+ LeadsApi.prototype.acceptLeadOffer = function (requestParameters, initOverrides) {
118
+ return __awaiter(this, void 0, void 0, function () {
119
+ return __generator(this, function (_a) {
120
+ switch (_a.label) {
121
+ case 0: return [4 /*yield*/, this.acceptLeadOfferRaw(requestParameters, initOverrides)];
122
+ case 1:
123
+ _a.sent();
124
+ return [2 /*return*/];
125
+ }
126
+ });
127
+ });
128
+ };
78
129
  /**
79
130
  *
80
131
  */
@@ -60,6 +60,7 @@ export interface IntersectionLeadDtoWithLeadDetailsDto {
60
60
  export declare const IntersectionLeadDtoWithLeadDetailsDtoStatusEnum: {
61
61
  readonly UNVERIFIED: "unverified";
62
62
  readonly ACTIVE: "active";
63
+ readonly ACCEPTED: "accepted";
63
64
  readonly DELETED: "deleted";
64
65
  readonly ARCHIVED: "archived";
65
66
  };
@@ -22,6 +22,7 @@ var IntersectionLeadDtoWithListFieldsDtoLastOffer_1 = require("./IntersectionLea
22
22
  exports.IntersectionLeadDtoWithLeadDetailsDtoStatusEnum = {
23
23
  UNVERIFIED: 'unverified',
24
24
  ACTIVE: 'active',
25
+ ACCEPTED: 'accepted',
25
26
  DELETED: 'deleted',
26
27
  ARCHIVED: 'archived'
27
28
  };
@@ -96,6 +96,7 @@ export interface IntersectionLeadDtoWithListFieldsDto {
96
96
  export declare const IntersectionLeadDtoWithListFieldsDtoStatusEnum: {
97
97
  readonly UNVERIFIED: "unverified";
98
98
  readonly ACTIVE: "active";
99
+ readonly ACCEPTED: "accepted";
99
100
  readonly DELETED: "deleted";
100
101
  readonly ARCHIVED: "archived";
101
102
  };
@@ -22,6 +22,7 @@ var IntersectionLeadDtoWithListFieldsDtoLastOffer_1 = require("./IntersectionLea
22
22
  exports.IntersectionLeadDtoWithListFieldsDtoStatusEnum = {
23
23
  UNVERIFIED: 'unverified',
24
24
  ACTIVE: 'active',
25
+ ACCEPTED: 'accepted',
25
26
  DELETED: 'deleted',
26
27
  ARCHIVED: 'archived'
27
28
  };
@@ -28,6 +28,7 @@ export interface LeadStatusDto {
28
28
  export declare const LeadStatusDtoStatusEnum: {
29
29
  readonly UNVERIFIED: "unverified";
30
30
  readonly ACTIVE: "active";
31
+ readonly ACCEPTED: "accepted";
31
32
  readonly DELETED: "deleted";
32
33
  readonly ARCHIVED: "archived";
33
34
  };
@@ -20,6 +20,7 @@ exports.LeadStatusDtoToJSON = exports.LeadStatusDtoFromJSONTyped = exports.LeadS
20
20
  exports.LeadStatusDtoStatusEnum = {
21
21
  UNVERIFIED: 'unverified',
22
22
  ACTIVE: 'active',
23
+ ACCEPTED: 'accepted',
23
24
  DELETED: 'deleted',
24
25
  ARCHIVED: 'archived'
25
26
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@randock/nameshift-api-client",
3
- "version": "0.0.45",
3
+ "version": "0.0.46",
4
4
  "description": "OpenAPI client for @randock/nameshift-api-client",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -43,6 +43,10 @@ import {
43
43
  ValidationExceptionToJSON,
44
44
  } from '../models/index';
45
45
 
46
+ export interface LeadsApiAcceptLeadOfferRequest {
47
+ leadId: string;
48
+ }
49
+
46
50
  export interface LeadsApiCreateMessageRequest {
47
51
  leadId: string;
48
52
  createLeadMessageInput: CreateLeadMessageInput;
@@ -66,6 +70,46 @@ export interface LeadsApiPutOfferRequest {
66
70
  */
67
71
  export class LeadsApi extends runtime.BaseAPI {
68
72
 
73
+ /**
74
+ *
75
+ */
76
+ async acceptLeadOfferRaw(requestParameters: LeadsApiAcceptLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
77
+ if (requestParameters['leadId'] == null) {
78
+ throw new runtime.RequiredError(
79
+ 'leadId',
80
+ 'Required parameter "leadId" was null or undefined when calling acceptLeadOffer().'
81
+ );
82
+ }
83
+
84
+ const queryParameters: any = {};
85
+
86
+ const headerParameters: runtime.HTTPHeaders = {};
87
+
88
+ if (this.configuration && this.configuration.accessToken) {
89
+ const token = this.configuration.accessToken;
90
+ const tokenString = await token("bearer", []);
91
+
92
+ if (tokenString) {
93
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
94
+ }
95
+ }
96
+ const response = await this.request({
97
+ path: `/leads/{leadId}/status/accept`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
98
+ method: 'PATCH',
99
+ headers: headerParameters,
100
+ query: queryParameters,
101
+ }, initOverrides);
102
+
103
+ return new runtime.VoidApiResponse(response);
104
+ }
105
+
106
+ /**
107
+ *
108
+ */
109
+ async acceptLeadOffer(requestParameters: LeadsApiAcceptLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
110
+ await this.acceptLeadOfferRaw(requestParameters, initOverrides);
111
+ }
112
+
69
113
  /**
70
114
  *
71
115
  */
@@ -77,6 +77,7 @@ export interface IntersectionLeadDtoWithLeadDetailsDto {
77
77
  export const IntersectionLeadDtoWithLeadDetailsDtoStatusEnum = {
78
78
  UNVERIFIED: 'unverified',
79
79
  ACTIVE: 'active',
80
+ ACCEPTED: 'accepted',
80
81
  DELETED: 'deleted',
81
82
  ARCHIVED: 'archived'
82
83
  } as const;
@@ -113,6 +113,7 @@ export interface IntersectionLeadDtoWithListFieldsDto {
113
113
  export const IntersectionLeadDtoWithListFieldsDtoStatusEnum = {
114
114
  UNVERIFIED: 'unverified',
115
115
  ACTIVE: 'active',
116
+ ACCEPTED: 'accepted',
116
117
  DELETED: 'deleted',
117
118
  ARCHIVED: 'archived'
118
119
  } as const;
@@ -34,6 +34,7 @@ export interface LeadStatusDto {
34
34
  export const LeadStatusDtoStatusEnum = {
35
35
  UNVERIFIED: 'unverified',
36
36
  ACTIVE: 'active',
37
+ ACCEPTED: 'accepted',
37
38
  DELETED: 'deleted',
38
39
  ARCHIVED: 'archived'
39
40
  } as const;