@wenex/sdk 0.0.6 → 0.0.8

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.
Files changed (30) hide show
  1. package/common/classes/restful.service.d.ts +13 -13
  2. package/common/classes/restful.service.js +46 -13
  3. package/common/classes/restful.service.js.map +1 -1
  4. package/common/enums/identity/profiles/index.d.ts +1 -1
  5. package/common/enums/identity/profiles/index.js +1 -1
  6. package/common/enums/identity/profiles/index.js.map +1 -1
  7. package/common/enums/identity/profiles/{person-type.enum.d.ts → profile-type.enum.d.ts} +1 -1
  8. package/common/enums/identity/profiles/profile-type.enum.js +10 -0
  9. package/common/enums/identity/profiles/profile-type.enum.js.map +1 -0
  10. package/common/interfaces/auth/grant/grant.interface.d.ts +25 -1
  11. package/common/interfaces/common/filter.interface.d.ts +32 -7
  12. package/common/interfaces/common/serializer.interface.d.ts +2 -2
  13. package/common/interfaces/config/config.interface.d.ts +25 -1
  14. package/common/interfaces/domain/app/app.interface.d.ts +25 -1
  15. package/common/interfaces/domain/client/client.interface.d.ts +30 -6
  16. package/common/interfaces/domain/client/domain.interface.d.ts +2 -1
  17. package/common/interfaces/domain/client/otp-service.interface.d.ts +2 -1
  18. package/common/interfaces/identity/profile.interface.d.ts +27 -3
  19. package/common/interfaces/identity/session.interface.d.ts +25 -1
  20. package/common/interfaces/identity/user.interface.d.ts +25 -1
  21. package/common/providers/request.provider.d.ts +6 -6
  22. package/common/providers/request.provider.js +24 -5
  23. package/common/providers/request.provider.js.map +1 -1
  24. package/common/utils/object-id.util.d.ts +24 -0
  25. package/common/utils/transform.util.js.map +1 -1
  26. package/package.json +9 -9
  27. package/services/auth/authentication.service.d.ts +3 -3
  28. package/services/auth/authorization.service.d.ts +2 -2
  29. package/common/enums/identity/profiles/person-type.enum.js +0 -10
  30. package/common/enums/identity/profiles/person-type.enum.js.map +0 -1
@@ -1,19 +1,19 @@
1
- import { AxiosInstance, AxiosPromise, AxiosRequestConfig } from 'axios';
2
- import { Core, Data, Dto, Filter, Items, QueryFilter, Serializer, Total } from '../interfaces';
1
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
+ import { Dto as DtoInterface, Core, Filter, QueryFilter, Serializer } from '../interfaces';
3
3
  import { RequestService } from '../providers';
