@randock/nameshift-api-client 0.0.448 → 0.0.450

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.
Files changed (162) hide show
  1. package/.openapi-generator/FILES +12 -0
  2. package/README.md +3 -3
  3. package/dist/apis/APIKeysApi.d.ts +78 -0
  4. package/dist/apis/APIKeysApi.js +354 -0
  5. package/dist/apis/AccountsApi.d.ts +36 -36
  6. package/dist/apis/AccountsApi.js +360 -216
  7. package/dist/apis/AdminApi.d.ts +37 -1
  8. package/dist/apis/AdminApi.js +122 -1
  9. package/dist/apis/AuctionsApi.d.ts +4 -4
  10. package/dist/apis/AuctionsApi.js +40 -24
  11. package/dist/apis/BankAccountsApi.d.ts +10 -10
  12. package/dist/apis/BankAccountsApi.js +100 -60
  13. package/dist/apis/ChallengesApi.d.ts +6 -6
  14. package/dist/apis/ChallengesApi.js +60 -36
  15. package/dist/apis/DomainTransfersApi.d.ts +2 -2
  16. package/dist/apis/DomainTransfersApi.js +20 -12
  17. package/dist/apis/DomainsApi.d.ts +44 -44
  18. package/dist/apis/DomainsApi.js +440 -264
  19. package/dist/apis/EppApi.d.ts +2 -2
  20. package/dist/apis/EppApi.js +20 -12
  21. package/dist/apis/InvoicesApi.d.ts +6 -6
  22. package/dist/apis/InvoicesApi.js +60 -36
  23. package/dist/apis/LeadsApi.d.ts +38 -38
  24. package/dist/apis/LeadsApi.js +380 -228
  25. package/dist/apis/MarketplacesApi.d.ts +89 -0
  26. package/dist/apis/MarketplacesApi.js +332 -0
  27. package/dist/apis/NotificationsApi.d.ts +8 -8
  28. package/dist/apis/NotificationsApi.js +80 -48
  29. package/dist/apis/StatsApi.d.ts +14 -14
  30. package/dist/apis/StatsApi.js +140 -84
  31. package/dist/apis/SubscriptionsApi.d.ts +2 -2
  32. package/dist/apis/SubscriptionsApi.js +20 -12
  33. package/dist/apis/TasksApi.d.ts +6 -6
  34. package/dist/apis/TasksApi.js +60 -36
  35. package/dist/apis/UsersApi.d.ts +10 -10
  36. package/dist/apis/UsersApi.js +100 -60
  37. package/dist/apis/index.d.ts +2 -0
  38. package/dist/apis/index.js +2 -0
  39. package/dist/models/AccountMarketplaceDto.d.ts +56 -0
  40. package/dist/models/AccountMarketplaceDto.js +71 -0
  41. package/dist/models/AccountNameshiftCommissionBySubtypeDto.d.ts +1 -0
  42. package/dist/models/AccountNameshiftCommissionBySubtypeDto.js +1 -0
  43. package/dist/models/AccountNameshiftCommissionItemDto.d.ts +1 -0
  44. package/dist/models/AccountNameshiftCommissionItemDto.js +1 -0
  45. package/dist/models/AccountNameshiftCommissionReasonDto.d.ts +1 -0
  46. package/dist/models/AccountNameshiftCommissionReasonDto.js +1 -0
  47. package/dist/models/AccountSettingsDto.d.ts +18 -0
  48. package/dist/models/AccountSettingsDto.js +16 -0
  49. package/dist/models/AccountSettingsInput.d.ts +18 -0
  50. package/dist/models/AccountSettingsInput.js +14 -0
  51. package/dist/models/AdminDomainListItemDto.d.ts +19 -0
  52. package/dist/models/AdminDomainListItemDto.js +17 -1
  53. package/dist/models/AdminMarketplaceDto.d.ts +86 -0
  54. package/dist/models/AdminMarketplaceDto.js +91 -0
  55. package/dist/models/ApiKeyDto.d.ts +107 -0
  56. package/dist/models/ApiKeyDto.js +114 -0
  57. package/dist/models/ApiKeyScopeDto.d.ts +83 -0
  58. package/dist/models/ApiKeyScopeDto.js +98 -0
  59. package/dist/models/CommissionDto.d.ts +1 -0
  60. package/dist/models/CommissionDto.js +1 -0
  61. package/dist/models/CommissionPayloadInput.d.ts +1 -0
  62. package/dist/models/CommissionPayloadInput.js +1 -0
  63. package/dist/models/CommissionReasonDto.d.ts +1 -0
  64. package/dist/models/CommissionReasonDto.js +1 -0
  65. package/dist/models/CommissionSimulationItemInput.d.ts +1 -0
  66. package/dist/models/CommissionSimulationItemInput.js +1 -0
  67. package/dist/models/CreateApiKeyInput.d.ts +83 -0
  68. package/dist/models/CreateApiKeyInput.js +96 -0
  69. package/dist/models/CreateOrderInput.d.ts +6 -0
  70. package/dist/models/CreateOrderInput.js +2 -0
  71. package/dist/models/CreateSubscriptionInput.d.ts +6 -0
  72. package/dist/models/CreateSubscriptionInput.js +2 -0
  73. package/dist/models/CreatedApiKeyDto.d.ts +113 -0
  74. package/dist/models/CreatedApiKeyDto.js +118 -0
  75. package/dist/models/FeatureFlagListItemDto.d.ts +1 -0
  76. package/dist/models/FeatureFlagListItemDto.js +2 -1
  77. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +1 -0
  78. package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +2 -1
  79. package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.d.ts +18 -0
  80. package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.js +16 -0
  81. package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.d.ts +18 -0
  82. package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.js +16 -0
  83. package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.d.ts +18 -0
  84. package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.js +16 -0
  85. package/dist/models/MarketplaceDto.d.ts +74 -0
  86. package/dist/models/MarketplaceDto.js +83 -0
  87. package/dist/models/OrderDto.d.ts +7 -1
  88. package/dist/models/OrderDto.js +4 -0
  89. package/dist/models/PrivateAccountGetMeResponse.d.ts +1 -0
  90. package/dist/models/PrivateAccountGetMeResponse.js +2 -1
  91. package/dist/models/SetAccountMarketplaceInput.d.ts +32 -0
  92. package/dist/models/SetAccountMarketplaceInput.js +51 -0
  93. package/dist/models/SimulateCommissionInput.d.ts +1 -0
  94. package/dist/models/SimulateCommissionInput.js +1 -0
  95. package/dist/models/SubscriptionDto.d.ts +7 -1
  96. package/dist/models/SubscriptionDto.js +4 -0
  97. package/dist/models/UpdateApiKeyInput.d.ts +77 -0
  98. package/dist/models/UpdateApiKeyInput.js +90 -0
  99. package/dist/models/UpdateDomainInput.d.ts +18 -0
  100. package/dist/models/UpdateDomainInput.js +14 -0
  101. package/dist/models/UpdateMarketplaceInput.d.ts +44 -0
  102. package/dist/models/UpdateMarketplaceInput.js +53 -0
  103. package/dist/models/UpdateOrderInput.d.ts +6 -0
  104. package/dist/models/UpdateOrderInput.js +2 -0
  105. package/dist/models/UpdateSubscriptionInput.d.ts +6 -0
  106. package/dist/models/UpdateSubscriptionInput.js +2 -0
  107. package/dist/models/index.d.ts +10 -0
  108. package/dist/models/index.js +10 -0
  109. package/package.json +1 -1
  110. package/src/apis/APIKeysApi.ts +271 -0
  111. package/src/apis/AccountsApi.ts +108 -36
  112. package/src/apis/AdminApi.ts +112 -0
  113. package/src/apis/AuctionsApi.ts +12 -4
  114. package/src/apis/BankAccountsApi.ts +30 -10
  115. package/src/apis/ChallengesApi.ts +18 -6
  116. package/src/apis/DomainTransfersApi.ts +6 -2
  117. package/src/apis/DomainsApi.ts +132 -44
  118. package/src/apis/EppApi.ts +6 -2
  119. package/src/apis/InvoicesApi.ts +18 -6
  120. package/src/apis/LeadsApi.ts +114 -38
  121. package/src/apis/MarketplacesApi.ts +240 -0
  122. package/src/apis/NotificationsApi.ts +24 -8
  123. package/src/apis/StatsApi.ts +42 -14
  124. package/src/apis/SubscriptionsApi.ts +6 -2
  125. package/src/apis/TasksApi.ts +18 -6
  126. package/src/apis/UsersApi.ts +30 -10
  127. package/src/apis/index.ts +2 -0
  128. package/src/models/AccountMarketplaceDto.ts +99 -0
  129. package/src/models/AccountNameshiftCommissionBySubtypeDto.ts +1 -0
  130. package/src/models/AccountNameshiftCommissionItemDto.ts +1 -0
  131. package/src/models/AccountNameshiftCommissionReasonDto.ts +1 -0
  132. package/src/models/AccountSettingsDto.ts +24 -0
  133. package/src/models/AccountSettingsInput.ts +23 -0
  134. package/src/models/AdminDomainListItemDto.ts +23 -0
  135. package/src/models/AdminMarketplaceDto.ts +144 -0
  136. package/src/models/ApiKeyDto.ts +162 -0
  137. package/src/models/ApiKeyScopeDto.ts +126 -0
  138. package/src/models/CommissionDto.ts +1 -0
  139. package/src/models/CommissionPayloadInput.ts +1 -0
  140. package/src/models/CommissionReasonDto.ts +1 -0
  141. package/src/models/CommissionSimulationItemInput.ts +1 -0
  142. package/src/models/CreateApiKeyInput.ts +125 -0
  143. package/src/models/CreateOrderInput.ts +8 -0
  144. package/src/models/CreateSubscriptionInput.ts +8 -0
  145. package/src/models/CreatedApiKeyDto.ts +171 -0
  146. package/src/models/FeatureFlagListItemDto.ts +2 -1
  147. package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +2 -1
  148. package/src/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.ts +24 -0
  149. package/src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts +24 -0
  150. package/src/models/IntersectionDomainDtoWithSeoMetricsDto.ts +24 -0
  151. package/src/models/MarketplaceDto.ts +126 -0
  152. package/src/models/OrderDto.ts +10 -1
  153. package/src/models/PrivateAccountGetMeResponse.ts +2 -1
  154. package/src/models/SetAccountMarketplaceInput.ts +66 -0
  155. package/src/models/SimulateCommissionInput.ts +1 -0
  156. package/src/models/SubscriptionDto.ts +10 -1
  157. package/src/models/UpdateApiKeyInput.ts +115 -0
  158. package/src/models/UpdateDomainInput.ts +23 -0
  159. package/src/models/UpdateMarketplaceInput.ts +81 -0
  160. package/src/models/UpdateOrderInput.ts +8 -0
  161. package/src/models/UpdateSubscriptionInput.ts +8 -0
  162. package/src/models/index.ts +10 -0
