@joai/sdk 4.2.3 → 4.5.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,13 @@
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/index.d.mts
4
+ //#region src/auth/types.d.ts
5
+ type SocialAuthProvider = 'github' | 'apple' | 'google' | 'x' | 'telegram' | 'slack'; //#endregion
6
+ //#region src/config/types.d.ts
7
+ type AppEnv = 'mainnet' | 'testnet' | 'devnet' | 'local'; //#endregion
8
+ //#region src/auth/token.d.ts
9
+ /** One-time native/deep-link handoff fragment key (exchanged for a Bearer via POST). */
10
+ //#endregion
4
11
  //#region src/http/types.d.ts
5
12
  interface IHttpService {
6
13
  readonly baseUrl: string;
@@ -31,14 +38,7 @@ interface IRequestOptions {
31
38
  [name: string]: string;
32
39
  };
33
40
  } //#endregion
34
- //#endregion
35
- //#region ../core/dist/index.d.mts
36
- //#region src/auth/types.d.ts
37
- type SocialAuthProvider = 'github' | 'apple' | 'google' | 'x' | 'telegram' | 'slack'; //#endregion
38
- //#region src/config/types.d.ts
39
- type AppEnv = 'mainnet' | 'testnet' | 'devnet' | 'local'; //#endregion
40
- //#region src/auth/token.d.ts
41
- /** One-time native/deep-link handoff fragment key (exchanged for a Bearer via POST). */
41
+ //#region src/http/service.d.ts
42
42
  //#endregion
43
43
  //#region src/ingestion/types.d.ts
44
44
  type IngestionSourceType = 'note' | 'meeting' | 'article' | 'email' | 'chat' | 'post' | 'webhook';
@@ -107,39 +107,189 @@ type Character = {
107
107
  system: string;
108
108
  bio: WarpText | null;
109
109
  }; //#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;
110
+ //#region src/address/enums.d.ts
111
+ declare const AddressTypes: {
112
+ readonly Billing: "billing";
113
+ readonly Shipping: "shipping";
114
+ };
115
+ type AddressType = (typeof AddressTypes)[keyof typeof AddressTypes];
116
+ //#endregion
117
+ //#region src/address/types.d.ts
118
+ type Address = {
119
+ id: string;
120
+ type: AddressType;
116
121
  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[];
122
+ company: string | null;
123
+ addressOne: string;
124
+ addressTwo: string | null;
125
+ city: string;
126
+ state: string | null;
127
+ zipCode: string;
128
+ country: string;
129
+ phone: string | null;
130
+ isDefault: boolean;
131
+ business: boolean;
132
+ vatId: string | null;
133
+ isEU: boolean;
134
+ isEEA: boolean;
127
135
  };
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;
136
+ type AddressSnapshot = Pick<Address, 'name' | 'company' | 'addressOne' | 'addressTwo' | 'city' | 'state' | 'zipCode' | 'country' | 'phone' | 'business' | 'vatId'>;
137
+ type AddressInput = {
138
+ name: string;
139
+ addressOne: string;
140
+ city: string;
141
+ zipCode: string;
142
+ country: string;
143
+ type?: AddressType;
144
+ company?: string | null;
145
+ addressTwo?: string | null;
146
+ state?: string | null;
147
+ phone?: string | null;
148
+ business?: boolean;
149
+ vatId?: string | null;
137
150
  };
