@proveanything/smartlinks 1.15.23 → 1.15.24
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/docs/API_SUMMARY.md +27 -1
- package/dist/docs/utils.md +2 -1
- package/dist/openapi.yaml +42 -0
- package/dist/types/segments.d.ts +25 -0
- package/dist/utils/paths.d.ts +9 -2
- package/docs/API_SUMMARY.md +27 -1
- package/docs/utils.md +2 -1
- package/openapi.yaml +42 -0
- package/package.json +1 -1
package/dist/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.15.
|
|
3
|
+
Version: 1.15.24 | Generated: 2026-08-31T17:50:11.496Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -7531,6 +7531,23 @@ interface InteractionFilterValue {
|
|
|
7531
7531
|
}
|
|
7532
7532
|
```
|
|
7533
7533
|
|
|
7534
|
+
**OwnershipAttributePredicate** (interface)
|
|
7535
|
+
```typescript
|
|
7536
|
+
interface OwnershipAttributePredicate {
|
|
7537
|
+
path: string
|
|
7538
|
+
operator: OwnershipAttributeOperator
|
|
7539
|
+
value?: string | number
|
|
7540
|
+
}
|
|
7541
|
+
```
|
|
7542
|
+
|
|
7543
|
+
**OwnershipFacetSelector** (interface)
|
|
7544
|
+
```typescript
|
|
7545
|
+
interface OwnershipFacetSelector {
|
|
7546
|
+
key: string
|
|
7547
|
+
value: string
|
|
7548
|
+
}
|
|
7549
|
+
```
|
|
7550
|
+
|
|
7534
7551
|
**SegmentRecord** (interface)
|
|
7535
7552
|
```typescript
|
|
7536
7553
|
interface SegmentRecord {
|
|
@@ -7591,6 +7608,10 @@ interface SegmentRecipientsResponse {
|
|
|
7591
7608
|
}
|
|
7592
7609
|
```
|
|
7593
7610
|
|
|
7611
|
+
**CustomFieldOperator** = ``
|
|
7612
|
+
|
|
7613
|
+
**OwnershipAttributeOperator** = `'equals' | 'exists' | 'gt' | 'gte' | 'lt' | 'lte'`
|
|
7614
|
+
|
|
7594
7615
|
**SegmentFilterRule** = ``
|
|
7595
7616
|
|
|
7596
7617
|
### tags
|
|
@@ -8283,7 +8304,12 @@ interface Gs1DigitalLinkParams {
|
|
|
8283
8304
|
gtin?: string
|
|
8284
8305
|
product?: Product
|
|
8285
8306
|
ownGtin?: boolean
|
|
8307
|
+
* A real GS1 **Consumer Product Variant** code (AI 22). Use this when the brand has a
|
|
8308
|
+
* genuine CPV. Takes precedence over `variant` when both are given.
|
|
8286
8309
|
cpv?: string | { id: string }
|
|
8310
|
+
* Internal variant id, emitted as AI 22 (the SmartLinks resolver reads path segment 22
|
|
8311
|
+
* as the variant). Prefer `cpv` when you have a real GS1 CPV code — a non-CPV variant id
|
|
8312
|
+
* in AI 22 is only meaningful to the SmartLinks resolver, not to third-party GS1 resolvers.
|
|
8287
8313
|
variant?: string | { id: string }
|
|
8288
8314
|
lot?: string | { id: string }
|
|
8289
8315
|
batch?: BatchResponse | string
|
package/dist/docs/utils.md
CHANGED
|
@@ -233,7 +233,8 @@ otherwise).
|
|
|
233
233
|
| Input | AI | Notes |
|
|
234
234
|
|-------|----|-------|
|
|
235
235
|
| `gtin` / `product.gtin` | 01 | Primary identifier (required) |
|
|
236
|
-
| `cpv`
|
|
236
|
+
| `cpv` | 22 | Real GS1 Consumer Product Variant code (path). Wins over `variant`. |
|
|
237
|
+
| `variant` | 22 | Internal variant id, emitted as AI 22 for the SmartLinks resolver. Use `cpv` for a genuine GS1 CPV. |
|
|
237
238
|
| `lot` / `batch` | 10 | Batch/lot (path); a batch object also supplies its expiry |
|
|
238
239
|
| `serial` | 21 | Specific item — a string, or an object (`serialNumber` ?? `id`, e.g. a proof / serial / virtual id) |
|
|
239
240
|
| `expiry` | 17 | Date → `YYMMDD` (query) |
|
package/dist/openapi.yaml
CHANGED
|
@@ -25340,6 +25340,29 @@ components:
|
|
|
25340
25340
|
type: string
|
|
25341
25341
|
required:
|
|
25342
25342
|
- interactionId
|
|
25343
|
+
OwnershipAttributePredicate:
|
|
25344
|
+
type: object
|
|
25345
|
+
properties:
|
|
25346
|
+
path:
|
|
25347
|
+
type: string
|
|
25348
|
+
operator:
|
|
25349
|
+
$ref: "#/components/schemas/OwnershipAttributeOperator"
|
|
25350
|
+
value:
|
|
25351
|
+
type: object
|
|
25352
|
+
additionalProperties: true
|
|
25353
|
+
required:
|
|
25354
|
+
- path
|
|
25355
|
+
- operator
|
|
25356
|
+
OwnershipFacetSelector:
|
|
25357
|
+
type: object
|
|
25358
|
+
properties:
|
|
25359
|
+
key:
|
|
25360
|
+
type: string
|
|
25361
|
+
value:
|
|
25362
|
+
type: string
|
|
25363
|
+
required:
|
|
25364
|
+
- key
|
|
25365
|
+
- value
|
|
25343
25366
|
SegmentRecord:
|
|
25344
25367
|
type: object
|
|
25345
25368
|
properties:
|
|
@@ -25445,6 +25468,25 @@ components:
|
|
|
25445
25468
|
- limit
|
|
25446
25469
|
- offset
|
|
25447
25470
|
- total
|
|
25471
|
+
CustomFieldOperator:
|
|
25472
|
+
type: string
|
|
25473
|
+
enum:
|
|
25474
|
+
- equals
|
|
25475
|
+
- exists
|
|
25476
|
+
- gt
|
|
25477
|
+
- gte
|
|
25478
|
+
- lt
|
|
25479
|
+
- lte
|
|
25480
|
+
- before
|
|
25481
|
+
- after
|
|
25482
|
+
- within_days
|
|
25483
|
+
- older_than_days
|
|
25484
|
+
- "s JSON. Numeric ops (gt/gte/lt/lte) compare as a number. export type OwnershipAttributeOperator = "
|
|
25485
|
+
- " | "
|
|
25486
|
+
- " | "
|
|
25487
|
+
- " | "
|
|
25488
|
+
- " | "
|
|
25489
|
+
- " | "
|
|
25448
25490
|
Tag:
|
|
25449
25491
|
type: object
|
|
25450
25492
|
properties:
|
package/dist/types/segments.d.ts
CHANGED
|
@@ -5,6 +5,18 @@ export interface InteractionFilterValue {
|
|
|
5
5
|
from?: string;
|
|
6
6
|
to?: string;
|
|
7
7
|
}
|
|
8
|
+
export type CustomFieldOperator = 'equals' | 'exists' | 'gt' | 'gte' | 'lt' | 'lte' | 'before' | 'after' | 'within_days' | 'older_than_days';
|
|
9
|
+
export type OwnershipAttributeOperator = 'equals' | 'exists' | 'gt' | 'gte' | 'lt' | 'lte';
|
|
10
|
+
export interface OwnershipAttributePredicate {
|
|
11
|
+
path: string;
|
|
12
|
+
operator: OwnershipAttributeOperator;
|
|
13
|
+
/** Operand: a number for gt/gte/lt/lte, a string for equals; omitted for exists. */
|
|
14
|
+
value?: string | number;
|
|
15
|
+
}
|
|
16
|
+
export interface OwnershipFacetSelector {
|
|
17
|
+
key: string;
|
|
18
|
+
value: string;
|
|
19
|
+
}
|
|
8
20
|
export type SegmentFilterRule = {
|
|
9
21
|
field: 'interaction';
|
|
10
22
|
op: 'had' | 'exists';
|
|
@@ -28,6 +40,19 @@ export type SegmentFilterRule = {
|
|
|
28
40
|
from?: string;
|
|
29
41
|
to?: string;
|
|
30
42
|
};
|
|
43
|
+
} | {
|
|
44
|
+
type: 'custom_field';
|
|
45
|
+
field: string;
|
|
46
|
+
operator: CustomFieldOperator;
|
|
47
|
+
value?: string | number;
|
|
48
|
+
} | {
|
|
49
|
+
type: 'ownership';
|
|
50
|
+
productId?: string;
|
|
51
|
+
facet?: OwnershipFacetSelector;
|
|
52
|
+
attribute?: OwnershipAttributePredicate;
|
|
53
|
+
olderThanDays?: number;
|
|
54
|
+
withinDays?: number;
|
|
55
|
+
includeDeleted?: boolean;
|
|
31
56
|
} | {
|
|
32
57
|
type: 'interaction';
|
|
33
58
|
interactionId: string;
|
package/dist/utils/paths.d.ts
CHANGED
|
@@ -116,11 +116,18 @@ export interface Gs1DigitalLinkParams {
|
|
|
116
116
|
product?: Product;
|
|
117
117
|
/** Override the global-owner flag; otherwise read from `product.ownGtin`. */
|
|
118
118
|
ownGtin?: boolean;
|
|
119
|
-
/**
|
|
119
|
+
/**
|
|
120
|
+
* A real GS1 **Consumer Product Variant** code (AI 22). Use this when the brand has a
|
|
121
|
+
* genuine CPV. Takes precedence over `variant` when both are given.
|
|
122
|
+
*/
|
|
120
123
|
cpv?: string | {
|
|
121
124
|
id: string;
|
|
122
125
|
};
|
|
123
|
-
/**
|
|
126
|
+
/**
|
|
127
|
+
* Internal variant id, emitted as AI 22 (the SmartLinks resolver reads path segment 22
|
|
128
|
+
* as the variant). Prefer `cpv` when you have a real GS1 CPV code — a non-CPV variant id
|
|
129
|
+
* in AI 22 is only meaningful to the SmartLinks resolver, not to third-party GS1 resolvers.
|
|
130
|
+
*/
|
|
124
131
|
variant?: string | {
|
|
125
132
|
id: string;
|
|
126
133
|
};
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.15.
|
|
3
|
+
Version: 1.15.24 | Generated: 2026-08-31T17:50:11.496Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -7531,6 +7531,23 @@ interface InteractionFilterValue {
|
|
|
7531
7531
|
}
|
|
7532
7532
|
```
|
|
7533
7533
|
|
|
7534
|
+
**OwnershipAttributePredicate** (interface)
|
|
7535
|
+
```typescript
|
|
7536
|
+
interface OwnershipAttributePredicate {
|
|
7537
|
+
path: string
|
|
7538
|
+
operator: OwnershipAttributeOperator
|
|
7539
|
+
value?: string | number
|
|
7540
|
+
}
|
|
7541
|
+
```
|
|
7542
|
+
|
|
7543
|
+
**OwnershipFacetSelector** (interface)
|
|
7544
|
+
```typescript
|
|
7545
|
+
interface OwnershipFacetSelector {
|
|
7546
|
+
key: string
|
|
7547
|
+
value: string
|
|
7548
|
+
}
|
|
7549
|
+
```
|
|
7550
|
+
|
|
7534
7551
|
**SegmentRecord** (interface)
|
|
7535
7552
|
```typescript
|
|
7536
7553
|
interface SegmentRecord {
|
|
@@ -7591,6 +7608,10 @@ interface SegmentRecipientsResponse {
|
|
|
7591
7608
|
}
|
|
7592
7609
|
```
|
|
7593
7610
|
|
|
7611
|
+
**CustomFieldOperator** = ``
|
|
7612
|
+
|
|
7613
|
+
**OwnershipAttributeOperator** = `'equals' | 'exists' | 'gt' | 'gte' | 'lt' | 'lte'`
|
|
7614
|
+
|
|
7594
7615
|
**SegmentFilterRule** = ``
|
|
7595
7616
|
|
|
7596
7617
|
### tags
|
|
@@ -8283,7 +8304,12 @@ interface Gs1DigitalLinkParams {
|
|
|
8283
8304
|
gtin?: string
|
|
8284
8305
|
product?: Product
|
|
8285
8306
|
ownGtin?: boolean
|
|
8307
|
+
* A real GS1 **Consumer Product Variant** code (AI 22). Use this when the brand has a
|
|
8308
|
+
* genuine CPV. Takes precedence over `variant` when both are given.
|
|
8286
8309
|
cpv?: string | { id: string }
|
|
8310
|
+
* Internal variant id, emitted as AI 22 (the SmartLinks resolver reads path segment 22
|
|
8311
|
+
* as the variant). Prefer `cpv` when you have a real GS1 CPV code — a non-CPV variant id
|
|
8312
|
+
* in AI 22 is only meaningful to the SmartLinks resolver, not to third-party GS1 resolvers.
|
|
8287
8313
|
variant?: string | { id: string }
|
|
8288
8314
|
lot?: string | { id: string }
|
|
8289
8315
|
batch?: BatchResponse | string
|
package/docs/utils.md
CHANGED
|
@@ -233,7 +233,8 @@ otherwise).
|
|
|
233
233
|
| Input | AI | Notes |
|
|
234
234
|
|-------|----|-------|
|
|
235
235
|
| `gtin` / `product.gtin` | 01 | Primary identifier (required) |
|
|
236
|
-
| `cpv`
|
|
236
|
+
| `cpv` | 22 | Real GS1 Consumer Product Variant code (path). Wins over `variant`. |
|
|
237
|
+
| `variant` | 22 | Internal variant id, emitted as AI 22 for the SmartLinks resolver. Use `cpv` for a genuine GS1 CPV. |
|
|
237
238
|
| `lot` / `batch` | 10 | Batch/lot (path); a batch object also supplies its expiry |
|
|
238
239
|
| `serial` | 21 | Specific item — a string, or an object (`serialNumber` ?? `id`, e.g. a proof / serial / virtual id) |
|
|
239
240
|
| `expiry` | 17 | Date → `YYMMDD` (query) |
|
package/openapi.yaml
CHANGED
|
@@ -25340,6 +25340,29 @@ components:
|
|
|
25340
25340
|
type: string
|
|
25341
25341
|
required:
|
|
25342
25342
|
- interactionId
|
|
25343
|
+
OwnershipAttributePredicate:
|
|
25344
|
+
type: object
|
|
25345
|
+
properties:
|
|
25346
|
+
path:
|
|
25347
|
+
type: string
|
|
25348
|
+
operator:
|
|
25349
|
+
$ref: "#/components/schemas/OwnershipAttributeOperator"
|
|
25350
|
+
value:
|
|
25351
|
+
type: object
|
|
25352
|
+
additionalProperties: true
|
|
25353
|
+
required:
|
|
25354
|
+
- path
|
|
25355
|
+
- operator
|
|
25356
|
+
OwnershipFacetSelector:
|
|
25357
|
+
type: object
|
|
25358
|
+
properties:
|
|
25359
|
+
key:
|
|
25360
|
+
type: string
|
|
25361
|
+
value:
|
|
25362
|
+
type: string
|
|
25363
|
+
required:
|
|
25364
|
+
- key
|
|
25365
|
+
- value
|
|
25343
25366
|
SegmentRecord:
|
|
25344
25367
|
type: object
|
|
25345
25368
|
properties:
|
|
@@ -25445,6 +25468,25 @@ components:
|
|
|
25445
25468
|
- limit
|
|
25446
25469
|
- offset
|
|
25447
25470
|
- total
|
|
25471
|
+
CustomFieldOperator:
|
|
25472
|
+
type: string
|
|
25473
|
+
enum:
|
|
25474
|
+
- equals
|
|
25475
|
+
- exists
|
|
25476
|
+
- gt
|
|
25477
|
+
- gte
|
|
25478
|
+
- lt
|
|
25479
|
+
- lte
|
|
25480
|
+
- before
|
|
25481
|
+
- after
|
|
25482
|
+
- within_days
|
|
25483
|
+
- older_than_days
|
|
25484
|
+
- "s JSON. Numeric ops (gt/gte/lt/lte) compare as a number. export type OwnershipAttributeOperator = "
|
|
25485
|
+
- " | "
|
|
25486
|
+
- " | "
|
|
25487
|
+
- " | "
|
|
25488
|
+
- " | "
|
|
25489
|
+
- " | "
|
|
25448
25490
|
Tag:
|
|
25449
25491
|
type: object
|
|
25450
25492
|
properties:
|