@proveanything/smartlinks 1.1.10 → 1.1.11
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 +9 -7
- package/dist/api/interactions.d.ts +4 -4
- package/dist/api/interactions.js +17 -17
- 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.11 | Generated: 2025-12-26T15:12:34.830Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -29,6 +29,9 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
29
29
|
- **broadcasts** - Define broadcast campaigns; append recipients/events; analytics and CRUD.
|
|
30
30
|
- **segments** - Define dynamic/static audience segments; estimate and list recipients; schedule calculations.
|
|
31
31
|
|
|
32
|
+
— Analytics & Events —
|
|
33
|
+
- **interactions** - Log and analyze interactions/outcomes; aggregates and actor lists; interaction definition CRUD.
|
|
34
|
+
|
|
32
35
|
— Automation —
|
|
33
36
|
- **journeys** - Configure automated flows triggered by events or schedules; steps, rules; full CRUD.
|
|
34
37
|
|
|
@@ -44,7 +47,6 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
44
47
|
|
|
45
48
|
— Other —
|
|
46
49
|
- **attestation** - Functions for attestation operations
|
|
47
|
-
- **interactions** - Functions for interactions operations
|
|
48
50
|
- **template** - Functions for template operations
|
|
49
51
|
|
|
50
52
|
## HTTP Utilities
|
|
@@ -1880,23 +1882,23 @@ Delete a form for a collection (admin only).
|
|
|
1880
1882
|
|
|
1881
1883
|
**byUser**(collectionId: string,
|
|
1882
1884
|
query: AdminInteractionsByUserRequest = {}) → `Promise<InteractionEventRow[]>`
|
|
1883
|
-
POST /admin/collection/:collectionId/
|
|
1885
|
+
POST /admin/collection/:collectionId/interactions/by-user Returns BigQuery interaction rows, newest first.
|
|
1884
1886
|
|
|
1885
1887
|
**countsByOutcome**(collectionId: string,
|
|
1886
1888
|
query: AdminInteractionsCountsByOutcomeRequest = {}) → `Promise<OutcomeCount[]>`
|
|
1887
|
-
POST /admin/collection/:collectionId/
|
|
1889
|
+
POST /admin/collection/:collectionId/interactions/counts-by-outcome Returns array of { outcome, count }.
|
|
1888
1890
|
|
|
1889
1891
|
**actorIdsByInteraction**(collectionId: string,
|
|
1890
1892
|
query: AdminActorIdsByInteractionRequest) → `Promise<ActorId[] | ActorWithOutcome[]>`
|
|
1891
|
-
POST /admin/collection/:collectionId/
|
|
1893
|
+
POST /admin/collection/:collectionId/interactions/actor-ids/by-interaction Returns list of IDs, optionally with outcome when includeOutcome=true.
|
|
1892
1894
|
|
|
1893
1895
|
**appendEvent**(collectionId: string,
|
|
1894
1896
|
body: AppendInteractionBody) → `Promise<`
|
|
1895
|
-
POST /admin/collection/:collectionId/
|
|
1897
|
+
POST /admin/collection/:collectionId/interactions/append Appends one interaction event.
|
|
1896
1898
|
|
|
1897
1899
|
**updateEvent**(collectionId: string,
|
|
1898
1900
|
body: UpdateInteractionBody) → `Promise<`
|
|
1899
|
-
POST /admin/collection/:collectionId/
|
|
1901
|
+
POST /admin/collection/:collectionId/interactions/append Appends one interaction event.
|
|
1900
1902
|
|
|
1901
1903
|
**submitPublicEvent**(collectionId: string,
|
|
1902
1904
|
body: AppendInteractionBody) → `Promise<`
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import type { AdminInteractionsByUserRequest, AdminInteractionsCountsByOutcomeRequest, AdminActorIdsByInteractionRequest, AppendInteractionBody, UpdateInteractionBody, OutcomeCount, ActorId, ActorWithOutcome, InteractionEventRow, PublicInteractionsCountsByOutcomeRequest, PublicInteractionsByUserRequest, CreateInteractionTypeBody, UpdateInteractionTypeBody, ListInteractionTypesQuery, InteractionTypeRecord, InteractionTypeList } from "../types/interaction";
|
|
2
2
|
export declare namespace interactions {
|
|
3
3
|
/**
|
|
4
|
-
* POST /admin/collection/:collectionId/
|
|
4
|
+
* POST /admin/collection/:collectionId/interactions/by-user
|
|
5
5
|
* Returns BigQuery interaction rows, newest first.
|
|
6
6
|
*/
|
|
7
7
|
function byUser(collectionId: string, query?: AdminInteractionsByUserRequest): Promise<InteractionEventRow[]>;
|
|
8
8
|
/**
|
|
9
|
-
* POST /admin/collection/:collectionId/
|
|
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
13
|
/**
|
|
14
|
-
* POST /admin/collection/:collectionId/
|
|
14
|
+
* POST /admin/collection/:collectionId/interactions/actor-ids/by-interaction
|
|
15
15
|
* Returns list of IDs, optionally with outcome when includeOutcome=true.
|
|
16
16
|
*/
|
|
17
17
|
function actorIdsByInteraction(collectionId: string, query: AdminActorIdsByInteractionRequest): Promise<ActorId[] | ActorWithOutcome[]>;
|
|
18
18
|
/**
|
|
19
|
-
* POST /admin/collection/:collectionId/
|
|
19
|
+
* POST /admin/collection/:collectionId/interactions/append
|
|
20
20
|
* Appends one interaction event.
|
|
21
21
|
*/
|
|
22
22
|
function appendEvent(collectionId: string, body: AppendInteractionBody): Promise<{
|
package/dist/api/interactions.js
CHANGED
|
@@ -18,41 +18,41 @@ function encodeQuery(params) {
|
|
|
18
18
|
export var interactions;
|
|
19
19
|
(function (interactions) {
|
|
20
20
|
/**
|
|
21
|
-
* POST /admin/collection/:collectionId/
|
|
21
|
+
* POST /admin/collection/:collectionId/interactions/by-user
|
|
22
22
|
* Returns BigQuery interaction rows, newest first.
|
|
23
23
|
*/
|
|
24
24
|
async function byUser(collectionId, query = {}) {
|
|
25
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
25
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/by-user`;
|
|
26
26
|
return post(path, query);
|
|
27
27
|
}
|
|
28
28
|
interactions.byUser = byUser;
|
|
29
29
|
/**
|
|
30
|
-
* POST /admin/collection/:collectionId/
|
|
30
|
+
* POST /admin/collection/:collectionId/interactions/counts-by-outcome
|
|
31
31
|
* Returns array of { outcome, count }.
|
|
32
32
|
*/
|
|
33
33
|
async function countsByOutcome(collectionId, query = {}) {
|
|
34
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
34
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/counts-by-outcome`;
|
|
35
35
|
return post(path, query);
|
|
36
36
|
}
|
|
37
37
|
interactions.countsByOutcome = countsByOutcome;
|
|
38
38
|
/**
|
|
39
|
-
* POST /admin/collection/:collectionId/
|
|
39
|
+
* POST /admin/collection/:collectionId/interactions/actor-ids/by-interaction
|
|
40
40
|
* Returns list of IDs, optionally with outcome when includeOutcome=true.
|
|
41
41
|
*/
|
|
42
42
|
async function actorIdsByInteraction(collectionId, query) {
|
|
43
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
43
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/actor-ids/by-interaction`;
|
|
44
44
|
return post(path, query);
|
|
45
45
|
}
|
|
46
46
|
interactions.actorIdsByInteraction = actorIdsByInteraction;
|
|
47
47
|
/**
|
|
48
|
-
* POST /admin/collection/:collectionId/
|
|
48
|
+
* POST /admin/collection/:collectionId/interactions/append
|
|
49
49
|
* Appends one interaction event.
|
|
50
50
|
*/
|
|
51
51
|
async function appendEvent(collectionId, body) {
|
|
52
52
|
if (!body.userId && !body.contactId) {
|
|
53
53
|
throw new Error("AppendInteractionBody must include one of userId or contactId");
|
|
54
54
|
}
|
|
55
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
55
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/append`;
|
|
56
56
|
return post(path, body);
|
|
57
57
|
}
|
|
58
58
|
interactions.appendEvent = appendEvent;
|
|
@@ -60,7 +60,7 @@ export var interactions;
|
|
|
60
60
|
if (!body.userId && !body.contactId) {
|
|
61
61
|
throw new Error("AppendInteractionBody must include one of userId or contactId");
|
|
62
62
|
}
|
|
63
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
63
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/append`;
|
|
64
64
|
return post(path, body);
|
|
65
65
|
}
|
|
66
66
|
interactions.updateEvent = updateEvent;
|
|
@@ -71,46 +71,46 @@ export var interactions;
|
|
|
71
71
|
if (!body.userId && !body.contactId) {
|
|
72
72
|
throw new Error("AppendInteractionBody must include one of userId or contactId");
|
|
73
73
|
}
|
|
74
|
-
const path = `/public/collection/${encodeURIComponent(collectionId)}/
|
|
74
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/interactions/submit`;
|
|
75
75
|
return post(path, body);
|
|
76
76
|
}
|
|
77
77
|
interactions.submitPublicEvent = submitPublicEvent;
|
|
78
78
|
// CRUD: Interaction Types (Postgres)
|
|
79
79
|
async function create(collectionId, body) {
|
|
80
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
80
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/`;
|
|
81
81
|
return post(path, body);
|
|
82
82
|
}
|
|
83
83
|
interactions.create = create;
|
|
84
84
|
async function list(collectionId, query = {}) {
|
|
85
85
|
const qs = encodeQuery(query);
|
|
86
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
86
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/${qs}`;
|
|
87
87
|
return request(path);
|
|
88
88
|
}
|
|
89
89
|
interactions.list = list;
|
|
90
90
|
async function get(collectionId, id) {
|
|
91
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
91
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/${encodeURIComponent(id)}`;
|
|
92
92
|
return request(path);
|
|
93
93
|
}
|
|
94
94
|
interactions.get = get;
|
|
95
95
|
async function update(collectionId, id, patchBody) {
|
|
96
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
96
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/${encodeURIComponent(id)}`;
|
|
97
97
|
return patch(path, patchBody);
|
|
98
98
|
}
|
|
99
99
|
interactions.update = update;
|
|
100
100
|
async function remove(collectionId, id) {
|
|
101
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
101
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/${encodeURIComponent(id)}`;
|
|
102
102
|
return del(path);
|
|
103
103
|
}
|
|
104
104
|
interactions.remove = remove;
|
|
105
105
|
// Public endpoints (permission-aware)
|
|
106
106
|
async function publicCountsByOutcome(collectionId, body, authToken) {
|
|
107
|
-
const path = `/public/collection/${encodeURIComponent(collectionId)}/
|
|
107
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/interactions/counts-by-outcome`;
|
|
108
108
|
const headers = authToken ? { AUTHORIZATION: `Bearer ${authToken}` } : undefined;
|
|
109
109
|
return post(path, body, headers);
|
|
110
110
|
}
|
|
111
111
|
interactions.publicCountsByOutcome = publicCountsByOutcome;
|
|
112
112
|
async function publicMyInteractions(collectionId, body, authToken) {
|
|
113
|
-
const path = `/public/collection/${encodeURIComponent(collectionId)}/
|
|
113
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/interactions/by-user`;
|
|
114
114
|
const headers = authToken ? { AUTHORIZATION: `Bearer ${authToken}` } : undefined;
|
|
115
115
|
return post(path, body, headers);
|
|
116
116
|
}
|