ob-bms-sdk 0.0.15 → 0.0.16
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/api.ts +95 -0
- package/dist/api/api.d.ts +58 -0
- package/dist/api/api.js +63 -1
- package/dist/index.js +3 -1
- package/index.ts +3 -1
- package/package.json +1 -1
- package/test.ts +3 -2
package/api/api.ts
CHANGED
|
@@ -480,6 +480,12 @@ export interface ShowMemberResult {
|
|
|
480
480
|
* @memberof ShowMemberResult
|
|
481
481
|
*/
|
|
482
482
|
'metadata': PrismaJsonValue | null;
|
|
483
|
+
/**
|
|
484
|
+
*
|
|
485
|
+
* @type {string}
|
|
486
|
+
* @memberof ShowMemberResult
|
|
487
|
+
*/
|
|
488
|
+
'account_id': string | null;
|
|
483
489
|
/**
|
|
484
490
|
*
|
|
485
491
|
* @type {Array<ShowMemberTower>}
|
|
@@ -897,6 +903,26 @@ export interface WrappedResponseFindMemberResultData {
|
|
|
897
903
|
*/
|
|
898
904
|
'member'?: FindMemberResultMember;
|
|
899
905
|
}
|
|
906
|
+
/**
|
|
907
|
+
*
|
|
908
|
+
* @export
|
|
909
|
+
* @interface WrappedResponseNull
|
|
910
|
+
*/
|
|
911
|
+
export interface WrappedResponseNull {
|
|
912
|
+
/**
|
|
913
|
+
*
|
|
914
|
+
* @type {Array<number>}
|
|
915
|
+
* @memberof WrappedResponseNull
|
|
916
|
+
*/
|
|
917
|
+
'data': Array<WrappedResponseNullDataEnum>;
|
|
918
|
+
}
|
|
919
|
+
|
|
920
|
+
export const WrappedResponseNullDataEnum = {
|
|
921
|
+
NUMBER_null: null
|
|
922
|
+
} as const;
|
|
923
|
+
|
|
924
|
+
export type WrappedResponseNullDataEnum = typeof WrappedResponseNullDataEnum[keyof typeof WrappedResponseNullDataEnum];
|
|
925
|
+
|
|
900
926
|
/**
|
|
901
927
|
*
|
|
902
928
|
* @export
|
|
@@ -934,6 +960,12 @@ export interface WrappedResponseShowMemberResultData {
|
|
|
934
960
|
* @memberof WrappedResponseShowMemberResultData
|
|
935
961
|
*/
|
|
936
962
|
'metadata': PrismaJsonValue | null;
|
|
963
|
+
/**
|
|
964
|
+
*
|
|
965
|
+
* @type {string}
|
|
966
|
+
* @memberof WrappedResponseShowMemberResultData
|
|
967
|
+
*/
|
|
968
|
+
'account_id': string | null;
|
|
937
969
|
/**
|
|
938
970
|
*
|
|
939
971
|
* @type {Array<ShowMemberTower>}
|
|
@@ -1284,6 +1316,39 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati
|
|
|
1284
1316
|
options: localVarRequestOptions,
|
|
1285
1317
|
};
|
|
1286
1318
|
},
|
|
1319
|
+
/**
|
|
1320
|
+
*
|
|
1321
|
+
* @param {string} id
|
|
1322
|
+
* @param {*} [options] Override http request option.
|
|
1323
|
+
* @throws {RequiredError}
|
|
1324
|
+
*/
|
|
1325
|
+
visitorsDestroy: async (id: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1326
|
+
// verify required parameter 'id' is not null or undefined
|
|
1327
|
+
assertParamExists('visitorsDestroy', 'id', id)
|
|
1328
|
+
const localVarPath = `/visitors/{id}`
|
|
1329
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1330
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1331
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1332
|
+
let baseOptions;
|
|
1333
|
+
if (configuration) {
|
|
1334
|
+
baseOptions = configuration.baseOptions;
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
|
|
1338
|
+
const localVarHeaderParameter = {} as any;
|
|
1339
|
+
const localVarQueryParameter = {} as any;
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
|
|
1343
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1344
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1345
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1346
|
+
|
|
1347
|
+
return {
|
|
1348
|
+
url: toPathString(localVarUrlObj),
|
|
1349
|
+
options: localVarRequestOptions,
|
|
1350
|
+
};
|
|
1351
|
+
},
|
|
1287
1352
|
/**
|
|
1288
1353
|
*
|
|
1289
1354
|
* @param {string} id
|
|
@@ -1397,6 +1462,16 @@ export const DefaultApiFp = function(configuration?: Configuration) {
|
|
|
1397
1462
|
const localVarAxiosArgs = await localVarAxiosParamCreator.visitorsCreate(createVisitorBody, options);
|
|
1398
1463
|
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1399
1464
|
},
|
|
1465
|
+
/**
|
|
1466
|
+
*
|
|
1467
|
+
* @param {string} id
|
|
1468
|
+
* @param {*} [options] Override http request option.
|
|
1469
|
+
* @throws {RequiredError}
|
|
1470
|
+
*/
|
|
1471
|
+
async visitorsDestroy(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WrappedResponseNull>> {
|
|
1472
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.visitorsDestroy(id, options);
|
|
1473
|
+
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
|
1474
|
+
},
|
|
1400
1475
|
/**
|
|
1401
1476
|
*
|
|
1402
1477
|
* @param {string} id
|
|
@@ -1480,6 +1555,15 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
|
|
|
1480
1555
|
visitorsCreate(createVisitorBody: CreateVisitorBody, options?: any): AxiosPromise<WrappedResponseCreateVisitorResponse> {
|
|
1481
1556
|
return localVarFp.visitorsCreate(createVisitorBody, options).then((request) => request(axios, basePath));
|
|
1482
1557
|
},
|
|
1558
|
+
/**
|
|
1559
|
+
*
|
|
1560
|
+
* @param {string} id
|
|
1561
|
+
* @param {*} [options] Override http request option.
|
|
1562
|
+
* @throws {RequiredError}
|
|
1563
|
+
*/
|
|
1564
|
+
visitorsDestroy(id: string, options?: any): AxiosPromise<WrappedResponseNull> {
|
|
1565
|
+
return localVarFp.visitorsDestroy(id, options).then((request) => request(axios, basePath));
|
|
1566
|
+
},
|
|
1483
1567
|
/**
|
|
1484
1568
|
*
|
|
1485
1569
|
* @param {string} id
|
|
@@ -1576,6 +1660,17 @@ export class DefaultApi extends BaseAPI {
|
|
|
1576
1660
|
return DefaultApiFp(this.configuration).visitorsCreate(createVisitorBody, options).then((request) => request(this.axios, this.basePath));
|
|
1577
1661
|
}
|
|
1578
1662
|
|
|
1663
|
+
/**
|
|
1664
|
+
*
|
|
1665
|
+
* @param {string} id
|
|
1666
|
+
* @param {*} [options] Override http request option.
|
|
1667
|
+
* @throws {RequiredError}
|
|
1668
|
+
* @memberof DefaultApi
|
|
1669
|
+
*/
|
|
1670
|
+
public visitorsDestroy(id: string, options?: AxiosRequestConfig) {
|
|
1671
|
+
return DefaultApiFp(this.configuration).visitorsDestroy(id, options).then((request) => request(this.axios, this.basePath));
|
|
1672
|
+
}
|
|
1673
|
+
|
|
1579
1674
|
/**
|
|
1580
1675
|
*
|
|
1581
1676
|
* @param {string} id
|
package/dist/api/api.d.ts
CHANGED
|
@@ -480,6 +480,12 @@ export interface ShowMemberResult {
|
|
|
480
480
|
* @memberof ShowMemberResult
|
|
481
481
|
*/
|
|
482
482
|
'metadata': PrismaJsonValue | null;
|
|
483
|
+
/**
|
|
484
|
+
*
|
|
485
|
+
* @type {string}
|
|
486
|
+
* @memberof ShowMemberResult
|
|
487
|
+
*/
|
|
488
|
+
'account_id': string | null;
|
|
483
489
|
/**
|
|
484
490
|
*
|
|
485
491
|
* @type {Array<ShowMemberTower>}
|
|
@@ -897,6 +903,23 @@ export interface WrappedResponseFindMemberResultData {
|
|
|
897
903
|
*/
|
|
898
904
|
'member'?: FindMemberResultMember;
|
|
899
905
|
}
|
|
906
|
+
/**
|
|
907
|
+
*
|
|
908
|
+
* @export
|
|
909
|
+
* @interface WrappedResponseNull
|
|
910
|
+
*/
|
|
911
|
+
export interface WrappedResponseNull {
|
|
912
|
+
/**
|
|
913
|
+
*
|
|
914
|
+
* @type {Array<number>}
|
|
915
|
+
* @memberof WrappedResponseNull
|
|
916
|
+
*/
|
|
917
|
+
'data': Array<WrappedResponseNullDataEnum>;
|
|
918
|
+
}
|
|
919
|
+
export declare const WrappedResponseNullDataEnum: {
|
|
920
|
+
readonly NUMBER_null: null;
|
|
921
|
+
};
|
|
922
|
+
export type WrappedResponseNullDataEnum = typeof WrappedResponseNullDataEnum[keyof typeof WrappedResponseNullDataEnum];
|
|
900
923
|
/**
|
|
901
924
|
*
|
|
902
925
|
* @export
|
|
@@ -934,6 +957,12 @@ export interface WrappedResponseShowMemberResultData {
|
|
|
934
957
|
* @memberof WrappedResponseShowMemberResultData
|
|
935
958
|
*/
|
|
936
959
|
'metadata': PrismaJsonValue | null;
|
|
960
|
+
/**
|
|
961
|
+
*
|
|
962
|
+
* @type {string}
|
|
963
|
+
* @memberof WrappedResponseShowMemberResultData
|
|
964
|
+
*/
|
|
965
|
+
'account_id': string | null;
|
|
937
966
|
/**
|
|
938
967
|
*
|
|
939
968
|
* @type {Array<ShowMemberTower>}
|
|
@@ -1087,6 +1116,13 @@ export declare const DefaultApiAxiosParamCreator: (configuration?: Configuration
|
|
|
1087
1116
|
* @throws {RequiredError}
|
|
1088
1117
|
*/
|
|
1089
1118
|
visitorsCreate: (createVisitorBody: CreateVisitorBody, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1119
|
+
/**
|
|
1120
|
+
*
|
|
1121
|
+
* @param {string} id
|
|
1122
|
+
* @param {*} [options] Override http request option.
|
|
1123
|
+
* @throws {RequiredError}
|
|
1124
|
+
*/
|
|
1125
|
+
visitorsDestroy: (id: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
|
|
1090
1126
|
/**
|
|
1091
1127
|
*
|
|
1092
1128
|
* @param {string} id
|
|
@@ -1149,6 +1185,13 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
|
|
|
1149
1185
|
* @throws {RequiredError}
|
|
1150
1186
|
*/
|
|
1151
1187
|
visitorsCreate(createVisitorBody: CreateVisitorBody, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WrappedResponseCreateVisitorResponse>>;
|
|
1188
|
+
/**
|
|
1189
|
+
*
|
|
1190
|
+
* @param {string} id
|
|
1191
|
+
* @param {*} [options] Override http request option.
|
|
1192
|
+
* @throws {RequiredError}
|
|
1193
|
+
*/
|
|
1194
|
+
visitorsDestroy(id: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WrappedResponseNull>>;
|
|
1152
1195
|
/**
|
|
1153
1196
|
*
|
|
1154
1197
|
* @param {string} id
|
|
@@ -1211,6 +1254,13 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
|
|
|
1211
1254
|
* @throws {RequiredError}
|
|
1212
1255
|
*/
|
|
1213
1256
|
visitorsCreate(createVisitorBody: CreateVisitorBody, options?: any): AxiosPromise<WrappedResponseCreateVisitorResponse>;
|
|
1257
|
+
/**
|
|
1258
|
+
*
|
|
1259
|
+
* @param {string} id
|
|
1260
|
+
* @param {*} [options] Override http request option.
|
|
1261
|
+
* @throws {RequiredError}
|
|
1262
|
+
*/
|
|
1263
|
+
visitorsDestroy(id: string, options?: any): AxiosPromise<WrappedResponseNull>;
|
|
1214
1264
|
/**
|
|
1215
1265
|
*
|
|
1216
1266
|
* @param {string} id
|
|
@@ -1282,6 +1332,14 @@ export declare class DefaultApi extends BaseAPI {
|
|
|
1282
1332
|
* @memberof DefaultApi
|
|
1283
1333
|
*/
|
|
1284
1334
|
visitorsCreate(createVisitorBody: CreateVisitorBody, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WrappedResponseCreateVisitorResponse, any>>;
|
|
1335
|
+
/**
|
|
1336
|
+
*
|
|
1337
|
+
* @param {string} id
|
|
1338
|
+
* @param {*} [options] Override http request option.
|
|
1339
|
+
* @throws {RequiredError}
|
|
1340
|
+
* @memberof DefaultApi
|
|
1341
|
+
*/
|
|
1342
|
+
visitorsDestroy(id: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WrappedResponseNull, any>>;
|
|
1285
1343
|
/**
|
|
1286
1344
|
*
|
|
1287
1345
|
* @param {string} id
|
package/dist/api/api.js
CHANGED
|
@@ -25,13 +25,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
25
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
26
|
};
|
|
27
27
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = void 0;
|
|
28
|
+
exports.DefaultApi = exports.DefaultApiFactory = exports.DefaultApiFp = exports.DefaultApiAxiosParamCreator = exports.WrappedResponseNullDataEnum = void 0;
|
|
29
29
|
const axios_1 = __importDefault(require("axios"));
|
|
30
30
|
// Some imports not used depending on template conditions
|
|
31
31
|
// @ts-ignore
|
|
32
32
|
const common_1 = require("./common");
|
|
33
33
|
// @ts-ignore
|
|
34
34
|
const base_1 = require("./base");
|
|
35
|
+
exports.WrappedResponseNullDataEnum = {
|
|
36
|
+
NUMBER_null: null
|
|
37
|
+
};
|
|
35
38
|
/**
|
|
36
39
|
* DefaultApi - axios parameter creator
|
|
37
40
|
* @export
|
|
@@ -241,6 +244,34 @@ const DefaultApiAxiosParamCreator = function (configuration) {
|
|
|
241
244
|
options: localVarRequestOptions,
|
|
242
245
|
};
|
|
243
246
|
}),
|
|
247
|
+
/**
|
|
248
|
+
*
|
|
249
|
+
* @param {string} id
|
|
250
|
+
* @param {*} [options] Override http request option.
|
|
251
|
+
* @throws {RequiredError}
|
|
252
|
+
*/
|
|
253
|
+
visitorsDestroy: (id, options = {}) => __awaiter(this, void 0, void 0, function* () {
|
|
254
|
+
// verify required parameter 'id' is not null or undefined
|
|
255
|
+
(0, common_1.assertParamExists)('visitorsDestroy', 'id', id);
|
|
256
|
+
const localVarPath = `/visitors/{id}`
|
|
257
|
+
.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
258
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
259
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
260
|
+
let baseOptions;
|
|
261
|
+
if (configuration) {
|
|
262
|
+
baseOptions = configuration.baseOptions;
|
|
263
|
+
}
|
|
264
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
|
|
265
|
+
const localVarHeaderParameter = {};
|
|
266
|
+
const localVarQueryParameter = {};
|
|
267
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
268
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
269
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
270
|
+
return {
|
|
271
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
272
|
+
options: localVarRequestOptions,
|
|
273
|
+
};
|
|
274
|
+
}),
|
|
244
275
|
/**
|
|
245
276
|
*
|
|
246
277
|
* @param {string} id
|
|
@@ -363,6 +394,18 @@ const DefaultApiFp = function (configuration) {
|
|
|
363
394
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
364
395
|
});
|
|
365
396
|
},
|
|
397
|
+
/**
|
|
398
|
+
*
|
|
399
|
+
* @param {string} id
|
|
400
|
+
* @param {*} [options] Override http request option.
|
|
401
|
+
* @throws {RequiredError}
|
|
402
|
+
*/
|
|
403
|
+
visitorsDestroy(id, options) {
|
|
404
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
405
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.visitorsDestroy(id, options);
|
|
406
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
407
|
+
});
|
|
408
|
+
},
|
|
366
409
|
/**
|
|
367
410
|
*
|
|
368
411
|
* @param {string} id
|
|
@@ -448,6 +491,15 @@ const DefaultApiFactory = function (configuration, basePath, axios) {
|
|
|
448
491
|
visitorsCreate(createVisitorBody, options) {
|
|
449
492
|
return localVarFp.visitorsCreate(createVisitorBody, options).then((request) => request(axios, basePath));
|
|
450
493
|
},
|
|
494
|
+
/**
|
|
495
|
+
*
|
|
496
|
+
* @param {string} id
|
|
497
|
+
* @param {*} [options] Override http request option.
|
|
498
|
+
* @throws {RequiredError}
|
|
499
|
+
*/
|
|
500
|
+
visitorsDestroy(id, options) {
|
|
501
|
+
return localVarFp.visitorsDestroy(id, options).then((request) => request(axios, basePath));
|
|
502
|
+
},
|
|
451
503
|
/**
|
|
452
504
|
*
|
|
453
505
|
* @param {string} id
|
|
@@ -537,6 +589,16 @@ class DefaultApi extends base_1.BaseAPI {
|
|
|
537
589
|
visitorsCreate(createVisitorBody, options) {
|
|
538
590
|
return (0, exports.DefaultApiFp)(this.configuration).visitorsCreate(createVisitorBody, options).then((request) => request(this.axios, this.basePath));
|
|
539
591
|
}
|
|
592
|
+
/**
|
|
593
|
+
*
|
|
594
|
+
* @param {string} id
|
|
595
|
+
* @param {*} [options] Override http request option.
|
|
596
|
+
* @throws {RequiredError}
|
|
597
|
+
* @memberof DefaultApi
|
|
598
|
+
*/
|
|
599
|
+
visitorsDestroy(id, options) {
|
|
600
|
+
return (0, exports.DefaultApiFp)(this.configuration).visitorsDestroy(id, options).then((request) => request(this.axios, this.basePath));
|
|
601
|
+
}
|
|
540
602
|
/**
|
|
541
603
|
*
|
|
542
604
|
* @param {string} id
|
package/dist/index.js
CHANGED
|
@@ -8,7 +8,9 @@ const api_1 = require("./api");
|
|
|
8
8
|
const axios_1 = __importDefault(require("axios"));
|
|
9
9
|
const axiosInstance = axios_1.default.create();
|
|
10
10
|
exports.axiosInstance = axiosInstance;
|
|
11
|
-
const config = new api_1.Configuration({
|
|
11
|
+
const config = new api_1.Configuration({
|
|
12
|
+
basePath: process.env['OB_BMS_URL'] || 'https://dev.glorymtel.xyz/ob-bms',
|
|
13
|
+
});
|
|
12
14
|
const client = new api_1.DefaultApi(config, undefined, axiosInstance);
|
|
13
15
|
exports.client = client;
|
|
14
16
|
function setAcessToken(accessToken) {
|
package/index.ts
CHANGED
|
@@ -3,7 +3,9 @@ import axios from 'axios';
|
|
|
3
3
|
|
|
4
4
|
const axiosInstance = axios.create();
|
|
5
5
|
|
|
6
|
-
const config: Configuration = new Configuration({
|
|
6
|
+
const config: Configuration = new Configuration({
|
|
7
|
+
basePath: process.env['OB_BMS_URL'] || 'https://dev.glorymtel.xyz/ob-bms',
|
|
8
|
+
});
|
|
7
9
|
const client = new DefaultApi(config, undefined, axiosInstance);
|
|
8
10
|
|
|
9
11
|
function setAcessToken(accessToken: string): void {
|
package/package.json
CHANGED
package/test.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as OB_BMS_SDK from './dist';
|
|
2
2
|
|
|
3
3
|
OB_BMS_SDK.setAcessToken('123');
|
|
4
|
-
OB_BMS_SDK.
|
|
4
|
+
OB_BMS_SDK.setBaseUrl('');
|
|
5
|
+
|
|
5
6
|
(async () => {
|
|
6
7
|
try {
|
|
7
|
-
await OB_BMS_SDK.client.
|
|
8
|
+
await OB_BMS_SDK.client.memberShow('1');
|
|
8
9
|
} catch (err) {
|
|
9
10
|
console.log(err);
|
|
10
11
|
}
|