@randock/nameshift-api-client 0.0.448 → 0.0.449

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 (69) hide show
  1. package/.openapi-generator/FILES +6 -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/AuctionsApi.d.ts +4 -4
  8. package/dist/apis/AuctionsApi.js +40 -24
  9. package/dist/apis/BankAccountsApi.d.ts +10 -10
  10. package/dist/apis/BankAccountsApi.js +100 -60
  11. package/dist/apis/ChallengesApi.d.ts +6 -6
  12. package/dist/apis/ChallengesApi.js +60 -36
  13. package/dist/apis/DomainTransfersApi.d.ts +2 -2
  14. package/dist/apis/DomainTransfersApi.js +20 -12
  15. package/dist/apis/DomainsApi.d.ts +44 -44
  16. package/dist/apis/DomainsApi.js +440 -264
  17. package/dist/apis/EppApi.d.ts +2 -2
  18. package/dist/apis/EppApi.js +20 -12
  19. package/dist/apis/InvoicesApi.d.ts +6 -6
  20. package/dist/apis/InvoicesApi.js +60 -36
  21. package/dist/apis/LeadsApi.d.ts +38 -38
  22. package/dist/apis/LeadsApi.js +380 -228
  23. package/dist/apis/NotificationsApi.d.ts +8 -8
  24. package/dist/apis/NotificationsApi.js +80 -48
  25. package/dist/apis/StatsApi.d.ts +14 -14
  26. package/dist/apis/StatsApi.js +140 -84
  27. package/dist/apis/SubscriptionsApi.d.ts +2 -2
  28. package/dist/apis/SubscriptionsApi.js +20 -12
  29. package/dist/apis/TasksApi.d.ts +6 -6
  30. package/dist/apis/TasksApi.js +60 -36
  31. package/dist/apis/UsersApi.d.ts +10 -10
  32. package/dist/apis/UsersApi.js +100 -60
  33. package/dist/apis/index.d.ts +1 -0
  34. package/dist/apis/index.js +1 -0
  35. package/dist/models/ApiKeyDto.d.ts +107 -0
  36. package/dist/models/ApiKeyDto.js +114 -0
  37. package/dist/models/ApiKeyScopeDto.d.ts +83 -0
  38. package/dist/models/ApiKeyScopeDto.js +98 -0
  39. package/dist/models/CreateApiKeyInput.d.ts +83 -0
  40. package/dist/models/CreateApiKeyInput.js +96 -0
  41. package/dist/models/CreatedApiKeyDto.d.ts +113 -0
  42. package/dist/models/CreatedApiKeyDto.js +118 -0
  43. package/dist/models/UpdateApiKeyInput.d.ts +77 -0
  44. package/dist/models/UpdateApiKeyInput.js +90 -0
  45. package/dist/models/index.d.ts +5 -0
  46. package/dist/models/index.js +5 -0
  47. package/package.json +1 -1
  48. package/src/apis/APIKeysApi.ts +271 -0
  49. package/src/apis/AccountsApi.ts +108 -36
  50. package/src/apis/AuctionsApi.ts +12 -4
  51. package/src/apis/BankAccountsApi.ts +30 -10
  52. package/src/apis/ChallengesApi.ts +18 -6
  53. package/src/apis/DomainTransfersApi.ts +6 -2
  54. package/src/apis/DomainsApi.ts +132 -44
  55. package/src/apis/EppApi.ts +6 -2
  56. package/src/apis/InvoicesApi.ts +18 -6
  57. package/src/apis/LeadsApi.ts +114 -38
  58. package/src/apis/NotificationsApi.ts +24 -8
  59. package/src/apis/StatsApi.ts +42 -14
  60. package/src/apis/SubscriptionsApi.ts +6 -2
  61. package/src/apis/TasksApi.ts +18 -6
  62. package/src/apis/UsersApi.ts +30 -10
  63. package/src/apis/index.ts +1 -0
  64. package/src/models/ApiKeyDto.ts +162 -0
  65. package/src/models/ApiKeyScopeDto.ts +126 -0
  66. package/src/models/CreateApiKeyInput.ts +125 -0
  67. package/src/models/CreatedApiKeyDto.ts +171 -0
  68. package/src/models/UpdateApiKeyInput.ts +115 -0
  69. package/src/models/index.ts +5 -0
