outerjoyn 2.0.0__py3-none-any.whl
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.
- outerjoyn/__init__.py +24 -0
- outerjoyn/_generated/__init__.py +1 -0
- outerjoyn/_generated/models.py +1303 -0
- outerjoyn/_http.py +119 -0
- outerjoyn/client.py +154 -0
- outerjoyn/errors.py +107 -0
- outerjoyn/models.py +63 -0
- outerjoyn/py.typed +0 -0
- outerjoyn/resources/__init__.py +0 -0
- outerjoyn/resources/accounts.py +71 -0
- outerjoyn/resources/api_keys.py +63 -0
- outerjoyn/resources/approvals.py +65 -0
- outerjoyn/resources/balance.py +24 -0
- outerjoyn/resources/batch.py +42 -0
- outerjoyn/resources/catalog.py +44 -0
- outerjoyn/resources/changes.py +41 -0
- outerjoyn/resources/contacts.py +31 -0
- outerjoyn/resources/contracts.py +57 -0
- outerjoyn/resources/earn.py +63 -0
- outerjoyn/resources/exchange.py +88 -0
- outerjoyn/resources/exports.py +50 -0
- outerjoyn/resources/fraud_rules.py +181 -0
- outerjoyn/resources/ingest.py +40 -0
- outerjoyn/resources/integrations.py +139 -0
- outerjoyn/resources/members.py +55 -0
- outerjoyn/resources/objects.py +96 -0
- outerjoyn/resources/partnerships.py +326 -0
- outerjoyn/resources/pay.py +199 -0
- outerjoyn/resources/promotions.py +42 -0
- outerjoyn/resources/redeem.py +39 -0
- outerjoyn/resources/sessions.py +43 -0
- outerjoyn/resources/subscriptions.py +92 -0
- outerjoyn/resources/tasks.py +156 -0
- outerjoyn/webhooks.py +186 -0
- outerjoyn-2.0.0.dist-info/METADATA +273 -0
- outerjoyn-2.0.0.dist-info/RECORD +38 -0
- outerjoyn-2.0.0.dist-info/WHEEL +5 -0
- outerjoyn-2.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,1303 @@
|
|
|
1
|
+
# generated by datamodel-codegen:
|
|
2
|
+
# filename: sdk-api.yaml
|
|
3
|
+
|
|
4
|
+
from __future__ import annotations
|
|
5
|
+
|
|
6
|
+
from typing import Any, Literal, TypedDict
|
|
7
|
+
|
|
8
|
+
from typing_extensions import NotRequired
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
class RegisteredAddress(TypedDict):
|
|
12
|
+
line1: NotRequired[str]
|
|
13
|
+
line2: NotRequired[str]
|
|
14
|
+
city: NotRequired[str]
|
|
15
|
+
state: NotRequired[str]
|
|
16
|
+
postal_code: NotRequired[str]
|
|
17
|
+
country: NotRequired[str]
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
class Stored(TypedDict):
|
|
21
|
+
legal_name: NotRequired[str]
|
|
22
|
+
registered_address: NotRequired[RegisteredAddress]
|
|
23
|
+
jurisdiction: NotRequired[str]
|
|
24
|
+
signatory_name: NotRequired[str]
|
|
25
|
+
signatory_title: NotRequired[str]
|
|
26
|
+
signatory_email: NotRequired[str]
|
|
27
|
+
source: NotRequired[Literal['manual', 'tenant_billing']]
|
|
28
|
+
updated_at: NotRequired[str]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class Data(TypedDict):
|
|
32
|
+
brand_id: NotRequired[str]
|
|
33
|
+
legal_name: NotRequired[str]
|
|
34
|
+
address: NotRequired[str]
|
|
35
|
+
registered_address: NotRequired[RegisteredAddress]
|
|
36
|
+
jurisdiction: NotRequired[str]
|
|
37
|
+
signatory_name: NotRequired[str]
|
|
38
|
+
signatory_title: NotRequired[str]
|
|
39
|
+
signatory_email: NotRequired[str]
|
|
40
|
+
legal_source: NotRequired[Literal['legal_entity', 'tenant_billing', 'brand_name']]
|
|
41
|
+
stored: NotRequired[Stored]
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class BrandLegalEntityResponse(TypedDict):
|
|
45
|
+
data: NotRequired[Data]
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class Role(TypedDict):
|
|
49
|
+
role_id: NotRequired[str]
|
|
50
|
+
name: NotRequired[str]
|
|
51
|
+
display_name: NotRequired[str]
|
|
52
|
+
description: NotRequired[str]
|
|
53
|
+
role_type: NotRequired[str]
|
|
54
|
+
member_count: NotRequired[str]
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class FinanceErrorResponse(TypedDict):
|
|
58
|
+
error: str
|
|
59
|
+
error_code: NotRequired[str]
|
|
60
|
+
code: NotRequired[str]
|
|
61
|
+
message: NotRequired[str]
|
|
62
|
+
required_scopes: NotRequired[list[str]]
|
|
63
|
+
current_scopes: NotRequired[list[str]]
|
|
64
|
+
docs: NotRequired[str]
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class ShopifyPointsPayment(TypedDict):
|
|
68
|
+
amount: str
|
|
69
|
+
discount_codes: NotRequired[list[str]]
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
class ShopifyRefundReverseRequest(TypedDict):
|
|
73
|
+
shop_domain: str
|
|
74
|
+
refund: dict[str, Any]
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class Error(TypedDict):
|
|
78
|
+
type: Literal['invalid_request_error', 'authentication_error', 'permission_error', 'rate_limit_error', 'api_error']
|
|
79
|
+
code: NotRequired[str]
|
|
80
|
+
message: str
|
|
81
|
+
param: NotRequired[str]
|
|
82
|
+
request_id: NotRequired[str]
|
|
83
|
+
doc_url: NotRequired[str]
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
class ErrorResponse(TypedDict):
|
|
87
|
+
error: Error
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
class IdentityHints(TypedDict):
|
|
91
|
+
email: NotRequired[str]
|
|
92
|
+
phone: NotRequired[str]
|
|
93
|
+
name: NotRequired[str]
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
class CreateSessionRequest(TypedDict):
|
|
97
|
+
partner_member_id: str
|
|
98
|
+
partnership_id: NotRequired[str]
|
|
99
|
+
brand_program_id: NotRequired[str]
|
|
100
|
+
identity_hints: NotRequired[IdentityHints]
|
|
101
|
+
scopes: NotRequired[list[Literal['balance:read', 'exchange', 'redeem', 'link', 'earn', 'pay']]]
|
|
102
|
+
ttl_minutes: NotRequired[int]
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
class Legal(TypedDict):
|
|
106
|
+
termsUrl: str
|
|
107
|
+
privacyUrl: str
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
class LinkedProgram(TypedDict):
|
|
111
|
+
program_name: NotRequired[str]
|
|
112
|
+
currency_name: NotRequired[str]
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
class MemberContext(TypedDict):
|
|
116
|
+
member_id: str
|
|
117
|
+
display_name: str
|
|
118
|
+
linked_programs: list[LinkedProgram]
|
|
119
|
+
error_simulation: NotRequired[str]
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
class PayableBalance(TypedDict):
|
|
123
|
+
memberCurrencyId: str
|
|
124
|
+
currencyId: str
|
|
125
|
+
currencyName: str
|
|
126
|
+
currencyCode: str
|
|
127
|
+
brandName: str
|
|
128
|
+
brandLogoUrl: NotRequired[str]
|
|
129
|
+
balance: float
|
|
130
|
+
pointValueAmount: float
|
|
131
|
+
pointValueAmountUsd: NotRequired[float]
|
|
132
|
+
valueCents: int
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
class ReservationInput(TypedDict):
|
|
136
|
+
memberCurrencyId: str
|
|
137
|
+
currencyId: str
|
|
138
|
+
pointsAmount: float
|
|
139
|
+
pointValueAmount: float
|
|
140
|
+
platformFeeCents: float
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
class CouponInput(TypedDict):
|
|
144
|
+
code: str
|
|
145
|
+
definitionType: Literal['voucher', 'coupon', 'gift_card']
|
|
146
|
+
definitionId: str
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
class ReservationError(TypedDict):
|
|
150
|
+
memberCurrencyId: str
|
|
151
|
+
error: str
|
|
152
|
+
code: str
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
class Reservation(TypedDict):
|
|
156
|
+
reservationId: str
|
|
157
|
+
redemptionToken: str
|
|
158
|
+
pointsReserved: float
|
|
159
|
+
valueCents: int
|
|
160
|
+
pointValueAmount: float
|
|
161
|
+
status: Literal['held', 'confirmed', 'released', 'refunded']
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
class SplitCheck(TypedDict):
|
|
165
|
+
orderTotalCents: int
|
|
166
|
+
pointsValueCents: int
|
|
167
|
+
cardPortionCents: int
|
|
168
|
+
overageCents: int
|
|
169
|
+
source: Literal['request', 'checkout']
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
class CancelPaymentResponse(TypedDict):
|
|
173
|
+
reservationId: str
|
|
174
|
+
status: Literal['released']
|
|
175
|
+
pointsRestored: float
|
|
176
|
+
releasedAt: str
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
class RefundRequest(TypedDict):
|
|
180
|
+
redemptionToken: str
|
|
181
|
+
refundAmountCents: float
|
|
182
|
+
refundPolicy: NotRequired[Literal['points_first', 'card_first', 'proportional', 'original_tender', 'points_only']]
|
|
183
|
+
merchantRefundId: NotRequired[str]
|
|
184
|
+
reason: NotRequired[str]
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class RefundResponse(TypedDict):
|
|
188
|
+
refundId: str
|
|
189
|
+
pointsRefunded: float
|
|
190
|
+
pointsRefundValueCents: int
|
|
191
|
+
cardRefundCents: int
|
|
192
|
+
newPointsBalance: float
|
|
193
|
+
remainingRefundableCents: int
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
class RefundLineRef(TypedDict):
|
|
197
|
+
lineRef: str
|
|
198
|
+
quantity: NotRequired[int]
|
|
199
|
+
amountCents: NotRequired[int]
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
class RefundByOrderLeg(TypedDict):
|
|
203
|
+
reservationId: str
|
|
204
|
+
redemptionToken: str
|
|
205
|
+
refundId: str
|
|
206
|
+
allocatedCents: int
|
|
207
|
+
pointsRefunded: float
|
|
208
|
+
pointsRefundValueCents: int
|
|
209
|
+
cardRefundCents: int
|
|
210
|
+
newPointsBalance: float
|
|
211
|
+
remainingRefundableCents: int
|
|
212
|
+
reversalTransactionId: NotRequired[str]
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
class RefundByOrderResponse(TypedDict):
|
|
216
|
+
checkoutSessionId: str
|
|
217
|
+
merchantOrderId: NotRequired[str]
|
|
218
|
+
merchantRefundId: str
|
|
219
|
+
requestedCents: int
|
|
220
|
+
refundedCents: int
|
|
221
|
+
cardRefundCents: int
|
|
222
|
+
remainingRefundableCents: int
|
|
223
|
+
legs: list[RefundByOrderLeg]
|
|
224
|
+
lines: NotRequired[list[RefundLineRef]]
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class PaymentSession(TypedDict):
|
|
228
|
+
paymentSessionId: str
|
|
229
|
+
status: Literal['open', 'pending_fraud_review', 'confirmed', 'expired', 'cancelled']
|
|
230
|
+
merchantOrderId: str
|
|
231
|
+
orderTotalCents: float
|
|
232
|
+
totalReservedCents: int
|
|
233
|
+
createdAt: str
|
|
234
|
+
expiresAt: str
|
|
235
|
+
reservations: list[Reservation]
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
class Item(TypedDict):
|
|
239
|
+
name: NotRequired[str]
|
|
240
|
+
quantity: NotRequired[int]
|
|
241
|
+
amountCents: NotRequired[int]
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
class EarnRequest(TypedDict):
|
|
245
|
+
merchantOrderId: str
|
|
246
|
+
amount: int
|
|
247
|
+
currencyCode: str
|
|
248
|
+
category: NotRequired[str]
|
|
249
|
+
merchantName: NotRequired[str]
|
|
250
|
+
items: NotRequired[list[Item]]
|
|
251
|
+
metadata: NotRequired[dict[str, Any]]
|
|
252
|
+
source: NotRequired[str]
|
|
253
|
+
clickId: NotRequired[str]
|
|
254
|
+
promoCode: NotRequired[str]
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
class EarnResponse(TypedDict):
|
|
258
|
+
transactionId: str
|
|
259
|
+
status: Literal['pending', 'completed']
|
|
260
|
+
amount: int
|
|
261
|
+
currencyCode: str
|
|
262
|
+
earnPending: bool
|
|
263
|
+
pointsAwarded: NotRequired[int]
|
|
264
|
+
idempotent: NotRequired[bool]
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
class EarnStatus(TypedDict):
|
|
268
|
+
transactionId: str
|
|
269
|
+
status: Literal['pending', 'completed']
|
|
270
|
+
amount: int
|
|
271
|
+
currencyCode: str
|
|
272
|
+
createdAt: str
|
|
273
|
+
description: NotRequired[str]
|
|
274
|
+
merchantOrderId: NotRequired[str]
|
|
275
|
+
source: NotRequired[str]
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
class Member(TypedDict):
|
|
279
|
+
member_id: str
|
|
280
|
+
first_name: str
|
|
281
|
+
last_name: str
|
|
282
|
+
tier: str
|
|
283
|
+
points_balance: float
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
class ConnectedBrand(TypedDict):
|
|
287
|
+
link_id: str
|
|
288
|
+
brand_name: str
|
|
289
|
+
partner_name: str
|
|
290
|
+
linked_date: str
|
|
291
|
+
scopes: list[str]
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
class Currency(TypedDict):
|
|
295
|
+
currency_id: str
|
|
296
|
+
name: str
|
|
297
|
+
code: str
|
|
298
|
+
balance: float
|
|
299
|
+
value_cents: float
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
class RecentActivityItem(TypedDict):
|
|
303
|
+
date: str
|
|
304
|
+
description: str
|
|
305
|
+
amount: float
|
|
306
|
+
currency_name: str
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
class AccountOverview(TypedDict):
|
|
310
|
+
member: Member
|
|
311
|
+
connected_brands: list[ConnectedBrand]
|
|
312
|
+
currencies: list[Currency]
|
|
313
|
+
recent_activity: list[RecentActivityItem]
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
class MemberBalance(TypedDict):
|
|
317
|
+
points_balance: float
|
|
318
|
+
currencies: list[PayableBalance]
|
|
319
|
+
|
|
320
|
+
|
|
321
|
+
class CatalogItem(TypedDict):
|
|
322
|
+
product_id: str
|
|
323
|
+
name: str
|
|
324
|
+
description: NotRequired[str]
|
|
325
|
+
sku: NotRequired[str]
|
|
326
|
+
price: NotRequired[float]
|
|
327
|
+
points_value: NotRequired[float]
|
|
328
|
+
display_url: NotRequired[str]
|
|
329
|
+
category_name: NotRequired[str]
|
|
330
|
+
brand: NotRequired[str]
|
|
331
|
+
inventory_count: NotRequired[int]
|
|
332
|
+
is_active: bool
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
class CatalogPage(TypedDict):
|
|
336
|
+
items: list[CatalogItem]
|
|
337
|
+
total: int
|
|
338
|
+
page: int
|
|
339
|
+
limit: int
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
class ShippingAddress(TypedDict):
|
|
343
|
+
line1: NotRequired[str]
|
|
344
|
+
line2: NotRequired[str]
|
|
345
|
+
city: NotRequired[str]
|
|
346
|
+
state: NotRequired[str]
|
|
347
|
+
postalCode: NotRequired[str]
|
|
348
|
+
country: NotRequired[str]
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
class RedeemRequest(TypedDict):
|
|
352
|
+
productId: str
|
|
353
|
+
quantity: NotRequired[int]
|
|
354
|
+
shippingAddress: NotRequired[ShippingAddress]
|
|
355
|
+
metadata: NotRequired[dict[str, Any]]
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
class RedeemResponse(TypedDict):
|
|
359
|
+
redemptionId: str
|
|
360
|
+
status: str
|
|
361
|
+
transactionId: NotRequired[str]
|
|
362
|
+
|
|
363
|
+
|
|
364
|
+
class ExchangeRequest(TypedDict):
|
|
365
|
+
sourceCurrencyId: str
|
|
366
|
+
targetCurrencyId: str
|
|
367
|
+
sourceAmount: float
|
|
368
|
+
partnershipId: str
|
|
369
|
+
memberId: NotRequired[str]
|
|
370
|
+
idempotencyKey: NotRequired[str]
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
class ExchangeResponse(TypedDict):
|
|
374
|
+
transactionId: str
|
|
375
|
+
sourceAmount: float
|
|
376
|
+
targetAmount: float
|
|
377
|
+
rate: float
|
|
378
|
+
status: Literal['completed']
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
class ExchangePreview(TypedDict):
|
|
382
|
+
sourceAmount: float
|
|
383
|
+
targetAmount: float
|
|
384
|
+
rate: float
|
|
385
|
+
approvalRequired: bool
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
class ExchangeRate(TypedDict):
|
|
389
|
+
exchangeRateId: str
|
|
390
|
+
sourceCurrencyId: str
|
|
391
|
+
targetCurrencyId: str
|
|
392
|
+
rate: float
|
|
393
|
+
minAmount: float
|
|
394
|
+
maxAmount: float
|
|
395
|
+
sourceName: NotRequired[str]
|
|
396
|
+
sourceCode: NotRequired[str]
|
|
397
|
+
targetName: NotRequired[str]
|
|
398
|
+
targetCode: NotRequired[str]
|
|
399
|
+
|
|
400
|
+
|
|
401
|
+
class ResolvedPromotionCard(TypedDict):
|
|
402
|
+
id: str
|
|
403
|
+
title: NotRequired[str]
|
|
404
|
+
name: NotRequired[str]
|
|
405
|
+
description: NotRequired[str]
|
|
406
|
+
imageUrl: NotRequired[str]
|
|
407
|
+
startDate: NotRequired[str]
|
|
408
|
+
endDate: NotRequired[str]
|
|
409
|
+
displayEndAt: NotRequired[str]
|
|
410
|
+
category: NotRequired[str]
|
|
411
|
+
requiresEnrollment: NotRequired[bool]
|
|
412
|
+
earnRate: NotRequired[str]
|
|
413
|
+
earnRateUnit: NotRequired[str]
|
|
414
|
+
earnCapCount: NotRequired[int]
|
|
415
|
+
earnCapPeriod: NotRequired[str]
|
|
416
|
+
postingSlaDays: NotRequired[int]
|
|
417
|
+
isEnrolled: NotRequired[bool]
|
|
418
|
+
enrollmentStatus: NotRequired[Literal['active', 'completed']]
|
|
419
|
+
percentageComplete: NotRequired[float]
|
|
420
|
+
currentValue: NotRequired[float]
|
|
421
|
+
targetValue: NotRequired[float]
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
class Promotion(TypedDict):
|
|
425
|
+
promotionId: str
|
|
426
|
+
name: str
|
|
427
|
+
description: NotRequired[str]
|
|
428
|
+
status: Literal['draft', 'active', 'paused', 'expired']
|
|
429
|
+
startDate: NotRequired[str]
|
|
430
|
+
endDate: NotRequired[str]
|
|
431
|
+
imageUrl: NotRequired[str]
|
|
432
|
+
terms: NotRequired[str]
|
|
433
|
+
maxEnrollments: NotRequired[int]
|
|
434
|
+
currentEnrollments: NotRequired[int]
|
|
435
|
+
|
|
436
|
+
|
|
437
|
+
class EnrollmentResponse(TypedDict):
|
|
438
|
+
ok: bool
|
|
439
|
+
memberId: str
|
|
440
|
+
promotionId: str
|
|
441
|
+
enrolledAt: str
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
class CreatePartnershipRequest(TypedDict):
|
|
445
|
+
platform: NotRequired[bool]
|
|
446
|
+
partner_brand_id: NotRequired[str]
|
|
447
|
+
brand_id: NotRequired[str]
|
|
448
|
+
use_case: NotRequired[str]
|
|
449
|
+
message: NotRequired[str]
|
|
450
|
+
primary_match_key: NotRequired[str]
|
|
451
|
+
terms: NotRequired[dict[str, Any]]
|
|
452
|
+
|
|
453
|
+
|
|
454
|
+
class CreatePartnershipResponse(TypedDict):
|
|
455
|
+
partnership_request_id: NotRequired[str]
|
|
456
|
+
partnership_id: NotRequired[str]
|
|
457
|
+
status: str
|
|
458
|
+
created: NotRequired[bool]
|
|
459
|
+
|
|
460
|
+
|
|
461
|
+
class AcceptPartnershipResponse(TypedDict):
|
|
462
|
+
partnership_id: NotRequired[str]
|
|
463
|
+
status: str
|
|
464
|
+
created: NotRequired[bool]
|
|
465
|
+
|
|
466
|
+
|
|
467
|
+
class ActivatePartnershipRequest(TypedDict):
|
|
468
|
+
use_case: str
|
|
469
|
+
override_reason: NotRequired[str]
|
|
470
|
+
|
|
471
|
+
|
|
472
|
+
class ActivatePartnershipResponse(TypedDict):
|
|
473
|
+
use_case_id: str
|
|
474
|
+
status: str
|
|
475
|
+
overridden: NotRequired[bool]
|
|
476
|
+
provisioning: NotRequired[list[dict[str, Any]]]
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
class FundPartnershipRequest(TypedDict):
|
|
480
|
+
points: int
|
|
481
|
+
currency_id: str
|
|
482
|
+
idempotency_key: str
|
|
483
|
+
max_total_cost_cents: NotRequired[int]
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
class Pool(TypedDict):
|
|
487
|
+
partner_currency_id: NotRequired[str]
|
|
488
|
+
available_balance: NotRequired[float]
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
class FundPartnershipResponse(TypedDict):
|
|
492
|
+
purchase_order_id: str
|
|
493
|
+
status: str
|
|
494
|
+
pool: NotRequired[Pool]
|
|
495
|
+
batch_id: NotRequired[str]
|
|
496
|
+
|
|
497
|
+
|
|
498
|
+
class FundPartnershipPendingResponse(TypedDict):
|
|
499
|
+
purchase_order_id: str
|
|
500
|
+
status: str
|
|
501
|
+
next: NotRequired[str]
|
|
502
|
+
|
|
503
|
+
|
|
504
|
+
class SetPartnershipRatesRequest(TypedDict):
|
|
505
|
+
source_currency_id: str
|
|
506
|
+
target_currency_id: str
|
|
507
|
+
rate: NotRequired[float]
|
|
508
|
+
|
|
509
|
+
|
|
510
|
+
class Rate(TypedDict):
|
|
511
|
+
exchange_id: NotRequired[str]
|
|
512
|
+
source_currency_id: NotRequired[str]
|
|
513
|
+
target_currency_id: NotRequired[str]
|
|
514
|
+
rate: NotRequired[float]
|
|
515
|
+
derived: NotRequired[bool]
|
|
516
|
+
|
|
517
|
+
|
|
518
|
+
class SetPartnershipRatesResponse(TypedDict):
|
|
519
|
+
rates: list[Rate]
|
|
520
|
+
|
|
521
|
+
|
|
522
|
+
class SetPartnershipDataSharingScopeRequest(TypedDict):
|
|
523
|
+
dsa_id: NotRequired[str]
|
|
524
|
+
approved_fields: NotRequired[dict[str, Any]]
|
|
525
|
+
brand_to_partner_config: NotRequired[dict[str, Any]]
|
|
526
|
+
partner_to_brand_config: NotRequired[dict[str, Any]]
|
|
527
|
+
selected_use_case_keys: NotRequired[list[str]]
|
|
528
|
+
|
|
529
|
+
|
|
530
|
+
class Dsa(TypedDict):
|
|
531
|
+
dsa_id: NotRequired[str]
|
|
532
|
+
status: NotRequired[str]
|
|
533
|
+
approved_fields: NotRequired[dict[str, Any]]
|
|
534
|
+
brand_to_partner_config: NotRequired[dict[str, Any]]
|
|
535
|
+
partner_to_brand_config: NotRequired[dict[str, Any]]
|
|
536
|
+
selected_use_case_keys: NotRequired[list[str]]
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
class SetPartnershipDataSharingScopeResponse(TypedDict):
|
|
540
|
+
dsa: Dsa
|
|
541
|
+
revision_opened: bool
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
class PartnershipSummary(TypedDict):
|
|
545
|
+
id: str
|
|
546
|
+
name: NotRequired[str]
|
|
547
|
+
partnerName: NotRequired[str]
|
|
548
|
+
partnerType: NotRequired[str]
|
|
549
|
+
status: str
|
|
550
|
+
startDate: NotRequired[str]
|
|
551
|
+
linkedMembers: NotRequired[int]
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
class PartnershipListResponse(TypedDict):
|
|
555
|
+
data: list[PartnershipSummary]
|
|
556
|
+
limit: int
|
|
557
|
+
offset: int
|
|
558
|
+
has_more: bool
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
class PartnershipMember(TypedDict):
|
|
562
|
+
memberId: str
|
|
563
|
+
firstName: NotRequired[str]
|
|
564
|
+
lastName: NotRequired[str]
|
|
565
|
+
linkedAt: NotRequired[str]
|
|
566
|
+
status: NotRequired[str]
|
|
567
|
+
|
|
568
|
+
|
|
569
|
+
class PartnershipMembersResponse(TypedDict):
|
|
570
|
+
data: list[PartnershipMember]
|
|
571
|
+
total: int
|
|
572
|
+
limit: int
|
|
573
|
+
offset: int
|
|
574
|
+
has_more: bool
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
class PartnershipDetailResponse(TypedDict):
|
|
578
|
+
partnership: dict[str, Any]
|
|
579
|
+
|
|
580
|
+
|
|
581
|
+
class IngestMemberRecord(TypedDict):
|
|
582
|
+
clientRef: str
|
|
583
|
+
email: NotRequired[str]
|
|
584
|
+
phone: NotRequired[str]
|
|
585
|
+
firstName: NotRequired[str]
|
|
586
|
+
lastName: NotRequired[str]
|
|
587
|
+
externalId: NotRequired[str]
|
|
588
|
+
brandRef: NotRequired[str]
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
class IngestTransactionRecord(TypedDict):
|
|
592
|
+
clientRef: NotRequired[str]
|
|
593
|
+
idempotencyKey: NotRequired[str]
|
|
594
|
+
memberRef: NotRequired[str]
|
|
595
|
+
amount: NotRequired[int]
|
|
596
|
+
currency: NotRequired[str]
|
|
597
|
+
points: NotRequired[int]
|
|
598
|
+
date: NotRequired[str]
|
|
599
|
+
brandRef: NotRequired[str]
|
|
600
|
+
clickId: NotRequired[str]
|
|
601
|
+
promoCode: NotRequired[str]
|
|
602
|
+
|
|
603
|
+
|
|
604
|
+
class IngestAcceptResponse(TypedDict):
|
|
605
|
+
batchId: str
|
|
606
|
+
accepted: int
|
|
607
|
+
status: str
|
|
608
|
+
statusUrl: NotRequired[str]
|
|
609
|
+
|
|
610
|
+
|
|
611
|
+
class IngestBatchStatus(TypedDict):
|
|
612
|
+
batchId: str
|
|
613
|
+
objectType: str
|
|
614
|
+
status: str
|
|
615
|
+
accepted: NotRequired[int]
|
|
616
|
+
written: NotRequired[int]
|
|
617
|
+
deduped: NotRequired[int]
|
|
618
|
+
failed: NotRequired[int]
|
|
619
|
+
createdAt: NotRequired[str]
|
|
620
|
+
completedAt: NotRequired[str]
|
|
621
|
+
|
|
622
|
+
|
|
623
|
+
class ApprovalDecisionRequest(TypedDict):
|
|
624
|
+
approver_user_id: str
|
|
625
|
+
reason: NotRequired[str]
|
|
626
|
+
|
|
627
|
+
|
|
628
|
+
class ApprovalDecisionResponse(TypedDict):
|
|
629
|
+
status: str
|
|
630
|
+
stageStatus: NotRequired[str]
|
|
631
|
+
|
|
632
|
+
|
|
633
|
+
class Data1(TypedDict):
|
|
634
|
+
deleted: bool
|
|
635
|
+
|
|
636
|
+
|
|
637
|
+
class DeletedResponse(TypedDict):
|
|
638
|
+
data: Data1
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
class Connection(TypedDict):
|
|
642
|
+
id: NotRequired[str]
|
|
643
|
+
ftp_id: NotRequired[str]
|
|
644
|
+
type: NotRequired[str]
|
|
645
|
+
name: NotRequired[str]
|
|
646
|
+
host: NotRequired[str]
|
|
647
|
+
protocol: NotRequired[str]
|
|
648
|
+
port: NotRequired[str]
|
|
649
|
+
username: NotRequired[str]
|
|
650
|
+
path: NotRequired[str]
|
|
651
|
+
password: NotRequired[str]
|
|
652
|
+
secret_set: NotRequired[bool]
|
|
653
|
+
business_unit_id: NotRequired[str]
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
class ConnectionResponse(TypedDict):
|
|
657
|
+
data: Connection
|
|
658
|
+
|
|
659
|
+
|
|
660
|
+
class ConnectionListResponse(TypedDict):
|
|
661
|
+
data: list[Connection]
|
|
662
|
+
|
|
663
|
+
|
|
664
|
+
class CreateConnectionRequest(TypedDict):
|
|
665
|
+
type: Literal['ftp', 'sftp', 'database']
|
|
666
|
+
name: str
|
|
667
|
+
host: NotRequired[str]
|
|
668
|
+
port: NotRequired[int]
|
|
669
|
+
username: NotRequired[str]
|
|
670
|
+
path: NotRequired[str]
|
|
671
|
+
|
|
672
|
+
|
|
673
|
+
class UpdateConnectionRequest(TypedDict):
|
|
674
|
+
pass
|
|
675
|
+
|
|
676
|
+
|
|
677
|
+
class SetSecretRequest(TypedDict):
|
|
678
|
+
secret: str
|
|
679
|
+
|
|
680
|
+
|
|
681
|
+
class Data2(TypedDict):
|
|
682
|
+
updated: NotRequired[bool]
|
|
683
|
+
secret_set: NotRequired[bool]
|
|
684
|
+
|
|
685
|
+
|
|
686
|
+
class SetSecretResponse(TypedDict):
|
|
687
|
+
data: Data2
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
class Integration(TypedDict):
|
|
691
|
+
integration_id: NotRequired[str]
|
|
692
|
+
name: NotRequired[str]
|
|
693
|
+
status: NotRequired[str]
|
|
694
|
+
job_type: NotRequired[str]
|
|
695
|
+
data_source: NotRequired[dict[str, Any]]
|
|
696
|
+
mappings: NotRequired[list[dict[str, Any]]]
|
|
697
|
+
schedule: NotRequired[dict[str, Any]]
|
|
698
|
+
business_unit_id: NotRequired[str]
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
class IntegrationResponse(TypedDict):
|
|
702
|
+
data: Integration
|
|
703
|
+
|
|
704
|
+
|
|
705
|
+
class IntegrationListResponse(TypedDict):
|
|
706
|
+
data: list[Integration]
|
|
707
|
+
|
|
708
|
+
|
|
709
|
+
class DataSource(TypedDict):
|
|
710
|
+
type: Literal['ftp', 'sftp', 'database', 'api', 'connector', 'file_upload']
|
|
711
|
+
ftp_location_id: NotRequired[str]
|
|
712
|
+
connection_id: NotRequired[str]
|
|
713
|
+
file_path: NotRequired[str]
|
|
714
|
+
table_name: NotRequired[str]
|
|
715
|
+
endpoint: NotRequired[str]
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
class CreateIntegrationRequest(TypedDict):
|
|
719
|
+
name: str
|
|
720
|
+
direction: Literal['import', 'export', 'bidirectional']
|
|
721
|
+
data_source: DataSource
|
|
722
|
+
description: NotRequired[str]
|
|
723
|
+
operation: NotRequired[str]
|
|
724
|
+
format: NotRequired[Literal['csv', 'json', 'ndjson']]
|
|
725
|
+
mappings: NotRequired[list[dict[str, Any]]]
|
|
726
|
+
schedule: NotRequired[dict[str, Any]]
|
|
727
|
+
brand_id: NotRequired[str]
|
|
728
|
+
|
|
729
|
+
|
|
730
|
+
class UpdateIntegrationRequest(TypedDict):
|
|
731
|
+
status: NotRequired[Literal['active', 'paused', 'disabled']]
|
|
732
|
+
|
|
733
|
+
|
|
734
|
+
class Data3(TypedDict):
|
|
735
|
+
status: str
|
|
736
|
+
job_id: NotRequired[str]
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
class RunQueuedResponse(TypedDict):
|
|
740
|
+
data: Data3
|
|
741
|
+
|
|
742
|
+
|
|
743
|
+
class IntegrationRun(TypedDict):
|
|
744
|
+
run_id: NotRequired[str]
|
|
745
|
+
job_id: NotRequired[str]
|
|
746
|
+
status: NotRequired[str]
|
|
747
|
+
started_at: NotRequired[str]
|
|
748
|
+
completed_at: NotRequired[str]
|
|
749
|
+
records_processed: NotRequired[str]
|
|
750
|
+
records_succeeded: NotRequired[str]
|
|
751
|
+
records_failed: NotRequired[str]
|
|
752
|
+
error_message: NotRequired[str]
|
|
753
|
+
|
|
754
|
+
|
|
755
|
+
class IntegrationRunListResponse(TypedDict):
|
|
756
|
+
data: list[IntegrationRun]
|
|
757
|
+
|
|
758
|
+
|
|
759
|
+
class Subscription(TypedDict):
|
|
760
|
+
kind: NotRequired[Literal['events', 'cdc']]
|
|
761
|
+
id: NotRequired[str]
|
|
762
|
+
name: NotRequired[str]
|
|
763
|
+
webhook_url: NotRequired[str]
|
|
764
|
+
is_active: NotRequired[bool]
|
|
765
|
+
event_types: NotRequired[list[str]]
|
|
766
|
+
cdc: NotRequired[dict[str, Any]]
|
|
767
|
+
|
|
768
|
+
|
|
769
|
+
class SubscriptionResponse(TypedDict):
|
|
770
|
+
data: Subscription
|
|
771
|
+
|
|
772
|
+
|
|
773
|
+
class SubscriptionListResponse(TypedDict):
|
|
774
|
+
data: list[Subscription]
|
|
775
|
+
|
|
776
|
+
|
|
777
|
+
class CreateSubscriptionRequest(TypedDict):
|
|
778
|
+
kind: Literal['events', 'cdc']
|
|
779
|
+
webhook_url: str
|
|
780
|
+
event_types: NotRequired[list[str]]
|
|
781
|
+
object: NotRequired[str]
|
|
782
|
+
selected_fields: NotRequired[list[str]]
|
|
783
|
+
|
|
784
|
+
|
|
785
|
+
class UpdateSubscriptionRequest(TypedDict):
|
|
786
|
+
webhook_url: NotRequired[str]
|
|
787
|
+
event_types: NotRequired[list[str]]
|
|
788
|
+
is_active: NotRequired[bool]
|
|
789
|
+
selected_fields: NotRequired[list[str]]
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
class Data4(TypedDict):
|
|
793
|
+
subscription: Subscription
|
|
794
|
+
signing_secret: NotRequired[str]
|
|
795
|
+
signing_secret_note: NotRequired[str]
|
|
796
|
+
|
|
797
|
+
|
|
798
|
+
class CreateSubscriptionResponse(TypedDict):
|
|
799
|
+
data: Data4
|
|
800
|
+
|
|
801
|
+
|
|
802
|
+
class Data5(TypedDict):
|
|
803
|
+
signing_secret: NotRequired[str]
|
|
804
|
+
signing_secret_note: NotRequired[str]
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
class RotateSecretResponse(TypedDict):
|
|
808
|
+
data: Data5
|
|
809
|
+
|
|
810
|
+
|
|
811
|
+
class SubscriptionDelivery(TypedDict):
|
|
812
|
+
id: NotRequired[str]
|
|
813
|
+
event_type: NotRequired[str]
|
|
814
|
+
status: NotRequired[str]
|
|
815
|
+
attempt_number: NotRequired[int]
|
|
816
|
+
response_status_code: NotRequired[int]
|
|
817
|
+
error_message: NotRequired[str]
|
|
818
|
+
attempted_at: NotRequired[str]
|
|
819
|
+
delivered_at: NotRequired[str]
|
|
820
|
+
created_at: NotRequired[str]
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
class SubscriptionDeliveryListResponse(TypedDict):
|
|
824
|
+
data: list[SubscriptionDelivery]
|
|
825
|
+
|
|
826
|
+
|
|
827
|
+
class CreateExportRequest(TypedDict):
|
|
828
|
+
object: str
|
|
829
|
+
format: NotRequired[Literal['csv', 'json', 'ndjson']]
|
|
830
|
+
fields: NotRequired[list[str]]
|
|
831
|
+
filters: NotRequired[dict[str, Any]]
|
|
832
|
+
|
|
833
|
+
|
|
834
|
+
class Data6(TypedDict):
|
|
835
|
+
status: str
|
|
836
|
+
export_id: str
|
|
837
|
+
|
|
838
|
+
|
|
839
|
+
class CreateExportResponse(TypedDict):
|
|
840
|
+
data: Data6
|
|
841
|
+
|
|
842
|
+
|
|
843
|
+
class Part(TypedDict):
|
|
844
|
+
part: NotRequired[int]
|
|
845
|
+
url: NotRequired[str]
|
|
846
|
+
|
|
847
|
+
|
|
848
|
+
class Download(TypedDict):
|
|
849
|
+
manifest_url: NotRequired[str]
|
|
850
|
+
parts: NotRequired[list[Part]]
|
|
851
|
+
|
|
852
|
+
|
|
853
|
+
class Data7(TypedDict):
|
|
854
|
+
export_id: NotRequired[str]
|
|
855
|
+
status: NotRequired[Literal['queued', 'processing', 'completed', 'failed']]
|
|
856
|
+
object: NotRequired[str]
|
|
857
|
+
format: NotRequired[str]
|
|
858
|
+
sink: NotRequired[str]
|
|
859
|
+
rows_exported: NotRequired[int]
|
|
860
|
+
parts_written: NotRequired[int]
|
|
861
|
+
error_message: NotRequired[str]
|
|
862
|
+
started_at: NotRequired[str]
|
|
863
|
+
completed_at: NotRequired[str]
|
|
864
|
+
expires_at: NotRequired[str]
|
|
865
|
+
download: NotRequired[Download]
|
|
866
|
+
|
|
867
|
+
|
|
868
|
+
class ExportStatusResponse(TypedDict):
|
|
869
|
+
data: Data7
|
|
870
|
+
|
|
871
|
+
|
|
872
|
+
class Task(TypedDict):
|
|
873
|
+
task_id: NotRequired[str]
|
|
874
|
+
name: NotRequired[str]
|
|
875
|
+
status: NotRequired[str]
|
|
876
|
+
task_type: NotRequired[str]
|
|
877
|
+
owner: NotRequired[str]
|
|
878
|
+
is_required: NotRequired[bool]
|
|
879
|
+
guidance_md: NotRequired[str]
|
|
880
|
+
action_url: NotRequired[str]
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
class TaskListResponse(TypedDict):
|
|
884
|
+
data: list[Task]
|
|
885
|
+
use_case_id: NotRequired[str]
|
|
886
|
+
partnership_id: NotRequired[str]
|
|
887
|
+
|
|
888
|
+
|
|
889
|
+
class TaskResponse(TypedDict):
|
|
890
|
+
data: Task
|
|
891
|
+
completed: NotRequired[bool]
|
|
892
|
+
already_completed: NotRequired[bool]
|
|
893
|
+
|
|
894
|
+
|
|
895
|
+
class Data8(TypedDict):
|
|
896
|
+
event_subscription_id: NotRequired[str]
|
|
897
|
+
event_publisher_configs: NotRequired[list[dict[str, Any]]]
|
|
898
|
+
|
|
899
|
+
|
|
900
|
+
class TaskIntegrationResponse(TypedDict):
|
|
901
|
+
data: Data8
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
class Data9(TypedDict):
|
|
905
|
+
landing_page_id: NotRequired[str]
|
|
906
|
+
name: NotRequired[str]
|
|
907
|
+
task_id: NotRequired[str]
|
|
908
|
+
|
|
909
|
+
|
|
910
|
+
class TaskLandingPageResponse(TypedDict):
|
|
911
|
+
data: Data9
|
|
912
|
+
|
|
913
|
+
|
|
914
|
+
class PaymentTerm(TypedDict):
|
|
915
|
+
payment_term_id: NotRequired[str]
|
|
916
|
+
name: NotRequired[str]
|
|
917
|
+
payer: NotRequired[str]
|
|
918
|
+
is_active: NotRequired[bool]
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
class PaymentTermListResponse(TypedDict):
|
|
922
|
+
data: list[PaymentTerm]
|
|
923
|
+
use_case_id: NotRequired[str]
|
|
924
|
+
|
|
925
|
+
|
|
926
|
+
class PaymentTermResponse(TypedDict):
|
|
927
|
+
data: PaymentTerm
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
class NestedListResponse(TypedDict):
|
|
931
|
+
data: list[dict[str, Any]]
|
|
932
|
+
|
|
933
|
+
|
|
934
|
+
class NestedItemResponse(TypedDict):
|
|
935
|
+
data: dict[str, Any]
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
class ApiKeySummary(TypedDict):
|
|
939
|
+
id: NotRequired[str]
|
|
940
|
+
name: NotRequired[str]
|
|
941
|
+
key_prefix: NotRequired[str]
|
|
942
|
+
key_display_suffix: NotRequired[str]
|
|
943
|
+
is_test: NotRequired[bool]
|
|
944
|
+
scopes: NotRequired[list[str]]
|
|
945
|
+
rate_limit_tier: NotRequired[str]
|
|
946
|
+
is_active: NotRequired[bool]
|
|
947
|
+
expires_at: NotRequired[str]
|
|
948
|
+
last_used_at: NotRequired[str]
|
|
949
|
+
description: NotRequired[str]
|
|
950
|
+
created_at: NotRequired[str]
|
|
951
|
+
|
|
952
|
+
|
|
953
|
+
class ApiKeyListResponse(TypedDict):
|
|
954
|
+
data: list[ApiKeySummary]
|
|
955
|
+
has_more: NotRequired[bool]
|
|
956
|
+
total: NotRequired[int]
|
|
957
|
+
|
|
958
|
+
|
|
959
|
+
class ApiKeyResponse(TypedDict):
|
|
960
|
+
data: ApiKeySummary
|
|
961
|
+
|
|
962
|
+
|
|
963
|
+
class Data10(TypedDict):
|
|
964
|
+
id: NotRequired[str]
|
|
965
|
+
name: NotRequired[str]
|
|
966
|
+
key: NotRequired[str]
|
|
967
|
+
key_prefix: NotRequired[str]
|
|
968
|
+
is_test: NotRequired[bool]
|
|
969
|
+
scopes: NotRequired[list[str]]
|
|
970
|
+
warning: NotRequired[str]
|
|
971
|
+
|
|
972
|
+
|
|
973
|
+
class ApiKeyMintResponse(TypedDict):
|
|
974
|
+
data: Data10
|
|
975
|
+
|
|
976
|
+
|
|
977
|
+
class Data11(TypedDict):
|
|
978
|
+
id: NotRequired[str]
|
|
979
|
+
old_key_id: NotRequired[str]
|
|
980
|
+
key: NotRequired[str]
|
|
981
|
+
key_prefix: NotRequired[str]
|
|
982
|
+
warning: NotRequired[str]
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
class ApiKeyRotateResponse(TypedDict):
|
|
986
|
+
data: Data11
|
|
987
|
+
|
|
988
|
+
|
|
989
|
+
class Data12(TypedDict):
|
|
990
|
+
id: NotRequired[str]
|
|
991
|
+
revoked: NotRequired[bool]
|
|
992
|
+
|
|
993
|
+
|
|
994
|
+
class ApiKeyRevokeResponse(TypedDict):
|
|
995
|
+
data: Data12
|
|
996
|
+
|
|
997
|
+
|
|
998
|
+
class Data13(TypedDict):
|
|
999
|
+
winner_contact_id: NotRequired[str]
|
|
1000
|
+
merged_contact_id: NotRequired[str]
|
|
1001
|
+
members_moved: NotRequired[int]
|
|
1002
|
+
already_merged: NotRequired[bool]
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
class ContactMergeResponse(TypedDict):
|
|
1006
|
+
data: Data13
|
|
1007
|
+
|
|
1008
|
+
|
|
1009
|
+
class ObjectSummary(TypedDict):
|
|
1010
|
+
name: NotRequired[str]
|
|
1011
|
+
table_name: NotRequired[str]
|
|
1012
|
+
kind: NotRequired[str]
|
|
1013
|
+
writable: NotRequired[bool]
|
|
1014
|
+
read_scope: NotRequired[str]
|
|
1015
|
+
write_scope: NotRequired[str]
|
|
1016
|
+
primary_key: NotRequired[str]
|
|
1017
|
+
|
|
1018
|
+
|
|
1019
|
+
class ObjectListResponse(TypedDict):
|
|
1020
|
+
objects: list[ObjectSummary]
|
|
1021
|
+
business_unit_id: NotRequired[str]
|
|
1022
|
+
|
|
1023
|
+
|
|
1024
|
+
class ObjectFieldDescriptor(TypedDict):
|
|
1025
|
+
column: NotRequired[str]
|
|
1026
|
+
api_name: NotRequired[str]
|
|
1027
|
+
type: NotRequired[str]
|
|
1028
|
+
nullable: NotRequired[bool]
|
|
1029
|
+
foreign_key_table: NotRequired[str]
|
|
1030
|
+
|
|
1031
|
+
|
|
1032
|
+
class ObjectDescribeResponse(TypedDict):
|
|
1033
|
+
name: NotRequired[str]
|
|
1034
|
+
table_name: NotRequired[str]
|
|
1035
|
+
writable: NotRequired[bool]
|
|
1036
|
+
read_scope: NotRequired[str]
|
|
1037
|
+
write_scope: NotRequired[str]
|
|
1038
|
+
primary_key: NotRequired[str]
|
|
1039
|
+
fields: NotRequired[list[ObjectFieldDescriptor]]
|
|
1040
|
+
custom_fields: NotRequired[list[str]]
|
|
1041
|
+
business_unit_id: NotRequired[str]
|
|
1042
|
+
|
|
1043
|
+
|
|
1044
|
+
class GenericListResponse(TypedDict):
|
|
1045
|
+
data: list[dict[str, Any]]
|
|
1046
|
+
has_more: NotRequired[bool]
|
|
1047
|
+
next_cursor: NotRequired[str]
|
|
1048
|
+
|
|
1049
|
+
|
|
1050
|
+
class GenericItemResponse(TypedDict):
|
|
1051
|
+
data: dict[str, Any]
|
|
1052
|
+
|
|
1053
|
+
|
|
1054
|
+
class AccountNode(TypedDict):
|
|
1055
|
+
accountId: NotRequired[str]
|
|
1056
|
+
parentAccountId: NotRequired[str]
|
|
1057
|
+
accountName: NotRequired[str]
|
|
1058
|
+
depth: NotRequired[int]
|
|
1059
|
+
|
|
1060
|
+
|
|
1061
|
+
class AccountHierarchyResponse(TypedDict):
|
|
1062
|
+
accountId: NotRequired[str]
|
|
1063
|
+
ancestors: NotRequired[list[AccountNode]]
|
|
1064
|
+
descendants: NotRequired[list[AccountNode]]
|
|
1065
|
+
|
|
1066
|
+
|
|
1067
|
+
class AccountParentResponse(TypedDict):
|
|
1068
|
+
success: NotRequired[bool]
|
|
1069
|
+
accountId: NotRequired[str]
|
|
1070
|
+
parentAccountId: NotRequired[str]
|
|
1071
|
+
|
|
1072
|
+
|
|
1073
|
+
class AccountClearParentResponse(TypedDict):
|
|
1074
|
+
success: NotRequired[bool]
|
|
1075
|
+
accountId: NotRequired[str]
|
|
1076
|
+
|
|
1077
|
+
|
|
1078
|
+
class GroupMember(TypedDict):
|
|
1079
|
+
memberId: NotRequired[str]
|
|
1080
|
+
firstName: NotRequired[str]
|
|
1081
|
+
lastName: NotRequired[str]
|
|
1082
|
+
status: NotRequired[str]
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
class AccountMembershipResponse(TypedDict):
|
|
1086
|
+
accountId: NotRequired[str]
|
|
1087
|
+
corpMemberId: NotRequired[str]
|
|
1088
|
+
groupMembers: NotRequired[list[GroupMember]]
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
class AccountEnrollResponse(TypedDict):
|
|
1092
|
+
accountId: NotRequired[str]
|
|
1093
|
+
memberId: NotRequired[str]
|
|
1094
|
+
memberType: NotRequired[str]
|
|
1095
|
+
created: NotRequired[bool]
|
|
1096
|
+
|
|
1097
|
+
|
|
1098
|
+
class ContactAssignResponse(TypedDict):
|
|
1099
|
+
success: NotRequired[bool]
|
|
1100
|
+
contactId: NotRequired[str]
|
|
1101
|
+
accountId: NotRequired[str]
|
|
1102
|
+
|
|
1103
|
+
|
|
1104
|
+
class ContactUnassignResponse(TypedDict):
|
|
1105
|
+
success: NotRequired[bool]
|
|
1106
|
+
contactId: NotRequired[str]
|
|
1107
|
+
|
|
1108
|
+
|
|
1109
|
+
class FraudRuleWriteRequest(TypedDict):
|
|
1110
|
+
rule_name: NotRequired[str]
|
|
1111
|
+
rule_type: NotRequired[str]
|
|
1112
|
+
threshold_count: NotRequired[int]
|
|
1113
|
+
threshold_amount: NotRequired[float]
|
|
1114
|
+
time_window_minutes: NotRequired[int]
|
|
1115
|
+
time_window_hours: NotRequired[int]
|
|
1116
|
+
cooldown_minutes: NotRequired[int]
|
|
1117
|
+
action: NotRequired[Literal['flag', 'review', 'block']]
|
|
1118
|
+
severity: NotRequired[Literal['low', 'medium', 'high', 'critical']]
|
|
1119
|
+
auto_suspend_member: NotRequired[bool]
|
|
1120
|
+
evaluation_mode: NotRequired[Literal['inline', 'async']]
|
|
1121
|
+
is_enabled: NotRequired[bool]
|
|
1122
|
+
brand_ids: NotRequired[list[str]]
|
|
1123
|
+
config: NotRequired[dict[str, Any]]
|
|
1124
|
+
|
|
1125
|
+
|
|
1126
|
+
class FraudRule(TypedDict):
|
|
1127
|
+
fraud_rule_id: NotRequired[str]
|
|
1128
|
+
business_unit_id: NotRequired[str]
|
|
1129
|
+
brand_id: NotRequired[str]
|
|
1130
|
+
brand_ids: NotRequired[list[str]]
|
|
1131
|
+
rule_name: NotRequired[str]
|
|
1132
|
+
rule_type: NotRequired[str]
|
|
1133
|
+
is_enabled: NotRequired[bool]
|
|
1134
|
+
config: NotRequired[dict[str, Any]]
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
class FraudRuleListRow(FraudRule):
|
|
1138
|
+
trigger_count_24h: NotRequired[int]
|
|
1139
|
+
|
|
1140
|
+
|
|
1141
|
+
class FraudRuleListResponse(TypedDict):
|
|
1142
|
+
data: list[FraudRuleListRow]
|
|
1143
|
+
total: int
|
|
1144
|
+
limit: int
|
|
1145
|
+
offset: int
|
|
1146
|
+
has_more: bool
|
|
1147
|
+
configured_rule_types: NotRequired[list[str]]
|
|
1148
|
+
scope: NotRequired[str]
|
|
1149
|
+
|
|
1150
|
+
|
|
1151
|
+
class FraudRuleResponse(TypedDict):
|
|
1152
|
+
data: FraudRule
|
|
1153
|
+
|
|
1154
|
+
|
|
1155
|
+
class Data14(TypedDict):
|
|
1156
|
+
fraud_rule_id: NotRequired[str]
|
|
1157
|
+
deleted: NotRequired[bool]
|
|
1158
|
+
|
|
1159
|
+
|
|
1160
|
+
class FraudRuleDeleteResponse(TypedDict):
|
|
1161
|
+
data: Data14
|
|
1162
|
+
|
|
1163
|
+
|
|
1164
|
+
class BatchSubRequest(TypedDict):
|
|
1165
|
+
id: NotRequired[str]
|
|
1166
|
+
method: Literal['GET', 'POST', 'PUT', 'PATCH', 'DELETE']
|
|
1167
|
+
path: str
|
|
1168
|
+
body: NotRequired[Any]
|
|
1169
|
+
depends_on: NotRequired[list[str]]
|
|
1170
|
+
|
|
1171
|
+
|
|
1172
|
+
class BatchRequest(TypedDict):
|
|
1173
|
+
requests: list[BatchSubRequest]
|
|
1174
|
+
stop_on_error: NotRequired[bool]
|
|
1175
|
+
|
|
1176
|
+
|
|
1177
|
+
class BatchSubResult(TypedDict):
|
|
1178
|
+
index: int
|
|
1179
|
+
id: NotRequired[str]
|
|
1180
|
+
success: bool
|
|
1181
|
+
status: int
|
|
1182
|
+
body: NotRequired[Any]
|
|
1183
|
+
error: NotRequired[Any]
|
|
1184
|
+
|
|
1185
|
+
|
|
1186
|
+
class BatchResponse(TypedDict):
|
|
1187
|
+
batch_id: str
|
|
1188
|
+
total: int
|
|
1189
|
+
succeeded: int
|
|
1190
|
+
failed: int
|
|
1191
|
+
transactional: bool
|
|
1192
|
+
results: list[BatchSubResult]
|
|
1193
|
+
|
|
1194
|
+
|
|
1195
|
+
class ChangeFeedRecord(TypedDict):
|
|
1196
|
+
cursor: str
|
|
1197
|
+
object: str
|
|
1198
|
+
record_id: str
|
|
1199
|
+
operation: str
|
|
1200
|
+
changed_fields: NotRequired[list[str]]
|
|
1201
|
+
data: NotRequired[dict[str, Any]]
|
|
1202
|
+
occurred_at: NotRequired[str]
|
|
1203
|
+
|
|
1204
|
+
|
|
1205
|
+
class Data15(TypedDict):
|
|
1206
|
+
changes: list[ChangeFeedRecord]
|
|
1207
|
+
next_cursor: str
|
|
1208
|
+
has_more: bool
|
|
1209
|
+
|
|
1210
|
+
|
|
1211
|
+
class ChangeFeedResponse(TypedDict):
|
|
1212
|
+
data: Data15
|
|
1213
|
+
|
|
1214
|
+
|
|
1215
|
+
class ShopifyOrderEarnRequest(TypedDict):
|
|
1216
|
+
shop_domain: str
|
|
1217
|
+
order: dict[str, Any]
|
|
1218
|
+
points_payment: NotRequired[ShopifyPointsPayment]
|
|
1219
|
+
|
|
1220
|
+
|
|
1221
|
+
class CreateSessionResponse(TypedDict):
|
|
1222
|
+
token: str
|
|
1223
|
+
status: Literal['active', 'ready', 'link_required']
|
|
1224
|
+
expires_at: str
|
|
1225
|
+
member_context: MemberContext
|
|
1226
|
+
payable_balances: list[PayableBalance]
|
|
1227
|
+
legal: Legal
|
|
1228
|
+
|
|
1229
|
+
|
|
1230
|
+
class SessionContext(TypedDict):
|
|
1231
|
+
status: Literal['active', 'link_required', 'expired']
|
|
1232
|
+
member_id: str
|
|
1233
|
+
display_name: str
|
|
1234
|
+
business_unit_id: str
|
|
1235
|
+
scopes: list[str]
|
|
1236
|
+
expires_at: str
|
|
1237
|
+
payable_balances: list[PayableBalance]
|
|
1238
|
+
displayCurrency: NotRequired[str]
|
|
1239
|
+
fxRateAsOf: NotRequired[str]
|
|
1240
|
+
|
|
1241
|
+
|
|
1242
|
+
class CheckoutRequest(TypedDict):
|
|
1243
|
+
merchantOrderId: str
|
|
1244
|
+
orderTotalCents: float
|
|
1245
|
+
currencyCode: str
|
|
1246
|
+
maxPointsApplicableCents: NotRequired[int]
|
|
1247
|
+
applicationMode: NotRequired[Literal['discount', 'tender', 'coupon']]
|
|
1248
|
+
merchandiseSubtotalCents: NotRequired[int]
|
|
1249
|
+
taxCents: NotRequired[int]
|
|
1250
|
+
shippingCents: NotRequired[int]
|
|
1251
|
+
coupon: NotRequired[CouponInput]
|
|
1252
|
+
refundPolicy: NotRequired[Literal['points_first', 'card_first', 'proportional', 'original_tender', 'points_only']]
|
|
1253
|
+
idempotencyKey: NotRequired[str]
|
|
1254
|
+
metadata: NotRequired[dict[str, Any]]
|
|
1255
|
+
reservations: list[ReservationInput]
|
|
1256
|
+
|
|
1257
|
+
|
|
1258
|
+
class CheckoutResponse(TypedDict):
|
|
1259
|
+
paymentSessionId: str
|
|
1260
|
+
status: Literal['open']
|
|
1261
|
+
expiresAt: str
|
|
1262
|
+
reservations: list[Reservation]
|
|
1263
|
+
totalReservedCents: int
|
|
1264
|
+
|
|
1265
|
+
|
|
1266
|
+
class CheckoutFraudHoldResponse(TypedDict):
|
|
1267
|
+
paymentSessionId: str
|
|
1268
|
+
status: Literal['pending_fraud_review']
|
|
1269
|
+
message: str
|
|
1270
|
+
fraudEventId: str
|
|
1271
|
+
expiresAt: str
|
|
1272
|
+
reservations: list[Reservation]
|
|
1273
|
+
errors: NotRequired[list[ReservationError]]
|
|
1274
|
+
totalReserved: int
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
class ConfirmPaymentResponse(TypedDict):
|
|
1278
|
+
reservationId: str
|
|
1279
|
+
status: Literal['confirmed']
|
|
1280
|
+
confirmedAt: str
|
|
1281
|
+
splitCheck: NotRequired[SplitCheck]
|
|
1282
|
+
|
|
1283
|
+
|
|
1284
|
+
class RefundByOrderRequest(TypedDict):
|
|
1285
|
+
merchantOrderId: NotRequired[str]
|
|
1286
|
+
checkoutSessionId: NotRequired[str]
|
|
1287
|
+
amountCents: float
|
|
1288
|
+
merchantRefundId: str
|
|
1289
|
+
kind: NotRequired[Literal['cancellation', 'return']]
|
|
1290
|
+
reason: NotRequired[str]
|
|
1291
|
+
refundPolicy: NotRequired[Literal['points_first', 'card_first', 'proportional', 'original_tender', 'points_only']]
|
|
1292
|
+
lines: NotRequired[list[RefundLineRef]]
|
|
1293
|
+
|
|
1294
|
+
|
|
1295
|
+
class PromotionSetResolved(TypedDict):
|
|
1296
|
+
id: str
|
|
1297
|
+
name: str
|
|
1298
|
+
description: NotRequired[str]
|
|
1299
|
+
promotions: list[ResolvedPromotionCard]
|
|
1300
|
+
displaySettings: NotRequired[dict[str, Any]]
|
|
1301
|
+
isPublished: NotRequired[bool]
|
|
1302
|
+
status: NotRequired[str]
|
|
1303
|
+
meta: NotRequired[dict[str, Any]]
|