@tammsyr/admin-api-client 1.0.1 → 1.0.3

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 (71) hide show
  1. package/dist/ActivityLogs.d.ts +17 -0
  2. package/dist/ActivityLogs.d.ts.map +1 -0
  3. package/dist/ActivityLogs.js +38 -0
  4. package/dist/ActivityLogs.js.map +1 -0
  5. package/dist/Admins.d.ts +67 -0
  6. package/dist/Admins.d.ts.map +1 -0
  7. package/dist/Admins.js +124 -0
  8. package/dist/Admins.js.map +1 -0
  9. package/dist/AgentBranches.d.ts +67 -0
  10. package/dist/AgentBranches.d.ts.map +1 -0
  11. package/dist/AgentBranches.js +119 -0
  12. package/dist/AgentBranches.js.map +1 -0
  13. package/dist/AgentSettlements.d.ts +87 -0
  14. package/dist/AgentSettlements.d.ts.map +1 -0
  15. package/dist/AgentSettlements.js +151 -0
  16. package/dist/AgentSettlements.js.map +1 -0
  17. package/dist/Agents.d.ts +157 -0
  18. package/dist/Agents.d.ts.map +1 -0
  19. package/dist/Agents.js +264 -0
  20. package/dist/Agents.js.map +1 -0
  21. package/dist/Auth.d.ts +42 -0
  22. package/dist/Auth.d.ts.map +1 -0
  23. package/dist/Auth.js +84 -0
  24. package/dist/Auth.js.map +1 -0
  25. package/dist/Kyc.d.ts +47 -0
  26. package/dist/Kyc.d.ts.map +1 -0
  27. package/dist/Kyc.js +89 -0
  28. package/dist/Kyc.js.map +1 -0
  29. package/dist/Notifications.d.ts +47 -0
  30. package/dist/Notifications.d.ts.map +1 -0
  31. package/dist/Notifications.js +85 -0
  32. package/dist/Notifications.js.map +1 -0
  33. package/dist/Permissions.d.ts +57 -0
  34. package/dist/Permissions.d.ts.map +1 -0
  35. package/dist/Permissions.js +107 -0
  36. package/dist/Permissions.js.map +1 -0
  37. package/dist/Roles.d.ts +87 -0
  38. package/dist/Roles.d.ts.map +1 -0
  39. package/dist/Roles.js +158 -0
  40. package/dist/Roles.js.map +1 -0
  41. package/dist/Seed.d.ts +17 -0
  42. package/dist/Seed.d.ts.map +1 -0
  43. package/dist/Seed.js +40 -0
  44. package/dist/Seed.js.map +1 -0
  45. package/dist/data-contracts.d.ts +1105 -0
  46. package/dist/data-contracts.d.ts.map +1 -0
  47. package/dist/data-contracts.js +14 -0
  48. package/dist/data-contracts.js.map +1 -0
  49. package/dist/http-client.d.ts +43 -0
  50. package/dist/http-client.d.ts.map +1 -0
  51. package/dist/http-client.js +111 -0
  52. package/dist/http-client.js.map +1 -0
  53. package/dist/index.d.ts +80 -0
  54. package/dist/index.d.ts.map +1 -0
  55. package/dist/index.js +144 -0
  56. package/dist/index.js.map +1 -0
  57. package/package.json +9 -11
  58. package/ActivityLogs.ts +0 -41
  59. package/Admins.ts +0 -154
  60. package/AgentBranches.ts +0 -152
  61. package/AgentSettlements.ts +0 -204
  62. package/Agents.ts +0 -359
  63. package/Auth.ts +0 -100
  64. package/Kyc.ts +0 -107
  65. package/Notifications.ts +0 -101
  66. package/Permissions.ts +0 -130
  67. package/Roles.ts +0 -199
  68. package/Seed.ts +0 -48
  69. package/data-contracts.ts +0 -1283
  70. package/http-client.ts +0 -186
  71. package/index.ts +0 -157
