@proveanything/smartlinks 1.0.63 → 1.0.65
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 +5 -2
- package/dist/api/collection.d.ts +9 -1
- package/dist/api/collection.js +15 -2
- package/dist/api/contact.js +8 -8
- package/package.json +1 -1
package/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.65 | Generated: 2025-12-17T23:06:41.578Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -1123,9 +1123,12 @@ Retrieves all Collections.
|
|
|
1123
1123
|
**getShortId**(shortId: string) → `Promise<CollectionResponse>`
|
|
1124
1124
|
Retrieve a collection by its shortId (public endpoint).
|
|
1125
1125
|
|
|
1126
|
-
**getSettings**(collectionId: string, settingGroup: string) → `Promise<any>`
|
|
1126
|
+
**getSettings**(collectionId: string, settingGroup: string, admin?: boolean) → `Promise<any>`
|
|
1127
1127
|
Retrieve a specific settings group for a collection (public endpoint).
|
|
1128
1128
|
|
|
1129
|
+
**updateSettings**(collectionId: string, settingGroup: string, settings: any) → `Promise<any>`
|
|
1130
|
+
Update a specific settings group for a collection (admin endpoint).
|
|
1131
|
+
|
|
1129
1132
|
**create**(data: any) → `Promise<CollectionResponse>`
|
|
1130
1133
|
Create a new collection (admin only).
|
|
1131
1134
|
|
package/dist/api/collection.d.ts
CHANGED
|
@@ -27,7 +27,15 @@ export declare namespace collection {
|
|
|
27
27
|
* @param settingGroup – The settings group name
|
|
28
28
|
* @returns Promise resolving to the settings object
|
|
29
29
|
*/
|
|
30
|
-
function getSettings(collectionId: string, settingGroup: string): Promise<any>;
|
|
30
|
+
function getSettings(collectionId: string, settingGroup: string, admin?: boolean): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Update a specific settings group for a collection (admin endpoint).
|
|
33
|
+
* @param collectionId – Identifier of the collection
|
|
34
|
+
* @param settingGroup – The settings group name
|
|
35
|
+
* @param settings – The settings payload to persist
|
|
36
|
+
* @returns Promise resolving to the updated settings
|
|
37
|
+
*/
|
|
38
|
+
function updateSettings(collectionId: string, settingGroup: string, settings: any): Promise<any>;
|
|
31
39
|
/**
|
|
32
40
|
* Create a new collection (admin only).
|
|
33
41
|
* @param data – Collection creation data
|
package/dist/api/collection.js
CHANGED
|
@@ -43,11 +43,24 @@ export var collection;
|
|
|
43
43
|
* @param settingGroup – The settings group name
|
|
44
44
|
* @returns Promise resolving to the settings object
|
|
45
45
|
*/
|
|
46
|
-
async function getSettings(collectionId, settingGroup) {
|
|
47
|
-
const
|
|
46
|
+
async function getSettings(collectionId, settingGroup, admin) {
|
|
47
|
+
const base = admin ? '/admin/collection' : '/public/collection';
|
|
48
|
+
const path = `${base}/${encodeURIComponent(collectionId)}/settings/${encodeURIComponent(settingGroup)}`;
|
|
48
49
|
return request(path);
|
|
49
50
|
}
|
|
50
51
|
collection.getSettings = getSettings;
|
|
52
|
+
/**
|
|
53
|
+
* Update a specific settings group for a collection (admin endpoint).
|
|
54
|
+
* @param collectionId – Identifier of the collection
|
|
55
|
+
* @param settingGroup – The settings group name
|
|
56
|
+
* @param settings – The settings payload to persist
|
|
57
|
+
* @returns Promise resolving to the updated settings
|
|
58
|
+
*/
|
|
59
|
+
async function updateSettings(collectionId, settingGroup, settings) {
|
|
60
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/settings/${encodeURIComponent(settingGroup)}`;
|
|
61
|
+
return post(path, settings);
|
|
62
|
+
}
|
|
63
|
+
collection.updateSettings = updateSettings;
|
|
51
64
|
/**
|
|
52
65
|
* Create a new collection (admin only).
|
|
53
66
|
* @param data – Collection creation data
|
package/dist/api/contact.js
CHANGED
|
@@ -2,7 +2,7 @@ import { request, post, del, patch } from "../http";
|
|
|
2
2
|
export var contact;
|
|
3
3
|
(function (contact) {
|
|
4
4
|
async function create(collectionId, data) {
|
|
5
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
5
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts`;
|
|
6
6
|
return post(path, data);
|
|
7
7
|
}
|
|
8
8
|
contact.create = create;
|
|
@@ -15,7 +15,7 @@ export var contact;
|
|
|
15
15
|
if ((params === null || params === void 0 ? void 0 : params.includeDeleted) !== undefined)
|
|
16
16
|
query.set("includeDeleted", String(params.includeDeleted));
|
|
17
17
|
const qs = query.toString();
|
|
18
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
18
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts${qs ? `?${qs}` : ""}`;
|
|
19
19
|
return request(path);
|
|
20
20
|
}
|
|
21
21
|
contact.list = list;
|
|
@@ -24,17 +24,17 @@ export var contact;
|
|
|
24
24
|
if ((params === null || params === void 0 ? void 0 : params.includeDeleted) !== undefined)
|
|
25
25
|
query.set("includeDeleted", String(params.includeDeleted));
|
|
26
26
|
const qs = query.toString();
|
|
27
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
27
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts/${encodeURIComponent(contactId)}${qs ? `?${qs}` : ""}`;
|
|
28
28
|
return request(path);
|
|
29
29
|
}
|
|
30
30
|
contact.get = get;
|
|
31
31
|
async function update(collectionId, contactId, data) {
|
|
32
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
32
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts/${encodeURIComponent(contactId)}`;
|
|
33
33
|
return patch(path, data);
|
|
34
34
|
}
|
|
35
35
|
contact.update = update;
|
|
36
36
|
async function remove(collectionId, contactId) {
|
|
37
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
37
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts/${encodeURIComponent(contactId)}`;
|
|
38
38
|
return del(path);
|
|
39
39
|
}
|
|
40
40
|
contact.remove = remove;
|
|
@@ -44,17 +44,17 @@ export var contact;
|
|
|
44
44
|
query.set("email", params.email);
|
|
45
45
|
if (params.phone)
|
|
46
46
|
query.set("phone", params.phone);
|
|
47
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
47
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts/lookup?${query.toString()}`;
|
|
48
48
|
return request(path);
|
|
49
49
|
}
|
|
50
50
|
contact.lookup = lookup;
|
|
51
51
|
async function upsert(collectionId, data) {
|
|
52
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
52
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts:upsert`;
|
|
53
53
|
return post(path, data);
|
|
54
54
|
}
|
|
55
55
|
contact.upsert = upsert;
|
|
56
56
|
async function erase(collectionId, contactId, body) {
|
|
57
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/
|
|
57
|
+
const path = `/admin/collection/${encodeURIComponent(collectionId)}/contacts/${encodeURIComponent(contactId)}/erase`;
|
|
58
58
|
return post(path, body || {});
|
|
59
59
|
}
|
|
60
60
|
contact.erase = erase;
|