@proveanything/smartlinks 1.1.5 → 1.1.8
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 +36 -1
- package/dist/api/contact.d.ts +2 -1
- package/dist/api/contact.js +6 -0
- package/dist/types/actions.d.ts +3 -0
- package/dist/types/contact.d.ts +21 -0
- 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.8 | Generated: 2025-12-23T17:18:29.420Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -176,6 +176,7 @@ interface PublicByUserRequest {
|
|
|
176
176
|
```typescript
|
|
177
177
|
interface ActionEventRow {
|
|
178
178
|
orgId: string
|
|
179
|
+
collectionId: string
|
|
179
180
|
timestamp: string
|
|
180
181
|
appId?: string
|
|
181
182
|
actionId?: string
|
|
@@ -183,6 +184,7 @@ interface ActionEventRow {
|
|
|
183
184
|
userId?: string
|
|
184
185
|
contactId?: string
|
|
185
186
|
outcome?: string | null
|
|
187
|
+
metadata?: Record<string, unknown>
|
|
186
188
|
[k: string]: unknown
|
|
187
189
|
}
|
|
188
190
|
```
|
|
@@ -211,6 +213,7 @@ interface AppendActionBody {
|
|
|
211
213
|
broadcastId?: string
|
|
212
214
|
outcome?: string
|
|
213
215
|
timestamp?: string
|
|
216
|
+
metadata?: Record<string, unknown>
|
|
214
217
|
[k: string]: any
|
|
215
218
|
}
|
|
216
219
|
```
|
|
@@ -918,6 +921,35 @@ interface ContactListResponse {
|
|
|
918
921
|
}
|
|
919
922
|
```
|
|
920
923
|
|
|
924
|
+
**PublicContactUpsertRequest** (interface)
|
|
925
|
+
```typescript
|
|
926
|
+
interface PublicContactUpsertRequest {
|
|
927
|
+
email?: string
|
|
928
|
+
phone?: string
|
|
929
|
+
userId?: string
|
|
930
|
+
firstName?: string
|
|
931
|
+
lastName?: string
|
|
932
|
+
displayName?: string
|
|
933
|
+
company?: string
|
|
934
|
+
tags?: string[]
|
|
935
|
+
source?: string
|
|
936
|
+
notes?: string
|
|
937
|
+
avatarUrl?: string
|
|
938
|
+
locale?: string
|
|
939
|
+
timezone?: string
|
|
940
|
+
externalIds?: Record<string, any>
|
|
941
|
+
customFields?: ContactCustomFields
|
|
942
|
+
}
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
**PublicContactUpsertResponse** (interface)
|
|
946
|
+
```typescript
|
|
947
|
+
interface PublicContactUpsertResponse {
|
|
948
|
+
ok: boolean
|
|
949
|
+
contactId: string
|
|
950
|
+
}
|
|
951
|
+
```
|
|
952
|
+
|
|
921
953
|
**ContactCustomFields** = `Record<string, any>`
|
|
922
954
|
|
|
923
955
|
### error
|
|
@@ -1804,6 +1836,9 @@ Logging: Append many communication events for a list of IDs. POST /admin/collect
|
|
|
1804
1836
|
**upsert**(collectionId: string,
|
|
1805
1837
|
data: ContactCreateRequest) → `Promise<ContactResponse>`
|
|
1806
1838
|
|
|
1839
|
+
**publicUpsert**(collectionId: string,
|
|
1840
|
+
data: PublicContactUpsertRequest) → `Promise<PublicContactUpsertResponse>`
|
|
1841
|
+
|
|
1807
1842
|
**erase**(collectionId: string, contactId: string, body?: any) → `Promise<ContactResponse>`
|
|
1808
1843
|
|
|
1809
1844
|
### crate
|
package/dist/api/contact.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContactResponse, ContactCreateRequest, ContactUpdateRequest, ContactListResponse } from "../types";
|
|
1
|
+
import { ContactResponse, ContactCreateRequest, ContactUpdateRequest, ContactListResponse, PublicContactUpsertRequest, PublicContactUpsertResponse } from "../types";
|
|
2
2
|
export declare namespace contact {
|
|
3
3
|
function create(collectionId: string, data: ContactCreateRequest): Promise<ContactResponse>;
|
|
4
4
|
function list(collectionId: string, params?: {
|
|
@@ -16,5 +16,6 @@ export declare namespace contact {
|
|
|
16
16
|
phone?: string;
|
|
17
17
|
}): Promise<ContactResponse>;
|
|
18
18
|
function upsert(collectionId: string, data: ContactCreateRequest): Promise<ContactResponse>;
|
|
19
|
+
function publicUpsert(collectionId: string, data: PublicContactUpsertRequest): Promise<PublicContactUpsertResponse>;
|
|
19
20
|
function erase(collectionId: string, contactId: string, body?: any): Promise<ContactResponse>;
|
|
20
21
|
}
|
package/dist/api/contact.js
CHANGED
|
@@ -53,6 +53,12 @@ export var contact;
|
|
|
53
53
|
return post(path, data);
|
|
54
54
|
}
|
|
55
55
|
contact.upsert = upsert;
|
|
56
|
+
// Public contact upsert (privacy-safe): returns only ok + contactId
|
|
57
|
+
async function publicUpsert(collectionId, data) {
|
|
58
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/contact`;
|
|
59
|
+
return post(path, data);
|
|
60
|
+
}
|
|
61
|
+
contact.publicUpsert = publicUpsert;
|
|
56
62
|
async function erase(collectionId, contactId, body) {
|
|
57
63
|
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts/${encodeURIComponent(contactId)}/erase`;
|
|
58
64
|
return post(path, body || {});
|
package/dist/types/actions.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export interface PublicByUserRequest {
|
|
|
44
44
|
}
|
|
45
45
|
export interface ActionEventRow {
|
|
46
46
|
orgId: string;
|
|
47
|
+
collectionId: string;
|
|
47
48
|
timestamp: string;
|
|
48
49
|
appId?: string;
|
|
49
50
|
actionId?: string;
|
|
@@ -51,6 +52,7 @@ export interface ActionEventRow {
|
|
|
51
52
|
userId?: string;
|
|
52
53
|
contactId?: string;
|
|
53
54
|
outcome?: string | null;
|
|
55
|
+
metadata?: Record<string, unknown>;
|
|
54
56
|
[k: string]: unknown;
|
|
55
57
|
}
|
|
56
58
|
export interface OutcomeCount {
|
|
@@ -70,6 +72,7 @@ export interface AppendActionBody {
|
|
|
70
72
|
broadcastId?: string;
|
|
71
73
|
outcome?: string;
|
|
72
74
|
timestamp?: string;
|
|
75
|
+
metadata?: Record<string, unknown>;
|
|
73
76
|
[k: string]: any;
|
|
74
77
|
}
|
|
75
78
|
export interface ActionPermissions {
|
package/dist/types/contact.d.ts
CHANGED
|
@@ -39,3 +39,24 @@ export interface ContactListResponse {
|
|
|
39
39
|
limit: number;
|
|
40
40
|
offset: number;
|
|
41
41
|
}
|
|
42
|
+
export interface PublicContactUpsertRequest {
|
|
43
|
+
email?: string;
|
|
44
|
+
phone?: string;
|
|
45
|
+
userId?: string;
|
|
46
|
+
firstName?: string;
|
|
47
|
+
lastName?: string;
|
|
48
|
+
displayName?: string;
|
|
49
|
+
company?: string;
|
|
50
|
+
tags?: string[];
|
|
51
|
+
source?: string;
|
|
52
|
+
notes?: string;
|
|
53
|
+
avatarUrl?: string;
|
|
54
|
+
locale?: string;
|
|
55
|
+
timezone?: string;
|
|
56
|
+
externalIds?: Record<string, any>;
|
|
57
|
+
customFields?: ContactCustomFields;
|
|
58
|
+
}
|
|
59
|
+
export interface PublicContactUpsertResponse {
|
|
60
|
+
ok: boolean;
|
|
61
|
+
contactId: string;
|
|
62
|
+
}
|