@or-sdk/notifications 1.7.0 → 1.7.1-beta.4012.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/Notifications.d.ts +172 -0
- package/dist/types/Notifications.d.ts.map +1 -1
- package/dist/types/schemas/config.schema.d.ts +15 -0
- package/dist/types/schemas/config.schema.d.ts.map +1 -1
- package/dist/types/schemas/createTrailEvent.schema.d.ts +2 -0
- package/dist/types/schemas/createTrailEvent.schema.d.ts.map +1 -1
- package/dist/types/schemas/listTrailEvents.schema.d.ts +39 -0
- package/dist/types/schemas/listTrailEvents.schema.d.ts.map +1 -1
- package/dist/types/schemas/trailEvent.schema.d.ts +66 -0
- package/dist/types/schemas/trailEvent.schema.d.ts.map +1 -1
- package/package.json +3 -4
|
@@ -1,24 +1,196 @@
|
|
|
1
1
|
import { Base } from '@or-sdk/base';
|
|
2
2
|
import type { CreateTrailEvent, ListTrailEventsParams, NotificationsConfig, TrailEvent } from './schemas';
|
|
3
3
|
import type { AccountPushNotificationParams, FullNotificationItem, GetVapidKeyResponse, ListNotificationsParams, NotificationData, NotificationItem, PushNotificationParams, SACreateNotificationParams, SAListNotifications, SubscribePushParams } from './types';
|
|
4
|
+
/**
|
|
5
|
+
* OneReach Notifications service client
|
|
6
|
+
*
|
|
7
|
+
* ## Installation:
|
|
8
|
+
*
|
|
9
|
+
* ```sh
|
|
10
|
+
* npm i '@or-sdk/notifications'
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
4
13
|
export declare class Notifications extends Base {
|
|
5
14
|
private readonly validateInputs;
|
|
6
15
|
private readonly validateOutputs;
|
|
16
|
+
/**
|
|
17
|
+
* To create Notifications client do:
|
|
18
|
+
*
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { Notifications } from '@or-sdk/notifications';
|
|
21
|
+
*
|
|
22
|
+
* const notifications = new Notifications({
|
|
23
|
+
* token: () => token,
|
|
24
|
+
* notificationsUrl: 'https://notifications.api.example.com',
|
|
25
|
+
* });
|
|
26
|
+
* ```
|
|
27
|
+
*
|
|
28
|
+
* or with service discovery URL:
|
|
29
|
+
*
|
|
30
|
+
* ```typescript
|
|
31
|
+
* const notifications = new Notifications({
|
|
32
|
+
* token: () => token,
|
|
33
|
+
* discoveryUrl: 'https://discovery.api.example.com',
|
|
34
|
+
* });
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* ## Validation
|
|
38
|
+
*
|
|
39
|
+
* To disable validation of input params and/or output results do:
|
|
40
|
+
*
|
|
41
|
+
* ```typescript
|
|
42
|
+
* import { Notifications } from '@or-sdk/notifications';
|
|
43
|
+
*
|
|
44
|
+
* const notifications = new Notifications({
|
|
45
|
+
* // ...
|
|
46
|
+
* validateInputs: false, // to disable validation of client methods' arguments
|
|
47
|
+
* validateOutputs: false, // to disable validation of client methods' results
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
7
51
|
constructor(params: NotificationsConfig);
|
|
52
|
+
/**
|
|
53
|
+
* List notifications
|
|
54
|
+
* ```typescript
|
|
55
|
+
* await notifications.listNotifications({size, from});
|
|
56
|
+
* ```
|
|
57
|
+
*/
|
|
8
58
|
listNotifications(params?: ListNotificationsParams): Promise<NotificationItem[]>;
|
|
59
|
+
/**
|
|
60
|
+
* Mark all notifications seen
|
|
61
|
+
* ```typescript
|
|
62
|
+
* await notifications.markSeen();
|
|
63
|
+
* ```
|
|
64
|
+
*/
|
|
9
65
|
markSeen(): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Create user notification
|
|
68
|
+
* ```typescript
|
|
69
|
+
* await notifications.createUserNotification(data);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
10
72
|
createUserNotification(data: NotificationData): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Create user notification
|
|
75
|
+
* ```typescript
|
|
76
|
+
* await notifications.createAccountNotification(data);
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
11
79
|
createAccountNotification(data: NotificationData): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Super admin create notification
|
|
82
|
+
* ```typescript
|
|
83
|
+
* await notifications.SACreateNotification({type, data, accountId, userId, dateCreated, parentId});
|
|
84
|
+
* ```
|
|
85
|
+
*/
|
|
12
86
|
SACreateNotification(params: SACreateNotificationParams): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* Super admin list notifications
|
|
89
|
+
* ```typescript
|
|
90
|
+
* await notifications.SAListNotifications({id, accountId,userId, dateCreated, type, seen, size, from, parentId});
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
13
93
|
SAListNotifications(params?: SAListNotifications): Promise<FullNotificationItem[]>;
|
|
94
|
+
/**
|
|
95
|
+
* Super admin create notification
|
|
96
|
+
* ```typescript
|
|
97
|
+
* await notifications.SAUpdateNotification(id, {type, data, accountId, userId, dateCreated, parentId});
|
|
98
|
+
* ```
|
|
99
|
+
*/
|
|
14
100
|
SAUpdateNotification(id: string, data: FullNotificationItem): Promise<void>;
|
|
101
|
+
/**
|
|
102
|
+
* Super admin delete notification
|
|
103
|
+
* ```typescript
|
|
104
|
+
* await notifications.SADeleteNotification(id);
|
|
105
|
+
* ```
|
|
106
|
+
*/
|
|
15
107
|
SADeleteNotification(id: string): Promise<void>;
|
|
108
|
+
/**
|
|
109
|
+
* Create new trail event
|
|
110
|
+
*
|
|
111
|
+
* ```typescript
|
|
112
|
+
* await notifications.createTrailEvent({service: 'pgsql', data});
|
|
113
|
+
* ```
|
|
114
|
+
*/
|
|
16
115
|
createTrailEvent(data: CreateTrailEvent): Promise<void>;
|
|
116
|
+
/**
|
|
117
|
+
* List trail events
|
|
118
|
+
*
|
|
119
|
+
* ```typescript
|
|
120
|
+
* await notifications.listTrailEvents({ service: 'pgsql' });
|
|
121
|
+
* ```
|
|
122
|
+
*
|
|
123
|
+
* You can filter trail events by custom attributes:
|
|
124
|
+
*
|
|
125
|
+
* ```typescript
|
|
126
|
+
* await notifications.listTrailEvents({
|
|
127
|
+
* service: 'pgsql',
|
|
128
|
+
* pgsql_database: 'REAL_POSTGRES_DATABASE_NAME',
|
|
129
|
+
* });
|
|
130
|
+
* ```
|
|
131
|
+
*/
|
|
17
132
|
listTrailEvents(params: ListTrailEventsParams): Promise<TrailEvent[]>;
|
|
133
|
+
/**
|
|
134
|
+
* @description Send push notification to all account profiles except of sender
|
|
135
|
+
* @param data
|
|
136
|
+
* ```typescript
|
|
137
|
+
* await notifications.sendAccountPush({
|
|
138
|
+
* title,
|
|
139
|
+
* body,
|
|
140
|
+
* icon: 'image_url',
|
|
141
|
+
* actions: [{
|
|
142
|
+
* title: 'Open link',
|
|
143
|
+
* action: link,
|
|
144
|
+
* }],
|
|
145
|
+
* });
|
|
146
|
+
*/
|
|
18
147
|
sendAccountPush(data: AccountPushNotificationParams): Promise<void>;
|
|
148
|
+
/**
|
|
149
|
+
* @description Send push notification to all users with specific role
|
|
150
|
+
* @param {string} role
|
|
151
|
+
* @param data
|
|
152
|
+
* ```typescript
|
|
153
|
+
* await notifications.sendRolePush('admin', {
|
|
154
|
+
* title,
|
|
155
|
+
* body,
|
|
156
|
+
* icon: 'image_url',
|
|
157
|
+
* actions: [{
|
|
158
|
+
* title: 'Open link',
|
|
159
|
+
* action: link,
|
|
160
|
+
* }],
|
|
161
|
+
* });
|
|
162
|
+
*/
|
|
19
163
|
sendRolePush(role: string, data: AccountPushNotificationParams): Promise<void>;
|
|
164
|
+
/**
|
|
165
|
+
* @description Super Admin. Send push notification to profile(s)
|
|
166
|
+
* @param data
|
|
167
|
+
* ```typescript
|
|
168
|
+
* await notifications.sendAccountPush({
|
|
169
|
+
* userId,
|
|
170
|
+
* userIds,
|
|
171
|
+
* data:{
|
|
172
|
+
* title,
|
|
173
|
+
* body,
|
|
174
|
+
* icon: 'image_url',
|
|
175
|
+
* actions: [{
|
|
176
|
+
* title: 'Open link',
|
|
177
|
+
* action: link,
|
|
178
|
+
* }],
|
|
179
|
+
* }
|
|
180
|
+
* });
|
|
181
|
+
*/
|
|
20
182
|
sendPush(data: PushNotificationParams): Promise<void>;
|
|
183
|
+
/**
|
|
184
|
+
* @description Get public key to ask for subscription
|
|
185
|
+
* ```typescript
|
|
186
|
+
* await notifications.getVapidKey();
|
|
187
|
+
*/
|
|
21
188
|
getVapidKey(): Promise<GetVapidKeyResponse>;
|
|
189
|
+
/**
|
|
190
|
+
* @description Subscribe user for push notifications
|
|
191
|
+
* ```typescript
|
|
192
|
+
* await notifications.subscribePush(data);
|
|
193
|
+
*/
|
|
22
194
|
subscribePush(data: SubscribePushParams): Promise<void>;
|
|
23
195
|
}
|
|
24
196
|
//# sourceMappingURL=Notifications.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Notifications.d.ts","sourceRoot":"","sources":["../../src/Notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AASpC,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,EACX,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,6BAA6B,EAC7B,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Notifications.d.ts","sourceRoot":"","sources":["../../src/Notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AASpC,OAAO,KAAK,EACV,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,EACX,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EACV,6BAA6B,EAC7B,oBAAoB,EACpB,mBAAmB,EACnB,uBAAuB,EACvB,gBAAgB,EAChB,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,EAC1B,mBAAmB,EACnB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;GAQG;AACH,qBAAa,aAAc,SAAQ,IAAI;IACrC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAU;IAE1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAkCG;gBACS,MAAM,EAAE,mBAAmB;IAgBvC;;;;;OAKG;IACU,iBAAiB,CAAC,MAAM,GAAS,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAQnG;;;;;OAKG;IACU,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAOtC;;;;;OAKG;IACU,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ1E;;;;;OAKG;IACU,yBAAyB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ7E;;;;;OAKG;IACU,oBAAoB,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;IAQpF;;;;;OAKG;IACU,mBAAmB,CAAC,MAAM,GAAS,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAQrG;;;;;OAKG;IACU,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQxF;;;;;OAKG;IACU,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAO5D;;;;;;OAMG;IACU,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IASpE;;;;;;;;;;;;;;;OAeG;IACU,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAUlF;;;;;;;;;;;;;OAaG;IACU,eAAe,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IAQhF;;;;;;;;;;;;;;OAcG;IACU,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3F;;;;;;;;;;;;;;;;;OAiBG;IACU,QAAQ,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQlE;;;;OAIG;IACU,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAQxD;;;;OAIG;IACU,aAAa,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAOrE"}
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const notificationsConfigSchema: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
|
|
3
|
+
/** Authorization token or factory function. */
|
|
3
4
|
token: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodString>]>;
|
|
5
|
+
/** Account id for cross-account requests. Requires SUPER_ADMIN role. */
|
|
4
6
|
accountId: z.ZodOptional<z.ZodString>;
|
|
7
|
+
/** If true validate method params. Default: true */
|
|
5
8
|
validateInputs: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
/** If true validate method results. Default: true */
|
|
6
10
|
validateOutputs: z.ZodOptional<z.ZodBoolean>;
|
|
7
11
|
}, {
|
|
12
|
+
/** URL of ServiceDiscovery API service */
|
|
8
13
|
discoveryUrl: z.ZodUndefined;
|
|
14
|
+
/** URL of Notifications API service */
|
|
9
15
|
notificationsUrl: z.ZodString;
|
|
10
16
|
}>, "strip", z.ZodTypeAny, {
|
|
11
17
|
token: string | ((...args: unknown[]) => string);
|
|
@@ -22,12 +28,18 @@ export declare const notificationsConfigSchema: z.ZodUnion<[z.ZodObject<z.object
|
|
|
22
28
|
validateOutputs?: boolean | undefined;
|
|
23
29
|
discoveryUrl?: undefined;
|
|
24
30
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
31
|
+
/** Authorization token or factory function. */
|
|
25
32
|
token: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodString>]>;
|
|
33
|
+
/** Account id for cross-account requests. Requires SUPER_ADMIN role. */
|
|
26
34
|
accountId: z.ZodOptional<z.ZodString>;
|
|
35
|
+
/** If true validate method params. Default: true */
|
|
27
36
|
validateInputs: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
+
/** If true validate method results. Default: true */
|
|
28
38
|
validateOutputs: z.ZodOptional<z.ZodBoolean>;
|
|
29
39
|
}, {
|
|
40
|
+
/** URL of ServiceDiscovery API service */
|
|
30
41
|
discoveryUrl: z.ZodString;
|
|
42
|
+
/** URL of Notifications API service */
|
|
31
43
|
notificationsUrl: z.ZodUndefined;
|
|
32
44
|
}>, "strip", z.ZodTypeAny, {
|
|
33
45
|
token: string | ((...args: unknown[]) => string);
|
|
@@ -44,5 +56,8 @@ export declare const notificationsConfigSchema: z.ZodUnion<[z.ZodObject<z.object
|
|
|
44
56
|
validateOutputs?: boolean | undefined;
|
|
45
57
|
notificationsUrl?: undefined;
|
|
46
58
|
}>]>;
|
|
59
|
+
/**
|
|
60
|
+
* @typedef {z.infer<typeof notificationsConfigSchema>} NotificationsConfig
|
|
61
|
+
*/
|
|
47
62
|
export type NotificationsConfig = z.infer<typeof notificationsConfigSchema>;
|
|
48
63
|
//# sourceMappingURL=config.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/config.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,yBAAyB
|
|
1
|
+
{"version":3,"file":"config.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/config.schema.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,yBAAyB;IAdpC,+CAA+C;;IAK/C,wEAAwE;;IAGxE,oDAAoD;;IAEpD,qDAAqD;;;IAMnD,0CAA0C;;IAE1C,uCAAuC;;;;;;;;;;;;;;;;;IAlBzC,+CAA+C;;IAK/C,wEAAwE;;IAGxE,oDAAoD;;IAEpD,qDAAqD;;;IAYnD,0CAA0C;;IAE1C,uCAAuC;;;;;;;;;;;;;;;;IAGzC,CAAC;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createTrailEvent.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/createTrailEvent.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"createTrailEvent.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/createTrailEvent.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,sBAAsB;IACjC,2CAA2C;;IAE3C,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE1B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -1,45 +1,84 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const listTrailEventsParamsSchema: z.ZodObject<{
|
|
3
|
+
/** The message to be displayed in the notification */
|
|
3
4
|
service: z.ZodString;
|
|
5
|
+
/** The starting point for the list of events */
|
|
4
6
|
from: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
/** The number of events to retrieve */
|
|
5
8
|
size: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
/** The start date for filtering events */
|
|
6
10
|
dateFrom: z.ZodOptional<z.ZodDate>;
|
|
11
|
+
/** The end date for filtering events */
|
|
7
12
|
dateTo: z.ZodOptional<z.ZodDate>;
|
|
13
|
+
/** Unique identifier of the trail event */
|
|
8
14
|
id: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
15
|
+
/** User ID related to the trail event */
|
|
9
16
|
userId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
17
|
+
/** The flow ID associated with the event */
|
|
10
18
|
flowId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
/** The bot ID associated with the event */
|
|
11
20
|
botId: z.ZodOptional<z.ZodString>;
|
|
21
|
+
/** The name of the creator of the event */
|
|
12
22
|
creatorName: z.ZodString;
|
|
23
|
+
/** The user ID of the creator of the event */
|
|
13
24
|
creatorUserId: z.ZodOptional<z.ZodString>;
|
|
25
|
+
/** The multi-user ID of the creator of the event */
|
|
14
26
|
creatorMultiUserId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
/** The flow ID of the creator of the event */
|
|
15
28
|
creatorFlowId: z.ZodOptional<z.ZodString>;
|
|
16
29
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
30
|
+
/** The message to be displayed in the notification */
|
|
17
31
|
service: z.ZodString;
|
|
32
|
+
/** The starting point for the list of events */
|
|
18
33
|
from: z.ZodOptional<z.ZodNumber>;
|
|
34
|
+
/** The number of events to retrieve */
|
|
19
35
|
size: z.ZodOptional<z.ZodNumber>;
|
|
36
|
+
/** The start date for filtering events */
|
|
20
37
|
dateFrom: z.ZodOptional<z.ZodDate>;
|
|
38
|
+
/** The end date for filtering events */
|
|
21
39
|
dateTo: z.ZodOptional<z.ZodDate>;
|
|
40
|
+
/** Unique identifier of the trail event */
|
|
22
41
|
id: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
42
|
+
/** User ID related to the trail event */
|
|
23
43
|
userId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
44
|
+
/** The flow ID associated with the event */
|
|
24
45
|
flowId: z.ZodOptional<z.ZodString>;
|
|
46
|
+
/** The bot ID associated with the event */
|
|
25
47
|
botId: z.ZodOptional<z.ZodString>;
|
|
48
|
+
/** The name of the creator of the event */
|
|
26
49
|
creatorName: z.ZodString;
|
|
50
|
+
/** The user ID of the creator of the event */
|
|
27
51
|
creatorUserId: z.ZodOptional<z.ZodString>;
|
|
52
|
+
/** The multi-user ID of the creator of the event */
|
|
28
53
|
creatorMultiUserId: z.ZodOptional<z.ZodString>;
|
|
54
|
+
/** The flow ID of the creator of the event */
|
|
29
55
|
creatorFlowId: z.ZodOptional<z.ZodString>;
|
|
30
56
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
57
|
+
/** The message to be displayed in the notification */
|
|
31
58
|
service: z.ZodString;
|
|
59
|
+
/** The starting point for the list of events */
|
|
32
60
|
from: z.ZodOptional<z.ZodNumber>;
|
|
61
|
+
/** The number of events to retrieve */
|
|
33
62
|
size: z.ZodOptional<z.ZodNumber>;
|
|
63
|
+
/** The start date for filtering events */
|
|
34
64
|
dateFrom: z.ZodOptional<z.ZodDate>;
|
|
65
|
+
/** The end date for filtering events */
|
|
35
66
|
dateTo: z.ZodOptional<z.ZodDate>;
|
|
67
|
+
/** Unique identifier of the trail event */
|
|
36
68
|
id: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
69
|
+
/** User ID related to the trail event */
|
|
37
70
|
userId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
71
|
+
/** The flow ID associated with the event */
|
|
38
72
|
flowId: z.ZodOptional<z.ZodString>;
|
|
73
|
+
/** The bot ID associated with the event */
|
|
39
74
|
botId: z.ZodOptional<z.ZodString>;
|
|
75
|
+
/** The name of the creator of the event */
|
|
40
76
|
creatorName: z.ZodString;
|
|
77
|
+
/** The user ID of the creator of the event */
|
|
41
78
|
creatorUserId: z.ZodOptional<z.ZodString>;
|
|
79
|
+
/** The multi-user ID of the creator of the event */
|
|
42
80
|
creatorMultiUserId: z.ZodOptional<z.ZodString>;
|
|
81
|
+
/** The flow ID of the creator of the event */
|
|
43
82
|
creatorFlowId: z.ZodOptional<z.ZodString>;
|
|
44
83
|
}, z.ZodTypeAny, "passthrough">>;
|
|
45
84
|
export type ListTrailEventsParams = z.infer<typeof listTrailEventsParamsSchema>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"listTrailEvents.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/listTrailEvents.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,2BAA2B
|
|
1
|
+
{"version":3,"file":"listTrailEvents.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/listTrailEvents.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,2BAA2B;IACtC,sDAAsD;;IAGtD,gDAAgD;;IAEhD,uCAAuC;;IAGvC,0CAA0C;;IAE1C,wCAAwC;;IAGxC,2CAA2C;;IAE3C,yCAAyC;;IAGzC,4CAA4C;;IAE5C,2CAA2C;;IAG3C,2CAA2C;;IAE3C,8CAA8C;;IAE9C,oDAAoD;;IAEpD,8CAA8C;;;IA7B9C,sDAAsD;;IAGtD,gDAAgD;;IAEhD,uCAAuC;;IAGvC,0CAA0C;;IAE1C,wCAAwC;;IAGxC,2CAA2C;;IAE3C,yCAAyC;;IAGzC,4CAA4C;;IAE5C,2CAA2C;;IAG3C,2CAA2C;;IAE3C,8CAA8C;;IAE9C,oDAAoD;;IAEpD,8CAA8C;;;IA7B9C,sDAAsD;;IAGtD,gDAAgD;;IAEhD,uCAAuC;;IAGvC,0CAA0C;;IAE1C,wCAAwC;;IAGxC,2CAA2C;;IAE3C,yCAAyC;;IAGzC,4CAA4C;;IAE5C,2CAA2C;;IAG3C,2CAA2C;;IAE3C,8CAA8C;;IAE9C,oDAAoD;;IAEpD,8CAA8C;;gCAEhC,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,77 +1,143 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
declare const trailEventAttributesSchema: z.ZodObject<{
|
|
3
|
+
/** The message to be displayed in the notification */
|
|
3
4
|
message: z.ZodString;
|
|
5
|
+
/** The icon to be displayed in the notification */
|
|
4
6
|
icon: z.ZodString;
|
|
7
|
+
/** The URL to be opened when the notification is clicked */
|
|
5
8
|
url: z.ZodOptional<z.ZodString>;
|
|
9
|
+
/** The name of the URL to be displayed in the notification */
|
|
6
10
|
urlName: z.ZodOptional<z.ZodString>;
|
|
11
|
+
/** The flow ID associated with the event */
|
|
7
12
|
flowId: z.ZodOptional<z.ZodString>;
|
|
13
|
+
/** The bot ID associated with the event */
|
|
8
14
|
botId: z.ZodOptional<z.ZodString>;
|
|
15
|
+
/** The name of the creator of the event */
|
|
9
16
|
'creator.name': z.ZodString;
|
|
17
|
+
/** The user ID of the creator of the event */
|
|
10
18
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
19
|
+
/** The multi-user ID of the creator of the event */
|
|
11
20
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
21
|
+
/** The flow ID of the creator of the event */
|
|
12
22
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
13
23
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
24
|
+
/** The message to be displayed in the notification */
|
|
14
25
|
message: z.ZodString;
|
|
26
|
+
/** The icon to be displayed in the notification */
|
|
15
27
|
icon: z.ZodString;
|
|
28
|
+
/** The URL to be opened when the notification is clicked */
|
|
16
29
|
url: z.ZodOptional<z.ZodString>;
|
|
30
|
+
/** The name of the URL to be displayed in the notification */
|
|
17
31
|
urlName: z.ZodOptional<z.ZodString>;
|
|
32
|
+
/** The flow ID associated with the event */
|
|
18
33
|
flowId: z.ZodOptional<z.ZodString>;
|
|
34
|
+
/** The bot ID associated with the event */
|
|
19
35
|
botId: z.ZodOptional<z.ZodString>;
|
|
36
|
+
/** The name of the creator of the event */
|
|
20
37
|
'creator.name': z.ZodString;
|
|
38
|
+
/** The user ID of the creator of the event */
|
|
21
39
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
40
|
+
/** The multi-user ID of the creator of the event */
|
|
22
41
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
42
|
+
/** The flow ID of the creator of the event */
|
|
23
43
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
24
44
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
45
|
+
/** The message to be displayed in the notification */
|
|
25
46
|
message: z.ZodString;
|
|
47
|
+
/** The icon to be displayed in the notification */
|
|
26
48
|
icon: z.ZodString;
|
|
49
|
+
/** The URL to be opened when the notification is clicked */
|
|
27
50
|
url: z.ZodOptional<z.ZodString>;
|
|
51
|
+
/** The name of the URL to be displayed in the notification */
|
|
28
52
|
urlName: z.ZodOptional<z.ZodString>;
|
|
53
|
+
/** The flow ID associated with the event */
|
|
29
54
|
flowId: z.ZodOptional<z.ZodString>;
|
|
55
|
+
/** The bot ID associated with the event */
|
|
30
56
|
botId: z.ZodOptional<z.ZodString>;
|
|
57
|
+
/** The name of the creator of the event */
|
|
31
58
|
'creator.name': z.ZodString;
|
|
59
|
+
/** The user ID of the creator of the event */
|
|
32
60
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
61
|
+
/** The multi-user ID of the creator of the event */
|
|
33
62
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
63
|
+
/** The flow ID of the creator of the event */
|
|
34
64
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
35
65
|
}, z.ZodTypeAny, "passthrough">>;
|
|
36
66
|
export type TrailEventAttributes = z.infer<typeof trailEventAttributesSchema>;
|
|
37
67
|
export declare const trailEventSchema: z.ZodObject<{
|
|
68
|
+
/** Unique identifier of the trail event */
|
|
38
69
|
id: z.ZodReadonly<z.ZodString>;
|
|
70
|
+
/** The service that triggered the event */
|
|
39
71
|
name: z.ZodString;
|
|
72
|
+
/** Account ID related to the trail event */
|
|
40
73
|
accountId: z.ZodString;
|
|
74
|
+
/** User ID related to the trail event */
|
|
41
75
|
userId: z.ZodOptional<z.ZodString>;
|
|
76
|
+
/** Date-time of the trail event as ISO date-time string */
|
|
42
77
|
timestamp: z.ZodReadonly<z.ZodDate>;
|
|
78
|
+
/** Trail event details */
|
|
43
79
|
attributes: z.ZodObject<{
|
|
80
|
+
/** The message to be displayed in the notification */
|
|
44
81
|
message: z.ZodString;
|
|
82
|
+
/** The icon to be displayed in the notification */
|
|
45
83
|
icon: z.ZodString;
|
|
84
|
+
/** The URL to be opened when the notification is clicked */
|
|
46
85
|
url: z.ZodOptional<z.ZodString>;
|
|
86
|
+
/** The name of the URL to be displayed in the notification */
|
|
47
87
|
urlName: z.ZodOptional<z.ZodString>;
|
|
88
|
+
/** The flow ID associated with the event */
|
|
48
89
|
flowId: z.ZodOptional<z.ZodString>;
|
|
90
|
+
/** The bot ID associated with the event */
|
|
49
91
|
botId: z.ZodOptional<z.ZodString>;
|
|
92
|
+
/** The name of the creator of the event */
|
|
50
93
|
'creator.name': z.ZodString;
|
|
94
|
+
/** The user ID of the creator of the event */
|
|
51
95
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
96
|
+
/** The multi-user ID of the creator of the event */
|
|
52
97
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
98
|
+
/** The flow ID of the creator of the event */
|
|
53
99
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
54
100
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
101
|
+
/** The message to be displayed in the notification */
|
|
55
102
|
message: z.ZodString;
|
|
103
|
+
/** The icon to be displayed in the notification */
|
|
56
104
|
icon: z.ZodString;
|
|
105
|
+
/** The URL to be opened when the notification is clicked */
|
|
57
106
|
url: z.ZodOptional<z.ZodString>;
|
|
107
|
+
/** The name of the URL to be displayed in the notification */
|
|
58
108
|
urlName: z.ZodOptional<z.ZodString>;
|
|
109
|
+
/** The flow ID associated with the event */
|
|
59
110
|
flowId: z.ZodOptional<z.ZodString>;
|
|
111
|
+
/** The bot ID associated with the event */
|
|
60
112
|
botId: z.ZodOptional<z.ZodString>;
|
|
113
|
+
/** The name of the creator of the event */
|
|
61
114
|
'creator.name': z.ZodString;
|
|
115
|
+
/** The user ID of the creator of the event */
|
|
62
116
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
117
|
+
/** The multi-user ID of the creator of the event */
|
|
63
118
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
119
|
+
/** The flow ID of the creator of the event */
|
|
64
120
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
65
121
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
122
|
+
/** The message to be displayed in the notification */
|
|
66
123
|
message: z.ZodString;
|
|
124
|
+
/** The icon to be displayed in the notification */
|
|
67
125
|
icon: z.ZodString;
|
|
126
|
+
/** The URL to be opened when the notification is clicked */
|
|
68
127
|
url: z.ZodOptional<z.ZodString>;
|
|
128
|
+
/** The name of the URL to be displayed in the notification */
|
|
69
129
|
urlName: z.ZodOptional<z.ZodString>;
|
|
130
|
+
/** The flow ID associated with the event */
|
|
70
131
|
flowId: z.ZodOptional<z.ZodString>;
|
|
132
|
+
/** The bot ID associated with the event */
|
|
71
133
|
botId: z.ZodOptional<z.ZodString>;
|
|
134
|
+
/** The name of the creator of the event */
|
|
72
135
|
'creator.name': z.ZodString;
|
|
136
|
+
/** The user ID of the creator of the event */
|
|
73
137
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
138
|
+
/** The multi-user ID of the creator of the event */
|
|
74
139
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
140
|
+
/** The flow ID of the creator of the event */
|
|
75
141
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
76
142
|
}, z.ZodTypeAny, "passthrough">>;
|
|
77
143
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trailEvent.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/trailEvent.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,0BAA0B
|
|
1
|
+
{"version":3,"file":"trailEvent.schema.d.ts","sourceRoot":"","sources":["../../../src/schemas/trailEvent.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,0BAA0B;IAC9B,sDAAsD;;IAEtD,mDAAmD;;IAGnD,4DAA4D;;IAE5D,8DAA8D;;IAG9D,4CAA4C;;IAE5C,2CAA2C;;IAG3C,2CAA2C;;IAE3C,8CAA8C;;IAE9C,oDAAoD;;IAEpD,8CAA8C;;;IArB9C,sDAAsD;;IAEtD,mDAAmD;;IAGnD,4DAA4D;;IAE5D,8DAA8D;;IAG9D,4CAA4C;;IAE5C,2CAA2C;;IAG3C,2CAA2C;;IAE3C,8CAA8C;;IAE9C,oDAAoD;;IAEpD,8CAA8C;;;IArB9C,sDAAsD;;IAEtD,mDAAmD;;IAGnD,4DAA4D;;IAE5D,8DAA8D;;IAG9D,4CAA4C;;IAE5C,2CAA2C;;IAG3C,2CAA2C;;IAE3C,8CAA8C;;IAE9C,oDAAoD;;IAEpD,8CAA8C;;gCAEhC,CAAC;AAEjB,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,gBAAgB;IAC3B,2CAA2C;;IAE3C,2CAA2C;;IAE3C,4CAA4C;;IAE5C,yCAAyC;;IAEzC,2DAA2D;;IAE3D,0BAA0B;;QAtC1B,sDAAsD;;QAEtD,mDAAmD;;QAGnD,4DAA4D;;QAE5D,8DAA8D;;QAG9D,4CAA4C;;QAE5C,2CAA2C;;QAG3C,2CAA2C;;QAE3C,8CAA8C;;QAE9C,oDAAoD;;QAEpD,8CAA8C;;;QArB9C,sDAAsD;;QAEtD,mDAAmD;;QAGnD,4DAA4D;;QAE5D,8DAA8D;;QAG9D,4CAA4C;;QAE5C,2CAA2C;;QAG3C,2CAA2C;;QAE3C,8CAA8C;;QAE9C,oDAAoD;;QAEpD,8CAA8C;;;QArB9C,sDAAsD;;QAEtD,mDAAmD;;QAGnD,4DAA4D;;QAE5D,8DAA8D;;QAG9D,4CAA4C;;QAE5C,2CAA2C;;QAG3C,2CAA2C;;QAE3C,8CAA8C;;QAE9C,oDAAoD;;QAEpD,8CAA8C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmB9C,CAAC;AAEH,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,EAAE,KAAK,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@or-sdk/notifications",
|
|
3
|
-
"version": "1.7.0",
|
|
3
|
+
"version": "1.7.1-beta.4012.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"dev": "pnpm build:watch:esm"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@or-sdk/base": "^0.
|
|
21
|
+
"@or-sdk/base": "^0.44.0-beta.4012.0",
|
|
22
22
|
"zod": "^3.22.4"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
@@ -27,6 +27,5 @@
|
|
|
27
27
|
},
|
|
28
28
|
"publishConfig": {
|
|
29
29
|
"access": "public"
|
|
30
|
-
}
|
|
31
|
-
"gitHead": "ce62679c119c54ef41fd0d8f7084c563c3b21b24"
|
|
30
|
+
}
|
|
32
31
|
}
|