shred-api-client 1.14.3 → 1.14.4-rc.2

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 (114) hide show
  1. package/dist/api/AppConfig.api.d.ts +2 -2
  2. package/dist/api/AppConfig.api.js +25 -2
  3. package/dist/api/Email.api.d.ts +3 -3
  4. package/dist/api/Email.api.js +25 -2
  5. package/dist/api/Goal.api.d.ts +10 -0
  6. package/dist/api/Goal.api.js +42 -0
  7. package/dist/api/Note.api.d.ts +0 -0
  8. package/dist/api/Note.api.js +1 -0
  9. package/dist/api/Notification.api.d.ts +8 -8
  10. package/dist/api/Notification.api.js +32 -9
  11. package/dist/api/Project.api.d.ts +8 -8
  12. package/dist/api/Project.api.js +38 -18
  13. package/dist/api/Prompt.api.d.ts +6 -6
  14. package/dist/api/Prompt.api.js +6 -6
  15. package/dist/api/Subscription.api.d.ts +6 -6
  16. package/dist/api/Subscription.api.js +12 -12
  17. package/dist/api/Tenant.api.d.ts +7 -7
  18. package/dist/api/Tenant.api.js +7 -7
  19. package/dist/api/Track.api.d.ts +3 -3
  20. package/dist/api/Track.api.js +2 -2
  21. package/dist/api/User.api.d.ts +6 -6
  22. package/dist/api/User.api.js +15 -15
  23. package/dist/index.d.ts +13 -5
  24. package/dist/index.js +26 -16
  25. package/dist/model/Api.d.ts +20 -39
  26. package/dist/model/Api.js +3 -1
  27. package/dist/model/app-config/AppConfig.api.d.ts +9 -0
  28. package/dist/model/{AppConfig.schema.js → app-config/AppConfig.api.js} +2 -3
  29. package/dist/model/app-config/index.d.ts +1 -0
  30. package/dist/model/app-config/index.js +17 -0
  31. package/dist/model/asset/index.d.ts +2 -0
  32. package/dist/model/asset/index.js +5 -0
  33. package/dist/model/core/APIResponse.d.ts +6 -0
  34. package/dist/model/core/APIResponse.js +2 -0
  35. package/dist/model/core/Query.d.ts +15 -0
  36. package/dist/model/core/Query.js +2 -0
  37. package/dist/model/core/index.d.ts +2 -0
  38. package/dist/model/core/index.js +18 -0
  39. package/dist/model/email/Email.api.d.ts +11 -0
  40. package/dist/model/{Email.schema.js → email/Email.api.js} +2 -3
  41. package/dist/model/email/Email.schema.d.ts +15 -0
  42. package/dist/model/email/Email.schema.js +9 -0
  43. package/dist/model/email/index.d.ts +3 -0
  44. package/dist/model/email/index.js +20 -0
  45. package/dist/model/exceptions/index.d.ts +3 -2
  46. package/dist/model/exceptions/index.js +2 -1
  47. package/dist/model/goal/Goal.api.d.ts +11 -0
  48. package/dist/model/goal/Goal.api.js +6 -0
  49. package/dist/model/goal/Goal.schema.d.ts +154 -0
  50. package/dist/model/goal/Goal.schema.js +26 -0
  51. package/dist/model/goal/index.d.ts +3 -0
  52. package/dist/model/goal/index.js +22 -0
  53. package/dist/model/note/Note.api.d.ts +26 -0
  54. package/dist/model/note/Note.api.js +21 -0
  55. package/dist/model/note/Note.schema.d.ts +141 -0
  56. package/dist/model/note/Note.schema.js +30 -0
  57. package/dist/model/note/index.d.ts +2 -0
  58. package/dist/model/note/index.js +6 -0
  59. package/dist/model/notification/Notification.api.d.ts +47 -0
  60. package/dist/model/notification/Notification.api.js +13 -0
  61. package/dist/model/notification/Notification.schema.d.ts +454 -0
  62. package/dist/model/notification/Notification.schema.js +111 -0
  63. package/dist/model/notification/index.d.ts +3 -0
  64. package/dist/model/notification/index.js +30 -0
  65. package/dist/model/project/Project.api.d.ts +66 -0
  66. package/dist/model/project/Project.api.js +20 -0
  67. package/dist/model/project/Project.schema.d.ts +206 -0
  68. package/dist/model/{Project.schema.js → project/Project.schema.js} +31 -52
  69. package/dist/model/project/index.d.ts +3 -0
  70. package/dist/model/project/index.js +24 -0
  71. package/dist/model/{Prompt.schema.d.ts → prompt/Prompt.api.d.ts} +4 -24
  72. package/dist/model/{Prompt.schema.js → prompt/Prompt.api.js} +2 -3
  73. package/dist/model/prompt/Prompt.schema.d.ts +165 -0
  74. package/dist/model/prompt/Prompt.schema.js +24 -0
  75. package/dist/model/prompt/index.d.ts +3 -0
  76. package/dist/model/prompt/index.js +22 -0
  77. package/dist/model/{Subscription.schema.d.ts → subscription/Subscription.api.d.ts} +4 -51
  78. package/dist/model/{Subscription.schema.js → subscription/Subscription.api.js} +2 -8
  79. package/dist/model/subscription/Subscription.schema.d.ts +314 -0
  80. package/dist/model/subscription/Subscription.schema.js +53 -0
  81. package/dist/model/subscription/index.d.ts +3 -0
  82. package/dist/model/subscription/index.js +25 -0
  83. package/dist/model/{Tenant.schema.d.ts → tenant/Tenant.api.d.ts} +4 -29
  84. package/dist/model/{Tenant.schema.js → tenant/Tenant.api.js} +2 -3
  85. package/dist/model/tenant/Tenant.schema.d.ts +342 -0
  86. package/dist/model/tenant/Tenant.schema.js +29 -0
  87. package/dist/model/tenant/index.d.ts +3 -0
  88. package/dist/model/tenant/index.js +21 -0
  89. package/dist/model/track/Track.api.d.ts +10 -0
  90. package/dist/model/{Track.schema.js → track/Track.api.js} +2 -3
  91. package/dist/model/track/Track.schema.d.ts +44 -0
  92. package/dist/model/track/Track.schema.js +14 -0
  93. package/dist/model/track/index.d.ts +3 -0
  94. package/dist/model/track/index.js +21 -0
  95. package/dist/model/user/User.api.d.ts +80 -0
  96. package/dist/model/user/User.api.js +20 -0
  97. package/dist/model/user/User.schema.d.ts +117 -0
  98. package/dist/model/user/User.schema.js +42 -0
  99. package/dist/model/user/index.d.ts +3 -0
  100. package/dist/model/user/index.js +23 -0
  101. package/dist/util/parseQuery.d.ts +2 -2
  102. package/package.json +1 -1
  103. package/dist/model/AppConfig.schema.d.ts +0 -10
  104. package/dist/model/Email.schema.d.ts +0 -17
  105. package/dist/model/Notification.schema.d.ts +0 -112
  106. package/dist/model/Notification.schema.js +0 -38
  107. package/dist/model/Project.schema.d.ts +0 -152
  108. package/dist/model/Track.schema.d.ts +0 -20
  109. package/dist/model/User.schema.d.ts +0 -253
  110. package/dist/model/User.schema.js +0 -97
  111. package/dist/namespace.d.ts +0 -259
  112. package/dist/namespace.js +0 -53
  113. package/dist/model/{Asset.schema.d.ts → asset/Asset.schema.d.ts} +4 -4
  114. /package/dist/model/{Asset.schema.js → asset/Asset.schema.js} +0 -0
