@proveanything/smartlinks 1.1.16 → 1.1.18

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Smartlinks API Summary
2
2
 
3
- Version: 1.1.16 | Generated: 2026-01-03T21:01:22.707Z
3
+ Version: 1.1.18 | Generated: 2026-01-04T12:18:56.152Z
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
- **AdminInteractionsByUserRequest** (interface)
769
+ **AdminInteractionsQueryRequest** (interface)
770
770
  ```typescript
771
- interface AdminInteractionsByUserRequest {
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)
@@ -1985,18 +1968,14 @@ Delete a form for a collection (admin only).
1985
1968
 
1986
1969
  ### interactions
1987
1970
 
1988
- **byUser**(collectionId: string,
1989
- query: AdminInteractionsByUserRequest = {}) → `Promise<InteractionEventRow[]>`
1990
- POST /admin/collection/:collectionId/interactions/by-user Returns BigQuery interaction rows, newest first.
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.
@@ -49,7 +49,7 @@ export var contact;
49
49
  }
50
50
  contact.lookup = lookup;
51
51
  async function upsert(collectionId, data) {
52
- const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts:upsert`;
52
+ const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts/upsert`;
53
53
  return post(path, data);
54
54
  }
55
55
  contact.upsert = upsert;
@@ -1,20 +1,15 @@
1
- import type { AdminInteractionsByUserRequest, AdminInteractionsCountsByOutcomeRequest, AdminActorIdsByInteractionRequest, AppendInteractionBody, UpdateInteractionBody, OutcomeCount, ActorId, ActorWithOutcome, InteractionEventRow, PublicInteractionsCountsByOutcomeRequest, PublicInteractionsByUserRequest, CreateInteractionTypeBody, UpdateInteractionTypeBody, ListInteractionTypesQuery, InteractionTypeRecord, InteractionTypeList } from "../types/interaction";
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/by-user
5
- * Returns BigQuery interaction rows, newest first.
4
+ * POST /admin/collection/:collectionId/interactions/query
5
+ * Flexible query for interaction events with optional includes.
6
6
  */
7
- function byUser(collectionId: string, query?: AdminInteractionsByUserRequest): Promise<InteractionEventRow[]>;
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.
@@ -18,14 +18,14 @@ function encodeQuery(params) {
18
18
  export var interactions;
19
19
  (function (interactions) {
20
20
  /**
21
- * POST /admin/collection/:collectionId/interactions/by-user
22
- * Returns BigQuery interaction rows, newest first.
21
+ * POST /admin/collection/:collectionId/interactions/query
22
+ * Flexible query for interaction events with optional includes.
23
23
  */
24
- async function byUser(collectionId, query = {}) {
25
- const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/by-user`;
26
- return post(path, query);
24
+ async function query(collectionId, body) {
25
+ const path = `/admin/collection/${encodeURIComponent(collectionId)}/interactions/query`;
26
+ return post(path, body);
27
27
  }
28
- interactions.byUser = byUser;
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/append`;
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 AdminInteractionsByUserRequest {
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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@proveanything/smartlinks",
3
- "version": "1.1.16",
3
+ "version": "1.1.18",
4
4
  "description": "Official JavaScript/TypeScript SDK for the Smartlinks API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",