@proveanything/smartlinks 1.0.65 → 1.1.1
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/API_SUMMARY.md +652 -20
- package/README.md +43 -0
- package/dist/api/actions.d.ts +32 -0
- package/dist/api/actions.js +99 -0
- package/dist/api/broadcasts.d.ts +8 -0
- package/dist/api/broadcasts.js +50 -0
- package/dist/api/comms.d.ts +36 -1
- package/dist/api/comms.js +54 -0
- package/dist/api/index.d.ts +4 -0
- package/dist/api/index.js +4 -0
- package/dist/api/journeys.d.ts +8 -0
- package/dist/api/journeys.js +48 -0
- package/dist/api/segments.d.ts +13 -0
- package/dist/api/segments.js +60 -0
- package/dist/types/actions.d.ts +120 -0
- package/dist/types/actions.js +2 -0
- package/dist/types/analytics.d.ts +0 -0
- package/dist/types/analytics.js +3 -0
- package/dist/types/broadcasts.d.ts +31 -0
- package/dist/types/broadcasts.js +2 -0
- package/dist/types/common.d.ts +1 -0
- package/dist/types/common.js +2 -0
- package/dist/types/comms.d.ts +77 -0
- package/dist/types/index.d.ts +5 -0
- package/dist/types/index.js +5 -0
- package/dist/types/journeys.d.ts +57 -0
- package/dist/types/journeys.js +2 -0
- package/dist/types/segments.d.ts +40 -0
- package/dist/types/segments.js +2 -0
- package/package.json +1 -1
package/dist/types/comms.d.ts
CHANGED
|
@@ -104,3 +104,80 @@ export interface SendNotificationResponse {
|
|
|
104
104
|
};
|
|
105
105
|
};
|
|
106
106
|
}
|
|
107
|
+
export interface CommunicationEvent {
|
|
108
|
+
orgId: string;
|
|
109
|
+
sourceId?: string;
|
|
110
|
+
userId?: string;
|
|
111
|
+
contactId?: string;
|
|
112
|
+
channel?: string;
|
|
113
|
+
timestamp: string;
|
|
114
|
+
eventType?: string;
|
|
115
|
+
outcome?: string | null;
|
|
116
|
+
templateId?: string | null;
|
|
117
|
+
[k: string]: any;
|
|
118
|
+
}
|
|
119
|
+
export interface CommsQueryByUser {
|
|
120
|
+
userId?: string;
|
|
121
|
+
contactId?: string;
|
|
122
|
+
from?: string;
|
|
123
|
+
to?: string;
|
|
124
|
+
limit?: number;
|
|
125
|
+
}
|
|
126
|
+
export type RecipientId = string;
|
|
127
|
+
export interface RecipientWithOutcome {
|
|
128
|
+
id: string;
|
|
129
|
+
outcome: string;
|
|
130
|
+
}
|
|
131
|
+
export interface CommsRecipientIdsQuery {
|
|
132
|
+
sourceId: string;
|
|
133
|
+
idField?: 'userId' | 'contactId';
|
|
134
|
+
from?: string;
|
|
135
|
+
to?: string;
|
|
136
|
+
limit?: number;
|
|
137
|
+
}
|
|
138
|
+
export interface CommsRecipientsWithoutActionQuery {
|
|
139
|
+
sourceId: string;
|
|
140
|
+
actionId?: string;
|
|
141
|
+
appId?: string;
|
|
142
|
+
idField?: 'userId' | 'contactId';
|
|
143
|
+
from?: string;
|
|
144
|
+
to?: string;
|
|
145
|
+
limit?: number;
|
|
146
|
+
}
|
|
147
|
+
export interface CommsRecipientsWithActionQuery {
|
|
148
|
+
sourceId: string;
|
|
149
|
+
actionId?: string;
|
|
150
|
+
appId?: string;
|
|
151
|
+
outcome?: string;
|
|
152
|
+
idField?: 'userId' | 'contactId';
|
|
153
|
+
includeOutcome?: boolean;
|
|
154
|
+
from?: string;
|
|
155
|
+
to?: string;
|
|
156
|
+
limit?: number;
|
|
157
|
+
}
|
|
158
|
+
export interface LogCommunicationEventBody {
|
|
159
|
+
sourceId: string;
|
|
160
|
+
userId?: string;
|
|
161
|
+
contactId?: string;
|
|
162
|
+
channel?: string;
|
|
163
|
+
eventType?: string;
|
|
164
|
+
outcome?: string;
|
|
165
|
+
templateId?: string;
|
|
166
|
+
timestamp?: string;
|
|
167
|
+
[k: string]: any;
|
|
168
|
+
}
|
|
169
|
+
export interface LogBulkCommunicationEventsBody {
|
|
170
|
+
params: {
|
|
171
|
+
sourceId: string;
|
|
172
|
+
[k: string]: any;
|
|
173
|
+
};
|
|
174
|
+
ids: string[];
|
|
175
|
+
idField?: 'userId' | 'contactId';
|
|
176
|
+
}
|
|
177
|
+
export interface AppendResult {
|
|
178
|
+
success: true;
|
|
179
|
+
}
|
|
180
|
+
export interface AppendBulkResult {
|
|
181
|
+
success: true;
|
|
182
|
+
count: number;
|
|
183
|
+
}
|
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
export interface JourneyRecord {
|
|
2
|
+
id: string;
|
|
3
|
+
collectionId: string;
|
|
4
|
+
appId?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
active: boolean;
|
|
7
|
+
journeyType: 'event_triggered' | 'scheduled';
|
|
8
|
+
data?: {
|
|
9
|
+
display?: {
|
|
10
|
+
title?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
color?: string;
|
|
14
|
+
};
|
|
15
|
+
steps?: Array<{
|
|
16
|
+
id: string;
|
|
17
|
+
type: string;
|
|
18
|
+
config?: Record<string, unknown>;
|
|
19
|
+
}>;
|
|
20
|
+
triggers?: Array<{
|
|
21
|
+
type: string;
|
|
22
|
+
config?: Record<string, unknown>;
|
|
23
|
+
}>;
|
|
24
|
+
entryRules?: any[];
|
|
25
|
+
exitRules?: any[];
|
|
26
|
+
metadata?: Record<string, unknown>;
|
|
27
|
+
[key: string]: unknown;
|
|
28
|
+
};
|
|
29
|
+
createdAt: string;
|
|
30
|
+
updatedAt: string;
|
|
31
|
+
}
|
|
32
|
+
export interface JourneyList {
|
|
33
|
+
items: JourneyRecord[];
|
|
34
|
+
limit: number;
|
|
35
|
+
offset: number;
|
|
36
|
+
}
|
|
37
|
+
export interface ListJourneysQuery {
|
|
38
|
+
appId?: string;
|
|
39
|
+
active?: boolean;
|
|
40
|
+
journeyType?: 'event_triggered' | 'scheduled';
|
|
41
|
+
limit?: number;
|
|
42
|
+
offset?: number;
|
|
43
|
+
}
|
|
44
|
+
export interface CreateJourneyBody {
|
|
45
|
+
appId?: string;
|
|
46
|
+
name: string;
|
|
47
|
+
active?: boolean;
|
|
48
|
+
journeyType: 'event_triggered' | 'scheduled';
|
|
49
|
+
data?: Record<string, unknown>;
|
|
50
|
+
}
|
|
51
|
+
export interface UpdateJourneyBody {
|
|
52
|
+
appId?: string;
|
|
53
|
+
name?: string;
|
|
54
|
+
active?: boolean;
|
|
55
|
+
journeyType?: 'event_triggered' | 'scheduled';
|
|
56
|
+
data?: Record<string, unknown>;
|
|
57
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface SegmentRecord {
|
|
2
|
+
id: string;
|
|
3
|
+
collectionId: string;
|
|
4
|
+
appId?: string;
|
|
5
|
+
name: string;
|
|
6
|
+
filterType: 'dynamic' | 'static';
|
|
7
|
+
estimatedCount?: number;
|
|
8
|
+
lastCalculatedAt?: string;
|
|
9
|
+
createdAt: string;
|
|
10
|
+
data?: {
|
|
11
|
+
filterRules: any[];
|
|
12
|
+
description?: string;
|
|
13
|
+
staticContactIds?: string[];
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
export interface ListSegmentsQuery {
|
|
18
|
+
appId?: string;
|
|
19
|
+
filterType?: 'dynamic' | 'static';
|
|
20
|
+
limit?: number;
|
|
21
|
+
offset?: number;
|
|
22
|
+
}
|
|
23
|
+
export interface SegmentList {
|
|
24
|
+
items: SegmentRecord[];
|
|
25
|
+
limit: number;
|
|
26
|
+
offset: number;
|
|
27
|
+
}
|
|
28
|
+
export interface SegmentCalculateResult {
|
|
29
|
+
scheduled: true;
|
|
30
|
+
lastCalculatedAt?: string;
|
|
31
|
+
estimatedCount?: number | null;
|
|
32
|
+
note?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface SegmentRecipientsResponse {
|
|
35
|
+
items: string[];
|
|
36
|
+
limit: number;
|
|
37
|
+
offset: number;
|
|
38
|
+
total: number;
|
|
39
|
+
note?: string;
|
|
40
|
+
}
|