@@ -3,6 +3,7 @@
3
3
  .openapi-generator-ignore
4
4
  README.md
5
5
  package.json
6
+ src/apis/APIKeysApi.ts
6
7
  src/apis/AccountsApi.ts
7
8
  src/apis/AccountsPublicApi.ts
8
9
  src/apis/AddressPublicApi.ts
@@ -22,6 +23,7 @@ src/apis/LeadsApi.ts
22
23
  src/apis/LeadsPublicApi.ts
23
24
  src/apis/MarketApi.ts
24
25
  src/apis/MarketingApi.ts
26
+ src/apis/MarketplacesApi.ts
25
27
  src/apis/NotificationsApi.ts
26
28
  src/apis/OrdersPublicApi.ts
27
29
  src/apis/PartnerApi.ts
@@ -44,6 +46,7 @@ src/models/AccountChallengeRewardUsageListItemDtoMetadata.ts
44
46
  src/models/AccountCommissionByDateRangeDto.ts
45
47
  src/models/AccountCountryStatsDto.ts
46
48
  src/models/AccountDto.ts
49
+ src/models/AccountMarketplaceDto.ts
47
50
  src/models/AccountMetricsDto.ts
48
51
  src/models/AccountNameshiftCommissionBySubtypeDto.ts
49
52
  src/models/AccountNameshiftCommissionBySubtypePercentagesDto.ts
