@or-sdk/notifications 1.7.1 → 1.7.2-beta.4095.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 +0 -172
- package/dist/types/Notifications.d.ts.map +1 -1
- package/dist/types/schemas/config.schema.d.ts +0 -15
- package/dist/types/schemas/config.schema.d.ts.map +1 -1
- package/dist/types/schemas/createTrailEvent.schema.d.ts +0 -2
- package/dist/types/schemas/createTrailEvent.schema.d.ts.map +1 -1
- package/dist/types/schemas/listTrailEvents.schema.d.ts +0 -39
- package/dist/types/schemas/listTrailEvents.schema.d.ts.map +1 -1
- package/dist/types/schemas/trailEvent.schema.d.ts +0 -66
- package/dist/types/schemas/trailEvent.schema.d.ts.map +1 -1
- package/package.json +3 -4
|
@@ -1,196 +1,24 @@
|
|
|
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
|
-
*/
|
|
13
4
|
export declare class Notifications extends Base {
|
|
14
5
|
private readonly validateInputs;
|
|
15
6
|
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
|
-
*/
|
|
51
7
|
constructor(params: NotificationsConfig);
|
|
52
|
-
/**
|
|
53
|
-
* List notifications
|
|
54
|
-
* ```typescript
|
|
55
|
-
* await notifications.listNotifications({size, from});
|
|
56
|
-
* ```
|
|
57
|
-
*/
|
|
58
8
|
listNotifications(params?: ListNotificationsParams): Promise<NotificationItem[]>;
|
|
59
|
-
/**
|
|
60
|
-
* Mark all notifications seen
|
|
61
|
-
* ```typescript
|
|
62
|
-
* await notifications.markSeen();
|
|
63
|
-
* ```
|
|
64
|
-
*/
|
|
65
9
|
markSeen(): Promise<void>;
|
|
66
|
-
/**
|
|
67
|
-
* Create user notification
|
|
68
|
-
* ```typescript
|
|
69
|
-
* await notifications.createUserNotification(data);
|
|
70
|
-
* ```
|
|
71
|
-
*/
|
|
72
10
|
createUserNotification(data: NotificationData): Promise<void>;
|
|
73
|
-
/**
|
|
74
|
-
* Create user notification
|
|
75
|
-
* ```typescript
|
|
76
|
-
* await notifications.createAccountNotification(data);
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
11
|
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
|
-
*/
|
|
86
12
|
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
|
-
*/
|
|
93
13
|
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
|
-
*/
|
|
100
14
|
SAUpdateNotification(id: string, data: FullNotificationItem): Promise<void>;
|
|
101
|
-
/**
|
|
102
|
-
* Super admin delete notification
|
|
103
|
-
* ```typescript
|
|
104
|
-
* await notifications.SADeleteNotification(id);
|
|
105
|
-
* ```
|
|
106
|
-
*/
|
|
107
15
|
SADeleteNotification(id: string): Promise<void>;
|
|
108
|
-
/**
|
|
109
|
-
* Create new trail event
|
|
110
|
-
*
|
|
111
|
-
* ```typescript
|
|
112
|
-
* await notifications.createTrailEvent({service: 'pgsql', data});
|
|
113
|
-
* ```
|
|
114
|
-
*/
|
|
115
16
|
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
|
-
*/
|
|
132
17
|
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
|
-
*/
|
|
147
18
|
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
|
-
*/
|
|
163
19
|
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
|
-
*/
|
|
182
20
|
sendPush(data: PushNotificationParams): Promise<void>;
|
|
183
|
-
/**
|
|
184
|
-
* @description Get public key to ask for subscription
|
|
185
|
-
* ```typescript
|
|
186
|
-
* await notifications.getVapidKey();
|
|
187
|
-
*/
|
|
188
21
|
getVapidKey(): Promise<GetVapidKeyResponse>;
|
|
189
|
-
/**
|
|
190
|
-
* @description Subscribe user for push notifications
|
|
191
|
-
* ```typescript
|
|
192
|
-
* await notifications.subscribePush(data);
|
|
193
|
-
*/
|
|
194
22
|
subscribePush(data: SubscribePushParams): Promise<void>;
|
|
195
23
|
}
|
|
196
24
|
//# 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;AAWjB,qBAAa,aAAc,SAAQ,IAAI;IACrC,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAU;IACzC,OAAO,CAAC,QAAQ,CAAC,eAAe,CAAU;gBAqC9B,MAAM,EAAE,mBAAmB;IAsB1B,iBAAiB,CAAC,MAAM,GAAS,uBAAuB,GAAG,OAAO,CAAC,gBAAgB,EAAE,CAAC;IActF,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAazB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAc7D,yBAAyB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAchE,oBAAoB,CAAC,MAAM,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC;IAcvE,mBAAmB,CAAC,MAAM,GAAS,mBAAmB,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAcxF,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAc3E,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAc/C,gBAAgB,CAAC,IAAI,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBvD,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAwBrE,eAAe,CAAC,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBnE,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,6BAA6B,GAAG,OAAO,CAAC,IAAI,CAAC;IA0B9E,QAAQ,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAarD,WAAW,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAa3C,aAAa,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;CAOrE"}
|
|
@@ -1,17 +1,11 @@
|
|
|
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. */
|
|
4
3
|
token: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodString>]>;
|
|
5
|
-
/** Account id for cross-account requests. Requires SUPER_ADMIN role. */
|
|
6
4
|
accountId: z.ZodOptional<z.ZodString>;
|
|
7
|
-
/** If true validate method params. Default: true */
|
|
8
5
|
validateInputs: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
-
/** If true validate method results. Default: true */
|
|
10
6
|
validateOutputs: z.ZodOptional<z.ZodBoolean>;
|
|
11
7
|
}, {
|
|
12
|
-
/** URL of ServiceDiscovery API service */
|
|
13
8
|
discoveryUrl: z.ZodUndefined;
|
|
14
|
-
/** URL of Notifications API service */
|
|
15
9
|
notificationsUrl: z.ZodString;
|
|
16
10
|
}>, "strip", z.ZodTypeAny, {
|
|
17
11
|
token: string | ((...args: unknown[]) => string);
|
|
@@ -28,18 +22,12 @@ export declare const notificationsConfigSchema: z.ZodUnion<[z.ZodObject<z.object
|
|
|
28
22
|
validateOutputs?: boolean | undefined;
|
|
29
23
|
discoveryUrl?: undefined;
|
|
30
24
|
}>, z.ZodObject<z.objectUtil.extendShape<{
|
|
31
|
-
/** Authorization token or factory function. */
|
|
32
25
|
token: z.ZodUnion<[z.ZodString, z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodString>]>;
|
|
33
|
-
/** Account id for cross-account requests. Requires SUPER_ADMIN role. */
|
|
34
26
|
accountId: z.ZodOptional<z.ZodString>;
|
|
35
|
-
/** If true validate method params. Default: true */
|
|
36
27
|
validateInputs: z.ZodOptional<z.ZodBoolean>;
|
|
37
|
-
/** If true validate method results. Default: true */
|
|
38
28
|
validateOutputs: z.ZodOptional<z.ZodBoolean>;
|
|
39
29
|
}, {
|
|
40
|
-
/** URL of ServiceDiscovery API service */
|
|
41
30
|
discoveryUrl: z.ZodString;
|
|
42
|
-
/** URL of Notifications API service */
|
|
43
31
|
notificationsUrl: z.ZodUndefined;
|
|
44
32
|
}>, "strip", z.ZodTypeAny, {
|
|
45
33
|
token: string | ((...args: unknown[]) => string);
|
|
@@ -56,8 +44,5 @@ export declare const notificationsConfigSchema: z.ZodUnion<[z.ZodObject<z.object
|
|
|
56
44
|
validateOutputs?: boolean | undefined;
|
|
57
45
|
notificationsUrl?: undefined;
|
|
58
46
|
}>]>;
|
|
59
|
-
/**
|
|
60
|
-
* @typedef {z.infer<typeof notificationsConfigSchema>} NotificationsConfig
|
|
61
|
-
*/
|
|
62
47
|
export type NotificationsConfig = z.infer<typeof notificationsConfigSchema>;
|
|
63
48
|
//# 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAapC,CAAC;AAKH,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,EAAE,KAAK,CAAC,CAAC"}
|
|
@@ -1,84 +1,45 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const listTrailEventsParamsSchema: z.ZodObject<{
|
|
3
|
-
/** The message to be displayed in the notification */
|
|
4
3
|
service: z.ZodString;
|
|
5
|
-
/** The starting point for the list of events */
|
|
6
4
|
from: z.ZodOptional<z.ZodNumber>;
|
|
7
|
-
/** The number of events to retrieve */
|
|
8
5
|
size: z.ZodOptional<z.ZodNumber>;
|
|
9
|
-
/** The start date for filtering events */
|
|
10
6
|
dateFrom: z.ZodOptional<z.ZodDate>;
|
|
11
|
-
/** The end date for filtering events */
|
|
12
7
|
dateTo: z.ZodOptional<z.ZodDate>;
|
|
13
|
-
/** Unique identifier of the trail event */
|
|
14
8
|
id: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
15
|
-
/** User ID related to the trail event */
|
|
16
9
|
userId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
17
|
-
/** The flow ID associated with the event */
|
|
18
10
|
flowId: z.ZodOptional<z.ZodString>;
|
|
19
|
-
/** The bot ID associated with the event */
|
|
20
11
|
botId: z.ZodOptional<z.ZodString>;
|
|
21
|
-
/** The name of the creator of the event */
|
|
22
12
|
creatorName: z.ZodString;
|
|
23
|
-
/** The user ID of the creator of the event */
|
|
24
13
|
creatorUserId: z.ZodOptional<z.ZodString>;
|
|
25
|
-
/** The multi-user ID of the creator of the event */
|
|
26
14
|
creatorMultiUserId: z.ZodOptional<z.ZodString>;
|
|
27
|
-
/** The flow ID of the creator of the event */
|
|
28
15
|
creatorFlowId: z.ZodOptional<z.ZodString>;
|
|
29
16
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
30
|
-
/** The message to be displayed in the notification */
|
|
31
17
|
service: z.ZodString;
|
|
32
|
-
/** The starting point for the list of events */
|
|
33
18
|
from: z.ZodOptional<z.ZodNumber>;
|
|
34
|
-
/** The number of events to retrieve */
|
|
35
19
|
size: z.ZodOptional<z.ZodNumber>;
|
|
36
|
-
/** The start date for filtering events */
|
|
37
20
|
dateFrom: z.ZodOptional<z.ZodDate>;
|
|
38
|
-
/** The end date for filtering events */
|
|
39
21
|
dateTo: z.ZodOptional<z.ZodDate>;
|
|
40
|
-
/** Unique identifier of the trail event */
|
|
41
22
|
id: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
42
|
-
/** User ID related to the trail event */
|
|
43
23
|
userId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
44
|
-
/** The flow ID associated with the event */
|
|
45
24
|
flowId: z.ZodOptional<z.ZodString>;
|
|
46
|
-
/** The bot ID associated with the event */
|
|
47
25
|
botId: z.ZodOptional<z.ZodString>;
|
|
48
|
-
/** The name of the creator of the event */
|
|
49
26
|
creatorName: z.ZodString;
|
|
50
|
-
/** The user ID of the creator of the event */
|
|
51
27
|
creatorUserId: z.ZodOptional<z.ZodString>;
|
|
52
|
-
/** The multi-user ID of the creator of the event */
|
|
53
28
|
creatorMultiUserId: z.ZodOptional<z.ZodString>;
|
|
54
|
-
/** The flow ID of the creator of the event */
|
|
55
29
|
creatorFlowId: z.ZodOptional<z.ZodString>;
|
|
56
30
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
57
|
-
/** The message to be displayed in the notification */
|
|
58
31
|
service: z.ZodString;
|
|
59
|
-
/** The starting point for the list of events */
|
|
60
32
|
from: z.ZodOptional<z.ZodNumber>;
|
|
61
|
-
/** The number of events to retrieve */
|
|
62
33
|
size: z.ZodOptional<z.ZodNumber>;
|
|
63
|
-
/** The start date for filtering events */
|
|
64
34
|
dateFrom: z.ZodOptional<z.ZodDate>;
|
|
65
|
-
/** The end date for filtering events */
|
|
66
35
|
dateTo: z.ZodOptional<z.ZodDate>;
|
|
67
|
-
/** Unique identifier of the trail event */
|
|
68
36
|
id: z.ZodOptional<z.ZodReadonly<z.ZodString>>;
|
|
69
|
-
/** User ID related to the trail event */
|
|
70
37
|
userId: z.ZodOptional<z.ZodOptional<z.ZodString>>;
|
|
71
|
-
/** The flow ID associated with the event */
|
|
72
38
|
flowId: z.ZodOptional<z.ZodString>;
|
|
73
|
-
/** The bot ID associated with the event */
|
|
74
39
|
botId: z.ZodOptional<z.ZodString>;
|
|
75
|
-
/** The name of the creator of the event */
|
|
76
40
|
creatorName: z.ZodString;
|
|
77
|
-
/** The user ID of the creator of the event */
|
|
78
41
|
creatorUserId: z.ZodOptional<z.ZodString>;
|
|
79
|
-
/** The multi-user ID of the creator of the event */
|
|
80
42
|
creatorMultiUserId: z.ZodOptional<z.ZodString>;
|
|
81
|
-
/** The flow ID of the creator of the event */
|
|
82
43
|
creatorFlowId: z.ZodOptional<z.ZodString>;
|
|
83
44
|
}, z.ZodTypeAny, "passthrough">>;
|
|
84
45
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAgCxB,CAAC;AAEjB,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
|
@@ -1,143 +1,77 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
declare const trailEventAttributesSchema: z.ZodObject<{
|
|
3
|
-
/** The message to be displayed in the notification */
|
|
4
3
|
message: z.ZodString;
|
|
5
|
-
/** The icon to be displayed in the notification */
|
|
6
4
|
icon: z.ZodString;
|
|
7
|
-
/** The URL to be opened when the notification is clicked */
|
|
8
5
|
url: z.ZodOptional<z.ZodString>;
|
|
9
|
-
/** The name of the URL to be displayed in the notification */
|
|
10
6
|
urlName: z.ZodOptional<z.ZodString>;
|
|
11
|
-
/** The flow ID associated with the event */
|
|
12
7
|
flowId: z.ZodOptional<z.ZodString>;
|
|
13
|
-
/** The bot ID associated with the event */
|
|
14
8
|
botId: z.ZodOptional<z.ZodString>;
|
|
15
|
-
/** The name of the creator of the event */
|
|
16
9
|
'creator.name': z.ZodString;
|
|
17
|
-
/** The user ID of the creator of the event */
|
|
18
10
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
19
|
-
/** The multi-user ID of the creator of the event */
|
|
20
11
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
21
|
-
/** The flow ID of the creator of the event */
|
|
22
12
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
23
13
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
24
|
-
/** The message to be displayed in the notification */
|
|
25
14
|
message: z.ZodString;
|
|
26
|
-
/** The icon to be displayed in the notification */
|
|
27
15
|
icon: z.ZodString;
|
|
28
|
-
/** The URL to be opened when the notification is clicked */
|
|
29
16
|
url: z.ZodOptional<z.ZodString>;
|
|
30
|
-
/** The name of the URL to be displayed in the notification */
|
|
31
17
|
urlName: z.ZodOptional<z.ZodString>;
|
|
32
|
-
/** The flow ID associated with the event */
|
|
33
18
|
flowId: z.ZodOptional<z.ZodString>;
|
|
34
|
-
/** The bot ID associated with the event */
|
|
35
19
|
botId: z.ZodOptional<z.ZodString>;
|
|
36
|
-
/** The name of the creator of the event */
|
|
37
20
|
'creator.name': z.ZodString;
|
|
38
|
-
/** The user ID of the creator of the event */
|
|
39
21
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
40
|
-
/** The multi-user ID of the creator of the event */
|
|
41
22
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
42
|
-
/** The flow ID of the creator of the event */
|
|
43
23
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
44
24
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
45
|
-
/** The message to be displayed in the notification */
|
|
46
25
|
message: z.ZodString;
|
|
47
|
-
/** The icon to be displayed in the notification */
|
|
48
26
|
icon: z.ZodString;
|
|
49
|
-
/** The URL to be opened when the notification is clicked */
|
|
50
27
|
url: z.ZodOptional<z.ZodString>;
|
|
51
|
-
/** The name of the URL to be displayed in the notification */
|
|
52
28
|
urlName: z.ZodOptional<z.ZodString>;
|
|
53
|
-
/** The flow ID associated with the event */
|
|
54
29
|
flowId: z.ZodOptional<z.ZodString>;
|
|
55
|
-
/** The bot ID associated with the event */
|
|
56
30
|
botId: z.ZodOptional<z.ZodString>;
|
|
57
|
-
/** The name of the creator of the event */
|
|
58
31
|
'creator.name': z.ZodString;
|
|
59
|
-
/** The user ID of the creator of the event */
|
|
60
32
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
61
|
-
/** The multi-user ID of the creator of the event */
|
|
62
33
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
63
|
-
/** The flow ID of the creator of the event */
|
|
64
34
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
65
35
|
}, z.ZodTypeAny, "passthrough">>;
|
|
66
36
|
export type TrailEventAttributes = z.infer<typeof trailEventAttributesSchema>;
|
|
67
37
|
export declare const trailEventSchema: z.ZodObject<{
|
|
68
|
-
/** Unique identifier of the trail event */
|
|
69
38
|
id: z.ZodReadonly<z.ZodString>;
|
|
70
|
-
/** The service that triggered the event */
|
|
71
39
|
name: z.ZodString;
|
|
72
|
-
/** Account ID related to the trail event */
|
|
73
40
|
accountId: z.ZodString;
|
|
74
|
-
/** User ID related to the trail event */
|
|
75
41
|
userId: z.ZodOptional<z.ZodString>;
|
|
76
|
-
/** Date-time of the trail event as ISO date-time string */
|
|
77
42
|
timestamp: z.ZodReadonly<z.ZodDate>;
|
|
78
|
-
/** Trail event details */
|
|
79
43
|
attributes: z.ZodObject<{
|
|
80
|
-
/** The message to be displayed in the notification */
|
|
81
44
|
message: z.ZodString;
|
|
82
|
-
/** The icon to be displayed in the notification */
|
|
83
45
|
icon: z.ZodString;
|
|
84
|
-
/** The URL to be opened when the notification is clicked */
|
|
85
46
|
url: z.ZodOptional<z.ZodString>;
|
|
86
|
-
/** The name of the URL to be displayed in the notification */
|
|
87
47
|
urlName: z.ZodOptional<z.ZodString>;
|
|
88
|
-
/** The flow ID associated with the event */
|
|
89
48
|
flowId: z.ZodOptional<z.ZodString>;
|
|
90
|
-
/** The bot ID associated with the event */
|
|
91
49
|
botId: z.ZodOptional<z.ZodString>;
|
|
92
|
-
/** The name of the creator of the event */
|
|
93
50
|
'creator.name': z.ZodString;
|
|
94
|
-
/** The user ID of the creator of the event */
|
|
95
51
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
96
|
-
/** The multi-user ID of the creator of the event */
|
|
97
52
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
98
|
-
/** The flow ID of the creator of the event */
|
|
99
53
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
100
54
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
101
|
-
/** The message to be displayed in the notification */
|
|
102
55
|
message: z.ZodString;
|
|
103
|
-
/** The icon to be displayed in the notification */
|
|
104
56
|
icon: z.ZodString;
|
|
105
|
-
/** The URL to be opened when the notification is clicked */
|
|
106
57
|
url: z.ZodOptional<z.ZodString>;
|
|
107
|
-
/** The name of the URL to be displayed in the notification */
|
|
108
58
|
urlName: z.ZodOptional<z.ZodString>;
|
|
109
|
-
/** The flow ID associated with the event */
|
|
110
59
|
flowId: z.ZodOptional<z.ZodString>;
|
|
111
|
-
/** The bot ID associated with the event */
|
|
112
60
|
botId: z.ZodOptional<z.ZodString>;
|
|
113
|
-
/** The name of the creator of the event */
|
|
114
61
|
'creator.name': z.ZodString;
|
|
115
|
-
/** The user ID of the creator of the event */
|
|
116
62
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
117
|
-
/** The multi-user ID of the creator of the event */
|
|
118
63
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
119
|
-
/** The flow ID of the creator of the event */
|
|
120
64
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
121
65
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
122
|
-
/** The message to be displayed in the notification */
|
|
123
66
|
message: z.ZodString;
|
|
124
|
-
/** The icon to be displayed in the notification */
|
|
125
67
|
icon: z.ZodString;
|
|
126
|
-
/** The URL to be opened when the notification is clicked */
|
|
127
68
|
url: z.ZodOptional<z.ZodString>;
|
|
128
|
-
/** The name of the URL to be displayed in the notification */
|
|
129
69
|
urlName: z.ZodOptional<z.ZodString>;
|
|
130
|
-
/** The flow ID associated with the event */
|
|
131
70
|
flowId: z.ZodOptional<z.ZodString>;
|
|
132
|
-
/** The bot ID associated with the event */
|
|
133
71
|
botId: z.ZodOptional<z.ZodString>;
|
|
134
|
-
/** The name of the creator of the event */
|
|
135
72
|
'creator.name': z.ZodString;
|
|
136
|
-
/** The user ID of the creator of the event */
|
|
137
73
|
'creator.userId': z.ZodOptional<z.ZodString>;
|
|
138
|
-
/** The multi-user ID of the creator of the event */
|
|
139
74
|
'creator.multiUserId': z.ZodOptional<z.ZodString>;
|
|
140
|
-
/** The flow ID of the creator of the event */
|
|
141
75
|
'creator.flowId': z.ZodOptional<z.ZodString>;
|
|
142
76
|
}, z.ZodTypeAny, "passthrough">>;
|
|
143
77
|
}, "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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCAwBhB,CAAC;AAEjB,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAa3B,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.
|
|
3
|
+
"version": "1.7.2-beta.4095.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.44.0",
|
|
21
|
+
"@or-sdk/base": "^0.44.1-beta.4095.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": "7d3b49250a670964dfe9e8e50e95417761c5473f"
|
|
30
|
+
}
|
|
32
31
|
}
|