4
- export declare class RestfulService<T extends Core, D extends Dto<Core>, S extends Serializer<Core> = Serializer<T>> extends RequestService {
4
+ export declare class RestfulService<T extends Core, Dto extends DtoInterface<Core>> extends RequestService {
5
5
  protected readonly name: string;
6
6
  protected readonly client: AxiosInstance;
7
7
  protected readonly url: (path: string) => string;
8
8
  constructor(name: string, client: AxiosInstance);
9
- count(filter: QueryFilter<Dto<D>>, config?: AxiosRequestConfig): AxiosPromise<Total>;
10
- create(data: Dto<D>, config?: AxiosRequestConfig): AxiosPromise<Serializer<S>>;
11
- createBulk(data: Dto<D>[], config?: AxiosRequestConfig): AxiosPromise<Items<Serializer<S>>>;
12
- find(filter: Filter<T>, config?: AxiosRequestConfig): AxiosPromise<Items<Serializer<S>>>;
13
- findById(id: string, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<S>>>;
14
- deleteById(id: string, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<S>>>;
15
- restoreById(id: string, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<S>>>;
16
- destroyById(id: string, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<S>>>;
17
- updateById(id: string, data: Dto<D>, config?: AxiosRequestConfig): AxiosPromise<Data<Serializer<S>>>;
18
- updateBulk(data: Dto<D>, filter: QueryFilter<T>, config?: AxiosRequestConfig): AxiosPromise<Total>;
9
+ count(filter: QueryFilter<T>, config?: AxiosRequestConfig): Promise<number>;
10
+ create(data: Dto, config?: AxiosRequestConfig): Promise<Serializer<T>>;
11
+ createBulk(data: Dto[], config?: AxiosRequestConfig): Promise<Serializer<T>[]>;
12
+ find(filter: Filter<T>, config?: AxiosRequestConfig): Promise<Serializer<T>[]>;
13
+ findById(id: string, config?: AxiosRequestConfig): Promise<Serializer<T>>;
14
+ deleteById(id: string, config?: AxiosRequestConfig): Promise<Serializer<T>>;
15
+ restoreById(id: string, config?: AxiosRequestConfig): Promise<Serializer<T>>;
16
+ destroyById(id: string, config?: AxiosRequestConfig): Promise<Serializer<T>>;
17
+ updateById(id: string, data: Dto, config?: AxiosRequestConfig): Promise<Serializer<T>>;
18
+ updateBulk(data: Dto, filter: QueryFilter<T>, config?: AxiosRequestConfig): Promise<number>;
19
19
  }
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.RestfulService = void 0;
4
13
  const providers_1 = require("../providers");
@@ -10,37 +19,61 @@ class RestfulService extends providers_1.RequestService {
10
19
  this.url = (path) => `/${this.name}/${path}`;
11
20
  }
12
21
  count(filter, config) {
13
- const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
14
- return this.get(this.url('/count'), Object.assign(Object.assign({}, config), { params }));
22
+ return __awaiter(this, void 0, void 0, function* () {
23
+ const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
24
+ return (yield this.get(this.url('/count'), Object.assign(Object.assign({}, config), { params }))).total;
25
+ });
15
26
  }
16
27
  create(data, config) {
17
- return this.post(this.url(''), data, config);
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ return this.post(this.url(''), data, config);
30
+ });
18
31
  }
19
32
  createBulk(data, config) {
20
- return this.post(this.url(''), data, config);
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ return (yield this.post(this.url(''), data, config))
35
+ .items;
36
+ });
21
37
  }
22
38
  find(filter, config) {
23
- const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
24
- return this.get(this.url(''), Object.assign(Object.assign({}, config), { params }));
39
+ return __awaiter(this, void 0, void 0, function* () {
40
+ const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
41
+ return (yield this.get(this.url(''), Object.assign(Object.assign({}, config), { params })))
42
+ .items;
43
+ });
25
44
  }
26
45
  findById(id, config) {
27
- return this.get(this.url(id), config);
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ return (yield this.get(this.url(id), config)).data;
48
+ });
28
49
  }
29
50
  deleteById(id, config) {
30
- return this.delete(this.url(id), config);
51
+ return __awaiter(this, void 0, void 0, function* () {
52
+ return (yield this.delete(this.url(id), config)).data;
53
+ });
31
54
  }
32
55
  restoreById(id, config) {
33
- return this.put(`${this.url(id)}/restore`, undefined, config);
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ return (yield this.put(`${this.url(id)}/restore`, undefined, config)).data;
58
+ });
34
59
  }
35
60
  destroyById(id, config) {
36
- return this.delete(`${this.url(id)}/destroy`, config);
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ return (yield this.delete(`${this.url(id)}/destroy`, config))
63
+ .data;
64
+ });
37
65
  }
38
66
  updateById(id, data, config) {
39
- return this.patch(`${this.url(id)}`, data, config);
67
+ return __awaiter(this, void 0, void 0, function* () {
68
+ return (yield this.patch(`${this.url(id)}`, data, config))
69
+ .data;
70
+ });
40
71
  }
