@proveanything/smartlinks 1.1.22 → 1.1.23
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 +40 -1
- package/dist/api/contact.d.ts +3 -1
- package/dist/api/contact.js +12 -0
- package/dist/types/contact.d.ts +25 -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.23 | Generated: 2026-01-07T13:11:08.113Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -851,6 +851,38 @@ interface UserSearchResponse {
|
|
|
851
851
|
}
|
|
852
852
|
```
|
|
853
853
|
|
|
854
|
+
**ContactPublic** (interface)
|
|
855
|
+
```typescript
|
|
856
|
+
interface ContactPublic {
|
|
857
|
+
contactId: string
|
|
858
|
+
firstName?: string | null
|
|
859
|
+
lastName?: string | null
|
|
860
|
+
displayName?: string | null
|
|
861
|
+
company?: string | null
|
|
862
|
+
avatarUrl?: string | null
|
|
863
|
+
locale?: string | null
|
|
864
|
+
timezone?: string | null
|
|
865
|
+
email?: string | null
|
|
866
|
+
phone?: string | null
|
|
867
|
+
externalIds?: Record<string, any>
|
|
868
|
+
customFields?: ContactCustomFields
|
|
869
|
+
}
|
|
870
|
+
```
|
|
871
|
+
|
|
872
|
+
**PublicGetMyContactResponse** (interface)
|
|
873
|
+
```typescript
|
|
874
|
+
interface PublicGetMyContactResponse {
|
|
875
|
+
ok: boolean; contact: ContactPublic | null
|
|
876
|
+
}
|
|
877
|
+
```
|
|
878
|
+
|
|
879
|
+
**PublicUpdateMyContactResponse** (interface)
|
|
880
|
+
```typescript
|
|
881
|
+
interface PublicUpdateMyContactResponse {
|
|
882
|
+
ok: boolean; contact: ContactPublic
|
|
883
|
+
}
|
|
884
|
+
```
|
|
885
|
+
|
|
854
886
|
**ContactCustomFields** = `Record<string, any>`
|
|
855
887
|
|
|
856
888
|
**ContactResponse** = `Contact`
|
|
@@ -861,6 +893,8 @@ interface UserSearchResponse {
|
|
|
861
893
|
|
|
862
894
|
**PublicContactUpsertRequest** = `Partial<`
|
|
863
895
|
|
|
896
|
+
**ContactPatch** = `Partial<`
|
|
897
|
+
|
|
864
898
|
### error
|
|
865
899
|
|
|
866
900
|
**ErrorResponse** (interface)
|
|
@@ -2166,6 +2200,11 @@ Logging: Append many communication events for a list of IDs. POST /admin/collect
|
|
|
2166
2200
|
**publicUpsert**(collectionId: string,
|
|
2167
2201
|
data: PublicContactUpsertRequest) → `Promise<PublicContactUpsertResponse>`
|
|
2168
2202
|
|
|
2203
|
+
**publicGetMine**(collectionId: string) → `Promise<PublicGetMyContactResponse>`
|
|
2204
|
+
|
|
2205
|
+
**publicUpdateMine**(collectionId: string,
|
|
2206
|
+
data: ContactPatch) → `Promise<PublicUpdateMyContactResponse>`
|
|
2207
|
+
|
|
2169
2208
|
**erase**(collectionId: string, contactId: string, body?: any) → `Promise<ContactResponse>`
|
|
2170
2209
|
|
|
2171
2210
|
**getUser**(collectionId: string,
|
package/dist/api/contact.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContactResponse, ContactCreateRequest, ContactUpdateRequest, ContactListResponse, PublicContactUpsertRequest, PublicContactUpsertResponse, UserSearchResponse } from "../types";
|
|
1
|
+
import { ContactResponse, ContactCreateRequest, ContactUpdateRequest, ContactListResponse, PublicContactUpsertRequest, PublicContactUpsertResponse, UserSearchResponse, ContactPatch, PublicGetMyContactResponse, PublicUpdateMyContactResponse } 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?: {
|
|
@@ -17,6 +17,8 @@ export declare namespace contact {
|
|
|
17
17
|
}): Promise<ContactResponse>;
|
|
18
18
|
function upsert(collectionId: string, data: ContactCreateRequest): Promise<ContactResponse>;
|
|
19
19
|
function publicUpsert(collectionId: string, data: PublicContactUpsertRequest): Promise<PublicContactUpsertResponse>;
|
|
20
|
+
function publicGetMine(collectionId: string): Promise<PublicGetMyContactResponse>;
|
|
21
|
+
function publicUpdateMine(collectionId: string, data: ContactPatch): Promise<PublicUpdateMyContactResponse>;
|
|
20
22
|
function erase(collectionId: string, contactId: string, body?: any): Promise<ContactResponse>;
|
|
21
23
|
function getUser(collectionId: string, userId: string): Promise<UserSearchResponse>;
|
|
22
24
|
}
|
package/dist/api/contact.js
CHANGED
|
@@ -59,6 +59,18 @@ export var contact;
|
|
|
59
59
|
return post(path, data);
|
|
60
60
|
}
|
|
61
61
|
contact.publicUpsert = publicUpsert;
|
|
62
|
+
// Public: Get "my" contact (requires auth bearer token)
|
|
63
|
+
async function publicGetMine(collectionId) {
|
|
64
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/contact/me`;
|
|
65
|
+
return request(path);
|
|
66
|
+
}
|
|
67
|
+
contact.publicGetMine = publicGetMine;
|
|
68
|
+
// Public: Update "my" contact (requires auth bearer token)
|
|
69
|
+
async function publicUpdateMine(collectionId, data) {
|
|
70
|
+
const path = `/public/collection/${encodeURIComponent(collectionId)}/contact/me`;
|
|
71
|
+
return patch(path, data);
|
|
72
|
+
}
|
|
73
|
+
contact.publicUpdateMine = publicUpdateMine;
|
|
62
74
|
async function erase(collectionId, contactId, body) {
|
|
63
75
|
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts/${encodeURIComponent(contactId)}/erase`;
|
|
64
76
|
return post(path, body || {});
|
package/dist/types/contact.d.ts
CHANGED
|
@@ -50,3 +50,28 @@ export interface UserSearchResponse {
|
|
|
50
50
|
contact: ContactResponse | null;
|
|
51
51
|
existsAsContact: boolean;
|
|
52
52
|
}
|
|
53
|
+
export interface ContactPublic {
|
|
54
|
+
contactId: string;
|
|
55
|
+
firstName?: string | null;
|
|
56
|
+
lastName?: string | null;
|
|
57
|
+
displayName?: string | null;
|
|
58
|
+
company?: string | null;
|
|
59
|
+
avatarUrl?: string | null;
|
|
60
|
+
locale?: string | null;
|
|
61
|
+
timezone?: string | null;
|
|
62
|
+
email?: string | null;
|
|
63
|
+
phone?: string | null;
|
|
64
|
+
externalIds?: Record<string, any>;
|
|
65
|
+
customFields?: ContactCustomFields;
|
|
66
|
+
}
|
|
67
|
+
export type ContactPatch = Partial<Pick<Contact, "firstName" | "lastName" | "displayName" | "company" | "avatarUrl" | "locale" | "timezone" | "email" | "phone" | "externalIds">> & {
|
|
68
|
+
customFields?: ContactCustomFields;
|
|
69
|
+
};
|
|
70
|
+
export interface PublicGetMyContactResponse {
|
|
71
|
+
ok: boolean;
|
|
72
|
+
contact: ContactPublic | null;
|
|
73
|
+
}
|
|
74
|
+
export interface PublicUpdateMyContactResponse {
|
|
75
|
+
ok: boolean;
|
|
76
|
+
contact: ContactPublic;
|
|
77
|
+
}
|