@joai/sdk 4.2.3 → 4.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { WarpBrandUrls, WarpChainInfo, WarpChainName, WarpClient, WarpI18nText, WarpLocale, WarpNativeValue, WarpText, WarpWalletProvider } from "@joai/warps";
2
2
 
3
- //#region ../core/dist/types-CWSaEVa7.d.mts
3
+ //#region ../core/dist/types-BbqlPvhU.d.mts
4
4
  //#region src/http/types.d.ts
5
5
  interface IHttpService {
6
6
  readonly baseUrl: string;
@@ -31,6 +31,94 @@ interface IRequestOptions {
31
31
  [name: string]: string;
32
32
  };
33
33
  } //#endregion
34
+ //#region src/json/types.d.ts
35
+ type JsonValue = string | number | boolean | null | JsonValue[] | {
36
+ [key: string]: JsonValue;
37
+ }; //#endregion
38
+ //#region src/media/types.d.ts
39
+ type MediaLibraryAttributes = {
40
+ uuid: string;
41
+ order: number;
42
+ name: string;
43
+ custom_properties: {
44
+ [key: string]: JsonValue;
45
+ };
46
+ preview_url: null | string;
47
+ original_url: null | string;
48
+ extension?: string;
49
+ size?: number;
50
+ };
51
+ type MediaMime = 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp' | 'video/mp4' | 'video/webm' | 'video/quicktime' | 'video/x-msvideo' | 'audio/mpeg' | 'audio/mp3' | 'audio/ogg' | 'audio/wav' | 'audio/webm' | 'audio/aac' | 'audio/m4a' | 'audio/m4b' | 'audio/m4p' | 'audio/m4v' | 'application/pdf' | 'application/json';
52
+ type MediaAspectRatio = 'free' | '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
53
+ type Media = {
54
+ id: string;
55
+ name: string;
56
+ mime: MediaMime;
57
+ url: string;
58
+ library: MediaLibraryAttributes;
59
+ tags?: string[];
60
+ copyright?: string | null;
61
+ aiGenerated?: boolean;
62
+ }; //#endregion
63
+ //#region src/content/types.d.ts
64
+ type ContentStatus = 'draft' | 'published' | 'archived';
65
+ type ContentFieldType = 'text' | 'richText' | 'number' | 'boolean' | 'url' | 'image' | 'media' | 'list' | 'object' | 'reference';
66
+ type ContentField = {
67
+ key: string;
68
+ type: ContentFieldType;
69
+ label?: string;
70
+ required?: boolean;
71
+ };
72
+ type ContentDefinition = {
73
+ fields: ContentField[];
74
+ };
75
+ type ContentValue = string | number | boolean | null | ContentValue[] | {
76
+ [key: string]: ContentValue;
77
+ };
78
+ type ContentEntry = {
79
+ key: string;
80
+ value: ContentValue;
81
+ updatedAt: string;
82
+ };
83
+ type ContentVersion = {
84
+ id: string;
85
+ number: number;
86
+ status: ContentStatus;
87
+ entries: ContentEntry[];
88
+ snapshotHash: string;
89
+ origin: string;
90
+ createdAt: string;
91
+ updatedAt: string;
92
+ publishedAt: string | null;
93
+ };
94
+ type Content = {
95
+ id: string;
96
+ name: string;
97
+ slug: string;
98
+ schema: string | null;
99
+ definition: ContentDefinition;
100
+ metadata: Record<string, ContentValue>;
101
+ version: ContentVersion | null;
102
+ createdAt: string;
103
+ updatedAt: string;
104
+ };
105
+ type ContentPatch = {
106
+ key: string;
107
+ value: ContentValue;
108
+ };
109
+ type CreateContentInput = {
110
+ team: string;
111
+ name: string;
112
+ slug: string;
113
+ schema?: string | null;
114
+ definition: ContentDefinition;
115
+ metadata?: Record<string, ContentValue>;
116
+ };
117
+ type PatchContentInput = {
118
+ expectedVersion: number;
119
+ patches: ContentPatch[];
120
+ origin?: 'api' | 'inlineEditor' | 'joai' | 'mcp';
121
+ }; //#endregion
34
122
  //#endregion
35
123
  //#region ../core/dist/index.d.mts
36
124
  //#region src/auth/types.d.ts
@@ -107,191 +195,462 @@ type Character = {
107
195
  system: string;
108
196
  bio: WarpText | null;
109
197
  }; //#endregion
