@proveanything/smartlinks 1.1.17 → 1.1.19
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 +13 -34
- package/dist/api/interactions.d.ts +4 -9
- package/dist/api/interactions.js +8 -16
- package/dist/types/interaction.d.ts +6 -15
- package/dist/types/segments.d.ts +2 -2
- package/package.json +1 -1
package/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.19 | Generated: 2026-01-04T13:24:27.030Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -766,18 +766,23 @@ interface ErrorResponse {
|
|
|
766
766
|
|
|
767
767
|
### interaction
|
|
768
768
|
|
|
769
|
-
**
|
|
769
|
+
**AdminInteractionsQueryRequest** (interface)
|
|
770
770
|
```typescript
|
|
771
|
-
interface
|
|
771
|
+
interface AdminInteractionsQueryRequest {
|
|
772
772
|
userId?: string
|
|
773
773
|
contactId?: string
|
|
774
774
|
appId?: string
|
|
775
775
|
interactionId?: string
|
|
776
|
+
interactionIds?: string[]
|
|
776
777
|
broadcastId?: string
|
|
777
778
|
outcome?: string | null
|
|
778
779
|
from?: string
|
|
779
780
|
to?: string
|
|
780
781
|
limit?: number
|
|
782
|
+
includeDeleted?: boolean
|
|
783
|
+
latestPerEventId?: boolean
|
|
784
|
+
order?: 'ASC' | 'DESC'
|
|
785
|
+
include?: Array<'interaction'>
|
|
781
786
|
}
|
|
782
787
|
```
|
|
783
788
|
|
|
@@ -794,19 +799,6 @@ interface AdminInteractionsCountsByOutcomeRequest {
|
|
|
794
799
|
}
|
|
795
800
|
```
|
|
796
801
|
|
|
797
|
-
**AdminActorIdsByInteractionRequest** (interface)
|
|
798
|
-
```typescript
|
|
799
|
-
interface AdminActorIdsByInteractionRequest {
|
|
800
|
-
interactionId: string
|
|
801
|
-
idField?: IdField
|
|
802
|
-
outcome?: string | null
|
|
803
|
-
includeOutcome?: boolean
|
|
804
|
-
from?: string
|
|
805
|
-
to?: string
|
|
806
|
-
limit?: number
|
|
807
|
-
}
|
|
808
|
-
```
|
|
809
|
-
|
|
810
802
|
**PublicInteractionsCountsByOutcomeRequest** (interface)
|
|
811
803
|
```typescript
|
|
812
804
|
interface PublicInteractionsCountsByOutcomeRequest {
|
|
@@ -853,13 +845,6 @@ interface OutcomeCount {
|
|
|
853
845
|
}
|
|
854
846
|
```
|
|
855
847
|
|
|
856
|
-
**ActorWithOutcome** (interface)
|
|
857
|
-
```typescript
|
|
858
|
-
interface ActorWithOutcome {
|
|
859
|
-
id: string; outcome: string | null
|
|
860
|
-
}
|
|
861
|
-
```
|
|
862
|
-
|
|
863
848
|
**InteractionEventBase** (interface)
|
|
864
849
|
```typescript
|
|
865
850
|
interface InteractionEventBase {
|
|
@@ -966,8 +951,6 @@ interface ListInteractionTypesQuery {
|
|
|
966
951
|
}
|
|
967
952
|
```
|
|
968
953
|
|
|
969
|
-
**ActorId** = `string`
|
|
970
|
-
|
|
971
954
|
### journeys
|
|
972
955
|
|
|
973
956
|
**JourneyRecord** (interface)
|
|
@@ -1336,7 +1319,7 @@ interface SegmentList {
|
|
|
1336
1319
|
**SegmentCalculateResult** (interface)
|
|
1337
1320
|
```typescript
|
|
1338
1321
|
interface SegmentCalculateResult {
|
|
1339
|
-
scheduled:
|
|
1322
|
+
scheduled: boolean
|
|
1340
1323
|
lastCalculatedAt?: string
|
|
1341
1324
|
estimatedCount?: number | null
|
|
1342
1325
|
note?: string
|
|
@@ -1346,7 +1329,7 @@ interface SegmentCalculateResult {
|
|
|
1346
1329
|
**SegmentRecipientsResponse** (interface)
|
|
1347
1330
|
```typescript
|
|
1348
1331
|
interface SegmentRecipientsResponse {
|
|
1349
|
-
items:
|
|
1332
|
+
items: import('./contact').Contact[]
|
|
1350
1333
|
limit: number
|
|
1351
1334
|
offset: number
|
|
1352
1335
|
total: number
|
|
@@ -1985,18 +1968,14 @@ Delete a form for a collection (admin only).
|
|
|
1985
1968
|
|
|
1986
1969
|
### interactions
|
|
1987
1970
|
|
|
1988
|
-
**
|
|
1989
|
-
|
|
1990
|
-
POST /admin/collection/:collectionId/interactions/
|
|
1971
|
+
**query**(collectionId: string,
|
|
1972
|
+
body: AdminInteractionsQueryRequest) → `Promise<InteractionEventRow[]>`
|
|
1973
|
+
POST /admin/collection/:collectionId/interactions/query Flexible query for interaction events with optional includes.
|
|
1991
1974
|
|
|
1992
1975
|
**countsByOutcome**(collectionId: string,
|
|
1993
1976
|
query: AdminInteractionsCountsByOutcomeRequest = {}) → `Promise<OutcomeCount[]>`
|
|
1994
1977
|
POST /admin/collection/:collectionId/interactions/counts-by-outcome Returns array of { outcome, count }.
|
|
1995
1978
|
|
|
1996
|
-
**actorIdsByInteraction**(collectionId: string,
|
|
1997
|
-
query: AdminActorIdsByInteractionRequest) → `Promise<ActorId[] | ActorWithOutcome[]>`
|
|
1998
|
-
POST /admin/collection/:collectionId/interactions/actor-ids/by-interaction Returns list of IDs, optionally with outcome when includeOutcome=true.
|
|
1999
|
-
|
|
2000
1979
|
**appendEvent**(collectionId: string,
|
|
2001
1980
|
body: AppendInteractionBody) → `Promise<`
|
|
2002
1981
|
POST /admin/collection/:collectionId/interactions/append Appends one interaction event.
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AdminInteractionsCountsByOutcomeRequest, AdminInteractionsQueryRequest, AppendInteractionBody, UpdateInteractionBody, OutcomeCount, InteractionEventRow, PublicInteractionsCountsByOutcomeRequest, PublicInteractionsByUserRequest, CreateInteractionTypeBody, UpdateInteractionTypeBody, ListInteractionTypesQuery, InteractionTypeRecord, InteractionTypeList } from "../types/interaction";
|
|
2
2
|
export declare namespace interactions {
|
|
3
3
|
/**
|
|
4
|
-
* POST /admin/collection/:collectionId/interactions/
|
|
5
|
-
*
|
|
4
|
+
* POST /admin/collection/:collectionId/interactions/query
|
|
5
|
+
* Flexible query for interaction events with optional includes.
|
|
6
6
|
*/
|
|
7
|
-
function
|
|
7
|
+
function query(collectionId: string, body: AdminInteractionsQueryRequest): Promise<InteractionEventRow[]>;
|
|
8
8
|
/**
|
|
9
9
|
* POST /admin/collection/:collectionId/interactions/counts-by-outcome
|
|
10
10
|
* Returns array of { outcome, count }.
|
|
11
11
|
*/
|
|
12
12
|
function countsByOutcome(collectionId: string, query?: AdminInteractionsCountsByOutcomeRequest): Promise<OutcomeCount[]>;
|
|
13
|
-
/**
|
|
14
|
-
* POST /admin/collection/:collectionId/interactions/actor-ids/by-interaction
|
|
15
|
-
* Returns list of IDs, optionally with outcome when includeOutcome=true.
|
|
16
|
-
*/
|
|
17
|
-
function actorIdsByInteraction(collectionId: string, query: AdminActorIdsByInteractionRequest): Promise<ActorId[] | ActorWithOutcome[]>;
|
|
18
13
|
/**
|
|
19
14
|
* POST /admin/collection/:collectionId/interactions/append
|
|
20
15
|
* Appends one interaction event.
|
package/dist/api/interactions.js
CHANGED
|
@@ -18,14 +18,14 @@ function encodeQuery(params) {
|
|
|
18
18
|
export var interactions;
|
|
19
19
|
(function (interactions) {
|
|
20
20
|
/**
|
|
21
|
-
* POST /admin/collection/:collectionId/interactions/
|
|
22
|
-
*
|
|
21
|
+
* POST /admin/collection/:collectionId/interactions/query
|
|
22
|
+
* Flexible query for interaction events with optional includes.
|
|
23
23
|
*/
|
|
24
|
-
async function
|
|
25
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/
|
|
26
|
-
return post(path,
|
|
24
|
+
async function query(collectionId, body) {
|
|
25
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/query`;
|
|
26
|
+
return post(path, body);
|
|
27
27
|
}
|
|
28
|
-
interactions.
|
|
28
|
+
interactions.query = query;
|
|
29
29
|
/**
|
|
30
30
|
* POST /admin/collection/:collectionId/interactions/counts-by-outcome
|
|
31
31
|
* Returns array of { outcome, count }.
|
|
@@ -35,15 +35,7 @@ export var interactions;
|
|
|
35
35
|
return post(path, query);
|
|
36
36
|
}
|
|
37
37
|
interactions.countsByOutcome = countsByOutcome;
|
|
38
|
-
|
|
39
|
-
* POST /admin/collection/:collectionId/interactions/actor-ids/by-interaction
|
|
40
|
-
* Returns list of IDs, optionally with outcome when includeOutcome=true.
|
|
41
|
-
*/
|
|
42
|
-
async function actorIdsByInteraction(collectionId, query) {
|
|
43
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/actor-ids/by-interaction`;
|
|
44
|
-
return post(path, query);
|
|
45
|
-
}
|
|
46
|
-
interactions.actorIdsByInteraction = actorIdsByInteraction;
|
|
38
|
+
// Deprecated endpoint removed: actorIdsByInteraction
|
|
47
39
|
/**
|
|
48
40
|
* POST /admin/collection/:collectionId/interactions/append
|
|
49
41
|
* Appends one interaction event.
|
|
@@ -60,7 +52,7 @@ export var interactions;
|
|
|
60
52
|
if (!body.userId && !body.contactId) {
|
|
61
53
|
throw new Error("AppendInteractionBody must include one of userId or contactId");
|
|
62
54
|
}
|
|
63
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/
|
|
55
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/events/update`;
|
|
64
56
|
return post(path, body);
|
|
65
57
|
}
|
|
66
58
|
interactions.updateEvent = updateEvent;
|
|
@@ -1,14 +1,19 @@
|
|
|
1
1
|
import type { IdField } from './common';
|
|
2
|
-
export interface
|
|
2
|
+
export interface AdminInteractionsQueryRequest {
|
|
3
3
|
userId?: string;
|
|
4
4
|
contactId?: string;
|
|
5
5
|
appId?: string;
|
|
6
6
|
interactionId?: string;
|
|
7
|
+
interactionIds?: string[];
|
|
7
8
|
broadcastId?: string;
|
|
8
9
|
outcome?: string | null;
|
|
9
10
|
from?: string;
|
|
10
11
|
to?: string;
|
|
11
12
|
limit?: number;
|
|
13
|
+
includeDeleted?: boolean;
|
|
14
|
+
latestPerEventId?: boolean;
|
|
15
|
+
order?: 'ASC' | 'DESC';
|
|
16
|
+
include?: Array<'interaction'>;
|
|
12
17
|
}
|
|
13
18
|
export interface AdminInteractionsCountsByOutcomeRequest {
|
|
14
19
|
appId?: string;
|
|
@@ -19,15 +24,6 @@ export interface AdminInteractionsCountsByOutcomeRequest {
|
|
|
19
24
|
dedupeLatest?: boolean;
|
|
20
25
|
idField?: IdField;
|
|
21
26
|
}
|
|
22
|
-
export interface AdminActorIdsByInteractionRequest {
|
|
23
|
-
interactionId: string;
|
|
24
|
-
idField?: IdField;
|
|
25
|
-
outcome?: string | null;
|
|
26
|
-
includeOutcome?: boolean;
|
|
27
|
-
from?: string;
|
|
28
|
-
to?: string;
|
|
29
|
-
limit?: number;
|
|
30
|
-
}
|
|
31
27
|
export interface PublicInteractionsCountsByOutcomeRequest {
|
|
32
28
|
appId: string;
|
|
33
29
|
interactionId: string;
|
|
@@ -59,11 +55,6 @@ export interface OutcomeCount {
|
|
|
59
55
|
outcome: string | null;
|
|
60
56
|
count: number;
|
|
61
57
|
}
|
|
62
|
-
export type ActorId = string;
|
|
63
|
-
export interface ActorWithOutcome {
|
|
64
|
-
id: string;
|
|
65
|
-
outcome: string | null;
|
|
66
|
-
}
|
|
67
58
|
export interface InteractionEventBase {
|
|
68
59
|
collectionId: string;
|
|
69
60
|
orgId?: string;
|
package/dist/types/segments.d.ts
CHANGED
|
@@ -26,13 +26,13 @@ export interface SegmentList {
|
|
|
26
26
|
offset: number;
|
|
27
27
|
}
|
|
28
28
|
export interface SegmentCalculateResult {
|
|
29
|
-
scheduled:
|
|
29
|
+
scheduled: boolean;
|
|
30
30
|
lastCalculatedAt?: string;
|
|
31
31
|
estimatedCount?: number | null;
|
|
32
32
|
note?: string;
|
|
33
33
|
}
|
|
34
34
|
export interface SegmentRecipientsResponse {
|
|
35
|
-
items:
|
|
35
|
+
items: import('./contact').Contact[];
|
|
36
36
|
limit: number;
|
|
37
37
|
offset: number;
|
|
38
38
|
total: number;
|