@randock/nameshift-api-client 0.0.140 → 0.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.
- package/README.md +3 -3
- package/dist/apis/LeadsApi.d.ts +22 -0
- package/dist/apis/LeadsApi.js +103 -1
- package/package.json +1 -1
- package/src/apis/LeadsApi.ts +89 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.141
|
|
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.
|
|
39
|
+
npm install @randock/nameshift-api-client@0.0.141 --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
|
-
|
|
47
|
+
9a19b3743b7f11a3a82793bb3fb2c0d6ccc444ef7b1c75c0513255afaf6efae213c41f1ba36c27143bd117cc3273e409
|
package/dist/apis/LeadsApi.d.ts
CHANGED
|
@@ -14,6 +14,9 @@ import type { BatchReadSellerLeadMessageInput, CreateLeadMessageInput, Intersect
|
|
|
14
14
|
export interface LeadsApiAcceptLeadOfferRequest {
|
|
15
15
|
leadId: string;
|
|
16
16
|
}
|
|
17
|
+
export interface LeadsApiArchiveLeadRequest {
|
|
18
|
+
leadId: string;
|
|
19
|
+
}
|
|
17
20
|
export interface LeadsApiBulkReadSellerLeadMessageRequest {
|
|
18
21
|
leadId: string;
|
|
19
22
|
batchReadSellerLeadMessageInput: BatchReadSellerLeadMessageInput;
|
|
@@ -38,6 +41,9 @@ export interface LeadsApiPutOfferRequest {
|
|
|
38
41
|
leadId: string;
|
|
39
42
|
putLeadOfferInput: PutLeadOfferInput;
|
|
40
43
|
}
|
|
44
|
+
export interface LeadsApiUnarchiveLeadRequest {
|
|
45
|
+
leadId: string;
|
|
46
|
+
}
|
|
41
47
|
/**
|
|
42
48
|
*
|
|
43
49
|
*/
|
|
@@ -50,6 +56,14 @@ export declare class LeadsApi extends runtime.BaseAPI {
|
|
|
50
56
|
*
|
|
51
57
|
*/
|
|
52
58
|
acceptLeadOffer(requestParameters: LeadsApiAcceptLeadOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
*
|
|
61
|
+
*/
|
|
62
|
+
archiveLeadRaw(requestParameters: LeadsApiArchiveLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
63
|
+
/**
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
archiveLead(requestParameters: LeadsApiArchiveLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
53
67
|
/**
|
|
54
68
|
*
|
|
55
69
|
*/
|
|
@@ -98,4 +112,12 @@ export declare class LeadsApi extends runtime.BaseAPI {
|
|
|
98
112
|
*
|
|
99
113
|
*/
|
|
100
114
|
putOffer(requestParameters: LeadsApiPutOfferRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
*/
|
|
118
|
+
unarchiveLeadRaw(requestParameters: LeadsApiUnarchiveLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
119
|
+
/**
|
|
120
|
+
*
|
|
121
|
+
*/
|
|
122
|
+
unarchiveLead(requestParameters: LeadsApiUnarchiveLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
101
123
|
}
|
package/dist/apis/LeadsApi.js
CHANGED
|
@@ -100,7 +100,7 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
100
100
|
_a.label = 2;
|
|
101
101
|
case 2: return [4 /*yield*/, this.request({
|
|
102
102
|
path: "/private/leads/{leadId}/status/accept".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
103
|
-
method: '
|
|
103
|
+
method: 'POST',
|
|
104
104
|
headers: headerParameters,
|
|
105
105
|
query: queryParameters,
|
|
106
106
|
}, initOverrides)];
|
|
@@ -126,6 +126,57 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
126
126
|
});
|
|
127
127
|
});
|
|
128
128
|
};
|
|
129
|
+
/**
|
|
130
|
+
*
|
|
131
|
+
*/
|
|
132
|
+
LeadsApi.prototype.archiveLeadRaw = function (requestParameters, initOverrides) {
|
|
133
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
134
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
135
|
+
return __generator(this, function (_a) {
|
|
136
|
+
switch (_a.label) {
|
|
137
|
+
case 0:
|
|
138
|
+
if (requestParameters['leadId'] == null) {
|
|
139
|
+
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling archiveLead().');
|
|
140
|
+
}
|
|
141
|
+
queryParameters = {};
|
|
142
|
+
headerParameters = {};
|
|
143
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
144
|
+
token = this.configuration.accessToken;
|
|
145
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
146
|
+
case 1:
|
|
147
|
+
tokenString = _a.sent();
|
|
148
|
+
if (tokenString) {
|
|
149
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
150
|
+
}
|
|
151
|
+
_a.label = 2;
|
|
152
|
+
case 2: return [4 /*yield*/, this.request({
|
|
153
|
+
path: "/private/leads/{leadId}/status/archive".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
154
|
+
method: 'POST',
|
|
155
|
+
headers: headerParameters,
|
|
156
|
+
query: queryParameters,
|
|
157
|
+
}, initOverrides)];
|
|
158
|
+
case 3:
|
|
159
|
+
response = _a.sent();
|
|
160
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
161
|
+
}
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
/**
|
|
166
|
+
*
|
|
167
|
+
*/
|
|
168
|
+
LeadsApi.prototype.archiveLead = function (requestParameters, initOverrides) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
170
|
+
return __generator(this, function (_a) {
|
|
171
|
+
switch (_a.label) {
|
|
172
|
+
case 0: return [4 /*yield*/, this.archiveLeadRaw(requestParameters, initOverrides)];
|
|
173
|
+
case 1:
|
|
174
|
+
_a.sent();
|
|
175
|
+
return [2 /*return*/];
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
};
|
|
129
180
|
/**
|
|
130
181
|
*
|
|
131
182
|
*/
|
|
@@ -465,6 +516,57 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
465
516
|
});
|
|
466
517
|
});
|
|
467
518
|
};
|
|
519
|
+
/**
|
|
520
|
+
*
|
|
521
|
+
*/
|
|
522
|
+
LeadsApi.prototype.unarchiveLeadRaw = function (requestParameters, initOverrides) {
|
|
523
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
524
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
525
|
+
return __generator(this, function (_a) {
|
|
526
|
+
switch (_a.label) {
|
|
527
|
+
case 0:
|
|
528
|
+
if (requestParameters['leadId'] == null) {
|
|
529
|
+
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling unarchiveLead().');
|
|
530
|
+
}
|
|
531
|
+
queryParameters = {};
|
|
532
|
+
headerParameters = {};
|
|
533
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
534
|
+
token = this.configuration.accessToken;
|
|
535
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
536
|
+
case 1:
|
|
537
|
+
tokenString = _a.sent();
|
|
538
|
+
if (tokenString) {
|
|
539
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
540
|
+
}
|
|
541
|
+
_a.label = 2;
|
|
542
|
+
case 2: return [4 /*yield*/, this.request({
|
|
543
|
+
path: "/private/leads/{leadId}/status/unarchive".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
544
|
+
method: 'POST',
|
|
545
|
+
headers: headerParameters,
|
|
546
|
+
query: queryParameters,
|
|
547
|
+
}, initOverrides)];
|
|
548
|
+
case 3:
|
|
549
|
+
response = _a.sent();
|
|
550
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
551
|
+
}
|
|
552
|
+
});
|
|
553
|
+
});
|
|
554
|
+
};
|
|
555
|
+
/**
|
|
556
|
+
*
|
|
557
|
+
*/
|
|
558
|
+
LeadsApi.prototype.unarchiveLead = function (requestParameters, initOverrides) {
|
|
559
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
560
|
+
return __generator(this, function (_a) {
|
|
561
|
+
switch (_a.label) {
|
|
562
|
+
case 0: return [4 /*yield*/, this.unarchiveLeadRaw(requestParameters, initOverrides)];
|
|
563
|
+
case 1:
|
|
564
|
+
_a.sent();
|
|
565
|
+
return [2 /*return*/];
|
|
566
|
+
}
|
|
567
|
+
});
|
|
568
|
+
});
|
|
569
|
+
};
|
|
468
570
|
return LeadsApi;
|
|
469
571
|
}(runtime.BaseAPI));
|
|
470
572
|
exports.LeadsApi = LeadsApi;
|
package/package.json
CHANGED
package/src/apis/LeadsApi.ts
CHANGED
|
@@ -53,6 +53,10 @@ export interface LeadsApiAcceptLeadOfferRequest {
|
|
|
53
53
|
leadId: string;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
export interface LeadsApiArchiveLeadRequest {
|
|
57
|
+
leadId: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
56
60
|
export interface LeadsApiBulkReadSellerLeadMessageRequest {
|
|
57
61
|
leadId: string;
|
|
58
62
|
batchReadSellerLeadMessageInput: BatchReadSellerLeadMessageInput;
|
|
@@ -83,6 +87,10 @@ export interface LeadsApiPutOfferRequest {
|
|
|
83
87
|
putLeadOfferInput: PutLeadOfferInput;
|
|
84
88
|
}
|
|
85
89
|
|
|
90
|
+
export interface LeadsApiUnarchiveLeadRequest {
|
|
91
|
+
leadId: string;
|
|
92
|
+
}
|
|
93
|
+
|
|
86
94
|
/**
|
|
87
95
|
*
|
|
88
96
|
*/
|
|
@@ -113,7 +121,7 @@ export class LeadsApi extends runtime.BaseAPI {
|
|
|
113
121
|
}
|
|
114
122
|
const response = await this.request({
|
|
115
123
|
path: `/private/leads/{leadId}/status/accept`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
|
|
116
|
-
method: '
|
|
124
|
+
method: 'POST',
|
|
117
125
|
headers: headerParameters,
|
|
118
126
|
query: queryParameters,
|
|
119
127
|
}, initOverrides);
|
|
@@ -128,6 +136,46 @@ export class LeadsApi extends runtime.BaseAPI {
|
|
|
128
136
|
await this.acceptLeadOfferRaw(requestParameters, initOverrides);
|
|
129
137
|
}
|
|
130
138
|
|
|
139
|
+
/**
|
|
140
|
+
*
|
|
141
|
+
*/
|
|
142
|
+
async archiveLeadRaw(requestParameters: LeadsApiArchiveLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
143
|
+
if (requestParameters['leadId'] == null) {
|
|
144
|
+
throw new runtime.RequiredError(
|
|
145
|
+
'leadId',
|
|
146
|
+
'Required parameter "leadId" was null or undefined when calling archiveLead().'
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
const queryParameters: any = {};
|
|
151
|
+
|
|
152
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
153
|
+
|
|
154
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
155
|
+
const token = this.configuration.accessToken;
|
|
156
|
+
const tokenString = await token("bearer", []);
|
|
157
|
+
|
|
158
|
+
if (tokenString) {
|
|
159
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
const response = await this.request({
|
|
163
|
+
path: `/private/leads/{leadId}/status/archive`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
|
|
164
|
+
method: 'POST',
|
|
165
|
+
headers: headerParameters,
|
|
166
|
+
query: queryParameters,
|
|
167
|
+
}, initOverrides);
|
|
168
|
+
|
|
169
|
+
return new runtime.VoidApiResponse(response);
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
*
|
|
174
|
+
*/
|
|
175
|
+
async archiveLead(requestParameters: LeadsApiArchiveLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
176
|
+
await this.archiveLeadRaw(requestParameters, initOverrides);
|
|
177
|
+
}
|
|
178
|
+
|
|
131
179
|
/**
|
|
132
180
|
*
|
|
133
181
|
*/
|
|
@@ -411,4 +459,44 @@ export class LeadsApi extends runtime.BaseAPI {
|
|
|
411
459
|
await this.putOfferRaw(requestParameters, initOverrides);
|
|
412
460
|
}
|
|
413
461
|
|
|
462
|
+
/**
|
|
463
|
+
*
|
|
464
|
+
*/
|
|
465
|
+
async unarchiveLeadRaw(requestParameters: LeadsApiUnarchiveLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
466
|
+
if (requestParameters['leadId'] == null) {
|
|
467
|
+
throw new runtime.RequiredError(
|
|
468
|
+
'leadId',
|
|
469
|
+
'Required parameter "leadId" was null or undefined when calling unarchiveLead().'
|
|
470
|
+
);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
const queryParameters: any = {};
|
|
474
|
+
|
|
475
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
476
|
+
|
|
477
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
478
|
+
const token = this.configuration.accessToken;
|
|
479
|
+
const tokenString = await token("bearer", []);
|
|
480
|
+
|
|
481
|
+
if (tokenString) {
|
|
482
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
const response = await this.request({
|
|
486
|
+
path: `/private/leads/{leadId}/status/unarchive`.replace(`{${"leadId"}}`, encodeURIComponent(String(requestParameters['leadId']))),
|
|
487
|
+
method: 'POST',
|
|
488
|
+
headers: headerParameters,
|
|
489
|
+
query: queryParameters,
|
|
490
|
+
}, initOverrides);
|
|
491
|
+
|
|
492
|
+
return new runtime.VoidApiResponse(response);
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
*
|
|
497
|
+
*/
|
|
498
|
+
async unarchiveLead(requestParameters: LeadsApiUnarchiveLeadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
499
|
+
await this.unarchiveLeadRaw(requestParameters, initOverrides);
|
|
500
|
+
}
|
|
501
|
+
|
|
414
502
|
}
|