jd_platform_sdk 0.0.7 → 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 (35) hide show
  1. package/dist/index.d.ts +4 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +6 -0
  4. package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.d.ts +6 -0
  5. package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.d.ts.map +1 -0
  6. package/dist/sdk/models/modules/dashboard/jdDashboardCombinations.js +21 -0
  7. package/dist/sdk/models/modules/geolocation/jdCountry.d.ts +15 -0
  8. package/dist/sdk/models/modules/geolocation/jdCountry.d.ts.map +1 -1
  9. package/dist/sdk/models/modules/geolocation/jdCountry.js +16 -0
  10. package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts +17 -0
  11. package/dist/sdk/models/modules/karaoke/jdKtvShop.d.ts.map +1 -1
  12. package/dist/sdk/models/modules/karaoke/jdKtvShop.js +18 -0
  13. package/dist/sdk/models/modules/music/jdAlbum.d.ts +2 -2
  14. package/dist/sdk/models/modules/music/jdAlbum.d.ts.map +1 -1
  15. package/dist/sdk/models/modules/music/jdAlbum.js +2 -2
  16. package/dist/sdk/models/modules/music/jdArtist.d.ts +2 -3
  17. package/dist/sdk/models/modules/music/jdArtist.d.ts.map +1 -1
  18. package/dist/sdk/models/modules/music/jdArtist.js +4 -4
  19. package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts +48 -0
  20. package/dist/sdk/models/modules/radio_station/jdRadioStation.d.ts.map +1 -0
  21. package/dist/sdk/models/modules/radio_station/jdRadioStation.js +95 -0
  22. package/dist/sdk/models/modules/user/jdPermission.d.ts +14 -0
  23. package/dist/sdk/models/modules/user/jdPermission.d.ts.map +1 -1
  24. package/dist/sdk/models/modules/user/jdPermission.js +16 -0
  25. package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts +47 -0
  26. package/dist/sdk/models/modules/user/jdPermissionGroup.d.ts.map +1 -0
  27. package/dist/sdk/models/modules/user/jdPermissionGroup.js +66 -0
  28. package/dist/sdk/models/modules/user/jdUser.d.ts +22 -0
  29. package/dist/sdk/models/modules/user/jdUser.d.ts.map +1 -1
  30. package/dist/sdk/models/modules/user/jdUser.js +18 -0
  31. package/dist/sdk/models/modules/user/jdUserRole.d.ts +52 -0
  32. package/dist/sdk/models/modules/user/jdUserRole.d.ts.map +1 -0
  33. package/dist/sdk/models/modules/user/jdUserRole.js +72 -0
  34. package/package.json +3 -1
  35. package/readme.md +9 -0
package/dist/index.d.ts CHANGED
@@ -9,10 +9,14 @@ export * from "./sdk/utilities/stringUtils";
9
9
  export * from "./sdk/utilities/utils";
10
10
  export * from "./sdk/models/jdResource";
11
11
  export * from "./sdk/models/jdApplication";
12
+ export * from "./sdk/models/modules/dashboard/jdDashboardCombinations";
12
13
  export * from "./sdk/models/modules/user/jdUser";
14
+ export * from "./sdk/models/modules/user/jdUserRole";
13
15
  export * from "./sdk/models/modules/user/jdSessionUser";
14
16
  export * from "./sdk/models/modules/user/jdPermission";
17
+ export * from "./sdk/models/modules/user/jdPermissionGroup";
15
18
  export * from "./sdk/models/modules/karaoke/jdKtvShop";
19
+ export * from "./sdk/models/modules/radio_station/jdRadioStation";
16
20
  export * from "./sdk/models/modules/music/jdAlbum";
17
21
  export * from "./sdk/models/modules/music/jdSong";
18
22
  export * from "./sdk/models/modules/music/jdArtist";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC;AAGvC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AAGtC,cAAc,yBAAyB,CAAC;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18 @@ export * from "./sdk/utilities/utils";
11
11
  // Generic Models for different possible modules for all platforms
12
12
  export * from "./sdk/models/jdResource";
13
13
  export * from "./sdk/models/jdApplication";
14
+ //Dashboard
15
+ export * from "./sdk/models/modules/dashboard/jdDashboardCombinations";
14
16
  //User
15
17
  export * from "./sdk/models/modules/user/jdUser";
18
+ export * from "./sdk/models/modules/user/jdUserRole";
16
19
  export * from "./sdk/models/modules/user/jdSessionUser";
17
20
  export * from "./sdk/models/modules/user/jdPermission";
21
+ export * from "./sdk/models/modules/user/jdPermissionGroup";
18
22
  //Karaoke
19
23
  export * from "./sdk/models/modules/karaoke/jdKtvShop";
24
+ //Radio Station
25
+ export * from "./sdk/models/modules/radio_station/jdRadioStation";
20
26
  //Music
21
27
  export * from "./sdk/models/modules/music/jdAlbum";
22
28
  export * from "./sdk/models/modules/music/jdSong";