@@ -97,6 +100,7 @@ src/models/AdminLeadListItemBuyerDto.ts
97
100
  src/models/AdminLeadListItemDomainDto.ts
98
101
  src/models/AdminLeadListItemDto.ts
99
102
  src/models/AdminListAccountDto.ts
103
+ src/models/AdminMarketplaceDto.ts
100
104
  src/models/AdminVerificationDepositDto.ts
101
105
  src/models/AffiliatesStatsDto.ts
102
106
  src/models/AggregatedPaginationResponse.ts
@@ -106,6 +110,8 @@ src/models/AirwallexBankAccountDetailsDtoLocalMethod.ts
106
110
  src/models/AirwallexBankAccountDetailsDtoLocalMethodCode.ts
107
111
  src/models/AirwallexDepositDto.ts
108
112
  src/models/AirwallexDepositDtoFee.ts
113
+ src/models/ApiKeyDto.ts
114
+ src/models/ApiKeyScopeDto.ts
109
115
  src/models/AuBankAccountDetails.ts
110
116
  src/models/AuctionBidDto.ts
111
117
  src/models/AuctionBidInput.ts
@@ -196,6 +202,7 @@ src/models/CompanyTaxIdDto.ts
196
202
  src/models/ConflictException.ts
197
203
  src/models/CreateAccountPaymentInput.ts
