@proveanything/smartlinks 1.9.13 → 1.9.14
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/dist/api/claimSet.d.ts +58 -70
- package/dist/api/claimSet.js +98 -110
- package/dist/docs/API_SUMMARY.md +69 -29
- package/dist/openapi.yaml +126 -95
- package/dist/types/claimSet.d.ts +42 -0
- package/docs/API_SUMMARY.md +69 -29
- package/openapi.yaml +126 -95
- package/package.json +1 -1
package/dist/api/claimSet.d.ts
CHANGED
|
@@ -1,110 +1,98 @@
|
|
|
1
|
-
import { UpdateClaimDataRequest, AssignClaimsRequest, CreateClaimSetTagRequest, CreateClaimSetTagResponse } from "../types";
|
|
1
|
+
import { UpdateClaimDataRequest, AssignClaimsRequest, CreateClaimSetTagRequest, CreateClaimSetTagResponse, CreateClaimSetRequest, ImportClaimSetTagsRequest, ImportClaimSetTagsResponse } from "../types";
|
|
2
2
|
export declare namespace claimSet {
|
|
3
3
|
/**
|
|
4
|
-
* Get all claim sets
|
|
5
|
-
*
|
|
6
|
-
*
|
|
4
|
+
* Get all claim sets.
|
|
5
|
+
* When collectionId is provided, returns claim sets for that collection.
|
|
6
|
+
* When omitted, returns all claim sets owned by the authenticated user.
|
|
7
|
+
* @param collectionId – Optional collection identifier
|
|
7
8
|
*/
|
|
8
|
-
function
|
|
9
|
+
function getAll(collectionId?: string): Promise<any[]>;
|
|
9
10
|
/**
|
|
10
|
-
* Get a specific claim set
|
|
11
|
-
* @param collectionId – The collection identifier
|
|
11
|
+
* Get a specific claim set by ID.
|
|
12
12
|
* @param claimSetId – The claim set identifier
|
|
13
|
-
* @
|
|
13
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
14
14
|
*/
|
|
15
|
-
function
|
|
15
|
+
function get(claimSetId: string, collectionId?: string): Promise<any>;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Create a new claim set.
|
|
18
|
+
* When collectionId is provided, creates it scoped to that collection.
|
|
19
|
+
* When omitted, creates a global user-owned claim set.
|
|
20
|
+
* @param params – Claim set creation parameters
|
|
21
|
+
* @param collectionId – Optional collection identifier
|
|
22
|
+
*/
|
|
23
|
+
function create(params: CreateClaimSetRequest, collectionId?: string): Promise<any>;
|
|
24
|
+
/**
|
|
25
|
+
* Update a claim set.
|
|
19
26
|
* @param claimSetId – The claim set identifier
|
|
20
|
-
* @
|
|
27
|
+
* @param params – Fields to update
|
|
28
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
21
29
|
*/
|
|
22
|
-
function
|
|
30
|
+
function update(claimSetId: string, params: any, collectionId?: string): Promise<any>;
|
|
23
31
|
/**
|
|
24
|
-
*
|
|
25
|
-
* @param collectionId – The collection identifier
|
|
32
|
+
* Delete (soft-delete) a claim set.
|
|
26
33
|
* @param claimSetId – The claim set identifier
|
|
27
|
-
* @
|
|
34
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
28
35
|
*/
|
|
29
|
-
function
|
|
36
|
+
function remove(claimSetId: string, collectionId?: string): Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Get all tags for a claim set (including data).
|
|
39
|
+
* @param claimSetId – The claim set identifier
|
|
40
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
41
|
+
*/
|
|
42
|
+
function getAllTags(claimSetId: string, collectionId?: string): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Get assigned tags for a claim set — tags soft-assigned to a collection or product.
|
|
45
|
+
* @param claimSetId – The claim set identifier
|
|
46
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
47
|
+
*/
|
|
48
|
+
function getAssignedTags(claimSetId: string, collectionId?: string): Promise<any>;
|
|
49
|
+
/**
|
|
50
|
+
* Create a single tag inside a claim set.
|
|
51
|
+
* @param claimSetId – The claim set identifier
|
|
52
|
+
* @param data – Tag creation parameters
|
|
53
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
54
|
+
*/
|
|
55
|
+
function createTag(claimSetId: string, data: CreateClaimSetTagRequest, collectionId?: string): Promise<CreateClaimSetTagResponse>;
|
|
56
|
+
/**
|
|
57
|
+
* Bulk import tags into a claim set.
|
|
58
|
+
* @param claimSetId – The claim set identifier
|
|
59
|
+
* @param data – Import parameters: tags array and optional mode ("upsert" | "replace")
|
|
60
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
61
|
+
*/
|
|
62
|
+
function importTags(claimSetId: string, data: ImportClaimSetTagsRequest, collectionId?: string): Promise<ImportClaimSetTagsResponse>;
|
|
30
63
|
/**
|
|
31
|
-
* Get
|
|
64
|
+
* Get a report for a claim set (collection-scoped).
|
|
32
65
|
* @param collectionId – The collection identifier
|
|
33
66
|
* @param claimSetId – The claim set identifier
|
|
34
|
-
* @returns Promise resolving to assigned tags
|
|
35
67
|
*/
|
|
36
|
-
function
|
|
68
|
+
function getReport(collectionId: string, claimSetId: string): Promise<any>;
|
|
37
69
|
/**
|
|
38
70
|
* Get tag summary for a collection.
|
|
39
71
|
* @param collectionId – The collection identifier
|
|
40
|
-
* @returns Promise resolving to tag summary
|
|
41
72
|
*/
|
|
42
73
|
function getTagSummary(collectionId: string): Promise<any>;
|
|
43
74
|
/**
|
|
44
75
|
* Perform a tag query for a collection.
|
|
45
76
|
* @param collectionId – The collection identifier
|
|
46
77
|
* @param data – The query data
|
|
47
|
-
* @returns Promise resolving to query results
|
|
48
78
|
*/
|
|
49
79
|
function tagQuery(collectionId: string, data: any): Promise<any>;
|
|
50
80
|
/**
|
|
51
|
-
*
|
|
52
|
-
* @param collectionId – The collection identifier
|
|
53
|
-
* @param params – The claim set creation parameters
|
|
54
|
-
* @returns Promise resolving to the created claim set
|
|
55
|
-
*/
|
|
56
|
-
function createForCollection(collectionId: string, params: any): Promise<any>;
|
|
57
|
-
/**
|
|
58
|
-
* Update a claim set for a collection.
|
|
59
|
-
* @param collectionId – The collection identifier
|
|
60
|
-
* @param params – The claim set update parameters (must include id)
|
|
61
|
-
* @returns Promise resolving to the updated claim set
|
|
62
|
-
*/
|
|
63
|
-
function updateForCollection(collectionId: string, params: any): Promise<any>;
|
|
64
|
-
/**
|
|
65
|
-
* Make a claim for a claim set.
|
|
81
|
+
* Make a claim against a claim set (collection-scoped).
|
|
66
82
|
* @param collectionId – The collection identifier
|
|
67
|
-
* @param params –
|
|
68
|
-
* @returns Promise resolving to the claim result
|
|
83
|
+
* @param params – Claim parameters (must include id)
|
|
69
84
|
*/
|
|
70
85
|
function makeClaim(collectionId: string, params: any): Promise<any>;
|
|
71
86
|
/**
|
|
72
|
-
* Assign claims to a
|
|
87
|
+
* Assign claims to codes or ranges within a collection.
|
|
73
88
|
* @param collectionId – The collection identifier
|
|
74
|
-
* @param data –
|
|
75
|
-
* {
|
|
76
|
-
* id: string, // claim set id (required)
|
|
77
|
-
* collectionId: string,// required
|
|
78
|
-
* productId: string, // required
|
|
79
|
-
* batchId?: string, // optional
|
|
80
|
-
* start?: number, // optional bulk range start
|
|
81
|
-
* end?: number, // optional bulk range end
|
|
82
|
-
* codeId?: string, // optional single code
|
|
83
|
-
* data?: { [k: string]: any } // optional claim key/values
|
|
84
|
-
* }
|
|
89
|
+
* @param data – Claims assignment data
|
|
85
90
|
*/
|
|
86
91
|
function assignClaims(collectionId: string, data: AssignClaimsRequest): Promise<any>;
|
|
87
92
|
/**
|
|
88
|
-
* Update claim data for a collection.
|
|
93
|
+
* Update claim data for a claim set (collection-scoped).
|
|
89
94
|
* @param collectionId – The collection identifier
|
|
90
|
-
* @param data –
|
|
95
|
+
* @param data – Claim data to update
|
|
91
96
|
*/
|
|
92
97
|
function updateClaimData(collectionId: string, data: UpdateClaimDataRequest): Promise<any>;
|
|
93
|
-
/**
|
|
94
|
-
* Create a single tag/code inside an existing claim set (collection admin).
|
|
95
|
-
* POST /admin/collection/:collectionId/claimSet/:claimSetId/createTag
|
|
96
|
-
* @param collectionId – The collection identifier
|
|
97
|
-
* @param claimSetId – The claim set identifier
|
|
98
|
-
* @param data – Tag creation parameters
|
|
99
|
-
* @returns Promise resolving to the created tag
|
|
100
|
-
*/
|
|
101
|
-
function createTag(collectionId: string, claimSetId: string, data: CreateClaimSetTagRequest): Promise<CreateClaimSetTagResponse>;
|
|
102
|
-
/**
|
|
103
|
-
* Create a single tag/code inside an existing claim set (platform; requires account.features.adminClaimSets).
|
|
104
|
-
* POST /platform/claimSet/:claimSetId/createTag
|
|
105
|
-
* @param claimSetId – The claim set identifier
|
|
106
|
-
* @param data – Tag creation parameters
|
|
107
|
-
* @returns Promise resolving to the created tag
|
|
108
|
-
*/
|
|
109
|
-
function createTagPlatform(claimSetId: string, data: CreateClaimSetTagRequest): Promise<CreateClaimSetTagResponse>;
|
|
110
98
|
}
|
package/dist/api/claimSet.js
CHANGED
|
@@ -1,167 +1,155 @@
|
|
|
1
|
-
import { request, post, put } from "../http";
|
|
1
|
+
import { request, post, put, del } from "../http";
|
|
2
|
+
/**
|
|
3
|
+
* Returns the base path for claim set endpoints.
|
|
4
|
+
* When collectionId is provided, routes to the collection-scoped admin API.
|
|
5
|
+
* When omitted, routes to the user-scoped admin API (global claim sets).
|
|
6
|
+
*/
|
|
7
|
+
function base(collectionId) {
|
|
8
|
+
return collectionId
|
|
9
|
+
? `/admin/collection/${encodeURIComponent(collectionId)}/claimSet`
|
|
10
|
+
: `/admin/claimSet`;
|
|
11
|
+
}
|
|
2
12
|
export var claimSet;
|
|
3
13
|
(function (claimSet) {
|
|
4
14
|
/**
|
|
5
|
-
* Get all claim sets
|
|
6
|
-
*
|
|
7
|
-
*
|
|
15
|
+
* Get all claim sets.
|
|
16
|
+
* When collectionId is provided, returns claim sets for that collection.
|
|
17
|
+
* When omitted, returns all claim sets owned by the authenticated user.
|
|
18
|
+
* @param collectionId – Optional collection identifier
|
|
8
19
|
*/
|
|
9
|
-
async function
|
|
10
|
-
|
|
11
|
-
return request(path);
|
|
20
|
+
async function getAll(collectionId) {
|
|
21
|
+
return request(base(collectionId));
|
|
12
22
|
}
|
|
13
|
-
claimSet.
|
|
23
|
+
claimSet.getAll = getAll;
|
|
14
24
|
/**
|
|
15
|
-
* Get a specific claim set
|
|
16
|
-
* @param collectionId – The collection identifier
|
|
25
|
+
* Get a specific claim set by ID.
|
|
17
26
|
* @param claimSetId – The claim set identifier
|
|
18
|
-
* @
|
|
27
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
19
28
|
*/
|
|
20
|
-
async function
|
|
21
|
-
|
|
22
|
-
return request(path);
|
|
29
|
+
async function get(claimSetId, collectionId) {
|
|
30
|
+
return request(`${base(collectionId)}/${encodeURIComponent(claimSetId)}`);
|
|
23
31
|
}
|
|
24
|
-
claimSet.
|
|
32
|
+
claimSet.get = get;
|
|
25
33
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
34
|
+
* Create a new claim set.
|
|
35
|
+
* When collectionId is provided, creates it scoped to that collection.
|
|
36
|
+
* When omitted, creates a global user-owned claim set.
|
|
37
|
+
* @param params – Claim set creation parameters
|
|
38
|
+
* @param collectionId – Optional collection identifier
|
|
39
|
+
*/
|
|
40
|
+
async function create(params, collectionId) {
|
|
41
|
+
return post(base(collectionId), params);
|
|
42
|
+
}
|
|
43
|
+
claimSet.create = create;
|
|
44
|
+
/**
|
|
45
|
+
* Update a claim set.
|
|
46
|
+
* @param claimSetId – The claim set identifier
|
|
47
|
+
* @param params – Fields to update
|
|
48
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
49
|
+
*/
|
|
50
|
+
async function update(claimSetId, params, collectionId) {
|
|
51
|
+
return put(`${base(collectionId)}/${encodeURIComponent(claimSetId)}`, params);
|
|
52
|
+
}
|
|
53
|
+
claimSet.update = update;
|
|
54
|
+
/**
|
|
55
|
+
* Delete (soft-delete) a claim set.
|
|
56
|
+
* @param claimSetId – The claim set identifier
|
|
57
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
58
|
+
*/
|
|
59
|
+
async function remove(claimSetId, collectionId) {
|
|
60
|
+
return del(`${base(collectionId)}/${encodeURIComponent(claimSetId)}`);
|
|
61
|
+
}
|
|
62
|
+
claimSet.remove = remove;
|
|
63
|
+
/**
|
|
64
|
+
* Get all tags for a claim set (including data).
|
|
28
65
|
* @param claimSetId – The claim set identifier
|
|
29
|
-
* @
|
|
66
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
30
67
|
*/
|
|
31
|
-
async function getAllTags(
|
|
32
|
-
|
|
33
|
-
return request(path);
|
|
68
|
+
async function getAllTags(claimSetId, collectionId) {
|
|
69
|
+
return request(`${base(collectionId)}/${encodeURIComponent(claimSetId)}/tags`);
|
|
34
70
|
}
|
|
35
71
|
claimSet.getAllTags = getAllTags;
|
|
36
72
|
/**
|
|
37
|
-
* Get
|
|
38
|
-
* @param collectionId – The collection identifier
|
|
73
|
+
* Get assigned tags for a claim set — tags soft-assigned to a collection or product.
|
|
39
74
|
* @param claimSetId – The claim set identifier
|
|
40
|
-
* @
|
|
75
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
41
76
|
*/
|
|
42
|
-
async function
|
|
43
|
-
|
|
44
|
-
return request(path);
|
|
77
|
+
async function getAssignedTags(claimSetId, collectionId) {
|
|
78
|
+
return request(`${base(collectionId)}/${encodeURIComponent(claimSetId)}/assignedTags`);
|
|
45
79
|
}
|
|
46
|
-
claimSet.
|
|
80
|
+
claimSet.getAssignedTags = getAssignedTags;
|
|
47
81
|
/**
|
|
48
|
-
*
|
|
82
|
+
* Create a single tag inside a claim set.
|
|
83
|
+
* @param claimSetId – The claim set identifier
|
|
84
|
+
* @param data – Tag creation parameters
|
|
85
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
86
|
+
*/
|
|
87
|
+
async function createTag(claimSetId, data, collectionId) {
|
|
88
|
+
return post(`${base(collectionId)}/${encodeURIComponent(claimSetId)}/createTag`, data);
|
|
89
|
+
}
|
|
90
|
+
claimSet.createTag = createTag;
|
|
91
|
+
/**
|
|
92
|
+
* Bulk import tags into a claim set.
|
|
93
|
+
* @param claimSetId – The claim set identifier
|
|
94
|
+
* @param data – Import parameters: tags array and optional mode ("upsert" | "replace")
|
|
95
|
+
* @param collectionId – Optional collection identifier; omit for user-scoped access
|
|
96
|
+
*/
|
|
97
|
+
async function importTags(claimSetId, data, collectionId) {
|
|
98
|
+
return post(`${base(collectionId)}/${encodeURIComponent(claimSetId)}/importTags`, data);
|
|
99
|
+
}
|
|
100
|
+
claimSet.importTags = importTags;
|
|
101
|
+
// ─── Collection-scoped-only operations ──────────────────────────────────────
|
|
102
|
+
/**
|
|
103
|
+
* Get a report for a claim set (collection-scoped).
|
|
49
104
|
* @param collectionId – The collection identifier
|
|
50
105
|
* @param claimSetId – The claim set identifier
|
|
51
|
-
* @returns Promise resolving to assigned tags
|
|
52
106
|
*/
|
|
53
|
-
async function
|
|
54
|
-
|
|
55
|
-
return request(path);
|
|
107
|
+
async function getReport(collectionId, claimSetId) {
|
|
108
|
+
return request(`${base(collectionId)}/${encodeURIComponent(claimSetId)}/report`);
|
|
56
109
|
}
|
|
57
|
-
claimSet.
|
|
110
|
+
claimSet.getReport = getReport;
|
|
58
111
|
/**
|
|
59
112
|
* Get tag summary for a collection.
|
|
60
113
|
* @param collectionId – The collection identifier
|
|
61
|
-
* @returns Promise resolving to tag summary
|
|
62
114
|
*/
|
|
63
115
|
async function getTagSummary(collectionId) {
|
|
64
|
-
|
|
65
|
-
return request(path);
|
|
116
|
+
return request(`${base(collectionId)}/tagSummary`);
|
|
66
117
|
}
|
|
67
118
|
claimSet.getTagSummary = getTagSummary;
|
|
68
119
|
/**
|
|
69
120
|
* Perform a tag query for a collection.
|
|
70
121
|
* @param collectionId – The collection identifier
|
|
71
122
|
* @param data – The query data
|
|
72
|
-
* @returns Promise resolving to query results
|
|
73
123
|
*/
|
|
74
124
|
async function tagQuery(collectionId, data) {
|
|
75
|
-
|
|
76
|
-
return post(path, data);
|
|
125
|
+
return post(`${base(collectionId)}/tagQuery`, data);
|
|
77
126
|
}
|
|
78
127
|
claimSet.tagQuery = tagQuery;
|
|
79
128
|
/**
|
|
80
|
-
*
|
|
81
|
-
* @param collectionId – The collection identifier
|
|
82
|
-
* @param params – The claim set creation parameters
|
|
83
|
-
* @returns Promise resolving to the created claim set
|
|
84
|
-
*/
|
|
85
|
-
async function createForCollection(collectionId, params) {
|
|
86
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/claimSet`;
|
|
87
|
-
return post(path, params);
|
|
88
|
-
}
|
|
89
|
-
claimSet.createForCollection = createForCollection;
|
|
90
|
-
/**
|
|
91
|
-
* Update a claim set for a collection.
|
|
92
|
-
* @param collectionId – The collection identifier
|
|
93
|
-
* @param params – The claim set update parameters (must include id)
|
|
94
|
-
* @returns Promise resolving to the updated claim set
|
|
95
|
-
*/
|
|
96
|
-
async function updateForCollection(collectionId, params) {
|
|
97
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/claimSet/${encodeURIComponent(params.id)}`;
|
|
98
|
-
return put(path, params);
|
|
99
|
-
}
|
|
100
|
-
claimSet.updateForCollection = updateForCollection;
|
|
101
|
-
/**
|
|
102
|
-
* Make a claim for a claim set.
|
|
129
|
+
* Make a claim against a claim set (collection-scoped).
|
|
103
130
|
* @param collectionId – The collection identifier
|
|
104
|
-
* @param params –
|
|
105
|
-
* @returns Promise resolving to the claim result
|
|
131
|
+
* @param params – Claim parameters (must include id)
|
|
106
132
|
*/
|
|
107
133
|
async function makeClaim(collectionId, params) {
|
|
108
|
-
|
|
109
|
-
return post(path, params);
|
|
134
|
+
return post(`${base(collectionId)}/${encodeURIComponent(params.id)}/makeClaim`, params);
|
|
110
135
|
}
|
|
111
136
|
claimSet.makeClaim = makeClaim;
|
|
112
137
|
/**
|
|
113
|
-
* Assign claims to a
|
|
138
|
+
* Assign claims to codes or ranges within a collection.
|
|
114
139
|
* @param collectionId – The collection identifier
|
|
115
|
-
* @param data –
|
|
116
|
-
* {
|
|
117
|
-
* id: string, // claim set id (required)
|
|
118
|
-
* collectionId: string,// required
|
|
119
|
-
* productId: string, // required
|
|
120
|
-
* batchId?: string, // optional
|
|
121
|
-
* start?: number, // optional bulk range start
|
|
122
|
-
* end?: number, // optional bulk range end
|
|
123
|
-
* codeId?: string, // optional single code
|
|
124
|
-
* data?: { [k: string]: any } // optional claim key/values
|
|
125
|
-
* }
|
|
140
|
+
* @param data – Claims assignment data
|
|
126
141
|
*/
|
|
127
142
|
async function assignClaims(collectionId, data) {
|
|
128
|
-
|
|
129
|
-
return post(path, data);
|
|
143
|
+
return post(`${base(collectionId)}/${encodeURIComponent(data.id)}/assignClaims`, data);
|
|
130
144
|
}
|
|
131
145
|
claimSet.assignClaims = assignClaims;
|
|
132
146
|
/**
|
|
133
|
-
* Update claim data for a collection.
|
|
147
|
+
* Update claim data for a claim set (collection-scoped).
|
|
134
148
|
* @param collectionId – The collection identifier
|
|
135
|
-
* @param data –
|
|
149
|
+
* @param data – Claim data to update
|
|
136
150
|
*/
|
|
137
151
|
async function updateClaimData(collectionId, data) {
|
|
138
|
-
|
|
139
|
-
return post(path, data);
|
|
152
|
+
return post(`${base(collectionId)}/updateClaimData`, data);
|
|
140
153
|
}
|
|
141
154
|
claimSet.updateClaimData = updateClaimData;
|
|
142
|
-
/**
|
|
143
|
-
* Create a single tag/code inside an existing claim set (collection admin).
|
|
144
|
-
* POST /admin/collection/:collectionId/claimSet/:claimSetId/createTag
|
|
145
|
-
* @param collectionId – The collection identifier
|
|
146
|
-
* @param claimSetId – The claim set identifier
|
|
147
|
-
* @param data – Tag creation parameters
|
|
148
|
-
* @returns Promise resolving to the created tag
|
|
149
|
-
*/
|
|
150
|
-
async function createTag(collectionId, claimSetId, data) {
|
|
151
|
-
const path = `/admin/collection/${encodeURIComponent(collectionId)}/claimSet/${encodeURIComponent(claimSetId)}/createTag`;
|
|
152
|
-
return post(path, data);
|
|
153
|
-
}
|
|
154
|
-
claimSet.createTag = createTag;
|
|
155
|
-
/**
|
|
156
|
-
* Create a single tag/code inside an existing claim set (platform; requires account.features.adminClaimSets).
|
|
157
|
-
* POST /platform/claimSet/:claimSetId/createTag
|
|
158
|
-
* @param claimSetId – The claim set identifier
|
|
159
|
-
* @param data – Tag creation parameters
|
|
160
|
-
* @returns Promise resolving to the created tag
|
|
161
|
-
*/
|
|
162
|
-
async function createTagPlatform(claimSetId, data) {
|
|
163
|
-
const path = `/platform/claimSet/${encodeURIComponent(claimSetId)}/createTag`;
|
|
164
|
-
return post(path, data);
|
|
165
|
-
}
|
|
166
|
-
claimSet.createTagPlatform = createTagPlatform;
|
|
167
155
|
})(claimSet || (claimSet = {}));
|
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.9.
|
|
3
|
+
Version: 1.9.14 | Generated: 2026-03-31T19:46:30.667Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -2866,6 +2866,42 @@ interface CreateClaimSetTagRequest {
|
|
|
2866
2866
|
}
|
|
2867
2867
|
```
|
|
2868
2868
|
|
|
2869
|
+
**CreateClaimSetRequest** (interface)
|
|
2870
|
+
```typescript
|
|
2871
|
+
interface CreateClaimSetRequest {
|
|
2872
|
+
name: string
|
|
2873
|
+
claimMode: string
|
|
2874
|
+
allocationMode: string
|
|
2875
|
+
}
|
|
2876
|
+
```
|
|
2877
|
+
|
|
2878
|
+
**ImportClaimSetTagItem** (interface)
|
|
2879
|
+
```typescript
|
|
2880
|
+
interface ImportClaimSetTagItem {
|
|
2881
|
+
id: string
|
|
2882
|
+
tagId?: string
|
|
2883
|
+
index?: number
|
|
2884
|
+
}
|
|
2885
|
+
```
|
|
2886
|
+
|
|
2887
|
+
**ImportClaimSetTagsRequest** (interface)
|
|
2888
|
+
```typescript
|
|
2889
|
+
interface ImportClaimSetTagsRequest {
|
|
2890
|
+
tags: ImportClaimSetTagItem[]
|
|
2891
|
+
* Import mode:
|
|
2892
|
+
* - "upsert" (default) merges with existing tags
|
|
2893
|
+
* - "replace" wipes all existing tags first then writes the new set
|
|
2894
|
+
mode?: 'upsert' | 'replace'
|
|
2895
|
+
}
|
|
2896
|
+
```
|
|
2897
|
+
|
|
2898
|
+
**ImportClaimSetTagsResponse** (interface)
|
|
2899
|
+
```typescript
|
|
2900
|
+
interface ImportClaimSetTagsResponse {
|
|
2901
|
+
written: number
|
|
2902
|
+
}
|
|
2903
|
+
```
|
|
2904
|
+
|
|
2869
2905
|
**CreateClaimSetTagResponse** (interface)
|
|
2870
2906
|
```typescript
|
|
2871
2907
|
interface CreateClaimSetTagResponse {
|
|
@@ -7425,20 +7461,39 @@ Create a Responses API request (streaming or non-streaming)
|
|
|
7425
7461
|
|
|
7426
7462
|
### claimSet
|
|
7427
7463
|
|
|
7428
|
-
**
|
|
7429
|
-
Get all claim sets for
|
|
7464
|
+
**getAll**(collectionId?: string) → `Promise<any[]>`
|
|
7465
|
+
Get all claim sets. When collectionId is provided, returns claim sets for that collection. When omitted, returns all claim sets owned by the authenticated user.
|
|
7430
7466
|
|
|
7431
|
-
**
|
|
7432
|
-
Get a specific claim set
|
|
7467
|
+
**get**(claimSetId: string, collectionId?: string) → `Promise<any>`
|
|
7468
|
+
Get a specific claim set by ID.
|
|
7433
7469
|
|
|
7434
|
-
**
|
|
7435
|
-
|
|
7470
|
+
**create**(params: CreateClaimSetRequest, collectionId?: string) → `Promise<any>`
|
|
7471
|
+
Create a new claim set. When collectionId is provided, creates it scoped to that collection. When omitted, creates a global user-owned claim set.
|
|
7436
7472
|
|
|
7437
|
-
**
|
|
7438
|
-
|
|
7473
|
+
**update**(claimSetId: string, params: any, collectionId?: string) → `Promise<any>`
|
|
7474
|
+
Update a claim set.
|
|
7475
|
+
|
|
7476
|
+
**remove**(claimSetId: string, collectionId?: string) → `Promise<any>`
|
|
7477
|
+
Delete (soft-delete) a claim set.
|
|
7478
|
+
|
|
7479
|
+
**getAllTags**(claimSetId: string, collectionId?: string) → `Promise<any>`
|
|
7480
|
+
Get all tags for a claim set (including data).
|
|
7481
|
+
|
|
7482
|
+
**getAssignedTags**(claimSetId: string, collectionId?: string) → `Promise<any>`
|
|
7483
|
+
Get assigned tags for a claim set — tags soft-assigned to a collection or product.
|
|
7439
7484
|
|
|
7440
|
-
**
|
|
7441
|
-
|
|
7485
|
+
**createTag**(claimSetId: string,
|
|
7486
|
+
data: CreateClaimSetTagRequest,
|
|
7487
|
+
collectionId?: string) → `Promise<CreateClaimSetTagResponse>`
|
|
7488
|
+
Create a single tag inside a claim set.
|
|
7489
|
+
|
|
7490
|
+
**importTags**(claimSetId: string,
|
|
7491
|
+
data: ImportClaimSetTagsRequest,
|
|
7492
|
+
collectionId?: string) → `Promise<ImportClaimSetTagsResponse>`
|
|
7493
|
+
Bulk import tags into a claim set.
|
|
7494
|
+
|
|
7495
|
+
**getReport**(collectionId: string, claimSetId: string) → `Promise<any>`
|
|
7496
|
+
Get a report for a claim set (collection-scoped).
|
|
7442
7497
|
|
|
7443
7498
|
**getTagSummary**(collectionId: string) → `Promise<any>`
|
|
7444
7499
|
Get tag summary for a collection.
|
|
@@ -7446,29 +7501,14 @@ Get tag summary for a collection.
|
|
|
7446
7501
|
**tagQuery**(collectionId: string, data: any) → `Promise<any>`
|
|
7447
7502
|
Perform a tag query for a collection.
|
|
7448
7503
|
|
|
7449
|
-
**createForCollection**(collectionId: string, params: any) → `Promise<any>`
|
|
7450
|
-
Create a new claim set for a collection.
|
|
7451
|
-
|
|
7452
|
-
**updateForCollection**(collectionId: string, params: any) → `Promise<any>`
|
|
7453
|
-
Update a claim set for a collection.
|
|
7454
|
-
|
|
7455
7504
|
**makeClaim**(collectionId: string, params: any) → `Promise<any>`
|
|
7456
|
-
Make a claim
|
|
7505
|
+
Make a claim against a claim set (collection-scoped).
|
|
7457
7506
|
|
|
7458
7507
|
**assignClaims**(collectionId: string, data: AssignClaimsRequest) → `Promise<any>`
|
|
7459
|
-
Assign claims to
|
|
7508
|
+
Assign claims to codes or ranges within a collection.
|
|
7460
7509
|
|
|
7461
7510
|
**updateClaimData**(collectionId: string, data: UpdateClaimDataRequest) → `Promise<any>`
|
|
7462
|
-
Update claim data for a collection.
|
|
7463
|
-
|
|
7464
|
-
**createTag**(collectionId: string,
|
|
7465
|
-
claimSetId: string,
|
|
7466
|
-
data: CreateClaimSetTagRequest) → `Promise<CreateClaimSetTagResponse>`
|
|
7467
|
-
Create a single tag/code inside an existing claim set (collection admin). POST /admin/collection/:collectionId/claimSet/:claimSetId/createTag
|
|
7468
|
-
|
|
7469
|
-
**createTagPlatform**(claimSetId: string,
|
|
7470
|
-
data: CreateClaimSetTagRequest) → `Promise<CreateClaimSetTagResponse>`
|
|
7471
|
-
Create a single tag/code inside an existing claim set (platform; requires account.features.adminClaimSets). POST /platform/claimSet/:claimSetId/createTag
|
|
7511
|
+
Update claim data for a claim set (collection-scoped).
|
|
7472
7512
|
|
|
7473
7513
|
### collection
|
|
7474
7514
|
|