138
- type FlowInputMapping = {
139
- sourceStepId: string;
140
- sourceKey: string;
141
- targetInput: string;
142
- transform?: string;
151
+ type AddressCreatePayload = {
152
+ name: string;
153
+ country: string;
154
+ type?: AddressType;
155
+ email?: string | null;
156
+ company?: string | null;
157
+ addressOne?: string | null;
158
+ addressTwo?: string | null;
159
+ city?: string | null;
160
+ state?: string | null;
161
+ zipCode?: string | null;
162
+ vatId?: string | null;
163
+ phone?: string | null;
164
+ isDefault?: boolean;
165
+ contact?: string;
166
+ team?: string;
167
+ };
168
+ type AddressUpdatePayload = Partial<Omit<AddressCreatePayload, 'contact' | 'team'>>; //#endregion
169
+ //#region src/commerce/enums.d.ts
170
+ declare const FulfillmentStatuses: {
171
+ readonly Pending: "pending";
172
+ readonly ReadyForPickup: "ready_for_pickup";
173
+ readonly Shipped: "shipped";
174
+ readonly Delivered: "delivered";
175
+ readonly Cancelled: "cancelled";
176
+ };
177
+ type FulfillmentStatus = (typeof FulfillmentStatuses)[keyof typeof FulfillmentStatuses];
178
+ declare const FulfillmentMethods: {
179
+ readonly Shipping: "shipping";
180
+ readonly Pickup: "pickup";
181
+ };
182
+ type FulfillmentMethod = (typeof FulfillmentMethods)[keyof typeof FulfillmentMethods];
183
+ declare const ReturnStatuses: {
184
+ readonly Requested: "requested";
185
+ readonly Approved: "approved";
186
+ readonly Rejected: "rejected";
187
+ readonly Received: "received";
188
+ readonly Closed: "closed";
189
+ };
190
+ type ReturnStatus = (typeof ReturnStatuses)[keyof typeof ReturnStatuses];
191
+ //#endregion
192
+ //#region src/commerce/types.d.ts
193
+ type ShippingRate = {
194
+ id: number;
195
+ name: string;
196
+ price: number;
197
+ fee?: number;
198
+ freeShippingThreshold?: number | null;
199
+ minOrderValue?: number | null;
200
+ maxOrderValue?: number | null;
201
+ minWeight?: number | null;
202
+ maxWeight?: number | null;
203
+ estimatedMinDays?: number | null;
204
+ estimatedMaxDays?: number | null;
205
+ active?: boolean;
206
+ position?: number;
207
+ };
208
+ type CheckoutSnapshot = {
209
+ id: string;
210
+ fulfillmentMethod: FulfillmentMethod;
211
+ totals: {
212
+ subtotal: number;
213
+ shippingFee: number;
214
+ total: number;
215
+ };
216
+ expiresAt: string;
217
+ accessToken?: string | null;
218
+ };
219
+ type GuestBuyer = {
220
+ name: string;
221
+ email: string;
222
+ };
223
+ type CheckoutSnapshotRequest = {
224
+ fulfillmentMethod: FulfillmentMethod;
225
+ items: {
226
+ id: string;
227
+ type: 'product' | 'service' | 'coupon';
228
+ quantity: number;
229
+ }[];
230
+ billingAddressId?: number | null;
231
+ shippingAddressId?: number | null;
232
+ billingAddress?: AddressInput;
233
+ shippingAddress?: AddressInput;
234
+ shippingRateId?: number | null;
235
+ fulfillmentLocationId?: number | null;
236
+ };
237
+ type ShippingZone = {
238
+ id: number;
239
+ name: string;
240
+ countries: string[];
241
+ postalCodeRules: string[] | null;
242
+ active: boolean;
243
+ position: number;
244
+ rates: ShippingRate[];
245
+ };
246
+ type FulfillmentLocation = {
247
+ id: number;
248
+ name: string;
249
+ addressId: number | null;
250
+ address: Address | null;
251
+ instructions: string | null;
252
+ active: boolean;
253
+ };
254
+ type Fulfillment = {
255
+ id: string;
256
+ orderId: number;
257
+ method: FulfillmentMethod;
258
+ status: FulfillmentStatus;
259
+ carrierCode: string | null;
260
+ trackingNumber: string | null;
261
+ trackingUrl: string | null;
262
+ items: {
263
+ orderItemId: number;
264
+ quantity: number;
265
+ }[];
266
+ shippedAt: string | null;
267
+ readyForPickupAt: string | null;
268
+ deliveredAt: string | null;
269
+ };
270
+ type Return = {
271
+ id: string;
272
+ orderId: number;
273
+ status: ReturnStatus;
274
+ reason: string;
275
+ merchantNote: string | null;
276
+ items: {
277
+ orderItemId: number;
278
+ quantity: number;
279
+ condition: string | null;
280
+ }[];
281
+ refundAmount: number | null;
282
+ };
283
+ type SubscriptionDelivery = {
284
+ fulfillmentMethod: FulfillmentMethod | null;
285
+ nextOrderAt: string | null;
286
+ pausedAt: string | null;
287
+ shippingAddress?: AddressSnapshot | null;
288
+ shippingRate?: Pick<ShippingRate, 'name' | 'price'> | null;
289
+ fulfillmentLocation?: {
290
+ name: string;
291
+ instructions: string | null;
292
+ } | null;
143
293
  }; //#endregion
144
294
  //#region src/wallet/types.d.ts
145
295
  type Wallet = {
@@ -154,38 +304,190 @@ type WalletList = Partial<Record<WarpChainName, {
154
304
  provider: WarpWalletProvider;
155
305
  address?: string;
156
306
  }>>; //#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";
170
- };
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";
180
- };
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[];
307
+ //#region src/json/types.d.ts
308
+ type JsonValue = string | number | boolean | null | JsonValue[] | {
309
+ [key: string]: JsonValue;
310
+ }; //#endregion
311
+ //#region src/contact/types.d.ts
312
+ type ContactHealth = 'active' | 'lukewarm' | 'cold' | 'stale' | 'unknown';
313
+ type ContactConsentStatus = 'pending' | 'confirmed' | 'superseded' | 'unsubscribed';
314
+ type ContactConsent = {
315
+ id: string;
316
+ purpose: string;
317
+ status: ContactConsentStatus;
318
+ email: string;
319
+ consentText: {
320
+ label?: string | Record<string, string>;
321
+ description?: string | Record<string, string> | null;
322
+ };
323
+ privacyUrl: string | null;
324
+ source: {
325
+ formIdentifier?: string | null;
326
+ formTitle?: string | Record<string, string> | null;
327
+ };
328
+ requestedAt: string;
329
+ confirmedAt: string | null;
330
+ unsubscribedAt: string | null;
331
+ };
332
+ type Contact = {
333
+ id: string;
334
+ name: string;
335
+ wallets: Wallet[];
336
+ email: string | null;
337
+ phone: string | null;
338
+ company: string | null;
339
+ title: string | null;
340
+ birthday: string | null;
341
+ website: string | null;
342
+ location: string | null;
343
+ avatar: string | null;
344
+ socials: Record<string, string> | null;
345
+ notes: string | null;
346
+ tags: string[] | null;
347
+ userId: string | null;
348
+ locale?: string | null;
349
+ props?: Record<string, string> | null;
350
+ settings?: {
351
+ marketingOptOut?: boolean;
352
+ } | null;
353
+ consents?: ContactConsent[];
354
+ lastActivityAt?: string | null;
355
+ health?: ContactHealth;
356
+ nextFollowUpAt?: string | null;
357
+ followUpNote?: string | null;
358
+ };
359
+ type ContactActivityType = 'note' | 'call' | 'meeting' | 'task' | 'update' | 'custom' | 'form' | 'loyalty' | 'follow_up';
360
+ type ContactActivityAuthor = {
361
+ name: string;
362
+ imageUrl: string | null;
363
+ };
364
+ type ContactActivity = {
365
+ id: string;
366
+ type: ContactActivityType;
367
+ description: string | null;
368
+ meta: Record<string, JsonValue> | null;
369
+ agentName: string | null;
370
+ createdAt: string;
371
+ author?: ContactActivityAuthor | null;
372
+ };
373
+ type ContactFormData = {
374
+ name?: string;
375
+ email?: string | null;
376
+ phone?: string | null;
377
+ company?: string | null;
378
+ title?: string | null;
379
+ birthday?: string | null;
380
+ website?: string | null;
381
+ location?: string | null;
382
+ socials?: Record<string, string> | null;
383
+ notes?: string | null;
384
+ tags?: string[] | null;
385
+ locale?: string | null;
386
+ props?: Record<string, string> | null;
387
+ settings?: {
388
+ marketingOptOut?: boolean;
389
+ };
390
+ nextFollowUpAt?: string | null;
391
+ followUpNote?: string | null;
392
+ avatar?: string[];
393
+ };
394
+ type ContactCreatePayload = ContactFormData & {
395
+ name: string;
396
+ wallets?: WalletList;
397
+ }; //#endregion
398
+ //#region src/media/types.d.ts
399
+ type MediaLibraryAttributes = {
400
+ uuid: string;
401
+ order: number;
402
+ name: string;
403
+ custom_properties: {
404
+ [key: string]: JsonValue;
405
+ };
406
+ preview_url: null | string;
407
+ original_url: null | string;
408
+ extension?: string;
409
+ size?: number;
410
+ };
411
+ 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';
412
+ type MediaAspectRatio = 'free' | '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
413
+ type Media = {
414
+ id: string;
415
+ name: string;
416
+ mime: MediaMime;
417
+ url: string;
418
+ library: MediaLibraryAttributes;
419
+ tags?: string[];
420
+ copyright?: string | null;
421
+ aiGenerated?: boolean;
422
+ }; //#endregion
423
+ //#region src/flow/types.d.ts
424
+ type FlowCategory = 'none' | 'defi' | 'nft' | 'social' | 'devtools' | 'productivity' | 'trading' | 'portfolio';
425
+ type FlowStatus = 'draft' | 'published';
426
+ type Flow = {
427
+ slug: string;
428
+ team: Team;
429
+ name: string;
430
+ description: string | null;
431
+ category: FlowCategory;
432
+ status: FlowStatus;
433
+ publishedAt: string | null;
434
+ createdAt: string;
435
+ updatedAt: string;
436
+ steps: FlowStep[];
437
+ locales: WarpLocale[];
438
+ store: StoreInfo;
439
+ screenshots: string[];
440
+ };
441
+ type FlowStep = {
442
+ stepId: string;
443
+ order: number;
444
+ type: 'warp' | 'condition' | 'delay';
445
+ warpIdentifier: string | null;
446
+ dependsOn: string[] | null;
447
+ inputMappings: FlowInputMapping[] | null;
448
+ staticInputs: Record<string, any> | null;
449
+ condition: Record<string, any> | null;
450
+ };
451
+ type FlowInputMapping = {
452
+ sourceStepId: string;
453
+ sourceKey: string;
454
+ targetInput: string;
455
+ transform?: string;
456
+ }; //#endregion
457
+ //#region src/user/permissions.d.ts
458
+ /** Permission string values — must match joai--api `UserPermission::value`. */
459
+ declare const UserPermissions: {
460
+ readonly BillingManage: "billing-manage";
461
+ readonly TeamManage: "team-manage";
462
+ readonly TeamView: "team-view";
463
+ readonly ContentEdit: "content-edit";
464
+ readonly ContentPublish: "content-publish";
465
+ readonly TeamMemberInvite: "team-member-invite";
466
+ readonly TeamMemberRemove: "team-member-remove";
467
+ readonly TeamSecretView: "team-secret-view";
468
+ readonly TeamSecretManage: "team-secret-manage";
469
+ readonly AgentExecute: "agent-execute";
470
+ readonly AgentWalletManage: "agent-wallet-manage";
471
+ readonly SwarmCreate: "swarm-create";
472
+ };
473
+ type UserPermission = (typeof UserPermissions)[keyof typeof UserPermissions];
474
+ //#endregion
475
+ //#region src/user/roles.d.ts
476
+ /** Team member roles — values must match joai--api `UserRole::toName()`. */
477
+ declare const UserRoles: {
478
+ readonly Owner: "owner";
479
+ readonly Admin: "admin";
480
+ readonly Member: "member";
481
+ readonly Developer: "developer";
482
+ };
483
+ type UserRole = (typeof UserRoles)[keyof typeof UserRoles];
484
+ //#endregion
485
+ //#region src/user/types.d.ts
486
+ type UserMode = 'simple' | 'advanced';
487
+ type UserInterest = 'payments' | 'health' | 'content' | 'business' | 'finance' | 'research' | 'shopping' | 'web3' | 'developer' | 'fitness' | 'ecommerce';
488
+ type UserSettings = {
489
+ mode: UserMode;
490
+ interests: UserInterest[];
189
491
  hotkeys?: Record<string, string> | null;
190
492
  'payout.address'?: string | null;
191
493
  'payout.chain'?: string | null;
@@ -283,6 +585,7 @@ declare const NativeApps: {
283
585
  readonly News: "news";
284
586
  readonly Sites: "sites";
285
587
  readonly Contracts: "contracts";
588
+ readonly Artifacts: "artifacts";
286
589
  };
287
590
  type NativeApp = (typeof NativeApps)[keyof typeof NativeApps];
288
591
  //#endregion
@@ -409,381 +712,83 @@ type TeamPrivate = {
409
712
  resetsAt: string | null;
410
713
  startedAt: string | null;
411
714
  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;
715
+ expiresAt: string | null;
694
716
  };
695
- requestedAt: string;
696
- confirmedAt: string | null;
697
- unsubscribedAt: string | null;
717
+ meta: TeamMeta;
718
+ branding: TeamBrand;
719
+ category: TeamCategory;
720
+ createdAt: string;
721
+ justCreated: boolean;
722
+ role?: UserRole | null;
723
+ permissions?: UserPermission[];
724
+ access?: TeamFeatureAccess;
725
+ accessCatalog?: TeamAccessCatalog;
698
726
  };
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;
727
+ type ByokProviderConfig = {
728
+ apiKey?: string;
729
+ accessKey?: string;
730
+ secretKey?: string;
724
731
  };
