@triveria/admin 0.0.162 → 0.0.165

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/api.d.ts CHANGED
@@ -13,65 +13,26 @@ import type { Configuration } from './configuration';
13
13
  import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  import type { RequestArgs } from './base';
15
15
  import { BaseAPI } from './base';
16
- /**
17
- *
18
- * @export
19
- * @enum {string}
20
- */
21
16
  export declare const AdminRole: {
22
- readonly UserManager: "User Manager";
23
- readonly WalletManager: "Wallet Manager";
17
+ readonly WalletAdminManagerWallet: "wallet:admin:manager:wallet";
18
+ readonly WalletAdminManagerUser: "wallet:admin:manager:user";
24
19
  };
25
20
  export type AdminRole = typeof AdminRole[keyof typeof AdminRole];
26
21
  /**
27
22
  * Application to access Wallet API
28
- * @export
29
- * @interface Application
30
23
  */
31
24
  export interface Application {
32
- /**
33
- *
34
- * @type {string}
35
- * @memberof Application
36
- */
37
25
  'name': string;
38
- /**
39
- *
40
- * @type {string}
41
- * @memberof Application
42
- */
43
26
  'id': string;
44
- /**
45
- *
46
- * @type {string}
47
- * @memberof Application
48
- */
49
27
  'secret'?: string;
50
28
  }
51
- /**
52
- *
53
- * @export
54
- * @interface ApplicationCreateRequest
55
- */
56
29
  export interface ApplicationCreateRequest {
57
- /**
58
- *
59
- * @type {string}
60
- * @memberof ApplicationCreateRequest
61
- */
62
30
  'name': string;
63
31
  }
64
32
  /**
65
33
  * Health status of the system
66
- * @export
67
- * @interface HealthStatus
68
34
  */
69
35
  export interface HealthStatus {
70
- /**
71
- *
72
- * @type {string}
73
- * @memberof HealthStatus
74
- */
75
36
  'status': HealthStatusStatusEnum;
76
37
  }