110
- //#region src/flow/types.d.ts
111
- type FlowCategory = 'none' | 'defi' | 'nft' | 'social' | 'devtools' | 'productivity' | 'trading' | 'portfolio';
112
- type FlowStatus = 'draft' | 'published';
113
- type Flow = {
114
- slug: string;
115
- team: Team;
198
+ //#region src/address/enums.d.ts
199
+ declare const AddressTypes: {
200
+ readonly Billing: "billing";
201
+ readonly Shipping: "shipping";
202
+ };
203
+ type AddressType = (typeof AddressTypes)[keyof typeof AddressTypes];
204
+ //#endregion
205
+ //#region src/address/types.d.ts
206
+ type Address = {
207
+ id: string;
208
+ type: AddressType;
116
209
  name: string;
117
- description: string | null;
118
- category: FlowCategory;
119
- status: FlowStatus;
120
- publishedAt: string | null;
121
- createdAt: string;
122
- updatedAt: string;
123
- steps: FlowStep[];
124
- locales: WarpLocale[];
125
- store: StoreInfo;
126
- screenshots: string[];
210
+ company: string | null;
211
+ addressOne: string;
212
+ addressTwo: string | null;
213
+ city: string;
214
+ state: string | null;
215
+ zipCode: string;
216
+ country: string;
217
+ phone: string | null;
218
+ isDefault: boolean;
219
+ business: boolean;
220
+ vatId: string | null;
221
+ isEU: boolean;
222
+ isEEA: boolean;
127
223
  };
128
- type FlowStep = {
129
- stepId: string;
130
- order: number;
131
- type: 'warp' | 'condition' | 'delay';
132
- warpIdentifier: string | null;
133
- dependsOn: string[] | null;
134
- inputMappings: FlowInputMapping[] | null;
135
- staticInputs: Record<string, any> | null;
136
- condition: Record<string, any> | null;
224
+ type AddressSnapshot = Pick<Address, 'name' | 'company' | 'addressOne' | 'addressTwo' | 'city' | 'state' | 'zipCode' | 'country' | 'phone' | 'business' | 'vatId'>;
225
+ type AddressInput = {
226
+ name: string;
227
+ addressOne: string;
228
+ city: string;
229
+ zipCode: string;
230
+ country: string;
231
+ type?: AddressType;
232
+ company?: string | null;
233
+ addressTwo?: string | null;
234
+ state?: string | null;
235
+ phone?: string | null;
236
+ business?: boolean;
237
+ vatId?: string | null;
137
238
  };
138
- type FlowInputMapping = {
139
- sourceStepId: string;
140
- sourceKey: string;
141
- targetInput: string;
142
- transform?: string;
143
- }; //#endregion
144
- //#region src/wallet/types.d.ts
145
- type Wallet = {
146
- chain: WarpChainName;
147
- active: boolean;
148
- provider: WarpWalletProvider;
149
- address: string;
150
- privateKey?: string;
151
- mnemonic?: string;
239
+ type AddressCreatePayload = {
240
+ name: string;
241
+ country: string;
242
+ type?: AddressType;
243
+ email?: string | null;
244
+ company?: string | null;
245
+ addressOne?: string | null;
246
+ addressTwo?: string | null;
247
+ city?: string | null;
248
+ state?: string | null;
249
+ zipCode?: string | null;
250
+ vatId?: string | null;
251
+ phone?: string | null;
252
+ isDefault?: boolean;
253
+ contact?: string;
254
+ team?: string;
152
255
  };
153
- type WalletList = Partial<Record<WarpChainName, {
154
- provider: WarpWalletProvider;
155
- address?: string;
156
- }>>; //#endregion
157
- //#region src/user/permissions.d.ts
158
- /** Permission string values — must match joai--api `UserPermission::value`. */
159
- declare const UserPermissions: {
160
- readonly BillingManage: "billing-manage";
161
- readonly TeamManage: "team-manage";
162
- readonly TeamView: "team-view";
163
- readonly TeamMemberInvite: "team-member-invite";
164
- readonly TeamMemberRemove: "team-member-remove";
165
- readonly TeamSecretView: "team-secret-view";
166
- readonly TeamSecretManage: "team-secret-manage";
167
- readonly AgentExecute: "agent-execute";
168
- readonly AgentWalletManage: "agent-wallet-manage";
169
- readonly SwarmCreate: "swarm-create";
256
+ type AddressUpdatePayload = Partial<Omit<AddressCreatePayload, 'contact' | 'team'>>; //#endregion
257
+ //#region src/commerce/enums.d.ts
258
+ declare const FulfillmentStatuses: {
259
+ readonly Pending: "pending";
260
+ readonly ReadyForPickup: "ready_for_pickup";
261
+ readonly Shipped: "shipped";
262
+ readonly Delivered: "delivered";
263
+ readonly Cancelled: "cancelled";
170
264
  };
171
- type UserPermission = (typeof UserPermissions)[keyof typeof UserPermissions];
172
- //#endregion
173
- //#region src/user/roles.d.ts
174
- /** Team member roles — values must match joai--api `UserRole::toName()`. */
175
- declare const UserRoles: {
176
- readonly Owner: "owner";
177
- readonly Admin: "admin";
178
- readonly Member: "member";
179
- readonly Developer: "developer";
265
+ type FulfillmentStatus = (typeof FulfillmentStatuses)[keyof typeof FulfillmentStatuses];
266
+ declare const FulfillmentMethods: {
267
+ readonly Shipping: "shipping";
268
+ readonly Pickup: "pickup";
180
269
  };
181
- type UserRole = (typeof UserRoles)[keyof typeof UserRoles];
182
- //#endregion
183
- //#region src/user/types.d.ts
184
- type UserMode = 'simple' | 'advanced';
185
- type UserInterest = 'payments' | 'health' | 'content' | 'business' | 'finance' | 'research' | 'shopping' | 'web3' | 'developer' | 'fitness' | 'ecommerce';
186
- type UserSettings = {
187
- mode: UserMode;
188
- interests: UserInterest[];
189
- hotkeys?: Record<string, string> | null;
190
- 'payout.address'?: string | null;
191
- 'payout.chain'?: string | null;
192
- 'voice.playback-mode'?: 'voice-control' | 'chat' | 'both' | null;
193
- 'voice.corrections'?: {
194
- wrong: string;
195
- correct: string;
196
- }[];
197
- 'warp.notifications'?: Record<string, Record<string, boolean>>;
198
- 'withdrawal.waiver.accepted-at'?: string | null;
199
- 'active.team'?: string | null;
270
+ type FulfillmentMethod = (typeof FulfillmentMethods)[keyof typeof FulfillmentMethods];
271
+ declare const ReturnStatuses: {
272
+ readonly Requested: "requested";
273
+ readonly Approved: "approved";
274
+ readonly Rejected: "rejected";
275
+ readonly Received: "received";
276
+ readonly Closed: "closed";
200
277
  };
201
- type KycStatus = 'pending' | 'approved' | 'rejected';
202
- type Kyc = {
203
- status: KycStatus;
278
+ type ReturnStatus = (typeof ReturnStatuses)[keyof typeof ReturnStatuses];
279
+ //#endregion
280
+ //#region src/commerce/types.d.ts
281
+ type ShippingRate = {
282
+ id: number;
283
+ name: string;
284
+ price: number;
285
+ fee?: number;
286
+ freeShippingThreshold?: number | null;
287
+ minOrderValue?: number | null;
288
+ maxOrderValue?: number | null;
289
+ minWeight?: number | null;
290
+ maxWeight?: number | null;
291
+ estimatedMinDays?: number | null;
292
+ estimatedMaxDays?: number | null;
293
+ active?: boolean;
294
+ position?: number;
204
295
  };
205
- type UserPrivate = {
296
+ type CheckoutSnapshot = {
206
297
  id: string;
298
+ fulfillmentMethod: FulfillmentMethod;
299
+ totals: {
300
+ subtotal: number;
301
+ shippingFee: number;
302
+ total: number;
303
+ };
304
+ expiresAt: string;
305
+ accessToken?: string | null;
306
+ };
307
+ type GuestBuyer = {
207
308
  name: string;
208
309
  email: string;
209
- hasVerifiedEmail: boolean;
210
- balance: number;
211
- wallets: Wallet[];
212
- hasProfileImage: boolean;
213
- profileImageUrl: string;
214
- country: string | null;
215
- timezone: string | null;
216
- socials: UserSocialAccount[];
217
- justCreated: boolean;
218
- affiliate: Affiliate | null;
219
- kyc?: Kyc | null;
220
- settings: UserSettings;
221
310
  };
222
- type UserSocialAccount = {
223
- platform: string;
311
+ type CheckoutSnapshotRequest = {
312
+ fulfillmentMethod: FulfillmentMethod;
313
+ items: {
314
+ id: string;
315
+ type: 'product' | 'service' | 'coupon';
316
+ quantity: number;
317
+ }[];
318
+ billingAddressId?: number | null;
319
+ shippingAddressId?: number | null;
320
+ billingAddress?: AddressInput;
321
+ shippingAddress?: AddressInput;
322
+ shippingRateId?: number | null;
323
+ fulfillmentLocationId?: number | null;
324
+ };
325
+ type ShippingZone = {
326
+ id: number;
327
+ name: string;
328
+ countries: string[];
329
+ postalCodeRules: string[] | null;
330
+ active: boolean;
331
+ position: number;
332
+ rates: ShippingRate[];
333
+ };
334
+ type FulfillmentLocation = {
335
+ id: number;
336
+ name: string;
337
+ addressId: number | null;
338
+ address: Address | null;
339
+ instructions: string | null;
340
+ active: boolean;
341
+ };
342
+ type Fulfillment = {
224
343
  id: string;
225
- username: string;
226
- profileUrl: string;
344
+ orderId: number;
345
+ method: FulfillmentMethod;
346
+ status: FulfillmentStatus;
347
+ carrierCode: string | null;
348
+ trackingNumber: string | null;
349
+ trackingUrl: string | null;
350
+ items: {
351
+ orderItemId: number;
352
+ quantity: number;
353
+ }[];
354
+ shippedAt: string | null;
355
+ readyForPickupAt: string | null;
356
+ deliveredAt: string | null;
227
357
  };
228
- type User = {
358
+ type Return = {
229
359
  id: string;
230
- name: string;
360
+ orderId: number;
361
+ status: ReturnStatus;
362
+ reason: string;
363
+ merchantNote: string | null;
364
+ items: {
365
+ orderItemId: number;
366
+ quantity: number;
367
+ condition: string | null;
368
+ }[];
369
+ refundAmount: number | null;
370
+ };
371
+ type SubscriptionDelivery = {
372
+ fulfillmentMethod: FulfillmentMethod | null;
373
+ nextOrderAt: string | null;
374
+ pausedAt: string | null;
375
+ shippingAddress?: AddressSnapshot | null;
376
+ shippingRate?: Pick<ShippingRate, 'name' | 'price'> | null;
377
+ fulfillmentLocation?: {
378
+ name: string;
379
+ instructions: string | null;
380
+ } | null;
381
+ }; //#endregion
382
+ //#region src/wallet/types.d.ts
383
+ type Wallet = {
384
+ chain: WarpChainName;
385
+ active: boolean;
386
+ provider: WarpWalletProvider;
231
387
  address: string;
232
- balance: number | null;
233
- hasProfileImage: boolean;
234
- profileImageUrl: string;
235
- swarmRole: string | null;
388
+ privateKey?: string;
389
+ mnemonic?: string;
236
390
  };
237
- type AuthUser = {
391
+ type WalletList = Partial<Record<WarpChainName, {
392
+ provider: WarpWalletProvider;
393
+ address?: string;
394
+ }>>; //#endregion
395
+ //#region src/contact/types.d.ts
396
+ type ContactHealth = 'active' | 'lukewarm' | 'cold' | 'stale' | 'unknown';
397
+ type ContactConsentStatus = 'pending' | 'confirmed' | 'superseded' | 'unsubscribed';
398
+ type ContactConsent = {
399
+ id: string;
400
+ purpose: string;
401
+ status: ContactConsentStatus;
402
+ email: string;
403
+ consentText: {
404
+ label?: string | Record<string, string>;
405
+ description?: string | Record<string, string> | null;
406
+ };
407
+ privacyUrl: string | null;
408
+ source: {
409
+ formIdentifier?: string | null;
410
+ formTitle?: string | Record<string, string> | null;
411
+ };
412
+ requestedAt: string;
413
+ confirmedAt: string | null;
414
+ unsubscribedAt: string | null;
415
+ };
416
+ type Contact = {
238
417
  id: string;
239
418
  name: string;
240
- phone: string | null;
419
+ wallets: Wallet[];
241
420
  email: string | null;
421
+ phone: string | null;
422
+ company: string | null;
423
+ title: string | null;
424
+ birthday: string | null;
425
+ website: string | null;
426
+ location: string | null;
427
+ socials: Record<string, string> | null;
428
+ notes: string | null;
429
+ tags: string[] | null;
430
+ userId: string | null;
431
+ locale?: string | null;
432
+ props?: Record<string, string> | null;
433
+ settings?: {
434
+ marketingOptOut?: boolean;
435
+ } | null;
436
+ consents?: ContactConsent[];
437
+ lastActivityAt?: string | null;
438
+ health?: ContactHealth;
439
+ nextFollowUpAt?: string | null;
440
+ followUpNote?: string | null;
242
441
  };
243
- type Affiliate = {
442
+ type ContactActivityType = 'note' | 'call' | 'meeting' | 'task' | 'update' | 'custom' | 'form' | 'loyalty' | 'follow_up';
443
+ type ContactActivityAuthor = {
244
444
  name: string;
245
- tier: AffiliateTier;
246
- balance: number;
247
- payoutAddress: string;
248
- application: string;
249
- status: AffiliateStatus;
445
+ imageUrl: string | null;
446
+ };
447
+ type ContactActivity = {
448
+ id: string;
449
+ type: ContactActivityType;
450
+ description: string | null;
451
+ meta: Record<string, JsonValue> | null;
452
+ agentName: string | null;
250
453
  createdAt: string;
251
- inviteLinkUrl: string;
252
- settings: {
253
- minPayoutBalance: number;
254
- commissionExtraPercent?: number;
255
- customerDiscountPercent: number;
454
+ author?: ContactActivityAuthor | null;
455
+ };
456
+ type ContactFormData = {
457
+ name?: string;
458
+ email?: string | null;
459
+ phone?: string | null;
460
+ company?: string | null;
461
+ title?: string | null;
462
+ birthday?: string | null;
463
+ website?: string | null;
464
+ location?: string | null;
465
+ socials?: Record<string, string> | null;
466
+ notes?: string | null;
467
+ tags?: string[] | null;
468
+ locale?: string | null;
469
+ props?: Record<string, string> | null;
470
+ settings?: {
471
+ marketingOptOut?: boolean;
256
472
  };
257
- clicks: number;
258
- coupons: Coupon[];
259
- user: User | null;
473
+ nextFollowUpAt?: string | null;
474
+ followUpNote?: string | null;
260
475
  };
261
- type AffiliateTierName = 'bronze' | 'silver' | 'gold';
262
- type AffiliateTier = {
263
- name: AffiliateTierName;
264
- displayName: string;
265
- commission: number;
266
- threshold: number;
476
+ type ContactCreatePayload = ContactFormData & {
477
+ name: string;
478
+ wallets?: WalletList;
479
+ }; //#endregion
480
+ //#region src/flow/types.d.ts
481
+ type FlowCategory = 'none' | 'defi' | 'nft' | 'social' | 'devtools' | 'productivity' | 'trading' | 'portfolio';
482
+ type FlowStatus = 'draft' | 'published';
483
+ type Flow = {
484
+ slug: string;
485
+ team: Team;
486
+ name: string;
487
+ description: string | null;
488
+ category: FlowCategory;
489
+ status: FlowStatus;
490
+ publishedAt: string | null;
491
+ createdAt: string;
492
+ updatedAt: string;
493
+ steps: FlowStep[];
494
+ locales: WarpLocale[];
495
+ store: StoreInfo;
496
+ screenshots: string[];
267
497
  };
268
- type AffiliateStatus = 'pending' | 'approved' | 'rejected' | 'suspended' | 'demoted'; //#endregion
269
- //#region src/team/apps.d.ts
270
- declare const NativeApps: {
271
- readonly Board: "board";
272
- readonly Shop: "shop";
273
- readonly SmartLinks: "smart-links";
274
- readonly Contacts: "contacts";
275
- readonly Forms: "forms";
276
- readonly Appointments: "appointments";
277
- readonly Workspace: "workspace";
278
- readonly Meeting: "meeting";
279
- readonly VoiceDictation: "voice-dictation";
280
- readonly Heartbeats: "heartbeats";
281
- readonly Wallets: "wallets";
282
- readonly Campaigns: "campaigns";
283
- readonly News: "news";
284
- readonly Sites: "sites";
285
- readonly Contracts: "contracts";
498
+ type FlowStep = {
499
+ stepId: string;
500
+ order: number;
501
+ type: 'warp' | 'condition' | 'delay';
502
+ warpIdentifier: string | null;
503
+ dependsOn: string[] | null;
504
+ inputMappings: FlowInputMapping[] | null;
505
+ staticInputs: Record<string, any> | null;
506
+ condition: Record<string, any> | null;
286
507
  };
287
- type NativeApp = (typeof NativeApps)[keyof typeof NativeApps];
288
- //#endregion
289
- //#region src/access/team-access.d.ts
290
- type TeamFeatureArea = 'nativeApps' | 'agentSettings' | 'teamSettings' | 'developerHub' | 'areas' | 'commerce';
291
- /** Keys per area that the API evaluates in `team.access`. */
292
- type TeamAccessCatalog = Partial<Record<TeamFeatureArea, string[]>>;
293
- type TeamAccessConfig = {
294
- accessCatalog: TeamAccessCatalog;
508
+ type FlowInputMapping = {
509
+ sourceStepId: string;
510
+ sourceKey: string;
511
+ targetInput: string;
512
+ transform?: string;
513
+ }; //#endregion
514
+ //#region src/user/permissions.d.ts
515
+ /** Permission string values — must match joai--api `UserPermission::value`. */
516
+ declare const UserPermissions: {
517
+ readonly BillingManage: "billing-manage";
518
+ readonly TeamManage: "team-manage";
519
+ readonly TeamView: "team-view";
520
+ readonly ContentEdit: "content-edit";
521
+ readonly ContentPublish: "content-publish";
522
+ readonly TeamMemberInvite: "team-member-invite";
523
+ readonly TeamMemberRemove: "team-member-remove";
524
+ readonly TeamSecretView: "team-secret-view";
525
+ readonly TeamSecretManage: "team-secret-manage";
526
+ readonly AgentExecute: "agent-execute";
527
+ readonly AgentWalletManage: "agent-wallet-manage";
528
+ readonly SwarmCreate: "swarm-create";
529
+ };
530
+ type UserPermission = (typeof UserPermissions)[keyof typeof UserPermissions];
531
+ //#endregion
532
+ //#region src/user/roles.d.ts
533
+ /** Team member roles — values must match joai--api `UserRole::toName()`. */
534
+ declare const UserRoles: {
535
+ readonly Owner: "owner";
536
+ readonly Admin: "admin";
537
+ readonly Member: "member";
538
+ readonly Developer: "developer";
539
+ };
540
+ type UserRole = (typeof UserRoles)[keyof typeof UserRoles];
541
+ //#endregion
542
+ //#region src/user/types.d.ts
543
+ type UserMode = 'simple' | 'advanced';
544
+ type UserInterest = 'payments' | 'health' | 'content' | 'business' | 'finance' | 'research' | 'shopping' | 'web3' | 'developer' | 'fitness' | 'ecommerce';
545
+ type UserSettings = {
546
+ mode: UserMode;
547
+ interests: UserInterest[];
548
+ hotkeys?: Record<string, string> | null;
549
+ 'payout.address'?: string | null;
550
+ 'payout.chain'?: string | null;
551
+ 'voice.playback-mode'?: 'voice-control' | 'chat' | 'both' | null;
552
+ 'voice.corrections'?: {
553
+ wrong: string;
554
+ correct: string;
555
+ }[];
556
+ 'warp.notifications'?: Record<string, Record<string, boolean>>;
557
+ 'withdrawal.waiver.accepted-at'?: string | null;
558
+ 'active.team'?: string | null;
559
+ };
560
+ type KycStatus = 'pending' | 'approved' | 'rejected';
561
+ type Kyc = {
562
+ status: KycStatus;
563
+ };
564
+ type UserPrivate = {
565
+ id: string;
566
+ name: string;
567
+ email: string;
568
+ hasVerifiedEmail: boolean;
569
+ balance: number;
570
+ wallets: Wallet[];
571
+ hasProfileImage: boolean;
572
+ profileImageUrl: string;
573
+ country: string | null;
574
+ timezone: string | null;
575
+ socials: UserSocialAccount[];
576
+ justCreated: boolean;
577
+ affiliate: Affiliate | null;
578
+ kyc?: Kyc | null;
579
+ settings: UserSettings;
580
+ };
581
+ type UserSocialAccount = {
582
+ platform: string;
583
+ id: string;
584
+ username: string;
585
+ profileUrl: string;
586
+ };
587
+ type User = {
588
+ id: string;
589
+ name: string;
590
+ address: string;
591
+ balance: number | null;
592
+ hasProfileImage: boolean;
593
+ profileImageUrl: string;
594
+ swarmRole: string | null;
595
+ };
596
+ type AuthUser = {
597
+ id: string;
598
+ name: string;
599
+ phone: string | null;
600
+ email: string | null;
601
+ };
602
+ type Affiliate = {
603
+ name: string;
604
+ tier: AffiliateTier;
605
+ balance: number;
606
+ payoutAddress: string;
607
+ application: string;
608
+ status: AffiliateStatus;
609
+ createdAt: string;
610
+ inviteLinkUrl: string;
611
+ settings: {
612
+ minPayoutBalance: number;
613
+ commissionExtraPercent?: number;
614
+ customerDiscountPercent: number;
615
+ };
616
+ clicks: number;
617
+ coupons: Coupon[];
618
+ user: User | null;
619
+ };
620
+ type AffiliateTierName = 'bronze' | 'silver' | 'gold';
621
+ type AffiliateTier = {
622
+ name: AffiliateTierName;
623
+ displayName: string;
624
+ commission: number;
625
+ threshold: number;
626
+ };
627
+ type AffiliateStatus = 'pending' | 'approved' | 'rejected' | 'suspended' | 'demoted'; //#endregion
628
+ //#region src/team/apps.d.ts
629
+ declare const NativeApps: {
630
+ readonly Board: "board";
631
+ readonly Shop: "shop";
632
+ readonly SmartLinks: "smart-links";
633
+ readonly Contacts: "contacts";
634
+ readonly Forms: "forms";
635
+ readonly Appointments: "appointments";
636
+ readonly Workspace: "workspace";
637
+ readonly Meeting: "meeting";
638
+ readonly VoiceDictation: "voice-dictation";
639
+ readonly Heartbeats: "heartbeats";
640
+ readonly Wallets: "wallets";
641
+ readonly Campaigns: "campaigns";
642
+ readonly News: "news";
643
+ readonly Sites: "sites";
644
+ readonly Contracts: "contracts";
645
+ };
646
+ type NativeApp = (typeof NativeApps)[keyof typeof NativeApps];
647
+ //#endregion
648
+ //#region src/access/team-access.d.ts
649
+ type TeamFeatureArea = 'nativeApps' | 'agentSettings' | 'teamSettings' | 'developerHub' | 'areas' | 'commerce';
650
+ /** Keys per area that the API evaluates in `team.access`. */
651
+ type TeamAccessCatalog = Partial<Record<TeamFeatureArea, string[]>>;
652
+ type TeamAccessConfig = {
653
+ accessCatalog: TeamAccessCatalog;
295
654
  };
296
655
  /** Resolved feature access from API `TeamPrivate.access` — do not evaluate rules on the client. */
297
656
  type TeamFeatureAccess = {
@@ -326,464 +685,166 @@ type TeamMeta = {
326
685
  'board.auto.enabled'?: boolean;
327
686
  'payments.online'?: boolean;
328
687
  'payments.coupons'?: boolean;
329
- 'kiosk.enabled'?: boolean;
330
- 'stock.enabled'?: boolean;
331
- contactPropertyMaskWarp?: string;
332
- branding?: TeamBrand | null;
333
- settings: Record<string, unknown> & {
334
- apps?: NativeApp[];
335
- };
336
- };
337
- type TeamPlace = {
338
- provider: 'google';
339
- sourceId: string;
340
- name: string | null;
341
- address: string | null;
342
- location: {
343
- lat: number | null;
344
- lng: number | null;
345
- };
346
- rating?: number | null;
347
- reviewCount?: number | null;
348
- websiteUrl?: string | null;
349
- mapsUrl?: string | null;
350
- businessStatus?: string | null;
351
- };
352
- type Team = {
353
- slug: string;
354
- name: string;
355
- personal: boolean;
356
- category: TeamCategory;
357
- tags?: string[] | null;
358
- description: TranslatableValue | null;
359
- locale: WarpLocale;
360
- timezone: string;
361
- place?: TeamPlace | null;
362
- meta?: TeamMeta;
363
- features?: TeamFeature[];
364
- cover?: string | null;
365
- logo: string | null;
366
- tagline?: TranslatableValue | null;
367
- public: boolean;
368
- createdAt: string;
369
- blueprints?: Blueprint[];
370
- flows?: Flow[];
371
- coupons?: Coupon[];
372
- };
373
- type TeamBrand = {
374
- bg?: string;
375
- fg?: string;
376
- label?: string;
377
- logo?: string;
378
- bankAccountHolder?: string;
379
- bankIban?: string;
380
- bankBic?: string;
381
- invoiceAddress?: string;
382
- invoiceVat?: string;
383
- invoiceCity?: string;
384
- invoiceZip?: string;
385
- invoiceCountry?: string;
386
- };
387
- type TeamPrivate = {
388
- slug: string;
389
- name: string;
390
- personal: boolean;
391
- description: TranslatableValue | null;
392
- tags?: string[] | null;
393
- tagline: TranslatableValue | null;
394
- balance: number;
395
- locale: WarpLocale;
396
- timezone: string;
397
- place?: TeamPlace | null;
398
- logo: string | null;
399
- cover: string | null;
400
- subscription: {
401
- premium: boolean;
402
- lifetime: boolean;
403
- plan: Plan;
404
- provider: PaymentProvider | null;
405
- payer: User | null;
406
- gracePeriod: boolean;
407
- autoRenew: boolean;
408
- cycleEndsAt: string | null;
409
- resetsAt: string | null;
410
- startedAt: string | null;
411
- renewedAt: string | null;
412
- expiresAt: string | null;
413
- };
414
- meta: TeamMeta;
415
- branding: TeamBrand;
416
- category: TeamCategory;
417
- createdAt: string;
418
- justCreated: boolean;
419
- role?: UserRole | null;
420
- permissions?: UserPermission[];
421
- access?: TeamFeatureAccess;
422
- accessCatalog?: TeamAccessCatalog;
423
- };
424
- type ByokProviderConfig = {
425
- apiKey?: string;
426
- accessKey?: string;
427
- secretKey?: string;
428
- };
429
- type ByokProviders = {
430
- openai?: ByokProviderConfig;
431
- anthropic?: ByokProviderConfig;
432
- google?: ByokProviderConfig;
433
- xai?: ByokProviderConfig;
434
- klingai?: ByokProviderConfig;
435
- };
436
- type TeamUsage = Partial<Record<PlanFeature, TeamFeatureUsage>> & {
437
- extraUsageEnabled?: boolean;
438
- currentSpending?: number;
439
- walletCloudUsed?: number;
440
- walletCloudPremiumUsed?: number;
441
- spendingLimit?: number | null;
442
- cycleEndsAt?: string | null;
443
- resetsAt?: string | null;
444
- autoReload?: {
445
- enabled: boolean;
446
- thresholdCents: number | null;
447
- amountCents: number | null;
448
- };
449
- };
450
- type TeamFeatureUsage = {
451
- current: number;
452
- limit: number;
453
- reached?: boolean;
454
- };
455
- type AiCostEntry = {
456
- id: number;
457
- model: string | null;
458
- agent: {
459
- name: string;
460
- uuid: string;
461
- } | null;
462
- inputTokens: number;
463
- outputTokens: number;
464
- totalTokens: number;
465
- costCents: number | null;
466
- createdAt: string;
467
- };
468
- type AiCostsSummary = {
469
- totalCostCents: number;
470
- totalTokens: number;
471
- totalRequests: number;
472
- byModel: Record<string, {
473
- costCents: number;
474
- tokens: number;
475
- count: number;
476
- }>;
477
- };
478
- type AiCostsResponse = {
479
- summary: AiCostsSummary;
480
- usages: {
481
- data: AiCostEntry[];
482
- pagination: {
483
- currentPage: number;
484
- lastPage: number;
485
- perPage: number;
486
- total: number;
487
- };
488
- };
489
- }; //#endregion
490
- //#region src/address/enums.d.ts
491
- declare const AddressTypes: {
492
- readonly Billing: "billing";
493
- readonly Shipping: "shipping";
494
- };
495
- type AddressType = (typeof AddressTypes)[keyof typeof AddressTypes];
496
- //#endregion
497
- //#region src/address/types.d.ts
498
- type Address = {
499
- id: string;
500
- type: AddressType;
501
- name: string;
502
- company: string | null;
503
- addressOne: string;
504
- addressTwo: string | null;
505
- city: string;
506
- state: string | null;
507
- zipCode: string;
508
- country: string;
509
- phone: string | null;
510
- isDefault: boolean;
511
- business: boolean;
512
- vatId: string | null;
513
- isEU: boolean;
514
- isEEA: boolean;
515
- };
516
- type AddressSnapshot = Pick<Address, 'name' | 'company' | 'addressOne' | 'addressTwo' | 'city' | 'state' | 'zipCode' | 'country' | 'phone' | 'business' | 'vatId'>;
517
- type AddressInput = {
518
- name: string;
519
- addressOne: string;
520
- city: string;
521
- zipCode: string;
522
- country: string;
523
- type?: AddressType;
524
- company?: string | null;
525
- addressTwo?: string | null;
526
- state?: string | null;
527
- phone?: string | null;
528
- business?: boolean;
529
- vatId?: string | null;
530
- };
531
- type AddressCreatePayload = {
532
- name: string;
533
- country: string;
534
- type?: AddressType;
535
- email?: string | null;
536
- company?: string | null;
537
- addressOne?: string | null;
538
- addressTwo?: string | null;
539
- city?: string | null;
540
- state?: string | null;
541
- zipCode?: string | null;
542
- vatId?: string | null;
543
- phone?: string | null;
544
- isDefault?: boolean;
545
- contact?: string;
546
- team?: string;
547
- };
548
- type AddressUpdatePayload = Partial<Omit<AddressCreatePayload, 'contact' | 'team'>>; //#endregion
549
- //#region src/commerce/enums.d.ts
550
- declare const FulfillmentStatuses: {
551
- readonly Pending: "pending";
552
- readonly ReadyForPickup: "ready_for_pickup";
553
- readonly Shipped: "shipped";
554
- readonly Delivered: "delivered";
555
- readonly Cancelled: "cancelled";
556
- };
557
- type FulfillmentStatus = (typeof FulfillmentStatuses)[keyof typeof FulfillmentStatuses];
558
- declare const FulfillmentMethods: {
559
- readonly Shipping: "shipping";
560
- readonly Pickup: "pickup";
561
- };
562
- type FulfillmentMethod = (typeof FulfillmentMethods)[keyof typeof FulfillmentMethods];
563
- declare const ReturnStatuses: {
564
- readonly Requested: "requested";
565
- readonly Approved: "approved";
566
- readonly Rejected: "rejected";
567
- readonly Received: "received";
568
- readonly Closed: "closed";
569
- };
570
- type ReturnStatus = (typeof ReturnStatuses)[keyof typeof ReturnStatuses];
571
- //#endregion
572
- //#region src/commerce/types.d.ts
573
- type ShippingRate = {
574
- id: number;
575
- name: string;
576
- price: number;
577
- fee?: number;
578
- freeShippingThreshold?: number | null;
579
- minOrderValue?: number | null;
580
- maxOrderValue?: number | null;
581
- minWeight?: number | null;
582
- maxWeight?: number | null;
583
- estimatedMinDays?: number | null;
584
- estimatedMaxDays?: number | null;
585
- active?: boolean;
586
- position?: number;
587
- };
588
- type CheckoutSnapshot = {
589
- id: string;
590
- fulfillmentMethod: FulfillmentMethod;
591
- totals: {
592
- subtotal: number;
593
- shippingFee: number;
594
- total: number;
595
- };
596
- expiresAt: string;
597
- accessToken?: string | null;
598
- };
599
- type GuestBuyer = {
600
- name: string;
601
- email: string;
602
- };
603
- type CheckoutSnapshotRequest = {
604
- fulfillmentMethod: FulfillmentMethod;
605
- items: {
606
- id: string;
607
- type: 'product' | 'service' | 'coupon';
608
- quantity: number;
609
- }[];
610
- billingAddressId?: number | null;
611
- shippingAddressId?: number | null;
612
- billingAddress?: AddressInput;
613
- shippingAddress?: AddressInput;
614
- shippingRateId?: number | null;
615
- fulfillmentLocationId?: number | null;
616
- };
617
- type ShippingZone = {
618
- id: number;
619
- name: string;
620
- countries: string[];
621
- postal_code_rules: string[] | null;
622
- active: boolean;
623
- position: number;
624
- rates: ShippingRate[];
625
- };
626
- type FulfillmentLocation = {
627
- id: number;
628
- name: string;
629
- address_id: number | null;
630
- address: Address | null;
631
- instructions: string | null;
632
- active: boolean;
633
- };
634
- type Fulfillment = {
635
- id: string;
636
- orderId: number;
637
- method: FulfillmentMethod;
638
- status: FulfillmentStatus;
639
- carrierCode: string | null;
640
- trackingNumber: string | null;
641
- trackingUrl: string | null;
642
- items: {
643
- orderItemId: number;
644
- quantity: number;
645
- }[];
646
- shippedAt: string | null;
647
- readyForPickupAt: string | null;
648
- deliveredAt: string | null;
649
- };
650
- type Return = {
651
- id: string;
652
- orderId: number;
653
- status: ReturnStatus;
654
- reason: string;
655
- merchantNote: string | null;
656
- items: {
657
- orderItemId: number;
658
- quantity: number;
659
- condition: string | null;
660
- }[];
661
- refundAmount: number | null;
662
- };
663
- type SubscriptionDelivery = {
664
- fulfillmentMethod: FulfillmentMethod | null;
665
- nextOrderAt: string | null;
666
- pausedAt: string | null;
667
- shippingAddress?: AddressSnapshot | null;
668
- shippingRate?: Pick<ShippingRate, 'name' | 'price'> | null;
669
- fulfillmentLocation?: {
670
- name: string;
671
- instructions: string | null;
672
- } | null;
673
- }; //#endregion
674
- //#region src/json/types.d.ts
675
- type JsonValue = string | number | boolean | null | JsonValue[] | {
676
- [key: string]: JsonValue;
677
- }; //#endregion
678
- //#region src/contact/types.d.ts
679
- type ContactHealth = 'active' | 'lukewarm' | 'cold' | 'stale' | 'unknown';
680
- type ContactConsentStatus = 'pending' | 'confirmed' | 'superseded' | 'unsubscribed';
681
- type ContactConsent = {
682
- id: string;
683
- purpose: string;
684
- status: ContactConsentStatus;
685
- email: string;
686
- consentText: {
687
- label?: string | Record<string, string>;
688
- description?: string | Record<string, string> | null;
689
- };
690
- privacyUrl: string | null;
691
- source: {
692
- formIdentifier?: string | null;
693
- formTitle?: string | Record<string, string> | null;
688
+ 'kiosk.enabled'?: boolean;
689
+ 'stock.enabled'?: boolean;
690
+ contactPropertyMaskWarp?: string;
691
+ branding?: TeamBrand | null;
692
+ settings: Record<string, unknown> & {
693
+ apps?: NativeApp[];
694
694
  };
695
- requestedAt: string;
696
- confirmedAt: string | null;
697
- unsubscribedAt: string | null;
698
695
  };
699
- type Contact = {
700
- id: string;
701
- name: string;
702
- wallets: Wallet[];
703
- email: string | null;
704
- phone: string | null;
705
- company: string | null;
706
- title: string | null;
707
- birthday: string | null;
708
- website: string | null;
709
- location: string | null;
710
- socials: Record<string, string> | null;
711
- notes: string | null;
712
- tags: string[] | null;
713
- userId: string | null;
714
- locale?: string | null;
715
- props?: Record<string, string> | null;
716
- settings?: {
717
- marketingOptOut?: boolean;
718
- } | null;
719
- consents?: ContactConsent[];
720
- lastActivityAt?: string | null;
721
- health?: ContactHealth;
722
- nextFollowUpAt?: string | null;
723
- followUpNote?: string | null;
696
+ type TeamPlace = {
697
+ provider: 'google';
698
+ sourceId: string;
699
+ name: string | null;
700
+ address: string | null;
701
+ location: {
702
+ lat: number | null;
703
+ lng: number | null;
704
+ };
705
+ rating?: number | null;
706
+ reviewCount?: number | null;
707
+ websiteUrl?: string | null;
708
+ mapsUrl?: string | null;
709
+ businessStatus?: string | null;
724
710
  };
725
- type ContactActivityType = 'note' | 'call' | 'meeting' | 'task' | 'update' | 'custom' | 'form' | 'loyalty' | 'follow_up';
726
- type ContactActivityAuthor = {
711
+ type Team = {
712
+ slug: string;
727
713
  name: string;
728
- imageUrl: string | null;
729
- };
730
- type ContactActivity = {
731
- id: string;
732
- type: ContactActivityType;
733
- description: string | null;
734
- meta: Record<string, JsonValue> | null;
735
- agentName: string | null;
714
+ personal: boolean;
715
+ category: TeamCategory;
716
+ tags?: string[] | null;
717
+ description: TranslatableValue | null;
718
+ locale: WarpLocale;
719
+ timezone: string;
720
+ place?: TeamPlace | null;
721
+ meta?: TeamMeta;
722
+ features?: TeamFeature[];
723
+ cover?: string | null;
724
+ logo: string | null;
725
+ tagline?: TranslatableValue | null;
726
+ public: boolean;
736
727
  createdAt: string;
737
- author?: ContactActivityAuthor | null;
728
+ blueprints?: Blueprint[];
729
+ flows?: Flow[];
730
+ coupons?: Coupon[];
738
731
  };
739
- type ContactFormData = {
740
- name?: string;
741
- email?: string | null;
742
- phone?: string | null;
743
- company?: string | null;
744
- title?: string | null;
745
- birthday?: string | null;
746
- website?: string | null;
747
- location?: string | null;
748
- socials?: Record<string, string> | null;
749
- notes?: string | null;
732
+ type TeamBrand = {
733
+ bg?: string;
734
+ fg?: string;
735
+ label?: string;
736
+ logo?: string;
737
+ bankAccountHolder?: string;
738
+ bankIban?: string;
739
+ bankBic?: string;
740
+ invoiceAddress?: string;
741
+ invoiceVat?: string;
742
+ invoiceCity?: string;
743
+ invoiceZip?: string;
744
+ invoiceCountry?: string;
745
+ };
746
+ type TeamPrivate = {
747
+ slug: string;
748
+ name: string;
749
+ personal: boolean;
750
+ description: TranslatableValue | null;
750
751
  tags?: string[] | null;
751
- locale?: string | null;
752
- props?: Record<string, string> | null;
753
- settings?: {
754
- marketingOptOut?: boolean;
752
+ tagline: TranslatableValue | null;
753
+ balance: number;
754
+ locale: WarpLocale;
755
+ timezone: string;
756
+ place?: TeamPlace | null;
757
+ logo: string | null;
758
+ cover: string | null;
759
+ subscription: {
760
+ premium: boolean;
761
+ lifetime: boolean;
762
+ plan: Plan;
763
+ provider: PaymentProvider | null;
764
+ payer: User | null;
765
+ gracePeriod: boolean;
766
+ autoRenew: boolean;
767
+ cycleEndsAt: string | null;
768
+ resetsAt: string | null;
769
+ startedAt: string | null;
770
+ renewedAt: string | null;
771
+ expiresAt: string | null;
755
772
  };
756
- nextFollowUpAt?: string | null;
757
- followUpNote?: string | null;
773
+ meta: TeamMeta;
774
+ branding: TeamBrand;
775
+ category: TeamCategory;
776
+ createdAt: string;
777
+ justCreated: boolean;
778
+ role?: UserRole | null;
779
+ permissions?: UserPermission[];
780
+ access?: TeamFeatureAccess;
781
+ accessCatalog?: TeamAccessCatalog;
758
782
  };
759
- type ContactCreatePayload = ContactFormData & {
760
- name: string;
761
- wallets?: WalletList;
762
- }; //#endregion
763
- //#region src/media/types.d.ts
764
- type MediaLibraryAttributes = {
765
- uuid: string;
766
- order: number;
767
- name: string;
768
- custom_properties: {
769
- [key: string]: JsonValue;
783
+ type ByokProviderConfig = {
784
+ apiKey?: string;
785
+ accessKey?: string;
786
+ secretKey?: string;
787
+ };
788
+ type ByokProviders = {
789
+ openai?: ByokProviderConfig;
790
+ anthropic?: ByokProviderConfig;
791
+ google?: ByokProviderConfig;
792
+ xai?: ByokProviderConfig;
793
+ klingai?: ByokProviderConfig;
794
+ };
795
+ type TeamUsage = Partial<Record<PlanFeature, TeamFeatureUsage>> & {
796
+ extraUsageEnabled?: boolean;
797
+ currentSpending?: number;
798
+ walletCloudUsed?: number;
799
+ walletCloudPremiumUsed?: number;
800
+ spendingLimit?: number | null;
801
+ cycleEndsAt?: string | null;
802
+ resetsAt?: string | null;
803
+ autoReload?: {
804
+ enabled: boolean;
805
+ thresholdCents: number | null;
806
+ amountCents: number | null;
770
807
  };
771
- preview_url: null | string;
772
- original_url: null | string;
773
- extension?: string;
774
- size?: number;
775
808
  };
776
- type MediaMime = 'image/png' | 'image/jpeg' | 'image/gif' | 'image/webp' | 'video/mp4' | 'video/webm' | 'video/quicktime' | 'video/x-msvideo' | 'audio/mpeg' | 'audio/mp3' | 'audio/ogg' | 'audio/wav' | 'audio/webm' | 'audio/aac' | 'audio/m4a' | 'audio/m4b' | 'audio/m4p' | 'audio/m4v' | 'application/pdf' | 'application/json';
777
- type MediaAspectRatio = 'free' | '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
778
- type Media = {
779
- id: string;
780
- name: string;
781
- mime: MediaMime;
782
- url: string;
783
- library: MediaLibraryAttributes;
784
- tags?: string[];
785
- copyright?: string | null;
786
- aiGenerated?: boolean;
809
+ type TeamFeatureUsage = {
810
+ current: number;
811
+ limit: number;
812
+ reached?: boolean;
813
+ };
814
+ type AiCostEntry = {
815
+ id: number;
816
+ model: string | null;
817
+ agent: {
818
+ name: string;
819
+ uuid: string;
820
+ } | null;
821
+ inputTokens: number;
822
+ outputTokens: number;
823
+ totalTokens: number;
824
+ costCents: number | null;
825
+ createdAt: string;
826
+ };
827
+ type AiCostsSummary = {
828
+ totalCostCents: number;
829
+ totalTokens: number;
830
+ totalRequests: number;
831
+ byModel: Record<string, {
832
+ costCents: number;
833
+ tokens: number;
834
+ count: number;
835
+ }>;
836
+ };
837
+ type AiCostsResponse = {
838
+ summary: AiCostsSummary;
839
+ usages: {
840
+ data: AiCostEntry[];
841
+ pagination: {
842
+ currentPage: number;
843
+ lastPage: number;
844
+ perPage: number;
845
+ total: number;
846
+ };
847
+ };
787
848
  }; //#endregion
788
849
  //#region src/billing/types.d.ts
789
850
  type TranslatableValue = Partial<Record<WarpLocale, string>>;
@@ -1015,7 +1076,7 @@ type Order = {
1015
1076
  coupon?: Coupon | null;
1016
1077
  plan: Plan | null;
1017
1078
  user: UserPrivate | null;
1018
- team: TeamPrivate | null;
1079
+ team: Team | TeamPrivate | null;
1019
1080
  isSubscription: boolean;
1020
1081
  };
1021
1082
  type CartItem = {
@@ -3209,41 +3270,46 @@ declare class ReturnsResource {
3209
3270
  }
3210
3271
  //#endregion
3211
3272
  //#region src/commerce/shipping.d.ts
3212
- type ZoneInput = {
3273
+ type ShippingZoneInput = {
3213
3274
  name: string;
3214
3275
  countries: string[];
3215
- postalCodeRules?: string[];
3276
+ postalCodeRules?: string[] | null;
3216
3277
  active?: boolean;
3217
3278
  position?: number;
3218
3279
  };
3219
- type RateInput = {
3280
+ type ShippingRateInput = {
3220
3281
  name: string;
3221
3282
  price: number;
3222
- freeShippingThreshold?: number;
3223
- minOrderValue?: number;
3224
- maxOrderValue?: number;
3225
- minWeight?: number;
3226
- maxWeight?: number;
3227
- estimatedMinDays?: number;
3228
- estimatedMaxDays?: number;
3283
+ freeShippingThreshold?: number | null;
3284
+ minOrderValue?: number | null;
3285
+ maxOrderValue?: number | null;
3286
+ minWeight?: number | null;
3287
+ maxWeight?: number | null;
3288
+ estimatedMinDays?: number | null;
3289
+ estimatedMaxDays?: number | null;
3229
3290
  active?: boolean;
3230
3291
  position?: number;
3231
3292
  };
3293
+ type FulfillmentLocationInput = {
3294
+ name: string;
3295
+ addressId?: number | null;
3296
+ instructions?: string | null;
3297
+ active?: boolean;
3298
+ };
3232
3299
  declare class ShippingResource {
3233
3300
  private readonly http;
3234
3301
  constructor(http: IHttpService);
3235
3302
  zones(team: string): Promise<IAppResponse<ShippingZone[]>>;
3236
- createZone(team: string, data: ZoneInput): Promise<IAppResponse<ShippingZone>>;
3237
- updateZone(team: string, zoneId: number, data: Partial<ZoneInput>): Promise<IAppResponse<ShippingZone>>;
3303
+ createZone(team: string, data: ShippingZoneInput): Promise<IAppResponse<ShippingZone>>;
3304
+ updateZone(team: string, zoneId: number, data: ShippingZoneInput): Promise<IAppResponse<ShippingZone>>;
3238
3305
  deleteZone(team: string, zoneId: number): Promise<IAppResponse<void>>;
3239
- createRate(team: string, zoneId: number, data: RateInput): Promise<IAppResponse<ShippingRate>>;
3306
+ createRate(team: string, zoneId: number, data: ShippingRateInput): Promise<IAppResponse<ShippingRate>>;
3307
+ updateRate(team: string, zoneId: number, rateId: number, data: ShippingRateInput): Promise<IAppResponse<ShippingRate>>;
3308
+ deleteRate(team: string, zoneId: number, rateId: number): Promise<IAppResponse<void>>;
3240
3309
  locations(team: string): Promise<IAppResponse<FulfillmentLocation[]>>;
3241
- createLocation(team: string, data: {
3242
- name: string;
3243
- addressId?: number;
3244
- instructions?: string;
3245
- active?: boolean;
3246
- }): Promise<IAppResponse<FulfillmentLocation>>;
3310
+ createLocation(team: string, data: FulfillmentLocationInput): Promise<IAppResponse<FulfillmentLocation>>;
3311
+ updateLocation(team: string, locationId: number, data: FulfillmentLocationInput): Promise<IAppResponse<FulfillmentLocation>>;
3312
+ deleteLocation(team: string, locationId: number): Promise<IAppResponse<void>>;
3247
3313
  }
3248
3314
  //#endregion
3249
3315
  //#region src/commerce/guest.d.ts
@@ -3486,6 +3552,21 @@ declare class AppointmentsResource {
3486
3552
  }): Promise<IAppResponse<AppointmentRequest>>;
3487
3553
  }
3488
3554
  //#endregion
3555
+ //#region src/resources/content.d.ts
3556
+ declare class ContentResource {
3557
+ private readonly http;
3558
+ constructor(http: IHttpService);
3559
+ list(team: string): Promise<IAppResponse<Content[]>>;
3560
+ create(input: CreateContentInput): Promise<IAppResponse<Content>>;
3561
+ get(contentId: string): Promise<IAppResponse<Content>>;
3562
+ patch(contentId: string, input: PatchContentInput): Promise<IAppResponse<ContentVersion>>;
3563
+ preview(contentId: string): Promise<IAppResponse<ContentVersion>>;
3564
+ publish(contentId: string, expectedVersion: number): Promise<IAppResponse<ContentVersion>>;
3565
+ rollback(contentId: string, versionId: string, expectedVersion: number): Promise<IAppResponse<ContentVersion>>;
3566
+ versions(contentId: string): Promise<IAppResponse<ContentVersion[]>>;
3567
+ getPublic(slug: string): Promise<IAppResponse<Content>>;
3568
+ }
3569
+ //#endregion
3489
3570
  //#region src/resources/auth.d.ts
3490
3571
  type NativeSocialAuthProvider = Extract<SocialAuthProvider, 'apple' | 'google'>;
3491
3572
  type AuthSendCodeRequest = {
@@ -3552,7 +3633,7 @@ declare class BillingResource {
3552
3633
  plans(type?: 'current' | 'all'): Promise<IAppResponse<Plan[]>>;
3553
3634
  checkoutProduct(id: string): Promise<IAppResponse<Product>>;
3554
3635
  orders(team: TeamPrivate | null, page?: number, contactId?: string): Promise<IAppResponse<Order[]>>;
3555
- payOrder(id: string, provider?: PaymentProvider): Promise<IAppResponse<{
3636
+ payOrder(id: string, provider?: PaymentProvider, accessToken?: string): Promise<IAppResponse<{
3556
3637
  url: string;
3557
3638
  }>>;
3558
3639
  deleteOrder(id: string): Promise<IAppResponse<void>>;
@@ -4081,7 +4162,9 @@ declare class MeetingsResource {
4081
4162
  get(id: string): Promise<IAppResponse<Meeting>>;
4082
4163
  getSummary(id: string): Promise<IAppResponse<MeetingSummary>>;
4083
4164
  join(code: string): Promise<IAppResponse<MeetingJoinInfo>>;
4084
- cancel(code: string): Promise<IAppResponse<Meeting>>;
4165
+ cancel(code: string, data?: {
4166
+ reason?: string;
4167
+ }): Promise<IAppResponse<Meeting>>;
4085
4168
  share(id: string, recipients: {
4086
4169
  name: string;
4087
4170
  email: string;
@@ -4111,13 +4194,24 @@ declare class MemoriesResource {
4111
4194
  }
4112
4195
  //#endregion
4113
4196
  //#region src/resources/messages.d.ts
4197
+ type PendingApprovalMessage = Message & {
4198
+ team?: {
4199
+ slug: string;
4200
+ name: string;
4201
+ } | null;
4202
+ agentProfile?: {
4203
+ uuid: string;
4204
+ name: string;
4205
+ avatar: string | null;
4206
+ } | null;
4207
+ };
4114
4208
  declare class MessagesResource {
4115
4209
  private readonly http;
4116
4210
  constructor(http: IHttpService);
4117
4211
  list(team: string, room: string, page?: number, perPage?: number): Promise<IAppResponse<Message[]>>;
4118
4212
  search(team: string, search: string): Promise<IAppResponse<Message[]>>;
4119
4213
  delete(messageId: string): Promise<IAppResponse<void>>;
4120
- pendingApprovals(teams: string[]): Promise<IAppResponse<Message[]>>;
4214
+ pendingApprovals(teams: string[]): Promise<IAppResponse<PendingApprovalMessage[]>>;
4121
4215
  generateAudio(messageId: string): Promise<IAppResponse<{
4122
4216
  audioUrl: string;
4123
4217
  }>>;
@@ -4903,6 +4997,7 @@ declare class JoAiClient {
4903
4997
  readonly entities: EntitiesResource;
4904
4998
  readonly mcp: McpResource;
4905
4999
  readonly appointments: AppointmentsResource;
5000
+ readonly content: ContentResource;
4906
5001
  readonly auth: AuthResource;
4907
5002
  readonly billing: BillingResource;
4908
5003
  readonly blueprints: BlueprintsResource;
@@ -5025,4 +5120,4 @@ declare class DistributionResource {
5025
5120
  private fetchDistribution;
5026
5121
  }
5027
5122
  //#endregion
5028
- export { AddressesResource, AgentsResource, AlertsResource, ApiTokensResource, AppointmentsResource, type AttachedMedia, type AuthConfirmCodeRequest, type AuthConfirmCodeResponse, type AuthNativeSessionResponse, type AuthPortalSessionResponse, AuthResource, type AuthSendCodeRequest, type BackendWarp, type BackendWarpBrand, BillingResource, BlueprintsResource, type CacheConfig, CachedHttpService, CampaignsResource, CardsResource, CartsResource, ChangelogResource, CharactersResource, CheckoutResource, CommerceResource, ContactsResource, ContractsResource, type CreateHookPayload, type CreateInboundHookPayload, type CreateInternalHookPayload, type CreateWarpLinkedHookPayload, type CreateWebHookPayload, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, FlowsResource, FulfillmentsResource, GoalsResource, type GuestBuyer, type GuestCheckoutDraft, type GuestCommerceStorageOptions, type GuestOrderAccess, type Hook, type HookSample, type HookTrigger, type HookTriggerCondition, type HookTriggerInput, HooksResource, IngestionsResource, InquiriesResource, IntegrationsResource, IntentsResource, ItemsResource, JoAiClient, type JoAiClientConfig, KvResource, LinksResource, LoyaltyResource, McpResource, type MediaUploadType, MeetingsResource, MemoriesResource, MessagesResource, MissionsResource, NotificationsResource, OfficeResource, type OpenPortalSessionOptions, type OpeningHoursEntry, type OpeningHoursFormatOptions, OrdersResource, PersonaResource, type PlaceCheckoutOrderRequest, type Product, type ProductVariation, ProductsResource, ProjectsResource, RemindersResource, ReturnsResource, SegmentsResource, ServicesResource, ShippingResource, ShortcutsResource, SitesResource, SkillsResource, StatsResource, StoreResource, SubscriptionsResource, SwarmsResource, TagsResource, TasksResource, type TeamInviteInfo, TeamsResource, UpdatesResource, UpgradesResource, UsersResource, VoiceResource, WalletsResource, WarpsResource, type WebHookTriggerEvent, WorkspaceResource, completePortalSession, createClient, createGuestCommerceStorage, formatOpeningHours, getAuthFragmentToken, isAllowedRedirectUrl, isPortalCallbackUrl, openPortalSession, sanitizePortalCallbackUrl };
5123
+ export { AddressesResource, AgentsResource, AlertsResource, ApiTokensResource, AppointmentsResource, type AttachedMedia, type AuthConfirmCodeRequest, type AuthConfirmCodeResponse, type AuthNativeSessionResponse, type AuthPortalSessionResponse, AuthResource, type AuthSendCodeRequest, type BackendWarp, type BackendWarpBrand, BillingResource, BlueprintsResource, type CacheConfig, CachedHttpService, CampaignsResource, CardsResource, CartsResource, ChangelogResource, CharactersResource, CheckoutResource, CommerceResource, ContactsResource, ContentResource, ContractsResource, type CreateHookPayload, type CreateInboundHookPayload, type CreateInternalHookPayload, type CreateWarpLinkedHookPayload, type CreateWebHookPayload, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, FlowsResource, type FulfillmentLocationInput, FulfillmentsResource, GoalsResource, type GuestBuyer, type GuestCheckoutDraft, type GuestCommerceStorageOptions, type GuestOrderAccess, type Hook, type HookSample, type HookTrigger, type HookTriggerCondition, type HookTriggerInput, HooksResource, IngestionsResource, InquiriesResource, IntegrationsResource, IntentsResource, ItemsResource, JoAiClient, type JoAiClientConfig, KvResource, LinksResource, LoyaltyResource, McpResource, type MediaUploadType, MeetingsResource, MemoriesResource, MessagesResource, MissionsResource, NotificationsResource, OfficeResource, type OpenPortalSessionOptions, type OpeningHoursEntry, type OpeningHoursFormatOptions, OrdersResource, PersonaResource, type PlaceCheckoutOrderRequest, type Product, type ProductVariation, ProductsResource, ProjectsResource, RemindersResource, ReturnsResource, SegmentsResource, ServicesResource, type ShippingRateInput, ShippingResource, type ShippingZoneInput, ShortcutsResource, SitesResource, SkillsResource, StatsResource, StoreResource, SubscriptionsResource, SwarmsResource, TagsResource, TasksResource, type TeamInviteInfo, TeamsResource, UpdatesResource, UpgradesResource, UsersResource, VoiceResource, WalletsResource, WarpsResource, type WebHookTriggerEvent, WorkspaceResource, completePortalSession, createClient, createGuestCommerceStorage, formatOpeningHours, getAuthFragmentToken, isAllowedRedirectUrl, isPortalCallbackUrl, openPortalSession, sanitizePortalCallbackUrl };