@@ -0,0 +1,6 @@
1
+ import JDResource, { ConnectorInfo } from "../../jdResource";
2
+ export declare class JdDashboardCombinations extends JDResource {
3
+ constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
4
+ getOverview(): Promise<import("../../../jdConnector").SimpleResponse>;
5
+ }
6
+ //# sourceMappingURL=jdDashboardCombinations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jdDashboardCombinations.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/dashboard/jdDashboardCombinations.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,uBAAwB,SAAQ,UAAU;gBAC1C,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAI9F,WAAW;CAIjB"}
@@ -0,0 +1,21 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import JDResource, { ConnectorInfo } from "../../jdResource";
11
+ export class JdDashboardCombinations extends JDResource {
12
+ constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
13
+ super(connectorInfo);
14
+ this.setData(data);
15
+ }
16
+ getOverview() {
17
+ return __awaiter(this, void 0, void 0, function* () {
18
+ return yield this.getRelative('/modules/dashboard/combinations/overview', {});
19
+ });
20
+ }
21
+ }
@@ -3,8 +3,23 @@ export declare class JDCountry extends JDResource {
3
3
  constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
4
4
  setData(data: Record<string, any>): void;
5
5
  getCountries(orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
6
+ paginateContents({ title_en, title_mm, published, orderBy, order, pageIndex, countPerPage, fields }: {
7
+ title_en?: string | null;
8
+ title_mm?: string | null;
9
+ published?: boolean | null;
10
+ orderBy?: string | null;
11
+ order?: string | null;
12
+ pageIndex?: number | null;
13
+ countPerPage?: number | null;
14
+ fields?: string | null;
15
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
6
16
  findCountries(title: string, orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
7
17
  getStates(countryId: string, orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
8
18
  getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
19
+ updateSingleFields(id: string, { published, recommended, note }: {
20
+ published?: boolean | null;
21
+ recommended?: boolean | null;
22
+ note?: string | null;
23
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
9
24
  }
10
25
  //# sourceMappingURL=jdCountry.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jdCountry.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/geolocation/jdCountry.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,SAAU,SAAQ,UAAU;gBAC5B,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,YAAY,CAAC,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAKlG,aAAa,CAAC,KAAK,EAAC,MAAM,EAAE,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAKjH,SAAS,CAAC,SAAS,EAAC,MAAM,EAAE,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAKjH,OAAO,CAAC,EAAE,EAAC,MAAM;CAGvB"}
1
+ {"version":3,"file":"jdCountry.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/geolocation/jdCountry.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,SAAU,SAAQ,UAAU;gBAC5B,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAI1B,YAAY,CAAC,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAKlG,gBAAgB,CAAC,EAAE,QAAY,EAAE,QAAY,EAAE,SAAe,EAC3D,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC,EAAE;QAChG,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACzB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC/C,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB;IAUK,aAAa,CAAC,KAAK,EAAC,MAAM,EAAE,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAKjH,SAAS,CAAC,SAAS,EAAC,MAAM,EAAE,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAKjH,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,kBAAkB,CAAC,EAAE,EAAC,MAAM,EAAE,EAAC,SAAgB,EAAE,WAAiB,EAAE,IAAU,EAAC,EAAE;QACtF,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
@@ -22,6 +22,16 @@ export class JDCountry extends JDResource {
22
22
  return yield this.getRelative('/modules/geolocation/countries', params);
23
23
  });
24
24
  }
25
+ paginateContents(_a) {
26
+ return __awaiter(this, arguments, void 0, function* ({ title_en = "", title_mm = "", published = null, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
27
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
28
+ //Addon filters
29
+ params['title.en'] = title_en;
30
+ params['title.mm'] = title_mm;
31
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
32
+ return yield this.getRelative('/modules/geolocation/countries/paginate', params);
33
+ });
34
+ }
25
35
  findCountries(title_1) {
26
36
  return __awaiter(this, arguments, void 0, function* (title, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '') {
27
37
  const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
@@ -39,4 +49,10 @@ export class JDCountry extends JDResource {
39
49
  return yield this.getRelative(`/modules/geolocation/countries/${id}`, {});
40
50
  });
41
51
  }
52
+ updateSingleFields(id_1, _a) {
53
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, note = null }) {
54
+ const body = { published, recommended, note };
55
+ return yield this.postRelative(`/modules/geolocation/countries/${id}/update/single_fields`, body);
56
+ });
57
+ }
42
58
  }
@@ -25,7 +25,24 @@ export declare class JDKtvShop extends JDResource {
25
25
  constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
26
26
  setData(data: Record<string, any>): void;
27
27
  getKtvShops(isRecommended?: boolean, orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
28
+ paginateKtvShops({ titleEN, titleMM, published, recommended, note, orderBy, order, pageIndex, countPerPage, fields }: {
29
+ titleEN?: string | null;
30
+ titleMM?: string | null;
31
+ published?: boolean | null;
32
+ recommended?: boolean | null;
33
+ note?: string | null;
34
+ orderBy?: string | null;
35
+ order?: string | null;
36
+ pageIndex?: number | null;
37
+ countPerPage?: number | null;
38
+ fields?: string | null;
39
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
28
40
  getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
29
41
  updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
42
+ updateSingleFields(id: string, { published, recommended, note }: {
43
+ published?: boolean | null;
44
+ recommended?: boolean | null;
45
+ note?: string | null;
46
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
30
47
  }
31
48
  //# sourceMappingURL=jdKtvShop.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jdKtvShop.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/karaoke/jdKtvShop.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,SAAU,SAAQ,UAAU;IACxC,UAAU,EAAC,MAAM,CAAM;IACvB,gBAAgB,EAAC,MAAM,CAAK;IAC5B,mBAAmB,EAAC,MAAM,CAAK;IAE/B,SAAS,EAAC,MAAM,CAAM;IACtB,OAAO,EAAC,MAAM,CAAM;IACpB,MAAM,EAAC,MAAM,CAAM;IACnB,UAAU,EAAC,MAAM,CAAM;IAEvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAClC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAClC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAChC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAC/B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAEnC,IAAI,gBAAgB,IAAG,MAAM,CAG5B;IAED,IAAI,cAAc,IAAG,MAAM,CAAyE;IACpG,IAAI,cAAc,IAAG,MAAM,CAAyE;IAEpG,IAAI,YAAY,IAAG,MAAM,CAAuE;IAChG,IAAI,YAAY,IAAG,MAAM,CAAuE;IAEhG,IAAI,WAAW,IAAG,MAAM,CAAsE;IAC9F,IA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SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB;IAcK,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,UAAU,CAAC,EAAE,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAC,IAAI;IAIlF,kBAAkB,CAAC,EAAE,EAAC,MAAM,EAAE,EAAC,SAAgB,EAAE,WAAiB,EAAE,IAAU,EAAC,EAAE;QACtF,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
@@ -64,6 +64,18 @@ export class JDKtvShop extends JDResource {
64
64
  return yield this.getRelative('/modules/karaoke/ktv_shops', params);
65
65
  });
66
66
  }
67
+ paginateKtvShops(_a) {
68
+ return __awaiter(this, arguments, void 0, function* ({ titleEN = "", titleMM = "", published = null, recommended = null, note = '', orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
69
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
70
+ //Addon filters
71
+ params['title.en'] = titleEN;
72
+ params['title.mm'] = titleMM;
73
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
74
+ params['recommended'] = recommended === null ? '' : recommended ? 'true' : 'false';
75
+ params['note'] = note;
76
+ return yield this.getRelative('/modules/karaoke/ktv_shops/paginate', params);
77
+ });
78
+ }
67
79
  getInfo(id) {
68
80
  return __awaiter(this, void 0, void 0, function* () {
69
81
  return yield this.getRelative(`/modules/karaoke/ktv_shops/${id}`, {});
@@ -74,4 +86,10 @@ export class JDKtvShop extends JDResource {
74
86
  return yield this.getRelative(`/modules/karaoke/ktv_shops/${id}`, {});
75
87
  });
76
88
  }
89
+ updateSingleFields(id_1, _a) {
90
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, note = null }) {
91
+ const body = { published, recommended, note };
92
+ return yield this.postRelative(`/modules/karaoke/ktv_shops/${id}/update/single_fields`, body);
93
+ });
94
+ }
77
95
  }
@@ -38,7 +38,7 @@ export declare class JDAlbum extends JDResource {
38
38
  countPerPage?: number | undefined;
39
39
  fields?: string | undefined;
40
40
  }): Promise<import("../../../jdConnector").SimpleResponse>;
41
- paginateAlbums({ titleEN, titleMM, keywordsEN, keywordsMM, published, recommended, downloadable, not_validated, languageId, year, note, orderBy, order, pageIndex, countPerPage, fields }: {
41
+ paginateAlbums({ titleEN, titleMM, keywordsEN, keywordsMM, published, recommended, downloadable, not_validated, languageId, released_year, note, orderBy, order, pageIndex, countPerPage, fields }: {
42
42
  titleEN?: string | null;
43
43
  titleMM?: string | null;
44
44
  keywordsEN?: string | null;
@@ -48,7 +48,7 @@ export declare class JDAlbum extends JDResource {
48
48
  downloadable?: boolean | null;
49
49
  not_validated?: boolean | null;
50
50
  languageId?: string | null;
51
- year?: number | null;
51
+ released_year?: number | null;
52
52
  note?: string | null;
53
53
  orderBy?: string | null;
54
54
  order?: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"jdAlbum.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdAlbum.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,OAAQ,SAAQ,UAAU;IACtC,WAAW,EAAC,MAAM,CAAM;IACxB,UAAU,EAAC,MAAM,CAAM;IACvB,IAAI,EAAC,MAAM,CAAM;IAEjB,WAAW,EAAC,OAAO,CAAS;IAC5B,QAAQ,EAAC,OAAO,CAAS;IACzB,YAAY,EAAC,OAAO,CAAS;IAE7B,WAAW,EAAC,MAAM,CAAK;IACvB,oBAAo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B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB;IAuBK,QAAQ,CAAC,OAAO,EAAC,MAAM,EAAG,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;KAAA;IAMlH,UAAU,CAAC,EAAE,KAAU,EAAE,SAAc,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;;;KAAA;IAS/H,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,UAAU,CAAC,EAAE,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAC,IAAI;IAIlF,kBAAkB,CAAC,EAAE,EAAC,MAAM,EAAE,EAAC,SAAgB,EAAE,WAAiB,EAAE,YAAmB,EAAE,IAAU,EAAC,EAAE;QAC3G,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
@@ -77,7 +77,7 @@ export class JDAlbum extends JDResource {
77
77
  });
78
78
  }
79
79
  paginateAlbums(_a) {
80
- return __awaiter(this, arguments, void 0, function* ({ titleEN = "", titleMM = "", keywordsEN = "", keywordsMM = "", published = null, recommended = null, downloadable = null, not_validated = null, languageId = "", year = null, note = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
80
+ return __awaiter(this, arguments, void 0, function* ({ titleEN = "", titleMM = "", keywordsEN = "", keywordsMM = "", published = null, recommended = null, downloadable = null, not_validated = null, languageId = "", released_year = null, note = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
81
81
  const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
82
82
  //Addon filters
83
83
  params['title.en'] = titleEN;
@@ -90,7 +90,7 @@ export class JDAlbum extends JDResource {
90
90
  params['not_validated'] = not_validated === null ? '' : not_validated ? 'true' : 'false';
91
91
  params['language_id'] = languageId;
92
92
  params['note'] = note;
93
- params['year'] = year === null ? '' : year;
93
+ params['released_year'] = released_year === null ? '' : released_year;
94
94
  // console.log('paginateSongs')
95
95
  // console.log(params);
96
96
  return yield this.getRelative('/modules/music/albums/paginate', params);
@@ -7,7 +7,7 @@ export declare class JDArtist extends JDResource {
7
7
  listenCount: number;
8
8
  albumsCount: number;
9
9
  songsCount: number;
10
- languageInfo: Record<string, any>;
10
+ language: Record<string, any>;
11
11
  name: Record<string, any>;
12
12
  bio: Record<string, any>;
13
13
  gender: Record<string, any>;
@@ -66,10 +66,9 @@ export declare class JDArtist extends JDResource {
66
66
  }): Promise<import("../../../jdConnector").SimpleResponse>;
67
67
  getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
68
68
  updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
69
- updateSingleFields(id: string, { published, recommended, downloadable, note }: {
69
+ updateSingleFields(id: string, { published, recommended, note }: {
70
70
  published?: boolean | null;
71
71
  recommended?: boolean | null;
72
- downloadable?: boolean | null;
73
72
  note?: string | null;
74
73
  }): Promise<import("../../../jdConnector").SimpleResponse>;
75
74
  }
@@ -1 +1 @@
1
- {"version":3,"file":"jdArtist.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/music/jdArtist.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,QAAS,SAAQ,UAAU;IACvC,UAAU,EAAC,M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AW,EAAC;;;;;;;;KAAA;IAShI,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,UAAU,CAAC,EAAE,EAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAC,IAAI;IAIlF,kBAAkB,CAAC,EAAE,EAAC,MAAM,EAAE,EAAC,SAAgB,EAAE,WAAiB,EAAE,IAAU,EAAC,EAAE;QACtF,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,WAAW,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
@@ -22,7 +22,7 @@ export class JDArtist extends JDResource {
22
22
  this.listenCount = 0;
23
23
  this.albumsCount = 0;
24
24
  this.songsCount = 0;
25
- this.languageInfo = {};
25
+ this.language = {};
26
26
  this.name = {};
27
27
  this.bio = {};
28
28
  this.gender = {};
@@ -40,7 +40,7 @@ export class JDArtist extends JDResource {
40
40
  this.listenCount = Utils.getInteger(data, "listen_Count");
41
41
  this.albumsCount = Utils.getInteger(data, "albums_count");
42
42
  this.songsCount = Utils.getInteger(data, "songs_count");
43
- this.languageInfo = Utils.getObject(data, "language_info");
43
+ this.language = Utils.getObject(data, "language_info");
44
44
  this.name = Utils.getObject(data, "name");
45
45
  this.bio = Utils.getObject(data, "bio");
46
46
  this.gender = Utils.getObject(data, "gender");
@@ -107,8 +107,8 @@ export class JDArtist extends JDResource {
107
107
  });
108
108
  }
109
109
  updateSingleFields(id_1, _a) {
110
- return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, downloadable = null, note = null }) {
111
- const body = { published, recommended, downloadable, note };
110
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, note = null }) {
111
+ const body = { published, recommended, note };
112
112
  return yield this.postRelative(`/modules/music/artists/${id}/update/single_fields`, body);
113
113
  });
114
114
  }
@@ -0,0 +1,48 @@
1
+ import JDResource, { ConnectorInfo } from "../../jdResource";
2
+ export declare class JdRadioStation extends JDResource {
3
+ licenseKey: string;
4
+ activationsCount: number;
5
+ maxActivationsCount: number;
6
+ countryId: string;
7
+ stateId: string;
8
+ cityId: string;
9
+ districtId: string;
10
+ address: Record<string, any>;
11
+ country: Record<string, any>;
12
+ state: Record<string, any>;
13
+ city: Record<string, any>;
14
+ district: Record<string, any>;
15
+ get localisedAddress(): string;
16
+ get countryTitleEN(): string;
17
+ get countryTitleMM(): string;
18
+ get stateTitleEN(): string;
19
+ get stateTitleMM(): string;
20
+ get cityTitleEN(): string;
21
+ get cityTitleMM(): string;
22
+ get districtTitleEN(): string;
23
+ get districtTitleMM(): string;
24
+ expiryDate: Date;
25
+ constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
26
+ setData(data: Record<string, any>): void;
27
+ getRadioStations(isRecommended?: boolean, orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
28
+ paginateRadioStations({ titleEN, titleMM, published, recommended, note, orderBy, order, pageIndex, countPerPage, fields }: {
29
+ titleEN?: string | null;
30
+ titleMM?: string | null;
31
+ published?: boolean | null;
32
+ recommended?: boolean | null;
33
+ note?: string | null;
34
+ orderBy?: string | null;
35
+ order?: string | null;
36
+ pageIndex?: number | null;
37
+ countPerPage?: number | null;
38
+ fields?: string | null;
39
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
40
+ getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
41
+ updateInfo(id: string, title: Record<string, string>, slug: string, expiryDate: Date): Promise<import("../../../jdConnector").SimpleResponse>;
42
+ updateSingleFields(id: string, { published, recommended, note }: {
43
+ published?: boolean | null;
44
+ recommended?: boolean | null;
45
+ note?: string | null;
46
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
47
+ }
48
+ //# sourceMappingURL=jdRadioStation.d.ts.map
@@ -0,0 +1 @@
1
+ {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@@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import JDResource, { ConnectorInfo } from "../../jdResource";
11
+ import { Utils } from "../../../utilities/utils";
12
+ export class JdRadioStation extends JDResource {
13
+ get localisedAddress() {
14
+ return globalThis.language != 'en' ? `${this.districtTitleMM}, ${this.stateTitleMM}, ${this.cityTitleMM}, ${this.countryTitleMM},` :
15
+ `${this.districtTitleEN}, ${this.stateTitleEN}, ${this.cityTitleEN}, ${this.countryTitleEN},`;
16
+ }
17
+ get countryTitleEN() { return Utils.getString(Utils.getObject(this.country, 'title'), 'en'); }
18
+ get countryTitleMM() { return Utils.getString(Utils.getObject(this.country, 'title'), 'mm'); }
19
+ get stateTitleEN() { return Utils.getString(Utils.getObject(this.state, 'title'), 'en'); }
20
+ get stateTitleMM() { return Utils.getString(Utils.getObject(this.state, 'title'), 'mm'); }
21
+ get cityTitleEN() { return Utils.getString(Utils.getObject(this.city, 'title'), 'en'); }
22
+ get cityTitleMM() { return Utils.getString(Utils.getObject(this.city, 'title'), 'mm'); }
23
+ get districtTitleEN() { return Utils.getString(Utils.getObject(this.district, 'title'), 'en'); }
24
+ get districtTitleMM() { return Utils.getString(Utils.getObject(this.district, 'title'), 'mm'); }
25
+ constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
26
+ super(connectorInfo);
27
+ this.licenseKey = "";
28
+ this.activationsCount = 0;
29
+ this.maxActivationsCount = 0;
30
+ this.countryId = "";
31
+ this.stateId = "";
32
+ this.cityId = "";
33
+ this.districtId = "";
34
+ this.address = {};
35
+ this.country = {};
36
+ this.state = {};
37
+ this.city = {};
38
+ this.district = {};
39
+ this.expiryDate = new Date();
40
+ this.setData(data);
41
+ }
42
+ setData(data) {
43
+ super.setData(data);
44
+ this.licenseKey = Utils.getString(data, "license_key");
45
+ this.activationsCount = Utils.getInteger(data, "activations_count");
46
+ this.maxActivationsCount = Utils.getInteger(data, "max_activations_count");
47
+ this.countryId = Utils.getString(data, "country_id");
48
+ this.stateId = Utils.getString(data, "state_id");
49
+ this.cityId = Utils.getString(data, "city_id");
50
+ this.districtId = Utils.getString(data, "district_id");
51
+ this.address = Utils.getObject(data, "address");
52
+ this.country = Utils.getObject(data, "country");
53
+ this.state = Utils.getObject(data, "state");
54
+ this.city = Utils.getObject(data, "city");
55
+ this.district = Utils.getObject(data, "district");
56
+ this.expiryDate = Utils.getDate(data, "expiry_date");
57
+ }
58
+ getRadioStations() {
59
+ return __awaiter(this, arguments, void 0, function* (isRecommended = false, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '') {
60
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
61
+ if (Utils.isset(isRecommended)) {
62
+ params['recommended'] = isRecommended ? 'true' : 'false';
63
+ }
64
+ return yield this.getRelative('/modules/karaoke/ktv_shops', params);
65
+ });
66
+ }
67
+ paginateRadioStations(_a) {
68
+ return __awaiter(this, arguments, void 0, function* ({ titleEN = "", titleMM = "", published = null, recommended = null, note = '', orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
69
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
70
+ //Addon filters
71
+ params['title.en'] = titleEN;
72
+ params['title.mm'] = titleMM;
73
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
74
+ params['recommended'] = recommended === null ? '' : recommended ? 'true' : 'false';
75
+ params['note'] = note;
76
+ return yield this.getRelative('/modules/radio_station/radio_stations/paginate', params);
77
+ });
78
+ }
79
+ getInfo(id) {
80
+ return __awaiter(this, void 0, void 0, function* () {
81
+ return yield this.getRelative(`/modules/radio_station/radio_stations/${id}`, {});
82
+ });
83
+ }
84
+ updateInfo(id, title, slug, expiryDate) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ return yield this.getRelative(`/modules/radio_station/radio_stations/${id}`, {});
87
+ });
88
+ }
89
+ updateSingleFields(id_1, _a) {
90
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, recommended = null, note = null }) {
91
+ const body = { published, recommended, note };
92
+ return yield this.postRelative(`/modules/radio_station/radio_stations/${id}/update/single_fields`, body);
93
+ });
94
+ }
95
+ }
@@ -20,6 +20,16 @@ export declare class JDPermission extends JDResource {
20
20
  countPerPage?: number | undefined;
21
21
  fields?: string | undefined;
22
22
  }): Promise<import("../../../jdConnector").SimpleResponse>;
23
+ paginatePermissions({ name, guard_name, published, orderBy, order, pageIndex, countPerPage, fields }: {
24
+ name?: string | null;
25
+ guard_name?: string | null;
26
+ published?: boolean | null;
27
+ orderBy?: string | null;
28
+ order?: string | null;
29
+ pageIndex?: number | null;
30
+ countPerPage?: number | null;
31
+ fields?: string | null;
32
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
23
33
  findPermissions({ name, published, orderBy, order, pageIndex, countPerPage, fields }: {
24
34
  name?: string | undefined;
25
35
  published?: string | undefined;
@@ -31,5 +41,9 @@ export declare class JDPermission extends JDResource {
31
41
  }): Promise<import("../../../jdConnector").SimpleResponse>;
32
42
  getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
33
43
  publish(id: string, published: boolean): Promise<import("../../../jdConnector").SimpleResponse>;
44
+ updateSingleFields(id: string, { published, note }: {
45
+ published?: boolean | null;
46
+ note?: string | null;
47
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
34
48
  }
35
49
  //# sourceMappingURL=jdPermission.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jdPermission.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/user/jdPermission.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,YAAa,SAAQ,UAAU;IAC3C,IAAI,EAAC,MAAM,CAAM;IACjB,SAAS,EAAC,MAAM,CAAM;IACtB,gBAAgB,EAAC,MAAM,CAAM;IAC7B,qBAAqB,EAAC,MAAM,CAAM;IAClC,mBAAmB,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAC7C,OAAO,EAAE,GAAG,EAAE,CAAM;gBAER,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAU1B,mBAAmB;IAInB,4BAA4B;IAK5B,cAAc,CAAC,EAAC,IAAS,EAAE,SAAc,EAAE,SAAc,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;;;;KAAA;IASjJ,eAAe,CAAC,EAAC,IAAS,EAAE,SAAc,EAAE,OAAsB,EAAE,KAAc,EAAE,SAAa,EAAE,YAAiB,EAAE,MAAW,EAAC;;;;;;;;KAAA;IAQlI,OAAO,CAAC,EAAE,EAAC,MAAM;IAIjB,OAAO,CAAC,EAAE,EAAC,MAAM,EAAE,SAAS,EAAC,OAAO;CAI1C"}
1
+ {"version":3,"file":"jdPermission.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/user/jdPermission.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,YAAa,SAAQ,UAAU;IAC3C,IAAI,EAAC,MAAM,CAAM;IACjB,SAAS,EAAC,MAAM,CAAM;IACtB,gBAAgB,EAAC,MAAM,CAAM;IAC7B,qBAAqB,EAAC,MAAM,CAAM;IAClC,mB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U,EAAC,EAAE;QACnE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
@@ -49,6 +49,16 @@ export class JDPermission extends JDResource {
49
49
  return yield this.getRelative('/modules/user/permissions', params);
50
50
  });
51
51
  }
52
+ paginatePermissions(_a) {
53
+ return __awaiter(this, arguments, void 0, function* ({ name = "", guard_name = "", published = null, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
54
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
55
+ //Addon filters
56
+ params['name'] = name;
57
+ params['guard_name'] = guard_name;
58
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
59
+ return yield this.getRelative('/modules/user/permissions/paginate', params);
60
+ });
61
+ }
52
62
  // Find the permission with text search index which is a fast way to search the whole word
53
63
  findPermissions(_a) {
54
64
  return __awaiter(this, arguments, void 0, function* ({ name = "", published = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
@@ -70,4 +80,10 @@ export class JDPermission extends JDResource {
70
80
  return yield this.postRelative(`/modules/user/permissions/${id}/publish`, body);
71
81
  });
72
82
  }
83
+ updateSingleFields(id_1, _a) {
84
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, note = null }) {
85
+ const body = { published, note };
86
+ return yield this.postRelative(`/modules/user/permissions/${id}/update/single_fields`, body);
87
+ });
88
+ }
73
89
  }
@@ -0,0 +1,47 @@
1
+ import JDResource, { ConnectorInfo } from "../../jdResource";
2
+ export declare class JDPermissionGroup extends JDResource {
3
+ constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
4
+ setData(data: Record<string, any>): void;
5
+ getPermissionGroups({ name, guardName, published, orderBy, order, pageIndex, countPerPage, fields }: {
6
+ name?: string | undefined;
7
+ guardName?: string | undefined;
8
+ published?: string | undefined;
9
+ orderBy?: string | undefined;
10
+ order?: string | undefined;
11
+ pageIndex?: number | undefined;
12
+ countPerPage?: number | undefined;
13
+ fields?: string | undefined;
14
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
15
+ paginateContents({ name, guard_name, published, orderBy, order, pageIndex, countPerPage, fields }: {
16
+ name?: string | null;
17
+ guard_name?: string | null;
18
+ published?: boolean | null;
19
+ orderBy?: string | null;
20
+ order?: string | null;
21
+ pageIndex?: number | null;
22
+ countPerPage?: number | null;
23
+ fields?: string | null;
24
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
25
+ getPermissions(permissionGroupId: string, { orderBy, order, pageIndex, countPerPage, fields }: {
26
+ orderBy?: string | undefined;
27
+ order?: string | undefined;
28
+ pageIndex?: number | undefined;
29
+ countPerPage?: number | undefined;
30
+ fields?: string | undefined;
31
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
32
+ findPermissions({ name, published, orderBy, order, pageIndex, countPerPage, fields }: {
33
+ name?: string | undefined;
34
+ published?: string | undefined;
35
+ orderBy?: string | undefined;
36
+ order?: string | undefined;
37
+ pageIndex?: number | undefined;
38
+ countPerPage?: number | undefined;
39
+ fields?: string | undefined;
40
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
41
+ getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
42
+ updateSingleFields(id: string, { published, note }: {
43
+ published?: boolean | null;
44
+ note?: string | null;
45
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
46
+ }
47
+ //# sourceMappingURL=jdPermissionGroup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jdPermissionGroup.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/user/jdPermissionGroup.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,iBAAkB,SAAQ,UAAU;gBACpC,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,O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@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import JDResource, { ConnectorInfo } from "../../jdResource";
11
+ export class JDPermissionGroup extends JDResource {
12
+ constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
13
+ super(connectorInfo);
14
+ this.setData(data);
15
+ }
16
+ setData(data) {
17
+ super.setData(data);
18
+ }
19
+ // Filter the permission_group_groups with custom searches which may be slow but will get better accuracy
20
+ getPermissionGroups(_a) {
21
+ return __awaiter(this, arguments, void 0, function* ({ name = "", guardName = "", published = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
22
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
23
+ params['name'] = name;
24
+ params['guard_name'] = guardName;
25
+ params['published'] = published;
26
+ return yield this.getRelative('/modules/user/permission_groups', params);
27
+ });
28
+ }
29
+ paginateContents(_a) {
30
+ return __awaiter(this, arguments, void 0, function* ({ name = "", guard_name = "", published = null, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
31
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
32
+ //Addon filters
33
+ params['name'] = name;
34
+ params['guard_name'] = guard_name;
35
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
36
+ return yield this.getRelative('/modules/user/permission_groups/paginate', params);
37
+ });
38
+ }
39
+ getPermissions(permissionGroupId_1, _a) {
40
+ return __awaiter(this, arguments, void 0, function* (permissionGroupId, { orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
41
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
42
+ return yield this.getRelative(`/modules/user/permission_groups/${permissionGroupId}/permissions`, params);
43
+ });
44
+ }
45
+ // Find the permission_group with text search index which is a fast way to search the whole word
46
+ findPermissions(_a) {
47
+ return __awaiter(this, arguments, void 0, function* ({ name = "", published = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
48
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
49
+ params['name'] = name;
50
+ params['published'] = published;
51
+ return yield this.getRelative('/modules/user/permission_groups/find', params);
52
+ });
53
+ }
54
+ // Get the user information
55
+ getInfo(id) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ return yield this.getRelative(`/modules/user/permission_groups/${id}`, {});
58
+ });
59
+ }
60
+ updateSingleFields(id_1, _a) {
61
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, note = null }) {
62
+ const body = { published, note };
63
+ return yield this.postRelative(`/modules/user/permission_groups/${id}/update/single_fields`, body);
64
+ });
65
+ }
66
+ }
@@ -9,10 +9,32 @@ export declare class JDUser extends JDResource {
9
9
  constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
10
10
  setData(data: Record<string, any>): void;
11
11
  getUsers(orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
12
+ paginateContents({ name, username, email, phone, published, orderBy, order, pageIndex, countPerPage, fields }: {
13
+ name?: string | null;
14
+ username?: string | null;
15
+ email?: string | null;
16
+ phone?: string | null;
17
+ published?: boolean | null;
18
+ orderBy?: string | null;
19
+ order?: string | null;
20
+ pageIndex?: number | null;
21
+ countPerPage?: number | null;
22
+ fields?: string | null;
23
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
12
24
  findUsers(name: string, orderBy?: string, order?: string, pageIndex?: number, countPerPage?: number, fields?: string): Promise<import("../../../jdConnector").SimpleResponse>;
13
25
  authenticate(username: string, password: string): Promise<import("../../../jdConnector").SimpleResponse>;
14
26
  register(name: string, username: string, email: string, phone: string, password: string): Promise<import("../../../jdConnector").SimpleResponse>;
15
27
  logout(): Promise<import("../../../jdConnector").SimpleResponse>;
16
28
  getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
29
+ updateSingleFields(id: string, { name, username, phone, email, published, note }: {
30
+ name?: string | null;
31
+ username?: string | null;
32
+ phone?: string | null;
33
+ email?: string | null;
34
+ published?: boolean | null;
35
+ recommended?: boolean | null;
36
+ downloadable?: boolean | null;
37
+ note?: string | null;
38
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
17
39
  }
18
40
  //# sourceMappingURL=jdUser.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"jdUser.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/user/jdUser.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,MAAO,SAAQ,UAAU;IACrC,IAAI,EAAC,MAAM,CAAM;IACjB,QAAQ,EAAC,MAAM,CAAM;IACrB,KAAK,EAAC,MAAM,CAAM;IAClB,KAAK,EAAC,MAAM,CAAM;IAClB,YAAY,EAAE,GAAG,EAAE,CAAM;IAEzB,IAAI,UAAU,IAAG,OAAO,CAA+C;gBAE3D,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM,EAAE,aAAa,GAAE,aAAyC;IAKpG,OAAO,CAAC,IAAI,EAAC,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;IAS1B,QAAQ,CAAC,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAAY,SAAK,EAAE,MAAM,SAAK;IAK9F,SAAS,CAAC,IAAI,EAAC,MAAM,EAAE,OAAO,SAAe,EAAE,KAAK,SAAS,EAAE,SAAS,SAAI,EAAE,YAA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I,CAAC;KACrB;CAID"}
@@ -34,6 +34,18 @@ export class JDUser extends JDResource {
34
34
  return yield this.getRelative('/modules/user/users', params);
35
35
  });
36
36
  }
37
+ paginateContents(_a) {
38
+ return __awaiter(this, arguments, void 0, function* ({ name = "", username = "", email = "", phone = "", published = null, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
39
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
40
+ //Addon filters
41
+ params['name'] = name;
42
+ params['username'] = username;
43
+ params['email'] = email;
44
+ params['phone'] = phone;
45
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
46
+ return yield this.getRelative('/modules/user/users/paginate', params);
47
+ });
48
+ }
37
49
  findUsers(name_1) {
38
50
  return __awaiter(this, arguments, void 0, function* (name, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '') {
39
51
  const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
@@ -68,4 +80,10 @@ export class JDUser extends JDResource {
68
80
  return yield this.getRelative(`/modules/user/users/${id}`, {});
69
81
  });
70
82
  }
83
+ updateSingleFields(id_1, _a) {
84
+ return __awaiter(this, arguments, void 0, function* (id, { name = "", username = "", phone = "", email = "", published = null, note = "" }) {
85
+ const body = { name, username, phone, email, published, note };
86
+ return yield this.postRelative(`/modules/user/users/me/update/single_fields`, body);
87
+ });
88
+ }
71
89
  }
@@ -0,0 +1,52 @@
1
+ import JDResource, { ConnectorInfo } from "../../jdResource";
2
+ export declare class JDUserRole extends JDResource {
3
+ permissionIds: any[];
4
+ constructor(data?: Record<string, any>, connectorInfo?: ConnectorInfo);
5
+ setData(data: Record<string, any>): void;
6
+ getContents({ orderBy, order, pageIndex, countPerPage, fields }: {
7
+ orderBy?: string | undefined;
8
+ order?: string | undefined;
9
+ pageIndex?: number | undefined;
10
+ countPerPage?: number | undefined;
11
+ fields?: string | undefined;
12
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
13
+ paginateContents({ name, guard_name, published, orderBy, order, pageIndex, countPerPage, fields }: {
14
+ name?: string | null;
15
+ guard_name?: string | null;
16
+ published?: boolean | null;
17
+ orderBy?: string | null;
18
+ order?: string | null;
19
+ pageIndex?: number | null;
20
+ countPerPage?: number | null;
21
+ fields?: string | null;
22
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
23
+ getUsers(userRoleId: string, { orderBy, order, pageIndex, countPerPage, fields }: {
24
+ orderBy?: string | undefined;
25
+ order?: string | undefined;
26
+ pageIndex?: number | undefined;
27
+ countPerPage?: number | undefined;
28
+ fields?: string | undefined;
29
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
30
+ getPermissions(userRoleId: string, { orderBy, order, pageIndex, countPerPage, fields }: {
31
+ orderBy?: string | undefined;
32
+ order?: string | undefined;
33
+ pageIndex?: number | undefined;
34
+ countPerPage?: number | undefined;
35
+ fields?: string | undefined;
36
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
37
+ findPermissions({ name, published, orderBy, order, pageIndex, countPerPage, fields }: {
38
+ name?: string | undefined;
39
+ published?: string | undefined;
40
+ orderBy?: string | undefined;
41
+ order?: string | undefined;
42
+ pageIndex?: number | undefined;
43
+ countPerPage?: number | undefined;
44
+ fields?: string | undefined;
45
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
46
+ getInfo(id: string): Promise<import("../../../jdConnector").SimpleResponse>;
47
+ updateSingleFields(id: string, { published, note }: {
48
+ published?: boolean | null;
49
+ note?: string | null;
50
+ }): Promise<import("../../../jdConnector").SimpleResponse>;
51
+ }
52
+ //# sourceMappingURL=jdUserRole.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"jdUserRole.d.ts","sourceRoot":"","sources":["../../../../../src/sdk/models/modules/user/jdUserRole.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,EAAE,EAAC,aAAa,EAAC,MAAM,kBAAkB,CAAC;AAE3D,qBAAa,UAAW,SAAQ,UAAU;IACzC,aAAa,EAAC,GAAG,EAA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MAAM,EAAE,EAAC,SAAgB,EAAE,IAAU,EAAC,EAAE;QACnE,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;QAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACrB;CAID"}
@@ -0,0 +1,72 @@
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
+ return new (P || (P = Promise))(function (resolve, reject) {
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import JDResource, { ConnectorInfo } from "../../jdResource";
11
+ import { Utils } from "../../../utilities/utils";
12
+ export class JDUserRole extends JDResource {
13
+ constructor(data = {}, connectorInfo = new ConnectorInfo("", "")) {
14
+ super(connectorInfo);
15
+ this.permissionIds = [];
16
+ this.setData(data);
17
+ }
18
+ setData(data) {
19
+ super.setData(data);
20
+ this.permissionIds = Utils.getArray(data, 'permission_ids');
21
+ }
22
+ // Filter the user roles with custom searches which may be slow but will get better accuracy
23
+ getContents(_a) {
24
+ return __awaiter(this, arguments, void 0, function* ({ orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
25
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
26
+ return yield this.getRelative('/modules/user/user_roles', params);
27
+ });
28
+ }
29
+ paginateContents(_a) {
30
+ return __awaiter(this, arguments, void 0, function* ({ name = "", guard_name = "", published = null, orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
31
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
32
+ //Addon filters
33
+ params['name'] = name;
34
+ params['guard_name'] = guard_name;
35
+ params['published'] = published === null ? '' : published ? 'true' : 'false';
36
+ return yield this.getRelative('/modules/user/user_roles/paginate', params);
37
+ });
38
+ }
39
+ getUsers(userRoleId_1, _a) {
40
+ return __awaiter(this, arguments, void 0, function* (userRoleId, { orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
41
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
42
+ return yield this.getRelative(`/modules/user/user_roles/${userRoleId}/users`, params);
43
+ });
44
+ }
45
+ getPermissions(userRoleId_1, _a) {
46
+ return __awaiter(this, arguments, void 0, function* (userRoleId, { orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
47
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
48
+ return yield this.getRelative(`/modules/user/user_roles/${userRoleId}/permissions`, params);
49
+ });
50
+ }
51
+ // Find the user_role with text search index which is a fast way to search the whole word
52
+ findPermissions(_a) {
53
+ return __awaiter(this, arguments, void 0, function* ({ name = "", published = "", orderBy = 'updated_at', order = 'desc', pageIndex = 0, countPerPage = 20, fields = '' }) {
54
+ const params = this.getSortParameters(orderBy, order, pageIndex, countPerPage, fields);
55
+ params['name'] = name;
56
+ params['published'] = published;
57
+ return yield this.getRelative('/modules/user/user_roles/find', params);
58
+ });
59
+ }
60
+ // Get the user information
61
+ getInfo(id) {
62
+ return __awaiter(this, void 0, void 0, function* () {
63
+ return yield this.getRelative(`/modules/user/user_roles/${id}`, {});
64
+ });
65
+ }
66
+ updateSingleFields(id_1, _a) {
67
+ return __awaiter(this, arguments, void 0, function* (id, { published = null, note = null }) {
68
+ const body = { published, note };
69
+ return yield this.postRelative(`/modules/user/user_roles/${id}/update/single_fields`, body);
70
+ });
71
+ }
72
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jd_platform_sdk",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -33,6 +33,8 @@
33
33
  "jest": "^29.7.0",
34
34
  "jsdom": "^25.0.1",
35
35
  "ts-jest": "^29.2.5",
36
+ "ts-node": "^10.9.2",
37
+ "tsx": "^4.19.2",
36
38
  "typescript": "^5.6.3",
37
39
  "vitest": "^2.1.4"
38
40
  },
package/readme.md CHANGED
@@ -32,6 +32,15 @@ npm install --save-dev @types/crypto-js
32
32
  npx vitest
33
33
  ````
34
34
 
35
+ ### Individual file tests
36
+ ````
37
+ npm install ts-node typescript --save-dev
38
+ npm i -D tsx
39
+
40
+ npx ts-node .\test-script.ts
41
+ node --import=tsx .\test-script.ts
42
+ ````
43
+
35
44
  ### Linking project
36
45
  ````
37
46
  cd /path/to/my-utils-package