725
- type ContactActivityType = 'note' | 'call' | 'meeting' | 'task' | 'update' | 'custom' | 'form' | 'loyalty' | 'follow_up';
726
- type ContactActivityAuthor = {
727
- name: string;
728
- imageUrl: string | null;
732
+ type ByokProviders = {
733
+ openai?: ByokProviderConfig;
734
+ anthropic?: ByokProviderConfig;
735
+ google?: ByokProviderConfig;
736
+ xai?: ByokProviderConfig;
737
+ klingai?: ByokProviderConfig;
729
738
  };
730
- type ContactActivity = {
731
- id: string;
732
- type: ContactActivityType;
733
- description: string | null;
734
- meta: Record<string, JsonValue> | null;
735
- agentName: string | null;
739
+ type TeamUsage = Partial<Record<PlanFeature, TeamFeatureUsage>> & {
740
+ extraUsageEnabled?: boolean;
741
+ currentSpending?: number;
742
+ walletCloudUsed?: number;
743
+ walletCloudPremiumUsed?: number;
744
+ spendingLimit?: number | null;
745
+ cycleEndsAt?: string | null;
746
+ resetsAt?: string | null;
747
+ autoReload?: {
748
+ enabled: boolean;
749
+ thresholdCents: number | null;
750
+ amountCents: number | null;
751
+ };
752
+ };
753
+ type TeamFeatureUsage = {
754
+ current: number;
755
+ limit: number;
756
+ reached?: boolean;
757
+ };
758
+ type AiCostEntry = {
759
+ id: number;
760
+ model: string | null;
761
+ agent: {
762
+ name: string;
763
+ uuid: string;
764
+ } | null;
765
+ inputTokens: number;
766
+ outputTokens: number;
767
+ totalTokens: number;
768
+ costCents: number | null;
736
769
  createdAt: string;
737
- author?: ContactActivityAuthor | null;
738
770
  };
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;
750
- tags?: string[] | null;
751
- locale?: string | null;
752
- props?: Record<string, string> | null;
753
- settings?: {
754
- marketingOptOut?: boolean;
755
- };
756
- nextFollowUpAt?: string | null;
757
- followUpNote?: string | null;
771
+ type AiCostsSummary = {
772
+ totalCostCents: number;
773
+ totalTokens: number;
774
+ totalRequests: number;
775
+ byModel: Record<string, {
776
+ costCents: number;
777
+ tokens: number;
778
+ count: number;
779
+ }>;
758
780
  };
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;
781
+ type AiCostsResponse = {
782
+ summary: AiCostsSummary;
783
+ usages: {
784
+ data: AiCostEntry[];
785
+ pagination: {
786
+ currentPage: number;
787
+ lastPage: number;
788
+ perPage: number;
789
+ total: number;
790
+ };
770
791
  };
771
- preview_url: null | string;
772
- original_url: null | string;
773
- extension?: string;
774
- size?: number;
775
- };
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;
787
792
  }; //#endregion
788
793
  //#region src/billing/types.d.ts
789
794
  type TranslatableValue = Partial<Record<WarpLocale, string>>;
@@ -963,11 +968,11 @@ type Product = {
963
968
  media?: Media[];
964
969
  };
965
970
  type OrderItem = {
966
- id: string;
971
+ id: string | null;
967
972
  name: string;
968
973
  quantity: number;
969
974
  unitPrice: number;
970
- type: 'product-variation' | 'service' | 'coupon';
975
+ type: 'product-variation' | 'service' | 'coupon' | 'custom';
971
976
  digital?: boolean | null;
972
977
  sellerTeamId?: string | null;
973
978
  };
@@ -1015,7 +1020,7 @@ type Order = {
1015
1020
  coupon?: Coupon | null;
1016
1021
  plan: Plan | null;
1017
1022
  user: UserPrivate | null;
1018
- team: TeamPrivate | null;
1023
+ team: Team | TeamPrivate | null;
1019
1024
  isSubscription: boolean;
1020
1025
  };
1021
1026
  type CartItem = {
@@ -1238,6 +1243,7 @@ type AgentSimple = {
1238
1243
  team?: {
1239
1244
  slug: string;
1240
1245
  } | null;
1246
+ settings?: Pick<AgentSettings, 'auto'>;
1241
1247
  };
1242
1248
  type AgentEngine = 'cortex' | 'openclaw';
1243
1249
  type AgentGender = 'male' | 'female' | 'neutral';
@@ -1620,6 +1626,69 @@ type PaginatedResponse<T> = {
1620
1626
  total: number;
1621
1627
  last_page: number;
1622
1628
  }; //#endregion
1629
+ //#region src/artifact/types.d.ts
1630
+ type ArtifactType = 'agreement' | 'offer' | 'concept' | 'update' | 'demo' | 'file' | 'other';
1631
+ type ArtifactStatus = 'draft' | 'ready' | 'sent' | 'archived';
1632
+ type ArtifactDeliverIntegration = 'email' | 'sms' | 'whatsapp';
1633
+ type ArtifactLink = {
1634
+ url: string;
1635
+ label?: string | null;
1636
+ };
1637
+ type ArtifactContactSummary = {
1638
+ id: string;
1639
+ name: string | null;
1640
+ email: string | null;
1641
+ phone: string | null;
1642
+ };
1643
+ type Artifact = {
1644
+ id: string;
1645
+ type: ArtifactType;
1646
+ status: ArtifactStatus;
1647
+ title: string;
1648
+ summary: string | null;
1649
+ url: string | null;
1650
+ password: string | null;
1651
+ links: ArtifactLink[];
1652
+ meta: Record<string, unknown> | null;
1653
+ contactId: string | null;
1654
+ orderId: string | null;
1655
+ contact?: ArtifactContactSummary;
1656
+ deliveredAt: string | null;
1657
+ createdAt: string;
1658
+ updatedAt: string;
1659
+ };
1660
+ type ArtifactCreatePayload = {
1661
+ title: string;
1662
+ type: ArtifactType;
1663
+ status?: ArtifactStatus;
1664
+ summary?: string;
1665
+ url?: string;
1666
+ password?: string;
1667
+ links?: ArtifactLink[];
1668
+ extraLinkUrl?: string;
1669
+ extraLinkLabel?: string;
1670
+ meta?: Record<string, unknown>;
1671
+ contactId?: string;
1672
+ orderId?: string;
1673
+ };
1674
+ type ArtifactUpdatePayload = Partial<ArtifactCreatePayload>;
1675
+ type ArtifactDeliverPayload = {
1676
+ artifactIds: string[];
1677
+ message: string;
1678
+ integration: ArtifactDeliverIntegration;
1679
+ subject?: string;
1680
+ contactIds?: string[];
1681
+ };
1682
+ type ArtifactDelivery = {
1683
+ id: string;
1684
+ contactId: string;
1685
+ integration: ArtifactDeliverIntegration;
1686
+ subject: string | null;
1687
+ message: string;
1688
+ artifactIds?: string[];
1689
+ deliveredAt: string;
1690
+ createdAt: string;
1691
+ }; //#endregion
1623
1692
  //#region src/service/types.d.ts
1624
1693
  type Service = {
1625
1694
  id: string;
@@ -1780,6 +1849,65 @@ type AppointmentRequest = {
1780
1849
  configuration?: Configuration;
1781
1850
  createdAt: string;
1782
1851
  }; //#endregion
1852
+ //#region src/content/types.d.ts
1853
+ type ContentStatus = 'draft' | 'published' | 'archived';
1854
+ type ContentFieldType = 'text' | 'richText' | 'number' | 'boolean' | 'url' | 'image' | 'media' | 'list' | 'object' | 'reference';
1855
+ type ContentField = {
1856
+ key: string;
1857
+ type: ContentFieldType;
1858
+ label?: string;
1859
+ required?: boolean;
1860
+ };
1861
+ type ContentDefinition = {
1862
+ fields: ContentField[];
1863
+ };
1864
+ type ContentValue = string | number | boolean | null | ContentValue[] | {
1865
+ [key: string]: ContentValue;
1866
+ };
1867
+ type ContentEntry = {
1868
+ key: string;
1869
+ value: ContentValue;
1870
+ updatedAt: string;
1871
+ };
1872
+ type ContentVersion = {
1873
+ id: string;
1874
+ number: number;
1875
+ status: ContentStatus;
1876
+ entries: ContentEntry[];
1877
+ snapshotHash: string;
1878
+ origin: string;
1879
+ createdAt: string;
1880
+ updatedAt: string;
1881
+ publishedAt: string | null;
1882
+ };
1883
+ type Content = {
1884
+ id: string;
1885
+ name: string;
1886
+ slug: string;
1887
+ schema: string | null;
1888
+ definition: ContentDefinition;
1889
+ metadata: Record<string, ContentValue>;
1890
+ version: ContentVersion | null;
1891
+ createdAt: string;
1892
+ updatedAt: string;
1893
+ };
1894
+ type ContentPatch = {
1895
+ key: string;
1896
+ value: ContentValue;
1897
+ };
1898
+ type CreateContentInput = {
1899
+ team: string;
1900
+ name: string;
1901
+ slug: string;
1902
+ schema?: string | null;
1903
+ definition: ContentDefinition;
1904
+ metadata?: Record<string, ContentValue>;
1905
+ };
1906
+ type PatchContentInput = {
1907
+ expectedVersion: number;
1908
+ patches: ContentPatch[];
1909
+ origin?: 'api' | 'inlineEditor' | 'joai' | 'mcp';
1910
+ }; //#endregion
1783
1911
  //#region src/commerce/helpers.d.ts
1784
1912
  //#endregion
1785
1913
  //#region src/card/types.d.ts
@@ -2804,7 +2932,7 @@ type SegmentGroup = {
2804
2932
  type Segment = {
2805
2933
  id: string;
2806
2934
  name: string;
2807
- conditions: SegmentGroup[];
2935
+ conditions: SegmentGroup[] | SegmentCondition[];
2808
2936
  count: number;
2809
2937
  campaignsCount: number;
2810
2938
  createdAt: string;
@@ -2826,11 +2954,20 @@ type SegmentCountResult = {
2826
2954
  type CampaignChannel = 'email' | 'whatsapp' | 'sms' | 'push';
2827
2955
  type CampaignStatus = 'draft' | 'pending' | 'approved' | 'rejected' | 'sending' | 'completed' | 'failed';
2828
2956
  type CampaignCategory = 'MARKETING' | 'UTILITY' | 'AUTHENTICATION';
2957
+ type CampaignSkipReason = 'pending_consent' | 'opted_out' | 'missing_channel' | 'approval_skipped';
2958
+ type CampaignSkipReasons = Record<CampaignSkipReason, number>;
2959
+ type CampaignAudiencePreview = {
2960
+ total: number;
2961
+ sendable: number;
2962
+ willSkip: number;
2963
+ reasons: CampaignSkipReasons;
2964
+ };
2829
2965
  type CampaignApproval = {
2830
2966
  language: string | null;
2831
2967
  category: CampaignCategory | null;
2832
2968
  placeholders: string[];
2833
2969
  templateParams: Record<string, string>;
2970
+ aiParams: Record<string, string>;
2834
2971
  externalStatus: string | null;
2835
2972
  rejectionReason: string | null;
2836
2973
  };
@@ -2841,6 +2978,7 @@ type Campaign = {
2841
2978
  subject: string | null;
2842
2979
  content: string;
2843
2980
  approval: CampaignApproval;
2981
+ agent: AgentSimple | null;
2844
2982
  tags: string[];
2845
2983
  status: CampaignStatus;
2846
2984
  totalCount: number;
@@ -2848,6 +2986,8 @@ type Campaign = {
2848
2986
  sentCount: number;
2849
2987
  failedCount: number;
2850
2988
  skippedCount: number;
2989
+ skipReasons?: CampaignSkipReasons;
2990
+ archivedAt?: string | null;
2851
2991
  createdAt: string;
2852
2992
  updatedAt: string;
2853
2993
  };
@@ -2859,6 +2999,8 @@ type CampaignCreatePayload = {
2859
2999
  language?: string;
2860
3000
  category?: CampaignCategory;
2861
3001
  templateParams?: Record<string, string>;
3002
+ aiParams?: Record<string, string>;
3003
+ agentId?: string;
2862
3004
  tags?: string[];
2863
3005
  contactIds?: string[];
2864
3006
  segmentId?: string;
@@ -2870,6 +3012,16 @@ type CampaignUpdatePayload = {
2870
3012
  language?: string;
2871
3013
  category?: CampaignCategory;
2872
3014
  templateParams?: Record<string, string>;
3015
+ aiParams?: Record<string, string>;
3016
+ agentId?: string;
3017
+ };
3018
+ type CampaignAudiencePreviewPayload = {
3019
+ campaignId: string;
3020
+ } | {
3021
+ channel: CampaignChannel;
3022
+ tags?: string[];
3023
+ contactIds?: string[];
3024
+ segmentId?: string;
2873
3025
  };
2874
3026
  type CampaignStats = {
2875
3027
  totalCampaigns: number;
@@ -3209,41 +3361,46 @@ declare class ReturnsResource {
3209
3361
  }
3210
3362
  //#endregion
3211
3363
  //#region src/commerce/shipping.d.ts
3212
- type ZoneInput = {
3364
+ type ShippingZoneInput = {
3213
3365
  name: string;
3214
3366
  countries: string[];
3215
- postalCodeRules?: string[];
3367
+ postalCodeRules?: string[] | null;
3216
3368
  active?: boolean;
3217
3369
  position?: number;
3218
3370
  };
3219
- type RateInput = {
3371
+ type ShippingRateInput = {
3220
3372
  name: string;
3221
3373
  price: number;
3222
- freeShippingThreshold?: number;
3223
- minOrderValue?: number;
3224
- maxOrderValue?: number;
3225
- minWeight?: number;
3226
- maxWeight?: number;
3227
- estimatedMinDays?: number;
3228
- estimatedMaxDays?: number;
3374
+ freeShippingThreshold?: number | null;
3375
+ minOrderValue?: number | null;
3376
+ maxOrderValue?: number | null;
3377
+ minWeight?: number | null;
3378
+ maxWeight?: number | null;
3379
+ estimatedMinDays?: number | null;
3380
+ estimatedMaxDays?: number | null;
3229
3381
  active?: boolean;
3230
3382
  position?: number;
3231
3383
  };
3384
+ type FulfillmentLocationInput = {
3385
+ name: string;
3386
+ addressId?: number | null;
3387
+ instructions?: string | null;
3388
+ active?: boolean;
3389
+ };
3232
3390
  declare class ShippingResource {
3233
3391
  private readonly http;
3234
3392
  constructor(http: IHttpService);
3235
3393
  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>>;
3394
+ createZone(team: string, data: ShippingZoneInput): Promise<IAppResponse<ShippingZone>>;
3395
+ updateZone(team: string, zoneId: number, data: ShippingZoneInput): Promise<IAppResponse<ShippingZone>>;
3238
3396
  deleteZone(team: string, zoneId: number): Promise<IAppResponse<void>>;
3239
- createRate(team: string, zoneId: number, data: RateInput): Promise<IAppResponse<ShippingRate>>;
3397
+ createRate(team: string, zoneId: number, data: ShippingRateInput): Promise<IAppResponse<ShippingRate>>;
3398
+ updateRate(team: string, zoneId: number, rateId: number, data: ShippingRateInput): Promise<IAppResponse<ShippingRate>>;
3399
+ deleteRate(team: string, zoneId: number, rateId: number): Promise<IAppResponse<void>>;
3240
3400
  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>>;
3401
+ createLocation(team: string, data: FulfillmentLocationInput): Promise<IAppResponse<FulfillmentLocation>>;
3402
+ updateLocation(team: string, locationId: number, data: FulfillmentLocationInput): Promise<IAppResponse<FulfillmentLocation>>;
3403
+ deleteLocation(team: string, locationId: number): Promise<IAppResponse<void>>;
3247
3404
  }
3248
3405
  //#endregion
3249
3406
  //#region src/commerce/guest.d.ts
@@ -3486,6 +3643,21 @@ declare class AppointmentsResource {
3486
3643
  }): Promise<IAppResponse<AppointmentRequest>>;
3487
3644
  }
3488
3645
  //#endregion
3646
+ //#region src/resources/content.d.ts
3647
+ declare class ContentResource {
3648
+ private readonly http;
3649
+ constructor(http: IHttpService);
3650
+ list(team: string): Promise<IAppResponse<Content[]>>;
3651
+ create(input: CreateContentInput): Promise<IAppResponse<Content>>;
3652
+ get(contentId: string): Promise<IAppResponse<Content>>;
3653
+ patch(contentId: string, input: PatchContentInput): Promise<IAppResponse<ContentVersion>>;
3654
+ preview(contentId: string): Promise<IAppResponse<ContentVersion>>;
3655
+ publish(contentId: string, expectedVersion: number): Promise<IAppResponse<ContentVersion>>;
3656
+ rollback(contentId: string, versionId: string, expectedVersion: number): Promise<IAppResponse<ContentVersion>>;
3657
+ versions(contentId: string): Promise<IAppResponse<ContentVersion[]>>;
3658
+ getPublic(slug: string): Promise<IAppResponse<Content>>;
3659
+ }
3660
+ //#endregion
3489
3661
  //#region src/resources/auth.d.ts
3490
3662
  type NativeSocialAuthProvider = Extract<SocialAuthProvider, 'apple' | 'google'>;
3491
3663
  type AuthSendCodeRequest = {
@@ -3552,12 +3724,15 @@ declare class BillingResource {
3552
3724
  plans(type?: 'current' | 'all'): Promise<IAppResponse<Plan[]>>;
3553
3725
  checkoutProduct(id: string): Promise<IAppResponse<Product>>;
3554
3726
  orders(team: TeamPrivate | null, page?: number, contactId?: string): Promise<IAppResponse<Order[]>>;
3555
- payOrder(id: string, provider?: PaymentProvider): Promise<IAppResponse<{
3727
+ payOrder(id: string, provider?: PaymentProvider, accessToken?: string): Promise<IAppResponse<{
3556
3728
  url: string;
3557
3729
  }>>;
3558
3730
  deleteOrder(id: string): Promise<IAppResponse<void>>;
3559
3731
  paymentAccount(team: string, provider: PaymentProvider): Promise<IAppResponse<PaymentAccount>>;
3560
3732
  createPaymentAccountOnboarding(team: string, provider: PaymentProvider): Promise<IAppResponse<PaymentAccountOnboarding>>;
3733
+ disconnectPaymentAccount(team: string, provider: PaymentProvider): Promise<IAppResponse<{
3734
+ disconnected: boolean;
3735
+ }>>;
3561
3736
  updatePaymentAccount(team: string, provider: PaymentProvider, input: {
3562
3737
  providerAccountId: string;
3563
3738
  chargesEnabled?: boolean;
@@ -4081,7 +4256,9 @@ declare class MeetingsResource {
4081
4256
  get(id: string): Promise<IAppResponse<Meeting>>;
4082
4257
  getSummary(id: string): Promise<IAppResponse<MeetingSummary>>;
4083
4258
  join(code: string): Promise<IAppResponse<MeetingJoinInfo>>;
4084
- cancel(code: string): Promise<IAppResponse<Meeting>>;
4259
+ cancel(code: string, data?: {
4260
+ reason?: string;
4261
+ }): Promise<IAppResponse<Meeting>>;
4085
4262
  share(id: string, recipients: {
4086
4263
  name: string;
4087
4264
  email: string;
@@ -4111,13 +4288,24 @@ declare class MemoriesResource {
4111
4288
  }
4112
4289
  //#endregion
4113
4290
  //#region src/resources/messages.d.ts
4291
+ type PendingApprovalMessage = Message & {
4292
+ team?: {
4293
+ slug: string;
4294
+ name: string;
4295
+ } | null;
4296
+ agentProfile?: {
4297
+ uuid: string;
4298
+ name: string;
4299
+ avatar: string | null;
4300
+ } | null;
4301
+ };
4114
4302
  declare class MessagesResource {
4115
4303
  private readonly http;
4116
4304
  constructor(http: IHttpService);
4117
4305
  list(team: string, room: string, page?: number, perPage?: number): Promise<IAppResponse<Message[]>>;
4118
4306
  search(team: string, search: string): Promise<IAppResponse<Message[]>>;
4119
4307
  delete(messageId: string): Promise<IAppResponse<void>>;
4120
- pendingApprovals(teams: string[]): Promise<IAppResponse<Message[]>>;
4308
+ pendingApprovals(teams: string[]): Promise<IAppResponse<PendingApprovalMessage[]>>;
4121
4309
  generateAudio(messageId: string): Promise<IAppResponse<{
4122
4310
  audioUrl: string;
4123
4311
  }>>;
@@ -4183,9 +4371,11 @@ declare class OrdersResource {
4183
4371
  type?: OrderType;
4184
4372
  sendConfirmation?: boolean;
4185
4373
  items?: {
4186
- id: string;
4187
- type: 'product' | 'service' | 'coupon';
4374
+ id?: string;
4375
+ type: 'product' | 'service' | 'coupon' | 'custom';
4188
4376
  quantity: number;
4377
+ name?: string;
4378
+ unitPrice?: number;
4189
4379
  configuration?: Configuration;
4190
4380
  }[];
4191
4381
  fulfillmentMethod?: FulfillmentMethod;
@@ -4612,18 +4802,45 @@ declare class TeamsResource {
4612
4802
  topupFinalize(tx: string): Promise<IAppResponse<void>>;
4613
4803
  }
4614
4804
  //#endregion
4805
+ //#region src/resources/artifacts.d.ts
4806
+ type ArtifactListParams = {
4807
+ type?: ArtifactType;
4808
+ status?: ArtifactStatus;
4809
+ contactId?: string;
4810
+ orderId?: string;
4811
+ ids?: string[] | string;
4812
+ page?: number;
4813
+ perPage?: number;
4814
+ };
4815
+ declare class ArtifactsResource {
4816
+ private readonly http;
4817
+ constructor(http: IHttpService);
4818
+ list(params?: ArtifactListParams): Promise<IAppResponse<Artifact[]>>;
4819
+ get(id: string): Promise<IAppResponse<Artifact>>;
4820
+ create(payload: ArtifactCreatePayload): Promise<IAppResponse<Artifact>>;
4821
+ update(id: string, payload: ArtifactUpdatePayload): Promise<IAppResponse<Artifact>>;
4822
+ delete(id: string): Promise<IAppResponse<void>>;
4823
+ deliver(payload: ArtifactDeliverPayload): Promise<IAppResponse<ArtifactDelivery[]>>;
4824
+ }
4825
+ //#endregion
4615
4826
  //#region src/resources/campaigns.d.ts
4616
4827
  declare class CampaignsResource {
4617
4828
  private readonly http;
4618
4829
  constructor(http: IHttpService);
4619
4830
  stats(): Promise<IAppResponse<CampaignStats>>;
4620
- list(): Promise<IAppResponse<Campaign[]>>;
4831
+ list(params?: {
4832
+ archived?: boolean;
4833
+ }): Promise<IAppResponse<Campaign[]>>;
4621
4834
  get(id: string): Promise<IAppResponse<Campaign>>;
4835
+ previewAudience(payload: CampaignAudiencePreviewPayload): Promise<IAppResponse<CampaignAudiencePreview>>;
4622
4836
  create(payload: CampaignCreatePayload): Promise<IAppResponse<Campaign>>;
4623
4837
  update(id: string, payload: CampaignUpdatePayload): Promise<IAppResponse<Campaign>>;
4624
4838
  submitForApproval(id: string): Promise<IAppResponse<Campaign>>;
4625
4839
  refreshApproval(id: string): Promise<IAppResponse<Campaign>>;
4626
4840
  send(id: string): Promise<IAppResponse<Campaign>>;
4841
+ cancel(id: string): Promise<IAppResponse<Campaign>>;
4842
+ archive(id: string): Promise<IAppResponse<Campaign>>;
4843
+ unarchive(id: string): Promise<IAppResponse<Campaign>>;
4627
4844
  delete(id: string): Promise<IAppResponse<void>>;
4628
4845
  }
4629
4846
  //#endregion
@@ -4636,6 +4853,7 @@ declare class SegmentsResource {
4636
4853
  update(id: string, payload: SegmentCreatePayload): Promise<IAppResponse<Segment>>;
4637
4854
  delete(id: string): Promise<IAppResponse<void>>;
4638
4855
  count(payload: SegmentCountPayload): Promise<IAppResponse<SegmentCountResult>>;
4856
+ contacts(id: string): Promise<IAppResponse<Contact[]>>;
4639
4857
  }
4640
4858
  //#endregion
4641
4859
  //#region src/resources/updates.d.ts
@@ -4903,6 +5121,7 @@ declare class JoAiClient {
4903
5121
  readonly entities: EntitiesResource;
4904
5122
  readonly mcp: McpResource;
4905
5123
  readonly appointments: AppointmentsResource;
5124
+ readonly content: ContentResource;
4906
5125
  readonly auth: AuthResource;
4907
5126
  readonly billing: BillingResource;
4908
5127
  readonly blueprints: BlueprintsResource;
@@ -4950,6 +5169,7 @@ declare class JoAiClient {
4950
5169
  readonly tasks: TasksResource;
4951
5170
  readonly tags: TagsResource;
4952
5171
  readonly teams: TeamsResource;
5172
+ readonly artifacts: ArtifactsResource;
4953
5173
  readonly campaigns: CampaignsResource;
4954
5174
  readonly segments: SegmentsResource;
4955
5175
  readonly updates: UpdatesResource;
@@ -5025,4 +5245,4 @@ declare class DistributionResource {
5025
5245
  private fetchDistribution;
5026
5246
  }
5027
5247
  //#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 };
5248
+ 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 };