@@ -29,22 +29,22 @@ export interface AuctionsApiGetAllAuctionsRequest {
29
29
  */
30
30
  export declare class AuctionsApi extends runtime.BaseAPI {
31
31
  /**
32
- * Deletes a scheduled auction owned by the seller account.
32
+ * Deletes a scheduled auction owned by the seller account. **API key scope required:** `AUCTIONS_WRITE`. Requests authenticated with a seller session do not need any scope.
33
33
  * Delete auction
34
34
  */
35
35
  deleteAuctionRaw(requestParameters: AuctionsApiDeleteAuctionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
36
36
  /**
37
- * Deletes a scheduled auction owned by the seller account.
37
+ * Deletes a scheduled auction owned by the seller account. **API key scope required:** `AUCTIONS_WRITE`. Requests authenticated with a seller session do not need any scope.
38
38
  * Delete auction
39
39
  */
40
40
  deleteAuction(requestParameters: AuctionsApiDeleteAuctionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
41
41
  /**
42
- * Lists auctions for the seller account.
42
+ * Lists auctions for the seller account. **API key scope required:** `AUCTIONS_READ`. Requests authenticated with a seller session do not need any scope.
43
43
  * List seller auctions
44
44
  */
45
45
  getAllAuctionsRaw(requestParameters: AuctionsApiGetAllAuctionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAllAuctions200Response1>>;
46
46
  /**
47
- * Lists auctions for the seller account.
47
+ * Lists auctions for the seller account. **API key scope required:** `AUCTIONS_READ`. Requests authenticated with a seller session do not need any scope.
48
48
  * List seller auctions
49
49
  */
50
50
  getAllAuctions(requestParameters?: AuctionsApiGetAllAuctionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAllAuctions200Response1>;
@@ -76,44 +76,52 @@ var AuctionsApi = /** @class */ (function (_super) {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Deletes a scheduled auction owned by the seller account.
79
+ * Deletes a scheduled auction owned by the seller account. **API key scope required:** `AUCTIONS_WRITE`. Requests authenticated with a seller session do not need any scope.
80
80
  * Delete auction
81
81
  */
82
82
  AuctionsApi.prototype.deleteAuctionRaw = function (requestParameters, initOverrides) {
83
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) {
84
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
85
+ return __generator(this, function (_c) {
86
+ switch (_c.label) {
87
87
  case 0:
88
88
  if (requestParameters['auctionId'] == null) {
89
89
  throw new runtime.RequiredError('auctionId', 'Required parameter "auctionId" was null or undefined when calling deleteAuction().');
90
90
  }
91
91
  queryParameters = {};
92
92
  headerParameters = {};
93
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
93
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
94
+ _a = headerParameters;
95
+ _b = "apikey";
96
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
97
+ case 1:
98
+ _a[_b] = _c.sent(); // api_key authentication
99
+ _c.label = 2;
100
+ case 2:
101
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
94
102
  token = this.configuration.accessToken;
95
103
  return [4 /*yield*/, token("bearer", [])];
96
- case 1:
97
- tokenString = _a.sent();
104
+ case 3:
105
+ tokenString = _c.sent();
98
106
  if (tokenString) {
99
107
  headerParameters["Authorization"] = "Bearer ".concat(tokenString);
100
108
  }
101
- _a.label = 2;
102
- case 2: return [4 /*yield*/, this.request({
109
+ _c.label = 4;
110
+ case 4: return [4 /*yield*/, this.request({
103
111
  path: "/private/auctions/{auctionId}".replace("{".concat("auctionId", "}"), encodeURIComponent(String(requestParameters['auctionId']))),
104
112
  method: 'DELETE',
105
113
  headers: headerParameters,
106
114
  query: queryParameters,
107
115
  }, initOverrides)];
108
- case 3:
109
- response = _a.sent();
116
+ case 5:
117
+ response = _c.sent();
110
118
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
111
119
  }
112
120
  });
113
121
  });
114
122
  };
115
123
  /**
116
- * Deletes a scheduled auction owned by the seller account.
124
+ * Deletes a scheduled auction owned by the seller account. **API key scope required:** `AUCTIONS_WRITE`. Requests authenticated with a seller session do not need any scope.
117
125
  * Delete auction
118
126
  */
119
127
  AuctionsApi.prototype.deleteAuction = function (requestParameters, initOverrides) {
@@ -129,14 +137,14 @@ var AuctionsApi = /** @class */ (function (_super) {
129
137
  });
130
138
  };
131
139
  /**
132
- * Lists auctions for the seller account.
140
+ * Lists auctions for the seller account. **API key scope required:** `AUCTIONS_READ`. Requests authenticated with a seller session do not need any scope.
133
141
  * List seller auctions
134
142
  */
135
143
  AuctionsApi.prototype.getAllAuctionsRaw = function (requestParameters, initOverrides) {
136
144
  return __awaiter(this, void 0, void 0, function () {
137
- var queryParameters, headerParameters, token, tokenString, response;
138
- return __generator(this, function (_a) {
139
- switch (_a.label) {
145
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
146
+ return __generator(this, function (_c) {
147
+ switch (_c.label) {
140
148
  case 0:
141
149
  queryParameters = {};
142
150
  if (requestParameters['filter'] != null) {
@@ -158,30 +166,38 @@ var AuctionsApi = /** @class */ (function (_super) {
158
166
  queryParameters['filter[status]'] = requestParameters['filterStatus'];
159
167
  }
160
168
  headerParameters = {};
161
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
169
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
170
+ _a = headerParameters;
171
+ _b = "apikey";
172
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
173
+ case 1:
174
+ _a[_b] = _c.sent(); // api_key authentication
175
+ _c.label = 2;
176
+ case 2:
177
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
162
178
  token = this.configuration.accessToken;
163
179
  return [4 /*yield*/, token("bearer", [])];
164
- case 1:
165
- tokenString = _a.sent();
180
+ case 3:
181
+ tokenString = _c.sent();
166
182
  if (tokenString) {
167
183
  headerParameters["Authorization"] = "Bearer ".concat(tokenString);
168
184
  }
169
- _a.label = 2;
170
- case 2: return [4 /*yield*/, this.request({
185
+ _c.label = 4;
186
+ case 4: return [4 /*yield*/, this.request({
171
187
  path: "/private/auctions",
172
188
  method: 'GET',
173
189
  headers: headerParameters,
174
190
  query: queryParameters,
175
191
  }, initOverrides)];
176
- case 3:
177
- response = _a.sent();
192
+ case 5:
193
+ response = _c.sent();
178
194
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetAllAuctions200Response1FromJSON)(jsonValue); })];
179
195
  }
180
196
  });
181
197
  });
182
198
  };
183
199
  /**
184
- * Lists auctions for the seller account.
200
+ * Lists auctions for the seller account. **API key scope required:** `AUCTIONS_READ`. Requests authenticated with a seller session do not need any scope.
185
201
  * List seller auctions
186
202
  */
187
203
  AuctionsApi.prototype.getAllAuctions = function () {
@@ -35,52 +35,52 @@ export interface BankAccountsApiMakeBankAccountPrimaryRequest {
35
35
  */
36
36
  export declare class BankAccountsApi extends runtime.BaseAPI {
37
37
  /**
38
- * Adds a new bank account for payouts to the current seller account.
38
+ * Adds a new bank account for payouts to the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
39
39
  * Create bank account
40
40
  */
41
41
  createBankAccountRaw(requestParameters: BankAccountsApiCreateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
42
42
  /**
43
- * Adds a new bank account for payouts to the current seller account.
43
+ * Adds a new bank account for payouts to the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
44
44
  * Create bank account
45
45
  */
46
46
  createBankAccount(requestParameters: BankAccountsApiCreateBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
47
47
  /**
48
- * Removes a bank account from the current seller account.
48
+ * Removes a bank account from the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
49
49
  * Delete bank account
50
50
  */
51
51
  deleteBankAccountRaw(requestParameters: BankAccountsApiDeleteBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
52
52
  /**
53
- * Removes a bank account from the current seller account.
53
+ * Removes a bank account from the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
54
54
  * Delete bank account
55
55
  */
56
56
  deleteBankAccount(requestParameters: BankAccountsApiDeleteBankAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
57
57
  /**
58
- * Returns bank account details to use for microdeposit verification.
58
+ * Returns bank account details to use for microdeposit verification. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
59
59
  * Get microdeposit bank account details
60
60
  */
61
61
  getBankAccountToUseForMicrodepositRaw(requestParameters: BankAccountsApiGetBankAccountToUseForMicrodepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AirwallexBankAccountDetailsDto>>;
62
62
  /**
63
- * Returns bank account details to use for microdeposit verification.
63
+ * Returns bank account details to use for microdeposit verification. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
64
64
  * Get microdeposit bank account details
65
65
  */
66
66
  getBankAccountToUseForMicrodeposit(requestParameters: BankAccountsApiGetBankAccountToUseForMicrodepositRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AirwallexBankAccountDetailsDto>;
67
67
  /**
68
- * Returns all bank accounts configured for the current seller account.
68
+ * Returns all bank accounts configured for the current seller account. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
69
69
  * List bank accounts
70
70
  */
71
71
  listBankAccountsRaw(requestParameters: BankAccountsApiListBankAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<AccountBankAccountDto>>>;
72
72
  /**
73
- * Returns all bank accounts configured for the current seller account.
73
+ * Returns all bank accounts configured for the current seller account. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
74
74
  * List bank accounts
75
75
  */
76
76
  listBankAccounts(requestParameters: BankAccountsApiListBankAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<AccountBankAccountDto>>;
77
77
  /**
78
- * Sets the specified bank account as the primary payout destination.
78
+ * Sets the specified bank account as the primary payout destination. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
79
79
  * Set primary bank account
80
80
  */
81
81
  makeBankAccountPrimaryRaw(requestParameters: BankAccountsApiMakeBankAccountPrimaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
82
82
  /**
83
- * Sets the specified bank account as the primary payout destination.
83
+ * Sets the specified bank account as the primary payout destination. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
84
84
  * Set primary bank account
85
85
  */
86
86
  makeBankAccountPrimary(requestParameters: BankAccountsApiMakeBankAccountPrimaryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
@@ -76,14 +76,14 @@ var BankAccountsApi = /** @class */ (function (_super) {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
78
  /**
79
- * Adds a new bank account for payouts to the current seller account.
79
+ * Adds a new bank account for payouts to the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
80
80
  * Create bank account
81
81
  */
82
82
  BankAccountsApi.prototype.createBankAccountRaw = function (requestParameters, initOverrides) {
83
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) {
84
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
85
+ return __generator(this, function (_c) {
86
+ switch (_c.label) {
87
87
  case 0:
88
88
  if (requestParameters['accountId'] == null) {
89
89
  throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling createBankAccount().');
@@ -94,31 +94,39 @@ var BankAccountsApi = /** @class */ (function (_super) {
94
94
  queryParameters = {};
95
95
  headerParameters = {};
96
96
  headerParameters['Content-Type'] = 'application/json';
97
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
97
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
98
+ _a = headerParameters;
99
+ _b = "apikey";
100
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
101
+ case 1:
102
+ _a[_b] = _c.sent(); // api_key authentication
103
+ _c.label = 2;
104
+ case 2:
105
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
98
106
  token = this.configuration.accessToken;
99
107
  return [4 /*yield*/, token("bearer", [])];
100
- case 1:
101
- tokenString = _a.sent();
108
+ case 3:
109
+ tokenString = _c.sent();
102
110
  if (tokenString) {
103
111
  headerParameters["Authorization"] = "Bearer ".concat(tokenString);
104
112
  }
105
- _a.label = 2;
106
- case 2: return [4 /*yield*/, this.request({
113
+ _c.label = 4;
114
+ case 4: return [4 /*yield*/, this.request({
107
115
  path: "/private/accounts/{accountId}/bank-accounts".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
108
116
  method: 'POST',
109
117
  headers: headerParameters,
110
118
  query: queryParameters,
111
119
  body: (0, index_1.CreateBankAccountInputToJSON)(requestParameters['createBankAccountInput']),
112
120
  }, initOverrides)];
113
- case 3:
114
- response = _a.sent();
121
+ case 5:
122
+ response = _c.sent();
115
123
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
116
124
  }
117
125
  });
118
126
  });
119
127
  };
120
128
  /**
121
- * Adds a new bank account for payouts to the current seller account.
129
+ * Adds a new bank account for payouts to the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
122
130
  * Create bank account
123
131
  */
124
132
  BankAccountsApi.prototype.createBankAccount = function (requestParameters, initOverrides) {
@@ -134,14 +142,14 @@ var BankAccountsApi = /** @class */ (function (_super) {
134
142
  });
135
143
  };
136
144
  /**
137
- * Removes a bank account from the current seller account.
145
+ * Removes a bank account from the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
138
146
  * Delete bank account
139
147
  */
140
148
  BankAccountsApi.prototype.deleteBankAccountRaw = function (requestParameters, initOverrides) {
141
149
  return __awaiter(this, void 0, void 0, function () {
142
- var queryParameters, headerParameters, token, tokenString, response;
143
- return __generator(this, function (_a) {
144
- switch (_a.label) {
150
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
151
+ return __generator(this, function (_c) {
152
+ switch (_c.label) {
145
153
  case 0:
146
154
  if (requestParameters['accountId'] == null) {
147
155
  throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling deleteBankAccount().');
@@ -151,30 +159,38 @@ var BankAccountsApi = /** @class */ (function (_super) {
151
159
  }
152
160
  queryParameters = {};
153
161
  headerParameters = {};
154
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
162
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
163
+ _a = headerParameters;
164
+ _b = "apikey";
165
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
166
+ case 1:
167
+ _a[_b] = _c.sent(); // api_key authentication
168
+ _c.label = 2;
169
+ case 2:
170
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
155
171
  token = this.configuration.accessToken;
156
172
  return [4 /*yield*/, token("bearer", [])];
157
- case 1:
158
- tokenString = _a.sent();
173
+ case 3:
174
+ tokenString = _c.sent();
159
175
  if (tokenString) {
160
176
  headerParameters["Authorization"] = "Bearer ".concat(tokenString);
161
177
  }
162
- _a.label = 2;
163
- case 2: return [4 /*yield*/, this.request({
178
+ _c.label = 4;
179
+ case 4: return [4 /*yield*/, this.request({
164
180
  path: "/private/accounts/{accountId}/bank-accounts/{bankAccountId}".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("bankAccountId", "}"), encodeURIComponent(String(requestParameters['bankAccountId']))),
165
181
  method: 'DELETE',
166
182
  headers: headerParameters,
167
183
  query: queryParameters,
168
184
  }, initOverrides)];
169
- case 3:
170
- response = _a.sent();
185
+ case 5:
186
+ response = _c.sent();
171
187
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
172
188
  }
173
189
  });
174
190
  });
175
191
  };
176
192
  /**
177
- * Removes a bank account from the current seller account.
193
+ * Removes a bank account from the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
178
194
  * Delete bank account
179
195
  */
180
196
  BankAccountsApi.prototype.deleteBankAccount = function (requestParameters, initOverrides) {
@@ -190,14 +206,14 @@ var BankAccountsApi = /** @class */ (function (_super) {
190
206
  });
191
207
  };
192
208
  /**
193
- * Returns bank account details to use for microdeposit verification.
209
+ * Returns bank account details to use for microdeposit verification. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
194
210
  * Get microdeposit bank account details
195
211
  */
196
212
  BankAccountsApi.prototype.getBankAccountToUseForMicrodepositRaw = function (requestParameters, initOverrides) {
197
213
  return __awaiter(this, void 0, void 0, function () {
198
- var queryParameters, headerParameters, token, tokenString, response;
199
- return __generator(this, function (_a) {
200
- switch (_a.label) {
214
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
215
+ return __generator(this, function (_c) {
216
+ switch (_c.label) {
201
217
  case 0:
202
218
  if (requestParameters['bankAccountId'] == null) {
203
219
  throw new runtime.RequiredError('bankAccountId', 'Required parameter "bankAccountId" was null or undefined when calling getBankAccountToUseForMicrodeposit().');
@@ -207,30 +223,38 @@ var BankAccountsApi = /** @class */ (function (_super) {
207
223
  }
208
224
  queryParameters = {};
209
225
  headerParameters = {};
210
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
226
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
227
+ _a = headerParameters;
228
+ _b = "apikey";
229
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
230
+ case 1:
231
+ _a[_b] = _c.sent(); // api_key authentication
232
+ _c.label = 2;
233
+ case 2:
234
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
211
235
  token = this.configuration.accessToken;
212
236
  return [4 /*yield*/, token("bearer", [])];
213
- case 1:
214
- tokenString = _a.sent();
237
+ case 3:
238
+ tokenString = _c.sent();
215
239
  if (tokenString) {
216
240
  headerParameters["Authorization"] = "Bearer ".concat(tokenString);
217
241
  }
218
- _a.label = 2;
219
- case 2: return [4 /*yield*/, this.request({
242
+ _c.label = 4;
243
+ case 4: return [4 /*yield*/, this.request({
220
244
  path: "/private/accounts/{accountId}/bank-accounts/{bankAccountId}/microdeposit".replace("{".concat("bankAccountId", "}"), encodeURIComponent(String(requestParameters['bankAccountId']))).replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
221
245
  method: 'GET',
222
246
  headers: headerParameters,
223
247
  query: queryParameters,
224
248
  }, initOverrides)];
225
- case 3:
226
- response = _a.sent();
249
+ case 5:
250
+ response = _c.sent();
227
251
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AirwallexBankAccountDetailsDtoFromJSON)(jsonValue); })];
228
252
  }
229
253
  });
230
254
  });
231
255
  };
232
256
  /**
233
- * Returns bank account details to use for microdeposit verification.
257
+ * Returns bank account details to use for microdeposit verification. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
234
258
  * Get microdeposit bank account details
235
259
  */
236
260
  BankAccountsApi.prototype.getBankAccountToUseForMicrodeposit = function (requestParameters, initOverrides) {
@@ -248,44 +272,52 @@ var BankAccountsApi = /** @class */ (function (_super) {
248
272
  });
249
273
  };
250
274
  /**
251
- * Returns all bank accounts configured for the current seller account.
275
+ * Returns all bank accounts configured for the current seller account. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
252
276
  * List bank accounts
253
277
  */
254
278
  BankAccountsApi.prototype.listBankAccountsRaw = function (requestParameters, initOverrides) {
255
279
  return __awaiter(this, void 0, void 0, function () {
256
- var queryParameters, headerParameters, token, tokenString, response;
257
- return __generator(this, function (_a) {
258
- switch (_a.label) {
280
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
281
+ return __generator(this, function (_c) {
282
+ switch (_c.label) {
259
283
  case 0:
260
284
  if (requestParameters['accountId'] == null) {
261
285
  throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling listBankAccounts().');
262
286
  }
263
287
  queryParameters = {};
264
288
  headerParameters = {};
265
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
289
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
290
+ _a = headerParameters;
291
+ _b = "apikey";
292
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
293
+ case 1:
294
+ _a[_b] = _c.sent(); // api_key authentication
295
+ _c.label = 2;
296
+ case 2:
297
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
266
298
  token = this.configuration.accessToken;
267
299
  return [4 /*yield*/, token("bearer", [])];
268
- case 1:
269
- tokenString = _a.sent();
300
+ case 3:
301
+ tokenString = _c.sent();
270
302
  if (tokenString) {
271
303
  headerParameters["Authorization"] = "Bearer ".concat(tokenString);
272
304
  }
273
- _a.label = 2;
274
- case 2: return [4 /*yield*/, this.request({
305
+ _c.label = 4;
306
+ case 4: return [4 /*yield*/, this.request({
275
307
  path: "/private/accounts/{accountId}/bank-accounts".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
276
308
  method: 'GET',
277
309
  headers: headerParameters,
278
310
  query: queryParameters,
279
311
  }, initOverrides)];
280
- case 3:
281
- response = _a.sent();
312
+ case 5:
313
+ response = _c.sent();
282
314
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.AccountBankAccountDtoFromJSON); })];
283
315
  }
284
316
  });
285
317
  });
286
318
  };
287
319
  /**
288
- * Returns all bank accounts configured for the current seller account.
320
+ * Returns all bank accounts configured for the current seller account. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
289
321
  * List bank accounts
290
322
  */
291
323
  BankAccountsApi.prototype.listBankAccounts = function (requestParameters, initOverrides) {
@@ -303,14 +335,14 @@ var BankAccountsApi = /** @class */ (function (_super) {
303
335
  });
304
336
  };
305
337
  /**
306
- * Sets the specified bank account as the primary payout destination.
338
+ * Sets the specified bank account as the primary payout destination. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
307
339
  * Set primary bank account
308
340
  */
309
341
  BankAccountsApi.prototype.makeBankAccountPrimaryRaw = function (requestParameters, initOverrides) {
310
342
  return __awaiter(this, void 0, void 0, function () {
311
- var queryParameters, headerParameters, token, tokenString, response;
312
- return __generator(this, function (_a) {
313
- switch (_a.label) {
343
+ var queryParameters, headerParameters, _a, _b, token, tokenString, response;
344
+ return __generator(this, function (_c) {
345
+ switch (_c.label) {
314
346
  case 0:
315
347
  if (requestParameters['accountId'] == null) {
316
348
  throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling makeBankAccountPrimary().');
@@ -320,30 +352,38 @@ var BankAccountsApi = /** @class */ (function (_super) {
320
352
  }
321
353
  queryParameters = {};
322
354
  headerParameters = {};
323
- if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
355
+ if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
356
+ _a = headerParameters;
357
+ _b = "apikey";
358
+ return [4 /*yield*/, this.configuration.apiKey("apikey")];
359
+ case 1:
360
+ _a[_b] = _c.sent(); // api_key authentication
361
+ _c.label = 2;
362
+ case 2:
363
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
324
364
  token = this.configuration.accessToken;
325
365
  return [4 /*yield*/, token("bearer", [])];
326
- case 1:
327
- tokenString = _a.sent();
366
+ case 3:
367
+ tokenString = _c.sent();
328
368
  if (tokenString) {
329
369
  headerParameters["Authorization"] = "Bearer ".concat(tokenString);
330
370
  }
331
- _a.label = 2;
332
- case 2: return [4 /*yield*/, this.request({
371
+ _c.label = 4;
372
+ case 4: return [4 /*yield*/, this.request({
333
373
  path: "/private/accounts/{accountId}/bank-accounts/{bankAccountId}/make-primary".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("bankAccountId", "}"), encodeURIComponent(String(requestParameters['bankAccountId']))),
334
374
  method: 'POST',
335
375
  headers: headerParameters,
336
376
  query: queryParameters,
337
377
  }, initOverrides)];
338
- case 3:
339
- response = _a.sent();
378
+ case 5:
379
+ response = _c.sent();
340
380
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
341
381
  }
342
382
  });
343
383
  });
344
384
  };
345
385
  /**
346
- * Sets the specified bank account as the primary payout destination.
386
+ * Sets the specified bank account as the primary payout destination. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
347
387
  * Set primary bank account
348
388
  */
349
389
  BankAccountsApi.prototype.makeBankAccountPrimary = function (requestParameters, initOverrides) {
@@ -20,32 +20,32 @@ export interface ChallengesApiCollectChallengeRewardRequest {
20
20
  */
21
21
  export declare class ChallengesApi extends runtime.BaseAPI {
22
22
  /**
23
- * Collects the reward points for a completed challenge progress entry.
23
+ * Collects the reward points for a completed challenge progress entry. **API key scope required:** `CHALLENGES_WRITE`. Requests authenticated with a seller session do not need any scope.
24
24
  * Collect challenge reward
25
25
  */
26
26
  collectChallengeRewardRaw(requestParameters: ChallengesApiCollectChallengeRewardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
27
27
  /**
28
- * Collects the reward points for a completed challenge progress entry.
28
+ * Collects the reward points for a completed challenge progress entry. **API key scope required:** `CHALLENGES_WRITE`. Requests authenticated with a seller session do not need any scope.
29
29
  * Collect challenge reward
30
30
  */
31
31
  collectChallengeReward(requestParameters: ChallengesApiCollectChallengeRewardRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
32
32
  /**
33
- * Returns the list of challenge reward usages for the current seller account.
33
+ * Returns the list of challenge reward usages for the current seller account. **API key scope required:** `CHALLENGES_READ`. Requests authenticated with a seller session do not need any scope.
34
34
  * Get challenge reward usages
35
35
  */
36
36
  getAccountChallengeRewardUsagesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetAccountChallengeRewardUsagesListDto>>;
37
37
  /**
38
- * Returns the list of challenge reward usages for the current seller account.
38
+ * Returns the list of challenge reward usages for the current seller account. **API key scope required:** `CHALLENGES_READ`. Requests authenticated with a seller session do not need any scope.
39
39
  * Get challenge reward usages
40
40
  */
41
41
  getAccountChallengeRewardUsages(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetAccountChallengeRewardUsagesListDto>;
42
42
  /**
43
- * Lists active challenges for the seller account.
43
+ * Lists active challenges for the seller account. **API key scope required:** `CHALLENGES_READ`. Requests authenticated with a seller session do not need any scope.
44
44
  * Get seller challenges
45
45
  */
46
46
  getChallengesRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSellerChallengesListDto>>;
47
47
  /**
48
- * Lists active challenges for the seller account.
48
+ * Lists active challenges for the seller account. **API key scope required:** `CHALLENGES_READ`. Requests authenticated with a seller session do not need any scope.
49
49
  * Get seller challenges
50
50
  */
51
51
  getChallenges(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSellerChallengesListDto>;