package/dist/Auth.js ADDED
@@ -0,0 +1,84 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ // @ts-nocheck
5
+ /*
6
+ * ---------------------------------------------------------------
7
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
8
+ * ## ##
9
+ * ## AUTHOR: acacode ##
10
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
11
+ * ---------------------------------------------------------------
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Auth = void 0;
15
+ const http_client_1 = require("./http-client");
16
+ class Auth {
17
+ constructor(http) {
18
+ /**
19
+ * @description Authenticate admin with email and password
20
+ *
21
+ * @tags Admin Auth
22
+ * @name Login
23
+ * @summary Admin login
24
+ * @request POST:/auth/login
25
+ */
26
+ this.login = (data, params = {}) => this.http.request({
27
+ path: `/auth/login`,
28
+ method: "POST",
29
+ body: data,
30
+ type: http_client_1.ContentType.Json,
31
+ format: "json",
32
+ ...params,
33
+ });
34
+ /**
35
+ * @description Refresh access token using refresh token
36
+ *
37
+ * @tags Admin Auth
38
+ * @name Refresh
39
+ * @summary Refresh tokens
40
+ * @request POST:/auth/refresh
41
+ */
42
+ this.refresh = (data, params = {}) => this.http.request({
43
+ path: `/auth/refresh`,
44
+ method: "POST",
45
+ body: data,
46
+ type: http_client_1.ContentType.Json,
47
+ format: "json",
48
+ ...params,
49
+ });
50
+ /**
51
+ * @description Logout current session
52
+ *
53
+ * @tags Admin Auth
54
+ * @name Logout
55
+ * @summary Logout
56
+ * @request POST:/auth/logout
57
+ */
58
+ this.logout = (data, params = {}) => this.http.request({
59
+ path: `/auth/logout`,
60
+ method: "POST",
61
+ body: data,
62
+ type: http_client_1.ContentType.Json,
63
+ format: "json",
64
+ ...params,
65
+ });
66
+ /**
67
+ * No description
68
+ *
69
+ * @tags Admin Auth
70
+ * @name Seed
71
+ * @request POST:/auth/seed
72
+ */
73
+ this.seed = (data, params = {}) => this.http.request({
74
+ path: `/auth/seed`,
75
+ method: "POST",
76
+ body: data,
77
+ type: http_client_1.ContentType.Json,
78
+ ...params,
79
+ });
80
+ this.http = http;
81
+ }
82
+ }
83
+ exports.Auth = Auth;
84
+ //# sourceMappingURL=Auth.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Auth.js","sourceRoot":"","sources":["../Auth.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB,cAAc;AACd;;;;;;;GAOG;;;AAcH,+CAAuE;AAEvE,MAAa,IAAI;IAGf,YAAY,IAAkC;QAI9C;;;;;;;WAOG;QACH,UAAK,GAAG,CAAC,IAA0B,EAAE,SAAwB,EAAE,EAAE,EAAE,CACjE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAwB;YACvC,IAAI,EAAE,aAAa;YACnB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,yBAAW,CAAC,IAAI;YACtB,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;WAOG;QACH,YAAO,GAAG,CAAC,IAAiC,EAAE,SAAwB,EAAE,EAAE,EAAE,CAC1E,IAAI,CAAC,IAAI,CAAC,OAAO,CAA4B;YAC3C,IAAI,EAAE,eAAe;YACrB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,yBAAW,CAAC,IAAI;YACtB,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;WAOG;QACH,WAAM,GAAG,CAAC,IAA2B,EAAE,SAAwB,EAAE,EAAE,EAAE,CACnE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAkB;YACjC,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,yBAAW,CAAC,IAAI;YACtB,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;WAMG;QACH,SAAI,GAAG,CAAC,IAAyB,EAAE,SAAwB,EAAE,EAAE,EAAE,CAC/D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAgB;YAC/B,IAAI,EAAE,YAAY;YAClB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,IAAI,EAAE,yBAAW,CAAC,IAAI;YACtB,GAAG,MAAM;SACV,CAAC,CAAC;QApEH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAoEF;AAzED,oBAyEC"}
package/dist/Kyc.d.ts ADDED
@@ -0,0 +1,47 @@
1
+ import { FindAllParams10, FindByIdParams6, UpdateKycStatusDto, UpdateStatusParams2 } from "./data-contracts";
2
+ import { HttpClient, RequestParams } from "./http-client";
3
+ export declare class Kyc<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
6
+ /**
7
+ * @description Get counts of KYC requests by status (total, pending, under review, approved, rejected)
8
+ *
9
+ * @tags KYC
10
+ * @name GetStatistics
11
+ * @summary Get KYC statistics
12
+ * @request GET:/kyc/statistics
13
+ * @secure
14
+ */
15
+ getStatistics: (params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").KycStatisticsResponseDto, any, {}>>;
16
+ /**
17
+ * @description Get paginated KYC list with optional search and filter by status
18
+ *
19
+ * @tags KYC
20
+ * @name FindAll
21
+ * @summary List all KYC submissions
22
+ * @request GET:/kyc
23
+ * @secure
24
+ */
25
+ findAll: (query: FindAllParams10, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").KycListResponseDto, any, {}>>;
26
+ /**
27
+ * @description Get KYC submission details by request ID
28
+ *
29
+ * @tags KYC
30
+ * @name FindById
31
+ * @summary Get single KYC by ID
32
+ * @request GET:/kyc/{id}
33
+ * @secure
34
+ */
35
+ findById: ({ id, ...query }: FindByIdParams6, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").KycRequestResponseDto, any, {}>>;
36
+ /**
37
+ * @description Set status to under_review (start review), rejected or verified (approve).
38
+ *
39
+ * @tags KYC
40
+ * @name UpdateStatus
41
+ * @summary Update KYC status
42
+ * @request POST:/kyc/{id}/status
43
+ * @secure
44
+ */
45
+ updateStatus: ({ id, ...query }: UpdateStatusParams2, data: UpdateKycStatusDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").KycRequestResponseDto, any, {}>>;
46
+ }
47
+ //# sourceMappingURL=Kyc.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kyc.d.ts","sourceRoot":"","sources":["../Kyc.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,eAAe,EAGf,eAAe,EAEf,kBAAkB,EAClB,mBAAmB,EAEpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAe,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEvE,qBAAa,GAAG,CAAC,gBAAgB,GAAG,OAAO;IACzC,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;gBAEvB,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAI9C;;;;;;;;OAQG;IACH,aAAa,GAAI,SAAQ,aAAkB,0GAOtC;IACL;;;;;;;;OAQG;IACH,OAAO,GAAI,OAAO,eAAe,EAAE,SAAQ,aAAkB,oGAQxD;IACL;;;;;;;;OAQG;IACH,QAAQ,GAAI,kBAAkB,eAAe,EAAE,SAAQ,aAAkB,uGAOpE;IACL;;;;;;;;OAQG;IACH,YAAY,GACV,kBAAkB,mBAAmB,EACrC,MAAM,kBAAkB,EACxB,SAAQ,aAAkB,uGAUvB;CACN"}
package/dist/Kyc.js ADDED
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ // @ts-nocheck
5
+ /*
6
+ * ---------------------------------------------------------------
7
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
8
+ * ## ##
9
+ * ## AUTHOR: acacode ##
10
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
11
+ * ---------------------------------------------------------------
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Kyc = void 0;
15
+ const http_client_1 = require("./http-client");
16
+ class Kyc {
17
+ constructor(http) {
18
+ /**
19
+ * @description Get counts of KYC requests by status (total, pending, under review, approved, rejected)
20
+ *
21
+ * @tags KYC
22
+ * @name GetStatistics
23
+ * @summary Get KYC statistics
24
+ * @request GET:/kyc/statistics
25
+ * @secure
26
+ */
27
+ this.getStatistics = (params = {}) => this.http.request({
28
+ path: `/kyc/statistics`,
29
+ method: "GET",
30
+ secure: true,
31
+ format: "json",
32
+ ...params,
33
+ });
34
+ /**
35
+ * @description Get paginated KYC list with optional search and filter by status
36
+ *
37
+ * @tags KYC
38
+ * @name FindAll
39
+ * @summary List all KYC submissions
40
+ * @request GET:/kyc
41
+ * @secure
42
+ */
43
+ this.findAll = (query, params = {}) => this.http.request({
44
+ path: `/kyc`,
45
+ method: "GET",
46
+ query: query,
47
+ secure: true,
48
+ format: "json",
49
+ ...params,
50
+ });
51
+ /**
52
+ * @description Get KYC submission details by request ID
53
+ *
54
+ * @tags KYC
55
+ * @name FindById
56
+ * @summary Get single KYC by ID
57
+ * @request GET:/kyc/{id}
58
+ * @secure
59
+ */
60
+ this.findById = ({ id, ...query }, params = {}) => this.http.request({
61
+ path: `/kyc/${id}`,
62
+ method: "GET",
63
+ secure: true,
64
+ format: "json",
65
+ ...params,
66
+ });
67
+ /**
68
+ * @description Set status to under_review (start review), rejected or verified (approve).
69
+ *
70
+ * @tags KYC
71
+ * @name UpdateStatus
72
+ * @summary Update KYC status
73
+ * @request POST:/kyc/{id}/status
74
+ * @secure
75
+ */
76
+ this.updateStatus = ({ id, ...query }, data, params = {}) => this.http.request({
77
+ path: `/kyc/${id}/status`,
78
+ method: "POST",
79
+ body: data,
80
+ secure: true,
81
+ type: http_client_1.ContentType.Json,
82
+ format: "json",
83
+ ...params,
84
+ });
85
+ this.http = http;
86
+ }
87
+ }
88
+ exports.Kyc = Kyc;
89
+ //# sourceMappingURL=Kyc.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kyc.js","sourceRoot":"","sources":["../Kyc.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB,cAAc;AACd;;;;;;;GAOG;;;AAYH,+CAAuE;AAEvE,MAAa,GAAG;IAGd,YAAY,IAAkC;QAI9C;;;;;;;;WAQG;QACH,kBAAa,GAAG,CAAC,SAAwB,EAAE,EAAE,EAAE,CAC7C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAyB;YACxC,IAAI,EAAE,iBAAiB;YACvB,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,YAAO,GAAG,CAAC,KAAsB,EAAE,SAAwB,EAAE,EAAE,EAAE,CAC/D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAsB;YACrC,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,aAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,EAAmB,EAAE,SAAwB,EAAE,EAAE,EAAE,CAC3E,IAAI,CAAC,IAAI,CAAC,OAAO,CAAwB;YACvC,IAAI,EAAE,QAAQ,EAAE,EAAE;YAClB,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,iBAAY,GAAG,CACb,EAAE,EAAE,EAAE,GAAG,KAAK,EAAuB,EACrC,IAAwB,EACxB,SAAwB,EAAE,EAC1B,EAAE,CACF,IAAI,CAAC,IAAI,CAAC,OAAO,CAA2B;YAC1C,IAAI,EAAE,QAAQ,EAAE,SAAS;YACzB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,yBAAW,CAAC,IAAI;YACtB,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QA7EH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CA6EF;AAlFD,kBAkFC"}
@@ -0,0 +1,47 @@
1
+ import { FindAllParams8, MarkAsReadParams } from "./data-contracts";
2
+ import { HttpClient, RequestParams } from "./http-client";
3
+ export declare class Notifications<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
6
+ /**
7
+ * @description Get a paginated list of admin notifications
8
+ *
9
+ * @tags Admin Notifications
10
+ * @name FindAll
11
+ * @summary List notifications
12
+ * @request GET:/notifications
13
+ * @secure
14
+ */
15
+ findAll: (query: FindAllParams8, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").AdminNotificationListResponseDto, any, {}>>;
16
+ /**
17
+ * @description Get the count of unread notifications
18
+ *
19
+ * @tags Admin Notifications
20
+ * @name GetUnreadCount
21
+ * @summary Get unread notification count
22
+ * @request GET:/notifications/unread-count
23
+ * @secure
24
+ */
25
+ getUnreadCount: (params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
26
+ /**
27
+ * @description Mark a specific notification as read
28
+ *
29
+ * @tags Admin Notifications
30
+ * @name MarkAsRead
31
+ * @summary Mark notification as read
32
+ * @request PATCH:/notifications/{id}/read
33
+ * @secure
34
+ */
35
+ markAsRead: ({ id, ...query }: MarkAsReadParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").AdminNotificationResponseDto, any, {}>>;
36
+ /**
37
+ * @description Mark all notifications as read
38
+ *
39
+ * @tags Admin Notifications
40
+ * @name MarkAllAsRead
41
+ * @summary Mark all notifications as read
42
+ * @request PATCH:/notifications/read-all
43
+ * @secure
44
+ */
45
+ markAllAsRead: (params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").MessageResponseDto, any, {}>>;
46
+ }
47
+ //# sourceMappingURL=Notifications.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notifications.d.ts","sourceRoot":"","sources":["../Notifications.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,cAAc,EAId,gBAAgB,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAE1D,qBAAa,aAAa,CAAC,gBAAgB,GAAG,OAAO;IACnD,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;gBAEvB,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAI9C;;;;;;;;OAQG;IACH,OAAO,GAAI,OAAO,cAAc,EAAE,SAAQ,aAAkB,kHAQvD;IACL;;;;;;;;OAQG;IACH,cAAc,GAAI,SAAQ,aAAkB,0DAMvC;IACL;;;;;;;;OAQG;IACH,UAAU,GACR,kBAAkB,gBAAgB,EAClC,SAAQ,aAAkB,8GAQvB;IACL;;;;;;;;OAQG;IACH,aAAa,GAAI,SAAQ,aAAkB,oGAOtC;CACN"}
@@ -0,0 +1,85 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ // @ts-nocheck
5
+ /*
6
+ * ---------------------------------------------------------------
7
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
8
+ * ## ##
9
+ * ## AUTHOR: acacode ##
10
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
11
+ * ---------------------------------------------------------------
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Notifications = void 0;
15
+ class Notifications {
16
+ constructor(http) {
17
+ /**
18
+ * @description Get a paginated list of admin notifications
19
+ *
20
+ * @tags Admin Notifications
21
+ * @name FindAll
22
+ * @summary List notifications
23
+ * @request GET:/notifications
24
+ * @secure
25
+ */
26
+ this.findAll = (query, params = {}) => this.http.request({
27
+ path: `/notifications`,
28
+ method: "GET",
29
+ query: query,
30
+ secure: true,
31
+ format: "json",
32
+ ...params,
33
+ });
34
+ /**
35
+ * @description Get the count of unread notifications
36
+ *
37
+ * @tags Admin Notifications
38
+ * @name GetUnreadCount
39
+ * @summary Get unread notification count
40
+ * @request GET:/notifications/unread-count
41
+ * @secure
42
+ */
43
+ this.getUnreadCount = (params = {}) => this.http.request({
44
+ path: `/notifications/unread-count`,
45
+ method: "GET",
46
+ secure: true,
47
+ ...params,
48
+ });
49
+ /**
50
+ * @description Mark a specific notification as read
51
+ *
52
+ * @tags Admin Notifications
53
+ * @name MarkAsRead
54
+ * @summary Mark notification as read
55
+ * @request PATCH:/notifications/{id}/read
56
+ * @secure
57
+ */
58
+ this.markAsRead = ({ id, ...query }, params = {}) => this.http.request({
59
+ path: `/notifications/${id}/read`,
60
+ method: "PATCH",
61
+ secure: true,
62
+ format: "json",
63
+ ...params,
64
+ });
65
+ /**
66
+ * @description Mark all notifications as read
67
+ *
68
+ * @tags Admin Notifications
69
+ * @name MarkAllAsRead
70
+ * @summary Mark all notifications as read
71
+ * @request PATCH:/notifications/read-all
72
+ * @secure
73
+ */
74
+ this.markAllAsRead = (params = {}) => this.http.request({
75
+ path: `/notifications/read-all`,
76
+ method: "PATCH",
77
+ secure: true,
78
+ format: "json",
79
+ ...params,
80
+ });
81
+ this.http = http;
82
+ }
83
+ }
84
+ exports.Notifications = Notifications;
85
+ //# sourceMappingURL=Notifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Notifications.js","sourceRoot":"","sources":["../Notifications.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB,cAAc;AACd;;;;;;;GAOG;;;AAYH,MAAa,aAAa;IAGxB,YAAY,IAAkC;QAI9C;;;;;;;;WAQG;QACH,YAAO,GAAG,CAAC,KAAqB,EAAE,SAAwB,EAAE,EAAE,EAAE,CAC9D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAoB;YACnC,IAAI,EAAE,gBAAgB;YACtB,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,mBAAc,GAAG,CAAC,SAAwB,EAAE,EAAE,EAAE,CAC9C,IAAI,CAAC,IAAI,CAAC,OAAO,CAA0B;YACzC,IAAI,EAAE,6BAA6B;YACnC,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,IAAI;YACZ,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,eAAU,GAAG,CACX,EAAE,EAAE,EAAE,GAAG,KAAK,EAAoB,EAClC,SAAwB,EAAE,EAC1B,EAAE,CACF,IAAI,CAAC,IAAI,CAAC,OAAO,CAAuB;YACtC,IAAI,EAAE,kBAAkB,EAAE,OAAO;YACjC,MAAM,EAAE,OAAO;YACf,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,kBAAa,GAAG,CAAC,SAAwB,EAAE,EAAE,EAAE,CAC7C,IAAI,CAAC,IAAI,CAAC,OAAO,CAAyB;YACxC,IAAI,EAAE,yBAAyB;YAC/B,MAAM,EAAE,OAAO;YACf,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QAzEH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAyEF;AA9ED,sCA8EC"}
@@ -0,0 +1,57 @@
1
+ import { CreatePermissionDto, DeleteParams, FindAllParams, FindByIdParams, UpdateParams, UpdatePermissionDto } from "./data-contracts";
2
+ import { HttpClient, RequestParams } from "./http-client";
3
+ export declare class Permissions<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
6
+ /**
7
+ * @description Get a paginated list of all available permissions
8
+ *
9
+ * @tags Admin Permissions
10
+ * @name FindAll
11
+ * @summary List all permissions
12
+ * @request GET:/permissions
13
+ * @secure
14
+ */
15
+ findAll: (query: FindAllParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").PermissionListResponseDto, any, {}>>;
16
+ /**
17
+ * @description Create a new permission
18
+ *
19
+ * @tags Admin Permissions
20
+ * @name Create
21
+ * @summary Create permission
22
+ * @request POST:/permissions
23
+ * @secure
24
+ */
25
+ create: (data: CreatePermissionDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").PermissionResponseDto, any, {}>>;
26
+ /**
27
+ * @description Get a specific permission by its ID
28
+ *
29
+ * @tags Admin Permissions
30
+ * @name FindById
31
+ * @summary Get permission by ID
32
+ * @request GET:/permissions/{id}
33
+ * @secure
34
+ */
35
+ findById: ({ id, ...query }: FindByIdParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").PermissionResponseDto, any, {}>>;
36
+ /**
37
+ * @description Update an existing permission
38
+ *
39
+ * @tags Admin Permissions
40
+ * @name Update
41
+ * @summary Update permission
42
+ * @request PATCH:/permissions/{id}
43
+ * @secure
44
+ */
45
+ update: ({ id, ...query }: UpdateParams, data: UpdatePermissionDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").PermissionResponseDto, any, {}>>;
46
+ /**
47
+ * @description Delete a permission (must not be assigned to any roles or users)
48
+ *
49
+ * @tags Admin Permissions
50
+ * @name Delete
51
+ * @summary Delete permission
52
+ * @request DELETE:/permissions/{id}
53
+ * @secure
54
+ */
55
+ delete: ({ id, ...query }: DeleteParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").MessageResponseDto, any, {}>>;
56
+ }
57
+ //# sourceMappingURL=Permissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Permissions.d.ts","sourceRoot":"","sources":["../Permissions.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,mBAAmB,EAGnB,YAAY,EAEZ,aAAa,EAEb,cAAc,EAEd,YAAY,EACZ,mBAAmB,EACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAe,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEvE,qBAAa,WAAW,CAAC,gBAAgB,GAAG,OAAO;IACjD,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;gBAEvB,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAI9C;;;;;;;;OAQG;IACH,OAAO,GAAI,OAAO,aAAa,EAAE,SAAQ,aAAkB,2GAQtD;IACL;;;;;;;;OAQG;IACH,MAAM,GAAI,MAAM,mBAAmB,EAAE,SAAQ,aAAkB,uGAS1D;IACL;;;;;;;;OAQG;IACH,QAAQ,GAAI,kBAAkB,cAAc,EAAE,SAAQ,aAAkB,uGAOnE;IACL;;;;;;;;OAQG;IACH,MAAM,GACJ,kBAAkB,YAAY,EAC9B,MAAM,mBAAmB,EACzB,SAAQ,aAAkB,uGAUvB;IACL;;;;;;;;OAQG;IACH,MAAM,GAAI,kBAAkB,YAAY,EAAE,SAAQ,aAAkB,oGAO/D;CACN"}
@@ -0,0 +1,107 @@
1
+ "use strict";
2
+ /* eslint-disable */
3
+ /* tslint:disable */
4
+ // @ts-nocheck
5
+ /*
6
+ * ---------------------------------------------------------------
7
+ * ## THIS FILE WAS GENERATED VIA SWAGGER-TYPESCRIPT-API ##
8
+ * ## ##
9
+ * ## AUTHOR: acacode ##
10
+ * ## SOURCE: https://github.com/acacode/swagger-typescript-api ##
11
+ * ---------------------------------------------------------------
12
+ */
13
+ Object.defineProperty(exports, "__esModule", { value: true });
14
+ exports.Permissions = void 0;
15
+ const http_client_1 = require("./http-client");
16
+ class Permissions {
17
+ constructor(http) {
18
+ /**
19
+ * @description Get a paginated list of all available permissions
20
+ *
21
+ * @tags Admin Permissions
22
+ * @name FindAll
23
+ * @summary List all permissions
24
+ * @request GET:/permissions
25
+ * @secure
26
+ */
27
+ this.findAll = (query, params = {}) => this.http.request({
28
+ path: `/permissions`,
29
+ method: "GET",
30
+ query: query,
31
+ secure: true,
32
+ format: "json",
33
+ ...params,
34
+ });
35
+ /**
36
+ * @description Create a new permission
37
+ *
38
+ * @tags Admin Permissions
39
+ * @name Create
40
+ * @summary Create permission
41
+ * @request POST:/permissions
42
+ * @secure
43
+ */
44
+ this.create = (data, params = {}) => this.http.request({
45
+ path: `/permissions`,
46
+ method: "POST",
47
+ body: data,
48
+ secure: true,
49
+ type: http_client_1.ContentType.Json,
50
+ format: "json",
51
+ ...params,
52
+ });
53
+ /**
54
+ * @description Get a specific permission by its ID
55
+ *
56
+ * @tags Admin Permissions
57
+ * @name FindById
58
+ * @summary Get permission by ID
59
+ * @request GET:/permissions/{id}
60
+ * @secure
61
+ */
62
+ this.findById = ({ id, ...query }, params = {}) => this.http.request({
63
+ path: `/permissions/${id}`,
64
+ method: "GET",
65
+ secure: true,
66
+ format: "json",
67
+ ...params,
68
+ });
69
+ /**
70
+ * @description Update an existing permission
71
+ *
72
+ * @tags Admin Permissions
73
+ * @name Update
74
+ * @summary Update permission
75
+ * @request PATCH:/permissions/{id}
76
+ * @secure
77
+ */
78
+ this.update = ({ id, ...query }, data, params = {}) => this.http.request({
79
+ path: `/permissions/${id}`,
80
+ method: "PATCH",
81
+ body: data,
82
+ secure: true,
83
+ type: http_client_1.ContentType.Json,
84
+ format: "json",
85
+ ...params,
86
+ });
87
+ /**
88
+ * @description Delete a permission (must not be assigned to any roles or users)
89
+ *
90
+ * @tags Admin Permissions
91
+ * @name Delete
92
+ * @summary Delete permission
93
+ * @request DELETE:/permissions/{id}
94
+ * @secure
95
+ */
96
+ this.delete = ({ id, ...query }, params = {}) => this.http.request({
97
+ path: `/permissions/${id}`,
98
+ method: "DELETE",
99
+ secure: true,
100
+ format: "json",
101
+ ...params,
102
+ });
103
+ this.http = http;
104
+ }
105
+ }
106
+ exports.Permissions = Permissions;
107
+ //# sourceMappingURL=Permissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Permissions.js","sourceRoot":"","sources":["../Permissions.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB,cAAc;AACd;;;;;;;GAOG;;;AAgBH,+CAAuE;AAEvE,MAAa,WAAW;IAGtB,YAAY,IAAkC;QAI9C;;;;;;;;WAQG;QACH,YAAO,GAAG,CAAC,KAAoB,EAAE,SAAwB,EAAE,EAAE,EAAE,CAC7D,IAAI,CAAC,IAAI,CAAC,OAAO,CAAmB;YAClC,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,KAAK;YACb,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,WAAM,GAAG,CAAC,IAAyB,EAAE,SAAwB,EAAE,EAAE,EAAE,CACjE,IAAI,CAAC,IAAI,CAAC,OAAO,CAAmB;YAClC,IAAI,EAAE,cAAc;YACpB,MAAM,EAAE,MAAM;YACd,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,yBAAW,CAAC,IAAI;YACtB,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,aAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,EAAkB,EAAE,SAAwB,EAAE,EAAE,EAAE,CAC1E,IAAI,CAAC,IAAI,CAAC,OAAO,CAAqB;YACpC,IAAI,EAAE,gBAAgB,EAAE,EAAE;YAC1B,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,WAAM,GAAG,CACP,EAAE,EAAE,EAAE,GAAG,KAAK,EAAgB,EAC9B,IAAyB,EACzB,SAAwB,EAAE,EAC1B,EAAE,CACF,IAAI,CAAC,IAAI,CAAC,OAAO,CAAmB;YAClC,IAAI,EAAE,gBAAgB,EAAE,EAAE;YAC1B,MAAM,EAAE,OAAO;YACf,IAAI,EAAE,IAAI;YACV,MAAM,EAAE,IAAI;YACZ,IAAI,EAAE,yBAAW,CAAC,IAAI;YACtB,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QACL;;;;;;;;WAQG;QACH,WAAM,GAAG,CAAC,EAAE,EAAE,EAAE,GAAG,KAAK,EAAgB,EAAE,SAAwB,EAAE,EAAE,EAAE,CACtE,IAAI,CAAC,IAAI,CAAC,OAAO,CAA0B;YACzC,IAAI,EAAE,gBAAgB,EAAE,EAAE;YAC1B,MAAM,EAAE,QAAQ;YAChB,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,MAAM;YACd,GAAG,MAAM;SACV,CAAC,CAAC;QAhGH,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACnB,CAAC;CAgGF;AArGD,kCAqGC"}
@@ -0,0 +1,87 @@
1
+ import { AddPermissionsParams, AssignPermissionsDto, CreateRoleDto, DeleteParams2, FindAllParams2, FindByIdParams2, LookupParams, SetPermissionsParams, UpdateParams2, UpdateRoleDto } from "./data-contracts";
2
+ import { HttpClient, RequestParams } from "./http-client";
3
+ export declare class Roles<SecurityDataType = unknown> {
4
+ http: HttpClient<SecurityDataType>;
5
+ constructor(http: HttpClient<SecurityDataType>);
6
+ /**
7
+ * @description Get a paginated list of all roles without permissions - useful for dropdowns and lookups
8
+ *
9
+ * @tags Admin Roles
10
+ * @name Lookup
11
+ * @summary List all roles (lookup)
12
+ * @request GET:/roles/lookup
13
+ * @secure
14
+ */
15
+ lookup: (query: LookupParams, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").RoleLookupListResponseDto, any, {}>>;
16
+ /**
17
+ * @description Get a paginated list of all roles with their permissions
18
+ *
19
+ * @tags Admin Roles
20
+ * @name FindAll
21
+ * @summary List all roles
22
+ * @request GET:/roles
23
+ * @secure
24
+ */
25
+ findAll: (query: FindAllParams2, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").RoleListResponseDto, any, {}>>;
26
+ /**
27
+ * @description Create a new role with optional permissions assignment
28
+ *
29
+ * @tags Admin Roles
30
+ * @name Create
31
+ * @summary Create role
32
+ * @request POST:/roles
33
+ * @secure
34
+ */
35
+ create: (data: CreateRoleDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").RoleWithPermissionsResponseDto, any, {}>>;
36
+ /**
37
+ * @description Get a specific role with its permissions
38
+ *
39
+ * @tags Admin Roles
40
+ * @name FindById
41
+ * @summary Get role by ID
42
+ * @request GET:/roles/{id}
43
+ * @secure
44
+ */
45
+ findById: ({ id, ...query }: FindByIdParams2, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").RoleWithPermissionsResponseDto, any, {}>>;
46
+ /**
47
+ * @description Update an existing role
48
+ *
49
+ * @tags Admin Roles
50
+ * @name Update
51
+ * @summary Update role
52
+ * @request PATCH:/roles/{id}
53
+ * @secure
54
+ */
55
+ update: ({ id, ...query }: UpdateParams2, data: UpdateRoleDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").RoleWithPermissionsResponseDto, any, {}>>;
56
+ /**
57
+ * @description Delete a role (must not have assigned users)
58
+ *
59
+ * @tags Admin Roles
60
+ * @name Delete
61
+ * @summary Delete role
62
+ * @request DELETE:/roles/{id}
63
+ * @secure
64
+ */
65
+ delete: ({ id, ...query }: DeleteParams2, params?: RequestParams) => Promise<import("axios").AxiosResponse<import("./data-contracts").MessageResponseDto, any, {}>>;
66
+ /**
67
+ * @description Replace all permissions for a role
68
+ *
69
+ * @tags Admin Roles
70
+ * @name SetPermissions
71
+ * @summary Set role permissions
72
+ * @request PUT:/roles/{id}/permissions
73
+ * @secure
74
+ */
75
+ setPermissions: ({ id, ...query }: SetPermissionsParams, data: AssignPermissionsDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
76
+ /**
77
+ * @description Add permissions to a role (additive)
78
+ *
79
+ * @tags Admin Roles
80
+ * @name AddPermissions
81
+ * @summary Add permissions to role
82
+ * @request POST:/roles/{id}/permissions
83
+ * @secure
84
+ */
85
+ addPermissions: ({ id, ...query }: AddPermissionsParams, data: AssignPermissionsDto, params?: RequestParams) => Promise<import("axios").AxiosResponse<any, any, {}>>;
86
+ }
87
+ //# sourceMappingURL=Roles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Roles.d.ts","sourceRoot":"","sources":["../Roles.ts"],"names":[],"mappings":"AAYA,OAAO,EAEL,oBAAoB,EACpB,oBAAoB,EAEpB,aAAa,EAEb,aAAa,EAEb,cAAc,EAEd,eAAe,EAGf,YAAY,EAEZ,oBAAoB,EACpB,aAAa,EAEb,aAAa,EACd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAe,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEvE,qBAAa,KAAK,CAAC,gBAAgB,GAAG,OAAO;IAC3C,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;gBAEvB,IAAI,EAAE,UAAU,CAAC,gBAAgB,CAAC;IAI9C;;;;;;;;OAQG;IACH,MAAM,GAAI,OAAO,YAAY,EAAE,SAAQ,aAAkB,2GAQpD;IACL;;;;;;;;OAQG;IACH,OAAO,GAAI,OAAO,cAAc,EAAE,SAAQ,aAAkB,qGAQvD;IACL;;;;;;;;OAQG;IACH,MAAM,GAAI,MAAM,aAAa,EAAE,SAAQ,aAAkB,gHASpD;IACL;;;;;;;;OAQG;IACH,QAAQ,GAAI,kBAAkB,eAAe,EAAE,SAAQ,aAAkB,gHAOpE;IACL;;;;;;;;OAQG;IACH,MAAM,GACJ,kBAAkB,aAAa,EAC/B,MAAM,aAAa,EACnB,SAAQ,aAAkB,gHAUvB;IACL;;;;;;;;OAQG;IACH,MAAM,GAAI,kBAAkB,aAAa,EAAE,SAAQ,aAAkB,oGAOhE;IACL;;;;;;;;OAQG;IACH,cAAc,GACZ,kBAAkB,oBAAoB,EACtC,MAAM,oBAAoB,EAC1B,SAAQ,aAAkB,0DASvB;IACL;;;;;;;;OAQG;IACH,cAAc,GACZ,kBAAkB,oBAAoB,EACtC,MAAM,oBAAoB,EAC1B,SAAQ,aAAkB,0DASvB;CACN"}