ob-bms-sdk 0.0.17 → 0.0.19

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 CHANGED
@@ -223,35 +223,54 @@ export interface DestroyMembersResponse {
223
223
  export interface FindMemberResult {
224
224
  /**
225
225
  *
226
- * @type {boolean}
226
+ * @type {string}
227
227
  * @memberof FindMemberResult
228
228
  */
229
- 'result': boolean;
229
+ 'id': string;
230
230
  /**
231
231
  *
232
- * @type {FindMemberResultMember}
232
+ * @type {string}
233
233
  * @memberof FindMemberResult
234
234
  */
235
- 'member'?: FindMemberResultMember;
236
- }
237
- /**
238
- *
239
- * @export
240
- * @interface FindMemberResultMember
241
- */
242
- export interface FindMemberResultMember {
235
+ 'uid': string;
243
236
  /**
244
237
  *
245
- * @type {{ [key: string]: any; }}
246
- * @memberof FindMemberResultMember
238
+ * @type {string}
239
+ * @memberof FindMemberResult
247
240
  */
248
- 'meta': { [key: string]: any; };
241
+ 'account_id'?: string;
249
242
  /**
250
243
  *
251
- * @type {string}
252
- * @memberof FindMemberResultMember
244
+ * @type {JsonValue}
245
+ * @memberof FindMemberResult
253
246
  */
254
- 'personalId': string;
247
+ 'metadata'?: JsonValue | null;
248
+ /**
249
+ *
250
+ * @type {FindMemberResultCreatedAt}
251
+ * @memberof FindMemberResult
252
+ */
253
+ 'created_at': FindMemberResultCreatedAt;
254
+ /**
255
+ *
256
+ * @type {FindMemberResultCreatedAt}
257
+ * @memberof FindMemberResult
258
+ */
259
+ 'updated_at': FindMemberResultCreatedAt;
260
+ }
261
+ /**
262
+ *
263
+ * @export
264
+ * @interface FindMemberResultCreatedAt
265
+ */
266
+ export interface FindMemberResultCreatedAt {
267
+ }
268
+ /**
269
+ *
270
+ * @export
271
+ * @interface JsonValue
272
+ */
273
+ export interface JsonValue {
255
274
  }
256
275
  /**
257
276
  *
@@ -480,12 +499,6 @@ export interface ShowMemberResult {
480
499
  * @memberof ShowMemberResult
481
500
  */
482
501
  'metadata': PrismaJsonValue | null;
483
- /**
484
- *
485
- * @type {string}
486
- * @memberof ShowMemberResult
487
- */
488
- 'account_id': string | null;
489
502
  /**
490
503
  *
491
504
  * @type {Array<ShowMemberTower>}
@@ -773,16 +786,16 @@ export interface VisitorSchedule {
773
786
  'floor_id': string;
774
787
  /**
775
788
  *
776
- * @type {VisitorScheduleFrom}
789
+ * @type {FindMemberResultCreatedAt}
777
790
  * @memberof VisitorSchedule
778
791
  */
779
- 'from': VisitorScheduleFrom;
792
+ 'from': FindMemberResultCreatedAt;
780
793
  /**
781
794
  *
782
- * @type {VisitorScheduleFrom}
795
+ * @type {FindMemberResultCreatedAt}
783
796
  * @memberof VisitorSchedule
784
797
  */
785
- 'to': VisitorScheduleFrom;
798
+ 'to': FindMemberResultCreatedAt;
786
799
  /**
787
800
  *
788
801
  * @type {object}
@@ -790,13 +803,6 @@ export interface VisitorSchedule {
790
803
  */
791
804
  'repetition'?: object;
792
805
  }
793
- /**
794
- *
795
- * @export
796
- * @interface VisitorScheduleFrom
797
- */
798
- export interface VisitorScheduleFrom {
799
- }
800
806
  /**
801
807
  *
802
808
  * @export
@@ -874,34 +880,15 @@ export interface WrappedResponseCreateVisitorResponseData {
874
880
  /**
875
881
  *
876
882
  * @export
877
- * @interface WrappedResponseFindMemberResult
883
+ * @interface WrappedResponseFindMemberResultOrNull
878
884
  */
