@encorekit/web-sdk 1.1.18 → 1.1.20
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/README.md +63 -3
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/umd/encore.min.js +1 -1
- package/dist/umd/encore.min.js.map +1 -1
- package/embed/README.md +1 -1
- package/examples/angular/src/app/app.component.ts +0 -1
- package/examples/angular/src/app/encore.service.ts +1 -2
- package/examples/ios-webview/EncoreWebViewBridge.swift +3 -10
- package/examples/ios-webview/README.md +0 -20
- package/examples/react/package.json +1 -1
- package/examples/react/src/App.tsx +14 -1
- package/examples/svelte/src/App.svelte +0 -2
- package/examples/vanilla-js/index.html +0 -2
- package/examples/vue/src/App.vue +0 -2
- package/package.json +10 -8
- package/types/analytics/AnalyticsClient.d.ts +11 -3
- package/types/analytics/AnalyticsClient.d.ts.map +1 -1
- package/types/analytics/events.d.ts +12 -1
- package/types/analytics/events.d.ts.map +1 -1
- package/types/analytics/models.d.ts +11 -8
- package/types/analytics/models.d.ts.map +1 -1
- package/types/analytics/transport.d.ts +23 -0
- package/types/analytics/transport.d.ts.map +1 -0
- package/types/api/APIClient.d.ts +1 -1
- package/types/api/APIClient.d.ts.map +1 -1
- package/types/api/contract.d.ts +32 -0
- package/types/api/contract.d.ts.map +1 -0
- package/types/api/generated/types.d.ts +4509 -0
- package/types/api/generated/types.d.ts.map +1 -0
- package/types/api/models.d.ts +45 -128
- package/types/api/models.d.ts.map +1 -1
- package/types/core/Configuration.d.ts +2 -2
- package/types/core/Configuration.d.ts.map +1 -1
- package/types/core/Encore.d.ts +87 -8
- package/types/core/Encore.d.ts.map +1 -1
- package/types/core/PlacementBuilder.d.ts +14 -9
- package/types/core/PlacementBuilder.d.ts.map +1 -1
- package/types/core/TransactionStore.d.ts +35 -0
- package/types/core/TransactionStore.d.ts.map +1 -0
- package/types/core/version.d.ts +1 -1
- package/types/experiments/ExperimentManager.d.ts +43 -0
- package/types/experiments/ExperimentManager.d.ts.map +1 -0
- package/types/experiments/ExposureOutbox.d.ts +37 -0
- package/types/experiments/ExposureOutbox.d.ts.map +1 -0
- package/types/experiments/bucketing.d.ts +33 -0
- package/types/experiments/bucketing.d.ts.map +1 -0
- package/types/experiments/types.d.ts +60 -0
- package/types/experiments/types.d.ts.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- package/types/react.d.ts +1 -3
- package/types/react.d.ts.map +1 -1
- package/types/types.d.ts +248 -9
- package/types/types.d.ts.map +1 -1
- package/types/ui/OfferCarousel.d.ts +14 -3
- package/types/ui/OfferCarousel.d.ts.map +1 -1
- package/types/ui/OfferModal.d.ts +6 -0
- package/types/ui/OfferModal.d.ts.map +1 -1
- package/types/ui/RedemptionScreen.d.ts +33 -0
- package/types/ui/RedemptionScreen.d.ts.map +1 -0
- package/types/ui/ThankYouLayout.d.ts +35 -0
- package/types/ui/ThankYouLayout.d.ts.map +1 -0
- package/types/ui/styles.d.ts.map +1 -1
- package/examples/react/.env.local +0 -1
- package/types/__tests__/react.test.d.ts +0 -2
- package/types/__tests__/react.test.d.ts.map +0 -1
- package/types/ui/SuccessScreen.d.ts +0 -33
- package/types/ui/SuccessScreen.d.ts.map +0 -1
|
@@ -0,0 +1,4509 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by openapi-typescript.
|
|
3
|
+
* Do not make direct changes to the file.
|
|
4
|
+
*/
|
|
5
|
+
export interface paths {
|
|
6
|
+
"/publisher/sdk/v1/offers": {
|
|
7
|
+
parameters: {
|
|
8
|
+
query?: never;
|
|
9
|
+
header?: never;
|
|
10
|
+
path?: never;
|
|
11
|
+
cookie?: never;
|
|
12
|
+
};
|
|
13
|
+
/** @description Get all available active offers/campaigns across all organizations */
|
|
14
|
+
get: {
|
|
15
|
+
parameters: {
|
|
16
|
+
query?: {
|
|
17
|
+
limit?: number;
|
|
18
|
+
offset?: number;
|
|
19
|
+
/** @description ISO 3166-1 alpha-2 country code (e.g., 'US', 'GB', 'CA'). If not provided, user country will be US. */
|
|
20
|
+
userCountry?: string;
|
|
21
|
+
/** @description SDK version in semver format (e.g., '1.2.3'). If not provided, SDK version will be 1.2.6. */
|
|
22
|
+
sdkVersion?: string;
|
|
23
|
+
/** @description Client platform: android, ios, or web. If not provided, platform will be ios. */
|
|
24
|
+
platform?: "android" | "ios" | "web";
|
|
25
|
+
/** @description Optional SDUI variant ID to filter creatives by variant assignment */
|
|
26
|
+
variantId?: string;
|
|
27
|
+
};
|
|
28
|
+
header?: never;
|
|
29
|
+
path?: never;
|
|
30
|
+
cookie?: never;
|
|
31
|
+
};
|
|
32
|
+
requestBody?: never;
|
|
33
|
+
responses: {
|
|
34
|
+
/** @description Default Response */
|
|
35
|
+
200: {
|
|
36
|
+
headers: {
|
|
37
|
+
[name: string]: unknown;
|
|
38
|
+
};
|
|
39
|
+
content: {
|
|
40
|
+
"application/json": {
|
|
41
|
+
success: boolean;
|
|
42
|
+
offers: {
|
|
43
|
+
/** Format: uuid */
|
|
44
|
+
id: string;
|
|
45
|
+
/** Format: uuid */
|
|
46
|
+
organizationId: string;
|
|
47
|
+
name: string;
|
|
48
|
+
/** @enum {string} */
|
|
49
|
+
payoutModel: "CPA" | "CPC" | "CPI" | "CPM";
|
|
50
|
+
payoutAmount: number;
|
|
51
|
+
/** @description Attribution platform (e.g., rakuten, impact, tune) */
|
|
52
|
+
attributionPlatform: string | null;
|
|
53
|
+
targetCountries: string[];
|
|
54
|
+
/**
|
|
55
|
+
* Format: uri
|
|
56
|
+
* @description Primary destination URL for the campaign
|
|
57
|
+
*/
|
|
58
|
+
destinationUrl: string;
|
|
59
|
+
/**
|
|
60
|
+
* Format: date-time
|
|
61
|
+
* @description UTC timestamp
|
|
62
|
+
*/
|
|
63
|
+
startDate: string;
|
|
64
|
+
/**
|
|
65
|
+
* Format: date-time
|
|
66
|
+
* @description UTC timestamp (null for ongoing)
|
|
67
|
+
*/
|
|
68
|
+
endDate: string | null;
|
|
69
|
+
/** @enum {string} */
|
|
70
|
+
status: "active" | "archived" | "awaiting_approval" | "completed" | "draft";
|
|
71
|
+
/**
|
|
72
|
+
* @description Current validation status of the destination URL
|
|
73
|
+
* @enum {string}
|
|
74
|
+
*/
|
|
75
|
+
linkStatus: "broken" | "error" | "text_mismatch" | "unchecked" | "valid";
|
|
76
|
+
/** @description Expected domain of the destination URL */
|
|
77
|
+
expectedDomain: string | null;
|
|
78
|
+
/** @description Internal campaign notes */
|
|
79
|
+
notes: string | null;
|
|
80
|
+
/** @description Publisher-facing notes about this offer */
|
|
81
|
+
publisherNotes: string | null;
|
|
82
|
+
priority: number | null;
|
|
83
|
+
/** @description When true, this campaign is auto-granted to every newly created app. Independent of priority (which controls ranking order only). */
|
|
84
|
+
defaultCatalog: boolean;
|
|
85
|
+
/**
|
|
86
|
+
* @description blacklist (default): all apps eligible; whitelist: only apps in campaign_allowed_apps are eligible
|
|
87
|
+
* @enum {string}
|
|
88
|
+
*/
|
|
89
|
+
targetingMode: "blacklist" | "whitelist";
|
|
90
|
+
/** @description New/discounted price for the offer */
|
|
91
|
+
newPrice: string | null;
|
|
92
|
+
/** @description Original price before discount */
|
|
93
|
+
oldPrice: string | null;
|
|
94
|
+
/** @description User-facing value proposition, e.g., "3 months of Hulu free". Rendered in the deal email. */
|
|
95
|
+
perk: string | null;
|
|
96
|
+
/**
|
|
97
|
+
* @description Constrained promo badge for in-app offer cards: free_trial | discount. Drives the card pill display AND client-side free-trial-vs-discount logic. Clients map the enum to display text + free-trial boolean. NULL means no badge.
|
|
98
|
+
* @enum {string|null}
|
|
99
|
+
*/
|
|
100
|
+
badgeLabel: "free_trial" | "discount" | null;
|
|
101
|
+
/** Format: date-time */
|
|
102
|
+
createdAt: string;
|
|
103
|
+
/** Format: date-time */
|
|
104
|
+
updatedAt: string;
|
|
105
|
+
/** @description Included when fetching with relations */
|
|
106
|
+
organization?: {
|
|
107
|
+
/** Format: uuid */
|
|
108
|
+
id: string;
|
|
109
|
+
name: string;
|
|
110
|
+
description: string | null;
|
|
111
|
+
url: string | null;
|
|
112
|
+
logoUrl: string | null;
|
|
113
|
+
/** Format: date-time */
|
|
114
|
+
createdAt: string;
|
|
115
|
+
/** Format: date-time */
|
|
116
|
+
updatedAt: string;
|
|
117
|
+
};
|
|
118
|
+
/** @description Included if includeCreatives=true */
|
|
119
|
+
creatives?: {
|
|
120
|
+
/** Format: uuid */
|
|
121
|
+
id: string;
|
|
122
|
+
/** Format: uuid */
|
|
123
|
+
campaignId: string;
|
|
124
|
+
name: string;
|
|
125
|
+
title: string;
|
|
126
|
+
subtitle: string | null;
|
|
127
|
+
description: string | null;
|
|
128
|
+
/** Format: uri */
|
|
129
|
+
primaryImageUrl: string;
|
|
130
|
+
/** Format: uri */
|
|
131
|
+
logoUrl: string | null;
|
|
132
|
+
additionalImages: string[] | null;
|
|
133
|
+
ctaText: string;
|
|
134
|
+
/**
|
|
135
|
+
* Format: uri
|
|
136
|
+
* @description Optional override for campaign destinationUrl
|
|
137
|
+
*/
|
|
138
|
+
destinationUrl: string | null;
|
|
139
|
+
trackingParameters: {
|
|
140
|
+
[key: string]: unknown;
|
|
141
|
+
} | null;
|
|
142
|
+
weight: number | null;
|
|
143
|
+
/** @enum {string} */
|
|
144
|
+
status: "active" | "archived" | "draft" | "paused";
|
|
145
|
+
instructions: {
|
|
146
|
+
title: string;
|
|
147
|
+
subtitle: string;
|
|
148
|
+
ctaButtonText?: string;
|
|
149
|
+
}[] | null;
|
|
150
|
+
/** @description Short, actionable phrases (max 1-3) that guide users. Examples: "sign up, create registry", "add to cart" */
|
|
151
|
+
quickInstructions: string | null;
|
|
152
|
+
/** @description Minimum SDK version required (null = no minimum) */
|
|
153
|
+
minSdkVersion: string | null;
|
|
154
|
+
/** @description Maximum SDK version supported (null = no maximum) */
|
|
155
|
+
maxSdkVersion: string | null;
|
|
156
|
+
/** @description Platforms this creative supports (empty = all platforms) */
|
|
157
|
+
supportedPlatforms: ("android" | "ios" | "web")[] | null;
|
|
158
|
+
/** @description Tooltip text to display on hover in Web SDK offer carousel (null = use default text) */
|
|
159
|
+
tooltipText: string | null;
|
|
160
|
+
/** @description Optional dynamic text overlay config. NULL = no overlay (legacy creatives). */
|
|
161
|
+
overlayConfig?: {
|
|
162
|
+
/** @enum {number} */
|
|
163
|
+
version: 1;
|
|
164
|
+
aspectRatio?: number;
|
|
165
|
+
overlays: {
|
|
166
|
+
id: string;
|
|
167
|
+
/** @description Template string resolved via SDUIContext.resolveTemplateText (e.g., '${premiumTierName}') */
|
|
168
|
+
template: string;
|
|
169
|
+
/** @description Top-left of the zone, as ratios of the rendered image */
|
|
170
|
+
position: {
|
|
171
|
+
x: number;
|
|
172
|
+
y: number;
|
|
173
|
+
};
|
|
174
|
+
dimensions: {
|
|
175
|
+
width: number;
|
|
176
|
+
height: number;
|
|
177
|
+
};
|
|
178
|
+
/**
|
|
179
|
+
* @description Horizontal alignment for wrapped text within the zone
|
|
180
|
+
* @enum {string}
|
|
181
|
+
*/
|
|
182
|
+
alignment: "leading" | "center" | "trailing";
|
|
183
|
+
typography: {
|
|
184
|
+
fontSizeRatio: number;
|
|
185
|
+
fontWeight: string;
|
|
186
|
+
color: {
|
|
187
|
+
hex: string;
|
|
188
|
+
} | {
|
|
189
|
+
semantic: string;
|
|
190
|
+
} | {
|
|
191
|
+
appearance: string;
|
|
192
|
+
};
|
|
193
|
+
lineHeight?: number;
|
|
194
|
+
letterSpacing?: number;
|
|
195
|
+
};
|
|
196
|
+
overflow?: {
|
|
197
|
+
minScaleFactor?: number;
|
|
198
|
+
maxLines?: number;
|
|
199
|
+
/** @enum {string} */
|
|
200
|
+
truncation?: "head" | "middle" | "tail" | "clip";
|
|
201
|
+
};
|
|
202
|
+
}[];
|
|
203
|
+
} | null;
|
|
204
|
+
/** Format: date-time */
|
|
205
|
+
createdAt: string;
|
|
206
|
+
/** Format: date-time */
|
|
207
|
+
updatedAt: string;
|
|
208
|
+
}[];
|
|
209
|
+
}[];
|
|
210
|
+
metadata: {
|
|
211
|
+
total: number;
|
|
212
|
+
limit: number;
|
|
213
|
+
offset: number;
|
|
214
|
+
hasMore: boolean;
|
|
215
|
+
};
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
};
|
|
219
|
+
/** @description Default Response */
|
|
220
|
+
500: {
|
|
221
|
+
headers: {
|
|
222
|
+
[name: string]: unknown;
|
|
223
|
+
};
|
|
224
|
+
content: {
|
|
225
|
+
"application/json": {
|
|
226
|
+
error: string;
|
|
227
|
+
details?: unknown;
|
|
228
|
+
};
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
};
|
|
232
|
+
};
|
|
233
|
+
put?: never;
|
|
234
|
+
post?: never;
|
|
235
|
+
delete?: never;
|
|
236
|
+
options?: never;
|
|
237
|
+
head?: never;
|
|
238
|
+
patch?: never;
|
|
239
|
+
trace?: never;
|
|
240
|
+
};
|
|
241
|
+
"/publisher/sdk/v1/offers/search": {
|
|
242
|
+
parameters: {
|
|
243
|
+
query?: never;
|
|
244
|
+
header?: never;
|
|
245
|
+
path?: never;
|
|
246
|
+
cookie?: never;
|
|
247
|
+
};
|
|
248
|
+
get?: never;
|
|
249
|
+
put?: never;
|
|
250
|
+
/** @description Search eligible offers for a user with pagination support. Campaigns and creatives are randomized for A/B testing using request_id. Performs abuse checks and returns available campaigns. */
|
|
251
|
+
post: {
|
|
252
|
+
parameters: {
|
|
253
|
+
query?: never;
|
|
254
|
+
header?: never;
|
|
255
|
+
path?: never;
|
|
256
|
+
cookie?: never;
|
|
257
|
+
};
|
|
258
|
+
requestBody: {
|
|
259
|
+
content: {
|
|
260
|
+
"application/json": {
|
|
261
|
+
userId: string;
|
|
262
|
+
/** @description Optional user attributes for offer selection */
|
|
263
|
+
attributes?: {
|
|
264
|
+
email?: string;
|
|
265
|
+
firstName?: string;
|
|
266
|
+
lastName?: string;
|
|
267
|
+
mobile?: string;
|
|
268
|
+
phoneNumber?: string;
|
|
269
|
+
postcode?: string;
|
|
270
|
+
postalCode?: string;
|
|
271
|
+
city?: string;
|
|
272
|
+
state?: string;
|
|
273
|
+
region?: string;
|
|
274
|
+
/** @description ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "CA"). */
|
|
275
|
+
countryCode?: string;
|
|
276
|
+
/** @description Decimal degrees as string (e.g., "37.7749") */
|
|
277
|
+
latitude?: string;
|
|
278
|
+
/** @description Decimal degrees as string (e.g., "-122.4194") */
|
|
279
|
+
longitude?: string;
|
|
280
|
+
dateOfBirth?: string;
|
|
281
|
+
gender?: string;
|
|
282
|
+
language?: string;
|
|
283
|
+
subscriptionTier?: string;
|
|
284
|
+
monthsSubscribed?: string;
|
|
285
|
+
billingCycle?: string;
|
|
286
|
+
lastPaymentAmount?: string;
|
|
287
|
+
lastActiveDate?: string;
|
|
288
|
+
totalSessions?: string;
|
|
289
|
+
custom?: {
|
|
290
|
+
[key: string]: string;
|
|
291
|
+
};
|
|
292
|
+
};
|
|
293
|
+
/**
|
|
294
|
+
* @description Number of campaigns to fetch (default: 10)
|
|
295
|
+
* @default 50
|
|
296
|
+
*/
|
|
297
|
+
limit?: number;
|
|
298
|
+
/**
|
|
299
|
+
* @description Pagination offset (default: 0)
|
|
300
|
+
* @default 0
|
|
301
|
+
*/
|
|
302
|
+
offset?: number;
|
|
303
|
+
/**
|
|
304
|
+
* Format: uuid
|
|
305
|
+
* @description Session ID for deterministic pagination - if not provided, server will generate one
|
|
306
|
+
*/
|
|
307
|
+
requestId?: string;
|
|
308
|
+
/** @description SDK version in semver format (e.g., "1.2.3") */
|
|
309
|
+
sdkVersion?: string;
|
|
310
|
+
/**
|
|
311
|
+
* @description Client platform: android, ios, or web
|
|
312
|
+
* @enum {string}
|
|
313
|
+
*/
|
|
314
|
+
platform?: "android" | "ios" | "web";
|
|
315
|
+
/**
|
|
316
|
+
* Format: uuid
|
|
317
|
+
* @description SDUI variant ID from frontend config fetch. If provided, filters creatives by variant assignment. If not provided, no variant filtering is applied.
|
|
318
|
+
*/
|
|
319
|
+
variantId?: string;
|
|
320
|
+
/** @description Strict unlock mode: only include campaigns whose postback latency is less than or equal to this value (in milliseconds). Omit for no filtering. Bounded 1000..120000. */
|
|
321
|
+
maxPostbackTimeMs?: number;
|
|
322
|
+
};
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
responses: {
|
|
326
|
+
/** @description Default Response */
|
|
327
|
+
200: {
|
|
328
|
+
headers: {
|
|
329
|
+
[name: string]: unknown;
|
|
330
|
+
};
|
|
331
|
+
content: {
|
|
332
|
+
"application/json": {
|
|
333
|
+
success: boolean;
|
|
334
|
+
offers: {
|
|
335
|
+
/** Format: uuid */
|
|
336
|
+
id: string;
|
|
337
|
+
/** Format: uuid */
|
|
338
|
+
organizationId: string;
|
|
339
|
+
name: string;
|
|
340
|
+
/** @enum {string} */
|
|
341
|
+
payoutModel: "CPA" | "CPC" | "CPI" | "CPM";
|
|
342
|
+
payoutAmount: number;
|
|
343
|
+
/** @description Attribution platform (e.g., rakuten, impact, tune) */
|
|
344
|
+
attributionPlatform: string | null;
|
|
345
|
+
targetCountries: string[];
|
|
346
|
+
/**
|
|
347
|
+
* Format: uri
|
|
348
|
+
* @description Primary destination URL for the campaign
|
|
349
|
+
*/
|
|
350
|
+
destinationUrl: string;
|
|
351
|
+
/**
|
|
352
|
+
* Format: date-time
|
|
353
|
+
* @description UTC timestamp
|
|
354
|
+
*/
|
|
355
|
+
startDate: string;
|
|
356
|
+
/**
|
|
357
|
+
* Format: date-time
|
|
358
|
+
* @description UTC timestamp (null for ongoing)
|
|
359
|
+
*/
|
|
360
|
+
endDate: string | null;
|
|
361
|
+
/** @enum {string} */
|
|
362
|
+
status: "active" | "archived" | "awaiting_approval" | "completed" | "draft";
|
|
363
|
+
/**
|
|
364
|
+
* @description Current validation status of the destination URL
|
|
365
|
+
* @enum {string}
|
|
366
|
+
*/
|
|
367
|
+
linkStatus: "broken" | "error" | "text_mismatch" | "unchecked" | "valid";
|
|
368
|
+
/** @description Expected domain of the destination URL */
|
|
369
|
+
expectedDomain: string | null;
|
|
370
|
+
/** @description Internal campaign notes */
|
|
371
|
+
notes: string | null;
|
|
372
|
+
/** @description Publisher-facing notes about this offer */
|
|
373
|
+
publisherNotes: string | null;
|
|
374
|
+
priority: number | null;
|
|
375
|
+
/** @description When true, this campaign is auto-granted to every newly created app. Independent of priority (which controls ranking order only). */
|
|
376
|
+
defaultCatalog: boolean;
|
|
377
|
+
/**
|
|
378
|
+
* @description blacklist (default): all apps eligible; whitelist: only apps in campaign_allowed_apps are eligible
|
|
379
|
+
* @enum {string}
|
|
380
|
+
*/
|
|
381
|
+
targetingMode: "blacklist" | "whitelist";
|
|
382
|
+
/** @description New/discounted price for the offer */
|
|
383
|
+
newPrice: string | null;
|
|
384
|
+
/** @description Original price before discount */
|
|
385
|
+
oldPrice: string | null;
|
|
386
|
+
/** @description User-facing value proposition, e.g., "3 months of Hulu free". Rendered in the deal email. */
|
|
387
|
+
perk: string | null;
|
|
388
|
+
/**
|
|
389
|
+
* @description Constrained promo badge for in-app offer cards: free_trial | discount. Drives the card pill display AND client-side free-trial-vs-discount logic. Clients map the enum to display text + free-trial boolean. NULL means no badge.
|
|
390
|
+
* @enum {string|null}
|
|
391
|
+
*/
|
|
392
|
+
badgeLabel: "free_trial" | "discount" | null;
|
|
393
|
+
/** Format: date-time */
|
|
394
|
+
createdAt: string;
|
|
395
|
+
/** Format: date-time */
|
|
396
|
+
updatedAt: string;
|
|
397
|
+
/** @description Included when fetching with relations */
|
|
398
|
+
organization?: {
|
|
399
|
+
/** Format: uuid */
|
|
400
|
+
id: string;
|
|
401
|
+
name: string;
|
|
402
|
+
description: string | null;
|
|
403
|
+
url: string | null;
|
|
404
|
+
logoUrl: string | null;
|
|
405
|
+
/** Format: date-time */
|
|
406
|
+
createdAt: string;
|
|
407
|
+
/** Format: date-time */
|
|
408
|
+
updatedAt: string;
|
|
409
|
+
};
|
|
410
|
+
/** @description Included if includeCreatives=true */
|
|
411
|
+
creatives?: {
|
|
412
|
+
/** Format: uuid */
|
|
413
|
+
id: string;
|
|
414
|
+
/** Format: uuid */
|
|
415
|
+
campaignId: string;
|
|
416
|
+
name: string;
|
|
417
|
+
title: string;
|
|
418
|
+
subtitle: string | null;
|
|
419
|
+
description: string | null;
|
|
420
|
+
/** Format: uri */
|
|
421
|
+
primaryImageUrl: string;
|
|
422
|
+
/** Format: uri */
|
|
423
|
+
logoUrl: string | null;
|
|
424
|
+
additionalImages: string[] | null;
|
|
425
|
+
ctaText: string;
|
|
426
|
+
/**
|
|
427
|
+
* Format: uri
|
|
428
|
+
* @description Optional override for campaign destinationUrl
|
|
429
|
+
*/
|
|
430
|
+
destinationUrl: string | null;
|
|
431
|
+
trackingParameters: {
|
|
432
|
+
[key: string]: unknown;
|
|
433
|
+
} | null;
|
|
434
|
+
weight: number | null;
|
|
435
|
+
/** @enum {string} */
|
|
436
|
+
status: "active" | "archived" | "draft" | "paused";
|
|
437
|
+
instructions: {
|
|
438
|
+
title: string;
|
|
439
|
+
subtitle: string;
|
|
440
|
+
ctaButtonText?: string;
|
|
441
|
+
}[] | null;
|
|
442
|
+
/** @description Short, actionable phrases (max 1-3) that guide users. Examples: "sign up, create registry", "add to cart" */
|
|
443
|
+
quickInstructions: string | null;
|
|
444
|
+
/** @description Minimum SDK version required (null = no minimum) */
|
|
445
|
+
minSdkVersion: string | null;
|
|
446
|
+
/** @description Maximum SDK version supported (null = no maximum) */
|
|
447
|
+
maxSdkVersion: string | null;
|
|
448
|
+
/** @description Platforms this creative supports (empty = all platforms) */
|
|
449
|
+
supportedPlatforms: ("android" | "ios" | "web")[] | null;
|
|
450
|
+
/** @description Tooltip text to display on hover in Web SDK offer carousel (null = use default text) */
|
|
451
|
+
tooltipText: string | null;
|
|
452
|
+
/** @description Optional dynamic text overlay config. NULL = no overlay (legacy creatives). */
|
|
453
|
+
overlayConfig?: {
|
|
454
|
+
/** @enum {number} */
|
|
455
|
+
version: 1;
|
|
456
|
+
aspectRatio?: number;
|
|
457
|
+
overlays: {
|
|
458
|
+
id: string;
|
|
459
|
+
/** @description Template string resolved via SDUIContext.resolveTemplateText (e.g., '${premiumTierName}') */
|
|
460
|
+
template: string;
|
|
461
|
+
/** @description Top-left of the zone, as ratios of the rendered image */
|
|
462
|
+
position: {
|
|
463
|
+
x: number;
|
|
464
|
+
y: number;
|
|
465
|
+
};
|
|
466
|
+
dimensions: {
|
|
467
|
+
width: number;
|
|
468
|
+
height: number;
|
|
469
|
+
};
|
|
470
|
+
/**
|
|
471
|
+
* @description Horizontal alignment for wrapped text within the zone
|
|
472
|
+
* @enum {string}
|
|
473
|
+
*/
|
|
474
|
+
alignment: "leading" | "center" | "trailing";
|
|
475
|
+
typography: {
|
|
476
|
+
fontSizeRatio: number;
|
|
477
|
+
fontWeight: string;
|
|
478
|
+
color: {
|
|
479
|
+
hex: string;
|
|
480
|
+
} | {
|
|
481
|
+
semantic: string;
|
|
482
|
+
} | {
|
|
483
|
+
appearance: string;
|
|
484
|
+
};
|
|
485
|
+
lineHeight?: number;
|
|
486
|
+
letterSpacing?: number;
|
|
487
|
+
};
|
|
488
|
+
overflow?: {
|
|
489
|
+
minScaleFactor?: number;
|
|
490
|
+
maxLines?: number;
|
|
491
|
+
/** @enum {string} */
|
|
492
|
+
truncation?: "head" | "middle" | "tail" | "clip";
|
|
493
|
+
};
|
|
494
|
+
}[];
|
|
495
|
+
} | null;
|
|
496
|
+
/** Format: date-time */
|
|
497
|
+
createdAt: string;
|
|
498
|
+
/** Format: date-time */
|
|
499
|
+
updatedAt: string;
|
|
500
|
+
}[];
|
|
501
|
+
}[];
|
|
502
|
+
metadata: {
|
|
503
|
+
/** @description Total offers available */
|
|
504
|
+
total: number;
|
|
505
|
+
limit: number;
|
|
506
|
+
offset: number;
|
|
507
|
+
/** @description Whether there are more offers available */
|
|
508
|
+
hasMore: boolean;
|
|
509
|
+
executionTimeMs: number;
|
|
510
|
+
/**
|
|
511
|
+
* Format: uuid
|
|
512
|
+
* @description Session ID used for randomization - use this for subsequent pagination requests
|
|
513
|
+
*/
|
|
514
|
+
requestId: string;
|
|
515
|
+
};
|
|
516
|
+
/** @description Resolved locale served in this response (language-only, e.g. 'es'). Absent on pre-localization responses. */
|
|
517
|
+
locale?: string;
|
|
518
|
+
error?: string | null;
|
|
519
|
+
};
|
|
520
|
+
};
|
|
521
|
+
};
|
|
522
|
+
/** @description Default Response */
|
|
523
|
+
401: {
|
|
524
|
+
headers: {
|
|
525
|
+
[name: string]: unknown;
|
|
526
|
+
};
|
|
527
|
+
content: {
|
|
528
|
+
"application/json": {
|
|
529
|
+
error: string;
|
|
530
|
+
details?: unknown;
|
|
531
|
+
};
|
|
532
|
+
};
|
|
533
|
+
};
|
|
534
|
+
/** @description Default Response */
|
|
535
|
+
409: {
|
|
536
|
+
headers: {
|
|
537
|
+
[name: string]: unknown;
|
|
538
|
+
};
|
|
539
|
+
content: {
|
|
540
|
+
"application/json": {
|
|
541
|
+
error: string;
|
|
542
|
+
details?: unknown;
|
|
543
|
+
};
|
|
544
|
+
};
|
|
545
|
+
};
|
|
546
|
+
/** @description Default Response */
|
|
547
|
+
500: {
|
|
548
|
+
headers: {
|
|
549
|
+
[name: string]: unknown;
|
|
550
|
+
};
|
|
551
|
+
content: {
|
|
552
|
+
"application/json": {
|
|
553
|
+
error: string;
|
|
554
|
+
details?: unknown;
|
|
555
|
+
};
|
|
556
|
+
};
|
|
557
|
+
};
|
|
558
|
+
};
|
|
559
|
+
};
|
|
560
|
+
delete?: never;
|
|
561
|
+
options?: never;
|
|
562
|
+
head?: never;
|
|
563
|
+
patch?: never;
|
|
564
|
+
trace?: never;
|
|
565
|
+
};
|
|
566
|
+
"/publisher/sdk/v1/offers/catalog": {
|
|
567
|
+
parameters: {
|
|
568
|
+
query?: never;
|
|
569
|
+
header?: never;
|
|
570
|
+
path?: never;
|
|
571
|
+
cookie?: never;
|
|
572
|
+
};
|
|
573
|
+
get?: never;
|
|
574
|
+
put?: never;
|
|
575
|
+
/** @description Rebrokering catalog: the full set of offers your app may serve to a given end user, to render on your own surface. Two hard, server-enforced filters always apply: entitlement (your app's opt-outs + whitelist) and geo (offers not redeemable in the end user's country are dropped — non-redeemable offers are never returned). Serve path requires `userId` (a stable end-user identifier) and geo (`countryCode`, or the end user's IP forwarded via X-Forwarded-For); missing either is a 400. Each returned creative carries a tokenized `clickUrl` — route the end user there on tap and it records an attributed transaction (bound to your app, the offer, the creative, and the userId) then 302s to the advertiser. Filter to your curated offer IDs and order CLIENT-SIDE, falling back to other returned offers so your surface is never empty (the server does not narrow to your picks). Set `includeAllRegions: true` for config-time discovery of your full addressable inventory (skips geo, needs no userId, returns no clickUrls; each offer carries targetCountries) — not for display. Authentication: publishable key (X-API-Key: pk_live_* / pk_test_*). */
|
|
576
|
+
post: {
|
|
577
|
+
parameters: {
|
|
578
|
+
query?: never;
|
|
579
|
+
header?: never;
|
|
580
|
+
path?: never;
|
|
581
|
+
cookie?: never;
|
|
582
|
+
};
|
|
583
|
+
requestBody?: {
|
|
584
|
+
content: {
|
|
585
|
+
"application/json": {
|
|
586
|
+
/** @description Stable identifier for the END USER you are rendering offers to (any opaque string; does not need to be PII). REQUIRED on the serve path — it is bound into each offer's clickUrl so a click records a transaction attributed to (your app, the offer, the creative, this user), and it drives per-user fraud controls (trial caps, retake blocking) at click time. Use the same value across renders for the same user. Not required when includeAllRegions is set (config mode returns no clickUrls). */
|
|
587
|
+
userId?: string;
|
|
588
|
+
/** @description Optional identifier for the operator/sub-publisher on whose behalf offers are shown. Carried through as an analytics dimension. Defaults to userId when omitted. */
|
|
589
|
+
clientId?: string;
|
|
590
|
+
/** @description ISO 3166-1 alpha-2 country code of the END USER the offers will be shown to (e.g. "US", "GB"). Provides the geography signal for geo-filtering. Resolution: this value → client IP (X-Forwarded-For aware) → (rejected if neither resolves). Send it when calling server-to-server without forwarding the end user's IP; omit it when the end user (or a proxy forwarding their IP) is the caller. Ignored when includeAllRegions is true. */
|
|
591
|
+
countryCode?: string;
|
|
592
|
+
/** @description CONFIG-TIME ONLY. When true, skips geo-filtering and returns the full addressable inventory for your app (entitlement still applies), with each offer's targetCountries — use this to build your curation. Do NOT use for offers displayed to an end user; those must come from a geo-scoped request (countryCode or forwarded IP). When true, no geography signal is required and countryCode is ignored. */
|
|
593
|
+
includeAllRegions?: boolean;
|
|
594
|
+
/** @description Optional page size (1..100). OMIT to return ALL eligible offers (the default) — catalogs are small enough that you normally take the whole set and curate client-side. Provide only if you want to page (with offset). */
|
|
595
|
+
limit?: number;
|
|
596
|
+
/**
|
|
597
|
+
* @description Pagination offset (default 0). Only meaningful together with limit.
|
|
598
|
+
* @default 0
|
|
599
|
+
*/
|
|
600
|
+
offset?: number;
|
|
601
|
+
};
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
responses: {
|
|
605
|
+
/** @description Default Response */
|
|
606
|
+
200: {
|
|
607
|
+
headers: {
|
|
608
|
+
[name: string]: unknown;
|
|
609
|
+
};
|
|
610
|
+
content: {
|
|
611
|
+
"application/json": {
|
|
612
|
+
success: boolean;
|
|
613
|
+
/** @description Offers this app is entitled to and (unless includeAllRegions) that are redeemable in the resolved end-user country, each with the default (control-variant) active creatives — never experiment-reserved ones. On serve responses each creative carries a `clickUrl` for attribution. Filter to your curated IDs and order client-side; fall back within this set so your surface is never empty. */
|
|
614
|
+
offers: {
|
|
615
|
+
/** Format: uuid */
|
|
616
|
+
id: string;
|
|
617
|
+
name: string;
|
|
618
|
+
/** @description User-facing value proposition, e.g., "3 months of Hulu free". Rendered in the deal email. */
|
|
619
|
+
perk: string | null;
|
|
620
|
+
/**
|
|
621
|
+
* @description Constrained promo badge for in-app offer cards: free_trial | discount. Drives the card pill display AND client-side free-trial-vs-discount logic. Clients map the enum to display text + free-trial boolean. NULL means no badge.
|
|
622
|
+
* @enum {string|null}
|
|
623
|
+
*/
|
|
624
|
+
badgeLabel: "free_trial" | "discount" | null;
|
|
625
|
+
/** @description Original price before discount */
|
|
626
|
+
oldPrice: string | null;
|
|
627
|
+
/** @description New/discounted price for the offer */
|
|
628
|
+
newPrice: string | null;
|
|
629
|
+
targetCountries: string[];
|
|
630
|
+
organization?: {
|
|
631
|
+
/** Format: uuid */
|
|
632
|
+
id: string;
|
|
633
|
+
name: string;
|
|
634
|
+
description: string | null;
|
|
635
|
+
url: string | null;
|
|
636
|
+
logoUrl: string | null;
|
|
637
|
+
};
|
|
638
|
+
creatives?: {
|
|
639
|
+
/** Format: uuid */
|
|
640
|
+
id: string;
|
|
641
|
+
title: string;
|
|
642
|
+
subtitle: string | null;
|
|
643
|
+
description: string | null;
|
|
644
|
+
/** Format: uri */
|
|
645
|
+
primaryImageUrl: string;
|
|
646
|
+
/** Format: uri */
|
|
647
|
+
logoUrl: string | null;
|
|
648
|
+
additionalImages: string[] | null;
|
|
649
|
+
ctaText: string;
|
|
650
|
+
/** @description Platforms this creative supports (empty = all platforms) */
|
|
651
|
+
supportedPlatforms: ("android" | "ios" | "web")[] | null;
|
|
652
|
+
/**
|
|
653
|
+
* Format: uri
|
|
654
|
+
* @description Tokenized click URL for THIS creative. Send the end user here when they tap the offer: it records a transaction attributed to (your app, this offer, this creative, the userId you supplied) and 302-redirects to the advertiser with the transaction id substituted. Treat it as opaque, do not modify it. Present on serve responses; absent when includeAllRegions is set.
|
|
655
|
+
*/
|
|
656
|
+
clickUrl?: string;
|
|
657
|
+
}[];
|
|
658
|
+
}[];
|
|
659
|
+
metadata: {
|
|
660
|
+
/** @description Total offers matching after entitlement + geo filtering (before pagination). */
|
|
661
|
+
total: number;
|
|
662
|
+
limit: number;
|
|
663
|
+
offset: number;
|
|
664
|
+
/** @description Whether more offers remain beyond this page. */
|
|
665
|
+
hasMore: boolean;
|
|
666
|
+
};
|
|
667
|
+
/** @description Resolved locale served in this response (language-only, e.g. 'es'). */
|
|
668
|
+
locale?: string;
|
|
669
|
+
};
|
|
670
|
+
};
|
|
671
|
+
};
|
|
672
|
+
/** @description Default Response */
|
|
673
|
+
400: {
|
|
674
|
+
headers: {
|
|
675
|
+
[name: string]: unknown;
|
|
676
|
+
};
|
|
677
|
+
content: {
|
|
678
|
+
"application/json": {
|
|
679
|
+
error: string;
|
|
680
|
+
details?: unknown;
|
|
681
|
+
};
|
|
682
|
+
};
|
|
683
|
+
};
|
|
684
|
+
/** @description Default Response */
|
|
685
|
+
401: {
|
|
686
|
+
headers: {
|
|
687
|
+
[name: string]: unknown;
|
|
688
|
+
};
|
|
689
|
+
content: {
|
|
690
|
+
"application/json": {
|
|
691
|
+
error: string;
|
|
692
|
+
details?: unknown;
|
|
693
|
+
};
|
|
694
|
+
};
|
|
695
|
+
};
|
|
696
|
+
/** @description Default Response */
|
|
697
|
+
500: {
|
|
698
|
+
headers: {
|
|
699
|
+
[name: string]: unknown;
|
|
700
|
+
};
|
|
701
|
+
content: {
|
|
702
|
+
"application/json": {
|
|
703
|
+
error: string;
|
|
704
|
+
details?: unknown;
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
};
|
|
709
|
+
};
|
|
710
|
+
delete?: never;
|
|
711
|
+
options?: never;
|
|
712
|
+
head?: never;
|
|
713
|
+
patch?: never;
|
|
714
|
+
trace?: never;
|
|
715
|
+
};
|
|
716
|
+
"/publisher/sdk/v1/offers/message": {
|
|
717
|
+
parameters: {
|
|
718
|
+
query?: never;
|
|
719
|
+
header?: never;
|
|
720
|
+
path?: never;
|
|
721
|
+
cookie?: never;
|
|
722
|
+
};
|
|
723
|
+
get?: never;
|
|
724
|
+
put?: never;
|
|
725
|
+
/** @description Select one eligible offer for a third-party messaging surface (WhatsApp, Messenger, Instagram) and return the raw offer fields — the branded short clickUrl plus context (title, description, imageUrl, advertiserName, perk) — so the integrator composes their own message. Authentication: publishable key (X-API-Key: pk_live_* / pk_test_*). Retries are NOT deduplicated server-side (no retry-stable client key on the request), so each call produces a distinct short link and analytics row. */
|
|
726
|
+
post: {
|
|
727
|
+
parameters: {
|
|
728
|
+
query?: never;
|
|
729
|
+
header?: never;
|
|
730
|
+
path?: never;
|
|
731
|
+
cookie?: never;
|
|
732
|
+
};
|
|
733
|
+
requestBody: {
|
|
734
|
+
content: {
|
|
735
|
+
"application/json": {
|
|
736
|
+
/** @description Stable identifier for the integrator-client (the business / operator the message is being sent on behalf of). Carried through as an analytics dimension so impressions, clicks, and conversions can be broken down per client. */
|
|
737
|
+
clientId: string;
|
|
738
|
+
/** @description Conversation / thread identifier on the messaging platform. Used as the messaging-surface userId — drives bandit seeding for `/offers/message`, the transaction created at click time, and the userId dimension on the click event. */
|
|
739
|
+
chatId: string;
|
|
740
|
+
/** @description Required targeting attributes — country / language / platform. */
|
|
741
|
+
attributes: {
|
|
742
|
+
/** @description ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "CA"). */
|
|
743
|
+
countryCode: string;
|
|
744
|
+
/** @description BCP 47 language tag — drives creative locale resolution (e.g., 'en', 'es'). */
|
|
745
|
+
language: string;
|
|
746
|
+
/**
|
|
747
|
+
* @description Recipient's device platform — drives creative compatibility filtering.
|
|
748
|
+
* @enum {string}
|
|
749
|
+
*/
|
|
750
|
+
platform: "android" | "ios" | "web";
|
|
751
|
+
};
|
|
752
|
+
};
|
|
753
|
+
};
|
|
754
|
+
};
|
|
755
|
+
responses: {
|
|
756
|
+
/** @description Default Response */
|
|
757
|
+
200: {
|
|
758
|
+
headers: {
|
|
759
|
+
[name: string]: unknown;
|
|
760
|
+
};
|
|
761
|
+
content: {
|
|
762
|
+
"application/json": {
|
|
763
|
+
/** @enum {boolean} */
|
|
764
|
+
success: true;
|
|
765
|
+
/** @description Selected offer details — the branded short clickUrl plus context fields — for the integrator to compose and send their own message, or null when no eligible offer was found. No message is composed server-side. */
|
|
766
|
+
offer: {
|
|
767
|
+
/**
|
|
768
|
+
* Format: uri
|
|
769
|
+
* @description Branded short click URL (https://link.encorekit.com/<slug>) that 302s to the advertiser with attribution. Short enough to send as raw text on messaging surfaces.
|
|
770
|
+
*/
|
|
771
|
+
clickUrl: string;
|
|
772
|
+
/** @description Creative headline/title for the offer. */
|
|
773
|
+
title: string;
|
|
774
|
+
/** @description Longer creative description, or null when the creative has none. */
|
|
775
|
+
description: string | null;
|
|
776
|
+
/**
|
|
777
|
+
* Format: uri
|
|
778
|
+
* @description Primary creative image URL.
|
|
779
|
+
*/
|
|
780
|
+
imageUrl: string;
|
|
781
|
+
/** @description Display name of the advertiser (organization) behind the offer. */
|
|
782
|
+
advertiserName: string;
|
|
783
|
+
/** @description Campaign value proposition (e.g. "3 months of Apple Music free"), or null when the campaign has none. Surfaced explicitly so integrators can render the deal in the message they compose. */
|
|
784
|
+
perk?: string | null;
|
|
785
|
+
/**
|
|
786
|
+
* @description Constrained promo badge for the in-app offer card: "free_trial" | "discount", or null when the campaign has none. Distinct from perk (longer value proposition). Clients map the enum to display text ("Free trial" / "Discount") and free-trial-vs-discount logic. Surfaced additively.
|
|
787
|
+
* @enum {string|null}
|
|
788
|
+
*/
|
|
789
|
+
badgeLabel: "free_trial" | "discount" | null;
|
|
790
|
+
} | null;
|
|
791
|
+
};
|
|
792
|
+
};
|
|
793
|
+
};
|
|
794
|
+
/** @description Default Response */
|
|
795
|
+
401: {
|
|
796
|
+
headers: {
|
|
797
|
+
[name: string]: unknown;
|
|
798
|
+
};
|
|
799
|
+
content: {
|
|
800
|
+
"application/json": {
|
|
801
|
+
error: string;
|
|
802
|
+
details?: unknown;
|
|
803
|
+
};
|
|
804
|
+
};
|
|
805
|
+
};
|
|
806
|
+
/** @description Default Response */
|
|
807
|
+
409: {
|
|
808
|
+
headers: {
|
|
809
|
+
[name: string]: unknown;
|
|
810
|
+
};
|
|
811
|
+
content: {
|
|
812
|
+
"application/json": {
|
|
813
|
+
error: string;
|
|
814
|
+
details?: unknown;
|
|
815
|
+
};
|
|
816
|
+
};
|
|
817
|
+
};
|
|
818
|
+
/** @description Default Response */
|
|
819
|
+
500: {
|
|
820
|
+
headers: {
|
|
821
|
+
[name: string]: unknown;
|
|
822
|
+
};
|
|
823
|
+
content: {
|
|
824
|
+
"application/json": {
|
|
825
|
+
error: string;
|
|
826
|
+
details?: unknown;
|
|
827
|
+
};
|
|
828
|
+
};
|
|
829
|
+
};
|
|
830
|
+
};
|
|
831
|
+
};
|
|
832
|
+
delete?: never;
|
|
833
|
+
options?: never;
|
|
834
|
+
head?: never;
|
|
835
|
+
patch?: never;
|
|
836
|
+
trace?: never;
|
|
837
|
+
};
|
|
838
|
+
"/publisher/sdk/v1/offers/feed": {
|
|
839
|
+
parameters: {
|
|
840
|
+
query?: never;
|
|
841
|
+
header?: never;
|
|
842
|
+
path?: never;
|
|
843
|
+
cookie?: never;
|
|
844
|
+
};
|
|
845
|
+
get?: never;
|
|
846
|
+
put?: never;
|
|
847
|
+
/** @description Return the bandit-ranked eligible offers for a user (up to `limit`, default 10) so a native / custom-UI app can render them and cycle through them client-side. Each offer carries its own impressionUid plus the branded short clickUrl and context (title, description, imageUrl, additionalImages, advertiserName, advertiserLogo, perk). Calling this endpoint is NOT itself the impression — the server emits one offer.requested per offer as the served baseline; confirm an actual impression by calling POST /offers/impressions/:impression_uid/delivered when an offer is shown. Returns offers:[] when no eligible offer was found. Authentication: publishable key (X-API-Key: pk_live_* / pk_test_*). */
|
|
848
|
+
post: {
|
|
849
|
+
parameters: {
|
|
850
|
+
query?: never;
|
|
851
|
+
header?: never;
|
|
852
|
+
path?: never;
|
|
853
|
+
cookie?: never;
|
|
854
|
+
};
|
|
855
|
+
requestBody: {
|
|
856
|
+
content: {
|
|
857
|
+
"application/json": {
|
|
858
|
+
/** @description Stable identifier for the integrator-client (the business / operator the offer is rendered on behalf of). Carried through as an analytics dimension so impressions, clicks, and conversions can be broken down per client. */
|
|
859
|
+
clientId: string;
|
|
860
|
+
/** @description End-user identifier on the partner surface. Used as the bandit-seeding userId for ranking and as the userId on the transaction created at click time. */
|
|
861
|
+
userId: string;
|
|
862
|
+
/** @description Required targeting attributes — country / language / platform. */
|
|
863
|
+
attributes: {
|
|
864
|
+
/** @description ISO 3166-1 alpha-2 country code (e.g., "US", "GB", "CA"). */
|
|
865
|
+
countryCode: string;
|
|
866
|
+
/** @description BCP 47 language tag — drives creative locale resolution (e.g., 'en', 'es'). */
|
|
867
|
+
language: string;
|
|
868
|
+
/**
|
|
869
|
+
* @description Recipient's device platform — drives creative compatibility filtering.
|
|
870
|
+
* @enum {string}
|
|
871
|
+
*/
|
|
872
|
+
platform: "android" | "ios" | "web";
|
|
873
|
+
};
|
|
874
|
+
/**
|
|
875
|
+
* @description Maximum number of offers to return (1–25, default 10). The client controls display order and cycles through them one at a time.
|
|
876
|
+
* @default 10
|
|
877
|
+
*/
|
|
878
|
+
limit?: number;
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
};
|
|
882
|
+
responses: {
|
|
883
|
+
/** @description Default Response */
|
|
884
|
+
200: {
|
|
885
|
+
headers: {
|
|
886
|
+
[name: string]: unknown;
|
|
887
|
+
};
|
|
888
|
+
content: {
|
|
889
|
+
"application/json": {
|
|
890
|
+
/** @enum {boolean} */
|
|
891
|
+
success: true;
|
|
892
|
+
/** @description The bandit-ranked eligible offers for the user (up to `limit`), each with its own impressionUid and branded short clickUrl. Empty array when no eligible offer was found. */
|
|
893
|
+
offers: {
|
|
894
|
+
/** @description Per-offer impression id. Pass this to POST /offers/impressions/:impression_uid/delivered when this offer is actually shown to the user to record the impression. */
|
|
895
|
+
impressionUid: string;
|
|
896
|
+
/**
|
|
897
|
+
* Format: uri
|
|
898
|
+
* @description Branded short click URL (https://link.encorekit.com/<slug>) that 302s to the advertiser with attribution. Open it in-app to register the click; also usable as a share-to-friend link.
|
|
899
|
+
*/
|
|
900
|
+
clickUrl: string;
|
|
901
|
+
/** @description Creative headline/title for the offer. */
|
|
902
|
+
title: string;
|
|
903
|
+
/** @description Longer creative description, or null when the creative has none. */
|
|
904
|
+
description: string | null;
|
|
905
|
+
/**
|
|
906
|
+
* Format: uri
|
|
907
|
+
* @description Primary creative image URL.
|
|
908
|
+
*/
|
|
909
|
+
imageUrl: string;
|
|
910
|
+
/**
|
|
911
|
+
* @description Additional creative image URLs (may be empty). Supplements the primary imageUrl.
|
|
912
|
+
* @default []
|
|
913
|
+
*/
|
|
914
|
+
additionalImages: string[];
|
|
915
|
+
/** @description Display name of the advertiser (organization) behind the offer. */
|
|
916
|
+
advertiserName: string;
|
|
917
|
+
/**
|
|
918
|
+
* Format: uri
|
|
919
|
+
* @description Advertiser (organization) logo URL for rendering the brand mark, or null when the advertiser has no logo set.
|
|
920
|
+
*/
|
|
921
|
+
advertiserLogo: string | null;
|
|
922
|
+
/** @description Campaign value proposition (e.g. "3 months of Apple Music free"), or null when the campaign has none. */
|
|
923
|
+
perk?: string | null;
|
|
924
|
+
/**
|
|
925
|
+
* @description Constrained promo badge for the in-app offer card: "free_trial" | "discount", or null when the campaign has none. Clients map the enum to display text ("Free trial" / "Discount") and free-trial-vs-discount logic.
|
|
926
|
+
* @enum {string|null}
|
|
927
|
+
*/
|
|
928
|
+
badgeLabel: "free_trial" | "discount" | null;
|
|
929
|
+
}[];
|
|
930
|
+
};
|
|
931
|
+
};
|
|
932
|
+
};
|
|
933
|
+
/** @description Default Response */
|
|
934
|
+
401: {
|
|
935
|
+
headers: {
|
|
936
|
+
[name: string]: unknown;
|
|
937
|
+
};
|
|
938
|
+
content: {
|
|
939
|
+
"application/json": {
|
|
940
|
+
error: string;
|
|
941
|
+
details?: unknown;
|
|
942
|
+
};
|
|
943
|
+
};
|
|
944
|
+
};
|
|
945
|
+
/** @description Default Response */
|
|
946
|
+
409: {
|
|
947
|
+
headers: {
|
|
948
|
+
[name: string]: unknown;
|
|
949
|
+
};
|
|
950
|
+
content: {
|
|
951
|
+
"application/json": {
|
|
952
|
+
error: string;
|
|
953
|
+
details?: unknown;
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
};
|
|
957
|
+
/** @description Default Response */
|
|
958
|
+
500: {
|
|
959
|
+
headers: {
|
|
960
|
+
[name: string]: unknown;
|
|
961
|
+
};
|
|
962
|
+
content: {
|
|
963
|
+
"application/json": {
|
|
964
|
+
error: string;
|
|
965
|
+
details?: unknown;
|
|
966
|
+
};
|
|
967
|
+
};
|
|
968
|
+
};
|
|
969
|
+
};
|
|
970
|
+
};
|
|
971
|
+
delete?: never;
|
|
972
|
+
options?: never;
|
|
973
|
+
head?: never;
|
|
974
|
+
patch?: never;
|
|
975
|
+
trace?: never;
|
|
976
|
+
};
|
|
977
|
+
"/publisher/sdk/v1/offers/impressions/{impression_uid}/delivered": {
|
|
978
|
+
parameters: {
|
|
979
|
+
query?: never;
|
|
980
|
+
header?: never;
|
|
981
|
+
path?: never;
|
|
982
|
+
cookie?: never;
|
|
983
|
+
};
|
|
984
|
+
get?: never;
|
|
985
|
+
put?: never;
|
|
986
|
+
/** @description Record that a previously selected offer (impression) was actually shown to the end user — confirming an impression. Used by both the messaging surface (/offers/message) and the multi-offer feed (/offers/feed, called once per offer as it is displayed). Emits `offer.delivered`; analytics joins to `offer.requested` by impression_uid downstream. Authentication: publishable key (X-API-Key: pk_live_* / pk_test_*). */
|
|
987
|
+
post: {
|
|
988
|
+
parameters: {
|
|
989
|
+
query?: never;
|
|
990
|
+
header?: never;
|
|
991
|
+
path: {
|
|
992
|
+
/** @description The per-offer `impressionUid` returned by POST /offers/feed. A UUID. */
|
|
993
|
+
impression_uid: string;
|
|
994
|
+
};
|
|
995
|
+
cookie?: never;
|
|
996
|
+
};
|
|
997
|
+
requestBody: {
|
|
998
|
+
content: {
|
|
999
|
+
"application/json": {
|
|
1000
|
+
/** @description Unix seconds — Meta webhook `statuses[].timestamp` where status='delivered'. */
|
|
1001
|
+
deliveredTimestamp: number;
|
|
1002
|
+
/** @description Unix seconds — Meta webhook `statuses[].timestamp` where status='read'. Optional. */
|
|
1003
|
+
readTimestamp?: number;
|
|
1004
|
+
};
|
|
1005
|
+
};
|
|
1006
|
+
};
|
|
1007
|
+
responses: {
|
|
1008
|
+
/** @description Default Response */
|
|
1009
|
+
202: {
|
|
1010
|
+
headers: {
|
|
1011
|
+
[name: string]: unknown;
|
|
1012
|
+
};
|
|
1013
|
+
content: {
|
|
1014
|
+
"application/json": {
|
|
1015
|
+
/** @enum {boolean} */
|
|
1016
|
+
success: true;
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
1019
|
+
};
|
|
1020
|
+
/** @description Default Response */
|
|
1021
|
+
400: {
|
|
1022
|
+
headers: {
|
|
1023
|
+
[name: string]: unknown;
|
|
1024
|
+
};
|
|
1025
|
+
content: {
|
|
1026
|
+
"application/json": {
|
|
1027
|
+
error: string;
|
|
1028
|
+
details?: unknown;
|
|
1029
|
+
};
|
|
1030
|
+
};
|
|
1031
|
+
};
|
|
1032
|
+
/** @description Default Response */
|
|
1033
|
+
401: {
|
|
1034
|
+
headers: {
|
|
1035
|
+
[name: string]: unknown;
|
|
1036
|
+
};
|
|
1037
|
+
content: {
|
|
1038
|
+
"application/json": {
|
|
1039
|
+
error: string;
|
|
1040
|
+
details?: unknown;
|
|
1041
|
+
};
|
|
1042
|
+
};
|
|
1043
|
+
};
|
|
1044
|
+
/** @description Default Response */
|
|
1045
|
+
500: {
|
|
1046
|
+
headers: {
|
|
1047
|
+
[name: string]: unknown;
|
|
1048
|
+
};
|
|
1049
|
+
content: {
|
|
1050
|
+
"application/json": {
|
|
1051
|
+
error: string;
|
|
1052
|
+
details?: unknown;
|
|
1053
|
+
};
|
|
1054
|
+
};
|
|
1055
|
+
};
|
|
1056
|
+
};
|
|
1057
|
+
};
|
|
1058
|
+
delete?: never;
|
|
1059
|
+
options?: never;
|
|
1060
|
+
head?: never;
|
|
1061
|
+
patch?: never;
|
|
1062
|
+
trace?: never;
|
|
1063
|
+
};
|
|
1064
|
+
"/publisher/sdk/v1/transactions": {
|
|
1065
|
+
parameters: {
|
|
1066
|
+
query?: never;
|
|
1067
|
+
header?: never;
|
|
1068
|
+
path?: never;
|
|
1069
|
+
cookie?: never;
|
|
1070
|
+
};
|
|
1071
|
+
get?: never;
|
|
1072
|
+
put?: never;
|
|
1073
|
+
/** @description Create a new transaction for a specific campaign */
|
|
1074
|
+
post: {
|
|
1075
|
+
parameters: {
|
|
1076
|
+
query?: never;
|
|
1077
|
+
header?: never;
|
|
1078
|
+
path?: never;
|
|
1079
|
+
cookie?: never;
|
|
1080
|
+
};
|
|
1081
|
+
requestBody: {
|
|
1082
|
+
content: {
|
|
1083
|
+
"application/json": {
|
|
1084
|
+
campaignId: string;
|
|
1085
|
+
userId: string;
|
|
1086
|
+
};
|
|
1087
|
+
};
|
|
1088
|
+
};
|
|
1089
|
+
responses: {
|
|
1090
|
+
/** @description Default Response */
|
|
1091
|
+
200: {
|
|
1092
|
+
headers: {
|
|
1093
|
+
[name: string]: unknown;
|
|
1094
|
+
};
|
|
1095
|
+
content: {
|
|
1096
|
+
"application/json": {
|
|
1097
|
+
success: boolean;
|
|
1098
|
+
/**
|
|
1099
|
+
* Format: uuid
|
|
1100
|
+
* @description Created transaction ID
|
|
1101
|
+
*/
|
|
1102
|
+
transactionId?: string;
|
|
1103
|
+
/** @description Generated advertiser SDK token */
|
|
1104
|
+
token?: string;
|
|
1105
|
+
/**
|
|
1106
|
+
* Format: date-time
|
|
1107
|
+
* @description When token expires
|
|
1108
|
+
*/
|
|
1109
|
+
expiresAt?: string;
|
|
1110
|
+
/** @description Domain where token can be activated */
|
|
1111
|
+
allowedDomain?: string;
|
|
1112
|
+
error?: string | null;
|
|
1113
|
+
};
|
|
1114
|
+
};
|
|
1115
|
+
};
|
|
1116
|
+
/** @description Default Response */
|
|
1117
|
+
400: {
|
|
1118
|
+
headers: {
|
|
1119
|
+
[name: string]: unknown;
|
|
1120
|
+
};
|
|
1121
|
+
content: {
|
|
1122
|
+
"application/json": {
|
|
1123
|
+
error: string;
|
|
1124
|
+
details?: unknown;
|
|
1125
|
+
};
|
|
1126
|
+
};
|
|
1127
|
+
};
|
|
1128
|
+
/** @description Default Response */
|
|
1129
|
+
401: {
|
|
1130
|
+
headers: {
|
|
1131
|
+
[name: string]: unknown;
|
|
1132
|
+
};
|
|
1133
|
+
content: {
|
|
1134
|
+
"application/json": {
|
|
1135
|
+
error: string;
|
|
1136
|
+
details?: unknown;
|
|
1137
|
+
};
|
|
1138
|
+
};
|
|
1139
|
+
};
|
|
1140
|
+
/** @description Default Response */
|
|
1141
|
+
404: {
|
|
1142
|
+
headers: {
|
|
1143
|
+
[name: string]: unknown;
|
|
1144
|
+
};
|
|
1145
|
+
content: {
|
|
1146
|
+
"application/json": {
|
|
1147
|
+
error: string;
|
|
1148
|
+
details?: unknown;
|
|
1149
|
+
};
|
|
1150
|
+
};
|
|
1151
|
+
};
|
|
1152
|
+
/** @description Default Response */
|
|
1153
|
+
409: {
|
|
1154
|
+
headers: {
|
|
1155
|
+
[name: string]: unknown;
|
|
1156
|
+
};
|
|
1157
|
+
content: {
|
|
1158
|
+
"application/json": {
|
|
1159
|
+
error: string;
|
|
1160
|
+
details?: unknown;
|
|
1161
|
+
};
|
|
1162
|
+
};
|
|
1163
|
+
};
|
|
1164
|
+
/** @description Default Response */
|
|
1165
|
+
500: {
|
|
1166
|
+
headers: {
|
|
1167
|
+
[name: string]: unknown;
|
|
1168
|
+
};
|
|
1169
|
+
content: {
|
|
1170
|
+
"application/json": {
|
|
1171
|
+
error: string;
|
|
1172
|
+
details?: unknown;
|
|
1173
|
+
};
|
|
1174
|
+
};
|
|
1175
|
+
};
|
|
1176
|
+
};
|
|
1177
|
+
};
|
|
1178
|
+
delete?: never;
|
|
1179
|
+
options?: never;
|
|
1180
|
+
head?: never;
|
|
1181
|
+
patch?: never;
|
|
1182
|
+
trace?: never;
|
|
1183
|
+
};
|
|
1184
|
+
"/publisher/sdk/v1/transactions/{transactionId}/signals": {
|
|
1185
|
+
parameters: {
|
|
1186
|
+
query?: never;
|
|
1187
|
+
header?: never;
|
|
1188
|
+
path?: never;
|
|
1189
|
+
cookie?: never;
|
|
1190
|
+
};
|
|
1191
|
+
get?: never;
|
|
1192
|
+
put?: never;
|
|
1193
|
+
/** @description Send a grant signal (provisional or final). Must be idempotent. */
|
|
1194
|
+
post: {
|
|
1195
|
+
parameters: {
|
|
1196
|
+
query?: never;
|
|
1197
|
+
header?: never;
|
|
1198
|
+
path: {
|
|
1199
|
+
transactionId: string;
|
|
1200
|
+
};
|
|
1201
|
+
cookie?: never;
|
|
1202
|
+
};
|
|
1203
|
+
requestBody: {
|
|
1204
|
+
content: {
|
|
1205
|
+
"application/json": {
|
|
1206
|
+
/**
|
|
1207
|
+
* @description Type of grant to apply
|
|
1208
|
+
* @enum {string}
|
|
1209
|
+
*/
|
|
1210
|
+
grantType: "provisional" | "final";
|
|
1211
|
+
};
|
|
1212
|
+
};
|
|
1213
|
+
};
|
|
1214
|
+
responses: {
|
|
1215
|
+
/** @description Default Response */
|
|
1216
|
+
200: {
|
|
1217
|
+
headers: {
|
|
1218
|
+
[name: string]: unknown;
|
|
1219
|
+
};
|
|
1220
|
+
content: {
|
|
1221
|
+
"application/json": {
|
|
1222
|
+
success: boolean;
|
|
1223
|
+
error?: string | null;
|
|
1224
|
+
};
|
|
1225
|
+
};
|
|
1226
|
+
};
|
|
1227
|
+
/** @description Default Response */
|
|
1228
|
+
400: {
|
|
1229
|
+
headers: {
|
|
1230
|
+
[name: string]: unknown;
|
|
1231
|
+
};
|
|
1232
|
+
content: {
|
|
1233
|
+
"application/json": {
|
|
1234
|
+
error: string;
|
|
1235
|
+
details?: unknown;
|
|
1236
|
+
};
|
|
1237
|
+
};
|
|
1238
|
+
};
|
|
1239
|
+
/** @description Default Response */
|
|
1240
|
+
401: {
|
|
1241
|
+
headers: {
|
|
1242
|
+
[name: string]: unknown;
|
|
1243
|
+
};
|
|
1244
|
+
content: {
|
|
1245
|
+
"application/json": {
|
|
1246
|
+
error: string;
|
|
1247
|
+
details?: unknown;
|
|
1248
|
+
};
|
|
1249
|
+
};
|
|
1250
|
+
};
|
|
1251
|
+
/** @description Default Response */
|
|
1252
|
+
404: {
|
|
1253
|
+
headers: {
|
|
1254
|
+
[name: string]: unknown;
|
|
1255
|
+
};
|
|
1256
|
+
content: {
|
|
1257
|
+
"application/json": {
|
|
1258
|
+
error: string;
|
|
1259
|
+
details?: unknown;
|
|
1260
|
+
};
|
|
1261
|
+
};
|
|
1262
|
+
};
|
|
1263
|
+
/** @description Default Response */
|
|
1264
|
+
409: {
|
|
1265
|
+
headers: {
|
|
1266
|
+
[name: string]: unknown;
|
|
1267
|
+
};
|
|
1268
|
+
content: {
|
|
1269
|
+
"application/json": {
|
|
1270
|
+
error: string;
|
|
1271
|
+
details?: unknown;
|
|
1272
|
+
};
|
|
1273
|
+
};
|
|
1274
|
+
};
|
|
1275
|
+
/** @description Default Response */
|
|
1276
|
+
500: {
|
|
1277
|
+
headers: {
|
|
1278
|
+
[name: string]: unknown;
|
|
1279
|
+
};
|
|
1280
|
+
content: {
|
|
1281
|
+
"application/json": {
|
|
1282
|
+
error: string;
|
|
1283
|
+
details?: unknown;
|
|
1284
|
+
};
|
|
1285
|
+
};
|
|
1286
|
+
};
|
|
1287
|
+
};
|
|
1288
|
+
};
|
|
1289
|
+
delete?: never;
|
|
1290
|
+
options?: never;
|
|
1291
|
+
head?: never;
|
|
1292
|
+
patch?: never;
|
|
1293
|
+
trace?: never;
|
|
1294
|
+
};
|
|
1295
|
+
"/publisher/sdk/v1/transactions/{transactionId}/status": {
|
|
1296
|
+
parameters: {
|
|
1297
|
+
query?: never;
|
|
1298
|
+
header?: never;
|
|
1299
|
+
path?: never;
|
|
1300
|
+
cookie?: never;
|
|
1301
|
+
};
|
|
1302
|
+
/** @description Get verification status for a transaction. Pass verify=true to actively fetch from the advertiser before returning. */
|
|
1303
|
+
get: {
|
|
1304
|
+
parameters: {
|
|
1305
|
+
query?: {
|
|
1306
|
+
/** @description When true, actively fetch from the advertiser platform before returning status. Default false returns the current DB state. */
|
|
1307
|
+
verify?: boolean;
|
|
1308
|
+
};
|
|
1309
|
+
header?: never;
|
|
1310
|
+
path: {
|
|
1311
|
+
transactionId: string;
|
|
1312
|
+
};
|
|
1313
|
+
cookie?: never;
|
|
1314
|
+
};
|
|
1315
|
+
requestBody?: never;
|
|
1316
|
+
responses: {
|
|
1317
|
+
/** @description Default Response */
|
|
1318
|
+
200: {
|
|
1319
|
+
headers: {
|
|
1320
|
+
[name: string]: unknown;
|
|
1321
|
+
};
|
|
1322
|
+
content: {
|
|
1323
|
+
"application/json": {
|
|
1324
|
+
success: boolean;
|
|
1325
|
+
/**
|
|
1326
|
+
* @description Transaction status
|
|
1327
|
+
* @enum {string|null}
|
|
1328
|
+
*/
|
|
1329
|
+
status: "pending_conversion" | "provisional_granted" | "verified" | "final_granted" | "expired" | "failed" | null;
|
|
1330
|
+
error?: string | null;
|
|
1331
|
+
};
|
|
1332
|
+
};
|
|
1333
|
+
};
|
|
1334
|
+
/** @description Default Response */
|
|
1335
|
+
401: {
|
|
1336
|
+
headers: {
|
|
1337
|
+
[name: string]: unknown;
|
|
1338
|
+
};
|
|
1339
|
+
content: {
|
|
1340
|
+
"application/json": {
|
|
1341
|
+
error: string;
|
|
1342
|
+
details?: unknown;
|
|
1343
|
+
};
|
|
1344
|
+
};
|
|
1345
|
+
};
|
|
1346
|
+
/** @description Default Response */
|
|
1347
|
+
404: {
|
|
1348
|
+
headers: {
|
|
1349
|
+
[name: string]: unknown;
|
|
1350
|
+
};
|
|
1351
|
+
content: {
|
|
1352
|
+
"application/json": {
|
|
1353
|
+
error: string;
|
|
1354
|
+
details?: unknown;
|
|
1355
|
+
};
|
|
1356
|
+
};
|
|
1357
|
+
};
|
|
1358
|
+
/** @description Default Response */
|
|
1359
|
+
500: {
|
|
1360
|
+
headers: {
|
|
1361
|
+
[name: string]: unknown;
|
|
1362
|
+
};
|
|
1363
|
+
content: {
|
|
1364
|
+
"application/json": {
|
|
1365
|
+
error: string;
|
|
1366
|
+
details?: unknown;
|
|
1367
|
+
};
|
|
1368
|
+
};
|
|
1369
|
+
};
|
|
1370
|
+
};
|
|
1371
|
+
};
|
|
1372
|
+
put?: never;
|
|
1373
|
+
post?: never;
|
|
1374
|
+
delete?: never;
|
|
1375
|
+
options?: never;
|
|
1376
|
+
head?: never;
|
|
1377
|
+
patch?: never;
|
|
1378
|
+
trace?: never;
|
|
1379
|
+
};
|
|
1380
|
+
"/publisher/sdk/v1/entitlements/revoke": {
|
|
1381
|
+
parameters: {
|
|
1382
|
+
query?: never;
|
|
1383
|
+
header?: never;
|
|
1384
|
+
path?: never;
|
|
1385
|
+
cookie?: never;
|
|
1386
|
+
};
|
|
1387
|
+
get?: never;
|
|
1388
|
+
put?: never;
|
|
1389
|
+
/** @description Revoke all entitlements for a user. Sets revoked_at timestamp on all transactions with entitlements. Useful for testing. */
|
|
1390
|
+
post: {
|
|
1391
|
+
parameters: {
|
|
1392
|
+
query?: never;
|
|
1393
|
+
header?: never;
|
|
1394
|
+
path?: never;
|
|
1395
|
+
cookie?: never;
|
|
1396
|
+
};
|
|
1397
|
+
requestBody: {
|
|
1398
|
+
content: {
|
|
1399
|
+
"application/json": {
|
|
1400
|
+
userId: string;
|
|
1401
|
+
};
|
|
1402
|
+
};
|
|
1403
|
+
};
|
|
1404
|
+
responses: {
|
|
1405
|
+
/** @description Default Response */
|
|
1406
|
+
200: {
|
|
1407
|
+
headers: {
|
|
1408
|
+
[name: string]: unknown;
|
|
1409
|
+
};
|
|
1410
|
+
content: {
|
|
1411
|
+
"application/json": {
|
|
1412
|
+
success: boolean;
|
|
1413
|
+
/** @description Provisional entitlements (temporary, require conversion) */
|
|
1414
|
+
provisional: {
|
|
1415
|
+
/** @description Free trial entitlement details */
|
|
1416
|
+
freeTrial?: {
|
|
1417
|
+
/**
|
|
1418
|
+
* Format: date-time
|
|
1419
|
+
* @description Start date of the entitlement (ISO8601)
|
|
1420
|
+
*/
|
|
1421
|
+
startedAt: string | null;
|
|
1422
|
+
/**
|
|
1423
|
+
* Format: date-time
|
|
1424
|
+
* @description Expiration date (ISO8601)
|
|
1425
|
+
*/
|
|
1426
|
+
expiresAt: string | null;
|
|
1427
|
+
};
|
|
1428
|
+
/** @description Available discount entitlements */
|
|
1429
|
+
discounts?: {
|
|
1430
|
+
/** @description Discount value */
|
|
1431
|
+
value: number;
|
|
1432
|
+
/**
|
|
1433
|
+
* @description Discount unit
|
|
1434
|
+
* @enum {string}
|
|
1435
|
+
*/
|
|
1436
|
+
unit: "percent" | "dollars";
|
|
1437
|
+
/**
|
|
1438
|
+
* Format: date-time
|
|
1439
|
+
* @description Expiration date (ISO8601)
|
|
1440
|
+
*/
|
|
1441
|
+
expiresAt: string | null;
|
|
1442
|
+
}[];
|
|
1443
|
+
/** @description Available credit entitlements */
|
|
1444
|
+
credits?: {
|
|
1445
|
+
/** @description Total credit amount */
|
|
1446
|
+
totalAmount: number;
|
|
1447
|
+
/**
|
|
1448
|
+
* Format: date-time
|
|
1449
|
+
* @description Expiration date (ISO8601)
|
|
1450
|
+
*/
|
|
1451
|
+
expiresAt: string | null;
|
|
1452
|
+
};
|
|
1453
|
+
};
|
|
1454
|
+
/** @description Verified entitlements (permanent, earned through conversion) */
|
|
1455
|
+
verified: {
|
|
1456
|
+
/** @description Free trial entitlement details */
|
|
1457
|
+
freeTrial?: {
|
|
1458
|
+
/**
|
|
1459
|
+
* Format: date-time
|
|
1460
|
+
* @description Start date of the entitlement (ISO8601)
|
|
1461
|
+
*/
|
|
1462
|
+
startedAt: string | null;
|
|
1463
|
+
/**
|
|
1464
|
+
* Format: date-time
|
|
1465
|
+
* @description Expiration date (ISO8601)
|
|
1466
|
+
*/
|
|
1467
|
+
expiresAt: string | null;
|
|
1468
|
+
};
|
|
1469
|
+
/** @description Available discount entitlements */
|
|
1470
|
+
discounts?: {
|
|
1471
|
+
/** @description Discount value */
|
|
1472
|
+
value: number;
|
|
1473
|
+
/**
|
|
1474
|
+
* @description Discount unit
|
|
1475
|
+
* @enum {string}
|
|
1476
|
+
*/
|
|
1477
|
+
unit: "percent" | "dollars";
|
|
1478
|
+
/**
|
|
1479
|
+
* Format: date-time
|
|
1480
|
+
* @description Expiration date (ISO8601)
|
|
1481
|
+
*/
|
|
1482
|
+
expiresAt: string | null;
|
|
1483
|
+
}[];
|
|
1484
|
+
/** @description Available credit entitlements */
|
|
1485
|
+
credits?: {
|
|
1486
|
+
/** @description Total credit amount */
|
|
1487
|
+
totalAmount: number;
|
|
1488
|
+
/**
|
|
1489
|
+
* Format: date-time
|
|
1490
|
+
* @description Expiration date (ISO8601)
|
|
1491
|
+
*/
|
|
1492
|
+
expiresAt: string | null;
|
|
1493
|
+
};
|
|
1494
|
+
};
|
|
1495
|
+
/** @description All accumulated entitlements (combines verified + provisional with full original values) */
|
|
1496
|
+
all: {
|
|
1497
|
+
/** @description Free trial entitlement details */
|
|
1498
|
+
freeTrial?: {
|
|
1499
|
+
/**
|
|
1500
|
+
* Format: date-time
|
|
1501
|
+
* @description Start date of the entitlement (ISO8601)
|
|
1502
|
+
*/
|
|
1503
|
+
startedAt: string | null;
|
|
1504
|
+
/**
|
|
1505
|
+
* Format: date-time
|
|
1506
|
+
* @description Expiration date (ISO8601)
|
|
1507
|
+
*/
|
|
1508
|
+
expiresAt: string | null;
|
|
1509
|
+
};
|
|
1510
|
+
/** @description Available discount entitlements */
|
|
1511
|
+
discounts?: {
|
|
1512
|
+
/** @description Discount value */
|
|
1513
|
+
value: number;
|
|
1514
|
+
/**
|
|
1515
|
+
* @description Discount unit
|
|
1516
|
+
* @enum {string}
|
|
1517
|
+
*/
|
|
1518
|
+
unit: "percent" | "dollars";
|
|
1519
|
+
/**
|
|
1520
|
+
* Format: date-time
|
|
1521
|
+
* @description Expiration date (ISO8601)
|
|
1522
|
+
*/
|
|
1523
|
+
expiresAt: string | null;
|
|
1524
|
+
}[];
|
|
1525
|
+
/** @description Available credit entitlements */
|
|
1526
|
+
credits?: {
|
|
1527
|
+
/** @description Total credit amount */
|
|
1528
|
+
totalAmount: number;
|
|
1529
|
+
/**
|
|
1530
|
+
* Format: date-time
|
|
1531
|
+
* @description Expiration date (ISO8601)
|
|
1532
|
+
*/
|
|
1533
|
+
expiresAt: string | null;
|
|
1534
|
+
};
|
|
1535
|
+
};
|
|
1536
|
+
/** @description Request execution time in milliseconds */
|
|
1537
|
+
executionTimeMs: number;
|
|
1538
|
+
};
|
|
1539
|
+
};
|
|
1540
|
+
};
|
|
1541
|
+
/** @description Default Response */
|
|
1542
|
+
400: {
|
|
1543
|
+
headers: {
|
|
1544
|
+
[name: string]: unknown;
|
|
1545
|
+
};
|
|
1546
|
+
content: {
|
|
1547
|
+
"application/json": {
|
|
1548
|
+
error: string;
|
|
1549
|
+
details?: unknown;
|
|
1550
|
+
};
|
|
1551
|
+
};
|
|
1552
|
+
};
|
|
1553
|
+
/** @description Default Response */
|
|
1554
|
+
401: {
|
|
1555
|
+
headers: {
|
|
1556
|
+
[name: string]: unknown;
|
|
1557
|
+
};
|
|
1558
|
+
content: {
|
|
1559
|
+
"application/json": {
|
|
1560
|
+
error: string;
|
|
1561
|
+
details?: unknown;
|
|
1562
|
+
};
|
|
1563
|
+
};
|
|
1564
|
+
};
|
|
1565
|
+
/** @description Default Response */
|
|
1566
|
+
500: {
|
|
1567
|
+
headers: {
|
|
1568
|
+
[name: string]: unknown;
|
|
1569
|
+
};
|
|
1570
|
+
content: {
|
|
1571
|
+
"application/json": {
|
|
1572
|
+
error: string;
|
|
1573
|
+
details?: unknown;
|
|
1574
|
+
};
|
|
1575
|
+
};
|
|
1576
|
+
};
|
|
1577
|
+
};
|
|
1578
|
+
};
|
|
1579
|
+
delete?: never;
|
|
1580
|
+
options?: never;
|
|
1581
|
+
head?: never;
|
|
1582
|
+
patch?: never;
|
|
1583
|
+
trace?: never;
|
|
1584
|
+
};
|
|
1585
|
+
"/publisher/sdk/v1/entitlements": {
|
|
1586
|
+
parameters: {
|
|
1587
|
+
query?: never;
|
|
1588
|
+
header?: never;
|
|
1589
|
+
path?: never;
|
|
1590
|
+
cookie?: never;
|
|
1591
|
+
};
|
|
1592
|
+
/** @description Get accumulated entitlements for a user, separated by provisional and verified status */
|
|
1593
|
+
get: {
|
|
1594
|
+
parameters: {
|
|
1595
|
+
query: {
|
|
1596
|
+
userId: string;
|
|
1597
|
+
};
|
|
1598
|
+
header?: never;
|
|
1599
|
+
path?: never;
|
|
1600
|
+
cookie?: never;
|
|
1601
|
+
};
|
|
1602
|
+
requestBody?: never;
|
|
1603
|
+
responses: {
|
|
1604
|
+
/** @description Default Response */
|
|
1605
|
+
200: {
|
|
1606
|
+
headers: {
|
|
1607
|
+
[name: string]: unknown;
|
|
1608
|
+
};
|
|
1609
|
+
content: {
|
|
1610
|
+
"application/json": {
|
|
1611
|
+
success: boolean;
|
|
1612
|
+
/** @description Provisional entitlements (temporary, require conversion) */
|
|
1613
|
+
provisional: {
|
|
1614
|
+
/** @description Free trial entitlement details */
|
|
1615
|
+
freeTrial?: {
|
|
1616
|
+
/**
|
|
1617
|
+
* Format: date-time
|
|
1618
|
+
* @description Start date of the entitlement (ISO8601)
|
|
1619
|
+
*/
|
|
1620
|
+
startedAt: string | null;
|
|
1621
|
+
/**
|
|
1622
|
+
* Format: date-time
|
|
1623
|
+
* @description Expiration date (ISO8601)
|
|
1624
|
+
*/
|
|
1625
|
+
expiresAt: string | null;
|
|
1626
|
+
};
|
|
1627
|
+
/** @description Available discount entitlements */
|
|
1628
|
+
discounts?: {
|
|
1629
|
+
/** @description Discount value */
|
|
1630
|
+
value: number;
|
|
1631
|
+
/**
|
|
1632
|
+
* @description Discount unit
|
|
1633
|
+
* @enum {string}
|
|
1634
|
+
*/
|
|
1635
|
+
unit: "percent" | "dollars";
|
|
1636
|
+
/**
|
|
1637
|
+
* Format: date-time
|
|
1638
|
+
* @description Expiration date (ISO8601)
|
|
1639
|
+
*/
|
|
1640
|
+
expiresAt: string | null;
|
|
1641
|
+
}[];
|
|
1642
|
+
/** @description Available credit entitlements */
|
|
1643
|
+
credits?: {
|
|
1644
|
+
/** @description Total credit amount */
|
|
1645
|
+
totalAmount: number;
|
|
1646
|
+
/**
|
|
1647
|
+
* Format: date-time
|
|
1648
|
+
* @description Expiration date (ISO8601)
|
|
1649
|
+
*/
|
|
1650
|
+
expiresAt: string | null;
|
|
1651
|
+
};
|
|
1652
|
+
};
|
|
1653
|
+
/** @description Verified entitlements (permanent, earned through conversion) */
|
|
1654
|
+
verified: {
|
|
1655
|
+
/** @description Free trial entitlement details */
|
|
1656
|
+
freeTrial?: {
|
|
1657
|
+
/**
|
|
1658
|
+
* Format: date-time
|
|
1659
|
+
* @description Start date of the entitlement (ISO8601)
|
|
1660
|
+
*/
|
|
1661
|
+
startedAt: string | null;
|
|
1662
|
+
/**
|
|
1663
|
+
* Format: date-time
|
|
1664
|
+
* @description Expiration date (ISO8601)
|
|
1665
|
+
*/
|
|
1666
|
+
expiresAt: string | null;
|
|
1667
|
+
};
|
|
1668
|
+
/** @description Available discount entitlements */
|
|
1669
|
+
discounts?: {
|
|
1670
|
+
/** @description Discount value */
|
|
1671
|
+
value: number;
|
|
1672
|
+
/**
|
|
1673
|
+
* @description Discount unit
|
|
1674
|
+
* @enum {string}
|
|
1675
|
+
*/
|
|
1676
|
+
unit: "percent" | "dollars";
|
|
1677
|
+
/**
|
|
1678
|
+
* Format: date-time
|
|
1679
|
+
* @description Expiration date (ISO8601)
|
|
1680
|
+
*/
|
|
1681
|
+
expiresAt: string | null;
|
|
1682
|
+
}[];
|
|
1683
|
+
/** @description Available credit entitlements */
|
|
1684
|
+
credits?: {
|
|
1685
|
+
/** @description Total credit amount */
|
|
1686
|
+
totalAmount: number;
|
|
1687
|
+
/**
|
|
1688
|
+
* Format: date-time
|
|
1689
|
+
* @description Expiration date (ISO8601)
|
|
1690
|
+
*/
|
|
1691
|
+
expiresAt: string | null;
|
|
1692
|
+
};
|
|
1693
|
+
};
|
|
1694
|
+
/** @description All accumulated entitlements (combines verified + provisional with full original values) */
|
|
1695
|
+
all: {
|
|
1696
|
+
/** @description Free trial entitlement details */
|
|
1697
|
+
freeTrial?: {
|
|
1698
|
+
/**
|
|
1699
|
+
* Format: date-time
|
|
1700
|
+
* @description Start date of the entitlement (ISO8601)
|
|
1701
|
+
*/
|
|
1702
|
+
startedAt: string | null;
|
|
1703
|
+
/**
|
|
1704
|
+
* Format: date-time
|
|
1705
|
+
* @description Expiration date (ISO8601)
|
|
1706
|
+
*/
|
|
1707
|
+
expiresAt: string | null;
|
|
1708
|
+
};
|
|
1709
|
+
/** @description Available discount entitlements */
|
|
1710
|
+
discounts?: {
|
|
1711
|
+
/** @description Discount value */
|
|
1712
|
+
value: number;
|
|
1713
|
+
/**
|
|
1714
|
+
* @description Discount unit
|
|
1715
|
+
* @enum {string}
|
|
1716
|
+
*/
|
|
1717
|
+
unit: "percent" | "dollars";
|
|
1718
|
+
/**
|
|
1719
|
+
* Format: date-time
|
|
1720
|
+
* @description Expiration date (ISO8601)
|
|
1721
|
+
*/
|
|
1722
|
+
expiresAt: string | null;
|
|
1723
|
+
}[];
|
|
1724
|
+
/** @description Available credit entitlements */
|
|
1725
|
+
credits?: {
|
|
1726
|
+
/** @description Total credit amount */
|
|
1727
|
+
totalAmount: number;
|
|
1728
|
+
/**
|
|
1729
|
+
* Format: date-time
|
|
1730
|
+
* @description Expiration date (ISO8601)
|
|
1731
|
+
*/
|
|
1732
|
+
expiresAt: string | null;
|
|
1733
|
+
};
|
|
1734
|
+
};
|
|
1735
|
+
/** @description Request execution time in milliseconds */
|
|
1736
|
+
executionTimeMs: number;
|
|
1737
|
+
};
|
|
1738
|
+
};
|
|
1739
|
+
};
|
|
1740
|
+
/** @description Default Response */
|
|
1741
|
+
400: {
|
|
1742
|
+
headers: {
|
|
1743
|
+
[name: string]: unknown;
|
|
1744
|
+
};
|
|
1745
|
+
content: {
|
|
1746
|
+
"application/json": {
|
|
1747
|
+
error: string;
|
|
1748
|
+
details?: unknown;
|
|
1749
|
+
};
|
|
1750
|
+
};
|
|
1751
|
+
};
|
|
1752
|
+
/** @description Default Response */
|
|
1753
|
+
401: {
|
|
1754
|
+
headers: {
|
|
1755
|
+
[name: string]: unknown;
|
|
1756
|
+
};
|
|
1757
|
+
content: {
|
|
1758
|
+
"application/json": {
|
|
1759
|
+
error: string;
|
|
1760
|
+
details?: unknown;
|
|
1761
|
+
};
|
|
1762
|
+
};
|
|
1763
|
+
};
|
|
1764
|
+
/** @description Default Response */
|
|
1765
|
+
500: {
|
|
1766
|
+
headers: {
|
|
1767
|
+
[name: string]: unknown;
|
|
1768
|
+
};
|
|
1769
|
+
content: {
|
|
1770
|
+
"application/json": {
|
|
1771
|
+
error: string;
|
|
1772
|
+
details?: unknown;
|
|
1773
|
+
};
|
|
1774
|
+
};
|
|
1775
|
+
};
|
|
1776
|
+
};
|
|
1777
|
+
};
|
|
1778
|
+
put?: never;
|
|
1779
|
+
post?: never;
|
|
1780
|
+
delete?: never;
|
|
1781
|
+
options?: never;
|
|
1782
|
+
head?: never;
|
|
1783
|
+
patch?: never;
|
|
1784
|
+
trace?: never;
|
|
1785
|
+
};
|
|
1786
|
+
"/publisher/sdk/v1/entitlements/server": {
|
|
1787
|
+
parameters: {
|
|
1788
|
+
query?: never;
|
|
1789
|
+
header?: never;
|
|
1790
|
+
path?: never;
|
|
1791
|
+
cookie?: never;
|
|
1792
|
+
};
|
|
1793
|
+
/** @description Check if a user has active entitlements. Server-to-server only - requires HMAC authentication. HMAC signature covers query string. */
|
|
1794
|
+
get: {
|
|
1795
|
+
parameters: {
|
|
1796
|
+
query: {
|
|
1797
|
+
userId: string;
|
|
1798
|
+
};
|
|
1799
|
+
header: {
|
|
1800
|
+
"x-api-key": string;
|
|
1801
|
+
"x-signature": string;
|
|
1802
|
+
"x-timestamp": string;
|
|
1803
|
+
};
|
|
1804
|
+
path?: never;
|
|
1805
|
+
cookie?: never;
|
|
1806
|
+
};
|
|
1807
|
+
requestBody?: never;
|
|
1808
|
+
responses: {
|
|
1809
|
+
/** @description Default Response */
|
|
1810
|
+
200: {
|
|
1811
|
+
headers: {
|
|
1812
|
+
[name: string]: unknown;
|
|
1813
|
+
};
|
|
1814
|
+
content: {
|
|
1815
|
+
"application/json": {
|
|
1816
|
+
success: boolean;
|
|
1817
|
+
/** @description Provisional entitlements (temporary, require conversion) */
|
|
1818
|
+
provisional: {
|
|
1819
|
+
/** @description Free trial entitlement details */
|
|
1820
|
+
freeTrial?: {
|
|
1821
|
+
/**
|
|
1822
|
+
* Format: date-time
|
|
1823
|
+
* @description Start date of the entitlement (ISO8601)
|
|
1824
|
+
*/
|
|
1825
|
+
startedAt: string | null;
|
|
1826
|
+
/**
|
|
1827
|
+
* Format: date-time
|
|
1828
|
+
* @description Expiration date (ISO8601)
|
|
1829
|
+
*/
|
|
1830
|
+
expiresAt: string | null;
|
|
1831
|
+
};
|
|
1832
|
+
/** @description Available discount entitlements */
|
|
1833
|
+
discounts?: {
|
|
1834
|
+
/** @description Discount value */
|
|
1835
|
+
value: number;
|
|
1836
|
+
/**
|
|
1837
|
+
* @description Discount unit
|
|
1838
|
+
* @enum {string}
|
|
1839
|
+
*/
|
|
1840
|
+
unit: "percent" | "dollars";
|
|
1841
|
+
/**
|
|
1842
|
+
* Format: date-time
|
|
1843
|
+
* @description Expiration date (ISO8601)
|
|
1844
|
+
*/
|
|
1845
|
+
expiresAt: string | null;
|
|
1846
|
+
}[];
|
|
1847
|
+
/** @description Available credit entitlements */
|
|
1848
|
+
credits?: {
|
|
1849
|
+
/** @description Total credit amount */
|
|
1850
|
+
totalAmount: number;
|
|
1851
|
+
/**
|
|
1852
|
+
* Format: date-time
|
|
1853
|
+
* @description Expiration date (ISO8601)
|
|
1854
|
+
*/
|
|
1855
|
+
expiresAt: string | null;
|
|
1856
|
+
};
|
|
1857
|
+
};
|
|
1858
|
+
/** @description Verified entitlements (permanent, earned through conversion) */
|
|
1859
|
+
verified: {
|
|
1860
|
+
/** @description Free trial entitlement details */
|
|
1861
|
+
freeTrial?: {
|
|
1862
|
+
/**
|
|
1863
|
+
* Format: date-time
|
|
1864
|
+
* @description Start date of the entitlement (ISO8601)
|
|
1865
|
+
*/
|
|
1866
|
+
startedAt: string | null;
|
|
1867
|
+
/**
|
|
1868
|
+
* Format: date-time
|
|
1869
|
+
* @description Expiration date (ISO8601)
|
|
1870
|
+
*/
|
|
1871
|
+
expiresAt: string | null;
|
|
1872
|
+
};
|
|
1873
|
+
/** @description Available discount entitlements */
|
|
1874
|
+
discounts?: {
|
|
1875
|
+
/** @description Discount value */
|
|
1876
|
+
value: number;
|
|
1877
|
+
/**
|
|
1878
|
+
* @description Discount unit
|
|
1879
|
+
* @enum {string}
|
|
1880
|
+
*/
|
|
1881
|
+
unit: "percent" | "dollars";
|
|
1882
|
+
/**
|
|
1883
|
+
* Format: date-time
|
|
1884
|
+
* @description Expiration date (ISO8601)
|
|
1885
|
+
*/
|
|
1886
|
+
expiresAt: string | null;
|
|
1887
|
+
}[];
|
|
1888
|
+
/** @description Available credit entitlements */
|
|
1889
|
+
credits?: {
|
|
1890
|
+
/** @description Total credit amount */
|
|
1891
|
+
totalAmount: number;
|
|
1892
|
+
/**
|
|
1893
|
+
* Format: date-time
|
|
1894
|
+
* @description Expiration date (ISO8601)
|
|
1895
|
+
*/
|
|
1896
|
+
expiresAt: string | null;
|
|
1897
|
+
};
|
|
1898
|
+
};
|
|
1899
|
+
/** @description All accumulated entitlements (combines verified + provisional with full original values) */
|
|
1900
|
+
all: {
|
|
1901
|
+
/** @description Free trial entitlement details */
|
|
1902
|
+
freeTrial?: {
|
|
1903
|
+
/**
|
|
1904
|
+
* Format: date-time
|
|
1905
|
+
* @description Start date of the entitlement (ISO8601)
|
|
1906
|
+
*/
|
|
1907
|
+
startedAt: string | null;
|
|
1908
|
+
/**
|
|
1909
|
+
* Format: date-time
|
|
1910
|
+
* @description Expiration date (ISO8601)
|
|
1911
|
+
*/
|
|
1912
|
+
expiresAt: string | null;
|
|
1913
|
+
};
|
|
1914
|
+
/** @description Available discount entitlements */
|
|
1915
|
+
discounts?: {
|
|
1916
|
+
/** @description Discount value */
|
|
1917
|
+
value: number;
|
|
1918
|
+
/**
|
|
1919
|
+
* @description Discount unit
|
|
1920
|
+
* @enum {string}
|
|
1921
|
+
*/
|
|
1922
|
+
unit: "percent" | "dollars";
|
|
1923
|
+
/**
|
|
1924
|
+
* Format: date-time
|
|
1925
|
+
* @description Expiration date (ISO8601)
|
|
1926
|
+
*/
|
|
1927
|
+
expiresAt: string | null;
|
|
1928
|
+
}[];
|
|
1929
|
+
/** @description Available credit entitlements */
|
|
1930
|
+
credits?: {
|
|
1931
|
+
/** @description Total credit amount */
|
|
1932
|
+
totalAmount: number;
|
|
1933
|
+
/**
|
|
1934
|
+
* Format: date-time
|
|
1935
|
+
* @description Expiration date (ISO8601)
|
|
1936
|
+
*/
|
|
1937
|
+
expiresAt: string | null;
|
|
1938
|
+
};
|
|
1939
|
+
};
|
|
1940
|
+
/** @description Request execution time in milliseconds */
|
|
1941
|
+
executionTimeMs: number;
|
|
1942
|
+
};
|
|
1943
|
+
};
|
|
1944
|
+
};
|
|
1945
|
+
/** @description Default Response */
|
|
1946
|
+
401: {
|
|
1947
|
+
headers: {
|
|
1948
|
+
[name: string]: unknown;
|
|
1949
|
+
};
|
|
1950
|
+
content: {
|
|
1951
|
+
"application/json": {
|
|
1952
|
+
error: string;
|
|
1953
|
+
details?: unknown;
|
|
1954
|
+
};
|
|
1955
|
+
};
|
|
1956
|
+
};
|
|
1957
|
+
/** @description Default Response */
|
|
1958
|
+
500: {
|
|
1959
|
+
headers: {
|
|
1960
|
+
[name: string]: unknown;
|
|
1961
|
+
};
|
|
1962
|
+
content: {
|
|
1963
|
+
"application/json": {
|
|
1964
|
+
error: string;
|
|
1965
|
+
details?: unknown;
|
|
1966
|
+
};
|
|
1967
|
+
};
|
|
1968
|
+
};
|
|
1969
|
+
};
|
|
1970
|
+
};
|
|
1971
|
+
put?: never;
|
|
1972
|
+
post?: never;
|
|
1973
|
+
delete?: never;
|
|
1974
|
+
options?: never;
|
|
1975
|
+
head?: never;
|
|
1976
|
+
patch?: never;
|
|
1977
|
+
trace?: never;
|
|
1978
|
+
};
|
|
1979
|
+
"/publisher/sdk/v1/errors": {
|
|
1980
|
+
parameters: {
|
|
1981
|
+
query?: never;
|
|
1982
|
+
header?: never;
|
|
1983
|
+
path?: never;
|
|
1984
|
+
cookie?: never;
|
|
1985
|
+
};
|
|
1986
|
+
get?: never;
|
|
1987
|
+
put?: never;
|
|
1988
|
+
/** @description Report a client-side error from the SDK. API key is optional. */
|
|
1989
|
+
post: {
|
|
1990
|
+
parameters: {
|
|
1991
|
+
query?: never;
|
|
1992
|
+
header?: never;
|
|
1993
|
+
path?: never;
|
|
1994
|
+
cookie?: never;
|
|
1995
|
+
};
|
|
1996
|
+
requestBody: {
|
|
1997
|
+
content: {
|
|
1998
|
+
"application/json": {
|
|
1999
|
+
errorType: string;
|
|
2000
|
+
message: string;
|
|
2001
|
+
context: string;
|
|
2002
|
+
stackTrace?: string;
|
|
2003
|
+
underlyingError?: string;
|
|
2004
|
+
/** @enum {string} */
|
|
2005
|
+
severity: "fatal" | "error" | "warning" | "info";
|
|
2006
|
+
/** Format: date-time */
|
|
2007
|
+
timestamp: string;
|
|
2008
|
+
metadata?: {
|
|
2009
|
+
[key: string]: string;
|
|
2010
|
+
};
|
|
2011
|
+
/** @enum {string} */
|
|
2012
|
+
platform: "ios" | "android" | "web";
|
|
2013
|
+
sdkVersion: string;
|
|
2014
|
+
appBundleId: string;
|
|
2015
|
+
appVersion?: string;
|
|
2016
|
+
osVersion?: string;
|
|
2017
|
+
deviceModel?: string;
|
|
2018
|
+
userId?: string;
|
|
2019
|
+
};
|
|
2020
|
+
};
|
|
2021
|
+
};
|
|
2022
|
+
responses: {
|
|
2023
|
+
/** @description Default Response */
|
|
2024
|
+
200: {
|
|
2025
|
+
headers: {
|
|
2026
|
+
[name: string]: unknown;
|
|
2027
|
+
};
|
|
2028
|
+
content: {
|
|
2029
|
+
"application/json": {
|
|
2030
|
+
success: boolean;
|
|
2031
|
+
acknowledged: boolean;
|
|
2032
|
+
eventId?: string;
|
|
2033
|
+
};
|
|
2034
|
+
};
|
|
2035
|
+
};
|
|
2036
|
+
/** @description Default Response */
|
|
2037
|
+
400: {
|
|
2038
|
+
headers: {
|
|
2039
|
+
[name: string]: unknown;
|
|
2040
|
+
};
|
|
2041
|
+
content: {
|
|
2042
|
+
"application/json": {
|
|
2043
|
+
error: string;
|
|
2044
|
+
details?: unknown;
|
|
2045
|
+
};
|
|
2046
|
+
};
|
|
2047
|
+
};
|
|
2048
|
+
/** @description Default Response */
|
|
2049
|
+
500: {
|
|
2050
|
+
headers: {
|
|
2051
|
+
[name: string]: unknown;
|
|
2052
|
+
};
|
|
2053
|
+
content: {
|
|
2054
|
+
"application/json": {
|
|
2055
|
+
error: string;
|
|
2056
|
+
details?: unknown;
|
|
2057
|
+
};
|
|
2058
|
+
};
|
|
2059
|
+
};
|
|
2060
|
+
};
|
|
2061
|
+
};
|
|
2062
|
+
delete?: never;
|
|
2063
|
+
options?: never;
|
|
2064
|
+
head?: never;
|
|
2065
|
+
patch?: never;
|
|
2066
|
+
trace?: never;
|
|
2067
|
+
};
|
|
2068
|
+
"/publisher/sdk/v1/ui-config": {
|
|
2069
|
+
parameters: {
|
|
2070
|
+
query?: never;
|
|
2071
|
+
header?: never;
|
|
2072
|
+
path?: never;
|
|
2073
|
+
cookie?: never;
|
|
2074
|
+
};
|
|
2075
|
+
/** @description Get server-driven UI configuration for the SDK. Returns the active variant based on weighted selection and SDK version compatibility, plus app UI configuration (text/color vars). Same user ID always returns same variant. */
|
|
2076
|
+
get: {
|
|
2077
|
+
parameters: {
|
|
2078
|
+
query: {
|
|
2079
|
+
/** @description The user ID for deterministic variant assignment */
|
|
2080
|
+
userId: string;
|
|
2081
|
+
/** @description SDK version for compatibility filtering */
|
|
2082
|
+
sdkVersion: string;
|
|
2083
|
+
/** @description Optional language hint (e.g. 'es'). Overrides the Accept-Language header; region subtags are stripped. */
|
|
2084
|
+
language?: string;
|
|
2085
|
+
};
|
|
2086
|
+
header?: never;
|
|
2087
|
+
path?: never;
|
|
2088
|
+
cookie?: never;
|
|
2089
|
+
};
|
|
2090
|
+
requestBody?: never;
|
|
2091
|
+
responses: {
|
|
2092
|
+
/** @description Default Response */
|
|
2093
|
+
200: {
|
|
2094
|
+
headers: {
|
|
2095
|
+
[name: string]: unknown;
|
|
2096
|
+
};
|
|
2097
|
+
content: {
|
|
2098
|
+
"application/json": {
|
|
2099
|
+
success: boolean;
|
|
2100
|
+
/** @description SDUI variant info and layout configuration */
|
|
2101
|
+
sduiConfig: {
|
|
2102
|
+
/**
|
|
2103
|
+
* Format: uuid
|
|
2104
|
+
* @description The ID of the selected variant
|
|
2105
|
+
*/
|
|
2106
|
+
variantId: string;
|
|
2107
|
+
/** @description The name of the selected variant */
|
|
2108
|
+
variantName: string;
|
|
2109
|
+
/** @description The minimum SDK version required for this variant */
|
|
2110
|
+
minSdkVersion: string;
|
|
2111
|
+
/** @description The SDUI JSON layout configuration */
|
|
2112
|
+
config: {
|
|
2113
|
+
[key: string]: unknown;
|
|
2114
|
+
};
|
|
2115
|
+
};
|
|
2116
|
+
/** @description App text/color configuration variables */
|
|
2117
|
+
remoteConfig: {
|
|
2118
|
+
/** @description App name for template substitution (e.g., 'Tinder Plus') */
|
|
2119
|
+
appName?: string | null;
|
|
2120
|
+
titleText?: string | null;
|
|
2121
|
+
subtitleText?: string | null;
|
|
2122
|
+
offerDescriptionText?: string | null;
|
|
2123
|
+
instructionsTitleText?: string | null;
|
|
2124
|
+
lastStepHeaderText?: string | null;
|
|
2125
|
+
lastStepDescriptionText?: string | null;
|
|
2126
|
+
creditClaimedTitleText?: string | null;
|
|
2127
|
+
creditClaimedSubtitleText?: string | null;
|
|
2128
|
+
applyCreditsButtonText?: string | null;
|
|
2129
|
+
accentTitleText?: string | null;
|
|
2130
|
+
accentTitleColor?: string | null;
|
|
2131
|
+
accentColor?: string | null;
|
|
2132
|
+
/** @enum {string|null} */
|
|
2133
|
+
appearanceMode?: "light" | "dark" | "auto" | null;
|
|
2134
|
+
/** @description Entitlement value for template substitution (e.g., '1' for '1 month') */
|
|
2135
|
+
entitlementValue?: string | null;
|
|
2136
|
+
/** @description Entitlement unit for template substitution (e.g., 'month', 'day', 'week') */
|
|
2137
|
+
entitlementUnit?: string | null;
|
|
2138
|
+
};
|
|
2139
|
+
/** @description Resolved locale served in this response (language-only, e.g. 'es'). Absent on pre-localization responses. */
|
|
2140
|
+
locale?: string;
|
|
2141
|
+
} | {
|
|
2142
|
+
success: boolean;
|
|
2143
|
+
/**
|
|
2144
|
+
* @description No SDUI variant available
|
|
2145
|
+
* @enum {unknown|null}
|
|
2146
|
+
*/
|
|
2147
|
+
sduiConfig: "null" | null;
|
|
2148
|
+
/** @description Reason why no variant is available */
|
|
2149
|
+
message: string;
|
|
2150
|
+
/** @description App text/color configuration variables */
|
|
2151
|
+
remoteConfig: {
|
|
2152
|
+
/** @description App name for template substitution (e.g., 'Tinder Plus') */
|
|
2153
|
+
appName?: string | null;
|
|
2154
|
+
titleText?: string | null;
|
|
2155
|
+
subtitleText?: string | null;
|
|
2156
|
+
offerDescriptionText?: string | null;
|
|
2157
|
+
instructionsTitleText?: string | null;
|
|
2158
|
+
lastStepHeaderText?: string | null;
|
|
2159
|
+
lastStepDescriptionText?: string | null;
|
|
2160
|
+
creditClaimedTitleText?: string | null;
|
|
2161
|
+
creditClaimedSubtitleText?: string | null;
|
|
2162
|
+
applyCreditsButtonText?: string | null;
|
|
2163
|
+
accentTitleText?: string | null;
|
|
2164
|
+
accentTitleColor?: string | null;
|
|
2165
|
+
accentColor?: string | null;
|
|
2166
|
+
/** @enum {string|null} */
|
|
2167
|
+
appearanceMode?: "light" | "dark" | "auto" | null;
|
|
2168
|
+
/** @description Entitlement value for template substitution (e.g., '1' for '1 month') */
|
|
2169
|
+
entitlementValue?: string | null;
|
|
2170
|
+
/** @description Entitlement unit for template substitution (e.g., 'month', 'day', 'week') */
|
|
2171
|
+
entitlementUnit?: string | null;
|
|
2172
|
+
};
|
|
2173
|
+
/** @description Resolved locale served in this response (language-only, e.g. 'es'). Absent on pre-localization responses. */
|
|
2174
|
+
locale?: string;
|
|
2175
|
+
};
|
|
2176
|
+
};
|
|
2177
|
+
};
|
|
2178
|
+
/** @description Default Response */
|
|
2179
|
+
401: {
|
|
2180
|
+
headers: {
|
|
2181
|
+
[name: string]: unknown;
|
|
2182
|
+
};
|
|
2183
|
+
content: {
|
|
2184
|
+
"application/json": {
|
|
2185
|
+
error: string;
|
|
2186
|
+
details?: unknown;
|
|
2187
|
+
};
|
|
2188
|
+
};
|
|
2189
|
+
};
|
|
2190
|
+
/** @description Default Response */
|
|
2191
|
+
500: {
|
|
2192
|
+
headers: {
|
|
2193
|
+
[name: string]: unknown;
|
|
2194
|
+
};
|
|
2195
|
+
content: {
|
|
2196
|
+
"application/json": {
|
|
2197
|
+
error: string;
|
|
2198
|
+
details?: unknown;
|
|
2199
|
+
};
|
|
2200
|
+
};
|
|
2201
|
+
};
|
|
2202
|
+
};
|
|
2203
|
+
};
|
|
2204
|
+
put?: never;
|
|
2205
|
+
post?: never;
|
|
2206
|
+
delete?: never;
|
|
2207
|
+
options?: never;
|
|
2208
|
+
head?: never;
|
|
2209
|
+
patch?: never;
|
|
2210
|
+
trace?: never;
|
|
2211
|
+
};
|
|
2212
|
+
"/publisher/sdk/v1/config": {
|
|
2213
|
+
parameters: {
|
|
2214
|
+
query?: never;
|
|
2215
|
+
header?: never;
|
|
2216
|
+
path?: never;
|
|
2217
|
+
cookie?: never;
|
|
2218
|
+
};
|
|
2219
|
+
/** @description Get unified SDK configuration including SDUI, entitlements, experiments, and remote config. This endpoint replaces /ui-config with a cleaner structure. Entitlement mode is implicit: if entitlements.iap.productId exists, use IAP mode; otherwise use Native mode. */
|
|
2220
|
+
get: {
|
|
2221
|
+
parameters: {
|
|
2222
|
+
query: {
|
|
2223
|
+
/** @description User ID for deterministic variant/cohort assignment */
|
|
2224
|
+
userId: string;
|
|
2225
|
+
/** @description SDK version for compatibility filtering */
|
|
2226
|
+
sdkVersion: string;
|
|
2227
|
+
/** @description Optional language hint (e.g. 'es'). Overrides the Accept-Language header; region subtags are stripped. */
|
|
2228
|
+
language?: string;
|
|
2229
|
+
};
|
|
2230
|
+
header?: never;
|
|
2231
|
+
path?: never;
|
|
2232
|
+
cookie?: never;
|
|
2233
|
+
};
|
|
2234
|
+
requestBody?: never;
|
|
2235
|
+
responses: {
|
|
2236
|
+
/** @description Default Response */
|
|
2237
|
+
200: {
|
|
2238
|
+
headers: {
|
|
2239
|
+
[name: string]: unknown;
|
|
2240
|
+
};
|
|
2241
|
+
content: {
|
|
2242
|
+
"application/json": {
|
|
2243
|
+
success: boolean;
|
|
2244
|
+
/** @description UI configuration: template + values */
|
|
2245
|
+
ui: {
|
|
2246
|
+
/**
|
|
2247
|
+
* Format: uuid
|
|
2248
|
+
* @description Selected variant ID
|
|
2249
|
+
*/
|
|
2250
|
+
variantId?: string | null;
|
|
2251
|
+
/** @description Selected variant name */
|
|
2252
|
+
variantName?: string | null;
|
|
2253
|
+
/** @description Minimum SDK version for this variant */
|
|
2254
|
+
minSdkVersion?: string | null;
|
|
2255
|
+
/** @description SDUI template with placeholders */
|
|
2256
|
+
template?: {
|
|
2257
|
+
[key: string]: unknown;
|
|
2258
|
+
} | null;
|
|
2259
|
+
/** @description Values to substitute into template */
|
|
2260
|
+
values: {
|
|
2261
|
+
/** @description Text values for template substitution */
|
|
2262
|
+
text: {
|
|
2263
|
+
/** @description App name for ${appName} substitution */
|
|
2264
|
+
appName?: string | null;
|
|
2265
|
+
/** @description Main title text */
|
|
2266
|
+
title?: string | null;
|
|
2267
|
+
/** @description Subtitle text */
|
|
2268
|
+
subtitle?: string | null;
|
|
2269
|
+
/** @description Offer description text */
|
|
2270
|
+
offerDescription?: string | null;
|
|
2271
|
+
/** @description Instructions title */
|
|
2272
|
+
instructionsTitle?: string | null;
|
|
2273
|
+
/** @description Last step header text */
|
|
2274
|
+
lastStepHeader?: string | null;
|
|
2275
|
+
/** @description Last step description */
|
|
2276
|
+
lastStepDescription?: string | null;
|
|
2277
|
+
/** @description Credit claimed title */
|
|
2278
|
+
creditClaimedTitle?: string | null;
|
|
2279
|
+
/** @description Credit claimed subtitle */
|
|
2280
|
+
creditClaimedSubtitle?: string | null;
|
|
2281
|
+
/** @description Apply credits button text */
|
|
2282
|
+
applyCreditsButton?: string | null;
|
|
2283
|
+
/** @description Accent title text */
|
|
2284
|
+
accentTitle?: string | null;
|
|
2285
|
+
/** @description Custom headline text for SDUI variant (falls back to title) */
|
|
2286
|
+
customHeadline?: string | null;
|
|
2287
|
+
/** @description Custom subheadline text for SDUI variant (falls back to subtitle) */
|
|
2288
|
+
customSubheadline?: string | null;
|
|
2289
|
+
};
|
|
2290
|
+
/** @description Appearance values */
|
|
2291
|
+
appearance: {
|
|
2292
|
+
/**
|
|
2293
|
+
* @description Appearance mode
|
|
2294
|
+
* @enum {string|null}
|
|
2295
|
+
*/
|
|
2296
|
+
mode?: "light" | "dark" | "auto" | null;
|
|
2297
|
+
/** @description Primary accent color (hex) */
|
|
2298
|
+
accentColor?: string | null;
|
|
2299
|
+
/** @description Accent title color (hex) */
|
|
2300
|
+
accentTitleColor?: string | null;
|
|
2301
|
+
};
|
|
2302
|
+
};
|
|
2303
|
+
};
|
|
2304
|
+
/** @description Entitlement configuration (IAP or Native mode) */
|
|
2305
|
+
entitlements: {
|
|
2306
|
+
/** @description IAP config. If productId exists → IAP mode. */
|
|
2307
|
+
iap?: {
|
|
2308
|
+
/** @description Store-level subscription product ID. App Store Connect product ID for iOS apps, Google Play subscription product ID for Android apps. */
|
|
2309
|
+
productId: string;
|
|
2310
|
+
/** @description Google Play subscription offer ID (e.g. 'free-trial-1m'). Null or omitted for iOS apps. The Android SDK uses this value to look up the matching SubscriptionOfferDetails in the product's base plan and pass its offer token to Play Billing's BillingFlowParams.setOfferToken(). */
|
|
2311
|
+
offerId?: string | null;
|
|
2312
|
+
/** @description Google Play base plan ID (e.g. 'monthly', 'annual'); null for iOS. Disambiguates products that expose multiple base plans so the Android SDK resolves the correct SubscriptionOfferDetails / price for the intended base plan instead of defaulting to the first one. */
|
|
2313
|
+
basePlanId?: string | null;
|
|
2314
|
+
/** @description Display name for the premium tier (e.g. 'Premium', 'Pro'). Used in SDUI templates via ${premiumTierName}. */
|
|
2315
|
+
premiumTierName?: string | null;
|
|
2316
|
+
} | null;
|
|
2317
|
+
/** @description Native/Encore-managed entitlement. Fallback if no IAP. */
|
|
2318
|
+
native?: {
|
|
2319
|
+
/** @description Entitlement type (e.g., 'free_trial', 'credit', 'discount') */
|
|
2320
|
+
type: string;
|
|
2321
|
+
/** @description Raw value for template substitution (e.g., '3') */
|
|
2322
|
+
value: string;
|
|
2323
|
+
/** @description Raw unit for template substitution (e.g., 'months', 'days') */
|
|
2324
|
+
unit: string;
|
|
2325
|
+
/** @description Computed duration in days for SDK logic */
|
|
2326
|
+
durationDays: number;
|
|
2327
|
+
} | null;
|
|
2328
|
+
};
|
|
2329
|
+
/** @description Experiment configurations */
|
|
2330
|
+
experiments: {
|
|
2331
|
+
/** @description NCL experiment config. Null if not configured. */
|
|
2332
|
+
ncl?: {
|
|
2333
|
+
/** @description Percent of eligible users assigned to Treatment */
|
|
2334
|
+
rolloutPct: number;
|
|
2335
|
+
/** @description Epoch identifier. Change resets cohort assignments. */
|
|
2336
|
+
assignmentVersion: number;
|
|
2337
|
+
/** @description Kill switch. If false, all users go to Control. */
|
|
2338
|
+
enabled: boolean;
|
|
2339
|
+
} | null;
|
|
2340
|
+
};
|
|
2341
|
+
/** @description Resolved locale served in this response (language-only, e.g. 'es'). Absent on pre-localization responses. */
|
|
2342
|
+
locale?: string;
|
|
2343
|
+
};
|
|
2344
|
+
};
|
|
2345
|
+
};
|
|
2346
|
+
/** @description Default Response */
|
|
2347
|
+
401: {
|
|
2348
|
+
headers: {
|
|
2349
|
+
[name: string]: unknown;
|
|
2350
|
+
};
|
|
2351
|
+
content: {
|
|
2352
|
+
"application/json": {
|
|
2353
|
+
error: string;
|
|
2354
|
+
details?: unknown;
|
|
2355
|
+
};
|
|
2356
|
+
};
|
|
2357
|
+
};
|
|
2358
|
+
/** @description Default Response */
|
|
2359
|
+
500: {
|
|
2360
|
+
headers: {
|
|
2361
|
+
[name: string]: unknown;
|
|
2362
|
+
};
|
|
2363
|
+
content: {
|
|
2364
|
+
"application/json": {
|
|
2365
|
+
error: string;
|
|
2366
|
+
details?: unknown;
|
|
2367
|
+
};
|
|
2368
|
+
};
|
|
2369
|
+
};
|
|
2370
|
+
};
|
|
2371
|
+
};
|
|
2372
|
+
put?: never;
|
|
2373
|
+
post?: never;
|
|
2374
|
+
delete?: never;
|
|
2375
|
+
options?: never;
|
|
2376
|
+
head?: never;
|
|
2377
|
+
patch?: never;
|
|
2378
|
+
trace?: never;
|
|
2379
|
+
};
|
|
2380
|
+
"/publisher/sdk/v1/users": {
|
|
2381
|
+
parameters: {
|
|
2382
|
+
query?: never;
|
|
2383
|
+
header?: never;
|
|
2384
|
+
path?: never;
|
|
2385
|
+
cookie?: never;
|
|
2386
|
+
};
|
|
2387
|
+
get?: never;
|
|
2388
|
+
put?: never;
|
|
2389
|
+
/** @description Initialize user (idempotent). Called on SDK init to ensure user exists. Returns canonical UUID. */
|
|
2390
|
+
post: {
|
|
2391
|
+
parameters: {
|
|
2392
|
+
query?: never;
|
|
2393
|
+
header?: never;
|
|
2394
|
+
path?: never;
|
|
2395
|
+
cookie?: never;
|
|
2396
|
+
};
|
|
2397
|
+
requestBody: {
|
|
2398
|
+
content: {
|
|
2399
|
+
"application/json": {
|
|
2400
|
+
/** @description User ID from SDK (anonymous UUID or identified) */
|
|
2401
|
+
userId: string;
|
|
2402
|
+
/** @description Optional user attributes */
|
|
2403
|
+
attributes?: {
|
|
2404
|
+
/** Format: email */
|
|
2405
|
+
email?: string;
|
|
2406
|
+
name?: string;
|
|
2407
|
+
};
|
|
2408
|
+
};
|
|
2409
|
+
};
|
|
2410
|
+
};
|
|
2411
|
+
responses: {
|
|
2412
|
+
/** @description Default Response */
|
|
2413
|
+
200: {
|
|
2414
|
+
headers: {
|
|
2415
|
+
[name: string]: unknown;
|
|
2416
|
+
};
|
|
2417
|
+
content: {
|
|
2418
|
+
"application/json": {
|
|
2419
|
+
success: boolean;
|
|
2420
|
+
/**
|
|
2421
|
+
* Format: uuid
|
|
2422
|
+
* @description Canonical user UUID
|
|
2423
|
+
*/
|
|
2424
|
+
userId: string;
|
|
2425
|
+
/** @description True if user was created, false if already existed */
|
|
2426
|
+
isNew: boolean;
|
|
2427
|
+
};
|
|
2428
|
+
};
|
|
2429
|
+
};
|
|
2430
|
+
/** @description Default Response */
|
|
2431
|
+
401: {
|
|
2432
|
+
headers: {
|
|
2433
|
+
[name: string]: unknown;
|
|
2434
|
+
};
|
|
2435
|
+
content: {
|
|
2436
|
+
"application/json": {
|
|
2437
|
+
error: string;
|
|
2438
|
+
details?: unknown;
|
|
2439
|
+
};
|
|
2440
|
+
};
|
|
2441
|
+
};
|
|
2442
|
+
/** @description Default Response */
|
|
2443
|
+
500: {
|
|
2444
|
+
headers: {
|
|
2445
|
+
[name: string]: unknown;
|
|
2446
|
+
};
|
|
2447
|
+
content: {
|
|
2448
|
+
"application/json": {
|
|
2449
|
+
error: string;
|
|
2450
|
+
details?: unknown;
|
|
2451
|
+
};
|
|
2452
|
+
};
|
|
2453
|
+
};
|
|
2454
|
+
};
|
|
2455
|
+
};
|
|
2456
|
+
delete?: never;
|
|
2457
|
+
options?: never;
|
|
2458
|
+
head?: never;
|
|
2459
|
+
patch?: never;
|
|
2460
|
+
trace?: never;
|
|
2461
|
+
};
|
|
2462
|
+
"/publisher/sdk/v1/users/identify": {
|
|
2463
|
+
parameters: {
|
|
2464
|
+
query?: never;
|
|
2465
|
+
header?: never;
|
|
2466
|
+
path?: never;
|
|
2467
|
+
cookie?: never;
|
|
2468
|
+
};
|
|
2469
|
+
get?: never;
|
|
2470
|
+
put?: never;
|
|
2471
|
+
post?: never;
|
|
2472
|
+
delete?: never;
|
|
2473
|
+
options?: never;
|
|
2474
|
+
head?: never;
|
|
2475
|
+
/** @description Update user identity (anonymous→identified). Updates the user's app_user_id. Called when developer calls SDK.identify() after login. */
|
|
2476
|
+
patch: {
|
|
2477
|
+
parameters: {
|
|
2478
|
+
query?: never;
|
|
2479
|
+
header?: never;
|
|
2480
|
+
path?: never;
|
|
2481
|
+
cookie?: never;
|
|
2482
|
+
};
|
|
2483
|
+
requestBody: {
|
|
2484
|
+
content: {
|
|
2485
|
+
"application/json": {
|
|
2486
|
+
/** @description Current user ID (anonymous or identified) */
|
|
2487
|
+
currentUserId: string;
|
|
2488
|
+
/** @description New user ID (typically from login) */
|
|
2489
|
+
newUserId: string;
|
|
2490
|
+
/** @description Optional user attributes to update */
|
|
2491
|
+
attributes?: {
|
|
2492
|
+
/** Format: email */
|
|
2493
|
+
email?: string;
|
|
2494
|
+
name?: string;
|
|
2495
|
+
};
|
|
2496
|
+
};
|
|
2497
|
+
};
|
|
2498
|
+
};
|
|
2499
|
+
responses: {
|
|
2500
|
+
/** @description Default Response */
|
|
2501
|
+
200: {
|
|
2502
|
+
headers: {
|
|
2503
|
+
[name: string]: unknown;
|
|
2504
|
+
};
|
|
2505
|
+
content: {
|
|
2506
|
+
"application/json": {
|
|
2507
|
+
success: boolean;
|
|
2508
|
+
/**
|
|
2509
|
+
* Format: uuid
|
|
2510
|
+
* @description Canonical user UUID
|
|
2511
|
+
*/
|
|
2512
|
+
userId: string;
|
|
2513
|
+
};
|
|
2514
|
+
};
|
|
2515
|
+
};
|
|
2516
|
+
/** @description Default Response */
|
|
2517
|
+
401: {
|
|
2518
|
+
headers: {
|
|
2519
|
+
[name: string]: unknown;
|
|
2520
|
+
};
|
|
2521
|
+
content: {
|
|
2522
|
+
"application/json": {
|
|
2523
|
+
error: string;
|
|
2524
|
+
details?: unknown;
|
|
2525
|
+
};
|
|
2526
|
+
};
|
|
2527
|
+
};
|
|
2528
|
+
/** @description Default Response */
|
|
2529
|
+
500: {
|
|
2530
|
+
headers: {
|
|
2531
|
+
[name: string]: unknown;
|
|
2532
|
+
};
|
|
2533
|
+
content: {
|
|
2534
|
+
"application/json": {
|
|
2535
|
+
error: string;
|
|
2536
|
+
details?: unknown;
|
|
2537
|
+
};
|
|
2538
|
+
};
|
|
2539
|
+
};
|
|
2540
|
+
};
|
|
2541
|
+
};
|
|
2542
|
+
trace?: never;
|
|
2543
|
+
};
|
|
2544
|
+
"/publisher/sdk/v1/iap-links": {
|
|
2545
|
+
parameters: {
|
|
2546
|
+
query?: never;
|
|
2547
|
+
header?: never;
|
|
2548
|
+
path?: never;
|
|
2549
|
+
cookie?: never;
|
|
2550
|
+
};
|
|
2551
|
+
get?: never;
|
|
2552
|
+
put?: never;
|
|
2553
|
+
/** @description Link Apple Account to subscription chain (appTransactionId ↔ originalTransactionId). Idempotent: updates last_observed_at if exists. Used for NCL attribution via webhooks. */
|
|
2554
|
+
post: {
|
|
2555
|
+
parameters: {
|
|
2556
|
+
query?: never;
|
|
2557
|
+
header?: never;
|
|
2558
|
+
path?: never;
|
|
2559
|
+
cookie?: never;
|
|
2560
|
+
};
|
|
2561
|
+
requestBody: {
|
|
2562
|
+
content: {
|
|
2563
|
+
"application/json": {
|
|
2564
|
+
/** @description Persistent identity: Apple appTransactionID (iOS) or SharedPrefs UUID (Android). Stable per Apple Account / Google Account per app. */
|
|
2565
|
+
appTransactionId: string;
|
|
2566
|
+
/** @description Subscription chain anchor: Apple original_transaction_id (iOS) or Google purchaseToken (Android). */
|
|
2567
|
+
originalTransactionId: string;
|
|
2568
|
+
};
|
|
2569
|
+
};
|
|
2570
|
+
};
|
|
2571
|
+
responses: {
|
|
2572
|
+
/** @description Default Response */
|
|
2573
|
+
200: {
|
|
2574
|
+
headers: {
|
|
2575
|
+
[name: string]: unknown;
|
|
2576
|
+
};
|
|
2577
|
+
content: {
|
|
2578
|
+
"application/json": {
|
|
2579
|
+
success: boolean;
|
|
2580
|
+
/**
|
|
2581
|
+
* Format: date-time
|
|
2582
|
+
* @description When this link was first created
|
|
2583
|
+
*/
|
|
2584
|
+
firstObservedAt: string;
|
|
2585
|
+
/** @description True if this is a new link, false if existing was updated */
|
|
2586
|
+
isNew: boolean;
|
|
2587
|
+
};
|
|
2588
|
+
};
|
|
2589
|
+
};
|
|
2590
|
+
/** @description Default Response */
|
|
2591
|
+
401: {
|
|
2592
|
+
headers: {
|
|
2593
|
+
[name: string]: unknown;
|
|
2594
|
+
};
|
|
2595
|
+
content: {
|
|
2596
|
+
"application/json": {
|
|
2597
|
+
error: string;
|
|
2598
|
+
details?: unknown;
|
|
2599
|
+
};
|
|
2600
|
+
};
|
|
2601
|
+
};
|
|
2602
|
+
/** @description Default Response */
|
|
2603
|
+
500: {
|
|
2604
|
+
headers: {
|
|
2605
|
+
[name: string]: unknown;
|
|
2606
|
+
};
|
|
2607
|
+
content: {
|
|
2608
|
+
"application/json": {
|
|
2609
|
+
error: string;
|
|
2610
|
+
details?: unknown;
|
|
2611
|
+
};
|
|
2612
|
+
};
|
|
2613
|
+
};
|
|
2614
|
+
};
|
|
2615
|
+
};
|
|
2616
|
+
delete?: never;
|
|
2617
|
+
options?: never;
|
|
2618
|
+
head?: never;
|
|
2619
|
+
patch?: never;
|
|
2620
|
+
trace?: never;
|
|
2621
|
+
};
|
|
2622
|
+
"/publisher/sdk/v1/promo-signature": {
|
|
2623
|
+
parameters: {
|
|
2624
|
+
query?: never;
|
|
2625
|
+
header?: never;
|
|
2626
|
+
path?: never;
|
|
2627
|
+
cookie?: never;
|
|
2628
|
+
};
|
|
2629
|
+
/** @description Generate an ECDSA signature for a StoreKit 2 promotional offer purchase. Requires a subscription key and bundle ID to be configured in the publisher portal. */
|
|
2630
|
+
get: {
|
|
2631
|
+
parameters: {
|
|
2632
|
+
query: {
|
|
2633
|
+
productId: string;
|
|
2634
|
+
applicationUsername?: string;
|
|
2635
|
+
};
|
|
2636
|
+
header?: never;
|
|
2637
|
+
path?: never;
|
|
2638
|
+
cookie?: never;
|
|
2639
|
+
};
|
|
2640
|
+
requestBody?: never;
|
|
2641
|
+
responses: {
|
|
2642
|
+
/** @description Default Response */
|
|
2643
|
+
200: {
|
|
2644
|
+
headers: {
|
|
2645
|
+
[name: string]: unknown;
|
|
2646
|
+
};
|
|
2647
|
+
content: {
|
|
2648
|
+
"application/json": {
|
|
2649
|
+
keyId: string;
|
|
2650
|
+
offerId: string;
|
|
2651
|
+
/** Format: uuid */
|
|
2652
|
+
nonce: string;
|
|
2653
|
+
timestamp: number;
|
|
2654
|
+
signature: string;
|
|
2655
|
+
};
|
|
2656
|
+
};
|
|
2657
|
+
};
|
|
2658
|
+
/** @description Default Response */
|
|
2659
|
+
400: {
|
|
2660
|
+
headers: {
|
|
2661
|
+
[name: string]: unknown;
|
|
2662
|
+
};
|
|
2663
|
+
content: {
|
|
2664
|
+
"application/json": {
|
|
2665
|
+
error: string;
|
|
2666
|
+
details?: unknown;
|
|
2667
|
+
};
|
|
2668
|
+
};
|
|
2669
|
+
};
|
|
2670
|
+
/** @description Default Response */
|
|
2671
|
+
401: {
|
|
2672
|
+
headers: {
|
|
2673
|
+
[name: string]: unknown;
|
|
2674
|
+
};
|
|
2675
|
+
content: {
|
|
2676
|
+
"application/json": {
|
|
2677
|
+
error: string;
|
|
2678
|
+
details?: unknown;
|
|
2679
|
+
};
|
|
2680
|
+
};
|
|
2681
|
+
};
|
|
2682
|
+
/** @description Default Response */
|
|
2683
|
+
404: {
|
|
2684
|
+
headers: {
|
|
2685
|
+
[name: string]: unknown;
|
|
2686
|
+
};
|
|
2687
|
+
content: {
|
|
2688
|
+
"application/json": {
|
|
2689
|
+
error: string;
|
|
2690
|
+
details?: unknown;
|
|
2691
|
+
};
|
|
2692
|
+
};
|
|
2693
|
+
};
|
|
2694
|
+
/** @description Default Response */
|
|
2695
|
+
500: {
|
|
2696
|
+
headers: {
|
|
2697
|
+
[name: string]: unknown;
|
|
2698
|
+
};
|
|
2699
|
+
content: {
|
|
2700
|
+
"application/json": {
|
|
2701
|
+
error: string;
|
|
2702
|
+
details?: unknown;
|
|
2703
|
+
};
|
|
2704
|
+
};
|
|
2705
|
+
};
|
|
2706
|
+
};
|
|
2707
|
+
};
|
|
2708
|
+
put?: never;
|
|
2709
|
+
post?: never;
|
|
2710
|
+
delete?: never;
|
|
2711
|
+
options?: never;
|
|
2712
|
+
head?: never;
|
|
2713
|
+
patch?: never;
|
|
2714
|
+
trace?: never;
|
|
2715
|
+
};
|
|
2716
|
+
"/publisher/sdk/v1/test/conversions/complete": {
|
|
2717
|
+
parameters: {
|
|
2718
|
+
query?: never;
|
|
2719
|
+
header?: never;
|
|
2720
|
+
path?: never;
|
|
2721
|
+
cookie?: never;
|
|
2722
|
+
};
|
|
2723
|
+
get?: never;
|
|
2724
|
+
put?: never;
|
|
2725
|
+
/** @description Simulate a conversion postback for the Paramount+ Encore Demo campaign. Unauthenticated; hard-scoped to the demo campaign at the service layer. */
|
|
2726
|
+
post: {
|
|
2727
|
+
parameters: {
|
|
2728
|
+
query?: never;
|
|
2729
|
+
header?: never;
|
|
2730
|
+
path?: never;
|
|
2731
|
+
cookie?: never;
|
|
2732
|
+
};
|
|
2733
|
+
requestBody: {
|
|
2734
|
+
content: {
|
|
2735
|
+
"application/json": {
|
|
2736
|
+
/**
|
|
2737
|
+
* Format: uuid
|
|
2738
|
+
* @description Transaction ID being verified
|
|
2739
|
+
*/
|
|
2740
|
+
transactionId: string;
|
|
2741
|
+
};
|
|
2742
|
+
};
|
|
2743
|
+
};
|
|
2744
|
+
responses: {
|
|
2745
|
+
/** @description Default Response */
|
|
2746
|
+
200: {
|
|
2747
|
+
headers: {
|
|
2748
|
+
[name: string]: unknown;
|
|
2749
|
+
};
|
|
2750
|
+
content: {
|
|
2751
|
+
"application/json": {
|
|
2752
|
+
success: boolean;
|
|
2753
|
+
/** Format: uuid */
|
|
2754
|
+
transactionId: string;
|
|
2755
|
+
/** @enum {string} */
|
|
2756
|
+
status: "verified" | "final_granted";
|
|
2757
|
+
};
|
|
2758
|
+
};
|
|
2759
|
+
};
|
|
2760
|
+
/** @description Default Response */
|
|
2761
|
+
400: {
|
|
2762
|
+
headers: {
|
|
2763
|
+
[name: string]: unknown;
|
|
2764
|
+
};
|
|
2765
|
+
content: {
|
|
2766
|
+
"application/json": {
|
|
2767
|
+
error: string;
|
|
2768
|
+
details?: unknown;
|
|
2769
|
+
};
|
|
2770
|
+
};
|
|
2771
|
+
};
|
|
2772
|
+
/** @description Default Response */
|
|
2773
|
+
403: {
|
|
2774
|
+
headers: {
|
|
2775
|
+
[name: string]: unknown;
|
|
2776
|
+
};
|
|
2777
|
+
content: {
|
|
2778
|
+
"application/json": {
|
|
2779
|
+
error: string;
|
|
2780
|
+
details?: unknown;
|
|
2781
|
+
};
|
|
2782
|
+
};
|
|
2783
|
+
};
|
|
2784
|
+
/** @description Default Response */
|
|
2785
|
+
404: {
|
|
2786
|
+
headers: {
|
|
2787
|
+
[name: string]: unknown;
|
|
2788
|
+
};
|
|
2789
|
+
content: {
|
|
2790
|
+
"application/json": {
|
|
2791
|
+
error: string;
|
|
2792
|
+
details?: unknown;
|
|
2793
|
+
};
|
|
2794
|
+
};
|
|
2795
|
+
};
|
|
2796
|
+
};
|
|
2797
|
+
};
|
|
2798
|
+
delete?: never;
|
|
2799
|
+
options?: never;
|
|
2800
|
+
head?: never;
|
|
2801
|
+
patch?: never;
|
|
2802
|
+
trace?: never;
|
|
2803
|
+
};
|
|
2804
|
+
"/publisher/sdk/v1/leads": {
|
|
2805
|
+
parameters: {
|
|
2806
|
+
query?: never;
|
|
2807
|
+
header?: never;
|
|
2808
|
+
path?: never;
|
|
2809
|
+
cookie?: never;
|
|
2810
|
+
};
|
|
2811
|
+
get?: never;
|
|
2812
|
+
put?: never;
|
|
2813
|
+
/** @description Create a lead for async advertiser email capture */
|
|
2814
|
+
post: {
|
|
2815
|
+
parameters: {
|
|
2816
|
+
query?: never;
|
|
2817
|
+
header?: never;
|
|
2818
|
+
path?: never;
|
|
2819
|
+
cookie?: never;
|
|
2820
|
+
};
|
|
2821
|
+
requestBody: {
|
|
2822
|
+
content: {
|
|
2823
|
+
"application/json": {
|
|
2824
|
+
userId: string;
|
|
2825
|
+
/** Format: uuid */
|
|
2826
|
+
campaignId: string;
|
|
2827
|
+
/** Format: email */
|
|
2828
|
+
email: string;
|
|
2829
|
+
/** @description Trial length in days as reported by StoreKit; drives reminder scheduling. */
|
|
2830
|
+
trialDurationDays?: number | null;
|
|
2831
|
+
/**
|
|
2832
|
+
* Format: uuid
|
|
2833
|
+
* @description Client-issued UUID v4 used as the conversion attribution id; substituted into the sponsor URL at email-send time.
|
|
2834
|
+
*/
|
|
2835
|
+
transactionId: string;
|
|
2836
|
+
};
|
|
2837
|
+
};
|
|
2838
|
+
};
|
|
2839
|
+
responses: {
|
|
2840
|
+
/** @description Default Response */
|
|
2841
|
+
201: {
|
|
2842
|
+
headers: {
|
|
2843
|
+
[name: string]: unknown;
|
|
2844
|
+
};
|
|
2845
|
+
content: {
|
|
2846
|
+
"application/json": {
|
|
2847
|
+
success: boolean;
|
|
2848
|
+
/**
|
|
2849
|
+
* Format: uuid
|
|
2850
|
+
* @description Created lead ID
|
|
2851
|
+
*/
|
|
2852
|
+
leadId: string;
|
|
2853
|
+
};
|
|
2854
|
+
};
|
|
2855
|
+
};
|
|
2856
|
+
/** @description Default Response */
|
|
2857
|
+
400: {
|
|
2858
|
+
headers: {
|
|
2859
|
+
[name: string]: unknown;
|
|
2860
|
+
};
|
|
2861
|
+
content: {
|
|
2862
|
+
"application/json": {
|
|
2863
|
+
error: string;
|
|
2864
|
+
details?: unknown;
|
|
2865
|
+
};
|
|
2866
|
+
};
|
|
2867
|
+
};
|
|
2868
|
+
/** @description Default Response */
|
|
2869
|
+
401: {
|
|
2870
|
+
headers: {
|
|
2871
|
+
[name: string]: unknown;
|
|
2872
|
+
};
|
|
2873
|
+
content: {
|
|
2874
|
+
"application/json": {
|
|
2875
|
+
error: string;
|
|
2876
|
+
details?: unknown;
|
|
2877
|
+
};
|
|
2878
|
+
};
|
|
2879
|
+
};
|
|
2880
|
+
/** @description Default Response */
|
|
2881
|
+
500: {
|
|
2882
|
+
headers: {
|
|
2883
|
+
[name: string]: unknown;
|
|
2884
|
+
};
|
|
2885
|
+
content: {
|
|
2886
|
+
"application/json": {
|
|
2887
|
+
error: string;
|
|
2888
|
+
details?: unknown;
|
|
2889
|
+
};
|
|
2890
|
+
};
|
|
2891
|
+
};
|
|
2892
|
+
};
|
|
2893
|
+
};
|
|
2894
|
+
delete?: never;
|
|
2895
|
+
options?: never;
|
|
2896
|
+
head?: never;
|
|
2897
|
+
patch?: never;
|
|
2898
|
+
trace?: never;
|
|
2899
|
+
};
|
|
2900
|
+
"/publisher/sdk/v1/tester-reveal": {
|
|
2901
|
+
parameters: {
|
|
2902
|
+
query?: never;
|
|
2903
|
+
header?: never;
|
|
2904
|
+
path?: never;
|
|
2905
|
+
cookie?: never;
|
|
2906
|
+
};
|
|
2907
|
+
get?: never;
|
|
2908
|
+
put?: never;
|
|
2909
|
+
/** @description Record a tester reveal ping (5-shake gesture). Used to surface the device user ID in the admin portal so a tester can be added to experiment_overrides without log access. */
|
|
2910
|
+
post: {
|
|
2911
|
+
parameters: {
|
|
2912
|
+
query?: never;
|
|
2913
|
+
header?: never;
|
|
2914
|
+
path?: never;
|
|
2915
|
+
cookie?: never;
|
|
2916
|
+
};
|
|
2917
|
+
requestBody: {
|
|
2918
|
+
content: {
|
|
2919
|
+
"application/json": {
|
|
2920
|
+
/** @description SDK-assigned user ID. Same value the SDK sends as ?userId= to /config. */
|
|
2921
|
+
userId: string;
|
|
2922
|
+
/** @description Persistent person-level identifier (Apple appTransactionID on iOS). Nullable on iOS<16 / unverified. */
|
|
2923
|
+
appAccountId?: string | null;
|
|
2924
|
+
/** @enum {string} */
|
|
2925
|
+
platform: "ios" | "android";
|
|
2926
|
+
/** @description Device model identifier (e.g. iPhone15,3, Pixel 7). */
|
|
2927
|
+
deviceModel?: string | null;
|
|
2928
|
+
/** @description SDK version that fired the reveal. */
|
|
2929
|
+
sdkVersion: string;
|
|
2930
|
+
};
|
|
2931
|
+
};
|
|
2932
|
+
};
|
|
2933
|
+
responses: {
|
|
2934
|
+
/** @description Default Response */
|
|
2935
|
+
204: {
|
|
2936
|
+
headers: {
|
|
2937
|
+
[name: string]: unknown;
|
|
2938
|
+
};
|
|
2939
|
+
content: {
|
|
2940
|
+
"application/json": unknown;
|
|
2941
|
+
};
|
|
2942
|
+
};
|
|
2943
|
+
/** @description Default Response */
|
|
2944
|
+
400: {
|
|
2945
|
+
headers: {
|
|
2946
|
+
[name: string]: unknown;
|
|
2947
|
+
};
|
|
2948
|
+
content: {
|
|
2949
|
+
"application/json": {
|
|
2950
|
+
error: string;
|
|
2951
|
+
details?: unknown;
|
|
2952
|
+
};
|
|
2953
|
+
};
|
|
2954
|
+
};
|
|
2955
|
+
/** @description Default Response */
|
|
2956
|
+
401: {
|
|
2957
|
+
headers: {
|
|
2958
|
+
[name: string]: unknown;
|
|
2959
|
+
};
|
|
2960
|
+
content: {
|
|
2961
|
+
"application/json": {
|
|
2962
|
+
error: string;
|
|
2963
|
+
details?: unknown;
|
|
2964
|
+
};
|
|
2965
|
+
};
|
|
2966
|
+
};
|
|
2967
|
+
/** @description Default Response */
|
|
2968
|
+
500: {
|
|
2969
|
+
headers: {
|
|
2970
|
+
[name: string]: unknown;
|
|
2971
|
+
};
|
|
2972
|
+
content: {
|
|
2973
|
+
"application/json": {
|
|
2974
|
+
error: string;
|
|
2975
|
+
details?: unknown;
|
|
2976
|
+
};
|
|
2977
|
+
};
|
|
2978
|
+
};
|
|
2979
|
+
};
|
|
2980
|
+
};
|
|
2981
|
+
delete?: never;
|
|
2982
|
+
options?: never;
|
|
2983
|
+
head?: never;
|
|
2984
|
+
patch?: never;
|
|
2985
|
+
trace?: never;
|
|
2986
|
+
};
|
|
2987
|
+
"/publisher/sdk/v1/redemptions/claim": {
|
|
2988
|
+
parameters: {
|
|
2989
|
+
query?: never;
|
|
2990
|
+
header?: never;
|
|
2991
|
+
path?: never;
|
|
2992
|
+
cookie?: never;
|
|
2993
|
+
};
|
|
2994
|
+
get?: never;
|
|
2995
|
+
put?: never;
|
|
2996
|
+
/** @description Create a redemption claim for a partner offer. Creates the underlying transaction and a pending redemption. */
|
|
2997
|
+
post: {
|
|
2998
|
+
parameters: {
|
|
2999
|
+
query?: never;
|
|
3000
|
+
header?: never;
|
|
3001
|
+
path?: never;
|
|
3002
|
+
cookie?: never;
|
|
3003
|
+
};
|
|
3004
|
+
requestBody: {
|
|
3005
|
+
content: {
|
|
3006
|
+
"application/json": {
|
|
3007
|
+
userId: string;
|
|
3008
|
+
campaignId: string;
|
|
3009
|
+
name?: string;
|
|
3010
|
+
/** Format: email */
|
|
3011
|
+
email?: string;
|
|
3012
|
+
phone?: string;
|
|
3013
|
+
};
|
|
3014
|
+
};
|
|
3015
|
+
};
|
|
3016
|
+
responses: {
|
|
3017
|
+
/** @description Default Response */
|
|
3018
|
+
200: {
|
|
3019
|
+
headers: {
|
|
3020
|
+
[name: string]: unknown;
|
|
3021
|
+
};
|
|
3022
|
+
content: {
|
|
3023
|
+
"application/json": {
|
|
3024
|
+
/** @description Opaque token addressing this redemption (status-page URL + email/SMS) */
|
|
3025
|
+
claimToken: string;
|
|
3026
|
+
/** @description Attributable partner offer link (tracking params appended + TRANSACTION_ID substituted). Raw destination when no tracking params; "" when no destination configured. */
|
|
3027
|
+
offerUrl: string;
|
|
3028
|
+
};
|
|
3029
|
+
};
|
|
3030
|
+
};
|
|
3031
|
+
/** @description Default Response */
|
|
3032
|
+
400: {
|
|
3033
|
+
headers: {
|
|
3034
|
+
[name: string]: unknown;
|
|
3035
|
+
};
|
|
3036
|
+
content: {
|
|
3037
|
+
"application/json": {
|
|
3038
|
+
error: string;
|
|
3039
|
+
details?: unknown;
|
|
3040
|
+
};
|
|
3041
|
+
};
|
|
3042
|
+
};
|
|
3043
|
+
/** @description Default Response */
|
|
3044
|
+
401: {
|
|
3045
|
+
headers: {
|
|
3046
|
+
[name: string]: unknown;
|
|
3047
|
+
};
|
|
3048
|
+
content: {
|
|
3049
|
+
"application/json": {
|
|
3050
|
+
error: string;
|
|
3051
|
+
details?: unknown;
|
|
3052
|
+
};
|
|
3053
|
+
};
|
|
3054
|
+
};
|
|
3055
|
+
/** @description Default Response */
|
|
3056
|
+
404: {
|
|
3057
|
+
headers: {
|
|
3058
|
+
[name: string]: unknown;
|
|
3059
|
+
};
|
|
3060
|
+
content: {
|
|
3061
|
+
"application/json": {
|
|
3062
|
+
error: string;
|
|
3063
|
+
details?: unknown;
|
|
3064
|
+
};
|
|
3065
|
+
};
|
|
3066
|
+
};
|
|
3067
|
+
/** @description Default Response */
|
|
3068
|
+
409: {
|
|
3069
|
+
headers: {
|
|
3070
|
+
[name: string]: unknown;
|
|
3071
|
+
};
|
|
3072
|
+
content: {
|
|
3073
|
+
"application/json": {
|
|
3074
|
+
error: string;
|
|
3075
|
+
details?: unknown;
|
|
3076
|
+
};
|
|
3077
|
+
};
|
|
3078
|
+
};
|
|
3079
|
+
/** @description Default Response */
|
|
3080
|
+
500: {
|
|
3081
|
+
headers: {
|
|
3082
|
+
[name: string]: unknown;
|
|
3083
|
+
};
|
|
3084
|
+
content: {
|
|
3085
|
+
"application/json": {
|
|
3086
|
+
error: string;
|
|
3087
|
+
details?: unknown;
|
|
3088
|
+
};
|
|
3089
|
+
};
|
|
3090
|
+
};
|
|
3091
|
+
};
|
|
3092
|
+
};
|
|
3093
|
+
delete?: never;
|
|
3094
|
+
options?: never;
|
|
3095
|
+
head?: never;
|
|
3096
|
+
patch?: never;
|
|
3097
|
+
trace?: never;
|
|
3098
|
+
};
|
|
3099
|
+
"/publisher/sdk/v1/redemptions/send-offer-email": {
|
|
3100
|
+
parameters: {
|
|
3101
|
+
query?: never;
|
|
3102
|
+
header?: never;
|
|
3103
|
+
path?: never;
|
|
3104
|
+
cookie?: never;
|
|
3105
|
+
};
|
|
3106
|
+
get?: never;
|
|
3107
|
+
put?: never;
|
|
3108
|
+
/** @description Create a redemption claim and email the user the partner offer link + resumable status link. */
|
|
3109
|
+
post: {
|
|
3110
|
+
parameters: {
|
|
3111
|
+
query?: never;
|
|
3112
|
+
header?: never;
|
|
3113
|
+
path?: never;
|
|
3114
|
+
cookie?: never;
|
|
3115
|
+
};
|
|
3116
|
+
requestBody: {
|
|
3117
|
+
content: {
|
|
3118
|
+
"application/json": {
|
|
3119
|
+
userId: string;
|
|
3120
|
+
campaignId: string;
|
|
3121
|
+
/** Format: email */
|
|
3122
|
+
email: string;
|
|
3123
|
+
name?: string;
|
|
3124
|
+
};
|
|
3125
|
+
};
|
|
3126
|
+
};
|
|
3127
|
+
responses: {
|
|
3128
|
+
/** @description Default Response */
|
|
3129
|
+
200: {
|
|
3130
|
+
headers: {
|
|
3131
|
+
[name: string]: unknown;
|
|
3132
|
+
};
|
|
3133
|
+
content: {
|
|
3134
|
+
"application/json": {
|
|
3135
|
+
/** @description Opaque token addressing this redemption (status-page URL + email/SMS) */
|
|
3136
|
+
claimToken: string;
|
|
3137
|
+
/** @description Attributable partner offer link (tracking params appended + TRANSACTION_ID substituted). Raw destination when no tracking params; "" when no destination configured. */
|
|
3138
|
+
offerUrl: string;
|
|
3139
|
+
};
|
|
3140
|
+
};
|
|
3141
|
+
};
|
|
3142
|
+
/** @description Default Response */
|
|
3143
|
+
400: {
|
|
3144
|
+
headers: {
|
|
3145
|
+
[name: string]: unknown;
|
|
3146
|
+
};
|
|
3147
|
+
content: {
|
|
3148
|
+
"application/json": {
|
|
3149
|
+
error: string;
|
|
3150
|
+
details?: unknown;
|
|
3151
|
+
};
|
|
3152
|
+
};
|
|
3153
|
+
};
|
|
3154
|
+
/** @description Default Response */
|
|
3155
|
+
401: {
|
|
3156
|
+
headers: {
|
|
3157
|
+
[name: string]: unknown;
|
|
3158
|
+
};
|
|
3159
|
+
content: {
|
|
3160
|
+
"application/json": {
|
|
3161
|
+
error: string;
|
|
3162
|
+
details?: unknown;
|
|
3163
|
+
};
|
|
3164
|
+
};
|
|
3165
|
+
};
|
|
3166
|
+
/** @description Default Response */
|
|
3167
|
+
404: {
|
|
3168
|
+
headers: {
|
|
3169
|
+
[name: string]: unknown;
|
|
3170
|
+
};
|
|
3171
|
+
content: {
|
|
3172
|
+
"application/json": {
|
|
3173
|
+
error: string;
|
|
3174
|
+
details?: unknown;
|
|
3175
|
+
};
|
|
3176
|
+
};
|
|
3177
|
+
};
|
|
3178
|
+
/** @description Default Response */
|
|
3179
|
+
409: {
|
|
3180
|
+
headers: {
|
|
3181
|
+
[name: string]: unknown;
|
|
3182
|
+
};
|
|
3183
|
+
content: {
|
|
3184
|
+
"application/json": {
|
|
3185
|
+
error: string;
|
|
3186
|
+
details?: unknown;
|
|
3187
|
+
};
|
|
3188
|
+
};
|
|
3189
|
+
};
|
|
3190
|
+
/** @description Default Response */
|
|
3191
|
+
429: {
|
|
3192
|
+
headers: {
|
|
3193
|
+
[name: string]: unknown;
|
|
3194
|
+
};
|
|
3195
|
+
content: {
|
|
3196
|
+
"application/json": {
|
|
3197
|
+
error: string;
|
|
3198
|
+
details?: unknown;
|
|
3199
|
+
};
|
|
3200
|
+
};
|
|
3201
|
+
};
|
|
3202
|
+
/** @description Default Response */
|
|
3203
|
+
500: {
|
|
3204
|
+
headers: {
|
|
3205
|
+
[name: string]: unknown;
|
|
3206
|
+
};
|
|
3207
|
+
content: {
|
|
3208
|
+
"application/json": {
|
|
3209
|
+
error: string;
|
|
3210
|
+
details?: unknown;
|
|
3211
|
+
};
|
|
3212
|
+
};
|
|
3213
|
+
};
|
|
3214
|
+
};
|
|
3215
|
+
};
|
|
3216
|
+
delete?: never;
|
|
3217
|
+
options?: never;
|
|
3218
|
+
head?: never;
|
|
3219
|
+
patch?: never;
|
|
3220
|
+
trace?: never;
|
|
3221
|
+
};
|
|
3222
|
+
"/publisher/sdk/v1/redemptions/{claimToken}/status": {
|
|
3223
|
+
parameters: {
|
|
3224
|
+
query?: never;
|
|
3225
|
+
header?: never;
|
|
3226
|
+
path?: never;
|
|
3227
|
+
cookie?: never;
|
|
3228
|
+
};
|
|
3229
|
+
/** @description Get the status of a redemption claim (verifying | ready | redeemed | expired). */
|
|
3230
|
+
get: {
|
|
3231
|
+
parameters: {
|
|
3232
|
+
query?: never;
|
|
3233
|
+
header?: never;
|
|
3234
|
+
path: {
|
|
3235
|
+
claimToken: string;
|
|
3236
|
+
};
|
|
3237
|
+
cookie?: never;
|
|
3238
|
+
};
|
|
3239
|
+
requestBody?: never;
|
|
3240
|
+
responses: {
|
|
3241
|
+
/** @description Default Response */
|
|
3242
|
+
200: {
|
|
3243
|
+
headers: {
|
|
3244
|
+
[name: string]: unknown;
|
|
3245
|
+
};
|
|
3246
|
+
content: {
|
|
3247
|
+
"application/json": {
|
|
3248
|
+
/**
|
|
3249
|
+
* @description Wire status: pending→verifying, then ready/redeemed/expired
|
|
3250
|
+
* @enum {string}
|
|
3251
|
+
*/
|
|
3252
|
+
status: "verifying" | "ready" | "redeemed" | "expired";
|
|
3253
|
+
/** @description Partner offer that unlocks the reward, e.g. "Apple Music" */
|
|
3254
|
+
partnerLabel: string;
|
|
3255
|
+
/**
|
|
3256
|
+
* Format: date-time
|
|
3257
|
+
* @description When the reward became redeemable
|
|
3258
|
+
*/
|
|
3259
|
+
readyAt?: string;
|
|
3260
|
+
/**
|
|
3261
|
+
* Format: date-time
|
|
3262
|
+
* @description When the reward was burned
|
|
3263
|
+
*/
|
|
3264
|
+
redeemedAt?: string;
|
|
3265
|
+
/** @description Campaign this claim is for — ties a deep-linked claim to its offer card */
|
|
3266
|
+
campaignId: string;
|
|
3267
|
+
/** @description Campaign name */
|
|
3268
|
+
offerName: string;
|
|
3269
|
+
/** @description One active creative for the campaign (null if none) */
|
|
3270
|
+
creative: {
|
|
3271
|
+
/** @description Partner logo image URL */
|
|
3272
|
+
logoUrl: string | null;
|
|
3273
|
+
/** @description Primary creative image URL */
|
|
3274
|
+
primaryImageUrl: string | null;
|
|
3275
|
+
/** @description Creative title */
|
|
3276
|
+
title: string | null;
|
|
3277
|
+
} | null;
|
|
3278
|
+
};
|
|
3279
|
+
};
|
|
3280
|
+
};
|
|
3281
|
+
/** @description Default Response */
|
|
3282
|
+
401: {
|
|
3283
|
+
headers: {
|
|
3284
|
+
[name: string]: unknown;
|
|
3285
|
+
};
|
|
3286
|
+
content: {
|
|
3287
|
+
"application/json": {
|
|
3288
|
+
error: string;
|
|
3289
|
+
details?: unknown;
|
|
3290
|
+
};
|
|
3291
|
+
};
|
|
3292
|
+
};
|
|
3293
|
+
/** @description Default Response */
|
|
3294
|
+
404: {
|
|
3295
|
+
headers: {
|
|
3296
|
+
[name: string]: unknown;
|
|
3297
|
+
};
|
|
3298
|
+
content: {
|
|
3299
|
+
"application/json": {
|
|
3300
|
+
error: string;
|
|
3301
|
+
details?: unknown;
|
|
3302
|
+
};
|
|
3303
|
+
};
|
|
3304
|
+
};
|
|
3305
|
+
/** @description Default Response */
|
|
3306
|
+
500: {
|
|
3307
|
+
headers: {
|
|
3308
|
+
[name: string]: unknown;
|
|
3309
|
+
};
|
|
3310
|
+
content: {
|
|
3311
|
+
"application/json": {
|
|
3312
|
+
error: string;
|
|
3313
|
+
details?: unknown;
|
|
3314
|
+
};
|
|
3315
|
+
};
|
|
3316
|
+
};
|
|
3317
|
+
};
|
|
3318
|
+
};
|
|
3319
|
+
put?: never;
|
|
3320
|
+
post?: never;
|
|
3321
|
+
delete?: never;
|
|
3322
|
+
options?: never;
|
|
3323
|
+
head?: never;
|
|
3324
|
+
patch?: never;
|
|
3325
|
+
trace?: never;
|
|
3326
|
+
};
|
|
3327
|
+
"/publisher/sdk/v1/redemptions/{claimToken}/present": {
|
|
3328
|
+
parameters: {
|
|
3329
|
+
query?: never;
|
|
3330
|
+
header?: never;
|
|
3331
|
+
path?: never;
|
|
3332
|
+
cookie?: never;
|
|
3333
|
+
};
|
|
3334
|
+
get?: never;
|
|
3335
|
+
put?: never;
|
|
3336
|
+
/** @description Acquire/renew the exclusive presentation lease for the ready-to-redeem screen (per deviceId). */
|
|
3337
|
+
post: {
|
|
3338
|
+
parameters: {
|
|
3339
|
+
query?: never;
|
|
3340
|
+
header?: never;
|
|
3341
|
+
path: {
|
|
3342
|
+
claimToken: string;
|
|
3343
|
+
};
|
|
3344
|
+
cookie?: never;
|
|
3345
|
+
};
|
|
3346
|
+
requestBody: {
|
|
3347
|
+
content: {
|
|
3348
|
+
"application/json": {
|
|
3349
|
+
deviceId: string;
|
|
3350
|
+
};
|
|
3351
|
+
};
|
|
3352
|
+
};
|
|
3353
|
+
responses: {
|
|
3354
|
+
/** @description Default Response */
|
|
3355
|
+
200: {
|
|
3356
|
+
headers: {
|
|
3357
|
+
[name: string]: unknown;
|
|
3358
|
+
};
|
|
3359
|
+
content: {
|
|
3360
|
+
"application/json": {
|
|
3361
|
+
/** @description True when THIS device now holds the exclusive presentation lease */
|
|
3362
|
+
granted: boolean;
|
|
3363
|
+
/**
|
|
3364
|
+
* @description Wire status of the redemption (same mapping as the status endpoint)
|
|
3365
|
+
* @enum {string}
|
|
3366
|
+
*/
|
|
3367
|
+
status: "verifying" | "ready" | "redeemed" | "expired";
|
|
3368
|
+
/**
|
|
3369
|
+
* Format: date-time
|
|
3370
|
+
* @description When the granted lease lapses unless renewed (granted only)
|
|
3371
|
+
*/
|
|
3372
|
+
leaseExpiresAt?: string;
|
|
3373
|
+
/** @description Lease TTL in seconds (granted only) */
|
|
3374
|
+
ttlSeconds?: number;
|
|
3375
|
+
/** @description How often the client should re-present to renew the lease (granted only) */
|
|
3376
|
+
heartbeatIntervalSeconds?: number;
|
|
3377
|
+
/**
|
|
3378
|
+
* @description True when ready but the lease is held by another live device
|
|
3379
|
+
* @enum {boolean}
|
|
3380
|
+
*/
|
|
3381
|
+
lockedByOtherDevice?: true;
|
|
3382
|
+
};
|
|
3383
|
+
};
|
|
3384
|
+
};
|
|
3385
|
+
/** @description Default Response */
|
|
3386
|
+
400: {
|
|
3387
|
+
headers: {
|
|
3388
|
+
[name: string]: unknown;
|
|
3389
|
+
};
|
|
3390
|
+
content: {
|
|
3391
|
+
"application/json": {
|
|
3392
|
+
error: string;
|
|
3393
|
+
details?: unknown;
|
|
3394
|
+
};
|
|
3395
|
+
};
|
|
3396
|
+
};
|
|
3397
|
+
/** @description Default Response */
|
|
3398
|
+
401: {
|
|
3399
|
+
headers: {
|
|
3400
|
+
[name: string]: unknown;
|
|
3401
|
+
};
|
|
3402
|
+
content: {
|
|
3403
|
+
"application/json": {
|
|
3404
|
+
error: string;
|
|
3405
|
+
details?: unknown;
|
|
3406
|
+
};
|
|
3407
|
+
};
|
|
3408
|
+
};
|
|
3409
|
+
/** @description Default Response */
|
|
3410
|
+
404: {
|
|
3411
|
+
headers: {
|
|
3412
|
+
[name: string]: unknown;
|
|
3413
|
+
};
|
|
3414
|
+
content: {
|
|
3415
|
+
"application/json": {
|
|
3416
|
+
error: string;
|
|
3417
|
+
details?: unknown;
|
|
3418
|
+
};
|
|
3419
|
+
};
|
|
3420
|
+
};
|
|
3421
|
+
/** @description Default Response */
|
|
3422
|
+
500: {
|
|
3423
|
+
headers: {
|
|
3424
|
+
[name: string]: unknown;
|
|
3425
|
+
};
|
|
3426
|
+
content: {
|
|
3427
|
+
"application/json": {
|
|
3428
|
+
error: string;
|
|
3429
|
+
details?: unknown;
|
|
3430
|
+
};
|
|
3431
|
+
};
|
|
3432
|
+
};
|
|
3433
|
+
};
|
|
3434
|
+
};
|
|
3435
|
+
delete?: never;
|
|
3436
|
+
options?: never;
|
|
3437
|
+
head?: never;
|
|
3438
|
+
patch?: never;
|
|
3439
|
+
trace?: never;
|
|
3440
|
+
};
|
|
3441
|
+
"/publisher/sdk/v1/redemptions/{claimToken}/release": {
|
|
3442
|
+
parameters: {
|
|
3443
|
+
query?: never;
|
|
3444
|
+
header?: never;
|
|
3445
|
+
path?: never;
|
|
3446
|
+
cookie?: never;
|
|
3447
|
+
};
|
|
3448
|
+
get?: never;
|
|
3449
|
+
put?: never;
|
|
3450
|
+
/** @description Release the presentation lease held by this device (per deviceId). */
|
|
3451
|
+
post: {
|
|
3452
|
+
parameters: {
|
|
3453
|
+
query?: never;
|
|
3454
|
+
header?: never;
|
|
3455
|
+
path: {
|
|
3456
|
+
claimToken: string;
|
|
3457
|
+
};
|
|
3458
|
+
cookie?: never;
|
|
3459
|
+
};
|
|
3460
|
+
requestBody: {
|
|
3461
|
+
content: {
|
|
3462
|
+
"application/json": {
|
|
3463
|
+
deviceId: string;
|
|
3464
|
+
};
|
|
3465
|
+
};
|
|
3466
|
+
};
|
|
3467
|
+
responses: {
|
|
3468
|
+
/** @description Default Response */
|
|
3469
|
+
200: {
|
|
3470
|
+
headers: {
|
|
3471
|
+
[name: string]: unknown;
|
|
3472
|
+
};
|
|
3473
|
+
content: {
|
|
3474
|
+
"application/json": {
|
|
3475
|
+
/** @enum {boolean} */
|
|
3476
|
+
ok: true;
|
|
3477
|
+
};
|
|
3478
|
+
};
|
|
3479
|
+
};
|
|
3480
|
+
/** @description Default Response */
|
|
3481
|
+
400: {
|
|
3482
|
+
headers: {
|
|
3483
|
+
[name: string]: unknown;
|
|
3484
|
+
};
|
|
3485
|
+
content: {
|
|
3486
|
+
"application/json": {
|
|
3487
|
+
error: string;
|
|
3488
|
+
details?: unknown;
|
|
3489
|
+
};
|
|
3490
|
+
};
|
|
3491
|
+
};
|
|
3492
|
+
/** @description Default Response */
|
|
3493
|
+
401: {
|
|
3494
|
+
headers: {
|
|
3495
|
+
[name: string]: unknown;
|
|
3496
|
+
};
|
|
3497
|
+
content: {
|
|
3498
|
+
"application/json": {
|
|
3499
|
+
error: string;
|
|
3500
|
+
details?: unknown;
|
|
3501
|
+
};
|
|
3502
|
+
};
|
|
3503
|
+
};
|
|
3504
|
+
/** @description Default Response */
|
|
3505
|
+
404: {
|
|
3506
|
+
headers: {
|
|
3507
|
+
[name: string]: unknown;
|
|
3508
|
+
};
|
|
3509
|
+
content: {
|
|
3510
|
+
"application/json": {
|
|
3511
|
+
error: string;
|
|
3512
|
+
details?: unknown;
|
|
3513
|
+
};
|
|
3514
|
+
};
|
|
3515
|
+
};
|
|
3516
|
+
/** @description Default Response */
|
|
3517
|
+
500: {
|
|
3518
|
+
headers: {
|
|
3519
|
+
[name: string]: unknown;
|
|
3520
|
+
};
|
|
3521
|
+
content: {
|
|
3522
|
+
"application/json": {
|
|
3523
|
+
error: string;
|
|
3524
|
+
details?: unknown;
|
|
3525
|
+
};
|
|
3526
|
+
};
|
|
3527
|
+
};
|
|
3528
|
+
};
|
|
3529
|
+
};
|
|
3530
|
+
delete?: never;
|
|
3531
|
+
options?: never;
|
|
3532
|
+
head?: never;
|
|
3533
|
+
patch?: never;
|
|
3534
|
+
trace?: never;
|
|
3535
|
+
};
|
|
3536
|
+
"/publisher/sdk/v1/redemptions/{claimToken}/redeem": {
|
|
3537
|
+
parameters: {
|
|
3538
|
+
query?: never;
|
|
3539
|
+
header?: never;
|
|
3540
|
+
path?: never;
|
|
3541
|
+
cookie?: never;
|
|
3542
|
+
};
|
|
3543
|
+
get?: never;
|
|
3544
|
+
put?: never;
|
|
3545
|
+
/** @description Atomically burn a ready redemption. Dead on every device thereafter. */
|
|
3546
|
+
post: {
|
|
3547
|
+
parameters: {
|
|
3548
|
+
query?: never;
|
|
3549
|
+
header?: never;
|
|
3550
|
+
path: {
|
|
3551
|
+
claimToken: string;
|
|
3552
|
+
};
|
|
3553
|
+
cookie?: never;
|
|
3554
|
+
};
|
|
3555
|
+
requestBody?: {
|
|
3556
|
+
content: {
|
|
3557
|
+
"application/json": {
|
|
3558
|
+
deviceId?: string;
|
|
3559
|
+
};
|
|
3560
|
+
};
|
|
3561
|
+
};
|
|
3562
|
+
responses: {
|
|
3563
|
+
/** @description Default Response */
|
|
3564
|
+
200: {
|
|
3565
|
+
headers: {
|
|
3566
|
+
[name: string]: unknown;
|
|
3567
|
+
};
|
|
3568
|
+
content: {
|
|
3569
|
+
"application/json": {
|
|
3570
|
+
/** @enum {boolean} */
|
|
3571
|
+
ok: true;
|
|
3572
|
+
/**
|
|
3573
|
+
* Format: date-time
|
|
3574
|
+
* @description Server time the burn committed
|
|
3575
|
+
*/
|
|
3576
|
+
redeemedAt: string;
|
|
3577
|
+
};
|
|
3578
|
+
};
|
|
3579
|
+
};
|
|
3580
|
+
/** @description Default Response */
|
|
3581
|
+
400: {
|
|
3582
|
+
headers: {
|
|
3583
|
+
[name: string]: unknown;
|
|
3584
|
+
};
|
|
3585
|
+
content: {
|
|
3586
|
+
"application/json": {
|
|
3587
|
+
error: string;
|
|
3588
|
+
details?: unknown;
|
|
3589
|
+
};
|
|
3590
|
+
};
|
|
3591
|
+
};
|
|
3592
|
+
/** @description Default Response */
|
|
3593
|
+
401: {
|
|
3594
|
+
headers: {
|
|
3595
|
+
[name: string]: unknown;
|
|
3596
|
+
};
|
|
3597
|
+
content: {
|
|
3598
|
+
"application/json": {
|
|
3599
|
+
error: string;
|
|
3600
|
+
details?: unknown;
|
|
3601
|
+
};
|
|
3602
|
+
};
|
|
3603
|
+
};
|
|
3604
|
+
/** @description Default Response */
|
|
3605
|
+
404: {
|
|
3606
|
+
headers: {
|
|
3607
|
+
[name: string]: unknown;
|
|
3608
|
+
};
|
|
3609
|
+
content: {
|
|
3610
|
+
"application/json": {
|
|
3611
|
+
error: string;
|
|
3612
|
+
details?: unknown;
|
|
3613
|
+
};
|
|
3614
|
+
};
|
|
3615
|
+
};
|
|
3616
|
+
/** @description Default Response */
|
|
3617
|
+
409: {
|
|
3618
|
+
headers: {
|
|
3619
|
+
[name: string]: unknown;
|
|
3620
|
+
};
|
|
3621
|
+
content: {
|
|
3622
|
+
"application/json": {
|
|
3623
|
+
error: string;
|
|
3624
|
+
details?: unknown;
|
|
3625
|
+
};
|
|
3626
|
+
};
|
|
3627
|
+
};
|
|
3628
|
+
/** @description Default Response */
|
|
3629
|
+
500: {
|
|
3630
|
+
headers: {
|
|
3631
|
+
[name: string]: unknown;
|
|
3632
|
+
};
|
|
3633
|
+
content: {
|
|
3634
|
+
"application/json": {
|
|
3635
|
+
error: string;
|
|
3636
|
+
details?: unknown;
|
|
3637
|
+
};
|
|
3638
|
+
};
|
|
3639
|
+
};
|
|
3640
|
+
};
|
|
3641
|
+
};
|
|
3642
|
+
delete?: never;
|
|
3643
|
+
options?: never;
|
|
3644
|
+
head?: never;
|
|
3645
|
+
patch?: never;
|
|
3646
|
+
trace?: never;
|
|
3647
|
+
};
|
|
3648
|
+
"/v1/events": {
|
|
3649
|
+
parameters: {
|
|
3650
|
+
query?: never;
|
|
3651
|
+
header?: never;
|
|
3652
|
+
path?: never;
|
|
3653
|
+
cookie?: never;
|
|
3654
|
+
};
|
|
3655
|
+
get?: never;
|
|
3656
|
+
put?: never;
|
|
3657
|
+
/** @description Ingest analytics events (single or batch). Validates with Zod and enqueues to Kafka. */
|
|
3658
|
+
post: {
|
|
3659
|
+
parameters: {
|
|
3660
|
+
query?: never;
|
|
3661
|
+
header?: never;
|
|
3662
|
+
path?: never;
|
|
3663
|
+
cookie?: never;
|
|
3664
|
+
};
|
|
3665
|
+
requestBody?: {
|
|
3666
|
+
content: {
|
|
3667
|
+
"application/json": {
|
|
3668
|
+
/** Format: uuid */
|
|
3669
|
+
event_id: string;
|
|
3670
|
+
event_name: string;
|
|
3671
|
+
/** Format: date-time */
|
|
3672
|
+
event_timestamp: string;
|
|
3673
|
+
distinct_id?: string;
|
|
3674
|
+
properties?: {
|
|
3675
|
+
[key: string]: unknown;
|
|
3676
|
+
};
|
|
3677
|
+
} | {
|
|
3678
|
+
/** Format: uuid */
|
|
3679
|
+
event_id: string;
|
|
3680
|
+
event_name: string;
|
|
3681
|
+
/** Format: date-time */
|
|
3682
|
+
event_timestamp: string;
|
|
3683
|
+
distinct_id?: string;
|
|
3684
|
+
properties?: {
|
|
3685
|
+
[key: string]: unknown;
|
|
3686
|
+
};
|
|
3687
|
+
}[];
|
|
3688
|
+
};
|
|
3689
|
+
};
|
|
3690
|
+
responses: {
|
|
3691
|
+
/** @description Default Response */
|
|
3692
|
+
202: {
|
|
3693
|
+
headers: {
|
|
3694
|
+
[name: string]: unknown;
|
|
3695
|
+
};
|
|
3696
|
+
content: {
|
|
3697
|
+
"application/json": {
|
|
3698
|
+
status: string;
|
|
3699
|
+
eventsReceived: number;
|
|
3700
|
+
};
|
|
3701
|
+
};
|
|
3702
|
+
};
|
|
3703
|
+
/** @description Default Response */
|
|
3704
|
+
400: {
|
|
3705
|
+
headers: {
|
|
3706
|
+
[name: string]: unknown;
|
|
3707
|
+
};
|
|
3708
|
+
content: {
|
|
3709
|
+
"application/json": {
|
|
3710
|
+
error: string;
|
|
3711
|
+
details?: unknown;
|
|
3712
|
+
};
|
|
3713
|
+
};
|
|
3714
|
+
};
|
|
3715
|
+
/** @description Default Response */
|
|
3716
|
+
401: {
|
|
3717
|
+
headers: {
|
|
3718
|
+
[name: string]: unknown;
|
|
3719
|
+
};
|
|
3720
|
+
content: {
|
|
3721
|
+
"application/json": {
|
|
3722
|
+
error: string;
|
|
3723
|
+
details?: unknown;
|
|
3724
|
+
};
|
|
3725
|
+
};
|
|
3726
|
+
};
|
|
3727
|
+
/** @description Default Response */
|
|
3728
|
+
500: {
|
|
3729
|
+
headers: {
|
|
3730
|
+
[name: string]: unknown;
|
|
3731
|
+
};
|
|
3732
|
+
content: {
|
|
3733
|
+
"application/json": {
|
|
3734
|
+
error: string;
|
|
3735
|
+
details?: unknown;
|
|
3736
|
+
};
|
|
3737
|
+
};
|
|
3738
|
+
};
|
|
3739
|
+
};
|
|
3740
|
+
};
|
|
3741
|
+
delete?: never;
|
|
3742
|
+
options?: never;
|
|
3743
|
+
head?: never;
|
|
3744
|
+
patch?: never;
|
|
3745
|
+
trace?: never;
|
|
3746
|
+
};
|
|
3747
|
+
}
|
|
3748
|
+
export type webhooks = Record<string, never>;
|
|
3749
|
+
export interface components {
|
|
3750
|
+
schemas: {
|
|
3751
|
+
AnalyticsEventEnvelope: {
|
|
3752
|
+
/** Format: uuid */
|
|
3753
|
+
event_id: string;
|
|
3754
|
+
event_name: string;
|
|
3755
|
+
/** Format: date-time */
|
|
3756
|
+
event_timestamp: string;
|
|
3757
|
+
distinct_id?: string;
|
|
3758
|
+
properties?: {
|
|
3759
|
+
[key: string]: unknown;
|
|
3760
|
+
};
|
|
3761
|
+
};
|
|
3762
|
+
ConfigResponse: {
|
|
3763
|
+
success: boolean;
|
|
3764
|
+
/** @description UI configuration: template + values */
|
|
3765
|
+
ui: {
|
|
3766
|
+
/**
|
|
3767
|
+
* Format: uuid
|
|
3768
|
+
* @description Selected variant ID
|
|
3769
|
+
*/
|
|
3770
|
+
variantId?: string | null;
|
|
3771
|
+
/** @description Selected variant name */
|
|
3772
|
+
variantName?: string | null;
|
|
3773
|
+
/** @description Minimum SDK version for this variant */
|
|
3774
|
+
minSdkVersion?: string | null;
|
|
3775
|
+
/** @description SDUI template with placeholders */
|
|
3776
|
+
template?: {
|
|
3777
|
+
[key: string]: unknown;
|
|
3778
|
+
} | null;
|
|
3779
|
+
/** @description Values to substitute into template */
|
|
3780
|
+
values: {
|
|
3781
|
+
/** @description Text values for template substitution */
|
|
3782
|
+
text: {
|
|
3783
|
+
/** @description App name for ${appName} substitution */
|
|
3784
|
+
appName?: string | null;
|
|
3785
|
+
/** @description Main title text */
|
|
3786
|
+
title?: string | null;
|
|
3787
|
+
/** @description Subtitle text */
|
|
3788
|
+
subtitle?: string | null;
|
|
3789
|
+
/** @description Offer description text */
|
|
3790
|
+
offerDescription?: string | null;
|
|
3791
|
+
/** @description Instructions title */
|
|
3792
|
+
instructionsTitle?: string | null;
|
|
3793
|
+
/** @description Last step header text */
|
|
3794
|
+
lastStepHeader?: string | null;
|
|
3795
|
+
/** @description Last step description */
|
|
3796
|
+
lastStepDescription?: string | null;
|
|
3797
|
+
/** @description Credit claimed title */
|
|
3798
|
+
creditClaimedTitle?: string | null;
|
|
3799
|
+
/** @description Credit claimed subtitle */
|
|
3800
|
+
creditClaimedSubtitle?: string | null;
|
|
3801
|
+
/** @description Apply credits button text */
|
|
3802
|
+
applyCreditsButton?: string | null;
|
|
3803
|
+
/** @description Accent title text */
|
|
3804
|
+
accentTitle?: string | null;
|
|
3805
|
+
/** @description Custom headline text for SDUI variant (falls back to title) */
|
|
3806
|
+
customHeadline?: string | null;
|
|
3807
|
+
/** @description Custom subheadline text for SDUI variant (falls back to subtitle) */
|
|
3808
|
+
customSubheadline?: string | null;
|
|
3809
|
+
};
|
|
3810
|
+
/** @description Appearance values */
|
|
3811
|
+
appearance: {
|
|
3812
|
+
/**
|
|
3813
|
+
* @description Appearance mode
|
|
3814
|
+
* @enum {string|null}
|
|
3815
|
+
*/
|
|
3816
|
+
mode?: "light" | "dark" | "auto" | null;
|
|
3817
|
+
/** @description Primary accent color (hex) */
|
|
3818
|
+
accentColor?: string | null;
|
|
3819
|
+
/** @description Accent title color (hex) */
|
|
3820
|
+
accentTitleColor?: string | null;
|
|
3821
|
+
};
|
|
3822
|
+
};
|
|
3823
|
+
};
|
|
3824
|
+
/** @description Entitlement configuration (IAP or Native mode) */
|
|
3825
|
+
entitlements: {
|
|
3826
|
+
/** @description IAP config. If productId exists → IAP mode. */
|
|
3827
|
+
iap?: {
|
|
3828
|
+
/** @description Store-level subscription product ID. App Store Connect product ID for iOS apps, Google Play subscription product ID for Android apps. */
|
|
3829
|
+
productId: string;
|
|
3830
|
+
/** @description Google Play subscription offer ID (e.g. 'free-trial-1m'). Null or omitted for iOS apps. The Android SDK uses this value to look up the matching SubscriptionOfferDetails in the product's base plan and pass its offer token to Play Billing's BillingFlowParams.setOfferToken(). */
|
|
3831
|
+
offerId?: string | null;
|
|
3832
|
+
/** @description Google Play base plan ID (e.g. 'monthly', 'annual'); null for iOS. Disambiguates products that expose multiple base plans so the Android SDK resolves the correct SubscriptionOfferDetails / price for the intended base plan instead of defaulting to the first one. */
|
|
3833
|
+
basePlanId?: string | null;
|
|
3834
|
+
/** @description Display name for the premium tier (e.g. 'Premium', 'Pro'). Used in SDUI templates via ${premiumTierName}. */
|
|
3835
|
+
premiumTierName?: string | null;
|
|
3836
|
+
} | null;
|
|
3837
|
+
/** @description Native/Encore-managed entitlement. Fallback if no IAP. */
|
|
3838
|
+
native?: {
|
|
3839
|
+
/** @description Entitlement type (e.g., 'free_trial', 'credit', 'discount') */
|
|
3840
|
+
type: string;
|
|
3841
|
+
/** @description Raw value for template substitution (e.g., '3') */
|
|
3842
|
+
value: string;
|
|
3843
|
+
/** @description Raw unit for template substitution (e.g., 'months', 'days') */
|
|
3844
|
+
unit: string;
|
|
3845
|
+
/** @description Computed duration in days for SDK logic */
|
|
3846
|
+
durationDays: number;
|
|
3847
|
+
} | null;
|
|
3848
|
+
};
|
|
3849
|
+
/** @description Experiment configurations */
|
|
3850
|
+
experiments: {
|
|
3851
|
+
/** @description NCL experiment config. Null if not configured. */
|
|
3852
|
+
ncl?: {
|
|
3853
|
+
/** @description Percent of eligible users assigned to Treatment */
|
|
3854
|
+
rolloutPct: number;
|
|
3855
|
+
/** @description Epoch identifier. Change resets cohort assignments. */
|
|
3856
|
+
assignmentVersion: number;
|
|
3857
|
+
/** @description Kill switch. If false, all users go to Control. */
|
|
3858
|
+
enabled: boolean;
|
|
3859
|
+
} | null;
|
|
3860
|
+
};
|
|
3861
|
+
/** @description Resolved locale served in this response (language-only, e.g. 'es'). Absent on pre-localization responses. */
|
|
3862
|
+
locale?: string;
|
|
3863
|
+
};
|
|
3864
|
+
OffersSearchResponse: {
|
|
3865
|
+
success: boolean;
|
|
3866
|
+
offers: {
|
|
3867
|
+
/** Format: uuid */
|
|
3868
|
+
id: string;
|
|
3869
|
+
/** Format: uuid */
|
|
3870
|
+
organizationId: string;
|
|
3871
|
+
name: string;
|
|
3872
|
+
/** @enum {string} */
|
|
3873
|
+
payoutModel: "CPA" | "CPC" | "CPI" | "CPM";
|
|
3874
|
+
payoutAmount: number;
|
|
3875
|
+
/** @description Attribution platform (e.g., rakuten, impact, tune) */
|
|
3876
|
+
attributionPlatform: string | null;
|
|
3877
|
+
targetCountries: string[];
|
|
3878
|
+
/**
|
|
3879
|
+
* Format: uri
|
|
3880
|
+
* @description Primary destination URL for the campaign
|
|
3881
|
+
*/
|
|
3882
|
+
destinationUrl: string;
|
|
3883
|
+
/**
|
|
3884
|
+
* Format: date-time
|
|
3885
|
+
* @description UTC timestamp
|
|
3886
|
+
*/
|
|
3887
|
+
startDate: string;
|
|
3888
|
+
/**
|
|
3889
|
+
* Format: date-time
|
|
3890
|
+
* @description UTC timestamp (null for ongoing)
|
|
3891
|
+
*/
|
|
3892
|
+
endDate: string | null;
|
|
3893
|
+
/** @enum {string} */
|
|
3894
|
+
status: "active" | "archived" | "awaiting_approval" | "completed" | "draft";
|
|
3895
|
+
/**
|
|
3896
|
+
* @description Current validation status of the destination URL
|
|
3897
|
+
* @enum {string}
|
|
3898
|
+
*/
|
|
3899
|
+
linkStatus: "broken" | "error" | "text_mismatch" | "unchecked" | "valid";
|
|
3900
|
+
/** @description Expected domain of the destination URL */
|
|
3901
|
+
expectedDomain: string | null;
|
|
3902
|
+
/** @description Internal campaign notes */
|
|
3903
|
+
notes: string | null;
|
|
3904
|
+
/** @description Publisher-facing notes about this offer */
|
|
3905
|
+
publisherNotes: string | null;
|
|
3906
|
+
priority: number | null;
|
|
3907
|
+
/** @description When true, this campaign is auto-granted to every newly created app. Independent of priority (which controls ranking order only). */
|
|
3908
|
+
defaultCatalog: boolean;
|
|
3909
|
+
/**
|
|
3910
|
+
* @description blacklist (default): all apps eligible; whitelist: only apps in campaign_allowed_apps are eligible
|
|
3911
|
+
* @enum {string}
|
|
3912
|
+
*/
|
|
3913
|
+
targetingMode: "blacklist" | "whitelist";
|
|
3914
|
+
/** @description New/discounted price for the offer */
|
|
3915
|
+
newPrice: string | null;
|
|
3916
|
+
/** @description Original price before discount */
|
|
3917
|
+
oldPrice: string | null;
|
|
3918
|
+
/** @description User-facing value proposition, e.g., "3 months of Hulu free". Rendered in the deal email. */
|
|
3919
|
+
perk: string | null;
|
|
3920
|
+
/**
|
|
3921
|
+
* @description Constrained promo badge for in-app offer cards: free_trial | discount. Drives the card pill display AND client-side free-trial-vs-discount logic. Clients map the enum to display text + free-trial boolean. NULL means no badge.
|
|
3922
|
+
* @enum {string|null}
|
|
3923
|
+
*/
|
|
3924
|
+
badgeLabel: "free_trial" | "discount" | null;
|
|
3925
|
+
/** Format: date-time */
|
|
3926
|
+
createdAt: string;
|
|
3927
|
+
/** Format: date-time */
|
|
3928
|
+
updatedAt: string;
|
|
3929
|
+
/** @description Included when fetching with relations */
|
|
3930
|
+
organization?: {
|
|
3931
|
+
/** Format: uuid */
|
|
3932
|
+
id: string;
|
|
3933
|
+
name: string;
|
|
3934
|
+
description: string | null;
|
|
3935
|
+
url: string | null;
|
|
3936
|
+
logoUrl: string | null;
|
|
3937
|
+
/** Format: date-time */
|
|
3938
|
+
createdAt: string;
|
|
3939
|
+
/** Format: date-time */
|
|
3940
|
+
updatedAt: string;
|
|
3941
|
+
};
|
|
3942
|
+
/** @description Included if includeCreatives=true */
|
|
3943
|
+
creatives?: {
|
|
3944
|
+
/** Format: uuid */
|
|
3945
|
+
id: string;
|
|
3946
|
+
/** Format: uuid */
|
|
3947
|
+
campaignId: string;
|
|
3948
|
+
name: string;
|
|
3949
|
+
title: string;
|
|
3950
|
+
subtitle: string | null;
|
|
3951
|
+
description: string | null;
|
|
3952
|
+
/** Format: uri */
|
|
3953
|
+
primaryImageUrl: string;
|
|
3954
|
+
/** Format: uri */
|
|
3955
|
+
logoUrl: string | null;
|
|
3956
|
+
additionalImages: string[] | null;
|
|
3957
|
+
ctaText: string;
|
|
3958
|
+
/**
|
|
3959
|
+
* Format: uri
|
|
3960
|
+
* @description Optional override for campaign destinationUrl
|
|
3961
|
+
*/
|
|
3962
|
+
destinationUrl: string | null;
|
|
3963
|
+
trackingParameters: {
|
|
3964
|
+
[key: string]: unknown;
|
|
3965
|
+
} | null;
|
|
3966
|
+
weight: number | null;
|
|
3967
|
+
/** @enum {string} */
|
|
3968
|
+
status: "active" | "archived" | "draft" | "paused";
|
|
3969
|
+
instructions: {
|
|
3970
|
+
title: string;
|
|
3971
|
+
subtitle: string;
|
|
3972
|
+
ctaButtonText?: string;
|
|
3973
|
+
}[] | null;
|
|
3974
|
+
/** @description Short, actionable phrases (max 1-3) that guide users. Examples: "sign up, create registry", "add to cart" */
|
|
3975
|
+
quickInstructions: string | null;
|
|
3976
|
+
/** @description Minimum SDK version required (null = no minimum) */
|
|
3977
|
+
minSdkVersion: string | null;
|
|
3978
|
+
/** @description Maximum SDK version supported (null = no maximum) */
|
|
3979
|
+
maxSdkVersion: string | null;
|
|
3980
|
+
/** @description Platforms this creative supports (empty = all platforms) */
|
|
3981
|
+
supportedPlatforms: ("android" | "ios" | "web")[] | null;
|
|
3982
|
+
/** @description Tooltip text to display on hover in Web SDK offer carousel (null = use default text) */
|
|
3983
|
+
tooltipText: string | null;
|
|
3984
|
+
/** @description Optional dynamic text overlay config. NULL = no overlay (legacy creatives). */
|
|
3985
|
+
overlayConfig?: {
|
|
3986
|
+
/** @enum {number} */
|
|
3987
|
+
version: 1;
|
|
3988
|
+
aspectRatio?: number;
|
|
3989
|
+
overlays: {
|
|
3990
|
+
id: string;
|
|
3991
|
+
/** @description Template string resolved via SDUIContext.resolveTemplateText (e.g., '${premiumTierName}') */
|
|
3992
|
+
template: string;
|
|
3993
|
+
/** @description Top-left of the zone, as ratios of the rendered image */
|
|
3994
|
+
position: {
|
|
3995
|
+
x: number;
|
|
3996
|
+
y: number;
|
|
3997
|
+
};
|
|
3998
|
+
dimensions: {
|
|
3999
|
+
width: number;
|
|
4000
|
+
height: number;
|
|
4001
|
+
};
|
|
4002
|
+
/**
|
|
4003
|
+
* @description Horizontal alignment for wrapped text within the zone
|
|
4004
|
+
* @enum {string}
|
|
4005
|
+
*/
|
|
4006
|
+
alignment: "leading" | "center" | "trailing";
|
|
4007
|
+
typography: {
|
|
4008
|
+
fontSizeRatio: number;
|
|
4009
|
+
fontWeight: string;
|
|
4010
|
+
color: {
|
|
4011
|
+
hex: string;
|
|
4012
|
+
} | {
|
|
4013
|
+
semantic: string;
|
|
4014
|
+
} | {
|
|
4015
|
+
appearance: string;
|
|
4016
|
+
};
|
|
4017
|
+
lineHeight?: number;
|
|
4018
|
+
letterSpacing?: number;
|
|
4019
|
+
};
|
|
4020
|
+
overflow?: {
|
|
4021
|
+
minScaleFactor?: number;
|
|
4022
|
+
maxLines?: number;
|
|
4023
|
+
/** @enum {string} */
|
|
4024
|
+
truncation?: "head" | "middle" | "tail" | "clip";
|
|
4025
|
+
};
|
|
4026
|
+
}[];
|
|
4027
|
+
} | null;
|
|
4028
|
+
/** Format: date-time */
|
|
4029
|
+
createdAt: string;
|
|
4030
|
+
/** Format: date-time */
|
|
4031
|
+
updatedAt: string;
|
|
4032
|
+
}[];
|
|
4033
|
+
}[];
|
|
4034
|
+
metadata: {
|
|
4035
|
+
/** @description Total offers available */
|
|
4036
|
+
total: number;
|
|
4037
|
+
limit: number;
|
|
4038
|
+
offset: number;
|
|
4039
|
+
/** @description Whether there are more offers available */
|
|
4040
|
+
hasMore: boolean;
|
|
4041
|
+
executionTimeMs: number;
|
|
4042
|
+
/**
|
|
4043
|
+
* Format: uuid
|
|
4044
|
+
* @description Session ID used for randomization - use this for subsequent pagination requests
|
|
4045
|
+
*/
|
|
4046
|
+
requestId: string;
|
|
4047
|
+
};
|
|
4048
|
+
/** @description Resolved locale served in this response (language-only, e.g. 'es'). Absent on pre-localization responses. */
|
|
4049
|
+
locale?: string;
|
|
4050
|
+
error?: string | null;
|
|
4051
|
+
};
|
|
4052
|
+
Campaign: {
|
|
4053
|
+
/** Format: uuid */
|
|
4054
|
+
id: string;
|
|
4055
|
+
/** Format: uuid */
|
|
4056
|
+
organizationId: string;
|
|
4057
|
+
name: string;
|
|
4058
|
+
/** @enum {string} */
|
|
4059
|
+
payoutModel: "CPA" | "CPC" | "CPI" | "CPM";
|
|
4060
|
+
payoutAmount: number;
|
|
4061
|
+
/** @description Attribution platform (e.g., rakuten, impact, tune) */
|
|
4062
|
+
attributionPlatform: string | null;
|
|
4063
|
+
targetCountries: string[];
|
|
4064
|
+
/**
|
|
4065
|
+
* Format: uri
|
|
4066
|
+
* @description Primary destination URL for the campaign
|
|
4067
|
+
*/
|
|
4068
|
+
destinationUrl: string;
|
|
4069
|
+
/**
|
|
4070
|
+
* Format: date-time
|
|
4071
|
+
* @description UTC timestamp
|
|
4072
|
+
*/
|
|
4073
|
+
startDate: string;
|
|
4074
|
+
/**
|
|
4075
|
+
* Format: date-time
|
|
4076
|
+
* @description UTC timestamp (null for ongoing)
|
|
4077
|
+
*/
|
|
4078
|
+
endDate: string | null;
|
|
4079
|
+
/** @enum {string} */
|
|
4080
|
+
status: "active" | "archived" | "awaiting_approval" | "completed" | "draft";
|
|
4081
|
+
/**
|
|
4082
|
+
* @description Current validation status of the destination URL
|
|
4083
|
+
* @enum {string}
|
|
4084
|
+
*/
|
|
4085
|
+
linkStatus: "broken" | "error" | "text_mismatch" | "unchecked" | "valid";
|
|
4086
|
+
/** @description Expected domain of the destination URL */
|
|
4087
|
+
expectedDomain: string | null;
|
|
4088
|
+
/** @description Internal campaign notes */
|
|
4089
|
+
notes: string | null;
|
|
4090
|
+
/** @description Publisher-facing notes about this offer */
|
|
4091
|
+
publisherNotes: string | null;
|
|
4092
|
+
priority: number | null;
|
|
4093
|
+
/** @description When true, this campaign is auto-granted to every newly created app. Independent of priority (which controls ranking order only). */
|
|
4094
|
+
defaultCatalog: boolean;
|
|
4095
|
+
/**
|
|
4096
|
+
* @description blacklist (default): all apps eligible; whitelist: only apps in campaign_allowed_apps are eligible
|
|
4097
|
+
* @enum {string}
|
|
4098
|
+
*/
|
|
4099
|
+
targetingMode: "blacklist" | "whitelist";
|
|
4100
|
+
/** @description New/discounted price for the offer */
|
|
4101
|
+
newPrice: string | null;
|
|
4102
|
+
/** @description Original price before discount */
|
|
4103
|
+
oldPrice: string | null;
|
|
4104
|
+
/** @description User-facing value proposition, e.g., "3 months of Hulu free". Rendered in the deal email. */
|
|
4105
|
+
perk: string | null;
|
|
4106
|
+
/**
|
|
4107
|
+
* @description Constrained promo badge for in-app offer cards: free_trial | discount. Drives the card pill display AND client-side free-trial-vs-discount logic. Clients map the enum to display text + free-trial boolean. NULL means no badge.
|
|
4108
|
+
* @enum {string|null}
|
|
4109
|
+
*/
|
|
4110
|
+
badgeLabel: "free_trial" | "discount" | null;
|
|
4111
|
+
/** Format: date-time */
|
|
4112
|
+
createdAt: string;
|
|
4113
|
+
/** Format: date-time */
|
|
4114
|
+
updatedAt: string;
|
|
4115
|
+
/** @description Included when fetching with relations */
|
|
4116
|
+
organization?: {
|
|
4117
|
+
/** Format: uuid */
|
|
4118
|
+
id: string;
|
|
4119
|
+
name: string;
|
|
4120
|
+
description: string | null;
|
|
4121
|
+
url: string | null;
|
|
4122
|
+
logoUrl: string | null;
|
|
4123
|
+
/** Format: date-time */
|
|
4124
|
+
createdAt: string;
|
|
4125
|
+
/** Format: date-time */
|
|
4126
|
+
updatedAt: string;
|
|
4127
|
+
};
|
|
4128
|
+
/** @description Included if includeCreatives=true */
|
|
4129
|
+
creatives?: {
|
|
4130
|
+
/** Format: uuid */
|
|
4131
|
+
id: string;
|
|
4132
|
+
/** Format: uuid */
|
|
4133
|
+
campaignId: string;
|
|
4134
|
+
name: string;
|
|
4135
|
+
title: string;
|
|
4136
|
+
subtitle: string | null;
|
|
4137
|
+
description: string | null;
|
|
4138
|
+
/** Format: uri */
|
|
4139
|
+
primaryImageUrl: string;
|
|
4140
|
+
/** Format: uri */
|
|
4141
|
+
logoUrl: string | null;
|
|
4142
|
+
additionalImages: string[] | null;
|
|
4143
|
+
ctaText: string;
|
|
4144
|
+
/**
|
|
4145
|
+
* Format: uri
|
|
4146
|
+
* @description Optional override for campaign destinationUrl
|
|
4147
|
+
*/
|
|
4148
|
+
destinationUrl: string | null;
|
|
4149
|
+
trackingParameters: {
|
|
4150
|
+
[key: string]: unknown;
|
|
4151
|
+
} | null;
|
|
4152
|
+
weight: number | null;
|
|
4153
|
+
/** @enum {string} */
|
|
4154
|
+
status: "active" | "archived" | "draft" | "paused";
|
|
4155
|
+
instructions: {
|
|
4156
|
+
title: string;
|
|
4157
|
+
subtitle: string;
|
|
4158
|
+
ctaButtonText?: string;
|
|
4159
|
+
}[] | null;
|
|
4160
|
+
/** @description Short, actionable phrases (max 1-3) that guide users. Examples: "sign up, create registry", "add to cart" */
|
|
4161
|
+
quickInstructions: string | null;
|
|
4162
|
+
/** @description Minimum SDK version required (null = no minimum) */
|
|
4163
|
+
minSdkVersion: string | null;
|
|
4164
|
+
/** @description Maximum SDK version supported (null = no maximum) */
|
|
4165
|
+
maxSdkVersion: string | null;
|
|
4166
|
+
/** @description Platforms this creative supports (empty = all platforms) */
|
|
4167
|
+
supportedPlatforms: ("android" | "ios" | "web")[] | null;
|
|
4168
|
+
/** @description Tooltip text to display on hover in Web SDK offer carousel (null = use default text) */
|
|
4169
|
+
tooltipText: string | null;
|
|
4170
|
+
/** @description Optional dynamic text overlay config. NULL = no overlay (legacy creatives). */
|
|
4171
|
+
overlayConfig?: {
|
|
4172
|
+
/** @enum {number} */
|
|
4173
|
+
version: 1;
|
|
4174
|
+
aspectRatio?: number;
|
|
4175
|
+
overlays: {
|
|
4176
|
+
id: string;
|
|
4177
|
+
/** @description Template string resolved via SDUIContext.resolveTemplateText (e.g., '${premiumTierName}') */
|
|
4178
|
+
template: string;
|
|
4179
|
+
/** @description Top-left of the zone, as ratios of the rendered image */
|
|
4180
|
+
position: {
|
|
4181
|
+
x: number;
|
|
4182
|
+
y: number;
|
|
4183
|
+
};
|
|
4184
|
+
dimensions: {
|
|
4185
|
+
width: number;
|
|
4186
|
+
height: number;
|
|
4187
|
+
};
|
|
4188
|
+
/**
|
|
4189
|
+
* @description Horizontal alignment for wrapped text within the zone
|
|
4190
|
+
* @enum {string}
|
|
4191
|
+
*/
|
|
4192
|
+
alignment: "leading" | "center" | "trailing";
|
|
4193
|
+
typography: {
|
|
4194
|
+
fontSizeRatio: number;
|
|
4195
|
+
fontWeight: string;
|
|
4196
|
+
color: {
|
|
4197
|
+
hex: string;
|
|
4198
|
+
} | {
|
|
4199
|
+
semantic: string;
|
|
4200
|
+
} | {
|
|
4201
|
+
appearance: string;
|
|
4202
|
+
};
|
|
4203
|
+
lineHeight?: number;
|
|
4204
|
+
letterSpacing?: number;
|
|
4205
|
+
};
|
|
4206
|
+
overflow?: {
|
|
4207
|
+
minScaleFactor?: number;
|
|
4208
|
+
maxLines?: number;
|
|
4209
|
+
/** @enum {string} */
|
|
4210
|
+
truncation?: "head" | "middle" | "tail" | "clip";
|
|
4211
|
+
};
|
|
4212
|
+
}[];
|
|
4213
|
+
} | null;
|
|
4214
|
+
/** Format: date-time */
|
|
4215
|
+
createdAt: string;
|
|
4216
|
+
/** Format: date-time */
|
|
4217
|
+
updatedAt: string;
|
|
4218
|
+
}[];
|
|
4219
|
+
};
|
|
4220
|
+
Creative: {
|
|
4221
|
+
/** Format: uuid */
|
|
4222
|
+
id: string;
|
|
4223
|
+
/** Format: uuid */
|
|
4224
|
+
campaignId: string;
|
|
4225
|
+
name: string;
|
|
4226
|
+
title: string;
|
|
4227
|
+
subtitle: string | null;
|
|
4228
|
+
description: string | null;
|
|
4229
|
+
/** Format: uri */
|
|
4230
|
+
primaryImageUrl: string;
|
|
4231
|
+
/** Format: uri */
|
|
4232
|
+
logoUrl: string | null;
|
|
4233
|
+
additionalImages: string[] | null;
|
|
4234
|
+
ctaText: string;
|
|
4235
|
+
/**
|
|
4236
|
+
* Format: uri
|
|
4237
|
+
* @description Optional override for campaign destinationUrl
|
|
4238
|
+
*/
|
|
4239
|
+
destinationUrl: string | null;
|
|
4240
|
+
trackingParameters: {
|
|
4241
|
+
[key: string]: unknown;
|
|
4242
|
+
} | null;
|
|
4243
|
+
weight: number | null;
|
|
4244
|
+
/** @enum {string} */
|
|
4245
|
+
status: "active" | "archived" | "draft" | "paused";
|
|
4246
|
+
instructions: {
|
|
4247
|
+
title: string;
|
|
4248
|
+
subtitle: string;
|
|
4249
|
+
ctaButtonText?: string;
|
|
4250
|
+
}[] | null;
|
|
4251
|
+
/** @description Short, actionable phrases (max 1-3) that guide users. Examples: "sign up, create registry", "add to cart" */
|
|
4252
|
+
quickInstructions: string | null;
|
|
4253
|
+
/** @description Minimum SDK version required (null = no minimum) */
|
|
4254
|
+
minSdkVersion: string | null;
|
|
4255
|
+
/** @description Maximum SDK version supported (null = no maximum) */
|
|
4256
|
+
maxSdkVersion: string | null;
|
|
4257
|
+
/** @description Platforms this creative supports (empty = all platforms) */
|
|
4258
|
+
supportedPlatforms: ("android" | "ios" | "web")[] | null;
|
|
4259
|
+
/** @description Tooltip text to display on hover in Web SDK offer carousel (null = use default text) */
|
|
4260
|
+
tooltipText: string | null;
|
|
4261
|
+
/** @description Optional dynamic text overlay config. NULL = no overlay (legacy creatives). */
|
|
4262
|
+
overlayConfig?: {
|
|
4263
|
+
/** @enum {number} */
|
|
4264
|
+
version: 1;
|
|
4265
|
+
aspectRatio?: number;
|
|
4266
|
+
overlays: {
|
|
4267
|
+
id: string;
|
|
4268
|
+
/** @description Template string resolved via SDUIContext.resolveTemplateText (e.g., '${premiumTierName}') */
|
|
4269
|
+
template: string;
|
|
4270
|
+
/** @description Top-left of the zone, as ratios of the rendered image */
|
|
4271
|
+
position: {
|
|
4272
|
+
x: number;
|
|
4273
|
+
y: number;
|
|
4274
|
+
};
|
|
4275
|
+
dimensions: {
|
|
4276
|
+
width: number;
|
|
4277
|
+
height: number;
|
|
4278
|
+
};
|
|
4279
|
+
/**
|
|
4280
|
+
* @description Horizontal alignment for wrapped text within the zone
|
|
4281
|
+
* @enum {string}
|
|
4282
|
+
*/
|
|
4283
|
+
alignment: "leading" | "center" | "trailing";
|
|
4284
|
+
typography: {
|
|
4285
|
+
fontSizeRatio: number;
|
|
4286
|
+
fontWeight: string;
|
|
4287
|
+
color: {
|
|
4288
|
+
hex: string;
|
|
4289
|
+
} | {
|
|
4290
|
+
semantic: string;
|
|
4291
|
+
} | {
|
|
4292
|
+
appearance: string;
|
|
4293
|
+
};
|
|
4294
|
+
lineHeight?: number;
|
|
4295
|
+
letterSpacing?: number;
|
|
4296
|
+
};
|
|
4297
|
+
overflow?: {
|
|
4298
|
+
minScaleFactor?: number;
|
|
4299
|
+
maxLines?: number;
|
|
4300
|
+
/** @enum {string} */
|
|
4301
|
+
truncation?: "head" | "middle" | "tail" | "clip";
|
|
4302
|
+
};
|
|
4303
|
+
}[];
|
|
4304
|
+
} | null;
|
|
4305
|
+
/** Format: date-time */
|
|
4306
|
+
createdAt: string;
|
|
4307
|
+
/** Format: date-time */
|
|
4308
|
+
updatedAt: string;
|
|
4309
|
+
};
|
|
4310
|
+
/** @description Included when fetching with relations */
|
|
4311
|
+
Organization: {
|
|
4312
|
+
/** Format: uuid */
|
|
4313
|
+
id: string;
|
|
4314
|
+
name: string;
|
|
4315
|
+
description: string | null;
|
|
4316
|
+
url: string | null;
|
|
4317
|
+
logoUrl: string | null;
|
|
4318
|
+
/** Format: date-time */
|
|
4319
|
+
createdAt: string;
|
|
4320
|
+
/** Format: date-time */
|
|
4321
|
+
updatedAt: string;
|
|
4322
|
+
};
|
|
4323
|
+
TransactionResponse: {
|
|
4324
|
+
success: boolean;
|
|
4325
|
+
/**
|
|
4326
|
+
* Format: uuid
|
|
4327
|
+
* @description Created transaction ID
|
|
4328
|
+
*/
|
|
4329
|
+
transactionId?: string;
|
|
4330
|
+
/** @description Generated advertiser SDK token */
|
|
4331
|
+
token?: string;
|
|
4332
|
+
/**
|
|
4333
|
+
* Format: date-time
|
|
4334
|
+
* @description When token expires
|
|
4335
|
+
*/
|
|
4336
|
+
expiresAt?: string;
|
|
4337
|
+
/** @description Domain where token can be activated */
|
|
4338
|
+
allowedDomain?: string;
|
|
4339
|
+
error?: string | null;
|
|
4340
|
+
};
|
|
4341
|
+
SignalResponse: {
|
|
4342
|
+
success: boolean;
|
|
4343
|
+
error?: string | null;
|
|
4344
|
+
};
|
|
4345
|
+
EntitlementsResponse: {
|
|
4346
|
+
success: boolean;
|
|
4347
|
+
/** @description Provisional entitlements (temporary, require conversion) */
|
|
4348
|
+
provisional: {
|
|
4349
|
+
/** @description Free trial entitlement details */
|
|
4350
|
+
freeTrial?: {
|
|
4351
|
+
/**
|
|
4352
|
+
* Format: date-time
|
|
4353
|
+
* @description Start date of the entitlement (ISO8601)
|
|
4354
|
+
*/
|
|
4355
|
+
startedAt: string | null;
|
|
4356
|
+
/**
|
|
4357
|
+
* Format: date-time
|
|
4358
|
+
* @description Expiration date (ISO8601)
|
|
4359
|
+
*/
|
|
4360
|
+
expiresAt: string | null;
|
|
4361
|
+
};
|
|
4362
|
+
/** @description Available discount entitlements */
|
|
4363
|
+
discounts?: {
|
|
4364
|
+
/** @description Discount value */
|
|
4365
|
+
value: number;
|
|
4366
|
+
/**
|
|
4367
|
+
* @description Discount unit
|
|
4368
|
+
* @enum {string}
|
|
4369
|
+
*/
|
|
4370
|
+
unit: "percent" | "dollars";
|
|
4371
|
+
/**
|
|
4372
|
+
* Format: date-time
|
|
4373
|
+
* @description Expiration date (ISO8601)
|
|
4374
|
+
*/
|
|
4375
|
+
expiresAt: string | null;
|
|
4376
|
+
}[];
|
|
4377
|
+
/** @description Available credit entitlements */
|
|
4378
|
+
credits?: {
|
|
4379
|
+
/** @description Total credit amount */
|
|
4380
|
+
totalAmount: number;
|
|
4381
|
+
/**
|
|
4382
|
+
* Format: date-time
|
|
4383
|
+
* @description Expiration date (ISO8601)
|
|
4384
|
+
*/
|
|
4385
|
+
expiresAt: string | null;
|
|
4386
|
+
};
|
|
4387
|
+
};
|
|
4388
|
+
/** @description Verified entitlements (permanent, earned through conversion) */
|
|
4389
|
+
verified: {
|
|
4390
|
+
/** @description Free trial entitlement details */
|
|
4391
|
+
freeTrial?: {
|
|
4392
|
+
/**
|
|
4393
|
+
* Format: date-time
|
|
4394
|
+
* @description Start date of the entitlement (ISO8601)
|
|
4395
|
+
*/
|
|
4396
|
+
startedAt: string | null;
|
|
4397
|
+
/**
|
|
4398
|
+
* Format: date-time
|
|
4399
|
+
* @description Expiration date (ISO8601)
|
|
4400
|
+
*/
|
|
4401
|
+
expiresAt: string | null;
|
|
4402
|
+
};
|
|
4403
|
+
/** @description Available discount entitlements */
|
|
4404
|
+
discounts?: {
|
|
4405
|
+
/** @description Discount value */
|
|
4406
|
+
value: number;
|
|
4407
|
+
/**
|
|
4408
|
+
* @description Discount unit
|
|
4409
|
+
* @enum {string}
|
|
4410
|
+
*/
|
|
4411
|
+
unit: "percent" | "dollars";
|
|
4412
|
+
/**
|
|
4413
|
+
* Format: date-time
|
|
4414
|
+
* @description Expiration date (ISO8601)
|
|
4415
|
+
*/
|
|
4416
|
+
expiresAt: string | null;
|
|
4417
|
+
}[];
|
|
4418
|
+
/** @description Available credit entitlements */
|
|
4419
|
+
credits?: {
|
|
4420
|
+
/** @description Total credit amount */
|
|
4421
|
+
totalAmount: number;
|
|
4422
|
+
/**
|
|
4423
|
+
* Format: date-time
|
|
4424
|
+
* @description Expiration date (ISO8601)
|
|
4425
|
+
*/
|
|
4426
|
+
expiresAt: string | null;
|
|
4427
|
+
};
|
|
4428
|
+
};
|
|
4429
|
+
/** @description All accumulated entitlements (combines verified + provisional with full original values) */
|
|
4430
|
+
all: {
|
|
4431
|
+
/** @description Free trial entitlement details */
|
|
4432
|
+
freeTrial?: {
|
|
4433
|
+
/**
|
|
4434
|
+
* Format: date-time
|
|
4435
|
+
* @description Start date of the entitlement (ISO8601)
|
|
4436
|
+
*/
|
|
4437
|
+
startedAt: string | null;
|
|
4438
|
+
/**
|
|
4439
|
+
* Format: date-time
|
|
4440
|
+
* @description Expiration date (ISO8601)
|
|
4441
|
+
*/
|
|
4442
|
+
expiresAt: string | null;
|
|
4443
|
+
};
|
|
4444
|
+
/** @description Available discount entitlements */
|
|
4445
|
+
discounts?: {
|
|
4446
|
+
/** @description Discount value */
|
|
4447
|
+
value: number;
|
|
4448
|
+
/**
|
|
4449
|
+
* @description Discount unit
|
|
4450
|
+
* @enum {string}
|
|
4451
|
+
*/
|
|
4452
|
+
unit: "percent" | "dollars";
|
|
4453
|
+
/**
|
|
4454
|
+
* Format: date-time
|
|
4455
|
+
* @description Expiration date (ISO8601)
|
|
4456
|
+
*/
|
|
4457
|
+
expiresAt: string | null;
|
|
4458
|
+
}[];
|
|
4459
|
+
/** @description Available credit entitlements */
|
|
4460
|
+
credits?: {
|
|
4461
|
+
/** @description Total credit amount */
|
|
4462
|
+
totalAmount: number;
|
|
4463
|
+
/**
|
|
4464
|
+
* Format: date-time
|
|
4465
|
+
* @description Expiration date (ISO8601)
|
|
4466
|
+
*/
|
|
4467
|
+
expiresAt: string | null;
|
|
4468
|
+
};
|
|
4469
|
+
};
|
|
4470
|
+
/** @description Request execution time in milliseconds */
|
|
4471
|
+
executionTimeMs: number;
|
|
4472
|
+
};
|
|
4473
|
+
VerificationStatusResponse: {
|
|
4474
|
+
success: boolean;
|
|
4475
|
+
/**
|
|
4476
|
+
* @description Transaction status
|
|
4477
|
+
* @enum {string|null}
|
|
4478
|
+
*/
|
|
4479
|
+
status: "pending_conversion" | "provisional_granted" | "verified" | "final_granted" | "expired" | "failed" | null;
|
|
4480
|
+
error?: string | null;
|
|
4481
|
+
};
|
|
4482
|
+
InitUserResponse: {
|
|
4483
|
+
success: boolean;
|
|
4484
|
+
/**
|
|
4485
|
+
* Format: uuid
|
|
4486
|
+
* @description Canonical user UUID
|
|
4487
|
+
*/
|
|
4488
|
+
userId: string;
|
|
4489
|
+
/** @description True if user was created, false if already existed */
|
|
4490
|
+
isNew: boolean;
|
|
4491
|
+
};
|
|
4492
|
+
IdentifyUserResponse: {
|
|
4493
|
+
success: boolean;
|
|
4494
|
+
/**
|
|
4495
|
+
* Format: uuid
|
|
4496
|
+
* @description Canonical user UUID
|
|
4497
|
+
*/
|
|
4498
|
+
userId: string;
|
|
4499
|
+
};
|
|
4500
|
+
};
|
|
4501
|
+
responses: never;
|
|
4502
|
+
parameters: never;
|
|
4503
|
+
requestBodies: never;
|
|
4504
|
+
headers: never;
|
|
4505
|
+
pathItems: never;
|
|
4506
|
+
}
|
|
4507
|
+
export type $defs = Record<string, never>;
|
|
4508
|
+
export type operations = Record<string, never>;
|
|
4509
|
+
//# sourceMappingURL=types.d.ts.map
|