@randock/nameshift-api-client 0.0.518 → 0.0.519
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/.openapi-generator/FILES +7 -0
- package/README.md +3 -3
- package/dist/apis/LeadsApi.d.ts +14 -1
- package/dist/apis/LeadsApi.js +63 -0
- package/dist/apis/QuickRepliesApi.d.ts +76 -0
- package/dist/apis/QuickRepliesApi.js +347 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/models/GetQuickReplies200Response.d.ts +47 -0
- package/dist/models/GetQuickReplies200Response.js +62 -0
- package/dist/models/LeadQuickReplyDto.d.ts +51 -0
- package/dist/models/LeadQuickReplyDto.js +64 -0
- package/dist/models/LeadQuickReplyListDto.d.ts +33 -0
- package/dist/models/LeadQuickReplyListDto.js +52 -0
- package/dist/models/QuickReplyDto.d.ts +63 -0
- package/dist/models/QuickReplyDto.js +72 -0
- package/dist/models/QuickReplyInput.d.ts +38 -0
- package/dist/models/QuickReplyInput.js +55 -0
- package/dist/models/QuickReplyVariableEnum.d.ts +27 -0
- package/dist/models/QuickReplyVariableEnum.js +53 -0
- package/dist/models/index.d.ts +6 -0
- package/dist/models/index.js +6 -0
- package/package.json +1 -1
- package/src/apis/LeadsApi.ts +54 -0
- package/src/apis/QuickRepliesApi.ts +268 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetQuickReplies200Response.ts +106 -0
- package/src/models/LeadQuickReplyDto.ts +101 -0
- package/src/models/LeadQuickReplyListDto.ts +74 -0
- package/src/models/QuickReplyDto.ts +119 -0
- package/src/models/QuickReplyInput.ts +75 -0
- package/src/models/QuickReplyVariableEnum.ts +55 -0
- package/src/models/index.ts +6 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -31,6 +31,7 @@ src/apis/MarketplacesApi.ts
|
|
|
31
31
|
src/apis/NotificationsApi.ts
|
|
32
32
|
src/apis/OrdersPublicApi.ts
|
|
33
33
|
src/apis/PartnerApi.ts
|
|
34
|
+
src/apis/QuickRepliesApi.ts
|
|
34
35
|
src/apis/SalesPublicApi.ts
|
|
35
36
|
src/apis/StatsApi.ts
|
|
36
37
|
src/apis/SubscriptionsApi.ts
|
|
@@ -341,6 +342,7 @@ src/models/GetBuyerSubscriptions200Response.ts
|
|
|
341
342
|
src/models/GetBuyerTransfers200Response.ts
|
|
342
343
|
src/models/GetInvoices200Response.ts
|
|
343
344
|
src/models/GetMarketingSales200Response.ts
|
|
345
|
+
src/models/GetQuickReplies200Response.ts
|
|
344
346
|
src/models/GetSellerChallengesListDto.ts
|
|
345
347
|
src/models/GetSellerChallengesListDtoChallengesInner.ts
|
|
346
348
|
src/models/HistoricalMetrics.ts
|
|
@@ -404,6 +406,8 @@ src/models/LeadOfferExpirationConfigurationInput.ts
|
|
|
404
406
|
src/models/LeadOfferExpirationDurationInput.ts
|
|
405
407
|
src/models/LeadPriceNegotiatorAiAgentConfigurationDto.ts
|
|
406
408
|
src/models/LeadPriceNegotiatorAiAgentConfigurationInput.ts
|
|
409
|
+
src/models/LeadQuickReplyDto.ts
|
|
410
|
+
src/models/LeadQuickReplyListDto.ts
|
|
407
411
|
src/models/LeadRentConfigurationDto.ts
|
|
408
412
|
src/models/LeadStatusDto.ts
|
|
409
413
|
src/models/LeadVerificationInput.ts
|
|
@@ -519,6 +523,9 @@ src/models/PublicSaleDto.ts
|
|
|
519
523
|
src/models/PublicSalesDto.ts
|
|
520
524
|
src/models/PutBuyerLeadOfferInput.ts
|
|
521
525
|
src/models/PutLeadOfferInput.ts
|
|
526
|
+
src/models/QuickReplyDto.ts
|
|
527
|
+
src/models/QuickReplyInput.ts
|
|
528
|
+
src/models/QuickReplyVariableEnum.ts
|
|
522
529
|
src/models/ReauthenticateWithPasskeyInput.ts
|
|
523
530
|
src/models/ReauthenticationDto.ts
|
|
524
531
|
src/models/RecoveryCodesDto.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.519
|
|
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.519 --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
|
+
9c90775e38a715c8a22bb5ec6f2b3ecf0bddccbe69a887eefb66ff78bb7e82eec049c7946b778d978aa90c2fd4af3d54
|
package/dist/apis/LeadsApi.d.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { BatchReadSellerLeadMessageInput, CreateLeadMessageInput, CreateManualLeadInput, IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDto, LeadEnrichmentDto, LeadLeaseToOwnAndRentConfigurationPresetsDto, LeadOfferExpirationConfigurationInput, List200Response, ListAdminRelatedLeads200Response, ListLeadMessagesDto, LockConfigurationInput, ObjectId, PutLeadOfferInput, SellerLeadDetails, UpdateLeadMuteStatusInput } from '../models/index';
|
|
13
|
+
import type { BatchReadSellerLeadMessageInput, CreateLeadMessageInput, CreateManualLeadInput, IntersectionLeadDtoWithLeadDetailsDtoWithManualLeadBuyerDetailsDto, LeadEnrichmentDto, LeadLeaseToOwnAndRentConfigurationPresetsDto, LeadOfferExpirationConfigurationInput, LeadQuickReplyListDto, List200Response, ListAdminRelatedLeads200Response, ListLeadMessagesDto, LockConfigurationInput, ObjectId, PutLeadOfferInput, SellerLeadDetails, UpdateLeadMuteStatusInput } from '../models/index';
|
|
14
14
|
export interface LeadsApiAcceptLeadOfferRequest {
|
|
15
15
|
leadId: string;
|
|
16
16
|
}
|
|
@@ -37,6 +37,9 @@ export interface LeadsApiGetLeadRequest {
|
|
|
37
37
|
export interface LeadsApiGetLeadEnrichmentRequest {
|
|
38
38
|
leadId: string;
|
|
39
39
|
}
|
|
40
|
+
export interface LeadsApiGetLeadQuickRepliesRequest {
|
|
41
|
+
leadId: string;
|
|
42
|
+
}
|
|
40
43
|
export interface LeadsApiGetManualLeadRequest {
|
|
41
44
|
leadId: string;
|
|
42
45
|
}
|
|
@@ -183,6 +186,16 @@ export declare class LeadsApi extends runtime.BaseAPI {
|
|
|
183
186
|
* Get lease-to-own configuration presets
|
|
184
187
|
*/
|
|
185
188
|
getLeadLeaseToOwnConfigurationPresets(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadLeaseToOwnAndRentConfigurationPresetsDto>;
|
|
189
|
+
/**
|
|
190
|
+
* Lists the quick replies of the seller account with their variables replaced by the values of the lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
191
|
+
* List quick replies for a lead
|
|
192
|
+
*/
|
|
193
|
+
getLeadQuickRepliesRaw(requestParameters: LeadsApiGetLeadQuickRepliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<LeadQuickReplyListDto>>;
|
|
194
|
+
/**
|
|
195
|
+
* Lists the quick replies of the seller account with their variables replaced by the values of the lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
196
|
+
* List quick replies for a lead
|
|
197
|
+
*/
|
|
198
|
+
getLeadQuickReplies(requestParameters: LeadsApiGetLeadQuickRepliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<LeadQuickReplyListDto>;
|
|
186
199
|
/**
|
|
187
200
|
* Returns manual lead information. Requires account ownership. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
188
201
|
* Get manual lead details
|
package/dist/apis/LeadsApi.js
CHANGED
|
@@ -641,6 +641,69 @@ var LeadsApi = /** @class */ (function (_super) {
|
|
|
641
641
|
});
|
|
642
642
|
});
|
|
643
643
|
};
|
|
644
|
+
/**
|
|
645
|
+
* Lists the quick replies of the seller account with their variables replaced by the values of the lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
646
|
+
* List quick replies for a lead
|
|
647
|
+
*/
|
|
648
|
+
LeadsApi.prototype.getLeadQuickRepliesRaw = function (requestParameters, initOverrides) {
|
|
649
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
650
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
651
|
+
return __generator(this, function (_c) {
|
|
652
|
+
switch (_c.label) {
|
|
653
|
+
case 0:
|
|
654
|
+
if (requestParameters['leadId'] == null) {
|
|
655
|
+
throw new runtime.RequiredError('leadId', 'Required parameter "leadId" was null or undefined when calling getLeadQuickReplies().');
|
|
656
|
+
}
|
|
657
|
+
queryParameters = {};
|
|
658
|
+
headerParameters = {};
|
|
659
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
660
|
+
_a = headerParameters;
|
|
661
|
+
_b = "apikey";
|
|
662
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
663
|
+
case 1:
|
|
664
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
665
|
+
_c.label = 2;
|
|
666
|
+
case 2:
|
|
667
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
668
|
+
token = this.configuration.accessToken;
|
|
669
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
670
|
+
case 3:
|
|
671
|
+
tokenString = _c.sent();
|
|
672
|
+
if (tokenString) {
|
|
673
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
674
|
+
}
|
|
675
|
+
_c.label = 4;
|
|
676
|
+
case 4: return [4 /*yield*/, this.request({
|
|
677
|
+
path: "/private/leads/{leadId}/quick-replies".replace("{".concat("leadId", "}"), encodeURIComponent(String(requestParameters['leadId']))),
|
|
678
|
+
method: 'GET',
|
|
679
|
+
headers: headerParameters,
|
|
680
|
+
query: queryParameters,
|
|
681
|
+
}, initOverrides)];
|
|
682
|
+
case 5:
|
|
683
|
+
response = _c.sent();
|
|
684
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.LeadQuickReplyListDtoFromJSON)(jsonValue); })];
|
|
685
|
+
}
|
|
686
|
+
});
|
|
687
|
+
});
|
|
688
|
+
};
|
|
689
|
+
/**
|
|
690
|
+
* Lists the quick replies of the seller account with their variables replaced by the values of the lead. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
691
|
+
* List quick replies for a lead
|
|
692
|
+
*/
|
|
693
|
+
LeadsApi.prototype.getLeadQuickReplies = function (requestParameters, initOverrides) {
|
|
694
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
695
|
+
var response;
|
|
696
|
+
return __generator(this, function (_a) {
|
|
697
|
+
switch (_a.label) {
|
|
698
|
+
case 0: return [4 /*yield*/, this.getLeadQuickRepliesRaw(requestParameters, initOverrides)];
|
|
699
|
+
case 1:
|
|
700
|
+
response = _a.sent();
|
|
701
|
+
return [4 /*yield*/, response.value()];
|
|
702
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
703
|
+
}
|
|
704
|
+
});
|
|
705
|
+
});
|
|
706
|
+
};
|
|
644
707
|
/**
|
|
645
708
|
* Returns manual lead information. Requires account ownership. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
646
709
|
* Get manual lead details
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nameshift
|
|
3
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
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 { GetQuickReplies200Response, QuickReplyDto, QuickReplyInput } from '../models/index';
|
|
14
|
+
export interface QuickRepliesApiCreateQuickReplyRequest {
|
|
15
|
+
quickReplyInput: QuickReplyInput;
|
|
16
|
+
}
|
|
17
|
+
export interface QuickRepliesApiDeleteQuickReplyRequest {
|
|
18
|
+
quickReplyId: string;
|
|
19
|
+
}
|
|
20
|
+
export interface QuickRepliesApiGetQuickRepliesRequest {
|
|
21
|
+
filter?: {
|
|
22
|
+
[key: string]: string;
|
|
23
|
+
};
|
|
24
|
+
page?: number;
|
|
25
|
+
limit?: number;
|
|
26
|
+
sortBy?: Array<string>;
|
|
27
|
+
}
|
|
28
|
+
export interface QuickRepliesApiUpdateQuickReplyRequest {
|
|
29
|
+
quickReplyId: string;
|
|
30
|
+
quickReplyInput: QuickReplyInput;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export declare class QuickRepliesApi extends runtime.BaseAPI {
|
|
36
|
+
/**
|
|
37
|
+
* Creates a quick reply for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
38
|
+
* Create a quick reply
|
|
39
|
+
*/
|
|
40
|
+
createQuickReplyRaw(requestParameters: QuickRepliesApiCreateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuickReplyDto>>;
|
|
41
|
+
/**
|
|
42
|
+
* Creates a quick reply for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
43
|
+
* Create a quick reply
|
|
44
|
+
*/
|
|
45
|
+
createQuickReply(requestParameters: QuickRepliesApiCreateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuickReplyDto>;
|
|
46
|
+
/**
|
|
47
|
+
* Deletes a quick reply of the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
48
|
+
* Delete a quick reply
|
|
49
|
+
*/
|
|
50
|
+
deleteQuickReplyRaw(requestParameters: QuickRepliesApiDeleteQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
51
|
+
/**
|
|
52
|
+
* Deletes a quick reply of the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
53
|
+
* Delete a quick reply
|
|
54
|
+
*/
|
|
55
|
+
deleteQuickReply(requestParameters: QuickRepliesApiDeleteQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Lists the quick replies of the seller account, sorted by name by default. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
58
|
+
* List quick replies
|
|
59
|
+
*/
|
|
60
|
+
getQuickRepliesRaw(requestParameters: QuickRepliesApiGetQuickRepliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetQuickReplies200Response>>;
|
|
61
|
+
/**
|
|
62
|
+
* Lists the quick replies of the seller account, sorted by name by default. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
63
|
+
* List quick replies
|
|
64
|
+
*/
|
|
65
|
+
getQuickReplies(requestParameters?: QuickRepliesApiGetQuickRepliesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetQuickReplies200Response>;
|
|
66
|
+
/**
|
|
67
|
+
* Changes the name and message of a quick reply. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
68
|
+
* Update a quick reply
|
|
69
|
+
*/
|
|
70
|
+
updateQuickReplyRaw(requestParameters: QuickRepliesApiUpdateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<QuickReplyDto>>;
|
|
71
|
+
/**
|
|
72
|
+
* Changes the name and message of a quick reply. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
73
|
+
* Update a quick reply
|
|
74
|
+
*/
|
|
75
|
+
updateQuickReply(requestParameters: QuickRepliesApiUpdateQuickReplyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<QuickReplyDto>;
|
|
76
|
+
}
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Nameshift
|
|
6
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
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.QuickRepliesApi = void 0;
|
|
68
|
+
var runtime = require("../runtime");
|
|
69
|
+
var index_1 = require("../models/index");
|
|
70
|
+
/**
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
var QuickRepliesApi = /** @class */ (function (_super) {
|
|
74
|
+
__extends(QuickRepliesApi, _super);
|
|
75
|
+
function QuickRepliesApi() {
|
|
76
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Creates a quick reply for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
80
|
+
* Create a quick reply
|
|
81
|
+
*/
|
|
82
|
+
QuickRepliesApi.prototype.createQuickReplyRaw = function (requestParameters, initOverrides) {
|
|
83
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
84
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
85
|
+
return __generator(this, function (_c) {
|
|
86
|
+
switch (_c.label) {
|
|
87
|
+
case 0:
|
|
88
|
+
if (requestParameters['quickReplyInput'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('quickReplyInput', 'Required parameter "quickReplyInput" was null or undefined when calling createQuickReply().');
|
|
90
|
+
}
|
|
91
|
+
queryParameters = {};
|
|
92
|
+
headerParameters = {};
|
|
93
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
94
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
95
|
+
_a = headerParameters;
|
|
96
|
+
_b = "apikey";
|
|
97
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
98
|
+
case 1:
|
|
99
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
100
|
+
_c.label = 2;
|
|
101
|
+
case 2:
|
|
102
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
103
|
+
token = this.configuration.accessToken;
|
|
104
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
105
|
+
case 3:
|
|
106
|
+
tokenString = _c.sent();
|
|
107
|
+
if (tokenString) {
|
|
108
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
109
|
+
}
|
|
110
|
+
_c.label = 4;
|
|
111
|
+
case 4: return [4 /*yield*/, this.request({
|
|
112
|
+
path: "/private/quick-replies",
|
|
113
|
+
method: 'POST',
|
|
114
|
+
headers: headerParameters,
|
|
115
|
+
query: queryParameters,
|
|
116
|
+
body: (0, index_1.QuickReplyInputToJSON)(requestParameters['quickReplyInput']),
|
|
117
|
+
}, initOverrides)];
|
|
118
|
+
case 5:
|
|
119
|
+
response = _c.sent();
|
|
120
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.QuickReplyDtoFromJSON)(jsonValue); })];
|
|
121
|
+
}
|
|
122
|
+
});
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Creates a quick reply for the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
127
|
+
* Create a quick reply
|
|
128
|
+
*/
|
|
129
|
+
QuickRepliesApi.prototype.createQuickReply = function (requestParameters, initOverrides) {
|
|
130
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
131
|
+
var response;
|
|
132
|
+
return __generator(this, function (_a) {
|
|
133
|
+
switch (_a.label) {
|
|
134
|
+
case 0: return [4 /*yield*/, this.createQuickReplyRaw(requestParameters, initOverrides)];
|
|
135
|
+
case 1:
|
|
136
|
+
response = _a.sent();
|
|
137
|
+
return [4 /*yield*/, response.value()];
|
|
138
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Deletes a quick reply of the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
145
|
+
* Delete a quick reply
|
|
146
|
+
*/
|
|
147
|
+
QuickRepliesApi.prototype.deleteQuickReplyRaw = function (requestParameters, initOverrides) {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
149
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
150
|
+
return __generator(this, function (_c) {
|
|
151
|
+
switch (_c.label) {
|
|
152
|
+
case 0:
|
|
153
|
+
if (requestParameters['quickReplyId'] == null) {
|
|
154
|
+
throw new runtime.RequiredError('quickReplyId', 'Required parameter "quickReplyId" was null or undefined when calling deleteQuickReply().');
|
|
155
|
+
}
|
|
156
|
+
queryParameters = {};
|
|
157
|
+
headerParameters = {};
|
|
158
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
159
|
+
_a = headerParameters;
|
|
160
|
+
_b = "apikey";
|
|
161
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
162
|
+
case 1:
|
|
163
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
164
|
+
_c.label = 2;
|
|
165
|
+
case 2:
|
|
166
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
167
|
+
token = this.configuration.accessToken;
|
|
168
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
169
|
+
case 3:
|
|
170
|
+
tokenString = _c.sent();
|
|
171
|
+
if (tokenString) {
|
|
172
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
173
|
+
}
|
|
174
|
+
_c.label = 4;
|
|
175
|
+
case 4: return [4 /*yield*/, this.request({
|
|
176
|
+
path: "/private/quick-replies/{quickReplyId}".replace("{".concat("quickReplyId", "}"), encodeURIComponent(String(requestParameters['quickReplyId']))),
|
|
177
|
+
method: 'DELETE',
|
|
178
|
+
headers: headerParameters,
|
|
179
|
+
query: queryParameters,
|
|
180
|
+
}, initOverrides)];
|
|
181
|
+
case 5:
|
|
182
|
+
response = _c.sent();
|
|
183
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
});
|
|
187
|
+
};
|
|
188
|
+
/**
|
|
189
|
+
* Deletes a quick reply of the seller account. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
190
|
+
* Delete a quick reply
|
|
191
|
+
*/
|
|
192
|
+
QuickRepliesApi.prototype.deleteQuickReply = function (requestParameters, initOverrides) {
|
|
193
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
194
|
+
return __generator(this, function (_a) {
|
|
195
|
+
switch (_a.label) {
|
|
196
|
+
case 0: return [4 /*yield*/, this.deleteQuickReplyRaw(requestParameters, initOverrides)];
|
|
197
|
+
case 1:
|
|
198
|
+
_a.sent();
|
|
199
|
+
return [2 /*return*/];
|
|
200
|
+
}
|
|
201
|
+
});
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
/**
|
|
205
|
+
* Lists the quick replies of the seller account, sorted by name by default. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
206
|
+
* List quick replies
|
|
207
|
+
*/
|
|
208
|
+
QuickRepliesApi.prototype.getQuickRepliesRaw = function (requestParameters, initOverrides) {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
210
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
211
|
+
return __generator(this, function (_c) {
|
|
212
|
+
switch (_c.label) {
|
|
213
|
+
case 0:
|
|
214
|
+
queryParameters = {};
|
|
215
|
+
if (requestParameters['filter'] != null) {
|
|
216
|
+
queryParameters['filter'] = requestParameters['filter'];
|
|
217
|
+
}
|
|
218
|
+
if (requestParameters['page'] != null) {
|
|
219
|
+
queryParameters['page'] = requestParameters['page'];
|
|
220
|
+
}
|
|
221
|
+
if (requestParameters['limit'] != null) {
|
|
222
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
223
|
+
}
|
|
224
|
+
if (requestParameters['sortBy'] != null) {
|
|
225
|
+
queryParameters['sortBy'] = requestParameters['sortBy'];
|
|
226
|
+
}
|
|
227
|
+
headerParameters = {};
|
|
228
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
229
|
+
_a = headerParameters;
|
|
230
|
+
_b = "apikey";
|
|
231
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
232
|
+
case 1:
|
|
233
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
234
|
+
_c.label = 2;
|
|
235
|
+
case 2:
|
|
236
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
237
|
+
token = this.configuration.accessToken;
|
|
238
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
239
|
+
case 3:
|
|
240
|
+
tokenString = _c.sent();
|
|
241
|
+
if (tokenString) {
|
|
242
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
243
|
+
}
|
|
244
|
+
_c.label = 4;
|
|
245
|
+
case 4: return [4 /*yield*/, this.request({
|
|
246
|
+
path: "/private/quick-replies",
|
|
247
|
+
method: 'GET',
|
|
248
|
+
headers: headerParameters,
|
|
249
|
+
query: queryParameters,
|
|
250
|
+
}, initOverrides)];
|
|
251
|
+
case 5:
|
|
252
|
+
response = _c.sent();
|
|
253
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetQuickReplies200ResponseFromJSON)(jsonValue); })];
|
|
254
|
+
}
|
|
255
|
+
});
|
|
256
|
+
});
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* Lists the quick replies of the seller account, sorted by name by default. **API key scope required:** `LEADS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
260
|
+
* List quick replies
|
|
261
|
+
*/
|
|
262
|
+
QuickRepliesApi.prototype.getQuickReplies = function () {
|
|
263
|
+
return __awaiter(this, arguments, void 0, function (requestParameters, initOverrides) {
|
|
264
|
+
var response;
|
|
265
|
+
if (requestParameters === void 0) { requestParameters = {}; }
|
|
266
|
+
return __generator(this, function (_a) {
|
|
267
|
+
switch (_a.label) {
|
|
268
|
+
case 0: return [4 /*yield*/, this.getQuickRepliesRaw(requestParameters, initOverrides)];
|
|
269
|
+
case 1:
|
|
270
|
+
response = _a.sent();
|
|
271
|
+
return [4 /*yield*/, response.value()];
|
|
272
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* Changes the name and message of a quick reply. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
279
|
+
* Update a quick reply
|
|
280
|
+
*/
|
|
281
|
+
QuickRepliesApi.prototype.updateQuickReplyRaw = function (requestParameters, initOverrides) {
|
|
282
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
283
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
284
|
+
return __generator(this, function (_c) {
|
|
285
|
+
switch (_c.label) {
|
|
286
|
+
case 0:
|
|
287
|
+
if (requestParameters['quickReplyId'] == null) {
|
|
288
|
+
throw new runtime.RequiredError('quickReplyId', 'Required parameter "quickReplyId" was null or undefined when calling updateQuickReply().');
|
|
289
|
+
}
|
|
290
|
+
if (requestParameters['quickReplyInput'] == null) {
|
|
291
|
+
throw new runtime.RequiredError('quickReplyInput', 'Required parameter "quickReplyInput" was null or undefined when calling updateQuickReply().');
|
|
292
|
+
}
|
|
293
|
+
queryParameters = {};
|
|
294
|
+
headerParameters = {};
|
|
295
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
296
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
297
|
+
_a = headerParameters;
|
|
298
|
+
_b = "apikey";
|
|
299
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
300
|
+
case 1:
|
|
301
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
302
|
+
_c.label = 2;
|
|
303
|
+
case 2:
|
|
304
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
305
|
+
token = this.configuration.accessToken;
|
|
306
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
307
|
+
case 3:
|
|
308
|
+
tokenString = _c.sent();
|
|
309
|
+
if (tokenString) {
|
|
310
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
311
|
+
}
|
|
312
|
+
_c.label = 4;
|
|
313
|
+
case 4: return [4 /*yield*/, this.request({
|
|
314
|
+
path: "/private/quick-replies/{quickReplyId}".replace("{".concat("quickReplyId", "}"), encodeURIComponent(String(requestParameters['quickReplyId']))),
|
|
315
|
+
method: 'PATCH',
|
|
316
|
+
headers: headerParameters,
|
|
317
|
+
query: queryParameters,
|
|
318
|
+
body: (0, index_1.QuickReplyInputToJSON)(requestParameters['quickReplyInput']),
|
|
319
|
+
}, initOverrides)];
|
|
320
|
+
case 5:
|
|
321
|
+
response = _c.sent();
|
|
322
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.QuickReplyDtoFromJSON)(jsonValue); })];
|
|
323
|
+
}
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* Changes the name and message of a quick reply. **API key scope required:** `LEADS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
329
|
+
* Update a quick reply
|
|
330
|
+
*/
|
|
331
|
+
QuickRepliesApi.prototype.updateQuickReply = function (requestParameters, initOverrides) {
|
|
332
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
333
|
+
var response;
|
|
334
|
+
return __generator(this, function (_a) {
|
|
335
|
+
switch (_a.label) {
|
|
336
|
+
case 0: return [4 /*yield*/, this.updateQuickReplyRaw(requestParameters, initOverrides)];
|
|
337
|
+
case 1:
|
|
338
|
+
response = _a.sent();
|
|
339
|
+
return [4 /*yield*/, response.value()];
|
|
340
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
341
|
+
}
|
|
342
|
+
});
|
|
343
|
+
});
|
|
344
|
+
};
|
|
345
|
+
return QuickRepliesApi;
|
|
346
|
+
}(runtime.BaseAPI));
|
|
347
|
+
exports.QuickRepliesApi = QuickRepliesApi;
|
package/dist/apis/index.d.ts
CHANGED
|
@@ -26,6 +26,7 @@ export * from './MarketplacesApi';
|
|
|
26
26
|
export * from './NotificationsApi';
|
|
27
27
|
export * from './OrdersPublicApi';
|
|
28
28
|
export * from './PartnerApi';
|
|
29
|
+
export * from './QuickRepliesApi';
|
|
29
30
|
export * from './SalesPublicApi';
|
|
30
31
|
export * from './StatsApi';
|
|
31
32
|
export * from './SubscriptionsApi';
|
package/dist/apis/index.js
CHANGED
|
@@ -44,6 +44,7 @@ __exportStar(require("./MarketplacesApi"), exports);
|
|
|
44
44
|
__exportStar(require("./NotificationsApi"), exports);
|
|
45
45
|
__exportStar(require("./OrdersPublicApi"), exports);
|
|
46
46
|
__exportStar(require("./PartnerApi"), exports);
|
|
47
|
+
__exportStar(require("./QuickRepliesApi"), exports);
|
|
47
48
|
__exportStar(require("./SalesPublicApi"), exports);
|
|
48
49
|
__exportStar(require("./StatsApi"), exports);
|
|
49
50
|
__exportStar(require("./SubscriptionsApi"), exports);
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Nameshift
|
|
3
|
+
* Nameshift domain marketplace and management API. ## Authentication - **Bearer JWT** — Seller and buyer sessions obtained via login endpoints. - **API key** — Pass the `apikey` header for programmatic seller access. ## Audiences - **(public)** tags — Unauthenticated or buyer-facing endpoints. - **Accounts / Domains / Leads / Buyers** — Seller or buyer resources. - **Partner** — Partner integrations.
|
|
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 type { PaginateResponseLinks } from './PaginateResponseLinks';
|
|
13
|
+
import type { QuickReplyDto } from './QuickReplyDto';
|
|
14
|
+
import type { PaginateResponseMeta } from './PaginateResponseMeta';
|
|
15
|
+
/**
|
|
16
|
+
*
|
|
17
|
+
* @export
|
|
18
|
+
* @interface GetQuickReplies200Response
|
|
19
|
+
*/
|
|
20
|
+
export interface GetQuickReplies200Response {
|
|
21
|
+
/**
|
|
22
|
+
*
|
|
23
|
+
* @type {Array<QuickReplyDto>}
|
|
24
|
+
* @memberof GetQuickReplies200Response
|
|
25
|
+
*/
|
|
26
|
+
data: Array<QuickReplyDto>;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @type {PaginateResponseMeta}
|
|
30
|
+
* @memberof GetQuickReplies200Response
|
|
31
|
+
*/
|
|
32
|
+
meta: PaginateResponseMeta;
|
|
33
|
+
/**
|
|
34
|
+
*
|
|
35
|
+
* @type {PaginateResponseLinks}
|
|
36
|
+
* @memberof GetQuickReplies200Response
|
|
37
|
+
*/
|
|
38
|
+
links: PaginateResponseLinks;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Check if a given object implements the GetQuickReplies200Response interface.
|
|
42
|
+
*/
|
|
43
|
+
export declare function instanceOfGetQuickReplies200Response(value: object): value is GetQuickReplies200Response;
|
|
44
|
+
export declare function GetQuickReplies200ResponseFromJSON(json: any): GetQuickReplies200Response;
|
|
45
|
+
export declare function GetQuickReplies200ResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetQuickReplies200Response;
|
|
46
|
+
export declare function GetQuickReplies200ResponseToJSON(json: any): GetQuickReplies200Response;
|
|
47
|
+
export declare function GetQuickReplies200ResponseToJSONTyped(value?: GetQuickReplies200Response | null, ignoreDiscriminator?: boolean): any;
|