@randock/nameshift-api-client 0.0.387 → 0.0.389
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -3
- package/dist/apis/AdminApi.d.ts +11 -0
- package/dist/apis/AdminApi.js +51 -0
- package/dist/models/AdminListAccountDto.d.ts +6 -0
- package/dist/models/AdminListAccountDto.js +4 -0
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +44 -0
- package/src/models/AdminListAccountDto.ts +9 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.389
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @randock/nameshift-api-client@0.0.
|
|
39
|
+
npm install @randock/nameshift-api-client@0.0.389 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -44,4 +44,4 @@ _unPublished (not recommended):_
|
|
|
44
44
|
```
|
|
45
45
|
npm install PATH_TO_GENERATED_PACKAGE --save
|
|
46
46
|
```
|
|
47
|
-
|
|
47
|
+
9cfcf7e3c11df301f0064323d0f147af561239a619c108d6a997ab8baf84c1ab1c01d238524c6854ed255d2cbe9e3edc
|
package/dist/apis/AdminApi.d.ts
CHANGED
|
@@ -170,6 +170,9 @@ export interface AdminApiRemoveDomainLockRequest {
|
|
|
170
170
|
domainId: string;
|
|
171
171
|
lockId: string;
|
|
172
172
|
}
|
|
173
|
+
export interface AdminApiSyncAccountStatsRequest {
|
|
174
|
+
accountId: string;
|
|
175
|
+
}
|
|
173
176
|
export interface AdminApiSyncAllAccountPaymentMethodProfilesRequest {
|
|
174
177
|
accountId: string;
|
|
175
178
|
}
|
|
@@ -527,6 +530,14 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
527
530
|
*
|
|
528
531
|
*/
|
|
529
532
|
removeDomainLock(requestParameters: AdminApiRemoveDomainLockRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
533
|
+
/**
|
|
534
|
+
*
|
|
535
|
+
*/
|
|
536
|
+
syncAccountStatsRaw(requestParameters: AdminApiSyncAccountStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
537
|
+
/**
|
|
538
|
+
*
|
|
539
|
+
*/
|
|
540
|
+
syncAccountStats(requestParameters: AdminApiSyncAccountStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
530
541
|
/**
|
|
531
542
|
*
|
|
532
543
|
*/
|
package/dist/apis/AdminApi.js
CHANGED
|
@@ -2371,6 +2371,57 @@ var AdminApi = /** @class */ (function (_super) {
|
|
|
2371
2371
|
});
|
|
2372
2372
|
});
|
|
2373
2373
|
};
|
|
2374
|
+
/**
|
|
2375
|
+
*
|
|
2376
|
+
*/
|
|
2377
|
+
AdminApi.prototype.syncAccountStatsRaw = function (requestParameters, initOverrides) {
|
|
2378
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2379
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
2380
|
+
return __generator(this, function (_a) {
|
|
2381
|
+
switch (_a.label) {
|
|
2382
|
+
case 0:
|
|
2383
|
+
if (requestParameters['accountId'] == null) {
|
|
2384
|
+
throw new runtime.RequiredError('accountId', 'Required parameter "accountId" was null or undefined when calling syncAccountStats().');
|
|
2385
|
+
}
|
|
2386
|
+
queryParameters = {};
|
|
2387
|
+
headerParameters = {};
|
|
2388
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
2389
|
+
token = this.configuration.accessToken;
|
|
2390
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
2391
|
+
case 1:
|
|
2392
|
+
tokenString = _a.sent();
|
|
2393
|
+
if (tokenString) {
|
|
2394
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
2395
|
+
}
|
|
2396
|
+
_a.label = 2;
|
|
2397
|
+
case 2: return [4 /*yield*/, this.request({
|
|
2398
|
+
path: "/admin/accounts/{accountId}/stats/sync".replace("{".concat("accountId", "}"), encodeURIComponent(String(requestParameters['accountId']))),
|
|
2399
|
+
method: 'POST',
|
|
2400
|
+
headers: headerParameters,
|
|
2401
|
+
query: queryParameters,
|
|
2402
|
+
}, initOverrides)];
|
|
2403
|
+
case 3:
|
|
2404
|
+
response = _a.sent();
|
|
2405
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
2406
|
+
}
|
|
2407
|
+
});
|
|
2408
|
+
});
|
|
2409
|
+
};
|
|
2410
|
+
/**
|
|
2411
|
+
*
|
|
2412
|
+
*/
|
|
2413
|
+
AdminApi.prototype.syncAccountStats = function (requestParameters, initOverrides) {
|
|
2414
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2415
|
+
return __generator(this, function (_a) {
|
|
2416
|
+
switch (_a.label) {
|
|
2417
|
+
case 0: return [4 /*yield*/, this.syncAccountStatsRaw(requestParameters, initOverrides)];
|
|
2418
|
+
case 1:
|
|
2419
|
+
_a.sent();
|
|
2420
|
+
return [2 /*return*/];
|
|
2421
|
+
}
|
|
2422
|
+
});
|
|
2423
|
+
});
|
|
2424
|
+
};
|
|
2374
2425
|
/**
|
|
2375
2426
|
*
|
|
2376
2427
|
*/
|
|
@@ -73,6 +73,12 @@ export interface AdminListAccountDto {
|
|
|
73
73
|
* @memberof AdminListAccountDto
|
|
74
74
|
*/
|
|
75
75
|
companyName: string | null;
|
|
76
|
+
/**
|
|
77
|
+
*
|
|
78
|
+
* @type {boolean}
|
|
79
|
+
* @memberof AdminListAccountDto
|
|
80
|
+
*/
|
|
81
|
+
allowThirdPartySalesDataSharing: boolean;
|
|
76
82
|
/**
|
|
77
83
|
* Challenge reward balance (available and used).
|
|
78
84
|
* @type {ChallengeRewardBalanceDto}
|
|
@@ -67,6 +67,8 @@ function instanceOfAdminListAccountDto(value) {
|
|
|
67
67
|
return false;
|
|
68
68
|
if (!('companyName' in value) || value['companyName'] === undefined)
|
|
69
69
|
return false;
|
|
70
|
+
if (!('allowThirdPartySalesDataSharing' in value) || value['allowThirdPartySalesDataSharing'] === undefined)
|
|
71
|
+
return false;
|
|
70
72
|
if (!('challengeRewardBalance' in value) || value['challengeRewardBalance'] === undefined)
|
|
71
73
|
return false;
|
|
72
74
|
if (!('identifier' in value) || value['identifier'] === undefined)
|
|
@@ -102,6 +104,7 @@ function AdminListAccountDtoFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
102
104
|
'affiliateId': json['affiliateId'],
|
|
103
105
|
'portfolioSize': (0, ListAccountPortfolioSizeDto_1.ListAccountPortfolioSizeDtoFromJSON)(json['portfolioSize']),
|
|
104
106
|
'companyName': json['companyName'],
|
|
107
|
+
'allowThirdPartySalesDataSharing': json['allowThirdPartySalesDataSharing'],
|
|
105
108
|
'challengeRewardBalance': (0, ChallengeRewardBalanceDto_1.ChallengeRewardBalanceDtoFromJSON)(json['challengeRewardBalance']),
|
|
106
109
|
'identifier': json['identifier'],
|
|
107
110
|
'createdAt': (new Date(json['createdAt'])),
|
|
@@ -130,6 +133,7 @@ function AdminListAccountDtoToJSONTyped(value, ignoreDiscriminator) {
|
|
|
130
133
|
'affiliateId': value['affiliateId'],
|
|
131
134
|
'portfolioSize': (0, ListAccountPortfolioSizeDto_1.ListAccountPortfolioSizeDtoToJSON)(value['portfolioSize']),
|
|
132
135
|
'companyName': value['companyName'],
|
|
136
|
+
'allowThirdPartySalesDataSharing': value['allowThirdPartySalesDataSharing'],
|
|
133
137
|
'challengeRewardBalance': (0, ChallengeRewardBalanceDto_1.ChallengeRewardBalanceDtoToJSON)(value['challengeRewardBalance']),
|
|
134
138
|
'identifier': value['identifier'],
|
|
135
139
|
'createdAt': ((value['createdAt']).toISOString()),
|
package/package.json
CHANGED
package/src/apis/AdminApi.ts
CHANGED
|
@@ -341,6 +341,10 @@ export interface AdminApiRemoveDomainLockRequest {
|
|
|
341
341
|
lockId: string;
|
|
342
342
|
}
|
|
343
343
|
|
|
344
|
+
export interface AdminApiSyncAccountStatsRequest {
|
|
345
|
+
accountId: string;
|
|
346
|
+
}
|
|
347
|
+
|
|
344
348
|
export interface AdminApiSyncAllAccountPaymentMethodProfilesRequest {
|
|
345
349
|
accountId: string;
|
|
346
350
|
}
|
|
@@ -2205,6 +2209,46 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
2205
2209
|
await this.removeDomainLockRaw(requestParameters, initOverrides);
|
|
2206
2210
|
}
|
|
2207
2211
|
|
|
2212
|
+
/**
|
|
2213
|
+
*
|
|
2214
|
+
*/
|
|
2215
|
+
async syncAccountStatsRaw(requestParameters: AdminApiSyncAccountStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
2216
|
+
if (requestParameters['accountId'] == null) {
|
|
2217
|
+
throw new runtime.RequiredError(
|
|
2218
|
+
'accountId',
|
|
2219
|
+
'Required parameter "accountId" was null or undefined when calling syncAccountStats().'
|
|
2220
|
+
);
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
const queryParameters: any = {};
|
|
2224
|
+
|
|
2225
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
2226
|
+
|
|
2227
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
2228
|
+
const token = this.configuration.accessToken;
|
|
2229
|
+
const tokenString = await token("bearer", []);
|
|
2230
|
+
|
|
2231
|
+
if (tokenString) {
|
|
2232
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
2233
|
+
}
|
|
2234
|
+
}
|
|
2235
|
+
const response = await this.request({
|
|
2236
|
+
path: `/admin/accounts/{accountId}/stats/sync`.replace(`{${"accountId"}}`, encodeURIComponent(String(requestParameters['accountId']))),
|
|
2237
|
+
method: 'POST',
|
|
2238
|
+
headers: headerParameters,
|
|
2239
|
+
query: queryParameters,
|
|
2240
|
+
}, initOverrides);
|
|
2241
|
+
|
|
2242
|
+
return new runtime.VoidApiResponse(response);
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
/**
|
|
2246
|
+
*
|
|
2247
|
+
*/
|
|
2248
|
+
async syncAccountStats(requestParameters: AdminApiSyncAccountStatsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
2249
|
+
await this.syncAccountStatsRaw(requestParameters, initOverrides);
|
|
2250
|
+
}
|
|
2251
|
+
|
|
2208
2252
|
/**
|
|
2209
2253
|
*
|
|
2210
2254
|
*/
|
|
@@ -102,6 +102,12 @@ export interface AdminListAccountDto {
|
|
|
102
102
|
* @memberof AdminListAccountDto
|
|
103
103
|
*/
|
|
104
104
|
companyName: string | null;
|
|
105
|
+
/**
|
|
106
|
+
*
|
|
107
|
+
* @type {boolean}
|
|
108
|
+
* @memberof AdminListAccountDto
|
|
109
|
+
*/
|
|
110
|
+
allowThirdPartySalesDataSharing: boolean;
|
|
105
111
|
/**
|
|
106
112
|
* Challenge reward balance (available and used).
|
|
107
113
|
* @type {ChallengeRewardBalanceDto}
|
|
@@ -195,6 +201,7 @@ export function instanceOfAdminListAccountDto(value: object): value is AdminList
|
|
|
195
201
|
if (!('affiliateId' in value) || value['affiliateId'] === undefined) return false;
|
|
196
202
|
if (!('portfolioSize' in value) || value['portfolioSize'] === undefined) return false;
|
|
197
203
|
if (!('companyName' in value) || value['companyName'] === undefined) return false;
|
|
204
|
+
if (!('allowThirdPartySalesDataSharing' in value) || value['allowThirdPartySalesDataSharing'] === undefined) return false;
|
|
198
205
|
if (!('challengeRewardBalance' in value) || value['challengeRewardBalance'] === undefined) return false;
|
|
199
206
|
if (!('identifier' in value) || value['identifier'] === undefined) return false;
|
|
200
207
|
if (!('createdAt' in value) || value['createdAt'] === undefined) return false;
|
|
@@ -225,6 +232,7 @@ export function AdminListAccountDtoFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
225
232
|
'affiliateId': json['affiliateId'],
|
|
226
233
|
'portfolioSize': ListAccountPortfolioSizeDtoFromJSON(json['portfolioSize']),
|
|
227
234
|
'companyName': json['companyName'],
|
|
235
|
+
'allowThirdPartySalesDataSharing': json['allowThirdPartySalesDataSharing'],
|
|
228
236
|
'challengeRewardBalance': ChallengeRewardBalanceDtoFromJSON(json['challengeRewardBalance']),
|
|
229
237
|
'identifier': json['identifier'],
|
|
230
238
|
'createdAt': (new Date(json['createdAt'])),
|
|
@@ -256,6 +264,7 @@ export function AdminListAccountDtoToJSONTyped(value?: AdminListAccountDto | nul
|
|
|
256
264
|
'affiliateId': value['affiliateId'],
|
|
257
265
|
'portfolioSize': ListAccountPortfolioSizeDtoToJSON(value['portfolioSize']),
|
|
258
266
|
'companyName': value['companyName'],
|
|
267
|
+
'allowThirdPartySalesDataSharing': value['allowThirdPartySalesDataSharing'],
|
|
259
268
|
'challengeRewardBalance': ChallengeRewardBalanceDtoToJSON(value['challengeRewardBalance']),
|
|
260
269
|
'identifier': value['identifier'],
|
|
261
270
|
'createdAt': ((value['createdAt']).toISOString()),
|