41
72
  updateBulk(data, filter, config) {
42
- const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
43
- return this.patch('/bulk', data, Object.assign(Object.assign({}, config), { params }));
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ const params = Object.assign({ filter }, config === null || config === void 0 ? void 0 : config.params);
75
+ return (yield this.patch('/bulk', data, Object.assign(Object.assign({}, config), { params }))).total;
76
+ });
44
77
  }
45
78
  }
46
79
  exports.RestfulService = RestfulService;
@@ -1 +1 @@
1
- {"version":3,"file":"restful.service.js","sourceRoot":"","sources":["../../src/common/classes/restful.service.ts"],"names":[],"mappings":";;;AAaA,4CAA8C;AAE9C,MAAa,cAIX,SAAQ,0BAAc;IAGtB,YACqB,IAAY,EACZ,MAAqB;QAExC,KAAK,CAAC,MAAM,CAAC,CAAC;QAHK,SAAI,GAAJ,IAAI,CAAQ;QACZ,WAAM,GAAN,MAAM,CAAe;QAJvB,QAAG,GAAG,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,EAAE,CAAC;IAOnE,CAAC;IAED,KAAK,CAAC,MAA2B,EAAE,MAA2B;QAC5D,MAAM,MAAM,mBAAK,MAAM,IAAK,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAE,CAAC;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAQ,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,kCAAO,MAAM,KAAE,MAAM,IAAG,CAAC;IACpE,CAAC;IAED,MAAM,CAAC,IAAY,EAAE,MAA2B;QAC9C,OAAO,IAAI,CAAC,IAAI,CAAwB,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IAED,UAAU,CACR,IAAc,EACd,MAA2B;QAE3B,OAAO,IAAI,CAAC,IAAI,CAAiC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/E,CAAC;IAED,IAAI,CACF,MAAiB,EACjB,MAA2B;QAE3B,MAAM,MAAM,mBAAK,MAAM,IAAK,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,MAAM,CAAE,CAAC;QAC7C,OAAO,IAAI,CAAC,GAAG,CAAuB,IAAI,CAAC,GAAG,CAAC,EAAE,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KAAK,CAAC;QACpF,CAAC;KAAA;CACF;AAzED,wCAyEC"}
@@ -1 +1 @@
1
- export * from './person-type.enum';
1
+ export * from './profile-type.enum';
@@ -14,5 +14,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./person-type.enum"), exports);
17
+ __exportStar(require("./profile-type.enum"), exports);
18
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/identity/profiles/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/common/enums/identity/profiles/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
@@ -1,4 +1,4 @@
1
- export declare enum ProfilePersonType {
1
+ export declare enum ProfileType {
2
2
  Real = "real",
3
3
  Legal = "legal",
4
4
  Govern = "govern"
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProfileType = void 0;
4
+ var ProfileType;
5
+ (function (ProfileType) {
6
+ ProfileType["Real"] = "real";
7
+ ProfileType["Legal"] = "legal";
8
+ ProfileType["Govern"] = "govern";
9
+ })(ProfileType || (exports.ProfileType = ProfileType = {}));
10
+ //# sourceMappingURL=profile-type.enum.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile-type.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/identity/profiles/profile-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,4BAAa,CAAA;IACb,8BAAe,CAAA;IACf,gCAAiB,CAAA;AACnB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB"}
@@ -1,3 +1,27 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import type { Document } from 'mongoose';
2
26
  import { GrantTime } from './time.interface';
3
27
  import { Core, Dto } from '../../../interfaces';
@@ -11,7 +35,7 @@ export interface Grant extends Core {
11
35
  location?: string[];
12
36
  time?: GrantTime[];
13
37
  }
38
+ export type GrantDoc = Grant & Document;
14
39
  export type GrantDto = Dto<Omit<Grant, 'time'>> & {
15
40
  time?: Dto<GrantTime>[];
16
41
  };
17
- export type GrantDoc = Grant & Document;
@@ -1,12 +1,37 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import type { FilterQuery, PopulateOptions, ProjectionFields, SortOrder } from 'mongoose';
26
+ import { Core } from './core.interface';
2
27
  export type QueryID = {
3
28
  id: string;
4
29
  ref?: string;
5
30
  };
6
- export type Query<T = any> = FilterQuery<T>;
31
+ export type Query<T = Core> = FilterQuery<T>;
7
32
  export type Populate = PopulateOptions[];
8
- export type Projection<T = any> = ProjectionFields<T>;
9
- export type Pagination<T = any> = {
33
+ export type Projection<T = Core> = ProjectionFields<T>;
34
+ export type Pagination<T = Core> = {
10
35
  limit?: number;
11
36
  skip?: number;
12
37
  sort?: {
@@ -15,17 +40,17 @@ export type Pagination<T = any> = {
15
40
  };
16
41
  };
17
42
  };
18
- export type QueryFilter<T = any> = {
43
+ export type QueryFilter<T = Core> = {
19
44
  query: Query<T>;
20
45
  };
21
- export type Filter<T = any> = {
46
+ export type Filter<T = Core> = {
22
47
  populate?: Populate;
23
48
  projection?: Projection<T>;
24
49
  pagination?: Pagination<T>;
25
50
  } & QueryFilter<T>;
26
- export type FilterID<T = any> = {
51
+ export type FilterID<T = Core> = {
27
52
  query: QueryID;
28
53
  populate?: Populate;
29
54
  projection?: Projection<T>;
30
55
  };
31
- export type FilterOne<T = any> = Omit<Filter<T>, 'pagination'>;
56
+ export type FilterOne<T = Core> = Omit<Filter<T>, 'pagination'>;
@@ -5,10 +5,10 @@ export type Total = {
5
5
  export type Result = {
6
6
  result: 'OK' | 'NOK';
7
7
  };
8
- export type Data<T = any> = {
8
+ export type Data<T> = {
9
9
  data: T;
10
10
  };
11
- export type Items<T = any> = {
11
+ export type Items<T> = {
12
12
  items: T[];
13
13
  };
14
14
  export type Serializer<T extends {
@@ -1,3 +1,27 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import { Document } from 'mongoose';
2
26
  import { Core, Dto } from '../common';
3
27
  import { ValueType } from '../../enums';
@@ -6,5 +30,5 @@ export interface Config extends Core {
6
30
  type: ValueType;
7
31
  value?: any;
8
32
  }
9
- export type ConfigDto = Dto<Config>;
10
33
  export type ConfigDoc = Config & Document;
34
+ export type ConfigDto = Dto<Config>;
@@ -1,3 +1,27 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import type { Document } from 'mongoose';
2
26
  import { Core, Dto } from '../../common';
3
27
  import { AppChangeLog } from './change-log.interface';
@@ -19,7 +43,7 @@ export interface App extends Core {
19
43
  change_logs: AppChangeLog[];
20
44
  }
21
45
  export type AppInterface = App;
46
+ export type AppDoc = App & Document;
22
47
  export type AppDto = Dto<Omit<App, 'change_logs'>> & {
23
48
  change_logs?: Dto<AppChangeLog>[];
24
49
  };
25
- export type AppDoc = App & Document;
@@ -1,8 +1,32 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import type { Document } from 'mongoose';
2
- import { ClientDomain } from './domain.interface';
3
26
  import { Core, Dto, MakeOptional } from '../../common';
4
- import { ClientOtpService } from './otp-service.interface';
27
+ import { ClientDomain, ClientDomainDto } from './domain.interface';
5
28
  import { ClientPlan, GrantType, Scope, State, Status } from '../../../enums';
29
+ import { ClientOtpService, ClientOtpServiceDto } from './otp-service.interface';
6
30
  export type ApiToken = {
7
31
  cid: string;
8
32
  client_id: string;
@@ -32,8 +56,8 @@ export interface Client extends Core {
32
56
  domains: ClientDomain[];
33
57
  otp_services: ClientOtpService[];
34
58
  }
35
- export type ClientDto = MakeOptional<Dto<Omit<Client, 'domains' | 'otp_services'>>, 'state' | 'client_id' | 'access_token_ttl' | 'refresh_token_ttl'> & {
36
- domains: Dto<MakeOptional<ClientDomain, 'status'>>[];
37
- otp_services?: Dto<MakeOptional<ClientOtpService, 'provider'>>[];
38
- };
39
59
  export type ClientDoc = Client & Document;
60
+ export type ClientDto = Dto<MakeOptional<Omit<Client, 'domains' | 'otp_services'>, 'state' | 'client_id' | 'access_token_ttl' | 'refresh_token_ttl'>> & {
61
+ domains: ClientDomainDto[];
62
+ otp_services?: ClientOtpServiceDto[];
63
+ };
@@ -1,7 +1,8 @@
1
1
  import { Status } from '../../../enums';
2
- import { Core } from '../../common';
2
+ import { Core, Dto, MakeOptional } from '../../common';
3
3
  export interface ClientDomain extends Core {
4
4
  name: string;
5
5
  status: Status;
6
6
  subjects: string[];
7
7
  }
8
+ export type ClientDomainDto = Dto<MakeOptional<ClientDomain, 'status'>>;
@@ -1,7 +1,8 @@
1
1
  import { ClientOtpProvider, ClientOtpType } from '../../../enums';
2
- import { Core, Properties } from '../../common';
2
+ import { Core, Dto, MakeOptional, Properties } from '../../common';
3
3
  export interface ClientOtpService extends Core {
4
4
  type: ClientOtpType;
5
5
  config: Properties;
6
6
  provider: ClientOtpProvider;
7
7
  }
8
+ export type ClientOtpServiceDto = Dto<MakeOptional<ClientOtpService, 'provider'>>;
@@ -1,10 +1,34 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import type { Document } from 'mongoose';
2
26
  import { Core, Dto, MakeOptional } from '../common';
3
- import { Gender, ProfilePersonType, State } from '../../enums';
27
+ import { Gender, ProfileType, State } from '../../enums';
4
28
  export interface Profile extends Core {
29
+ type: ProfileType;
5
30
  state: State;
6
31
  gender: Gender;
7
- person_type: ProfilePersonType;
8
32
  cover?: string;
9
33
  avatar?: string;
10
34
  nickname?: string;
@@ -18,5 +42,5 @@ export interface Profile extends Core {
18
42
  verified_in?: string;
19
43
  birth_date?: Date;
20
44
  }
21
- export type ProfileDto = Dto<MakeOptional<Profile, 'state' | 'gender' | 'person_type'>>;
22
45
  export type ProfileDoc = Profile & Document;
46
+ export type ProfileDto = Dto<MakeOptional<Profile, 'state' | 'gender' | 'type'>>;
@@ -1,3 +1,27 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import type { Document } from 'mongoose';
2
26
  import { Core, Dto } from '../common';
3
27
  export interface Session extends Core {
@@ -5,5 +29,5 @@ export interface Session extends Core {
5
29
  agent: string;
6
30
  expiration_date: Date;
7
31
  }
8
- export type SessionDto = Dto<Session>;
9
32
  export type SessionDoc = Session & Document;
33
+ export type SessionDto = Dto<Session>;
@@ -1,3 +1,27 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import type { Document } from 'mongoose';
2
26
  import { Core, Dto, MakeOptional } from '../common';
3
27
  import { Status, UserMFA, UserOAuth } from '../../enums';
@@ -14,5 +38,5 @@ export interface User extends Core {
14
38
  password?: string;
15
39
  subjects: string[];
16
40
  }
17
- export type UserDto = Dto<MakeOptional<User, 'tz' | 'i18n'>>;
18
41
  export type UserDoc = User & Document;
42
+ export type UserDto = Dto<MakeOptional<User, 'tz' | 'i18n'>>;
@@ -1,10 +1,10 @@
1
- import { AxiosInstance, AxiosPromise, AxiosRequestConfig } from 'axios';
1
+ import { AxiosInstance, AxiosRequestConfig } from 'axios';
2
2
  export declare class RequestService {
3
3
  protected readonly client: AxiosInstance;
4
4
  constructor(client: AxiosInstance);
5
- get<T>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>;
6
- post<T, D>(url: string, data?: D, config?: AxiosRequestConfig): AxiosPromise<T>;
7
- delete<T>(url: string, config?: AxiosRequestConfig): AxiosPromise<T>;
8
- put<T, D>(url: string, data?: D, config?: AxiosRequestConfig): AxiosPromise<T>;
9
- patch<T, D>(url: string, data: D, config?: AxiosRequestConfig): AxiosPromise<T>;
5
+ get<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
6
+ post<T, D>(url: string, data?: D, config?: AxiosRequestConfig): Promise<T>;
7
+ delete<T>(url: string, config?: AxiosRequestConfig): Promise<T>;
8
+ put<T, D>(url: string, data?: D, config?: AxiosRequestConfig): Promise<T>;
9
+ patch<T, D>(url: string, data: D, config?: AxiosRequestConfig): Promise<T>;
10
10
  }
@@ -1,4 +1,13 @@
1
1
  "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
2
11
  Object.defineProperty(exports, "__esModule", { value: true });
3
12
  exports.RequestService = void 0;
4
13
  class RequestService {
@@ -6,19 +15,29 @@ class RequestService {
6
15
  this.client = client;
7
16
  }
8
17
  get(url, config) {
9
- return this.client.get(url, config);
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ return (yield this.client.get(url, config)).data;
20
+ });
10
21
  }
11
22
  post(url, data, config) {
12
- return this.client.post(url, data, config);
23
+ return __awaiter(this, void 0, void 0, function* () {
24
+ return (yield this.client.post(url, data, config)).data;
25
+ });
13
26
  }
14
27
  delete(url, config) {
15
- return this.client.delete(url, config);
28
+ return __awaiter(this, void 0, void 0, function* () {
29
+ return (yield this.client.delete(url, config)).data;
30
+ });
16
31
  }
17
32
  put(url, data, config) {
18
- return this.client.put(url, data, config);
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ return (yield this.client.put(url, data, config)).data;
35
+ });
19
36
  }
20
37
  patch(url, data, config) {
21
- return this.client.patch(url, data, config);
38
+ return __awaiter(this, void 0, void 0, function* () {
39
+ return (yield this.client.patch(url, data, config)).data;
40
+ });
22
41
  }
23
42
  }
24
43
  exports.RequestService = RequestService;
@@ -1 +1 @@
1
- {"version":3,"file":"request.provider.js","sourceRoot":"","sources":["../../src/common/providers/request.provider.ts"],"names":[],"mappings":";;;AAEA,MAAa,cAAc;IACzB,YAA+B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAExD,GAAG,CAAI,GAAW,EAAE,MAA2B;QAC7C,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,IAAI,CAAO,GAAW,EAAE,IAAQ,EAAE,MAA2B;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAI,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,CAAI,GAAW,EAAE,MAA2B;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC;IAC5C,CAAC;IAED,GAAG,CAAO,GAAW,EAAE,IAAQ,EAAE,MAA2B;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAI,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAO,GAAW,EAAE,IAAO,EAAE,MAA2B;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAI,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC;IACjD,CAAC;CACF;AAtBD,wCAsBC"}
1
+ {"version":3,"file":"request.provider.js","sourceRoot":"","sources":["../../src/common/providers/request.provider.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,MAAa,cAAc;IACzB,YAA+B,MAAqB;QAArB,WAAM,GAAN,MAAM,CAAe;IAAG,CAAC;IAElD,GAAG,CAAI,GAAW,EAAE,MAA2B;;YACnD,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QACtD,CAAC;KAAA;IAEK,IAAI,CAAO,GAAW,EAAE,IAAQ,EAAE,MAA2B;;YACjE,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,IAAI,CAAI,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAC7D,CAAC;KAAA;IAEK,MAAM,CAAI,GAAW,EAAE,MAA2B;;YACtD,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAAI,GAAG,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QACzD,CAAC;KAAA;IAEK,GAAG,CAAO,GAAW,EAAE,IAAQ,EAAE,MAA2B;;YAChE,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAI,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAC5D,CAAC;KAAA;IAEK,KAAK,CAAO,GAAW,EAAE,IAAO,EAAE,MAA2B;;YACjE,OAAO,CAAC,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAI,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9D,CAAC;KAAA;CACF;AAtBD,wCAsBC"}
@@ -1,3 +1,27 @@
1
+ /// <reference types="mongoose/types/aggregate" />
2
+ /// <reference types="mongoose/types/callback" />
3
+ /// <reference types="mongoose/types/collection" />
4
+ /// <reference types="mongoose/types/connection" />
5
+ /// <reference types="mongoose/types/cursor" />
6
+ /// <reference types="mongoose/types/document" />
7
+ /// <reference types="mongoose/types/error" />
8
+ /// <reference types="mongoose/types/expressions" />
9
+ /// <reference types="mongoose/types/helpers" />
10
+ /// <reference types="mongoose/types/middlewares" />
11
+ /// <reference types="mongoose/types/indexes" />
12
+ /// <reference types="mongoose/types/models" />
13
+ /// <reference types="mongoose/types/mongooseoptions" />
14
+ /// <reference types="mongoose/types/pipelinestage" />
15
+ /// <reference types="mongoose/types/populate" />
16
+ /// <reference types="mongoose/types/query" />
17
+ /// <reference types="mongoose/types/schemaoptions" />
18
+ /// <reference types="mongoose/types/schematypes" />
19
+ /// <reference types="mongoose/types/session" />
20
+ /// <reference types="mongoose/types/types" />
21
+ /// <reference types="mongoose/types/utility" />
22
+ /// <reference types="mongoose/types/validation" />
23
+ /// <reference types="mongoose/types/virtuals" />
24
+ /// <reference types="mongoose/types/inferschematype" />
1
25
  import { Types } from 'mongoose';
2
26
  export declare const MongoId: () => string;
3
27
  export declare const ObjectId: (id?: string) => Types.ObjectId;
@@ -1 +1 @@
1
- {"version":3,"file":"transform.util.js","sourceRoot":"","sources":["../../src/common/utils/transform.util.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;AAEvD,SAAgB,MAAM,CAAU,GAAW;IACzC,IAAI;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;KACxB;IAAC,WAAM;QACN,OAAO,GAAQ,CAAC;KACjB;AACH,CAAC;AAND,wBAMC;AAED,SAAgB,MAAM,CAAC,GAA2B;IAChD,IAAI;QACF,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;KACtB;IAAC,WAAM;QACN,OAAO,GAAW,CAAC;KACpB;AACH,CAAC;AAND,wBAMC"}
1
+ {"version":3,"file":"transform.util.js","sourceRoot":"","sources":["../../src/common/utils/transform.util.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;AAEvD,SAAgB,MAAM,CAAU,GAAW;IACzC,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACzB,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,GAAQ,CAAC;IAClB,CAAC;AACH,CAAC;AAND,wBAMC;AAED,SAAgB,MAAM,CAAC,GAA2B;IAChD,IAAI,CAAC;QACH,OAAO,IAAI,IAAI,CAAC,GAAG,CAAC,CAAC;IACvB,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,GAAW,CAAC;IACrB,CAAC;AACH,CAAC;AAND,wBAMC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wenex/sdk",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "Wenex SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -36,13 +36,13 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/debug": "^4.1.12",
39
- "@types/jest": "^29.5.8",
40
- "@types/node": "^20.9.0",
41
- "@types/react": "^18.2.37",
42
- "@typescript-eslint/eslint-plugin": "^6.10.0",
43
- "@typescript-eslint/parser": "^6.10.0",
39
+ "@types/jest": "^29.5.10",
40
+ "@types/node": "^20.10.1",
41
+ "@types/react": "^18.2.39",
42
+ "@typescript-eslint/eslint-plugin": "^6.13.1",
43
+ "@typescript-eslint/parser": "^6.13.1",
44
44
  "dotenv": "^16.3.1",
45
- "eslint": "^8.53.0",
45
+ "eslint": "^8.54.0",
46
46
  "eslint-config-prettier": "^9.0.0",
47
47
  "eslint-plugin-prettier": "^5.0.1",
48
48
  "jest": "^29.7.0",
@@ -53,8 +53,8 @@
53
53
  "ts-jest": "^29.1.1",
54
54
  "ts-node": "^10.9.1",
55
55
  "tsconfig-paths": "^4.2.0",
56
- "typedoc": "^0.25.3",
57
- "typescript": "^5.2.2"
56
+ "typedoc": "^0.25.4",
57
+ "typescript": "^5.3.2"
58
58
  },
59
59
  "files": [
60
60
  "/common",
@@ -5,8 +5,8 @@ export declare class Authentication {
5
5
  protected readonly request: RequestService;
6
6
  constructor(request: RequestService);
7
7
  protected readonly url: (path: string) => string;
8
- token(data: AuthenticationRequest, config?: AxiosRequestConfig): import("axios").AxiosPromise<AuthenticationResponse>;
9
- logout(data: Token, config?: AxiosRequestConfig): import("axios").AxiosPromise<Result>;
10
- verify(data: Token, config?: AxiosRequestConfig): import("axios").AxiosPromise<JwtToken>;
8
+ token(data: AuthenticationRequest, config?: AxiosRequestConfig): Promise<AuthenticationResponse>;
9
+ logout(data: Token, config?: AxiosRequestConfig): Promise<Result>;
10
+ verify(data: Token, config?: AxiosRequestConfig): Promise<JwtToken>;
11
11
  static build(client: AxiosInstance): Authentication;
12
12
  }
@@ -5,7 +5,7 @@ export declare class Authorization {
5
5
  protected readonly request: RequestService;
6
6
  constructor(request: RequestService);
7
7
  protected readonly url: (path: string) => string;
8
- can(data: AuthorizationCanRequest, config?: AxiosRequestConfig): import("axios").AxiosPromise<AuthorizationCanResponse>;
9
- policy(data: AuthorizationPolicyRequest, config?: AxiosRequestConfig): import("axios").AxiosPromise<AuthorizationPolicyResponse>;
8
+ can(data: AuthorizationCanRequest, config?: AxiosRequestConfig): Promise<AuthorizationCanResponse>;
9
+ policy(data: AuthorizationPolicyRequest, config?: AxiosRequestConfig): Promise<AuthorizationPolicyResponse>;
10
10
  static build(client: AxiosInstance): Authorization;
11
11
  }
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProfilePersonType = void 0;
4
- var ProfilePersonType;
5
- (function (ProfilePersonType) {
6
- ProfilePersonType["Real"] = "real";
7
- ProfilePersonType["Legal"] = "legal";
8
- ProfilePersonType["Govern"] = "govern";
9
- })(ProfilePersonType || (exports.ProfilePersonType = ProfilePersonType = {}));
10
- //# sourceMappingURL=person-type.enum.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"person-type.enum.js","sourceRoot":"","sources":["../../../../src/common/enums/identity/profiles/person-type.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,kCAAa,CAAA;IACb,oCAAe,CAAA;IACf,sCAAiB,CAAA;AACnB,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B"}