77
38
  export declare const HealthStatusStatusEnum: {
@@ -82,119 +43,46 @@ export declare const HealthStatusStatusEnum: {
82
43
  export type HealthStatusStatusEnum = typeof HealthStatusStatusEnum[keyof typeof HealthStatusStatusEnum];
83
44
  /**
84
45
  * Common error message
85
- * @export
86
- * @interface ModelError
87
46
  */
88
47
  export interface ModelError {
89
- /**
90
- *
91
- * @type {string}
92
- * @memberof ModelError
93
- */
94
48
  'Message': string;
95
49
  }
96
50
  /**
97
51
  * Owner details
98
- * @export
99
- * @interface Owner
100
52
  */
101
53
  export interface Owner {
102
- /**
103
- *
104
- * @type {string}
105
- * @memberof Owner
106
- */
107
54
  'id': string;
108
- /**
109
- *
110
- * @type {string}
111
- * @memberof Owner
112
- */
113
55
  'tenantId': string;
114
- /**
115
- *
116
- * @type {string}
117
- * @memberof Owner
118
- */
119
56
  'email'?: string;
120
- /**
121
- *
122
- * @type {string}
123
- * @memberof Owner
124
- */
125
57
  'name'?: string;
126
- /**
127
- *
128
- * @type {string}
129
- * @memberof Owner
130
- */
131
58
  'created'?: string;
132
- /**
133
- *
134
- * @type {string}
135
- * @memberof Owner
136
- */
137
59
  'updated'?: string;
138
- /**
139
- *
140
- * @type {string}
141
- * @memberof Owner
142
- */
143
60
  'lastLogin'?: string;
144
- /**
145
- *
146
- * @type {Array<AdminRole>}
147
- * @memberof Owner
148
- */
149
61
  'adminRoles'?: Array<AdminRole>;
150
62
  }
151
63
  /**
152
64
  * Owner patch payload
153
- * @export
154
- * @interface OwnerPatchPayload
155
65
  */
156
66
  export interface OwnerPatchPayload {
157
- /**
158
- *
159
- * @type {string}
160
- * @memberof OwnerPatchPayload
161
- */
162
67
  'tenantId'?: string;
163
68
  /**
164
69
  * Admin Roles delimited by the comma character
165
- * @type {string}
166
- * @memberof OwnerPatchPayload
167
70
  */
168
71
  'adminRoles'?: string;
169
72
  }
170
73
  /**
171
74
  * Owner details including M2M apps list
172
- * @export
173
- * @interface OwnerWithExtras
174
75
  */
175
76
  export interface OwnerWithExtras {
176
- /**
177
- *
178
- * @type {Owner}
179
- * @memberof OwnerWithExtras
180
- */
181
77
  'owner': Owner;
182
- /**
183
- *
184
- * @type {Array<Application>}
185
- * @memberof OwnerWithExtras
186
- */
187
78
  'apps'?: Array<Application>;
188
79
  /**
189
80
  * Owner user management URL
190
- * @type {string}
191
- * @memberof OwnerWithExtras
192
81
  */
193
82
  'url': string;
194
83
  }
195
84
  /**
196
85
  * DefaultApi - axios parameter creator
197
- * @export
198
86
  */
199
87
  export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration) => {
200
88
  /**
@@ -260,7 +148,6 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
260
148
  };
261
149
  /**
262
150
  * DefaultApi - functional programming interface
263
- * @export
264
151
  */
265
152
  export declare const DefaultApiFp: (configuration?: Configuration) => {
266
153
  /**
@@ -326,7 +213,6 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
326
213
  };
327
214
  /**
328
215
  * DefaultApi - factory interface
329
- * @export
330
216
  */
331
217
  export declare const DefaultApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
332
218
  /**
@@ -392,9 +278,6 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
392
278
  };
393
279
  /**
394
280
  * DefaultApi - object-oriented interface
395
- * @export
396
- * @class DefaultApi
397
- * @extends {BaseAPI}
398
281
  */
399
282
  export declare class DefaultApi extends BaseAPI {
400
283
  /**
@@ -402,7 +285,6 @@ export declare class DefaultApi extends BaseAPI {
402
285
  * @param {ApplicationCreateRequest} [applicationCreateRequest]
403
286
  * @param {*} [options] Override http request option.
404
287
  * @throws {RequiredError}
405
- * @memberof DefaultApi
406
288
  */
407
289
  applicationCreate(applicationCreateRequest?: ApplicationCreateRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Application, any>>;
408
290
  /**
@@ -410,7 +292,6 @@ export declare class DefaultApi extends BaseAPI {
410
292
  * @param {string} applicationId Application ID
411
293
  * @param {*} [options] Override http request option.
412
294
  * @throws {RequiredError}
413
- * @memberof DefaultApi
414
295
  */
415
296
  applicationDelete(applicationId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
416
297
  /**
@@ -418,28 +299,24 @@ export declare class DefaultApi extends BaseAPI {
418
299
  * @param {string} applicationId Application ID
419
300
  * @param {*} [options] Override http request option.
420
301
  * @throws {RequiredError}
421
- * @memberof DefaultApi
422
302
  */
423
303
  applicationGet(applicationId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Application, any>>;
424
304
  /**
425
305
  * Lists applications / clients for the authenticated user
426
306
  * @param {*} [options] Override http request option.
427
307
  * @throws {RequiredError}
428
- * @memberof DefaultApi
429
308
  */
430
309
  applicationList(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Application[], any>>;
431
310
  /**
432
311
  *
433
312
  * @param {*} [options] Override http request option.
434
313
  * @throws {RequiredError}
435
- * @memberof DefaultApi
436
314
  */
437
315
  healthCheck(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<HealthStatus, any>>;
438
316
  /**
439
317
  *
440
318
  * @param {*} [options] Override http request option.
441
319
  * @throws {RequiredError}
442
- * @memberof DefaultApi
443
320
  */
444
321
  ownerGet(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Owner, any>>;
445
322
  /**
@@ -447,7 +324,6 @@ export declare class DefaultApi extends BaseAPI {
447
324
  * @param {string} ownerId
448
325
  * @param {*} [options] Override http request option.
449
326
  * @throws {RequiredError}
450
- * @memberof DefaultApi
451
327
  */
452
328
  ownerGetById(ownerId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<OwnerWithExtras, any>>;
453
329
  /**
@@ -456,14 +332,12 @@ export declare class DefaultApi extends BaseAPI {
456
332
  * @param {OwnerPatchPayload} [ownerPatchPayload]
457
333
  * @param {*} [options] Override http request option.
458
334
  * @throws {RequiredError}
459
- * @memberof DefaultApi
460
335
  */
461
336
  ownerUpdate(ownerId: string, ownerPatchPayload?: OwnerPatchPayload, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any>>;
462
337
  /**
463
338
  * Retrieves owners
464
339
  * @param {*} [options] Override http request option.
465
340
  * @throws {RequiredError}
466
- * @memberof DefaultApi
467
341
  */
468
342
  ownersList(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Owner[], any>>;
469
343
  }
package/api.js CHANGED
@@ -32,23 +32,17 @@ const axios_1 = __importDefault(require("axios"));
32
32
  const common_1 = require("./common");
33
33
  // @ts-ignore
34
34
  const base_1 = require("./base");
35
- /**
36
- *
37
- * @export
38
- * @enum {string}
39
- */
40
35
  exports.AdminRole = {
41
- UserManager: 'User Manager',
42
- WalletManager: 'Wallet Manager'
36
+ WalletAdminManagerWallet: 'wallet:admin:manager:wallet',
37
+ WalletAdminManagerUser: 'wallet:admin:manager:user',
43
38
  };
44
39
  exports.HealthStatusStatusEnum = {
45
40
  Ok: 'ok',
46
41
  Limited: 'limited',
47
- Critical: 'critical'
42
+ Critical: 'critical',
48
43
  };
49
44
  /**
50
45
  * DefaultApi - axios parameter creator
51
- * @export
52
46
  */
53
47
  const DefaultApiAxiosParamCreator = function (configuration) {
54
48
  return {
@@ -73,6 +67,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
73
67
  // http bearer authentication required
74
68
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
75
69
  localVarHeaderParameter['Content-Type'] = 'application/json';
70
+ localVarHeaderParameter['Accept'] = 'application/json';
76
71
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
77
72
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
78
73
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -92,7 +87,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
92
87
  // verify required parameter 'applicationId' is not null or undefined
93
88
  (0, common_1.assertParamExists)('applicationDelete', 'applicationId', applicationId);
94
89
  const localVarPath = `/applications/{application_id}`
95
- .replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId)));
90
+ .replace('{application_id}', encodeURIComponent(String(applicationId)));
96
91
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
97
92
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
98
93
  let baseOptions;
@@ -105,6 +100,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
105
100
  // authentication accessToken required
106
101
  // http bearer authentication required
107
102
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
103
+ localVarHeaderParameter['Accept'] = 'application/json';
108
104
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
109
105
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
110
106
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -123,7 +119,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
123
119
  // verify required parameter 'applicationId' is not null or undefined
124
120
  (0, common_1.assertParamExists)('applicationGet', 'applicationId', applicationId);
125
121
  const localVarPath = `/applications/{application_id}`
126
- .replace(`{${"application_id"}}`, encodeURIComponent(String(applicationId)));
122
+ .replace('{application_id}', encodeURIComponent(String(applicationId)));
127
123
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
128
124
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
129
125
  let baseOptions;
@@ -136,6 +132,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
136
132
  // authentication accessToken required
137
133
  // http bearer authentication required
138
134
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
135
+ localVarHeaderParameter['Accept'] = 'application/json';
139
136
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
140
137
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
141
138
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -163,6 +160,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
163
160
  // authentication accessToken required
164
161
  // http bearer authentication required
165
162
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
163
+ localVarHeaderParameter['Accept'] = 'application/json';
166
164
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
167
165
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
168
166
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -187,6 +185,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
187
185
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
188
186
  const localVarHeaderParameter = {};
189
187
  const localVarQueryParameter = {};
188
+ localVarHeaderParameter['Accept'] = 'application/json';
190
189
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
191
190
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
192
191
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -214,6 +213,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
214
213
  // authentication accessToken required
215
214
  // http bearer authentication required
216
215
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
216
+ localVarHeaderParameter['Accept'] = 'application/json';
217
217
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
218
218
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
219
219
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -232,7 +232,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
232
232
  // verify required parameter 'ownerId' is not null or undefined
233
233
  (0, common_1.assertParamExists)('ownerGetById', 'ownerId', ownerId);
234
234
  const localVarPath = `/admin/owners/{owner_id}`
235
- .replace(`{${"owner_id"}}`, encodeURIComponent(String(ownerId)));
235
+ .replace('{owner_id}', encodeURIComponent(String(ownerId)));
236
236
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
237
237
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
238
238
  let baseOptions;
@@ -245,6 +245,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
245
245
  // authentication accessToken required
246
246
  // http bearer authentication required
247
247
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
248
+ localVarHeaderParameter['Accept'] = 'application/json';
248
249
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
249
250
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
250
251
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -264,7 +265,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
264
265
  // verify required parameter 'ownerId' is not null or undefined
265
266
  (0, common_1.assertParamExists)('ownerUpdate', 'ownerId', ownerId);
266
267
  const localVarPath = `/admin/owners/{owner_id}`
267
- .replace(`{${"owner_id"}}`, encodeURIComponent(String(ownerId)));
268
+ .replace('{owner_id}', encodeURIComponent(String(ownerId)));
268
269
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
269
270
  const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
270
271
  let baseOptions;
@@ -278,6 +279,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
278
279
  // http bearer authentication required
279
280
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
280
281
  localVarHeaderParameter['Content-Type'] = 'application/json';
282
+ localVarHeaderParameter['Accept'] = 'application/json';
281
283
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
282
284
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
283
285
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -306,6 +308,7 @@ const DefaultApiAxiosParamCreator = function (configuration) {
306
308
  // authentication accessToken required
307
309
  // http bearer authentication required
308
310
  yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
311
+ localVarHeaderParameter['Accept'] = 'application/json';
309
312
  (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
310
313
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
311
314
  localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
@@ -319,7 +322,6 @@ const DefaultApiAxiosParamCreator = function (configuration) {
319
322
  exports.DefaultApiAxiosParamCreator = DefaultApiAxiosParamCreator;
320
323
  /**
321
324
  * DefaultApi - functional programming interface
322
- * @export
323
325
  */
324
326
  const DefaultApiFp = function (configuration) {
325
327
  const localVarAxiosParamCreator = (0, exports.DefaultApiAxiosParamCreator)(configuration);
@@ -461,7 +463,6 @@ const DefaultApiFp = function (configuration) {
461
463
  exports.DefaultApiFp = DefaultApiFp;
462
464
  /**
463
465
  * DefaultApi - factory interface
464
- * @export
465
466
  */
466
467
  const DefaultApiFactory = function (configuration, basePath, axios) {
467
468
  const localVarFp = (0, exports.DefaultApiFp)(configuration);
@@ -549,9 +550,6 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
549
550
  exports.DefaultApiFactory = DefaultApiFactory;
550
551
  /**
551
552
  * DefaultApi - object-oriented interface
552
- * @export
553
- * @class DefaultApi
554
- * @extends {BaseAPI}
555
553
  */
556
554
  class DefaultApi extends base_1.BaseAPI {
557
555
  /**
@@ -559,7 +557,6 @@ class DefaultApi extends base_1.BaseAPI {
559
557
  * @param {ApplicationCreateRequest} [applicationCreateRequest]
560
558
  * @param {*} [options] Override http request option.
561
559
  * @throws {RequiredError}
562
- * @memberof DefaultApi
563
560
  */
564
561
  applicationCreate(applicationCreateRequest, options) {
565
562
  return (0, exports.DefaultApiFp)(this.configuration).applicationCreate(applicationCreateRequest, options).then((request) => request(this.axios, this.basePath));
@@ -569,7 +566,6 @@ class DefaultApi extends base_1.BaseAPI {
569
566
  * @param {string} applicationId Application ID
570
567
  * @param {*} [options] Override http request option.
571
568
  * @throws {RequiredError}
572
- * @memberof DefaultApi
573
569
  */
574
570
  applicationDelete(applicationId, options) {
575
571
  return (0, exports.DefaultApiFp)(this.configuration).applicationDelete(applicationId, options).then((request) => request(this.axios, this.basePath));
@@ -579,7 +575,6 @@ class DefaultApi extends base_1.BaseAPI {
579
575
  * @param {string} applicationId Application ID
580
576
  * @param {*} [options] Override http request option.
581
577
  * @throws {RequiredError}
582
- * @memberof DefaultApi
583
578
  */
584
579
  applicationGet(applicationId, options) {
585
580
  return (0, exports.DefaultApiFp)(this.configuration).applicationGet(applicationId, options).then((request) => request(this.axios, this.basePath));
@@ -588,7 +583,6 @@ class DefaultApi extends base_1.BaseAPI {
588
583
  * Lists applications / clients for the authenticated user
589
584
  * @param {*} [options] Override http request option.
590
585
  * @throws {RequiredError}
591
- * @memberof DefaultApi
592
586
  */
593
587
  applicationList(options) {
594
588
  return (0, exports.DefaultApiFp)(this.configuration).applicationList(options).then((request) => request(this.axios, this.basePath));
@@ -597,7 +591,6 @@ class DefaultApi extends base_1.BaseAPI {
597
591
  *
598
592
  * @param {*} [options] Override http request option.
599
593
  * @throws {RequiredError}
600
- * @memberof DefaultApi
601
594
  */
602
595
  healthCheck(options) {
603
596
  return (0, exports.DefaultApiFp)(this.configuration).healthCheck(options).then((request) => request(this.axios, this.basePath));
@@ -606,7 +599,6 @@ class DefaultApi extends base_1.BaseAPI {
606
599
  *
607
600
  * @param {*} [options] Override http request option.
608
601
  * @throws {RequiredError}
609
- * @memberof DefaultApi
610
602
  */
611
603
  ownerGet(options) {
612
604
  return (0, exports.DefaultApiFp)(this.configuration).ownerGet(options).then((request) => request(this.axios, this.basePath));
@@ -616,7 +608,6 @@ class DefaultApi extends base_1.BaseAPI {
616
608
  * @param {string} ownerId
617
609
  * @param {*} [options] Override http request option.
618
610
  * @throws {RequiredError}
619
- * @memberof DefaultApi
620
611
  */
621
612
  ownerGetById(ownerId, options) {
622
613
  return (0, exports.DefaultApiFp)(this.configuration).ownerGetById(ownerId, options).then((request) => request(this.axios, this.basePath));
@@ -627,7 +618,6 @@ class DefaultApi extends base_1.BaseAPI {
627
618
  * @param {OwnerPatchPayload} [ownerPatchPayload]
628
619
  * @param {*} [options] Override http request option.
629
620
  * @throws {RequiredError}
630
- * @memberof DefaultApi
631
621
  */
632
622
  ownerUpdate(ownerId, ownerPatchPayload, options) {
633
623
  return (0, exports.DefaultApiFp)(this.configuration).ownerUpdate(ownerId, ownerPatchPayload, options).then((request) => request(this.axios, this.basePath));
@@ -636,7 +626,6 @@ class DefaultApi extends base_1.BaseAPI {
636
626
  * Retrieves owners
637
627
  * @param {*} [options] Override http request option.
638
628
  * @throws {RequiredError}
639
- * @memberof DefaultApi
640
629
  */
641
630
  ownersList(options) {
642
631
  return (0, exports.DefaultApiFp)(this.configuration).ownersList(options).then((request) => request(this.axios, this.basePath));
package/base.d.ts CHANGED
@@ -12,42 +12,22 @@
12
12
  import type { Configuration } from './configuration';
13
13
  import type { AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
14
  export declare const BASE_PATH: string;
15
- /**
16
- *
17
- * @export
18
- */
19
15
  export declare const COLLECTION_FORMATS: {
20
16
  csv: string;
21
17
  ssv: string;
22
18
  tsv: string;
23
19
  pipes: string;
24
20
  };
25
- /**
26
- *
27
- * @export
28
- * @interface RequestArgs
29
- */
30
21
  export interface RequestArgs {
31
22
  url: string;
32
23
  options: RawAxiosRequestConfig;
33
24
  }
34
- /**
35
- *
36
- * @export
37
- * @class BaseAPI
38
- */
39
25
  export declare class BaseAPI {
40
26
  protected basePath: string;
41
27
  protected axios: AxiosInstance;
42
28
  protected configuration: Configuration | undefined;
43
29
  constructor(configuration?: Configuration, basePath?: string, axios?: AxiosInstance);
44
30
  }
45
- /**
46
- *
47
- * @export
48
- * @class RequiredError
49
- * @extends {Error}
50
- */
51
31
  export declare class RequiredError extends Error {
52
32
  field: string;
53
33
  constructor(field: string, msg?: string);
@@ -58,9 +38,5 @@ interface ServerMap {
58
38
  description: string;
59
39
  }[];
60
40
  }
61
- /**
62
- *
63
- * @export
64
- */
65
41
  export declare const operationServerMap: ServerMap;
66
42
  export {};
package/base.js CHANGED
@@ -19,21 +19,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
19
19
  exports.operationServerMap = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = exports.BASE_PATH = void 0;
20
20
  const axios_1 = __importDefault(require("axios"));
21
21
  exports.BASE_PATH = "/api/v1".replace(/\/+$/, "");
22
- /**
23
- *
24
- * @export
25
- */
26
22
  exports.COLLECTION_FORMATS = {
27
23
  csv: ",",
28
24
  ssv: " ",
29
25
  tsv: "\t",
30
26
  pipes: "|",
31
27
  };
32
- /**
33
- *
34
- * @export
35
- * @class BaseAPI
36
- */
37
28
  class BaseAPI {
38
29
  constructor(configuration, basePath = exports.BASE_PATH, axios = axios_1.default) {
39
30
  var _a;
@@ -47,12 +38,6 @@ class BaseAPI {
47
38
  }
48
39
  exports.BaseAPI = BaseAPI;
49
40
  ;
50
- /**
51
- *
52
- * @export
53
- * @class RequiredError
54
- * @extends {Error}
55
- */
56
41
  class RequiredError extends Error {
57
42
  constructor(field, msg) {
58
43
  super(msg);
@@ -61,8 +46,4 @@ class RequiredError extends Error {
61
46
  }
62
47
  }
63
48
  exports.RequiredError = RequiredError;
64
- /**
65
- *
66
- * @export
67
- */
68
49
  exports.operationServerMap = {};
package/common.d.ts CHANGED
@@ -12,54 +12,23 @@
12
12
  import type { Configuration } from "./configuration";
13
13
  import type { RequestArgs } from "./base";
14
14
  import type { AxiosInstance, AxiosResponse } from 'axios';
15
- /**
16
- *
17
- * @export
18
- */
19
15
  export declare const DUMMY_BASE_URL = "https://example.com";
20
16
  /**
21
17
  *
22
18
  * @throws {RequiredError}
23
- * @export
24
19
  */
25
20
  export declare const assertParamExists: (functionName: string, paramName: string, paramValue: unknown) => void;
26
- /**
27
- *
28
- * @export
29
- */
30
21
  export declare const setApiKeyToObject: (object: any, keyParamName: string, configuration?: Configuration) => Promise<void>;
31
- /**
32
- *
33
- * @export
34
- */
35
22
  export declare const setBasicAuthToObject: (object: any, configuration?: Configuration) => void;
36
- /**
37
- *
38
- * @export
39
- */
40
23
  export declare const setBearerAuthToObject: (object: any, configuration?: Configuration) => Promise<void>;
41
- /**
42
- *
43
- * @export
44
- */
45
24
  export declare const setOAuthToObject: (object: any, name: string, scopes: string[], configuration?: Configuration) => Promise<void>;
46
- /**
47
- *
48
- * @export
49
- */
50
25
  export declare const setSearchParams: (url: URL, ...objects: any[]) => void;
51
26
  /**
52
- *
53
- * @export
27
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
28
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
29
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
54
30
  */
31
+ export declare const replaceWithSerializableTypeIfNeeded: (key: string, value: any) => any;
55
32
  export declare const serializeDataIfNeeded: (value: any, requestOptions: any, configuration?: Configuration) => any;
56
- /**
57
- *
58
- * @export
59
- */
60
33
  export declare const toPathString: (url: URL) => string;
61
- /**
62
- *
63
- * @export
64
- */
65
34
  export declare const createRequestFunction: (axiosArgs: RequestArgs, globalAxios: AxiosInstance, BASE_PATH: string, configuration?: Configuration) => <T = unknown, R = AxiosResponse<T, any>>(axios?: AxiosInstance, basePath?: string) => Promise<R>;
package/common.js CHANGED
@@ -22,17 +22,12 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  });
23
23
  };
24
24
  Object.defineProperty(exports, "__esModule", { value: true });
25
- exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
25
+ exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.replaceWithSerializableTypeIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
26
26
  const base_1 = require("./base");
27
- /**
28
- *
29
- * @export
30
- */
31
27
  exports.DUMMY_BASE_URL = 'https://example.com';
32
28
  /**
33
29
  *
34
30
  * @throws {RequiredError}
35
- * @export
36
31
  */
37
32
  const assertParamExists = function (functionName, paramName, paramValue) {
38
33
  if (paramValue === null || paramValue === undefined) {
@@ -40,10 +35,6 @@ const assertParamExists = function (functionName, paramName, paramValue) {
40
35
  }
41
36
  };
42
37
  exports.assertParamExists = assertParamExists;
43
- /**
44
- *
45
- * @export
46
- */
47
38
  const setApiKeyToObject = function (object, keyParamName, configuration) {
48
39
  return __awaiter(this, void 0, void 0, function* () {
49
40
  if (configuration && configuration.apiKey) {
@@ -55,20 +46,12 @@ const setApiKeyToObject = function (object, keyParamName, configuration) {
55
46
  });
56
47
  };
57
48
  exports.setApiKeyToObject = setApiKeyToObject;
58
- /**
59
- *
60
- * @export
61
- */
62
49
  const setBasicAuthToObject = function (object, configuration) {
63
50
  if (configuration && (configuration.username || configuration.password)) {
64
51
  object["auth"] = { username: configuration.username, password: configuration.password };
65
52
  }
66
53
  };
67
54
  exports.setBasicAuthToObject = setBasicAuthToObject;
68
- /**
69
- *
70
- * @export
71
- */
72
55
  const setBearerAuthToObject = function (object, configuration) {
73
56
  return __awaiter(this, void 0, void 0, function* () {
74
57
  if (configuration && configuration.accessToken) {
@@ -80,10 +63,6 @@ const setBearerAuthToObject = function (object, configuration) {
80
63
  });
81
64
  };
82
65
  exports.setBearerAuthToObject = setBearerAuthToObject;
83
- /**
84
- *
85
- * @export
86
- */
87
66
  const setOAuthToObject = function (object, name, scopes, configuration) {
88
67
  return __awaiter(this, void 0, void 0, function* () {
89
68
  if (configuration && configuration.accessToken) {
@@ -99,7 +78,7 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
99
78
  if (parameter == null)
100
79
  return;
101
80
  if (typeof parameter === "object") {
102
- if (Array.isArray(parameter)) {
81
+ if (Array.isArray(parameter) || parameter instanceof Set) {
103
82
  parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
104
83
  }
105
84
  else {
@@ -115,10 +94,6 @@ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
115
94
  }
116
95
  }
117
96
  }
118
- /**
119
- *
120
- * @export
121
- */
122
97
  const setSearchParams = function (url, ...objects) {
123
98
  const searchParams = new URLSearchParams(url.search);
124
99
  setFlattenedQueryParams(searchParams, objects);
@@ -126,31 +101,34 @@ const setSearchParams = function (url, ...objects) {
126
101
  };
127
102
  exports.setSearchParams = setSearchParams;
128
103
  /**
129
- *
130
- * @export
104
+ * JSON serialization helper function which replaces instances of unserializable types with serializable ones.
105
+ * This function will run for every key-value pair encountered by JSON.stringify while traversing an object.
106
+ * Converting a set to a string will return an empty object, so an intermediate conversion to an array is required.
131
107
  */
108
+ // @ts-ignore
109
+ const replaceWithSerializableTypeIfNeeded = function (key, value) {
110
+ if (value instanceof Set) {
111
+ return Array.from(value);
112
+ }
113
+ else {
114
+ return value;
115
+ }
116
+ };
117
+ exports.replaceWithSerializableTypeIfNeeded = replaceWithSerializableTypeIfNeeded;
132
118
  const serializeDataIfNeeded = function (value, requestOptions, configuration) {
133
119
  const nonString = typeof value !== 'string';
134
120
  const needsSerialization = nonString && configuration && configuration.isJsonMime
135
121
  ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
136
122
  : nonString;
137
123
  return needsSerialization
138
- ? JSON.stringify(value !== undefined ? value : {})
124
+ ? JSON.stringify(value !== undefined ? value : {}, exports.replaceWithSerializableTypeIfNeeded)
139
125
  : (value || "");
140
126
  };
141
127
  exports.serializeDataIfNeeded = serializeDataIfNeeded;
142
- /**
143
- *
144
- * @export
145
- */
146
128
  const toPathString = function (url) {
147
129
  return url.pathname + url.search + url.hash;
148
130
  };
149
131
  exports.toPathString = toPathString;
150
- /**
151
- *
152
- * @export
153
- */
154
132
  const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
155
133
  return (axios = globalAxios, basePath = BASE_PATH) => {
156
134
  var _a;
@@ -9,11 +9,23 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ interface AWSv4Configuration {
13
+ options?: {
14
+ region?: string;
15
+ service?: string;
16
+ };
17
+ credentials?: {
18
+ accessKeyId?: string;
19
+ secretAccessKey?: string;
20
+ sessionToken?: string;
21
+ };
22
+ }
12
23
  export interface ConfigurationParameters {
13
24
  apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
14
25
  username?: string;
15
26
  password?: string;
16
27
  accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
28
+ awsv4?: AWSv4Configuration;
17
29
  basePath?: string;
18
30
  serverIndex?: number;
19
31
  baseOptions?: any;
@@ -23,49 +35,43 @@ export declare class Configuration {
23
35
  /**
24
36
  * parameter for apiKey security
25
37
  * @param name security name
26
- * @memberof Configuration
27
38
  */
28
39
  apiKey?: string | Promise<string> | ((name: string) => string) | ((name: string) => Promise<string>);
29
40
  /**
30
41
  * parameter for basic security
31
- *
32
- * @type {string}
33
- * @memberof Configuration
34
42
  */
35
43
  username?: string;
36
44
  /**
37
45
  * parameter for basic security
38
- *
39
- * @type {string}
40
- * @memberof Configuration
41
46
  */
42
47
  password?: string;
43
48
  /**
44
49
  * parameter for oauth2 security
45
50
  * @param name security name
46
51
  * @param scopes oauth2 scope
47
- * @memberof Configuration
48
52
  */
49
53
  accessToken?: string | Promise<string> | ((name?: string, scopes?: string[]) => string) | ((name?: string, scopes?: string[]) => Promise<string>);
50
54
  /**
51
- * override base path
52
- *
53
- * @type {string}
55
+ * parameter for aws4 signature security
56
+ * @param {Object} AWS4Signature - AWS4 Signature security
57
+ * @param {string} options.region - aws region
58
+ * @param {string} options.service - name of the service.
59
+ * @param {string} credentials.accessKeyId - aws access key id
60
+ * @param {string} credentials.secretAccessKey - aws access key
61
+ * @param {string} credentials.sessionToken - aws session token
54
62
  * @memberof Configuration
55
63
  */
64
+ awsv4?: AWSv4Configuration;
65
+ /**
66
+ * override base path
67
+ */
56
68
  basePath?: string;
57
69
  /**
58
70
  * override server index
59
- *
60
- * @type {number}
61
- * @memberof Configuration
62
71
  */
63
72
  serverIndex?: number;
64
73
  /**
65
74
  * base options for axios calls
66
- *
67
- * @type {any}
68
- * @memberof Configuration
69
75
  */
70
76
  baseOptions?: any;
71
77
  /**
@@ -89,3 +95,4 @@ export declare class Configuration {
89
95
  */
90
96
  isJsonMime(mime: string): boolean;
91
97
  }
98
+ export {};
package/configuration.js CHANGED
@@ -1,6 +1,5 @@
1
1
  "use strict";
2
2
  /* tslint:disable */
3
- /* eslint-disable */
4
3
  /**
5
4
  * Triveria Admin API
6
5
  * Triveria Admin API allows to manage Wallet API keys and services.
@@ -21,6 +20,7 @@ class Configuration {
21
20
  this.username = param.username;
22
21
  this.password = param.password;
23
22
  this.accessToken = param.accessToken;
23
+ this.awsv4 = param.awsv4;
24
24
  this.basePath = param.basePath;
25
25
  this.serverIndex = param.serverIndex;
26
26
  this.baseOptions = Object.assign(Object.assign({}, param.baseOptions), { headers: Object.assign({}, (_a = param.baseOptions) === null || _a === void 0 ? void 0 : _a.headers) });
@@ -37,8 +37,8 @@ class Configuration {
37
37
  * @return True if the given MIME is JSON, false otherwise.
38
38
  */
39
39
  isJsonMime(mime) {
40
- const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
41
- return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
40
+ const jsonMime = /^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$/i;
41
+ return mime !== null && jsonMime.test(mime);
42
42
  }
43
43
  }
44
44
  exports.Configuration = Configuration;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@triveria/admin",
3
3
  "private": false,
4
- "version": "0.0.162",
4
+ "version": "0.0.165",
5
5
  "description": "",
6
6
  "main": "index.js",
7
7
  "scripts": {