@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.
- package/.openapi-generator/FILES +12 -0
- package/README.md +3 -3
- package/dist/apis/APIKeysApi.d.ts +78 -0
- package/dist/apis/APIKeysApi.js +354 -0
- package/dist/apis/AccountsApi.d.ts +36 -36
- package/dist/apis/AccountsApi.js +360 -216
- package/dist/apis/AdminApi.d.ts +37 -1
- package/dist/apis/AdminApi.js +122 -1
- package/dist/apis/AuctionsApi.d.ts +4 -4
- package/dist/apis/AuctionsApi.js +40 -24
- package/dist/apis/BankAccountsApi.d.ts +10 -10
- package/dist/apis/BankAccountsApi.js +100 -60
- package/dist/apis/ChallengesApi.d.ts +6 -6
- package/dist/apis/ChallengesApi.js +60 -36
- package/dist/apis/DomainTransfersApi.d.ts +2 -2
- package/dist/apis/DomainTransfersApi.js +20 -12
- package/dist/apis/DomainsApi.d.ts +44 -44
- package/dist/apis/DomainsApi.js +440 -264
- package/dist/apis/EppApi.d.ts +2 -2
- package/dist/apis/EppApi.js +20 -12
- package/dist/apis/InvoicesApi.d.ts +6 -6
- package/dist/apis/InvoicesApi.js +60 -36
- package/dist/apis/LeadsApi.d.ts +38 -38
- package/dist/apis/LeadsApi.js +380 -228
- package/dist/apis/MarketplacesApi.d.ts +89 -0
- package/dist/apis/MarketplacesApi.js +332 -0
- package/dist/apis/NotificationsApi.d.ts +8 -8
- package/dist/apis/NotificationsApi.js +80 -48
- package/dist/apis/StatsApi.d.ts +14 -14
- package/dist/apis/StatsApi.js +140 -84
- package/dist/apis/SubscriptionsApi.d.ts +2 -2
- package/dist/apis/SubscriptionsApi.js +20 -12
- package/dist/apis/TasksApi.d.ts +6 -6
- package/dist/apis/TasksApi.js +60 -36
- package/dist/apis/UsersApi.d.ts +10 -10
- package/dist/apis/UsersApi.js +100 -60
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/models/AccountMarketplaceDto.d.ts +56 -0
- package/dist/models/AccountMarketplaceDto.js +71 -0
- package/dist/models/AccountNameshiftCommissionBySubtypeDto.d.ts +1 -0
- package/dist/models/AccountNameshiftCommissionBySubtypeDto.js +1 -0
- package/dist/models/AccountNameshiftCommissionItemDto.d.ts +1 -0
- package/dist/models/AccountNameshiftCommissionItemDto.js +1 -0
- package/dist/models/AccountNameshiftCommissionReasonDto.d.ts +1 -0
- package/dist/models/AccountNameshiftCommissionReasonDto.js +1 -0
- package/dist/models/AccountSettingsDto.d.ts +18 -0
- package/dist/models/AccountSettingsDto.js +16 -0
- package/dist/models/AccountSettingsInput.d.ts +18 -0
- package/dist/models/AccountSettingsInput.js +14 -0
- package/dist/models/AdminDomainListItemDto.d.ts +19 -0
- package/dist/models/AdminDomainListItemDto.js +17 -1
- package/dist/models/AdminMarketplaceDto.d.ts +86 -0
- package/dist/models/AdminMarketplaceDto.js +91 -0
- package/dist/models/ApiKeyDto.d.ts +107 -0
- package/dist/models/ApiKeyDto.js +114 -0
- package/dist/models/ApiKeyScopeDto.d.ts +83 -0
- package/dist/models/ApiKeyScopeDto.js +98 -0
- package/dist/models/CommissionDto.d.ts +1 -0
- package/dist/models/CommissionDto.js +1 -0
- package/dist/models/CommissionPayloadInput.d.ts +1 -0
- package/dist/models/CommissionPayloadInput.js +1 -0
- package/dist/models/CommissionReasonDto.d.ts +1 -0
- package/dist/models/CommissionReasonDto.js +1 -0
- package/dist/models/CommissionSimulationItemInput.d.ts +1 -0
- package/dist/models/CommissionSimulationItemInput.js +1 -0
- package/dist/models/CreateApiKeyInput.d.ts +83 -0
- package/dist/models/CreateApiKeyInput.js +96 -0
- package/dist/models/CreateOrderInput.d.ts +6 -0
- package/dist/models/CreateOrderInput.js +2 -0
- package/dist/models/CreateSubscriptionInput.d.ts +6 -0
- package/dist/models/CreateSubscriptionInput.js +2 -0
- package/dist/models/CreatedApiKeyDto.d.ts +113 -0
- package/dist/models/CreatedApiKeyDto.js +118 -0
- package/dist/models/FeatureFlagListItemDto.d.ts +1 -0
- package/dist/models/FeatureFlagListItemDto.js +2 -1
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.d.ts +1 -0
- package/dist/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.js +2 -1
- package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.d.ts +18 -0
- package/dist/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.js +16 -0
- package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.d.ts +18 -0
- package/dist/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.js +16 -0
- package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.d.ts +18 -0
- package/dist/models/IntersectionDomainDtoWithSeoMetricsDto.js +16 -0
- package/dist/models/MarketplaceDto.d.ts +74 -0
- package/dist/models/MarketplaceDto.js +83 -0
- package/dist/models/OrderDto.d.ts +7 -1
- package/dist/models/OrderDto.js +4 -0
- package/dist/models/PrivateAccountGetMeResponse.d.ts +1 -0
- package/dist/models/PrivateAccountGetMeResponse.js +2 -1
- package/dist/models/SetAccountMarketplaceInput.d.ts +32 -0
- package/dist/models/SetAccountMarketplaceInput.js +51 -0
- package/dist/models/SimulateCommissionInput.d.ts +1 -0
- package/dist/models/SimulateCommissionInput.js +1 -0
- package/dist/models/SubscriptionDto.d.ts +7 -1
- package/dist/models/SubscriptionDto.js +4 -0
- package/dist/models/UpdateApiKeyInput.d.ts +77 -0
- package/dist/models/UpdateApiKeyInput.js +90 -0
- package/dist/models/UpdateDomainInput.d.ts +18 -0
- package/dist/models/UpdateDomainInput.js +14 -0
- package/dist/models/UpdateMarketplaceInput.d.ts +44 -0
- package/dist/models/UpdateMarketplaceInput.js +53 -0
- package/dist/models/UpdateOrderInput.d.ts +6 -0
- package/dist/models/UpdateOrderInput.js +2 -0
- package/dist/models/UpdateSubscriptionInput.d.ts +6 -0
- package/dist/models/UpdateSubscriptionInput.js +2 -0
- package/dist/models/index.d.ts +10 -0
- package/dist/models/index.js +10 -0
- package/package.json +1 -1
- package/src/apis/APIKeysApi.ts +271 -0
- package/src/apis/AccountsApi.ts +108 -36
- package/src/apis/AdminApi.ts +112 -0
- package/src/apis/AuctionsApi.ts +12 -4
- package/src/apis/BankAccountsApi.ts +30 -10
- package/src/apis/ChallengesApi.ts +18 -6
- package/src/apis/DomainTransfersApi.ts +6 -2
- package/src/apis/DomainsApi.ts +132 -44
- package/src/apis/EppApi.ts +6 -2
- package/src/apis/InvoicesApi.ts +18 -6
- package/src/apis/LeadsApi.ts +114 -38
- package/src/apis/MarketplacesApi.ts +240 -0
- package/src/apis/NotificationsApi.ts +24 -8
- package/src/apis/StatsApi.ts +42 -14
- package/src/apis/SubscriptionsApi.ts +6 -2
- package/src/apis/TasksApi.ts +18 -6
- package/src/apis/UsersApi.ts +30 -10
- package/src/apis/index.ts +2 -0
- package/src/models/AccountMarketplaceDto.ts +99 -0
- package/src/models/AccountNameshiftCommissionBySubtypeDto.ts +1 -0
- package/src/models/AccountNameshiftCommissionItemDto.ts +1 -0
- package/src/models/AccountNameshiftCommissionReasonDto.ts +1 -0
- package/src/models/AccountSettingsDto.ts +24 -0
- package/src/models/AccountSettingsInput.ts +23 -0
- package/src/models/AdminDomainListItemDto.ts +23 -0
- package/src/models/AdminMarketplaceDto.ts +144 -0
- package/src/models/ApiKeyDto.ts +162 -0
- package/src/models/ApiKeyScopeDto.ts +126 -0
- package/src/models/CommissionDto.ts +1 -0
- package/src/models/CommissionPayloadInput.ts +1 -0
- package/src/models/CommissionReasonDto.ts +1 -0
- package/src/models/CommissionSimulationItemInput.ts +1 -0
- package/src/models/CreateApiKeyInput.ts +125 -0
- package/src/models/CreateOrderInput.ts +8 -0
- package/src/models/CreateSubscriptionInput.ts +8 -0
- package/src/models/CreatedApiKeyDto.ts +171 -0
- package/src/models/FeatureFlagListItemDto.ts +2 -1
- package/src/models/IntersectionAccountDtoWithSettingsDtoWithNotificationsDtoWithFeatureFlagsDto.ts +2 -1
- package/src/models/IntersectionDomainDtoWithAccountDtoWithAuctionInfoDto.ts +24 -0
- package/src/models/IntersectionDomainDtoWithHijackerDtoWithAccountDto.ts +24 -0
- package/src/models/IntersectionDomainDtoWithSeoMetricsDto.ts +24 -0
- package/src/models/MarketplaceDto.ts +126 -0
- package/src/models/OrderDto.ts +10 -1
- package/src/models/PrivateAccountGetMeResponse.ts +2 -1
- package/src/models/SetAccountMarketplaceInput.ts +66 -0
- package/src/models/SimulateCommissionInput.ts +1 -0
- package/src/models/SubscriptionDto.ts +10 -1
- package/src/models/UpdateApiKeyInput.ts +115 -0
- package/src/models/UpdateDomainInput.ts +23 -0
- package/src/models/UpdateMarketplaceInput.ts +81 -0
- package/src/models/UpdateOrderInput.ts +8 -0
- package/src/models/UpdateSubscriptionInput.ts +8 -0
- package/src/models/index.ts +10 -0
package/dist/apis/AccountsApi.js
CHANGED
|
@@ -76,14 +76,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
76
76
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
77
77
|
}
|
|
78
78
|
/**
|
|
79
|
-
* Creates a new account payment for a feature or service purchase.
|
|
79
|
+
* Creates a new account payment for a feature or service purchase. **API key scope required:** `PAYMENTS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
80
80
|
* Create account payment
|
|
81
81
|
*/
|
|
82
82
|
AccountsApi.prototype.createAccountPaymentRaw = 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 (
|
|
86
|
-
switch (
|
|
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 createAccountPayment().');
|
|
@@ -94,31 +94,39 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
94
94
|
queryParameters = {};
|
|
95
95
|
headerParameters = {};
|
|
96
96
|
headerParameters['Content-Type'] = 'application/json';
|
|
97
|
-
if (!(this.configuration && this.configuration.
|
|
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
|
|
101
|
-
tokenString =
|
|
108
|
+
case 3:
|
|
109
|
+
tokenString = _c.sent();
|
|
102
110
|
if (tokenString) {
|
|
103
111
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
104
112
|
}
|
|
105
|
-
|
|
106
|
-
case
|
|
113
|
+
_c.label = 4;
|
|
114
|
+
case 4: return [4 /*yield*/, this.request({
|
|
107
115
|
path: "/private/accounts/{accountId}/payments".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.CreateAccountPaymentInputToJSON)(requestParameters['createAccountPaymentInput']),
|
|
112
120
|
}, initOverrides)];
|
|
113
|
-
case
|
|
114
|
-
response =
|
|
121
|
+
case 5:
|
|
122
|
+
response = _c.sent();
|
|
115
123
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ObjectIdFromJSON)(jsonValue); })];
|
|
116
124
|
}
|
|
117
125
|
});
|
|
118
126
|
});
|
|
119
127
|
};
|
|
120
128
|
/**
|
|
121
|
-
* Creates a new account payment for a feature or service purchase.
|
|
129
|
+
* Creates a new account payment for a feature or service purchase. **API key scope required:** `PAYMENTS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
122
130
|
* Create account payment
|
|
123
131
|
*/
|
|
124
132
|
AccountsApi.prototype.createAccountPayment = function (requestParameters, initOverrides) {
|
|
@@ -136,14 +144,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
136
144
|
});
|
|
137
145
|
};
|
|
138
146
|
/**
|
|
139
|
-
* Creates a new manual transaction for account payment with specified open invoice
|
|
147
|
+
* Creates a new manual transaction for account payment with specified open invoice **API key scope required:** `PAYMENTS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
140
148
|
* Create a new manual transaction for account payment invoice
|
|
141
149
|
*/
|
|
142
150
|
AccountsApi.prototype.createAccountPaymentManualTransactionRaw = function (requestParameters, initOverrides) {
|
|
143
151
|
return __awaiter(this, void 0, void 0, function () {
|
|
144
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
145
|
-
return __generator(this, function (
|
|
146
|
-
switch (
|
|
152
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
153
|
+
return __generator(this, function (_c) {
|
|
154
|
+
switch (_c.label) {
|
|
147
155
|
case 0:
|
|
148
156
|
if (requestParameters['accountId'] == null) {
|
|
149
157
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling createAccountPaymentManualTransaction().');
|
|
@@ -157,31 +165,39 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
157
165
|
queryParameters = {};
|
|
158
166
|
headerParameters = {};
|
|
159
167
|
headerParameters['Content-Type'] = 'application/json';
|
|
160
|
-
if (!(this.configuration && this.configuration.
|
|
168
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
169
|
+
_a = headerParameters;
|
|
170
|
+
_b = "apikey";
|
|
171
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
172
|
+
case 1:
|
|
173
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
174
|
+
_c.label = 2;
|
|
175
|
+
case 2:
|
|
176
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
161
177
|
token = this.configuration.accessToken;
|
|
162
178
|
return [4 /*yield*/, token("bearer", [])];
|
|
163
|
-
case
|
|
164
|
-
tokenString =
|
|
179
|
+
case 3:
|
|
180
|
+
tokenString = _c.sent();
|
|
165
181
|
if (tokenString) {
|
|
166
182
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
167
183
|
}
|
|
168
|
-
|
|
169
|
-
case
|
|
184
|
+
_c.label = 4;
|
|
185
|
+
case 4: return [4 /*yield*/, this.request({
|
|
170
186
|
path: "/private/accounts/{accountId}/payments/{paymentId}/transactions".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("paymentId", "}"), encodeURIComponent(String(requestParameters['paymentId']))),
|
|
171
187
|
method: 'POST',
|
|
172
188
|
headers: headerParameters,
|
|
173
189
|
query: queryParameters,
|
|
174
190
|
body: (0, index_1.CreateAccountPaymentManualTransactionInputToJSON)(requestParameters['createAccountPaymentManualTransactionInput']),
|
|
175
191
|
}, initOverrides)];
|
|
176
|
-
case
|
|
177
|
-
response =
|
|
192
|
+
case 5:
|
|
193
|
+
response = _c.sent();
|
|
178
194
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
179
195
|
}
|
|
180
196
|
});
|
|
181
197
|
});
|
|
182
198
|
};
|
|
183
199
|
/**
|
|
184
|
-
* Creates a new manual transaction for account payment with specified open invoice
|
|
200
|
+
* Creates a new manual transaction for account payment with specified open invoice **API key scope required:** `PAYMENTS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
185
201
|
* Create a new manual transaction for account payment invoice
|
|
186
202
|
*/
|
|
187
203
|
AccountsApi.prototype.createAccountPaymentManualTransaction = function (requestParameters, initOverrides) {
|
|
@@ -197,41 +213,49 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
197
213
|
});
|
|
198
214
|
};
|
|
199
215
|
/**
|
|
200
|
-
* Permanently deletes the current seller account.
|
|
216
|
+
* Permanently deletes the current seller account. **API key scope required:** `ACCOUNT_DELETE`. Requests authenticated with a seller session do not need any scope.
|
|
201
217
|
* Delete current account
|
|
202
218
|
*/
|
|
203
219
|
AccountsApi.prototype.deleteMeRaw = function (initOverrides) {
|
|
204
220
|
return __awaiter(this, void 0, void 0, function () {
|
|
205
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
206
|
-
return __generator(this, function (
|
|
207
|
-
switch (
|
|
221
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
222
|
+
return __generator(this, function (_c) {
|
|
223
|
+
switch (_c.label) {
|
|
208
224
|
case 0:
|
|
209
225
|
queryParameters = {};
|
|
210
226
|
headerParameters = {};
|
|
211
|
-
if (!(this.configuration && this.configuration.
|
|
227
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
228
|
+
_a = headerParameters;
|
|
229
|
+
_b = "apikey";
|
|
230
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
231
|
+
case 1:
|
|
232
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
233
|
+
_c.label = 2;
|
|
234
|
+
case 2:
|
|
235
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
212
236
|
token = this.configuration.accessToken;
|
|
213
237
|
return [4 /*yield*/, token("bearer", [])];
|
|
214
|
-
case
|
|
215
|
-
tokenString =
|
|
238
|
+
case 3:
|
|
239
|
+
tokenString = _c.sent();
|
|
216
240
|
if (tokenString) {
|
|
217
241
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
218
242
|
}
|
|
219
|
-
|
|
220
|
-
case
|
|
243
|
+
_c.label = 4;
|
|
244
|
+
case 4: return [4 /*yield*/, this.request({
|
|
221
245
|
path: "/private/accounts/me",
|
|
222
246
|
method: 'DELETE',
|
|
223
247
|
headers: headerParameters,
|
|
224
248
|
query: queryParameters,
|
|
225
249
|
}, initOverrides)];
|
|
226
|
-
case
|
|
227
|
-
response =
|
|
250
|
+
case 5:
|
|
251
|
+
response = _c.sent();
|
|
228
252
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
229
253
|
}
|
|
230
254
|
});
|
|
231
255
|
});
|
|
232
256
|
};
|
|
233
257
|
/**
|
|
234
|
-
* Permanently deletes the current seller account.
|
|
258
|
+
* Permanently deletes the current seller account. **API key scope required:** `ACCOUNT_DELETE`. Requests authenticated with a seller session do not need any scope.
|
|
235
259
|
* Delete current account
|
|
236
260
|
*/
|
|
237
261
|
AccountsApi.prototype.deleteMe = function (initOverrides) {
|
|
@@ -247,14 +271,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
247
271
|
});
|
|
248
272
|
};
|
|
249
273
|
/**
|
|
250
|
-
* Returns details of a specific account payment.
|
|
274
|
+
* Returns details of a specific account payment. **API key scope required:** `PAYMENTS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
251
275
|
* Get account payment
|
|
252
276
|
*/
|
|
253
277
|
AccountsApi.prototype.getAccountPaymentRaw = function (requestParameters, initOverrides) {
|
|
254
278
|
return __awaiter(this, void 0, void 0, function () {
|
|
255
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
256
|
-
return __generator(this, function (
|
|
257
|
-
switch (
|
|
279
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
280
|
+
return __generator(this, function (_c) {
|
|
281
|
+
switch (_c.label) {
|
|
258
282
|
case 0:
|
|
259
283
|
if (requestParameters['accountId'] == null) {
|
|
260
284
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAccountPayment().');
|
|
@@ -264,30 +288,38 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
264
288
|
}
|
|
265
289
|
queryParameters = {};
|
|
266
290
|
headerParameters = {};
|
|
267
|
-
if (!(this.configuration && this.configuration.
|
|
291
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
292
|
+
_a = headerParameters;
|
|
293
|
+
_b = "apikey";
|
|
294
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
295
|
+
case 1:
|
|
296
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
297
|
+
_c.label = 2;
|
|
298
|
+
case 2:
|
|
299
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
268
300
|
token = this.configuration.accessToken;
|
|
269
301
|
return [4 /*yield*/, token("bearer", [])];
|
|
270
|
-
case
|
|
271
|
-
tokenString =
|
|
302
|
+
case 3:
|
|
303
|
+
tokenString = _c.sent();
|
|
272
304
|
if (tokenString) {
|
|
273
305
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
274
306
|
}
|
|
275
|
-
|
|
276
|
-
case
|
|
307
|
+
_c.label = 4;
|
|
308
|
+
case 4: return [4 /*yield*/, this.request({
|
|
277
309
|
path: "/private/accounts/{accountId}/payments/{paymentId}".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("paymentId", "}"), encodeURIComponent(String(requestParameters['paymentId']))),
|
|
278
310
|
method: 'GET',
|
|
279
311
|
headers: headerParameters,
|
|
280
312
|
query: queryParameters,
|
|
281
313
|
}, initOverrides)];
|
|
282
|
-
case
|
|
283
|
-
response =
|
|
314
|
+
case 5:
|
|
315
|
+
response = _c.sent();
|
|
284
316
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AccountPaymentDtoFromJSON)(jsonValue); })];
|
|
285
317
|
}
|
|
286
318
|
});
|
|
287
319
|
});
|
|
288
320
|
};
|
|
289
321
|
/**
|
|
290
|
-
* Returns details of a specific account payment.
|
|
322
|
+
* Returns details of a specific account payment. **API key scope required:** `PAYMENTS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
291
323
|
* Get account payment
|
|
292
324
|
*/
|
|
293
325
|
AccountsApi.prototype.getAccountPayment = function (requestParameters, initOverrides) {
|
|
@@ -305,14 +337,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
305
337
|
});
|
|
306
338
|
};
|
|
307
339
|
/**
|
|
308
|
-
* Returns saved payment methods for the account filtered by payment gateway.
|
|
340
|
+
* Returns saved payment methods for the account filtered by payment gateway. **API key scope required:** `PAYMENTS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
309
341
|
* Get account payment methods
|
|
310
342
|
*/
|
|
311
343
|
AccountsApi.prototype.getAccountPaymentMethodsRaw = function (requestParameters, initOverrides) {
|
|
312
344
|
return __awaiter(this, void 0, void 0, function () {
|
|
313
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
314
|
-
return __generator(this, function (
|
|
315
|
-
switch (
|
|
345
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
346
|
+
return __generator(this, function (_c) {
|
|
347
|
+
switch (_c.label) {
|
|
316
348
|
case 0:
|
|
317
349
|
if (requestParameters['accountId'] == null) {
|
|
318
350
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAccountPaymentMethods().');
|
|
@@ -322,30 +354,38 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
322
354
|
}
|
|
323
355
|
queryParameters = {};
|
|
324
356
|
headerParameters = {};
|
|
325
|
-
if (!(this.configuration && this.configuration.
|
|
357
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
358
|
+
_a = headerParameters;
|
|
359
|
+
_b = "apikey";
|
|
360
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
361
|
+
case 1:
|
|
362
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
363
|
+
_c.label = 2;
|
|
364
|
+
case 2:
|
|
365
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
326
366
|
token = this.configuration.accessToken;
|
|
327
367
|
return [4 /*yield*/, token("bearer", [])];
|
|
328
|
-
case
|
|
329
|
-
tokenString =
|
|
368
|
+
case 3:
|
|
369
|
+
tokenString = _c.sent();
|
|
330
370
|
if (tokenString) {
|
|
331
371
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
332
372
|
}
|
|
333
|
-
|
|
334
|
-
case
|
|
373
|
+
_c.label = 4;
|
|
374
|
+
case 4: return [4 /*yield*/, this.request({
|
|
335
375
|
path: "/private/accounts/{accountId}/payment-methods/{gateway}".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("gateway", "}"), encodeURIComponent(String(requestParameters['gateway']))),
|
|
336
376
|
method: 'GET',
|
|
337
377
|
headers: headerParameters,
|
|
338
378
|
query: queryParameters,
|
|
339
379
|
}, initOverrides)];
|
|
340
|
-
case
|
|
341
|
-
response =
|
|
380
|
+
case 5:
|
|
381
|
+
response = _c.sent();
|
|
342
382
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.AccountPaymentMethodDtoFromJSON); })];
|
|
343
383
|
}
|
|
344
384
|
});
|
|
345
385
|
});
|
|
346
386
|
};
|
|
347
387
|
/**
|
|
348
|
-
* Returns saved payment methods for the account filtered by payment gateway.
|
|
388
|
+
* Returns saved payment methods for the account filtered by payment gateway. **API key scope required:** `PAYMENTS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
349
389
|
* Get account payment methods
|
|
350
390
|
*/
|
|
351
391
|
AccountsApi.prototype.getAccountPaymentMethods = function (requestParameters, initOverrides) {
|
|
@@ -363,44 +403,52 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
363
403
|
});
|
|
364
404
|
};
|
|
365
405
|
/**
|
|
366
|
-
* Returns an onboarding session for the account payment provider setup.
|
|
406
|
+
* Returns an onboarding session for the account payment provider setup. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
367
407
|
* Get payment provider onboarding session
|
|
368
408
|
*/
|
|
369
409
|
AccountsApi.prototype.getAccountPaymentProviderSessionRaw = function (requestParameters, initOverrides) {
|
|
370
410
|
return __awaiter(this, void 0, void 0, function () {
|
|
371
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
372
|
-
return __generator(this, function (
|
|
373
|
-
switch (
|
|
411
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
412
|
+
return __generator(this, function (_c) {
|
|
413
|
+
switch (_c.label) {
|
|
374
414
|
case 0:
|
|
375
415
|
if (requestParameters['accountId'] == null) {
|
|
376
416
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAccountPaymentProviderSession().');
|
|
377
417
|
}
|
|
378
418
|
queryParameters = {};
|
|
379
419
|
headerParameters = {};
|
|
380
|
-
if (!(this.configuration && this.configuration.
|
|
420
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
421
|
+
_a = headerParameters;
|
|
422
|
+
_b = "apikey";
|
|
423
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
424
|
+
case 1:
|
|
425
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
426
|
+
_c.label = 2;
|
|
427
|
+
case 2:
|
|
428
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
381
429
|
token = this.configuration.accessToken;
|
|
382
430
|
return [4 /*yield*/, token("bearer", [])];
|
|
383
|
-
case
|
|
384
|
-
tokenString =
|
|
431
|
+
case 3:
|
|
432
|
+
tokenString = _c.sent();
|
|
385
433
|
if (tokenString) {
|
|
386
434
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
387
435
|
}
|
|
388
|
-
|
|
389
|
-
case
|
|
436
|
+
_c.label = 4;
|
|
437
|
+
case 4: return [4 /*yield*/, this.request({
|
|
390
438
|
path: "/private/accounts/{accountId}/payment-provider/session".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
391
439
|
method: 'GET',
|
|
392
440
|
headers: headerParameters,
|
|
393
441
|
query: queryParameters,
|
|
394
442
|
}, initOverrides)];
|
|
395
|
-
case
|
|
396
|
-
response =
|
|
443
|
+
case 5:
|
|
444
|
+
response = _c.sent();
|
|
397
445
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AccountOnboardingSessionDtoFromJSON)(jsonValue); })];
|
|
398
446
|
}
|
|
399
447
|
});
|
|
400
448
|
});
|
|
401
449
|
};
|
|
402
450
|
/**
|
|
403
|
-
* Returns an onboarding session for the account payment provider setup.
|
|
451
|
+
* Returns an onboarding session for the account payment provider setup. **API key scope required:** `PAYOUTS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
404
452
|
* Get payment provider onboarding session
|
|
405
453
|
*/
|
|
406
454
|
AccountsApi.prototype.getAccountPaymentProviderSession = function (requestParameters, initOverrides) {
|
|
@@ -418,44 +466,52 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
418
466
|
});
|
|
419
467
|
};
|
|
420
468
|
/**
|
|
421
|
-
* Returns a summary of pending affiliate commission amounts grouped by currency.
|
|
469
|
+
* Returns a summary of pending affiliate commission amounts grouped by currency. **API key scope required:** `COMMISSIONS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
422
470
|
* Get pending affiliate commissions summary
|
|
423
471
|
*/
|
|
424
472
|
AccountsApi.prototype.getAccountPendingAffiliateCommissionsSummaryRaw = function (requestParameters, initOverrides) {
|
|
425
473
|
return __awaiter(this, void 0, void 0, function () {
|
|
426
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
427
|
-
return __generator(this, function (
|
|
428
|
-
switch (
|
|
474
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
475
|
+
return __generator(this, function (_c) {
|
|
476
|
+
switch (_c.label) {
|
|
429
477
|
case 0:
|
|
430
478
|
if (requestParameters['accountId'] == null) {
|
|
431
479
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAccountPendingAffiliateCommissionsSummary().');
|
|
432
480
|
}
|
|
433
481
|
queryParameters = {};
|
|
434
482
|
headerParameters = {};
|
|
435
|
-
if (!(this.configuration && this.configuration.
|
|
483
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
484
|
+
_a = headerParameters;
|
|
485
|
+
_b = "apikey";
|
|
486
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
487
|
+
case 1:
|
|
488
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
489
|
+
_c.label = 2;
|
|
490
|
+
case 2:
|
|
491
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
436
492
|
token = this.configuration.accessToken;
|
|
437
493
|
return [4 /*yield*/, token("bearer", [])];
|
|
438
|
-
case
|
|
439
|
-
tokenString =
|
|
494
|
+
case 3:
|
|
495
|
+
tokenString = _c.sent();
|
|
440
496
|
if (tokenString) {
|
|
441
497
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
442
498
|
}
|
|
443
|
-
|
|
444
|
-
case
|
|
499
|
+
_c.label = 4;
|
|
500
|
+
case 4: return [4 /*yield*/, this.request({
|
|
445
501
|
path: "/private/accounts/{accountId}/affiliate-commissions/summary".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
446
502
|
method: 'GET',
|
|
447
503
|
headers: headerParameters,
|
|
448
504
|
query: queryParameters,
|
|
449
505
|
}, initOverrides)];
|
|
450
|
-
case
|
|
451
|
-
response =
|
|
506
|
+
case 5:
|
|
507
|
+
response = _c.sent();
|
|
452
508
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return jsonValue.map(index_1.MoneyDtoFromJSON); })];
|
|
453
509
|
}
|
|
454
510
|
});
|
|
455
511
|
});
|
|
456
512
|
};
|
|
457
513
|
/**
|
|
458
|
-
* Returns a summary of pending affiliate commission amounts grouped by currency.
|
|
514
|
+
* Returns a summary of pending affiliate commission amounts grouped by currency. **API key scope required:** `COMMISSIONS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
459
515
|
* Get pending affiliate commissions summary
|
|
460
516
|
*/
|
|
461
517
|
AccountsApi.prototype.getAccountPendingAffiliateCommissionsSummary = function (requestParameters, initOverrides) {
|
|
@@ -473,41 +529,49 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
473
529
|
});
|
|
474
530
|
};
|
|
475
531
|
/**
|
|
476
|
-
* Returns the settings for the current seller account.
|
|
532
|
+
* Returns the settings for the current seller account. **API key scope required:** `ACCOUNT_READ`. Requests authenticated with a seller session do not need any scope.
|
|
477
533
|
* Get account settings
|
|
478
534
|
*/
|
|
479
535
|
AccountsApi.prototype.getAccountSettingsRaw = function (initOverrides) {
|
|
480
536
|
return __awaiter(this, void 0, void 0, function () {
|
|
481
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
482
|
-
return __generator(this, function (
|
|
483
|
-
switch (
|
|
537
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
538
|
+
return __generator(this, function (_c) {
|
|
539
|
+
switch (_c.label) {
|
|
484
540
|
case 0:
|
|
485
541
|
queryParameters = {};
|
|
486
542
|
headerParameters = {};
|
|
487
|
-
if (!(this.configuration && this.configuration.
|
|
543
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
544
|
+
_a = headerParameters;
|
|
545
|
+
_b = "apikey";
|
|
546
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
547
|
+
case 1:
|
|
548
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
549
|
+
_c.label = 2;
|
|
550
|
+
case 2:
|
|
551
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
488
552
|
token = this.configuration.accessToken;
|
|
489
553
|
return [4 /*yield*/, token("bearer", [])];
|
|
490
|
-
case
|
|
491
|
-
tokenString =
|
|
554
|
+
case 3:
|
|
555
|
+
tokenString = _c.sent();
|
|
492
556
|
if (tokenString) {
|
|
493
557
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
494
558
|
}
|
|
495
|
-
|
|
496
|
-
case
|
|
559
|
+
_c.label = 4;
|
|
560
|
+
case 4: return [4 /*yield*/, this.request({
|
|
497
561
|
path: "/private/accounts/me/settings",
|
|
498
562
|
method: 'GET',
|
|
499
563
|
headers: headerParameters,
|
|
500
564
|
query: queryParameters,
|
|
501
565
|
}, initOverrides)];
|
|
502
|
-
case
|
|
503
|
-
response =
|
|
566
|
+
case 5:
|
|
567
|
+
response = _c.sent();
|
|
504
568
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.AccountSettingsDtoFromJSON)(jsonValue); })];
|
|
505
569
|
}
|
|
506
570
|
});
|
|
507
571
|
});
|
|
508
572
|
};
|
|
509
573
|
/**
|
|
510
|
-
* Returns the settings for the current seller account.
|
|
574
|
+
* Returns the settings for the current seller account. **API key scope required:** `ACCOUNT_READ`. Requests authenticated with a seller session do not need any scope.
|
|
511
575
|
* Get account settings
|
|
512
576
|
*/
|
|
513
577
|
AccountsApi.prototype.getAccountSettings = function (initOverrides) {
|
|
@@ -525,14 +589,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
525
589
|
});
|
|
526
590
|
};
|
|
527
591
|
/**
|
|
528
|
-
* Lists affiliate commissions for the seller account.
|
|
592
|
+
* Lists affiliate commissions for the seller account. **API key scope required:** `COMMISSIONS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
529
593
|
* List affiliate commissions
|
|
530
594
|
*/
|
|
531
595
|
AccountsApi.prototype.getAllAffiliateCommissionsRaw = function (requestParameters, initOverrides) {
|
|
532
596
|
return __awaiter(this, void 0, void 0, function () {
|
|
533
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
534
|
-
return __generator(this, function (
|
|
535
|
-
switch (
|
|
597
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
598
|
+
return __generator(this, function (_c) {
|
|
599
|
+
switch (_c.label) {
|
|
536
600
|
case 0:
|
|
537
601
|
if (requestParameters['accountId'] == null) {
|
|
538
602
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAllAffiliateCommissions().');
|
|
@@ -554,30 +618,38 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
554
618
|
queryParameters['filter[status]'] = requestParameters['filterStatus'];
|
|
555
619
|
}
|
|
556
620
|
headerParameters = {};
|
|
557
|
-
if (!(this.configuration && this.configuration.
|
|
621
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
622
|
+
_a = headerParameters;
|
|
623
|
+
_b = "apikey";
|
|
624
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
625
|
+
case 1:
|
|
626
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
627
|
+
_c.label = 2;
|
|
628
|
+
case 2:
|
|
629
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
558
630
|
token = this.configuration.accessToken;
|
|
559
631
|
return [4 /*yield*/, token("bearer", [])];
|
|
560
|
-
case
|
|
561
|
-
tokenString =
|
|
632
|
+
case 3:
|
|
633
|
+
tokenString = _c.sent();
|
|
562
634
|
if (tokenString) {
|
|
563
635
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
564
636
|
}
|
|
565
|
-
|
|
566
|
-
case
|
|
637
|
+
_c.label = 4;
|
|
638
|
+
case 4: return [4 /*yield*/, this.request({
|
|
567
639
|
path: "/private/accounts/{accountId}/affiliate-commissions".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
568
640
|
method: 'GET',
|
|
569
641
|
headers: headerParameters,
|
|
570
642
|
query: queryParameters,
|
|
571
643
|
}, initOverrides)];
|
|
572
|
-
case
|
|
573
|
-
response =
|
|
644
|
+
case 5:
|
|
645
|
+
response = _c.sent();
|
|
574
646
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetAllAffiliateCommissions200ResponseFromJSON)(jsonValue); })];
|
|
575
647
|
}
|
|
576
648
|
});
|
|
577
649
|
});
|
|
578
650
|
};
|
|
579
651
|
/**
|
|
580
|
-
* Lists affiliate commissions for the seller account.
|
|
652
|
+
* Lists affiliate commissions for the seller account. **API key scope required:** `COMMISSIONS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
581
653
|
* List affiliate commissions
|
|
582
654
|
*/
|
|
583
655
|
AccountsApi.prototype.getAllAffiliateCommissions = function (requestParameters, initOverrides) {
|
|
@@ -595,14 +667,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
595
667
|
});
|
|
596
668
|
};
|
|
597
669
|
/**
|
|
598
|
-
* Lists accounts referred by the seller.
|
|
670
|
+
* Lists accounts referred by the seller. **API key scope required:** `COMMISSIONS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
599
671
|
* List account referrals
|
|
600
672
|
*/
|
|
601
673
|
AccountsApi.prototype.getAllReferralsRaw = function (requestParameters, initOverrides) {
|
|
602
674
|
return __awaiter(this, void 0, void 0, function () {
|
|
603
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
604
|
-
return __generator(this, function (
|
|
605
|
-
switch (
|
|
675
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
676
|
+
return __generator(this, function (_c) {
|
|
677
|
+
switch (_c.label) {
|
|
606
678
|
case 0:
|
|
607
679
|
if (requestParameters['accountId'] == null) {
|
|
608
680
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling getAllReferrals().');
|
|
@@ -624,30 +696,38 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
624
696
|
queryParameters['filter[search_term]'] = requestParameters['filterSearchTerm'];
|
|
625
697
|
}
|
|
626
698
|
headerParameters = {};
|
|
627
|
-
if (!(this.configuration && this.configuration.
|
|
699
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
700
|
+
_a = headerParameters;
|
|
701
|
+
_b = "apikey";
|
|
702
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
703
|
+
case 1:
|
|
704
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
705
|
+
_c.label = 2;
|
|
706
|
+
case 2:
|
|
707
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
628
708
|
token = this.configuration.accessToken;
|
|
629
709
|
return [4 /*yield*/, token("bearer", [])];
|
|
630
|
-
case
|
|
631
|
-
tokenString =
|
|
710
|
+
case 3:
|
|
711
|
+
tokenString = _c.sent();
|
|
632
712
|
if (tokenString) {
|
|
633
713
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
634
714
|
}
|
|
635
|
-
|
|
636
|
-
case
|
|
715
|
+
_c.label = 4;
|
|
716
|
+
case 4: return [4 /*yield*/, this.request({
|
|
637
717
|
path: "/private/accounts/{accountId}/referrals".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
638
718
|
method: 'GET',
|
|
639
719
|
headers: headerParameters,
|
|
640
720
|
query: queryParameters,
|
|
641
721
|
}, initOverrides)];
|
|
642
|
-
case
|
|
643
|
-
response =
|
|
722
|
+
case 5:
|
|
723
|
+
response = _c.sent();
|
|
644
724
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetAllReferrals200ResponseFromJSON)(jsonValue); })];
|
|
645
725
|
}
|
|
646
726
|
});
|
|
647
727
|
});
|
|
648
728
|
};
|
|
649
729
|
/**
|
|
650
|
-
* Lists accounts referred by the seller.
|
|
730
|
+
* Lists accounts referred by the seller. **API key scope required:** `COMMISSIONS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
651
731
|
* List account referrals
|
|
652
732
|
*/
|
|
653
733
|
AccountsApi.prototype.getAllReferrals = function (requestParameters, initOverrides) {
|
|
@@ -665,41 +745,49 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
665
745
|
});
|
|
666
746
|
};
|
|
667
747
|
/**
|
|
668
|
-
* Returns Nameshift commission percentages and schedules for the current account.
|
|
748
|
+
* Returns Nameshift commission percentages and schedules for the current account. **API key scope required:** `COMMISSIONS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
669
749
|
* Get Nameshift commissions
|
|
670
750
|
*/
|
|
671
751
|
AccountsApi.prototype.getNameshiftCommissionsRaw = function (initOverrides) {
|
|
672
752
|
return __awaiter(this, void 0, void 0, function () {
|
|
673
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
674
|
-
return __generator(this, function (
|
|
675
|
-
switch (
|
|
753
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
754
|
+
return __generator(this, function (_c) {
|
|
755
|
+
switch (_c.label) {
|
|
676
756
|
case 0:
|
|
677
757
|
queryParameters = {};
|
|
678
758
|
headerParameters = {};
|
|
679
|
-
if (!(this.configuration && this.configuration.
|
|
759
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
760
|
+
_a = headerParameters;
|
|
761
|
+
_b = "apikey";
|
|
762
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
763
|
+
case 1:
|
|
764
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
765
|
+
_c.label = 2;
|
|
766
|
+
case 2:
|
|
767
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
680
768
|
token = this.configuration.accessToken;
|
|
681
769
|
return [4 /*yield*/, token("bearer", [])];
|
|
682
|
-
case
|
|
683
|
-
tokenString =
|
|
770
|
+
case 3:
|
|
771
|
+
tokenString = _c.sent();
|
|
684
772
|
if (tokenString) {
|
|
685
773
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
686
774
|
}
|
|
687
|
-
|
|
688
|
-
case
|
|
775
|
+
_c.label = 4;
|
|
776
|
+
case 4: return [4 /*yield*/, this.request({
|
|
689
777
|
path: "/private/accounts/me/nameshift-commissions",
|
|
690
778
|
method: 'GET',
|
|
691
779
|
headers: headerParameters,
|
|
692
780
|
query: queryParameters,
|
|
693
781
|
}, initOverrides)];
|
|
694
|
-
case
|
|
695
|
-
response =
|
|
782
|
+
case 5:
|
|
783
|
+
response = _c.sent();
|
|
696
784
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.GetAccountNameshiftCommissionsResponseDtoFromJSON)(jsonValue); })];
|
|
697
785
|
}
|
|
698
786
|
});
|
|
699
787
|
});
|
|
700
788
|
};
|
|
701
789
|
/**
|
|
702
|
-
* Returns Nameshift commission percentages and schedules for the current account.
|
|
790
|
+
* Returns Nameshift commission percentages and schedules for the current account. **API key scope required:** `COMMISSIONS_READ`. Requests authenticated with a seller session do not need any scope.
|
|
703
791
|
* Get Nameshift commissions
|
|
704
792
|
*/
|
|
705
793
|
AccountsApi.prototype.getNameshiftCommissions = function (initOverrides) {
|
|
@@ -717,41 +805,49 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
717
805
|
});
|
|
718
806
|
};
|
|
719
807
|
/**
|
|
720
|
-
* Returns the current seller account information.
|
|
808
|
+
* Returns the current seller account information. **API key scope required:** `ACCOUNT_READ`. Requests authenticated with a seller session do not need any scope.
|
|
721
809
|
* Get current account
|
|
722
810
|
*/
|
|
723
811
|
AccountsApi.prototype.meRaw = function (initOverrides) {
|
|
724
812
|
return __awaiter(this, void 0, void 0, function () {
|
|
725
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
726
|
-
return __generator(this, function (
|
|
727
|
-
switch (
|
|
813
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
814
|
+
return __generator(this, function (_c) {
|
|
815
|
+
switch (_c.label) {
|
|
728
816
|
case 0:
|
|
729
817
|
queryParameters = {};
|
|
730
818
|
headerParameters = {};
|
|
731
|
-
if (!(this.configuration && this.configuration.
|
|
819
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
820
|
+
_a = headerParameters;
|
|
821
|
+
_b = "apikey";
|
|
822
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
823
|
+
case 1:
|
|
824
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
825
|
+
_c.label = 2;
|
|
826
|
+
case 2:
|
|
827
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
732
828
|
token = this.configuration.accessToken;
|
|
733
829
|
return [4 /*yield*/, token("bearer", [])];
|
|
734
|
-
case
|
|
735
|
-
tokenString =
|
|
830
|
+
case 3:
|
|
831
|
+
tokenString = _c.sent();
|
|
736
832
|
if (tokenString) {
|
|
737
833
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
738
834
|
}
|
|
739
|
-
|
|
740
|
-
case
|
|
835
|
+
_c.label = 4;
|
|
836
|
+
case 4: return [4 /*yield*/, this.request({
|
|
741
837
|
path: "/private/accounts/me",
|
|
742
838
|
method: 'GET',
|
|
743
839
|
headers: headerParameters,
|
|
744
840
|
query: queryParameters,
|
|
745
841
|
}, initOverrides)];
|
|
746
|
-
case
|
|
747
|
-
response =
|
|
842
|
+
case 5:
|
|
843
|
+
response = _c.sent();
|
|
748
844
|
return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.PrivateAccountGetMeResponseFromJSON)(jsonValue); })];
|
|
749
845
|
}
|
|
750
846
|
});
|
|
751
847
|
});
|
|
752
848
|
};
|
|
753
849
|
/**
|
|
754
|
-
* Returns the current seller account information.
|
|
850
|
+
* Returns the current seller account information. **API key scope required:** `ACCOUNT_READ`. Requests authenticated with a seller session do not need any scope.
|
|
755
851
|
* Get current account
|
|
756
852
|
*/
|
|
757
853
|
AccountsApi.prototype.me = function (initOverrides) {
|
|
@@ -769,14 +865,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
769
865
|
});
|
|
770
866
|
};
|
|
771
867
|
/**
|
|
772
|
-
* Pays an account payment by confirming the payment intent using the specified payment method
|
|
868
|
+
* Pays an account payment by confirming the payment intent using the specified payment method **API key scope required:** `PAYMENTS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
773
869
|
* Pay an account payment
|
|
774
870
|
*/
|
|
775
871
|
AccountsApi.prototype.payAccountPaymentRaw = function (requestParameters, initOverrides) {
|
|
776
872
|
return __awaiter(this, void 0, void 0, function () {
|
|
777
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
778
|
-
return __generator(this, function (
|
|
779
|
-
switch (
|
|
873
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
874
|
+
return __generator(this, function (_c) {
|
|
875
|
+
switch (_c.label) {
|
|
780
876
|
case 0:
|
|
781
877
|
if (requestParameters['accountId'] == null) {
|
|
782
878
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling payAccountPayment().');
|
|
@@ -790,31 +886,39 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
790
886
|
queryParameters = {};
|
|
791
887
|
headerParameters = {};
|
|
792
888
|
headerParameters['Content-Type'] = 'application/json';
|
|
793
|
-
if (!(this.configuration && this.configuration.
|
|
889
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
890
|
+
_a = headerParameters;
|
|
891
|
+
_b = "apikey";
|
|
892
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
893
|
+
case 1:
|
|
894
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
895
|
+
_c.label = 2;
|
|
896
|
+
case 2:
|
|
897
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
794
898
|
token = this.configuration.accessToken;
|
|
795
899
|
return [4 /*yield*/, token("bearer", [])];
|
|
796
|
-
case
|
|
797
|
-
tokenString =
|
|
900
|
+
case 3:
|
|
901
|
+
tokenString = _c.sent();
|
|
798
902
|
if (tokenString) {
|
|
799
903
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
800
904
|
}
|
|
801
|
-
|
|
802
|
-
case
|
|
905
|
+
_c.label = 4;
|
|
906
|
+
case 4: return [4 /*yield*/, this.request({
|
|
803
907
|
path: "/private/accounts/{accountId}/payments/{paymentId}/pay".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("paymentId", "}"), encodeURIComponent(String(requestParameters['paymentId']))),
|
|
804
908
|
method: 'POST',
|
|
805
909
|
headers: headerParameters,
|
|
806
910
|
query: queryParameters,
|
|
807
911
|
body: (0, index_1.PayAccountPaymentInputToJSON)(requestParameters['payAccountPaymentInput']),
|
|
808
912
|
}, initOverrides)];
|
|
809
|
-
case
|
|
810
|
-
response =
|
|
913
|
+
case 5:
|
|
914
|
+
response = _c.sent();
|
|
811
915
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
812
916
|
}
|
|
813
917
|
});
|
|
814
918
|
});
|
|
815
919
|
};
|
|
816
920
|
/**
|
|
817
|
-
* Pays an account payment by confirming the payment intent using the specified payment method
|
|
921
|
+
* Pays an account payment by confirming the payment intent using the specified payment method **API key scope required:** `PAYMENTS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
818
922
|
* Pay an account payment
|
|
819
923
|
*/
|
|
820
924
|
AccountsApi.prototype.payAccountPayment = function (requestParameters, initOverrides) {
|
|
@@ -830,14 +934,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
830
934
|
});
|
|
831
935
|
};
|
|
832
936
|
/**
|
|
833
|
-
* Creates or updates billing information for the current seller account.
|
|
937
|
+
* Creates or updates billing information for the current seller account. **API key scope required:** `ACCOUNT_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
834
938
|
* Update billing information
|
|
835
939
|
*/
|
|
836
940
|
AccountsApi.prototype.postBillingInformationRaw = function (requestParameters, initOverrides) {
|
|
837
941
|
return __awaiter(this, void 0, void 0, function () {
|
|
838
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
839
|
-
return __generator(this, function (
|
|
840
|
-
switch (
|
|
942
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
943
|
+
return __generator(this, function (_c) {
|
|
944
|
+
switch (_c.label) {
|
|
841
945
|
case 0:
|
|
842
946
|
if (requestParameters['accountId'] == null) {
|
|
843
947
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling postBillingInformation().');
|
|
@@ -848,31 +952,39 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
848
952
|
queryParameters = {};
|
|
849
953
|
headerParameters = {};
|
|
850
954
|
headerParameters['Content-Type'] = 'application/json';
|
|
851
|
-
if (!(this.configuration && this.configuration.
|
|
955
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
956
|
+
_a = headerParameters;
|
|
957
|
+
_b = "apikey";
|
|
958
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
959
|
+
case 1:
|
|
960
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
961
|
+
_c.label = 2;
|
|
962
|
+
case 2:
|
|
963
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
852
964
|
token = this.configuration.accessToken;
|
|
853
965
|
return [4 /*yield*/, token("bearer", [])];
|
|
854
|
-
case
|
|
855
|
-
tokenString =
|
|
966
|
+
case 3:
|
|
967
|
+
tokenString = _c.sent();
|
|
856
968
|
if (tokenString) {
|
|
857
969
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
858
970
|
}
|
|
859
|
-
|
|
860
|
-
case
|
|
971
|
+
_c.label = 4;
|
|
972
|
+
case 4: return [4 /*yield*/, this.request({
|
|
861
973
|
path: "/private/accounts/{accountId}/billing-information".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
862
974
|
method: 'POST',
|
|
863
975
|
headers: headerParameters,
|
|
864
976
|
query: queryParameters,
|
|
865
977
|
body: (0, index_1.UpdateAccountBillingInformationInputToJSON)(requestParameters['updateAccountBillingInformationInput']),
|
|
866
978
|
}, initOverrides)];
|
|
867
|
-
case
|
|
868
|
-
response =
|
|
979
|
+
case 5:
|
|
980
|
+
response = _c.sent();
|
|
869
981
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
870
982
|
}
|
|
871
983
|
});
|
|
872
984
|
});
|
|
873
985
|
};
|
|
874
986
|
/**
|
|
875
|
-
* Creates or updates billing information for the current seller account.
|
|
987
|
+
* Creates or updates billing information for the current seller account. **API key scope required:** `ACCOUNT_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
876
988
|
* Update billing information
|
|
877
989
|
*/
|
|
878
990
|
AccountsApi.prototype.postBillingInformation = function (requestParameters, initOverrides) {
|
|
@@ -888,14 +1000,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
888
1000
|
});
|
|
889
1001
|
};
|
|
890
1002
|
/**
|
|
891
|
-
* Marks an account notification as read.
|
|
1003
|
+
* Marks an account notification as read. **API key scope required:** `NOTIFICATIONS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
892
1004
|
* Mark notification as read
|
|
893
1005
|
*/
|
|
894
1006
|
AccountsApi.prototype.postReadAccountNotificationRaw = function (requestParameters, initOverrides) {
|
|
895
1007
|
return __awaiter(this, void 0, void 0, function () {
|
|
896
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
897
|
-
return __generator(this, function (
|
|
898
|
-
switch (
|
|
1008
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1009
|
+
return __generator(this, function (_c) {
|
|
1010
|
+
switch (_c.label) {
|
|
899
1011
|
case 0:
|
|
900
1012
|
if (requestParameters['accountId'] == null) {
|
|
901
1013
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling postReadAccountNotification().');
|
|
@@ -905,30 +1017,38 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
905
1017
|
}
|
|
906
1018
|
queryParameters = {};
|
|
907
1019
|
headerParameters = {};
|
|
908
|
-
if (!(this.configuration && this.configuration.
|
|
1020
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1021
|
+
_a = headerParameters;
|
|
1022
|
+
_b = "apikey";
|
|
1023
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1024
|
+
case 1:
|
|
1025
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1026
|
+
_c.label = 2;
|
|
1027
|
+
case 2:
|
|
1028
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
909
1029
|
token = this.configuration.accessToken;
|
|
910
1030
|
return [4 /*yield*/, token("bearer", [])];
|
|
911
|
-
case
|
|
912
|
-
tokenString =
|
|
1031
|
+
case 3:
|
|
1032
|
+
tokenString = _c.sent();
|
|
913
1033
|
if (tokenString) {
|
|
914
1034
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
915
1035
|
}
|
|
916
|
-
|
|
917
|
-
case
|
|
1036
|
+
_c.label = 4;
|
|
1037
|
+
case 4: return [4 /*yield*/, this.request({
|
|
918
1038
|
path: "/private/accounts/{accountId}/notifications/{notificationId}/read".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))).replace("{".concat("notificationId", "}"), encodeURIComponent(String(requestParameters['notificationId']))),
|
|
919
1039
|
method: 'POST',
|
|
920
1040
|
headers: headerParameters,
|
|
921
1041
|
query: queryParameters,
|
|
922
1042
|
}, initOverrides)];
|
|
923
|
-
case
|
|
924
|
-
response =
|
|
1043
|
+
case 5:
|
|
1044
|
+
response = _c.sent();
|
|
925
1045
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
926
1046
|
}
|
|
927
1047
|
});
|
|
928
1048
|
});
|
|
929
1049
|
};
|
|
930
1050
|
/**
|
|
931
|
-
* Marks an account notification as read.
|
|
1051
|
+
* Marks an account notification as read. **API key scope required:** `NOTIFICATIONS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
932
1052
|
* Mark notification as read
|
|
933
1053
|
*/
|
|
934
1054
|
AccountsApi.prototype.postReadAccountNotification = function (requestParameters, initOverrides) {
|
|
@@ -944,30 +1064,38 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
944
1064
|
});
|
|
945
1065
|
};
|
|
946
1066
|
/**
|
|
947
|
-
* Uploads or replaces the avatar image displayed on the account landing page.
|
|
1067
|
+
* Uploads or replaces the avatar image displayed on the account landing page. **API key scope required:** `ACCOUNT_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
948
1068
|
* Upload landing page avatar
|
|
949
1069
|
*/
|
|
950
1070
|
AccountsApi.prototype.putAvatarRaw = function (requestParameters, initOverrides) {
|
|
951
1071
|
return __awaiter(this, void 0, void 0, function () {
|
|
952
|
-
var queryParameters, headerParameters, token, tokenString, consumes, canConsumeForm, formParams, useForm, response;
|
|
953
|
-
return __generator(this, function (
|
|
954
|
-
switch (
|
|
1072
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, consumes, canConsumeForm, formParams, useForm, response;
|
|
1073
|
+
return __generator(this, function (_c) {
|
|
1074
|
+
switch (_c.label) {
|
|
955
1075
|
case 0:
|
|
956
1076
|
if (requestParameters['accountId'] == null) {
|
|
957
1077
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling putAvatar().');
|
|
958
1078
|
}
|
|
959
1079
|
queryParameters = {};
|
|
960
1080
|
headerParameters = {};
|
|
961
|
-
if (!(this.configuration && this.configuration.
|
|
1081
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1082
|
+
_a = headerParameters;
|
|
1083
|
+
_b = "apikey";
|
|
1084
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1085
|
+
case 1:
|
|
1086
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1087
|
+
_c.label = 2;
|
|
1088
|
+
case 2:
|
|
1089
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
962
1090
|
token = this.configuration.accessToken;
|
|
963
1091
|
return [4 /*yield*/, token("bearer", [])];
|
|
964
|
-
case
|
|
965
|
-
tokenString =
|
|
1092
|
+
case 3:
|
|
1093
|
+
tokenString = _c.sent();
|
|
966
1094
|
if (tokenString) {
|
|
967
1095
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
968
1096
|
}
|
|
969
|
-
|
|
970
|
-
case
|
|
1097
|
+
_c.label = 4;
|
|
1098
|
+
case 4:
|
|
971
1099
|
consumes = [
|
|
972
1100
|
{ contentType: 'multipart/form-data' },
|
|
973
1101
|
];
|
|
@@ -991,15 +1119,15 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
991
1119
|
query: queryParameters,
|
|
992
1120
|
body: formParams,
|
|
993
1121
|
}, initOverrides)];
|
|
994
|
-
case
|
|
995
|
-
response =
|
|
1122
|
+
case 5:
|
|
1123
|
+
response = _c.sent();
|
|
996
1124
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
997
1125
|
}
|
|
998
1126
|
});
|
|
999
1127
|
});
|
|
1000
1128
|
};
|
|
1001
1129
|
/**
|
|
1002
|
-
* Uploads or replaces the avatar image displayed on the account landing page.
|
|
1130
|
+
* Uploads or replaces the avatar image displayed on the account landing page. **API key scope required:** `ACCOUNT_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1003
1131
|
* Upload landing page avatar
|
|
1004
1132
|
*/
|
|
1005
1133
|
AccountsApi.prototype.putAvatar = function (requestParameters, initOverrides) {
|
|
@@ -1015,14 +1143,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
1015
1143
|
});
|
|
1016
1144
|
};
|
|
1017
1145
|
/**
|
|
1018
|
-
* Sets the payout provider for the current seller account.
|
|
1146
|
+
* Sets the payout provider for the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1019
1147
|
* Set payout provider
|
|
1020
1148
|
*/
|
|
1021
1149
|
AccountsApi.prototype.setPayoutProviderRaw = function (requestParameters, initOverrides) {
|
|
1022
1150
|
return __awaiter(this, void 0, void 0, function () {
|
|
1023
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
1024
|
-
return __generator(this, function (
|
|
1025
|
-
switch (
|
|
1151
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1152
|
+
return __generator(this, function (_c) {
|
|
1153
|
+
switch (_c.label) {
|
|
1026
1154
|
case 0:
|
|
1027
1155
|
if (requestParameters['accountId'] == null) {
|
|
1028
1156
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling setPayoutProvider().');
|
|
@@ -1033,31 +1161,39 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
1033
1161
|
queryParameters = {};
|
|
1034
1162
|
headerParameters = {};
|
|
1035
1163
|
headerParameters['Content-Type'] = 'application/json';
|
|
1036
|
-
if (!(this.configuration && this.configuration.
|
|
1164
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1165
|
+
_a = headerParameters;
|
|
1166
|
+
_b = "apikey";
|
|
1167
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1168
|
+
case 1:
|
|
1169
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1170
|
+
_c.label = 2;
|
|
1171
|
+
case 2:
|
|
1172
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
1037
1173
|
token = this.configuration.accessToken;
|
|
1038
1174
|
return [4 /*yield*/, token("bearer", [])];
|
|
1039
|
-
case
|
|
1040
|
-
tokenString =
|
|
1175
|
+
case 3:
|
|
1176
|
+
tokenString = _c.sent();
|
|
1041
1177
|
if (tokenString) {
|
|
1042
1178
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1043
1179
|
}
|
|
1044
|
-
|
|
1045
|
-
case
|
|
1180
|
+
_c.label = 4;
|
|
1181
|
+
case 4: return [4 /*yield*/, this.request({
|
|
1046
1182
|
path: "/private/accounts/{accountId}/payout-provider".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
1047
1183
|
method: 'POST',
|
|
1048
1184
|
headers: headerParameters,
|
|
1049
1185
|
query: queryParameters,
|
|
1050
1186
|
body: (0, index_1.SetPayoutProviderInputToJSON)(requestParameters['setPayoutProviderInput']),
|
|
1051
1187
|
}, initOverrides)];
|
|
1052
|
-
case
|
|
1053
|
-
response =
|
|
1188
|
+
case 5:
|
|
1189
|
+
response = _c.sent();
|
|
1054
1190
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
1055
1191
|
}
|
|
1056
1192
|
});
|
|
1057
1193
|
});
|
|
1058
1194
|
};
|
|
1059
1195
|
/**
|
|
1060
|
-
* Sets the payout provider for the current seller account.
|
|
1196
|
+
* Sets the payout provider for the current seller account. **API key scope required:** `PAYOUTS_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1061
1197
|
* Set payout provider
|
|
1062
1198
|
*/
|
|
1063
1199
|
AccountsApi.prototype.setPayoutProvider = function (requestParameters, initOverrides) {
|
|
@@ -1073,14 +1209,14 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
1073
1209
|
});
|
|
1074
1210
|
};
|
|
1075
1211
|
/**
|
|
1076
|
-
* Updates seller account settings.
|
|
1212
|
+
* Updates seller account settings. **API key scope required:** `ACCOUNT_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1077
1213
|
* Update account settings
|
|
1078
1214
|
*/
|
|
1079
1215
|
AccountsApi.prototype.updateSettingsRaw = function (requestParameters, initOverrides) {
|
|
1080
1216
|
return __awaiter(this, void 0, void 0, function () {
|
|
1081
|
-
var queryParameters, headerParameters, token, tokenString, response;
|
|
1082
|
-
return __generator(this, function (
|
|
1083
|
-
switch (
|
|
1217
|
+
var queryParameters, headerParameters, _a, _b, token, tokenString, response;
|
|
1218
|
+
return __generator(this, function (_c) {
|
|
1219
|
+
switch (_c.label) {
|
|
1084
1220
|
case 0:
|
|
1085
1221
|
if (requestParameters['accountId'] == null) {
|
|
1086
1222
|
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling updateSettings().');
|
|
@@ -1091,31 +1227,39 @@ var AccountsApi = /** @class */ (function (_super) {
|
|
|
1091
1227
|
queryParameters = {};
|
|
1092
1228
|
headerParameters = {};
|
|
1093
1229
|
headerParameters['Content-Type'] = 'application/json';
|
|
1094
|
-
if (!(this.configuration && this.configuration.
|
|
1230
|
+
if (!(this.configuration && this.configuration.apiKey)) return [3 /*break*/, 2];
|
|
1231
|
+
_a = headerParameters;
|
|
1232
|
+
_b = "apikey";
|
|
1233
|
+
return [4 /*yield*/, this.configuration.apiKey("apikey")];
|
|
1234
|
+
case 1:
|
|
1235
|
+
_a[_b] = _c.sent(); // api_key authentication
|
|
1236
|
+
_c.label = 2;
|
|
1237
|
+
case 2:
|
|
1238
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 4];
|
|
1095
1239
|
token = this.configuration.accessToken;
|
|
1096
1240
|
return [4 /*yield*/, token("bearer", [])];
|
|
1097
|
-
case
|
|
1098
|
-
tokenString =
|
|
1241
|
+
case 3:
|
|
1242
|
+
tokenString = _c.sent();
|
|
1099
1243
|
if (tokenString) {
|
|
1100
1244
|
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1101
1245
|
}
|
|
1102
|
-
|
|
1103
|
-
case
|
|
1246
|
+
_c.label = 4;
|
|
1247
|
+
case 4: return [4 /*yield*/, this.request({
|
|
1104
1248
|
path: "/private/accounts/{accountId}/settings".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
1105
1249
|
method: 'PATCH',
|
|
1106
1250
|
headers: headerParameters,
|
|
1107
1251
|
query: queryParameters,
|
|
1108
1252
|
body: (0, index_1.AccountSettingsInputToJSON)(requestParameters['accountSettingsInput']),
|
|
1109
1253
|
}, initOverrides)];
|
|
1110
|
-
case
|
|
1111
|
-
response =
|
|
1254
|
+
case 5:
|
|
1255
|
+
response = _c.sent();
|
|
1112
1256
|
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
1113
1257
|
}
|
|
1114
1258
|
});
|
|
1115
1259
|
});
|
|
1116
1260
|
};
|
|
1117
1261
|
/**
|
|
1118
|
-
* Updates seller account settings.
|
|
1262
|
+
* Updates seller account settings. **API key scope required:** `ACCOUNT_WRITE`. Requests authenticated with a seller session do not need any scope.
|
|
1119
1263
|
* Update account settings
|
|
1120
1264
|
*/
|
|
1121
1265
|
AccountsApi.prototype.updateSettings = function (requestParameters, initOverrides) {
|