@@ -0,0 +1,154 @@
1
+ import { z } from "zod";
2
+ export declare const DailyMilestoneSchema: z.ZodObject<{
3
+ id: z.ZodString;
4
+ date: z.ZodString;
5
+ target: z.ZodNumber;
6
+ progress: z.ZodNumber;
7
+ }, "strip", z.ZodTypeAny, {
8
+ id: string;
9
+ date: string;
10
+ progress: number;
11
+ target: number;
12
+ }, {
13
+ id: string;
14
+ date: string;
15
+ progress: number;
16
+ target: number;
17
+ }>;
18
+ export declare const WeeklyMilestoneSchema: z.ZodObject<{
19
+ id: z.ZodString;
20
+ week: z.ZodString;
21
+ target: z.ZodNumber;
22
+ progress: z.ZodNumber;
23
+ dailyMilestones: z.ZodArray<z.ZodObject<{
24
+ id: z.ZodString;
25
+ date: z.ZodString;
26
+ target: z.ZodNumber;
27
+ progress: z.ZodNumber;
28
+ }, "strip", z.ZodTypeAny, {
29
+ id: string;
30
+ date: string;
31
+ progress: number;
32
+ target: number;
33
+ }, {
34
+ id: string;
35
+ date: string;
36
+ progress: number;
37
+ target: number;
38
+ }>, "many">;
39
+ }, "strip", z.ZodTypeAny, {
40
+ id: string;
41
+ progress: number;
42
+ target: number;
43
+ week: string;
44
+ dailyMilestones: {
45
+ id: string;
46
+ date: string;
47
+ progress: number;
48
+ target: number;
49
+ }[];
50
+ }, {
51
+ id: string;
52
+ progress: number;
53
+ target: number;
54
+ week: string;
55
+ dailyMilestones: {
56
+ id: string;
57
+ date: string;
58
+ progress: number;
59
+ target: number;
60
+ }[];
61
+ }>;
62
+ export declare const GoalSchema: z.ZodObject<{
63
+ id: z.ZodString;
64
+ editorId: z.ZodString;
65
+ month: z.ZodString;
66
+ target: z.ZodNumber;
67
+ progress: z.ZodNumber;
68
+ createdAt: z.ZodNumber;
69
+ weeklyMilestones: z.ZodArray<z.ZodObject<{
70
+ id: z.ZodString;
71
+ week: z.ZodString;
72
+ target: z.ZodNumber;
73
+ progress: z.ZodNumber;
74
+ dailyMilestones: z.ZodArray<z.ZodObject<{
75
+ id: z.ZodString;
76
+ date: z.ZodString;
77
+ target: z.ZodNumber;
78
+ progress: z.ZodNumber;
79
+ }, "strip", z.ZodTypeAny, {
80
+ id: string;
81
+ date: string;
82
+ progress: number;
83
+ target: number;
84
+ }, {
85
+ id: string;
86
+ date: string;
87
+ progress: number;
88
+ target: number;
89
+ }>, "many">;
90
+ }, "strip", z.ZodTypeAny, {
91
+ id: string;
92
+ progress: number;
93
+ target: number;
94
+ week: string;
95
+ dailyMilestones: {
96
+ id: string;
97
+ date: string;
98
+ progress: number;
99
+ target: number;
100
+ }[];
101
+ }, {
102
+ id: string;
103
+ progress: number;
104
+ target: number;
105
+ week: string;
106
+ dailyMilestones: {
107
+ id: string;
108
+ date: string;
109
+ progress: number;
110
+ target: number;
111
+ }[];
112
+ }>, "many">;
113
+ }, "strip", z.ZodTypeAny, {
114
+ id: string;
115
+ createdAt: number;
116
+ editorId: string;
117
+ progress: number;
118
+ target: number;
119
+ month: string;
120
+ weeklyMilestones: {
121
+ id: string;
122
+ progress: number;
123
+ target: number;
124
+ week: string;
125
+ dailyMilestones: {
126
+ id: string;
127
+ date: string;
128
+ progress: number;
129
+ target: number;
130
+ }[];
131
+ }[];
132
+ }, {
133
+ id: string;
134
+ createdAt: number;
135
+ editorId: string;
136
+ progress: number;
137
+ target: number;
138
+ month: string;
139
+ weeklyMilestones: {
140
+ id: string;
141
+ progress: number;
142
+ target: number;
143
+ week: string;
144
+ dailyMilestones: {
145
+ id: string;
146
+ date: string;
147
+ progress: number;
148
+ target: number;
149
+ }[];
150
+ }[];
151
+ }>;
152
+ export type DailyMilestone = z.infer<typeof DailyMilestoneSchema>;
153
+ export type WeeklyMilestone = z.infer<typeof WeeklyMilestoneSchema>;
154
+ export type Goal = z.infer<typeof GoalSchema>;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GoalSchema = exports.WeeklyMilestoneSchema = exports.DailyMilestoneSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ exports.DailyMilestoneSchema = zod_1.z.object({
6
+ id: zod_1.z.string(),
7
+ date: zod_1.z.string(),
8
+ target: zod_1.z.number(),
9
+ progress: zod_1.z.number(),
10
+ });
11
+ exports.WeeklyMilestoneSchema = zod_1.z.object({
12
+ id: zod_1.z.string(),
13
+ week: zod_1.z.string(),
14
+ target: zod_1.z.number(),
15
+ progress: zod_1.z.number(),
16
+ dailyMilestones: zod_1.z.array(exports.DailyMilestoneSchema),
17
+ });
18
+ exports.GoalSchema = zod_1.z.object({
19
+ id: zod_1.z.string(),
20
+ editorId: zod_1.z.string(),
21
+ month: zod_1.z.string(), // ex: "2024-04"
22
+ target: zod_1.z.number(),
23
+ progress: zod_1.z.number(),
24
+ createdAt: zod_1.z.number(),
25
+ weeklyMilestones: zod_1.z.array(exports.WeeklyMilestoneSchema),
26
+ });
@@ -0,0 +1,3 @@
1
+ export type { Goal as Entity, DailyMilestone, WeeklyMilestone, } from "./Goal.schema";
2
+ export { GoalSchema, DailyMilestoneSchema, WeeklyMilestoneSchema, } from "./Goal.schema";
3
+ export * from "./Goal.api";
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ exports.WeeklyMilestoneSchema = exports.DailyMilestoneSchema = exports.GoalSchema = void 0;
18
+ var Goal_schema_1 = require("./Goal.schema");
19
+ Object.defineProperty(exports, "GoalSchema", { enumerable: true, get: function () { return Goal_schema_1.GoalSchema; } });
20
+ Object.defineProperty(exports, "DailyMilestoneSchema", { enumerable: true, get: function () { return Goal_schema_1.DailyMilestoneSchema; } });
21
+ Object.defineProperty(exports, "WeeklyMilestoneSchema", { enumerable: true, get: function () { return Goal_schema_1.WeeklyMilestoneSchema; } });
22
+ __exportStar(require("./Goal.api"), exports);
@@ -0,0 +1,26 @@
1
+ import Context from "../Context";
2
+ import { Note } from "./Note.schema";
3
+ export interface IAPI {
4
+ list: (c: Context, userId: string) => Promise<Note[]>;
5
+ add: (c: Context, note: Note) => Promise<Note>;
6
+ update: (c: Context, script: Partial<Note>) => Promise<Note>;
7
+ delete: (c: Context, id: string) => Promise<boolean>;
8
+ }
9
+ export declare const Endpoints: {
10
+ GetNotes: {
11
+ uri: string;
12
+ method: string;
13
+ };
14
+ AddNote: {
15
+ uri: string;
16
+ method: string;
17
+ };
18
+ DeleteNote: {
19
+ uri: string;
20
+ method: string;
21
+ };
22
+ UpdateNote: {
23
+ uri: string;
24
+ method: string;
25
+ };
26
+ };
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Endpoints = void 0;
4
+ exports.Endpoints = {
5
+ GetNotes: {
6
+ uri: "/user-context/notes/:userId/",
7
+ method: "GET",
8
+ },
9
+ AddNote: {
10
+ uri: "/user-context/notes/",
11
+ method: "PUT",
12
+ },
13
+ DeleteNote: {
14
+ uri: "/user-context/notes/:id/",
15
+ method: "DELETE",
16
+ },
17
+ UpdateNote: {
18
+ uri: "/user-context/notes/:id/",
19
+ method: "POST",
20
+ },
21
+ };
@@ -0,0 +1,141 @@
1
+ import { z } from "zod";
2
+ declare const NoteHistorySchema: z.ZodObject<{
3
+ type: z.ZodEnum<["created", "updated", "deleted", "asset-added", "asset-removed"]>;
4
+ actorEmail: z.ZodString;
5
+ timestamp: z.ZodNumber;
6
+ details: z.ZodOptional<z.ZodString>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
9
+ timestamp: number;
10
+ actorEmail: string;
11
+ details?: string | undefined;
12
+ }, {
13
+ type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
14
+ timestamp: number;
15
+ actorEmail: string;
16
+ details?: string | undefined;
17
+ }>;
18
+ declare const NoteSchema: z.ZodObject<{
19
+ id: z.ZodString;
20
+ userId: z.ZodString;
21
+ authorEmail: z.ZodString;
22
+ assets: z.ZodArray<z.ZodObject<{
23
+ assetId: z.ZodString;
24
+ fileName: z.ZodString;
25
+ extension: z.ZodString;
26
+ fileSize: z.ZodNumber;
27
+ assetUrl: z.ZodString;
28
+ thumbnailUrl: z.ZodString;
29
+ type: z.ZodString;
30
+ duration: z.ZodOptional<z.ZodNumber>;
31
+ progress: z.ZodOptional<z.ZodNumber>;
32
+ error: z.ZodOptional<z.ZodString>;
33
+ authorId: z.ZodString;
34
+ uploadedAt: z.ZodNumber;
35
+ }, "strip", z.ZodTypeAny, {
36
+ type: string;
37
+ assetId: string;
38
+ fileName: string;
39
+ extension: string;
40
+ fileSize: number;
41
+ assetUrl: string;
42
+ thumbnailUrl: string;
43
+ authorId: string;
44
+ uploadedAt: number;
45
+ error?: string | undefined;
46
+ duration?: number | undefined;
47
+ progress?: number | undefined;
48
+ }, {
49
+ type: string;
50
+ assetId: string;
51
+ fileName: string;
52
+ extension: string;
53
+ fileSize: number;
54
+ assetUrl: string;
55
+ thumbnailUrl: string;
56
+ authorId: string;
57
+ uploadedAt: number;
58
+ error?: string | undefined;
59
+ duration?: number | undefined;
60
+ progress?: number | undefined;
61
+ }>, "many">;
62
+ title: z.ZodString;
63
+ content: z.ZodString;
64
+ createdAt: z.ZodNumber;
65
+ modified: z.ZodNumber;
66
+ history: z.ZodOptional<z.ZodArray<z.ZodObject<{
67
+ type: z.ZodEnum<["created", "updated", "deleted", "asset-added", "asset-removed"]>;
68
+ actorEmail: z.ZodString;
69
+ timestamp: z.ZodNumber;
70
+ details: z.ZodOptional<z.ZodString>;
71
+ }, "strip", z.ZodTypeAny, {
72
+ type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
73
+ timestamp: number;
74
+ actorEmail: string;
75
+ details?: string | undefined;
76
+ }, {
77
+ type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
78
+ timestamp: number;
79
+ actorEmail: string;
80
+ details?: string | undefined;
81
+ }>, "many">>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ id: string;
84
+ userId: string;
85
+ title: string;
86
+ createdAt: number;
87
+ modified: number;
88
+ content: string;
89
+ assets: {
90
+ type: string;
91
+ assetId: string;
92
+ fileName: string;
93
+ extension: string;
94
+ fileSize: number;
95
+ assetUrl: string;
96
+ thumbnailUrl: string;
97
+ authorId: string;
98
+ uploadedAt: number;
99
+ error?: string | undefined;
100
+ duration?: number | undefined;
101
+ progress?: number | undefined;
102
+ }[];
103
+ authorEmail: string;
104
+ history?: {
105
+ type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
106
+ timestamp: number;
107
+ actorEmail: string;
108
+ details?: string | undefined;
109
+ }[] | undefined;
110
+ }, {
111
+ id: string;
112
+ userId: string;
113
+ title: string;
114
+ createdAt: number;
115
+ modified: number;
116
+ content: string;
117
+ assets: {
118
+ type: string;
119
+ assetId: string;
120
+ fileName: string;
121
+ extension: string;
122
+ fileSize: number;
123
+ assetUrl: string;
124
+ thumbnailUrl: string;
125
+ authorId: string;
126
+ uploadedAt: number;
127
+ error?: string | undefined;
128
+ duration?: number | undefined;
129
+ progress?: number | undefined;
130
+ }[];
131
+ authorEmail: string;
132
+ history?: {
133
+ type: "deleted" | "created" | "updated" | "asset-added" | "asset-removed";
134
+ timestamp: number;
135
+ actorEmail: string;
136
+ details?: string | undefined;
137
+ }[] | undefined;
138
+ }>;
139
+ type Note = z.infer<typeof NoteSchema>;
140
+ type NoteHistory = z.infer<typeof NoteHistorySchema>;
141
+ export { NoteHistorySchema, NoteSchema, NoteHistory, Note };
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NoteSchema = exports.NoteHistorySchema = void 0;
4
+ const zod_1 = require("zod");
5
+ const asset_1 = require("../asset");
6
+ const NoteHistorySchema = zod_1.z.object({
7
+ type: zod_1.z.enum([
8
+ "created",
9
+ "updated",
10
+ "deleted",
11
+ "asset-added",
12
+ "asset-removed",
13
+ ]),
14
+ actorEmail: zod_1.z.string().email(),
15
+ timestamp: zod_1.z.number(),
16
+ details: zod_1.z.string().optional(),
17
+ });
18
+ exports.NoteHistorySchema = NoteHistorySchema;
19
+ const NoteSchema = zod_1.z.object({
20
+ id: zod_1.z.string(),
21
+ userId: zod_1.z.string(),
22
+ authorEmail: zod_1.z.string().email(),
23
+ assets: zod_1.z.array(asset_1.AssetSchema),
24
+ title: zod_1.z.string(),
25
+ content: zod_1.z.string(),
26
+ createdAt: zod_1.z.number(),
27
+ modified: zod_1.z.number(),
28
+ history: zod_1.z.array(NoteHistorySchema).optional(),
29
+ });
30
+ exports.NoteSchema = NoteSchema;
@@ -0,0 +1,2 @@
1
+ export { NoteSchema, NoteHistorySchema } from "./Note.schema";
2
+ export type { Note as Entity, NoteHistory } from "./Note.schema";
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.NoteHistorySchema = exports.NoteSchema = void 0;
4
+ var Note_schema_1 = require("./Note.schema");
5
+ Object.defineProperty(exports, "NoteSchema", { enumerable: true, get: function () { return Note_schema_1.NoteSchema; } });
6
+ Object.defineProperty(exports, "NoteHistorySchema", { enumerable: true, get: function () { return Note_schema_1.NoteHistorySchema; } });
@@ -0,0 +1,47 @@
1
+ import Context from "../Context";
2
+ import { Trigger, NotificationDetail, NotificationItem } from "./Notification.schema";
3
+ import * as Core from "../core/";
4
+ export interface IAPI {
5
+ getTriggers: (ctx: Context) => Promise<Core.APIResponse<Trigger>>;
6
+ createTrigger: (ctx: Context, t: Trigger) => Promise<Trigger>;
7
+ deleteTrigger: (ctx: Context, triggerId: string) => Promise<boolean>;
8
+ updateTrigger: (ctx: Context, triggerId: string, trigger: Partial<Trigger>) => Promise<Trigger>;
9
+ push: (context: Context, notification: NotificationDetail) => Promise<boolean>;
10
+ getNotifications: (ctx: Context) => Promise<Core.APIResponse<NotificationItem>>;
11
+ markAsRead: (ctx: Context, id: string) => Promise<boolean>;
12
+ clearNotifications: (ctx: Context) => Promise<boolean>;
13
+ }
14
+ export declare const Endpoints: {
15
+ Create: {
16
+ uri: string;
17
+ method: string;
18
+ };
19
+ List: {
20
+ uri: string;
21
+ method: string;
22
+ };
23
+ Update: {
24
+ uri: string;
25
+ method: string;
26
+ };
27
+ Delete: {
28
+ uri: string;
29
+ method: string;
30
+ };
31
+ Push: {
32
+ uri: string;
33
+ method: string;
34
+ };
35
+ ListNotifications: {
36
+ uri: string;
37
+ method: string;
38
+ };
39
+ MarkAsRead: {
40
+ uri: string;
41
+ method: string;
42
+ };
43
+ ClearNotifications: {
44
+ uri: string;
45
+ method: string;
46
+ };
47
+ };
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Endpoints = void 0;
4
+ exports.Endpoints = {
5
+ Create: { uri: "/notifications/trigger/", method: "POST" },
6
+ List: { uri: "/notifications/trigger/list/", method: "GET" },
7
+ Update: { uri: "/notifications/trigger/:id/", method: "PUT" },
8
+ Delete: { uri: "/notifications/trigger/:id/", method: "DELETE" },
9
+ Push: { uri: "/notifications/push/", method: "POST" },
10
+ ListNotifications: { uri: "/notifications/list/", method: "GET" },
11
+ MarkAsRead: { uri: "/notifications/:id/read/", method: "PUT" },
12
+ ClearNotifications: { uri: "/notifications/clear/", method: "DELETE" },
13
+ };