198
204
  src/models/CreateAccountPaymentManualTransactionInput.ts
205
+ src/models/CreateApiKeyInput.ts
199
206
  src/models/CreateBankAccountInput.ts
200
207
  src/models/CreateBuyerLeadMessageInput.ts
201
208
  src/models/CreateChallengeInput.ts
@@ -207,6 +214,7 @@ src/models/CreateOrderInput.ts
207
214
  src/models/CreateSubscriptionBillingPeriodicityInput.ts
208
215
  src/models/CreateSubscriptionInput.ts
209
216
  src/models/CreateSubscriptionManualTransactionInput.ts
217
+ src/models/CreatedApiKeyDto.ts
210
218
  src/models/CursorBasedPageInfo.ts
211
219
  src/models/CursorBasedPaginationResponse.ts
212
220
  src/models/DeleteDomainsInput.ts
@@ -365,6 +373,7 @@ src/models/ManualLeadLeaseToOwnDto.ts
365
373
  src/models/MarketingDashboardStatsDto.ts
366
374
  src/models/MarketingOrderListItemDto.ts
367
375
  src/models/MarketingSalesFiltersDto.ts
376
+ src/models/MarketplaceDto.ts
368
377
  src/models/MoneyDecimalDto.ts
369
378
  src/models/MoneyDto.ts
370
379
  src/models/MoneyInput.ts
@@ -463,6 +472,7 @@ src/models/SendAdminLeadAiPriceNegotiatorAgentChatMessageInput.ts
463
472
  src/models/SendAdminLeadAiPriceNegotiatorAgentChatMessageInputAiModel.ts
464
473
  src/models/SeoMetricsDto.ts
465
474
  src/models/SepaBankAccountDetails.ts
475
+ src/models/SetAccountMarketplaceInput.ts
466
476
  src/models/SetDomainTransferConfirmationInput.ts
467
477
  src/models/SetNewPasswordInput.ts
468
478
  src/models/SetPayoutProviderInput.ts
