@randock/nameshift-api-client 0.0.271 → 0.0.272
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 +15 -0
- package/dist/apis/AdminApi.js +80 -0
- package/package.json +1 -1
- package/src/apis/AdminApi.ts +97 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @randock/nameshift-api-client@0.0.
|
|
1
|
+
## @randock/nameshift-api-client@0.0.272
|
|
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.272 --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
|
+
a7a8e13d3805720e94d525f50d6286328615f8e30144a217dd2de8ab0875a2caa2a91c34cbe8f27085baf58b62c669cb
|
package/dist/apis/AdminApi.d.ts
CHANGED
|
@@ -86,6 +86,13 @@ export interface AdminApiListDomainsRequest {
|
|
|
86
86
|
limit?: number;
|
|
87
87
|
sortBy?: Array<string>;
|
|
88
88
|
}
|
|
89
|
+
export interface AdminApiListLedgerMutationsRequest {
|
|
90
|
+
startDate: Date;
|
|
91
|
+
endDate: Date;
|
|
92
|
+
ledgerId: string;
|
|
93
|
+
page: number;
|
|
94
|
+
limit: number;
|
|
95
|
+
}
|
|
89
96
|
export interface AdminApiLoginAsRequest {
|
|
90
97
|
accountId: string;
|
|
91
98
|
}
|
|
@@ -249,6 +256,14 @@ export declare class AdminApi extends runtime.BaseAPI {
|
|
|
249
256
|
*
|
|
250
257
|
*/
|
|
251
258
|
listDomains(requestParameters?: AdminApiListDomainsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDomains200Response>;
|
|
259
|
+
/**
|
|
260
|
+
*
|
|
261
|
+
*/
|
|
262
|
+
listLedgerMutationsRaw(requestParameters: AdminApiListLedgerMutationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>>;
|
|
263
|
+
/**
|
|
264
|
+
*
|
|
265
|
+
*/
|
|
266
|
+
listLedgerMutations(requestParameters: AdminApiListLedgerMutationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object>;
|
|
252
267
|
/**
|
|
253
268
|
*
|
|
254
269
|
*/
|
package/dist/apis/AdminApi.js
CHANGED
|
@@ -1018,6 +1018,86 @@ var AdminApi = /** @class */ (function (_super) {
|
|
|
1018
1018
|
});
|
|
1019
1019
|
});
|
|
1020
1020
|
};
|
|
1021
|
+
/**
|
|
1022
|
+
*
|
|
1023
|
+
*/
|
|
1024
|
+
AdminApi.prototype.listLedgerMutationsRaw = function (requestParameters, initOverrides) {
|
|
1025
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1026
|
+
var queryParameters, headerParameters, token, tokenString, response;
|
|
1027
|
+
return __generator(this, function (_a) {
|
|
1028
|
+
switch (_a.label) {
|
|
1029
|
+
case 0:
|
|
1030
|
+
if (requestParameters['startDate'] == null) {
|
|
1031
|
+
throw new runtime.RequiredError('startDate', 'Required parameter "startDate" was null or undefined when calling listLedgerMutations().');
|
|
1032
|
+
}
|
|
1033
|
+
if (requestParameters['endDate'] == null) {
|
|
1034
|
+
throw new runtime.RequiredError('endDate', 'Required parameter "endDate" was null or undefined when calling listLedgerMutations().');
|
|
1035
|
+
}
|
|
1036
|
+
if (requestParameters['ledgerId'] == null) {
|
|
1037
|
+
throw new runtime.RequiredError('ledgerId', 'Required parameter "ledgerId" was null or undefined when calling listLedgerMutations().');
|
|
1038
|
+
}
|
|
1039
|
+
if (requestParameters['page'] == null) {
|
|
1040
|
+
throw new runtime.RequiredError('page', 'Required parameter "page" was null or undefined when calling listLedgerMutations().');
|
|
1041
|
+
}
|
|
1042
|
+
if (requestParameters['limit'] == null) {
|
|
1043
|
+
throw new runtime.RequiredError('limit', 'Required parameter "limit" was null or undefined when calling listLedgerMutations().');
|
|
1044
|
+
}
|
|
1045
|
+
queryParameters = {};
|
|
1046
|
+
if (requestParameters['startDate'] != null) {
|
|
1047
|
+
queryParameters['startDate'] = requestParameters['startDate'].toISOString();
|
|
1048
|
+
}
|
|
1049
|
+
if (requestParameters['endDate'] != null) {
|
|
1050
|
+
queryParameters['endDate'] = requestParameters['endDate'].toISOString();
|
|
1051
|
+
}
|
|
1052
|
+
if (requestParameters['ledgerId'] != null) {
|
|
1053
|
+
queryParameters['ledgerId'] = requestParameters['ledgerId'];
|
|
1054
|
+
}
|
|
1055
|
+
if (requestParameters['page'] != null) {
|
|
1056
|
+
queryParameters['page'] = requestParameters['page'];
|
|
1057
|
+
}
|
|
1058
|
+
if (requestParameters['limit'] != null) {
|
|
1059
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
1060
|
+
}
|
|
1061
|
+
headerParameters = {};
|
|
1062
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
1063
|
+
token = this.configuration.accessToken;
|
|
1064
|
+
return [4 /*yield*/, token("bearer", [])];
|
|
1065
|
+
case 1:
|
|
1066
|
+
tokenString = _a.sent();
|
|
1067
|
+
if (tokenString) {
|
|
1068
|
+
headerParameters["Authorization"] = "Bearer ".concat(tokenString);
|
|
1069
|
+
}
|
|
1070
|
+
_a.label = 2;
|
|
1071
|
+
case 2: return [4 /*yield*/, this.request({
|
|
1072
|
+
path: "/admin/stats/ledger-mutations",
|
|
1073
|
+
method: 'GET',
|
|
1074
|
+
headers: headerParameters,
|
|
1075
|
+
query: queryParameters,
|
|
1076
|
+
}, initOverrides)];
|
|
1077
|
+
case 3:
|
|
1078
|
+
response = _a.sent();
|
|
1079
|
+
return [2 /*return*/, new runtime.JSONApiResponse(response)];
|
|
1080
|
+
}
|
|
1081
|
+
});
|
|
1082
|
+
});
|
|
1083
|
+
};
|
|
1084
|
+
/**
|
|
1085
|
+
*
|
|
1086
|
+
*/
|
|
1087
|
+
AdminApi.prototype.listLedgerMutations = function (requestParameters, initOverrides) {
|
|
1088
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1089
|
+
var response;
|
|
1090
|
+
return __generator(this, function (_a) {
|
|
1091
|
+
switch (_a.label) {
|
|
1092
|
+
case 0: return [4 /*yield*/, this.listLedgerMutationsRaw(requestParameters, initOverrides)];
|
|
1093
|
+
case 1:
|
|
1094
|
+
response = _a.sent();
|
|
1095
|
+
return [4 /*yield*/, response.value()];
|
|
1096
|
+
case 2: return [2 /*return*/, _a.sent()];
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
});
|
|
1100
|
+
};
|
|
1021
1101
|
/**
|
|
1022
1102
|
*
|
|
1023
1103
|
*/
|
package/package.json
CHANGED
package/src/apis/AdminApi.ts
CHANGED
|
@@ -179,6 +179,14 @@ export interface AdminApiListDomainsRequest {
|
|
|
179
179
|
sortBy?: Array<string>;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
|
+
export interface AdminApiListLedgerMutationsRequest {
|
|
183
|
+
startDate: Date;
|
|
184
|
+
endDate: Date;
|
|
185
|
+
ledgerId: string;
|
|
186
|
+
page: number;
|
|
187
|
+
limit: number;
|
|
188
|
+
}
|
|
189
|
+
|
|
182
190
|
export interface AdminApiLoginAsRequest {
|
|
183
191
|
accountId: string;
|
|
184
192
|
}
|
|
@@ -985,6 +993,95 @@ export class AdminApi extends runtime.BaseAPI {
|
|
|
985
993
|
return await response.value();
|
|
986
994
|
}
|
|
987
995
|
|
|
996
|
+
/**
|
|
997
|
+
*
|
|
998
|
+
*/
|
|
999
|
+
async listLedgerMutationsRaw(requestParameters: AdminApiListLedgerMutationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
|
1000
|
+
if (requestParameters['startDate'] == null) {
|
|
1001
|
+
throw new runtime.RequiredError(
|
|
1002
|
+
'startDate',
|
|
1003
|
+
'Required parameter "startDate" was null or undefined when calling listLedgerMutations().'
|
|
1004
|
+
);
|
|
1005
|
+
}
|
|
1006
|
+
|
|
1007
|
+
if (requestParameters['endDate'] == null) {
|
|
1008
|
+
throw new runtime.RequiredError(
|
|
1009
|
+
'endDate',
|
|
1010
|
+
'Required parameter "endDate" was null or undefined when calling listLedgerMutations().'
|
|
1011
|
+
);
|
|
1012
|
+
}
|
|
1013
|
+
|
|
1014
|
+
if (requestParameters['ledgerId'] == null) {
|
|
1015
|
+
throw new runtime.RequiredError(
|
|
1016
|
+
'ledgerId',
|
|
1017
|
+
'Required parameter "ledgerId" was null or undefined when calling listLedgerMutations().'
|
|
1018
|
+
);
|
|
1019
|
+
}
|
|
1020
|
+
|
|
1021
|
+
if (requestParameters['page'] == null) {
|
|
1022
|
+
throw new runtime.RequiredError(
|
|
1023
|
+
'page',
|
|
1024
|
+
'Required parameter "page" was null or undefined when calling listLedgerMutations().'
|
|
1025
|
+
);
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
if (requestParameters['limit'] == null) {
|
|
1029
|
+
throw new runtime.RequiredError(
|
|
1030
|
+
'limit',
|
|
1031
|
+
'Required parameter "limit" was null or undefined when calling listLedgerMutations().'
|
|
1032
|
+
);
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
const queryParameters: any = {};
|
|
1036
|
+
|
|
1037
|
+
if (requestParameters['startDate'] != null) {
|
|
1038
|
+
queryParameters['startDate'] = (requestParameters['startDate'] as any).toISOString();
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
if (requestParameters['endDate'] != null) {
|
|
1042
|
+
queryParameters['endDate'] = (requestParameters['endDate'] as any).toISOString();
|
|
1043
|
+
}
|
|
1044
|
+
|
|
1045
|
+
if (requestParameters['ledgerId'] != null) {
|
|
1046
|
+
queryParameters['ledgerId'] = requestParameters['ledgerId'];
|
|
1047
|
+
}
|
|
1048
|
+
|
|
1049
|
+
if (requestParameters['page'] != null) {
|
|
1050
|
+
queryParameters['page'] = requestParameters['page'];
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
if (requestParameters['limit'] != null) {
|
|
1054
|
+
queryParameters['limit'] = requestParameters['limit'];
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1058
|
+
|
|
1059
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
1060
|
+
const token = this.configuration.accessToken;
|
|
1061
|
+
const tokenString = await token("bearer", []);
|
|
1062
|
+
|
|
1063
|
+
if (tokenString) {
|
|
1064
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
const response = await this.request({
|
|
1068
|
+
path: `/admin/stats/ledger-mutations`,
|
|
1069
|
+
method: 'GET',
|
|
1070
|
+
headers: headerParameters,
|
|
1071
|
+
query: queryParameters,
|
|
1072
|
+
}, initOverrides);
|
|
1073
|
+
|
|
1074
|
+
return new runtime.JSONApiResponse<any>(response);
|
|
1075
|
+
}
|
|
1076
|
+
|
|
1077
|
+
/**
|
|
1078
|
+
*
|
|
1079
|
+
*/
|
|
1080
|
+
async listLedgerMutations(requestParameters: AdminApiListLedgerMutationsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
|
1081
|
+
const response = await this.listLedgerMutationsRaw(requestParameters, initOverrides);
|
|
1082
|
+
return await response.value();
|
|
1083
|
+
}
|
|
1084
|
+
|
|
988
1085
|
/**
|
|
989
1086
|
*
|
|
990
1087
|
*/
|