@proveanything/smartlinks 1.8.11 → 1.8.12
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/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/loyalty.d.ts +65 -0
- package/dist/api/loyalty.js +139 -0
- package/dist/docs/API_SUMMARY.md +254 -1
- package/dist/docs/loyalty.md +333 -0
- package/dist/openapi.yaml +906 -40
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/loyalty.d.ts +145 -0
- package/dist/types/loyalty.js +2 -0
- package/docs/API_SUMMARY.md +254 -1
- package/docs/loyalty.md +333 -0
- package/openapi.yaml +906 -40
- package/package.json +1 -1
package/dist/types/index.d.ts
CHANGED
package/dist/types/index.js
CHANGED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
export type DataBlock = Record<string, unknown>;
|
|
2
|
+
export interface LoyaltyScheme {
|
|
3
|
+
id: string;
|
|
4
|
+
orgId: string;
|
|
5
|
+
collectionId: string;
|
|
6
|
+
name: string;
|
|
7
|
+
/** Open string — e.g. "points" | "stamps" */
|
|
8
|
+
type: string;
|
|
9
|
+
active: boolean;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
updatedAt: string;
|
|
12
|
+
deletedAt: string | null;
|
|
13
|
+
data: DataBlock;
|
|
14
|
+
/** Admin responses only */
|
|
15
|
+
owner?: DataBlock;
|
|
16
|
+
/** Admin responses only */
|
|
17
|
+
admin?: DataBlock;
|
|
18
|
+
}
|
|
19
|
+
export interface LoyaltyMember {
|
|
20
|
+
id: string;
|
|
21
|
+
orgId: string;
|
|
22
|
+
collectionId: string;
|
|
23
|
+
schemeId: string;
|
|
24
|
+
contactId: string;
|
|
25
|
+
userId: string | null;
|
|
26
|
+
/** Current redeemable balance */
|
|
27
|
+
balance: number;
|
|
28
|
+
/** Total ever earned — never decremented, used for tier calculations */
|
|
29
|
+
lifetimePoints: number;
|
|
30
|
+
createdAt: string;
|
|
31
|
+
updatedAt: string;
|
|
32
|
+
data: DataBlock;
|
|
33
|
+
/** Admin responses only */
|
|
34
|
+
owner?: DataBlock;
|
|
35
|
+
/** Admin responses only */
|
|
36
|
+
admin?: DataBlock;
|
|
37
|
+
}
|
|
38
|
+
export interface LoyaltyTransaction {
|
|
39
|
+
id: string;
|
|
40
|
+
orgId: string;
|
|
41
|
+
collectionId: string;
|
|
42
|
+
schemeId: string;
|
|
43
|
+
memberId: string;
|
|
44
|
+
/** Signed: positive = earn, negative = spend/deduct */
|
|
45
|
+
points: number;
|
|
46
|
+
reason: string | null;
|
|
47
|
+
/** Caller-supplied key — prevents double-credit on retries */
|
|
48
|
+
idempotencyKey: string | null;
|
|
49
|
+
metadata: DataBlock;
|
|
50
|
+
createdAt: string;
|
|
51
|
+
}
|
|
52
|
+
export interface LoyaltyEarningRule {
|
|
53
|
+
id: string;
|
|
54
|
+
orgId: string;
|
|
55
|
+
collectionId: string;
|
|
56
|
+
schemeId: string;
|
|
57
|
+
/** ID of the Interaction definition that triggers this rule */
|
|
58
|
+
interactionId: string;
|
|
59
|
+
/** Points awarded when this rule matches — always server-controlled */
|
|
60
|
+
points: number;
|
|
61
|
+
/**
|
|
62
|
+
* Key-value conditions matched against the interaction event before awarding.
|
|
63
|
+
* Supports top-level event fields (outcome, scope, status, eventType, etc.)
|
|
64
|
+
* and dot-path into metadata (e.g. `"metadata.tier": "gold"`).
|
|
65
|
+
* Empty object = always fires for any event on this interaction.
|
|
66
|
+
*/
|
|
67
|
+
conditions: Record<string, string>;
|
|
68
|
+
/** Maximum lifetime triggers per contact. null = unlimited */
|
|
69
|
+
maxPerContact: number | null;
|
|
70
|
+
/** Minimum hours between triggers for the same contact. null = no cooldown */
|
|
71
|
+
cooldownHours: number | null;
|
|
72
|
+
active: boolean;
|
|
73
|
+
createdAt: string;
|
|
74
|
+
updatedAt: string;
|
|
75
|
+
data: DataBlock;
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Returned by loyalty.getMe() — each active scheme with the caller's
|
|
79
|
+
* membership embedded. member is null if the caller has never earned
|
|
80
|
+
* points in that scheme.
|
|
81
|
+
*/
|
|
82
|
+
export interface LoyaltySchemeWithMembership extends Omit<LoyaltyScheme, 'owner' | 'admin'> {
|
|
83
|
+
member: Omit<LoyaltyMember, 'owner' | 'admin'> | null;
|
|
84
|
+
}
|
|
85
|
+
/** Returned by loyalty.admin.recordTransaction() */
|
|
86
|
+
export interface LoyaltyTransactionResult {
|
|
87
|
+
member: LoyaltyMember;
|
|
88
|
+
transaction: LoyaltyTransaction;
|
|
89
|
+
}
|
|
90
|
+
export interface LoyaltyPaginationParams {
|
|
91
|
+
limit?: number;
|
|
92
|
+
offset?: number;
|
|
93
|
+
}
|
|
94
|
+
export interface LoyaltyPaginatedResult<T> {
|
|
95
|
+
items: T[];
|
|
96
|
+
limit: number;
|
|
97
|
+
offset: number;
|
|
98
|
+
}
|
|
99
|
+
export interface CreateLoyaltySchemeBody {
|
|
100
|
+
name: string;
|
|
101
|
+
type: string;
|
|
102
|
+
active?: boolean;
|
|
103
|
+
data?: DataBlock;
|
|
104
|
+
owner?: DataBlock;
|
|
105
|
+
admin?: DataBlock;
|
|
106
|
+
}
|
|
107
|
+
export interface UpdateLoyaltySchemeBody {
|
|
108
|
+
name?: string;
|
|
109
|
+
type?: string;
|
|
110
|
+
active?: boolean;
|
|
111
|
+
data?: DataBlock;
|
|
112
|
+
owner?: DataBlock;
|
|
113
|
+
admin?: DataBlock;
|
|
114
|
+
}
|
|
115
|
+
export interface CreateLoyaltyEarningRuleBody {
|
|
116
|
+
interactionId: string;
|
|
117
|
+
points: number;
|
|
118
|
+
conditions?: Record<string, string>;
|
|
119
|
+
maxPerContact?: number | null;
|
|
120
|
+
cooldownHours?: number | null;
|
|
121
|
+
active?: boolean;
|
|
122
|
+
data?: DataBlock;
|
|
123
|
+
}
|
|
124
|
+
export interface UpdateLoyaltyEarningRuleBody {
|
|
125
|
+
points?: number;
|
|
126
|
+
conditions?: Record<string, string>;
|
|
127
|
+
maxPerContact?: number | null;
|
|
128
|
+
cooldownHours?: number | null;
|
|
129
|
+
active?: boolean;
|
|
130
|
+
data?: DataBlock;
|
|
131
|
+
}
|
|
132
|
+
export interface RecordLoyaltyTransactionBody {
|
|
133
|
+
/** Non-zero signed integer. Positive = earn, negative = spend/deduct */
|
|
134
|
+
points: number;
|
|
135
|
+
reason?: string;
|
|
136
|
+
/**
|
|
137
|
+
* Optional caller-supplied key scoped to the scheme.
|
|
138
|
+
* If a transaction with this key already exists the server returns 409.
|
|
139
|
+
* Use to safely retry without double-crediting points.
|
|
140
|
+
*/
|
|
141
|
+
idempotencyKey?: string;
|
|
142
|
+
metadata?: DataBlock;
|
|
143
|
+
/** Links the auto-created member to a Firebase UID if not yet associated */
|
|
144
|
+
userId?: string;
|
|
145
|
+
}
|
package/docs/API_SUMMARY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Smartlinks API Summary
|
|
2
2
|
|
|
3
|
-
Version: 1.8.
|
|
3
|
+
Version: 1.8.12 | Generated: 2026-03-22T11:27:19.142Z
|
|
4
4
|
|
|
5
5
|
This is a concise summary of all available API functions and types.
|
|
6
6
|
|
|
@@ -26,6 +26,7 @@ For detailed guides on specific features:
|
|
|
26
26
|
- **[App Objects: Cases, Threads & Records](app-objects.md)** - Generic app-scoped building blocks for support cases, discussions, bookings, registrations, and more
|
|
27
27
|
- **[Communications](comms.md)** - Transactional sends, multi-channel broadcasts, consent management, push registration, and analytics
|
|
28
28
|
- **[Interactions & Event Tracking](interactions.md)** - Log user events, count outcomes, query history, and define interaction types with permissions
|
|
29
|
+
- **[Loyalty: Points, Members & Earning Rules](loyalty.md)** - Loyalty schemes, automatic point earning via interaction rules, member balances, transaction history, and manual adjustments
|
|
29
30
|
- **[Deep Link Discovery](deep-link-discovery.md)** - Registering and discovering navigable app states for portal menus and AI orchestration
|
|
30
31
|
- **[AI-Native App Manifests](manifests.md)** - How AI workflows discover, configure, and import apps via structured manifests and prose guides
|
|
31
32
|
- **[AI Guide Template](ai-guide-template.md)** - A sample for an app on how to build an AI setup guide
|
|
@@ -79,6 +80,7 @@ The Smartlinks SDK is organized into the following namespaces:
|
|
|
79
80
|
|
|
80
81
|
— Analytics & Events —
|
|
81
82
|
- **interactions** - Log and analyze interactions/outcomes; aggregates and actor lists; interaction definition CRUD. → [Guide](interactions.md)
|
|
83
|
+
- **loyalty** - Loyalty programmes: schemes, earning rules tied to interactions, member balances, transaction ledger, and manual adjustments. → [Guide](loyalty.md)
|
|
82
84
|
|
|
83
85
|
— Automation —
|
|
84
86
|
- **journeys** - Configure automated flows triggered by events or schedules; steps, rules; full CRUD.
|
|
@@ -4861,6 +4863,174 @@ interface LocationSearchResponse {
|
|
|
4861
4863
|
|
|
4862
4864
|
**LocationPayload** = `Omit<`
|
|
4863
4865
|
|
|
4866
|
+
### loyalty
|
|
4867
|
+
|
|
4868
|
+
**LoyaltyScheme** (interface)
|
|
4869
|
+
```typescript
|
|
4870
|
+
interface LoyaltyScheme {
|
|
4871
|
+
id: string
|
|
4872
|
+
orgId: string
|
|
4873
|
+
collectionId: string
|
|
4874
|
+
name: string
|
|
4875
|
+
type: string
|
|
4876
|
+
active: boolean
|
|
4877
|
+
createdAt: string // ISO
|
|
4878
|
+
updatedAt: string // ISO
|
|
4879
|
+
deletedAt: string | null // ISO
|
|
4880
|
+
data: DataBlock
|
|
4881
|
+
owner?: DataBlock
|
|
4882
|
+
admin?: DataBlock
|
|
4883
|
+
}
|
|
4884
|
+
```
|
|
4885
|
+
|
|
4886
|
+
**LoyaltyMember** (interface)
|
|
4887
|
+
```typescript
|
|
4888
|
+
interface LoyaltyMember {
|
|
4889
|
+
id: string
|
|
4890
|
+
orgId: string
|
|
4891
|
+
collectionId: string
|
|
4892
|
+
schemeId: string
|
|
4893
|
+
contactId: string
|
|
4894
|
+
userId: string | null
|
|
4895
|
+
balance: number
|
|
4896
|
+
lifetimePoints: number
|
|
4897
|
+
createdAt: string // ISO
|
|
4898
|
+
updatedAt: string // ISO
|
|
4899
|
+
data: DataBlock
|
|
4900
|
+
owner?: DataBlock
|
|
4901
|
+
admin?: DataBlock
|
|
4902
|
+
}
|
|
4903
|
+
```
|
|
4904
|
+
|
|
4905
|
+
**LoyaltyTransaction** (interface)
|
|
4906
|
+
```typescript
|
|
4907
|
+
interface LoyaltyTransaction {
|
|
4908
|
+
id: string
|
|
4909
|
+
orgId: string
|
|
4910
|
+
collectionId: string
|
|
4911
|
+
schemeId: string
|
|
4912
|
+
memberId: string
|
|
4913
|
+
points: number
|
|
4914
|
+
reason: string | null
|
|
4915
|
+
idempotencyKey: string | null
|
|
4916
|
+
metadata: DataBlock
|
|
4917
|
+
createdAt: string // ISO
|
|
4918
|
+
}
|
|
4919
|
+
```
|
|
4920
|
+
|
|
4921
|
+
**LoyaltyEarningRule** (interface)
|
|
4922
|
+
```typescript
|
|
4923
|
+
interface LoyaltyEarningRule {
|
|
4924
|
+
id: string
|
|
4925
|
+
orgId: string
|
|
4926
|
+
collectionId: string
|
|
4927
|
+
schemeId: string
|
|
4928
|
+
interactionId: string
|
|
4929
|
+
points: number
|
|
4930
|
+
* Key-value conditions matched against the interaction event before awarding.
|
|
4931
|
+
* Supports top-level event fields (outcome, scope, status, eventType, etc.)
|
|
4932
|
+
* and dot-path into metadata (e.g. `"metadata.tier": "gold"`).
|
|
4933
|
+
* Empty object = always fires for any event on this interaction.
|
|
4934
|
+
conditions: Record<string, string>
|
|
4935
|
+
maxPerContact: number | null
|
|
4936
|
+
cooldownHours: number | null
|
|
4937
|
+
active: boolean
|
|
4938
|
+
createdAt: string // ISO
|
|
4939
|
+
updatedAt: string // ISO
|
|
4940
|
+
data: DataBlock
|
|
4941
|
+
}
|
|
4942
|
+
```
|
|
4943
|
+
|
|
4944
|
+
**LoyaltyTransactionResult** (interface)
|
|
4945
|
+
```typescript
|
|
4946
|
+
interface LoyaltyTransactionResult {
|
|
4947
|
+
member: LoyaltyMember
|
|
4948
|
+
transaction: LoyaltyTransaction
|
|
4949
|
+
}
|
|
4950
|
+
```
|
|
4951
|
+
|
|
4952
|
+
**LoyaltyPaginationParams** (interface)
|
|
4953
|
+
```typescript
|
|
4954
|
+
interface LoyaltyPaginationParams {
|
|
4955
|
+
limit?: number // default 50, max 200
|
|
4956
|
+
offset?: number
|
|
4957
|
+
}
|
|
4958
|
+
```
|
|
4959
|
+
|
|
4960
|
+
**LoyaltyPaginatedResult<T>** (interface)
|
|
4961
|
+
```typescript
|
|
4962
|
+
interface LoyaltyPaginatedResult<T> {
|
|
4963
|
+
items: T[]
|
|
4964
|
+
limit: number
|
|
4965
|
+
offset: number
|
|
4966
|
+
}
|
|
4967
|
+
```
|
|
4968
|
+
|
|
4969
|
+
**CreateLoyaltySchemeBody** (interface)
|
|
4970
|
+
```typescript
|
|
4971
|
+
interface CreateLoyaltySchemeBody {
|
|
4972
|
+
name: string
|
|
4973
|
+
type: string
|
|
4974
|
+
active?: boolean
|
|
4975
|
+
data?: DataBlock
|
|
4976
|
+
owner?: DataBlock
|
|
4977
|
+
admin?: DataBlock
|
|
4978
|
+
}
|
|
4979
|
+
```
|
|
4980
|
+
|
|
4981
|
+
**UpdateLoyaltySchemeBody** (interface)
|
|
4982
|
+
```typescript
|
|
4983
|
+
interface UpdateLoyaltySchemeBody {
|
|
4984
|
+
name?: string
|
|
4985
|
+
type?: string
|
|
4986
|
+
active?: boolean
|
|
4987
|
+
data?: DataBlock
|
|
4988
|
+
owner?: DataBlock
|
|
4989
|
+
admin?: DataBlock
|
|
4990
|
+
}
|
|
4991
|
+
```
|
|
4992
|
+
|
|
4993
|
+
**CreateLoyaltyEarningRuleBody** (interface)
|
|
4994
|
+
```typescript
|
|
4995
|
+
interface CreateLoyaltyEarningRuleBody {
|
|
4996
|
+
interactionId: string
|
|
4997
|
+
points: number
|
|
4998
|
+
conditions?: Record<string, string>
|
|
4999
|
+
maxPerContact?: number | null
|
|
5000
|
+
cooldownHours?: number | null
|
|
5001
|
+
active?: boolean
|
|
5002
|
+
data?: DataBlock
|
|
5003
|
+
}
|
|
5004
|
+
```
|
|
5005
|
+
|
|
5006
|
+
**UpdateLoyaltyEarningRuleBody** (interface)
|
|
5007
|
+
```typescript
|
|
5008
|
+
interface UpdateLoyaltyEarningRuleBody {
|
|
5009
|
+
points?: number
|
|
5010
|
+
conditions?: Record<string, string>
|
|
5011
|
+
maxPerContact?: number | null
|
|
5012
|
+
cooldownHours?: number | null
|
|
5013
|
+
active?: boolean
|
|
5014
|
+
data?: DataBlock
|
|
5015
|
+
}
|
|
5016
|
+
```
|
|
5017
|
+
|
|
5018
|
+
**RecordLoyaltyTransactionBody** (interface)
|
|
5019
|
+
```typescript
|
|
5020
|
+
interface RecordLoyaltyTransactionBody {
|
|
5021
|
+
points: number
|
|
5022
|
+
reason?: string
|
|
5023
|
+
* Optional caller-supplied key scoped to the scheme.
|
|
5024
|
+
* If a transaction with this key already exists the server returns 409.
|
|
5025
|
+
* Use to safely retry without double-crediting points.
|
|
5026
|
+
idempotencyKey?: string
|
|
5027
|
+
metadata?: DataBlock
|
|
5028
|
+
userId?: string
|
|
5029
|
+
}
|
|
5030
|
+
```
|
|
5031
|
+
|
|
5032
|
+
**DataBlock** = `Record<string, unknown>`
|
|
5033
|
+
|
|
4864
5034
|
### nfc
|
|
4865
5035
|
|
|
4866
5036
|
**NfcTagInfo** (interface)
|
|
@@ -7064,6 +7234,89 @@ Public: Fetch a global location by ID GET /public/location/:locationId
|
|
|
7064
7234
|
locationId: string) → `Promise<Location>`
|
|
7065
7235
|
Public: Fetch a location for a collection; returns either a collection-owned or global fallback GET /public/collection/:collectionId/location/:locationId
|
|
7066
7236
|
|
|
7237
|
+
### loyalty
|
|
7238
|
+
|
|
7239
|
+
Loyalty programmes built on top of collections. Configure schemes and earning rules; contacts earn points automatically via interaction events. See the [Loyalty guide](loyalty.md) for the full walkthrough.
|
|
7240
|
+
|
|
7241
|
+
**list**(collectionId: string,
|
|
7242
|
+
params: { includeDeleted?: boolean } = {}) → `Promise<LoyaltyScheme[]>`
|
|
7243
|
+
|
|
7244
|
+
**get**(collectionId: string,
|
|
7245
|
+
schemeId: string) → `Promise<LoyaltyScheme>`
|
|
7246
|
+
|
|
7247
|
+
**create**(collectionId: string,
|
|
7248
|
+
body: CreateLoyaltySchemeBody) → `Promise<LoyaltyScheme>`
|
|
7249
|
+
|
|
7250
|
+
**update**(collectionId: string,
|
|
7251
|
+
schemeId: string,
|
|
7252
|
+
body: UpdateLoyaltySchemeBody) → `Promise<LoyaltyScheme>`
|
|
7253
|
+
|
|
7254
|
+
**remove**(collectionId: string,
|
|
7255
|
+
schemeId: string) → `Promise<LoyaltyScheme>`
|
|
7256
|
+
|
|
7257
|
+
**listEarningRules**(collectionId: string,
|
|
7258
|
+
schemeId: string) → `Promise<LoyaltyEarningRule[]>`
|
|
7259
|
+
|
|
7260
|
+
**getEarningRule**(collectionId: string,
|
|
7261
|
+
schemeId: string,
|
|
7262
|
+
ruleId: string) → `Promise<LoyaltyEarningRule>`
|
|
7263
|
+
|
|
7264
|
+
**createEarningRule**(collectionId: string,
|
|
7265
|
+
schemeId: string,
|
|
7266
|
+
body: CreateLoyaltyEarningRuleBody) → `Promise<LoyaltyEarningRule>`
|
|
7267
|
+
|
|
7268
|
+
**updateEarningRule**(collectionId: string,
|
|
7269
|
+
schemeId: string,
|
|
7270
|
+
ruleId: string,
|
|
7271
|
+
body: UpdateLoyaltyEarningRuleBody) → `Promise<LoyaltyEarningRule>`
|
|
7272
|
+
|
|
7273
|
+
**removeEarningRule**(collectionId: string,
|
|
7274
|
+
schemeId: string,
|
|
7275
|
+
ruleId: string) → `Promise<LoyaltyEarningRule>`
|
|
7276
|
+
|
|
7277
|
+
**listMembers**(collectionId: string,
|
|
7278
|
+
schemeId: string,
|
|
7279
|
+
params: LoyaltyPaginationParams = {}) → `Promise<LoyaltyPaginatedResult<LoyaltyMember>>`
|
|
7280
|
+
|
|
7281
|
+
**getMember**(collectionId: string,
|
|
7282
|
+
schemeId: string,
|
|
7283
|
+
contactId: string) → `Promise<LoyaltyMember>`
|
|
7284
|
+
|
|
7285
|
+
**recordTransaction**(collectionId: string,
|
|
7286
|
+
schemeId: string,
|
|
7287
|
+
contactId: string,
|
|
7288
|
+
body: RecordLoyaltyTransactionBody) → `Promise<LoyaltyTransactionResult>`
|
|
7289
|
+
Manually award or deduct points for a contact. - `points` must be a non-zero integer - Positive = award, negative = deduct - Deducting below zero returns HTTP 422 `INSUFFICIENT_BALANCE` - Supply `idempotencyKey` to safely retry without double-crediting Points earned via interaction events are awarded automatically by the server — this endpoint is for manual adjustments and admin overrides.
|
|
7290
|
+
|
|
7291
|
+
**getMemberHistory**(collectionId: string,
|
|
7292
|
+
schemeId: string,
|
|
7293
|
+
contactId: string,
|
|
7294
|
+
params: LoyaltyPaginationParams = {}) → `Promise<LoyaltyPaginatedResult<LoyaltyTransaction>>`
|
|
7295
|
+
Manually award or deduct points for a contact. - `points` must be a non-zero integer - Positive = award, negative = deduct - Deducting below zero returns HTTP 422 `INSUFFICIENT_BALANCE` - Supply `idempotencyKey` to safely retry without double-crediting Points earned via interaction events are awarded automatically by the server — this endpoint is for manual adjustments and admin overrides.
|
|
7296
|
+
|
|
7297
|
+
**publicList**(collectionId: string) → `Promise<LoyaltyScheme[]>`
|
|
7298
|
+
List active schemes for a collection. No authentication required.
|
|
7299
|
+
|
|
7300
|
+
**publicGet**(collectionId: string,
|
|
7301
|
+
schemeId: string) → `Promise<LoyaltyScheme>`
|
|
7302
|
+
Get a single active scheme. No authentication required.
|
|
7303
|
+
|
|
7304
|
+
**publicListEarningRules**(collectionId: string,
|
|
7305
|
+
schemeId: string) → `Promise<LoyaltyEarningRule[]>`
|
|
7306
|
+
List active earning rules for a scheme — useful for showing "how to earn" in a loyalty UI. No authentication required.
|
|
7307
|
+
|
|
7308
|
+
**publicGetMe**(collectionId: string) → `Promise<LoyaltySchemeWithMembership[]>`
|
|
7309
|
+
Get all active schemes with the caller's membership embedded in each. This is the primary entry point for a loyalty widget — one call gives you everything needed to render a user's loyalty status across all programs in a collection. - Authenticated: `member` is populated with balance + lifetimePoints (or null if not yet enrolled in that scheme) - Unauthenticated: `member` is null on all schemes
|
|
7310
|
+
|
|
7311
|
+
**publicGetMine**(collectionId: string,
|
|
7312
|
+
schemeId: string) → `Promise<LoyaltyMember>`
|
|
7313
|
+
Get the authenticated caller's membership (balance + lifetimePoints) on a specific scheme. Requires authentication.
|
|
7314
|
+
|
|
7315
|
+
**publicGetMineHistory**(collectionId: string,
|
|
7316
|
+
schemeId: string,
|
|
7317
|
+
params: LoyaltyPaginationParams = {}) → `Promise<LoyaltyPaginatedResult<LoyaltyTransaction>>`
|
|
7318
|
+
Get the authenticated caller's transaction history on a specific scheme. Ordered newest first. Requires authentication.
|
|
7319
|
+
|
|
7067
7320
|
### models
|
|
7068
7321
|
|
|
7069
7322
|
**list**(collectionId: string, params?: AIModelListParams) → `Promise<AIModelListResponse>`
|