879
- export interface WrappedResponseFindMemberResult {
885
+ export interface WrappedResponseFindMemberResultOrNull {
880
886
  /**
881
887
  *
882
- * @type {WrappedResponseFindMemberResultData}
883
- * @memberof WrappedResponseFindMemberResult
888
+ * @type {Array<FindMemberResult>}
889
+ * @memberof WrappedResponseFindMemberResultOrNull
884
890
  */
885
- 'data': WrappedResponseFindMemberResultData;
886
- }
887
- /**
888
- *
889
- * @export
890
- * @interface WrappedResponseFindMemberResultData
891
- */
892
- export interface WrappedResponseFindMemberResultData {
893
- /**
894
- *
895
- * @type {boolean}
896
- * @memberof WrappedResponseFindMemberResultData
897
- */
898
- 'result': boolean;
899
- /**
900
- *
901
- * @type {FindMemberResultMember}
902
- * @memberof WrappedResponseFindMemberResultData
903
- */
904
- 'member'?: FindMemberResultMember;
891
+ 'data': Array<FindMemberResult> | null;
905
892
  }
906
893
  /**
907
894
  *
@@ -960,12 +947,6 @@ export interface WrappedResponseShowMemberResultData {
960
947
  * @memberof WrappedResponseShowMemberResultData
961
948
  */
962
949
  'metadata': PrismaJsonValue | null;
963
- /**
964
- *
965
- * @type {string}
966
- * @memberof WrappedResponseShowMemberResultData
967
- */
968
- 'account_id': string | null;
969
950
  /**
970
951
  *
971
952
  * @type {Array<ShowMemberTower>}
@@ -1438,7 +1419,7 @@ export const DefaultApiFp = function(configuration?: Configuration) {
1438
1419
  * @param {*} [options] Override http request option.
1439
1420
  * @throws {RequiredError}
1440
1421
  */
1441
- async membersIndex(identifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WrappedResponseFindMemberResult>> {
1422
+ async membersIndex(identifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WrappedResponseFindMemberResultOrNull>> {
1442
1423
  const localVarAxiosArgs = await localVarAxiosParamCreator.membersIndex(identifier, options);
1443
1424
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
1444
1425
  },
@@ -1534,7 +1515,7 @@ export const DefaultApiFactory = function (configuration?: Configuration, basePa
1534
1515
  * @param {*} [options] Override http request option.
1535
1516
  * @throws {RequiredError}
1536
1517
  */
1537
- membersIndex(identifier: string, options?: any): AxiosPromise<WrappedResponseFindMemberResult> {
1518
+ membersIndex(identifier: string, options?: any): AxiosPromise<WrappedResponseFindMemberResultOrNull> {
1538
1519
  return localVarFp.membersIndex(identifier, options).then((request) => request(axios, basePath));
1539
1520
  },
1540
1521
  /**
package/dist/api/api.d.ts CHANGED
@@ -221,37 +221,54 @@ export interface DestroyMembersResponse {
221
221
  export interface FindMemberResult {
222
222
  /**
223
223
  *
224
- * @type {boolean}
224
+ * @type {string}
225
225
  * @memberof FindMemberResult
226
226
  */
227
- 'result': boolean;
227
+ 'id': string;
228
228
  /**
229
229
  *
230
- * @type {FindMemberResultMember}
230
+ * @type {string}
231
231
  * @memberof FindMemberResult
232
232
  */
233
- 'member'?: FindMemberResultMember;
234
- }
235
- /**
236
- *
237
- * @export
238
- * @interface FindMemberResultMember
239
- */
240
- export interface FindMemberResultMember {
233
+ 'uid': string;
241
234
  /**
242
235
  *
243
- * @type {{ [key: string]: any; }}
244
- * @memberof FindMemberResultMember
236
+ * @type {string}
237
+ * @memberof FindMemberResult
245
238
  */
246
- 'meta': {
247
- [key: string]: any;
248
- };
239
+ 'account_id'?: string;
249
240
  /**
250
241
  *
251
- * @type {string}
252
- * @memberof FindMemberResultMember
242
+ * @type {JsonValue}
243
+ * @memberof FindMemberResult
244
+ */
245
+ 'metadata'?: JsonValue | null;
246
+ /**
247
+ *
248
+ * @type {FindMemberResultCreatedAt}
249
+ * @memberof FindMemberResult
250
+ */
251
+ 'created_at': FindMemberResultCreatedAt;
252
+ /**
253
+ *
254
+ * @type {FindMemberResultCreatedAt}
255
+ * @memberof FindMemberResult
253
256
  */
254
- 'personalId': string;
257
+ 'updated_at': FindMemberResultCreatedAt;
258
+ }
259
+ /**
260
+ *
261
+ * @export
262
+ * @interface FindMemberResultCreatedAt
263
+ */
264
+ export interface FindMemberResultCreatedAt {
265
+ }
266
+ /**
267
+ *
268
+ * @export
269
+ * @interface JsonValue
270
+ */
271
+ export interface JsonValue {
255
272
  }
256
273
  /**
257
274
  *
@@ -480,12 +497,6 @@ export interface ShowMemberResult {
480
497
  * @memberof ShowMemberResult
481
498
  */
482
499
  'metadata': PrismaJsonValue | null;
483
- /**
484
- *
485
- * @type {string}
486
- * @memberof ShowMemberResult
487
- */
488
- 'account_id': string | null;
489
500
  /**
490
501
  *
491
502
  * @type {Array<ShowMemberTower>}
@@ -773,16 +784,16 @@ export interface VisitorSchedule {
773
784
  'floor_id': string;
774
785
  /**
775
786
  *
776
- * @type {VisitorScheduleFrom}
787
+ * @type {FindMemberResultCreatedAt}
777
788
  * @memberof VisitorSchedule
778
789
  */
779
- 'from': VisitorScheduleFrom;
790
+ 'from': FindMemberResultCreatedAt;
780
791
  /**
781
792
  *
782
- * @type {VisitorScheduleFrom}
793
+ * @type {FindMemberResultCreatedAt}
783
794
  * @memberof VisitorSchedule
784
795
  */
785
- 'to': VisitorScheduleFrom;
796
+ 'to': FindMemberResultCreatedAt;
786
797
  /**
787
798
  *
788
799
  * @type {object}
@@ -790,13 +801,6 @@ export interface VisitorSchedule {
790
801
  */
791
802
  'repetition'?: object;
792
803
  }
793
- /**
794
- *
795
- * @export
796
- * @interface VisitorScheduleFrom
797
- */
798
- export interface VisitorScheduleFrom {
799
- }
800
804
  /**
801
805
  *
802
806
  * @export
@@ -874,34 +878,15 @@ export interface WrappedResponseCreateVisitorResponseData {
874
878
  /**
875
879
  *
876
880
  * @export
877
- * @interface WrappedResponseFindMemberResult
878
- */
879
- export interface WrappedResponseFindMemberResult {
880
- /**
881
- *
882
- * @type {WrappedResponseFindMemberResultData}
883
- * @memberof WrappedResponseFindMemberResult
884
- */
885
- 'data': WrappedResponseFindMemberResultData;
886
- }
887
- /**
888
- *
889
- * @export
890
- * @interface WrappedResponseFindMemberResultData
881
+ * @interface WrappedResponseFindMemberResultOrNull
891
882
  */
892
- export interface WrappedResponseFindMemberResultData {
893
- /**
894
- *
895
- * @type {boolean}
896
- * @memberof WrappedResponseFindMemberResultData
897
- */
898
- 'result': boolean;
883
+ export interface WrappedResponseFindMemberResultOrNull {
899
884
  /**
900
885
  *
901
- * @type {FindMemberResultMember}
902
- * @memberof WrappedResponseFindMemberResultData
886
+ * @type {Array<FindMemberResult>}
887
+ * @memberof WrappedResponseFindMemberResultOrNull
903
888
  */
904
- 'member'?: FindMemberResultMember;
889
+ 'data': Array<FindMemberResult> | null;
905
890
  }
906
891
  /**
907
892
  *
@@ -957,12 +942,6 @@ export interface WrappedResponseShowMemberResultData {
957
942
  * @memberof WrappedResponseShowMemberResultData
958
943
  */
959
944
  'metadata': PrismaJsonValue | null;
960
- /**
961
- *
962
- * @type {string}
963
- * @memberof WrappedResponseShowMemberResultData
964
- */
965
- 'account_id': string | null;
966
945
  /**
967
946
  *
968
947
  * @type {Array<ShowMemberTower>}
@@ -1170,7 +1149,7 @@ export declare const DefaultApiFp: (configuration?: Configuration) => {
1170
1149
  * @param {*} [options] Override http request option.
1171
1150
  * @throws {RequiredError}
1172
1151
  */
1173
- membersIndex(identifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WrappedResponseFindMemberResult>>;
1152
+ membersIndex(identifier: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<WrappedResponseFindMemberResultOrNull>>;
1174
1153
  /**
1175
1154
  *
1176
1155
  * @param {SyncBody} syncBody
@@ -1239,7 +1218,7 @@ export declare const DefaultApiFactory: (configuration?: Configuration, basePath
1239
1218
  * @param {*} [options] Override http request option.
1240
1219
  * @throws {RequiredError}
1241
1220
  */
1242
- membersIndex(identifier: string, options?: any): AxiosPromise<WrappedResponseFindMemberResult>;
1221
+ membersIndex(identifier: string, options?: any): AxiosPromise<WrappedResponseFindMemberResultOrNull>;
1243
1222
  /**
1244
1223
  *
1245
1224
  * @param {SyncBody} syncBody
@@ -1315,7 +1294,7 @@ export declare class DefaultApi extends BaseAPI {
1315
1294
  * @throws {RequiredError}
1316
1295
  * @memberof DefaultApi
1317
1296
  */
1318
- membersIndex(identifier: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WrappedResponseFindMemberResult, any>>;
1297
+ membersIndex(identifier: string, options?: AxiosRequestConfig): Promise<import("axios").AxiosResponse<WrappedResponseFindMemberResultOrNull, any>>;
1319
1298
  /**
1320
1299
  *
1321
1300
  * @param {SyncBody} syncBody
package/dist/index.js CHANGED
@@ -7,11 +7,11 @@ exports.setBaseUrl = exports.setAcessToken = exports.axiosInstance = exports.cli
7
7
  const api_1 = require("./api");
8
8
  const axios_1 = __importDefault(require("axios"));
9
9
  const axiosInstance = axios_1.default.create({
10
- baseURL: process.env.OB_BMS_URL || 'localhost:3000',
10
+ baseURL: process.env.OB_BMS_URL || 'http://localhost:3000',
11
11
  });
12
12
  exports.axiosInstance = axiosInstance;
13
13
  function setAcessToken(accessToken) {
14
- axiosInstance.defaults.headers.common['x-access-token'] = accessToken;
14
+ axiosInstance.defaults.headers.common['x-access-token'] = `Bearer ${accessToken}`;
15
15
  }
16
16
  exports.setAcessToken = setAcessToken;
17
17
  function setBaseUrl(string) {
package/index.ts CHANGED
@@ -2,11 +2,11 @@ import { DefaultApi } from './api';
2
2
  import axios from 'axios';
3
3
 
4
4
  const axiosInstance = axios.create({
5
- baseURL: process.env.OB_BMS_URL || 'localhost:3000',
5
+ baseURL: process.env.OB_BMS_URL || 'http://localhost:3000',
6
6
  });
7
7
 
8
8
  function setAcessToken(accessToken: string): void {
9
- axiosInstance.defaults.headers.common['x-access-token'] = accessToken;
9
+ axiosInstance.defaults.headers.common['x-access-token'] = `Bearer ${accessToken}`;
10
10
  }
11
11
 
12
12
  function setBaseUrl(string: string): void {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ob-bms-sdk",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "description": "API interfaces for OB BMS",
5
5
  "main": "./dist/index.js",
6
6
  "license": "MIT"
package/test.ts CHANGED
@@ -1,12 +1,14 @@
1
1
  import * as OB_BMS_SDK from './dist';
2
2
 
3
3
  // OB_BMS_SDK.setAcessToken('789');
4
- OB_BMS_SDK.setBaseUrl('http://google.com');
5
-
4
+ OB_BMS_SDK.setBaseUrl('http://dev.glorymtel.xyz/ob-bms');
5
+ OB_BMS_SDK.setAcessToken(
6
+ 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiI4MjQyNzA1Zi0zNWI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bnVsbH0seyJpZCI6ImZjYzE3MTY4LWRmNTQtNDIyMy04MzYxLTY4NTlkZmNmMzU2NSIsInBlcm1pdHRlZV90eXBlIjoiYWNjb3VudCIsInZhbHVlIjp7Im5hbWUiOiJvYi1pYW06dG9rZW4iLCJzZXJ2aWNlIjoib2ItaWFtIiwiYWN0aW9ucyI6WyJjcmVhdGUiLCJyZWFkIl0sInJlc291cmNlX3R5cGUiOiJ0b2tlbiIsInJlc291cmNlIjp7ImFjY291bnRfaWQiOiJzZWxmIn19LCJjcmVhdGVkX2F0IjoiMjAyMy0xMS0wMlQwODo1MTo0Mi43NzFaIiwidXBkYXRlZF9hdCI6IjIwMjMtMTEtMDJUMDg6NTE6NDIuNzcxWiIsImRlbGV0ZWRfYXQiOm51bGwsImFjY291bnRfaWQiOiI4MjQyNzA1Zi0zNWI1LTRkNzEtOGUxOS1jNWE0MWFjMmUwYTQiLCJhY2NvdW50X2dyb3VwX2lkIjpudWxsfV19.tfqYJop4iJNlIbBVztf7DFfVhaYAFnUGDhLjik2OGA4',
7
+ );
6
8
  (async () => {
7
9
  try {
8
- const res = await OB_BMS_SDK.client.memberShow('1', {});
9
- console.dir(res);
10
+ const res = await OB_BMS_SDK.client.membersIndex('t.shin@pjoe.com', {});
11
+ console.dir(res.data, { depth: null });
10
12
  } catch (err) {
11
13
  console.log(err);
12
14
  }