@@ -506,6 +516,7 @@ src/models/TopSellerAccountDto.ts
506
516
  src/models/UkBankAccountDetails.ts
507
517
  src/models/UpdateAccountBillingInformationInput.ts
508
518
  src/models/UpdateAccountChallengeRewardBalanceInput.ts
519
+ src/models/UpdateApiKeyInput.ts
509
520
  src/models/UpdateAuctionMuteStatusInput.ts
510
521
  src/models/UpdateBuyerDomainTransferBuyerInfoInput.ts
511
522
  src/models/UpdateBuyerDomainTransferIpsTagInputDto.ts
@@ -519,6 +530,7 @@ src/models/UpdateLeadInput.ts
519
530
  src/models/UpdateLeadMuteStatusForBuyerInput.ts
520
531
  src/models/UpdateLeadMuteStatusInput.ts
521
532
  src/models/UpdateLeaseToOwnConfigurationDto.ts
533
+ src/models/UpdateMarketplaceInput.ts
522
534
  src/models/UpdateOrderInput.ts
523
535
  src/models/UpdateRentConfigurationDto.ts
524
536
  src/models/UpdateSubscriptionBillingPeriodicityInput.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## @randock/nameshift-api-client@0.0.448
1
+ ## @randock/nameshift-api-client@0.0.450
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.448 --save
39
+ npm install @randock/nameshift-api-client@0.0.450 --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
- 488272701c73a444b279b58c7c8783ee5c4dcf21f2bb6eb821d4943e3b267d359abaa3ba65e920aca8d49177125d90de
47
+ 199487a75ac0c569cbdcb605f89e0148cb660f39e8c8b52ab27ee570aa4a3392481214ea2fb0f631350f0c19619dd22f
@@ -0,0 +1,78 @@
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 { ApiKeyDto, ApiKeyScopeDto, CreateApiKeyInput, CreatedApiKeyDto, UpdateApiKeyInput } from '../models/index';
14
+ export interface APIKeysApiCreateApiKeyRequest {
15
+ createApiKeyInput: CreateApiKeyInput;
16
+ }
17
+ export interface APIKeysApiRevokeApiKeyRequest {
18
+ apiKeyId: string;
19
+ }
20
+ export interface APIKeysApiUpdateApiKeyRequest {
21
+ apiKeyId: string;
22
+ updateApiKeyInput: UpdateApiKeyInput;
23
+ }
24
+ /**
25
+ *
26
+ */
27
+ export declare class APIKeysApi extends runtime.BaseAPI {
28
+ /**
29
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
30
+ * Create an API key
31
+ */
32
+ createApiKeyRaw(requestParameters: APIKeysApiCreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CreatedApiKeyDto>>;
33
+ /**
34
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
35
+ * Create an API key
36
+ */
37
+ createApiKey(requestParameters: APIKeysApiCreateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CreatedApiKeyDto>;
38
+ /**
39
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
40
+ * List API keys
41
+ */
42
+ getApiKeysRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApiKeyDto>>>;
43
+ /**
44
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
45
+ * List API keys
46
+ */
47
+ getApiKeys(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApiKeyDto>>;
48
+ /**
49
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
50
+ * List grantable API key scopes
51
+ */
52
+ getAvailableApiKeyScopesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<ApiKeyScopeDto>>>;
53
+ /**
54
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
55
+ * List grantable API key scopes
56
+ */
57
+ getAvailableApiKeyScopes(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<ApiKeyScopeDto>>;
58
+ /**
59
+ * Revokes an API key. Requests made with it stop being accepted immediately.
60
+ * Revoke an API key
61
+ */
62
+ revokeApiKeyRaw(requestParameters: APIKeysApiRevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
63
+ /**
64
+ * Revokes an API key. Requests made with it stop being accepted immediately.
65
+ * Revoke an API key
66
+ */
67
+ revokeApiKey(requestParameters: APIKeysApiRevokeApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
68
+ /**
69
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
70
+ * Update an API key
71
+ */
72
+ updateApiKeyRaw(requestParameters: APIKeysApiUpdateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ApiKeyDto>>;
73
+ /**
74
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
75
+ * Update an API key
76
+ */
77
+ updateApiKey(requestParameters: APIKeysApiUpdateApiKeyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiKeyDto>;
78
+ }
@@ -0,0 +1,354 @@
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.APIKeysApi = void 0;
68
+ var runtime = require("../runtime");
69
+ var index_1 = require("../models/index");
70
+ /**
71
+ *
72
+ */
73
+ var APIKeysApi = /** @class */ (function (_super) {
74
+ __extends(APIKeysApi, _super);
75
+ function APIKeysApi() {
76
+ return _super !== null && _super.apply(this, arguments) || this;
77
+ }
78
+ /**
79
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
80
+ * Create an API key
81
+ */
82
+ APIKeysApi.prototype.createApiKeyRaw = function (requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var queryParameters, headerParameters, token, tokenString, response;
85
+ return __generator(this, function (_a) {
86
+ switch (_a.label) {
87
+ case 0:
88
+ if (requestParameters['createApiKeyInput'] == null) {
89
+ throw new runtime.RequiredError('createApiKeyInput', 'Required parameter "createApiKeyInput" was null or undefined when calling createApiKey().');
90
+ }
91
+ queryParameters = {};
92
+ headerParameters = {};
93
+ headerParameters['Content-Type'] = 'application/json';
94
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
95
+ token = this.configuration.accessToken;
96
+ return [4 /*yield*/, token("bearer", [])];
97
+ case 1:
98
+ tokenString = _a.sent();
99
+ if (tokenString) {
100
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
101
+ }
102
+ _a.label = 2;
103
+ case 2: return [4 /*yield*/, this.request({
104
+ path: "/private/api-keys",
105
+ method: 'POST',
106
+ headers: headerParameters,
107
+ query: queryParameters,
108
+ body: (0, index_1.CreateApiKeyInputToJSON)(requestParameters['createApiKeyInput']),
109
+ }, initOverrides)];
110
+ case 3:
111
+ response = _a.sent();
112
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.CreatedApiKeyDtoFromJSON)(jsonValue); })];
113
+ }
114
+ });
115
+ });
116
+ };
117
+ /**
118
+ * Creates an API key for the seller account. The token is returned once in this response and cannot be retrieved afterwards.
119
+ * Create an API key
120
+ */
121
+ APIKeysApi.prototype.createApiKey = function (requestParameters, initOverrides) {
122
+ return __awaiter(this, void 0, void 0, function () {
123
+ var response;
124
+ return __generator(this, function (_a) {
125
+ switch (_a.label) {
126
+ case 0: return [4 /*yield*/, this.createApiKeyRaw(requestParameters, initOverrides)];
127
+ case 1:
128
+ response = _a.sent();
129
+ return [4 /*yield*/, response.value()];
130
+ case 2: return [2 /*return*/, _a.sent()];
131
+ }
132
+ });
133
+ });
134
+ };
135
+ /**
136
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
137
+ * List API keys
138
+ */
139
+ APIKeysApi.prototype.getApiKeysRaw = function (initOverrides) {
140
+ return __awaiter(this, void 0, void 0, function () {
141
+ var queryParameters, headerParameters, token, tokenString, response;
142
+ return __generator(this, function (_a) {
143
+ switch (_a.label) {
144
+ case 0:
145
+ queryParameters = {};
146
+ headerParameters = {};
147
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
148
+ token = this.configuration.accessToken;
149
+ return [4 /*yield*/, token("bearer", [])];
150
+ case 1:
151
+ tokenString = _a.sent();
152
+ if (tokenString) {
153
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
154
+ }
155
+ _a.label = 2;
156
+ case 2: return [4 /*yield*/, this.request({
157
+ path: "/private/api-keys",
158
+ method: 'GET',
159
+ headers: headerParameters,
160
+ query: queryParameters,
161
+ }, initOverrides)];
162
+ case 3:
163
+ response = _a.sent();
164
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ApiKeyDtoFromJSON); })];
165
+ }
166
+ });
167
+ });
168
+ };
169
+ /**
170
+ * Lists the API keys belonging to the seller account. Tokens are never returned.
171
+ * List API keys
172
+ */
173
+ APIKeysApi.prototype.getApiKeys = function (initOverrides) {
174
+ return __awaiter(this, void 0, void 0, function () {
175
+ var response;
176
+ return __generator(this, function (_a) {
177
+ switch (_a.label) {
178
+ case 0: return [4 /*yield*/, this.getApiKeysRaw(initOverrides)];
179
+ case 1:
180
+ response = _a.sent();
181
+ return [4 /*yield*/, response.value()];
182
+ case 2: return [2 /*return*/, _a.sent()];
183
+ }
184
+ });
185
+ });
186
+ };
187
+ /**
188
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
189
+ * List grantable API key scopes
190
+ */
191
+ APIKeysApi.prototype.getAvailableApiKeyScopesRaw = function (initOverrides) {
192
+ return __awaiter(this, void 0, void 0, function () {
193
+ var queryParameters, headerParameters, token, tokenString, response;
194
+ return __generator(this, function (_a) {
195
+ switch (_a.label) {
196
+ case 0:
197
+ queryParameters = {};
198
+ headerParameters = {};
199
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
200
+ token = this.configuration.accessToken;
201
+ return [4 /*yield*/, token("bearer", [])];
202
+ case 1:
203
+ tokenString = _a.sent();
204
+ if (tokenString) {
205
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
206
+ }
207
+ _a.label = 2;
208
+ case 2: return [4 /*yield*/, this.request({
209
+ path: "/private/api-keys/available-scopes",
210
+ method: 'GET',
211
+ headers: headerParameters,
212
+ query: queryParameters,
213
+ }, initOverrides)];
214
+ case 3:
215
+ response = _a.sent();
216
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.ApiKeyScopeDtoFromJSON); })];
217
+ }
218
+ });
219
+ });
220
+ };
221
+ /**
222
+ * Lists the scopes that can be granted to a seller API key, with a description of the access each one confers.
223
+ * List grantable API key scopes
224
+ */
225
+ APIKeysApi.prototype.getAvailableApiKeyScopes = function (initOverrides) {
226
+ return __awaiter(this, void 0, void 0, function () {
227
+ var response;
228
+ return __generator(this, function (_a) {
229
+ switch (_a.label) {
230
+ case 0: return [4 /*yield*/, this.getAvailableApiKeyScopesRaw(initOverrides)];
231
+ case 1:
232
+ response = _a.sent();
233
+ return [4 /*yield*/, response.value()];
234
+ case 2: return [2 /*return*/, _a.sent()];
235
+ }
236
+ });
237
+ });
238
+ };
239
+ /**
240
+ * Revokes an API key. Requests made with it stop being accepted immediately.
241
+ * Revoke an API key
242
+ */
243
+ APIKeysApi.prototype.revokeApiKeyRaw = function (requestParameters, initOverrides) {
244
+ return __awaiter(this, void 0, void 0, function () {
245
+ var queryParameters, headerParameters, token, tokenString, response;
246
+ return __generator(this, function (_a) {
247
+ switch (_a.label) {
248
+ case 0:
249
+ if (requestParameters['apiKeyId'] == null) {
250
+ throw new runtime.RequiredError('apiKeyId', 'Required parameter "apiKeyId" was null or undefined when calling revokeApiKey().');
251
+ }
252
+ queryParameters = {};
253
+ headerParameters = {};
254
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
255
+ token = this.configuration.accessToken;
256
+ return [4 /*yield*/, token("bearer", [])];
257
+ case 1:
258
+ tokenString = _a.sent();
259
+ if (tokenString) {
260
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
261
+ }
262
+ _a.label = 2;
263
+ case 2: return [4 /*yield*/, this.request({
264
+ path: "/private/api-keys/{apiKeyId}".replace("{".concat("apiKeyId", "}"), encodeURIComponent(String(requestParameters['apiKeyId']))),
265
+ method: 'DELETE',
266
+ headers: headerParameters,
267
+ query: queryParameters,
268
+ }, initOverrides)];
269
+ case 3:
270
+ response = _a.sent();
271
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
272
+ }
273
+ });
274
+ });
275
+ };
276
+ /**
277
+ * Revokes an API key. Requests made with it stop being accepted immediately.
278
+ * Revoke an API key
279
+ */
280
+ APIKeysApi.prototype.revokeApiKey = function (requestParameters, initOverrides) {
281
+ return __awaiter(this, void 0, void 0, function () {
282
+ return __generator(this, function (_a) {
283
+ switch (_a.label) {
284
+ case 0: return [4 /*yield*/, this.revokeApiKeyRaw(requestParameters, initOverrides)];
285
+ case 1:
286
+ _a.sent();
287
+ return [2 /*return*/];
288
+ }
289
+ });
290
+ });
291
+ };
292
+ /**
293
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
294
+ * Update an API key
295
+ */
296
+ APIKeysApi.prototype.updateApiKeyRaw = function (requestParameters, initOverrides) {
297
+ return __awaiter(this, void 0, void 0, function () {
298
+ var queryParameters, headerParameters, token, tokenString, response;
299
+ return __generator(this, function (_a) {
300
+ switch (_a.label) {
301
+ case 0:
302
+ if (requestParameters['apiKeyId'] == null) {
303
+ throw new runtime.RequiredError('apiKeyId', 'Required parameter "apiKeyId" was null or undefined when calling updateApiKey().');
304
+ }
305
+ if (requestParameters['updateApiKeyInput'] == null) {
306
+ throw new runtime.RequiredError('updateApiKeyInput', 'Required parameter "updateApiKeyInput" was null or undefined when calling updateApiKey().');
307
+ }
308
+ queryParameters = {};
309
+ headerParameters = {};
310
+ headerParameters['Content-Type'] = 'application/json';
311
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
312
+ token = this.configuration.accessToken;
313
+ return [4 /*yield*/, token("bearer", [])];
314
+ case 1:
315
+ tokenString = _a.sent();
316
+ if (tokenString) {
317
+ headerParameters["Authorization"] = "Bearer ".concat(tokenString);
318
+ }
319
+ _a.label = 2;
320
+ case 2: return [4 /*yield*/, this.request({
321
+ path: "/private/api-keys/{apiKeyId}".replace("{".concat("apiKeyId", "}"), encodeURIComponent(String(requestParameters['apiKeyId']))),
322
+ method: 'PATCH',
323
+ headers: headerParameters,
324
+ query: queryParameters,
325
+ body: (0, index_1.UpdateApiKeyInputToJSON)(requestParameters['updateApiKeyInput']),
326
+ }, initOverrides)];
327
+ case 3:
328
+ response = _a.sent();
329
+ return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiKeyDtoFromJSON)(jsonValue); })];
330
+ }
331
+ });
332
+ });
333
+ };
334
+ /**
335
+ * Renames an API key or replaces its scopes. The token itself is unchanged.
336
+ * Update an API key
337
+ */
338
+ APIKeysApi.prototype.updateApiKey = function (requestParameters, initOverrides) {
339
+ return __awaiter(this, void 0, void 0, function () {
340
+ var response;
341
+ return __generator(this, function (_a) {
342
+ switch (_a.label) {
343
+ case 0: return [4 /*yield*/, this.updateApiKeyRaw(requestParameters, initOverrides)];
344
+ case 1:
345
+ response = _a.sent();
346
+ return [4 /*yield*/, response.value()];
347
+ case 2: return [2 /*return*/, _a.sent()];
348
+ }
349
+ });
350
+ });
351
+ };
352
+ return APIKeysApi;
353
+ }(runtime.BaseAPI));
354
+ exports.APIKeysApi = APIKeysApi;