@joai/sdk 1.4.1 → 2.1.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
@@ -195,22 +195,6 @@ type UserPrivate = {
195
195
  kyc?: Kyc | null;
196
196
  settings: UserSettings;
197
197
  };
198
- type Earning = {
199
- id: number;
200
- amount: number;
201
- type: string;
202
- description: string | null;
203
- createdAt: string;
204
- };
205
- type PayoutEntry = {
206
- id: number;
207
- amount: number;
208
- status: string;
209
- tx: string | null;
210
- failureReason: string | null;
211
- processedAt: string | null;
212
- createdAt: string;
213
- };
214
198
  type UserSocialAccount = {
215
199
  platform: string;
216
200
  id: string;
@@ -287,6 +271,21 @@ type TeamMeta = {
287
271
  branding?: TeamBrand | null;
288
272
  settings: Record<string, unknown>;
289
273
  };
274
+ type TeamPlace = {
275
+ provider: 'google';
276
+ sourceId: string;
277
+ name: string | null;
278
+ address: string | null;
279
+ location: {
280
+ lat: number | null;
281
+ lng: number | null;
282
+ };
283
+ rating?: number | null;
284
+ reviewCount?: number | null;
285
+ websiteUrl?: string | null;
286
+ mapsUrl?: string | null;
287
+ businessStatus?: string | null;
288
+ };
290
289
  type Team = {
291
290
  slug: string;
292
291
  name: string;
@@ -296,6 +295,7 @@ type Team = {
296
295
  description: TranslatableValue | null;
297
296
  locale: WarpLocale;
298
297
  timezone: string;
298
+ place?: TeamPlace | null;
299
299
  meta?: TeamMeta;
300
300
  features?: TeamFeature[];
301
301
  cover?: string | null;
@@ -331,6 +331,7 @@ type TeamPrivate = {
331
331
  balance: number;
332
332
  locale: WarpLocale;
333
333
  timezone: string;
334
+ place?: TeamPlace | null;
334
335
  logo: string | null;
335
336
  cover: string | null;
336
337
  subscription: {
@@ -425,6 +426,25 @@ type JsonValue = string | number | boolean | null | JsonValue[] | {
425
426
  }; //#endregion
426
427
  //#region src/contact/types.d.ts
427
428
  type ContactHealth = 'active' | 'lukewarm' | 'cold' | 'stale' | 'unknown';
429
+ type ContactConsentStatus = 'pending' | 'confirmed' | 'superseded' | 'unsubscribed';
430
+ type ContactConsent = {
431
+ id: string;
432
+ purpose: string;
433
+ status: ContactConsentStatus;
434
+ email: string;
435
+ consentText: {
436
+ label?: string | Record<string, string>;
437
+ description?: string | Record<string, string> | null;
438
+ };
439
+ privacyUrl: string | null;
440
+ source: {
441
+ formIdentifier?: string | null;
442
+ formTitle?: string | Record<string, string> | null;
443
+ };
444
+ requestedAt: string;
445
+ confirmedAt: string | null;
446
+ unsubscribedAt: string | null;
447
+ };
428
448
  type Contact = {
429
449
  id: string;
430
450
  name: string;
@@ -445,8 +465,11 @@ type Contact = {
445
465
  settings?: {
446
466
  marketingOptOut?: boolean;
447
467
  } | null;
468
+ consents?: ContactConsent[];
448
469
  lastActivityAt?: string | null;
449
470
  health?: ContactHealth;
471
+ nextFollowUpAt?: string | null;
472
+ followUpNote?: string | null;
450
473
  };
451
474
  type ContactActivityType = 'note' | 'call' | 'meeting' | 'task' | 'update' | 'custom' | 'form' | 'loyalty';
452
475
  type ContactActivityAuthor = {
@@ -479,6 +502,8 @@ type ContactFormData = {
479
502
  settings?: {
480
503
  marketingOptOut?: boolean;
481
504
  };
505
+ nextFollowUpAt?: string | null;
506
+ followUpNote?: string | null;
482
507
  };
483
508
  type ContactCreatePayload = ContactFormData & {
484
509
  name: string;
@@ -497,10 +522,8 @@ type MediaLibraryAttributes = {
497
522
  extension?: string;
498
523
  size?: number;
499
524
  };
500
- type MediaLibraryItems = {
501
- [uuid: string]: MediaLibraryAttributes;
502
- };
503
525
  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';
526
+ type MediaAspectRatio = 'free' | '1:1' | '16:9' | '9:16' | '4:3' | '3:4';
504
527
  type Media = {
505
528
  id: string;
506
529
  name: string;
@@ -532,7 +555,7 @@ type AppSubscription = {
532
555
  createdAt: string;
533
556
  updatedAt: string;
534
557
  };
535
- type PaymentProvider = 'xmoney' | 'lemonsqueezy' | 'stripe' | 'stripe-connect' | 'apple' | 'google' | 'blockchain' | 'offline';
558
+ type PaymentProvider = 'xmoney' | 'lemonsqueezy' | 'stripe' | 'stripe-connect' | 'mollie' | 'mollie-connect' | 'apple' | 'google' | 'blockchain' | 'offline';
536
559
  type PaymentAccount = {
537
560
  provider: string;
538
561
  connected: boolean;
@@ -546,13 +569,17 @@ type PaymentAccountOnboarding = {
546
569
  };
547
570
  type TerminalConnectionToken = {
548
571
  secret: string;
549
- locationId: string;
572
+ locationId: string | null;
550
573
  connectedAccountId: string;
574
+ appId?: string | null;
575
+ webhookUrl?: string | null;
551
576
  };
552
577
  type TerminalPaymentIntent = {
553
- clientSecret: string;
578
+ clientSecret: string | null;
554
579
  paymentIntentId: string;
555
580
  connectedAccountId: string;
581
+ payload?: string | null;
582
+ signature?: string | null;
556
583
  };
557
584
  type PlanFeature = 'general' | 'messages' | 'team-members' | 'teams' | 'support' | 'agent' | 'auto-mode' | 'cloud-sync' | 'wallet-cloud' | 'wallet-cloud-premium' | 'wallet-multi' | 'cards' | 'alerts' | 'advanced-commands' | 'tasks' | 'integrations' | 'message-history' | 'memory' | 'documents' | 'voice-input' | 'voice-live' | 'image-gen' | 'video-gen' | 'openclaw' | 'skills' | 'items' | 'context-length' | 'workspace-storage' | 'ingestions' | 'agent-email' | 'streak-freezes' | 'byok' | 'mcp' | 'phone-call' | 'phone-number' | 'custom-domain' | 'contacts' | 'links' | 'store-fee-rate' | 'store-fee-rate-physical' | 'tap-to-pay';
558
585
  type PlanBenefit = {
@@ -578,6 +605,7 @@ type BillingAddress = {
578
605
  type PlanInterval = 'weekly' | 'monthly' | 'yearly' | 'lifetime';
579
606
  type Plan = {
580
607
  resource: 'plan';
608
+ id: string;
581
609
  sku: string;
582
610
  name: TranslatableValue;
583
611
  description: Partial<Record<WarpLocale, string>>;
@@ -759,6 +787,11 @@ type Cart = {
759
787
  couponDiscount: number;
760
788
  };
761
789
  type CouponCondition = 'none' | 'onetime-use' | 'previous-purchase';
790
+ type CouponRestrictedItemType = 'product' | 'service';
791
+ type CouponRestrictedItem = {
792
+ type: CouponRestrictedItemType;
793
+ ref: string;
794
+ };
762
795
  type Coupon = {
763
796
  id: string;
764
797
  code: string;
@@ -767,6 +800,7 @@ type Coupon = {
767
800
  percent: number | null;
768
801
  price: number | null;
769
802
  condition: CouponCondition;
803
+ restrictedItems: CouponRestrictedItem[];
770
804
  usesLeft: number | null;
771
805
  expiresAt: string | null;
772
806
  active: boolean;
@@ -1034,6 +1068,12 @@ type WarpExtras = {
1034
1068
  enabled?: boolean;
1035
1069
  contact?: string | null;
1036
1070
  };
1071
+ optIn?: {
1072
+ enabled?: boolean;
1073
+ };
1074
+ results?: {
1075
+ public?: boolean;
1076
+ };
1037
1077
  };
1038
1078
  type WarpBackend = {
1039
1079
  hash: string;
@@ -1041,8 +1081,8 @@ type WarpBackend = {
1041
1081
  chain: WarpChainName | null;
1042
1082
  alias: string;
1043
1083
  name: string;
1044
- title: string;
1045
- description: string;
1084
+ title: WarpText;
1085
+ description: WarpText;
1046
1086
  preview: string | null;
1047
1087
  creator: string;
1048
1088
  status: WarpBackendStatus;
@@ -1232,6 +1272,7 @@ type StoreData = {
1232
1272
  items: StoreItem[];
1233
1273
  };
1234
1274
  type StorePriceTier = {
1275
+ id: string;
1235
1276
  sku: string;
1236
1277
  priceCents: number;
1237
1278
  label: string;
@@ -1259,6 +1300,20 @@ type TeamEarningsBalance = {
1259
1300
  pendingCents: number;
1260
1301
  paidCents: number;
1261
1302
  totalCents: number;
1303
+ availableCents: number;
1304
+ };
1305
+ type TeamPayout = {
1306
+ id: number;
1307
+ amount: number;
1308
+ status: string;
1309
+ tx: string | null;
1310
+ failureReason: string | null;
1311
+ processedAt: string | null;
1312
+ createdAt: string;
1313
+ };
1314
+ type TeamPayoutAddress = {
1315
+ payoutAddress: string | null;
1316
+ payoutChain: string | null;
1262
1317
  };
1263
1318
  type CommissionAgreement = {
1264
1319
  id: number;
@@ -1437,7 +1492,13 @@ type AppointmentAvailability = {
1437
1492
  service: AppointmentAvailabilityService | null;
1438
1493
  slots: AppointmentAvailabilitySlot[];
1439
1494
  };
1495
+ type AppointmentPolicySync = {
1496
+ enabled: boolean;
1497
+ lastSyncedAt?: string | null;
1498
+ lastSyncError?: string | null;
1499
+ };
1440
1500
  type AppointmentPolicy = {
1501
+ active: boolean;
1441
1502
  timezone: string | null;
1442
1503
  availability: Record<string, {
1443
1504
  start: string;
@@ -1453,7 +1514,9 @@ type AppointmentPolicy = {
1453
1514
  serviceSelectionEnabled?: boolean | null;
1454
1515
  paymentEnabled?: boolean | null;
1455
1516
  requireApproval?: boolean | null;
1517
+ sync?: AppointmentPolicySync | null;
1456
1518
  agent?: Agent | null;
1519
+ agentUuid?: string | null;
1457
1520
  };
1458
1521
  type AppointmentBooking = {
1459
1522
  id: string;
@@ -2011,11 +2074,8 @@ type NotificationAction = {
2011
2074
  };
2012
2075
  type NotificationSetting = {
2013
2076
  identifier: string;
2014
- name: string;
2015
- description: string;
2016
2077
  channels: {
2017
2078
  identifier: NotificationChannel;
2018
- name: string;
2019
2079
  isEnabled: boolean;
2020
2080
  }[];
2021
2081
  }; //#endregion
@@ -2461,7 +2521,7 @@ type LoyaltyMember = {
2461
2521
  updatedAt: string;
2462
2522
  }; //#endregion
2463
2523
  //#region src/segment/types.d.ts
2464
- type SegmentConditionType = 'tag' | 'has_email' | 'has_phone' | 'has_user' | 'last_purchase_after' | 'last_purchase_before' | 'total_order_amount' | 'order_count_at_least' | 'never_purchased' | 'avg_order_value_at_least' | 'last_contact_after' | 'last_contact_before' | 'created_after' | 'created_before' | 'email_contains';
2524
+ type SegmentConditionType = 'tag' | 'has_email' | 'has_phone' | 'has_user' | 'last_purchase_after' | 'last_purchase_before' | 'total_order_amount' | 'order_count_at_least' | 'never_purchased' | 'avg_order_value_at_least' | 'last_contact_after' | 'last_contact_before' | 'waiting_on' | 'created_after' | 'created_before' | 'email_contains';
2465
2525
  type SegmentCondition = {
2466
2526
  type: SegmentConditionType;
2467
2527
  value: string | boolean;
@@ -2493,13 +2553,23 @@ type SegmentCountResult = {
2493
2553
  }; //#endregion
2494
2554
  //#region src/campaign/types.d.ts
2495
2555
  type CampaignChannel = 'email' | 'whatsapp' | 'sms' | 'push';
2496
- type CampaignStatus = 'draft' | 'sending' | 'completed' | 'failed';
2556
+ type CampaignStatus = 'draft' | 'pending' | 'approved' | 'rejected' | 'sending' | 'completed' | 'failed';
2557
+ type CampaignCategory = 'MARKETING' | 'UTILITY' | 'AUTHENTICATION';
2558
+ type CampaignApproval = {
2559
+ language: string | null;
2560
+ category: CampaignCategory | null;
2561
+ placeholders: string[];
2562
+ templateParams: Record<string, string>;
2563
+ externalStatus: string | null;
2564
+ rejectionReason: string | null;
2565
+ };
2497
2566
  type Campaign = {
2498
2567
  id: string;
2499
2568
  name: string;
2500
2569
  channel: CampaignChannel;
2501
2570
  subject: string | null;
2502
2571
  content: string;
2572
+ approval: CampaignApproval;
2503
2573
  tags: string[];
2504
2574
  status: CampaignStatus;
2505
2575
  totalCount: number;
@@ -2515,8 +2585,20 @@ type CampaignCreatePayload = {
2515
2585
  channel: CampaignChannel;
2516
2586
  subject?: string;
2517
2587
  content: string;
2588
+ language?: string;
2589
+ category?: CampaignCategory;
2590
+ templateParams?: Record<string, string>;
2518
2591
  tags?: string[];
2519
2592
  contactIds?: string[];
2593
+ segmentId?: string;
2594
+ };
2595
+ type CampaignUpdatePayload = {
2596
+ name: string;
2597
+ subject?: string;
2598
+ content: string;
2599
+ language?: string;
2600
+ category?: CampaignCategory;
2601
+ templateParams?: Record<string, string>;
2520
2602
  };
2521
2603
  type CampaignStats = {
2522
2604
  totalCampaigns: number;
@@ -2547,7 +2629,7 @@ type UpdateCreatePayload = {
2547
2629
  type: UpdateType;
2548
2630
  body?: string;
2549
2631
  imageUrl?: string;
2550
- media?: MediaLibraryItems;
2632
+ media?: string[];
2551
2633
  linkUrl?: string;
2552
2634
  startsAt?: string;
2553
2635
  endsAt?: string;
@@ -2730,7 +2812,7 @@ declare class AgentsResource {
2730
2812
  trainingUrl?: string | null;
2731
2813
  };
2732
2814
  }): Promise<IAppResponse<AgentPrivate>>;
2733
- update(uuid: string, name: string, description: string | null, avatar?: MediaLibraryItems): Promise<IAppResponse<AgentPrivate>>;
2815
+ update(uuid: string, name: string, description: string | null, avatar?: string[]): Promise<IAppResponse<AgentPrivate>>;
2734
2816
  delete(uuid: string): Promise<IAppResponse<void>>;
2735
2817
  updatePassword(uuid: string, password: string): Promise<IAppResponse<void>>;
2736
2818
  storePassword(uuid: string, password: string): Promise<IAppResponse<AgentPrivate>>;
@@ -2817,14 +2899,14 @@ declare class ElementsResource {
2817
2899
  type: string;
2818
2900
  description?: string | null;
2819
2901
  spec?: ElementSpec | null;
2820
- media?: any[];
2902
+ media?: string[];
2821
2903
  }): Promise<IAppResponse<Element>>;
2822
2904
  update(team: string, elementId: string, payload: {
2823
2905
  name?: string;
2824
2906
  type?: string;
2825
2907
  description?: string | null;
2826
2908
  spec?: ElementSpec | null;
2827
- media?: any[];
2909
+ media?: string[];
2828
2910
  }): Promise<IAppResponse<Element>>;
2829
2911
  delete(team: string, elementId: string): Promise<IAppResponse<void>>;
2830
2912
  generateVariation(team: string, elementId: string, payload?: {
@@ -2903,7 +2985,7 @@ declare class AppointmentsResource {
2903
2985
  private readonly http;
2904
2986
  private readonly config;
2905
2987
  constructor(http: IHttpService, config: JoAiClientConfig);
2906
- getPolicy(): Promise<IAppResponse<AppointmentPolicy>>;
2988
+ getPolicy(): Promise<IAppResponse<AppointmentPolicy | null>>;
2907
2989
  upsertPolicy(data: Partial<AppointmentPolicy>): Promise<IAppResponse<AppointmentPolicy>>;
2908
2990
  checkAvailability(agentUuid: string, params: {
2909
2991
  windowStart: string;
@@ -3029,12 +3111,12 @@ declare class BillingResource {
3029
3111
  plans(type?: 'current' | 'all'): Promise<IAppResponse<Plan[]>>;
3030
3112
  checkoutProduct(id: string): Promise<IAppResponse<Product>>;
3031
3113
  orders(team: TeamPrivate | null, page?: number, contactId?: string): Promise<IAppResponse<Order[]>>;
3032
- payOrder(id: string, provider: string): Promise<IAppResponse<{
3114
+ payOrder(id: string, provider?: PaymentProvider): Promise<IAppResponse<{
3033
3115
  url: string;
3034
3116
  }>>;
3035
3117
  deleteOrder(id: string): Promise<IAppResponse<void>>;
3036
- paymentAccount(team: string, provider: string): Promise<IAppResponse<PaymentAccount>>;
3037
- createPaymentAccountOnboarding(team: string, provider: string): Promise<IAppResponse<PaymentAccountOnboarding>>;
3118
+ paymentAccount(team: string, provider: PaymentProvider): Promise<IAppResponse<PaymentAccount>>;
3119
+ createPaymentAccountOnboarding(team: string, provider: PaymentProvider): Promise<IAppResponse<PaymentAccountOnboarding>>;
3038
3120
  updatePaymentAccount(team: string, provider: string, input: {
3039
3121
  providerAccountId: string;
3040
3122
  chargesEnabled?: boolean;
@@ -3088,12 +3170,16 @@ declare class CardsResource {
3088
3170
  declare class CartsResource {
3089
3171
  private readonly http;
3090
3172
  constructor(http: IHttpService);
3091
- get(): Promise<IAppResponse<Cart>>;
3092
- add(type: 'product' | 'service' | 'coupon', id: string, quantity?: number, configuration?: Configuration): Promise<IAppResponse<Cart>>;
3173
+ get(provider?: string): Promise<IAppResponse<Cart>>;
3174
+ add(type: 'product' | 'service' | 'coupon', id: string, quantity?: number, options?: {
3175
+ fresh?: boolean;
3176
+ configuration?: Configuration;
3177
+ }): Promise<IAppResponse<Cart>>;
3093
3178
  remove(type: 'product' | 'service' | 'coupon', id: string): Promise<IAppResponse<Cart>>;
3094
3179
  updateQuantity(type: 'product' | 'service' | 'coupon', id: string, quantity: number): Promise<IAppResponse<Cart>>;
3095
3180
  clear(): Promise<IAppResponse<Cart>>;
3096
3181
  applyCoupon(code: string): Promise<IAppResponse<void>>;
3182
+ removeCoupon(): Promise<IAppResponse<void>>;
3097
3183
  }
3098
3184
  //#endregion
3099
3185
  //#region src/resources/coupons.d.ts
@@ -3106,9 +3192,10 @@ type CouponPayload = {
3106
3192
  active?: boolean;
3107
3193
  public?: boolean;
3108
3194
  condition?: CouponCondition;
3195
+ restrictedItems?: CouponRestrictedItem[] | null;
3109
3196
  usesLeft?: number | null;
3110
3197
  expiresAt?: string | null;
3111
- media?: MediaLibraryAttributes[];
3198
+ media?: string[];
3112
3199
  };
3113
3200
  declare class CouponsResource {
3114
3201
  private readonly http;
@@ -3116,6 +3203,7 @@ declare class CouponsResource {
3116
3203
  list(team: string, options?: {
3117
3204
  public?: boolean;
3118
3205
  }): Promise<IAppResponse<Coupon[]>>;
3206
+ get(id: string): Promise<IAppResponse<Coupon>>;
3119
3207
  create(team: string, data: CouponPayload): Promise<IAppResponse<Coupon>>;
3120
3208
  update(id: string, data: Partial<CouponPayload> & {
3121
3209
  clearExpiry?: boolean;
@@ -3139,6 +3227,8 @@ declare class ContactsResource {
3139
3227
  search?: string;
3140
3228
  page?: number;
3141
3229
  staleDays?: number;
3230
+ waitingOn?: boolean;
3231
+ overdue?: boolean;
3142
3232
  }): Promise<IAppResponse<Contact[]>>;
3143
3233
  get(id: string): Promise<IAppResponse<Contact>>;
3144
3234
  create(payload: ContactCreatePayload): Promise<IAppResponse<Contact>>;
@@ -3215,7 +3305,7 @@ declare class DocumentsResource {
3215
3305
  }): Promise<IAppResponse<Document>>;
3216
3306
  delete(id: string): Promise<IAppResponse<void>>;
3217
3307
  trainFromUrl(agent: string, url: string): Promise<IAppResponse<Document>>;
3218
- uploadFile(agentUuid: string, name: string, document: MediaLibraryItems): Promise<IAppResponse<Document>>;
3308
+ uploadFile(agentUuid: string, name: string, document: string[]): Promise<IAppResponse<Document>>;
3219
3309
  }
3220
3310
  //#endregion
3221
3311
  //#region src/resources/flows.d.ts
@@ -3489,6 +3579,10 @@ declare class StoreResource {
3489
3579
  get(locale?: string): Promise<StoreData>;
3490
3580
  earnings(teamSlug: string, page?: number): Promise<IAppResponse<TeamEarning[]>>;
3491
3581
  earningsBalance(teamSlug: string): Promise<IAppResponse<TeamEarningsBalance>>;
3582
+ payouts(teamSlug: string, page?: number): Promise<IAppResponse<TeamPayout[]>>;
3583
+ requestPayout(teamSlug: string): Promise<IAppResponse<TeamPayout>>;
3584
+ payoutAddress(teamSlug: string): Promise<IAppResponse<TeamPayoutAddress>>;
3585
+ updatePayoutAddress(teamSlug: string, address: string, chain?: string): Promise<IAppResponse<void>>;
3492
3586
  commissions(teamSlug: string): Promise<IAppResponse<CommissionAgreement[]>>;
3493
3587
  priceTiers(): Promise<IAppResponse<StorePriceTier[]>>;
3494
3588
  purchase(entityType: string, entityId: string, paymentMethod?: string): Promise<IAppResponse<StorePurchaseResult>>;
@@ -3496,6 +3590,10 @@ declare class StoreResource {
3496
3590
  //#endregion
3497
3591
  //#region src/resources/media.d.ts
3498
3592
  type MediaUploadType = 'brand' | 'reference' | 'template' | 'output';
3593
+ type AttachedMedia = {
3594
+ id: string;
3595
+ custom_properties?: Record<string, unknown> | null;
3596
+ };
3499
3597
  declare class MediaResource {
3500
3598
  private readonly http;
3501
3599
  constructor(http: IHttpService);
@@ -3506,26 +3604,29 @@ declare class MediaResource {
3506
3604
  }): Promise<IAppResponse<Media[]>>;
3507
3605
  upload(data: {
3508
3606
  team: string;
3509
- file: File;
3607
+ file?: File;
3608
+ fileUrl?: string;
3609
+ fileName?: string;
3610
+ mimeType?: string;
3510
3611
  type: MediaUploadType;
3612
+ aspect?: MediaAspectRatio;
3511
3613
  label?: string;
3512
3614
  tags?: string[];
3513
3615
  copyright?: string;
3514
3616
  }): Promise<IAppResponse<Media>>;
3515
- listTeam(team: string, params?: {
3617
+ list(team: string, params?: {
3516
3618
  page?: number;
3517
3619
  mime?: string;
3518
3620
  }): Promise<IAppResponse<Media[]>>;
3519
- uploadTeam(team: string, media: MediaLibraryItems, tags?: string[], options?: {
3520
- preserveOriginal?: boolean;
3521
- copyright?: string;
3522
- }): Promise<IAppResponse<Media[]>>;
3523
- deleteTeam(team: string, mediaId: string): Promise<IAppResponse<void>>;
3524
- updateTeamMedia(team: string, mediaId: string, data: {
3621
+ get(team: string, mediaId: string): Promise<IAppResponse<Media>>;
3622
+ delete(team: string, mediaId: string): Promise<IAppResponse<void>>;
3623
+ update(team: string, mediaId: string, data: {
3525
3624
  name: string;
3526
3625
  copyright?: string | null;
3527
3626
  }): Promise<IAppResponse<Media>>;
3528
- updateTeamMediaTags(team: string, mediaId: string, tags: string[]): Promise<IAppResponse<Media>>;
3627
+ updateTags(team: string, mediaId: string, tags: string[]): Promise<IAppResponse<Media>>;
3628
+ /** Download the stored bytes of a media item as a File (used to re-edit existing images). */
3629
+ download(team: string, mediaId: string, name: string, mime: string): Promise<File>;
3529
3630
  }
3530
3631
  //#endregion
3531
3632
  //#region src/resources/meetings.d.ts
@@ -3691,7 +3792,7 @@ declare class ProductsResource {
3691
3792
  active?: boolean;
3692
3793
  public?: boolean;
3693
3794
  virtual?: boolean;
3694
- media?: MediaLibraryAttributes[];
3795
+ media?: string[];
3695
3796
  }): Promise<IAppResponse<Product>>;
3696
3797
  delete(id: string): Promise<IAppResponse<void>>;
3697
3798
  createVariation(productSlug: string, data: {
@@ -3707,8 +3808,8 @@ declare class ProductsResource {
3707
3808
  hidden?: boolean;
3708
3809
  type?: string;
3709
3810
  settings?: Record<string, unknown> | null;
3710
- media?: MediaLibraryAttributes[];
3711
- preview?: MediaLibraryAttributes[];
3811
+ media?: string[];
3812
+ preview?: string[];
3712
3813
  stock?: number | null;
3713
3814
  weight?: number | null;
3714
3815
  }): Promise<IAppResponse<ProductVariation>>;
@@ -3873,13 +3974,13 @@ declare class SkillsResource {
3873
3974
  license?: string;
3874
3975
  compatibility?: string;
3875
3976
  allowedTools?: string;
3876
- media?: MediaLibraryItems;
3977
+ media?: AttachedMedia[];
3877
3978
  active?: boolean;
3878
3979
  isPublic?: boolean;
3879
3980
  price?: number;
3880
3981
  }): Promise<IAppResponse<Skill>>;
3881
3982
  update(id: string, data: Partial<Omit<Skill, 'media' | 'store'>> & {
3882
- media?: MediaLibraryItems;
3983
+ media?: AttachedMedia[];
3883
3984
  public?: boolean;
3884
3985
  price?: number;
3885
3986
  }): Promise<IAppResponse<Skill>>;
@@ -3941,7 +4042,7 @@ declare class SwarmsResource {
3941
4042
  constructor(http: IHttpService);
3942
4043
  listSwarms(team: string): Promise<IAppResponse<Swarm[]>>;
3943
4044
  listAgents(swarm: string): Promise<IAppResponse<Agent[]>>;
3944
- storeProposal(agent: string, swarm: string, title: string, description: string, actions: ProposalAction[], attachments: MediaLibraryItems, poll: ProposalPollOption[]): Promise<IAppResponse<Proposal>>;
4045
+ storeProposal(agent: string, swarm: string, title: string, description: string, actions: ProposalAction[], attachments: string[], poll: ProposalPollOption[]): Promise<IAppResponse<Proposal>>;
3945
4046
  finalizeProposal(swarm: string, txHash: string, proposal: string): Promise<IAppResponse<void>>;
3946
4047
  finalizeSignature(swarm: string, txHash: string, proposal: string): Promise<IAppResponse<void>>;
3947
4048
  finalizeExecution(chain: WarpChainName, txHash: string, actions?: ProposalAction[]): Promise<IAppResponse<void>>;
@@ -4020,9 +4121,15 @@ declare class TeamsResource {
4020
4121
  inviteMember(teamSlug: string, email: string, role: UserRole): Promise<IAppResponse<void>>;
4021
4122
  removeMember(teamSlug: string, memberId: string): Promise<IAppResponse<void>>;
4022
4123
  listMembers(teamSlug: string): Promise<IAppResponse<TeamMember[]>>;
4023
- updateLogo(teamSlug: string, logo: MediaLibraryItems): Promise<IAppResponse<TeamPrivate>>;
4024
- updateCover(teamSlug: string, cover: MediaLibraryItems): Promise<IAppResponse<TeamPrivate>>;
4124
+ updateLogo(teamSlug: string, logo: string[]): Promise<IAppResponse<TeamPrivate>>;
4125
+ updateCover(teamSlug: string, cover: string[]): Promise<IAppResponse<TeamPrivate>>;
4025
4126
  updateSetting(teamSlug: string, key: string, value: boolean | string | number | object | null): Promise<IAppResponse<TeamPrivate>>;
4127
+ searchPlaces(teamSlug: string, query: string, options?: {
4128
+ language?: string;
4129
+ region?: string;
4130
+ limit?: number;
4131
+ }): Promise<IAppResponse<TeamPlace[]>>;
4132
+ selectPlace(teamSlug: string, sourceId: string | null): Promise<IAppResponse<TeamPrivate>>;
4026
4133
  listPrivate(): Promise<IAppResponse<TeamPrivate[]>>;
4027
4134
  getInviteByToken(token: string): Promise<IAppResponse<TeamInviteInfo>>;
4028
4135
  acceptInvite(slug: string): Promise<IAppResponse<void>>;
@@ -4040,6 +4147,9 @@ declare class CampaignsResource {
4040
4147
  list(): Promise<IAppResponse<Campaign[]>>;
4041
4148
  get(id: string): Promise<IAppResponse<Campaign>>;
4042
4149
  create(payload: CampaignCreatePayload): Promise<IAppResponse<Campaign>>;
4150
+ update(id: string, payload: CampaignUpdatePayload): Promise<IAppResponse<Campaign>>;
4151
+ submitForApproval(id: string): Promise<IAppResponse<Campaign>>;
4152
+ refreshApproval(id: string): Promise<IAppResponse<Campaign>>;
4043
4153
  send(id: string): Promise<IAppResponse<Campaign>>;
4044
4154
  delete(id: string): Promise<IAppResponse<void>>;
4045
4155
  }
@@ -4099,13 +4209,9 @@ declare class UsersResource {
4099
4209
  updateEmail(email: string): Promise<IAppResponse<UserPrivate>>;
4100
4210
  resendEmailVerification(): Promise<IAppResponse<UserPrivate>>;
4101
4211
  deleteMe(): Promise<IAppResponse<void>>;
4102
- updatePayoutAddress(address: string, chain?: string): Promise<IAppResponse<void>>;
4103
4212
  getAffiliate(code: string): Promise<IAppResponse<Affiliate>>;
4104
4213
  getAffiliateTiers(): Promise<IAppResponse<AffiliateTier[]>>;
4105
4214
  storeAffiliate(name: string, email: string, application: string): Promise<IAppResponse<void>>;
4106
- getEarnings(page: number): Promise<IAppResponse<Earning[]>>;
4107
- getPayouts(page: number): Promise<IAppResponse<PayoutEntry[]>>;
4108
- requestPayout(): Promise<IAppResponse<PayoutEntry>>;
4109
4215
  }
4110
4216
  //#endregion
4111
4217
  //#region src/resources/voice.d.ts
@@ -4170,6 +4276,12 @@ type BackendWarp = {
4170
4276
  agent?: AgentPrivate | null;
4171
4277
  link?: Link | null;
4172
4278
  };
4279
+ type WarpExecutionContext<C extends Record<string, unknown> = Record<string, never>> = {
4280
+ locale?: string;
4281
+ sourceUrl?: string;
4282
+ ipAddress?: string;
4283
+ userAgent?: string;
4284
+ } & C;
4173
4285
  declare class WarpsResource {
4174
4286
  private readonly http;
4175
4287
  constructor(http: IHttpService);
@@ -4194,6 +4306,7 @@ declare class WarpsResource {
4194
4306
  form?: boolean;
4195
4307
  store?: boolean;
4196
4308
  agent?: string | null;
4309
+ optIn?: boolean | null;
4197
4310
  }): Promise<IAppResponse<BackendWarpCreateResponse>>;
4198
4311
  update(identifier: string, data: {
4199
4312
  name?: string;
@@ -4205,10 +4318,12 @@ declare class WarpsResource {
4205
4318
  store?: boolean;
4206
4319
  agent?: string | null;
4207
4320
  public?: boolean;
4321
+ optIn?: boolean | null;
4208
4322
  }): Promise<IAppResponse<BackendWarpUpdateResponse>>;
4209
4323
  destroy(identifier: string): Promise<IAppResponse<void>>;
4210
- execute(identifier: string, inputs: string[], room?: string): Promise<IAppResponse<JsonValue>>;
4324
+ execute<C extends Record<string, unknown> = Record<string, never>>(identifier: string, inputs: string[], room?: string, context?: WarpExecutionContext<C>): Promise<IAppResponse<JsonValue>>;
4211
4325
  executions(identifier: string, page?: number, perPage?: number): Promise<IAppResponse<WarpExecutionBackend[]>>;
4326
+ results(identifier: string, page?: number, perPage?: number): Promise<IAppResponse<WarpExecutionBackend[]>>;
4212
4327
  ensureLink(identifier: string): Promise<IAppResponse<Link>>;
4213
4328
  install(identifier: string): Promise<IAppResponse<{
4214
4329
  identifier: string;
@@ -4239,7 +4354,7 @@ declare class WarpsResource {
4239
4354
  name?: string;
4240
4355
  description?: string;
4241
4356
  public?: boolean;
4242
- logo?: MediaLibraryItems | null;
4357
+ logo?: string[] | null;
4243
4358
  source?: BrandSourceConfig | null;
4244
4359
  }): Promise<IAppResponse<BrandBackend>>;
4245
4360
  deleteTeamBrand(teamSlug: string, brandSlug: string): Promise<IAppResponse<void>>;
@@ -4313,6 +4428,7 @@ interface JoAiClientConfig {
4313
4428
  env?: AppEnv;
4314
4429
  agentAuthKey?: string;
4315
4430
  cache?: CacheConfig;
4431
+ buildSecret?: string;
4316
4432
  }
4317
4433
  declare class JoAiClient {
4318
4434
  readonly http: IHttpService;
@@ -4423,4 +4539,4 @@ declare class DistributionResource {
4423
4539
  private fetchDistribution;
4424
4540
  }
4425
4541
  //#endregion
4426
- export { AgentsResource, AlertsResource, ApiTokensResource, AppointmentsResource, AuthResource, type AuthSendCodeRequest, type AuthVerifyResponse, type BackendWarp, type BackendWarpBrand, BillingAddressesResource, BillingResource, BlueprintsResource, type CacheConfig, CachedHttpService, CampaignsResource, CardsResource, CartsResource, ChangelogResource, CharactersResource, ContactsResource, ContractsResource, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, FlowsResource, GoalsResource, IngestionsResource, InquiriesResource, IntegrationsResource, IntentsResource, ItemsResource, JoAiClient, type JoAiClientConfig, KvResource, LinksResource, LoyaltyResource, McpResource, MeetingsResource, MemoriesResource, MessagesResource, MissionsResource, NotificationsResource, OfficeResource, type OpeningHoursEntry, type OpeningHoursFormatOptions, OrdersResource, PersonaResource, type Product, type ProductVariation, ProductsResource, ProjectsResource, RemindersResource, SegmentsResource, ServicesResource, ShortcutsResource, SitesResource, SkillsResource, StatsResource, StoreResource, SubscriptionsResource, SwarmsResource, TagsResource, TasksResource, type TeamInviteInfo, TeamsResource, UpdatesResource, UpgradesResource, UsersResource, VoiceResource, WalletsResource, WarpsResource, WebhooksResource, WorkspaceResource, createClient, formatOpeningHours };
4542
+ export { AgentsResource, AlertsResource, ApiTokensResource, AppointmentsResource, type AttachedMedia, AuthResource, type AuthSendCodeRequest, type AuthVerifyResponse, type BackendWarp, type BackendWarpBrand, BillingAddressesResource, BillingResource, BlueprintsResource, type CacheConfig, CachedHttpService, CampaignsResource, CardsResource, CartsResource, ChangelogResource, CharactersResource, ContactsResource, ContractsResource, DeskResource, DistributionResource, DocumentsResource, ElementsResource, EntitiesResource, FlowsResource, GoalsResource, IngestionsResource, InquiriesResource, IntegrationsResource, IntentsResource, ItemsResource, JoAiClient, type JoAiClientConfig, KvResource, LinksResource, LoyaltyResource, McpResource, type MediaUploadType, MeetingsResource, MemoriesResource, MessagesResource, MissionsResource, NotificationsResource, OfficeResource, type OpeningHoursEntry, type OpeningHoursFormatOptions, OrdersResource, PersonaResource, type Product, type ProductVariation, ProductsResource, ProjectsResource, RemindersResource, SegmentsResource, ServicesResource, ShortcutsResource, SitesResource, SkillsResource, StatsResource, StoreResource, SubscriptionsResource, SwarmsResource, TagsResource, TasksResource, type TeamInviteInfo, TeamsResource, UpdatesResource, UpgradesResource, UsersResource, VoiceResource, WalletsResource, WarpsResource, WebhooksResource, WorkspaceResource, createClient, formatOpeningHours };
package/dist/index.mjs CHANGED
@@ -548,7 +548,7 @@ var BillingResource = class {
548
548
  return this.http.get(params);
549
549
  }
550
550
  payOrder(id, provider) {
551
- return this.http.post(`orders/${id}/pay`, { provider });
551
+ return this.http.post(`orders/${id}/pay`, provider ? { provider } : {});
552
552
  }
553
553
  deleteOrder(id) {
554
554
  return this.http.delete(`orders/${id}`);
@@ -660,15 +660,15 @@ var CartsResource = class {
660
660
  constructor(http) {
661
661
  this.http = http;
662
662
  }
663
- get() {
664
- return this.http.get("cart");
663
+ get(provider) {
664
+ return this.http.get(provider ? `cart?provider=${provider}` : "cart");
665
665
  }
666
- add(type, id, quantity = 1, configuration) {
666
+ add(type, id, quantity = 1, options) {
667
667
  return this.http.post("cart/add", {
668
668
  id,
669
669
  type,
670
670
  quantity,
671
- configuration
671
+ ...options
672
672
  });
673
673
  }
674
674
  remove(type, id) {
@@ -690,6 +690,9 @@ var CartsResource = class {
690
690
  applyCoupon(code) {
691
691
  return this.http.post("cart/coupon", { code });
692
692
  }
693
+ removeCoupon() {
694
+ return this.http.post("cart/coupon/remove");
695
+ }
693
696
  };
694
697
  //#endregion
695
698
  //#region src/resources/coupons.ts
@@ -701,6 +704,9 @@ var CouponsResource = class {
701
704
  const qs = options?.public ? `?team=${encodeURIComponent(team)}` : "";
702
705
  return this.http.get(`coupons${qs}`, options?.public ? {} : { headers: { "X-Team": team } });
703
706
  }
707
+ get(id) {
708
+ return this.http.get(`coupons/${id}`);
709
+ }
704
710
  create(team, data) {
705
711
  return this.http.post("coupons", data, { headers: { "X-Team": team } });
706
712
  }
@@ -735,6 +741,8 @@ var ContactsResource = class {
735
741
  if (params?.search) query.set("filter[search]", params.search);
736
742
  if (params?.page) query.set("page", String(params.page));
737
743
  if (params?.staleDays) query.set("filter[stale_days]", String(params.staleDays));
744
+ if (params?.waitingOn) query.set("filter[waiting_on]", "1");
745
+ if (params?.overdue) query.set("filter[followup_overdue]", "1");
738
746
  const qs = query.toString();
739
747
  return this.http.get(`contacts${qs ? "?" + qs : ""}`);
740
748
  }
@@ -1274,6 +1282,22 @@ var StoreResource = class {
1274
1282
  earningsBalance(teamSlug) {
1275
1283
  return this.http.get(`earnings/balance?team=${teamSlug}`);
1276
1284
  }
1285
+ payouts(teamSlug, page = 1) {
1286
+ return this.http.get(`payouts?team=${teamSlug}&page=${page}`);
1287
+ }
1288
+ requestPayout(teamSlug) {
1289
+ return this.http.post("payouts", { team: teamSlug });
1290
+ }
1291
+ payoutAddress(teamSlug) {
1292
+ return this.http.get(`payouts/payout-address?team=${teamSlug}`);
1293
+ }
1294
+ updatePayoutAddress(teamSlug, address, chain) {
1295
+ return this.http.put("payouts/payout-address", {
1296
+ team: teamSlug,
1297
+ payoutAddress: address,
1298
+ payoutChain: chain
1299
+ });
1300
+ }
1277
1301
  commissions(teamSlug) {
1278
1302
  return this.http.get(`billing/commissions?team=${encodeURIComponent(teamSlug)}`);
1279
1303
  }
@@ -1303,36 +1327,55 @@ var MediaResource = class {
1303
1327
  return this.http.get(`media/public${qs ? "?" + qs : ""}`);
1304
1328
  }
1305
1329
  upload(data) {
1306
- const formData = new FormData();
1307
- formData.append("file", data.file, data.file.name);
1308
- formData.append("type", data.type);
1309
- if (data.label) formData.append("label", data.label);
1310
- if (data.tags) data.tags.forEach((t) => formData.append("tags[]", t));
1311
- if (data.copyright) formData.append("copyright", data.copyright);
1312
- return this.http.post("media", formData, { headers: { "X-Team": data.team } });
1313
- }
1314
- listTeam(team, params) {
1330
+ const { team, file, fileUrl, fileName, mimeType, type, aspect, label, tags, copyright } = data;
1331
+ if (file) {
1332
+ const formData = new FormData();
1333
+ formData.append("file", file, file.name);
1334
+ formData.append("type", type);
1335
+ if (aspect) formData.append("aspect", aspect);
1336
+ if (label) formData.append("label", label);
1337
+ if (tags) tags.forEach((t) => formData.append("tags[]", t));
1338
+ if (copyright) formData.append("copyright", copyright);
1339
+ return this.http.post("media", formData, { headers: { "X-Team": team } });
1340
+ }
1341
+ return this.http.post("media", {
1342
+ fileUrl,
1343
+ fileName,
1344
+ mimeType,
1345
+ type,
1346
+ aspect,
1347
+ label,
1348
+ tags,
1349
+ copyright
1350
+ }, { headers: { "X-Team": team } });
1351
+ }
1352
+ list(team, params) {
1315
1353
  const query = new URLSearchParams();
1316
1354
  query.set("page", String(params?.page ?? 1));
1317
1355
  if (params?.mime) query.set("mime", params.mime);
1318
- return this.http.get(`teams/${team}/media?${query.toString()}`);
1356
+ return this.http.get(`media?${query.toString()}`, { headers: { "X-Team": team } });
1319
1357
  }
1320
- uploadTeam(team, media, tags, options) {
1321
- return this.http.post(`teams/${team}/media/upload`, {
1322
- media,
1323
- tags,
1324
- preserveOriginal: options?.preserveOriginal,
1325
- copyright: options?.copyright
1326
- });
1358
+ get(team, mediaId) {
1359
+ return this.http.get(`media/${mediaId}`, { headers: { "X-Team": team } });
1360
+ }
1361
+ delete(team, mediaId) {
1362
+ return this.http.delete(`media/${mediaId}`, { headers: { "X-Team": team } });
1327
1363
  }
1328
- deleteTeam(team, mediaId) {
1329
- return this.http.delete(`teams/${team}/media/${mediaId}`);
1364
+ update(team, mediaId, data) {
1365
+ return this.http.put(`media/${mediaId}`, data, { headers: { "X-Team": team } });
1330
1366
  }
1331
- updateTeamMedia(team, mediaId, data) {
1332
- return this.http.put(`teams/${team}/media/${mediaId}`, data);
1367
+ updateTags(team, mediaId, tags) {
1368
+ return this.http.put(`media/${mediaId}/tags`, { tags }, { headers: { "X-Team": team } });
1333
1369
  }
1334
- updateTeamMediaTags(team, mediaId, tags) {
1335
- return this.http.put(`teams/${team}/media/${mediaId}/tags`, { tags });
1370
+ /** Download the stored bytes of a media item as a File (used to re-edit existing images). */
1371
+ async download(team, mediaId, name, mime) {
1372
+ const url = `${this.http.baseUrl}/media/${mediaId}/download`;
1373
+ const headers = { "X-Team": team };
1374
+ if (this.http.authToken) headers["Authorization"] = `Bearer ${this.http.authToken}`;
1375
+ const res = await fetch(url, { headers });
1376
+ if (!res.ok) throw new Error(`Failed to download media (${res.status})`);
1377
+ const blob = await res.blob();
1378
+ return new File([blob], name, { type: mime });
1336
1379
  }
1337
1380
  };
1338
1381
  //#endregion
@@ -2015,6 +2058,16 @@ var TeamsResource = class {
2015
2058
  updateSetting(teamSlug, key, value) {
2016
2059
  return this.http.put(`teams/${teamSlug}/settings/${key}`, { value });
2017
2060
  }
2061
+ searchPlaces(teamSlug, query, options) {
2062
+ const params = new URLSearchParams({ query });
2063
+ if (options?.language) params.set("language", options.language);
2064
+ if (options?.region) params.set("region", options.region);
2065
+ if (options?.limit) params.set("limit", String(options.limit));
2066
+ return this.http.get(`teams/${teamSlug}/places?${params}`);
2067
+ }
2068
+ selectPlace(teamSlug, sourceId) {
2069
+ return this.http.put(`teams/${teamSlug}/place`, { sourceId });
2070
+ }
2018
2071
  listPrivate() {
2019
2072
  return this.http.get("teams?me=true");
2020
2073
  }
@@ -2055,6 +2108,15 @@ var CampaignsResource = class {
2055
2108
  create(payload) {
2056
2109
  return this.http.post("campaigns", payload);
2057
2110
  }
2111
+ update(id, payload) {
2112
+ return this.http.put(`campaigns/${id}`, payload);
2113
+ }
2114
+ submitForApproval(id) {
2115
+ return this.http.post(`campaigns/${id}/submit`);
2116
+ }
2117
+ refreshApproval(id) {
2118
+ return this.http.post(`campaigns/${id}/refresh`);
2119
+ }
2058
2120
  send(id) {
2059
2121
  return this.http.post(`campaigns/${id}/send`);
2060
2122
  }
@@ -2178,12 +2240,6 @@ var UsersResource = class {
2178
2240
  deleteMe() {
2179
2241
  return this.http.post("me/request-delete");
2180
2242
  }
2181
- updatePayoutAddress(address, chain) {
2182
- return this.http.put("me/payout-address", {
2183
- payoutAddress: address,
2184
- payoutChain: chain
2185
- });
2186
- }
2187
2243
  getAffiliate(code) {
2188
2244
  return this.http.get(`affiliates/${code}`);
2189
2245
  }
@@ -2197,15 +2253,6 @@ var UsersResource = class {
2197
2253
  application
2198
2254
  });
2199
2255
  }
2200
- getEarnings(page) {
2201
- return this.http.get(`earnings?page=${page}`);
2202
- }
2203
- getPayouts(page) {
2204
- return this.http.get(`payouts?page=${page}`);
2205
- }
2206
- requestPayout() {
2207
- return this.http.post("payouts");
2208
- }
2209
2256
  };
2210
2257
  //#endregion
2211
2258
  //#region src/resources/voice.ts
@@ -2327,15 +2374,19 @@ var WarpsResource = class {
2327
2374
  destroy(identifier) {
2328
2375
  return this.http.delete(`warps/${identifier}`);
2329
2376
  }
2330
- execute(identifier, inputs, room) {
2377
+ execute(identifier, inputs, room, context) {
2331
2378
  return this.http.post(`warps/${identifier}/execute`, {
2332
2379
  inputs,
2333
- ...room ? { room } : {}
2380
+ ...room ? { room } : {},
2381
+ ...context ? { context } : {}
2334
2382
  });
2335
2383
  }
2336
2384
  executions(identifier, page = 1, perPage = 20) {
2337
2385
  return this.http.get(`warps/${identifier}/executions?page=${page}&perPage=${perPage}`);
2338
2386
  }
2387
+ results(identifier, page = 1, perPage = 50) {
2388
+ return this.http.get(`warps/${identifier}/results?page=${page}&perPage=${perPage}`);
2389
+ }
2339
2390
  ensureLink(identifier) {
2340
2391
  return this.http.post(`warps/${identifier}/link`, {});
2341
2392
  }
@@ -2568,6 +2619,7 @@ var JoAiClient = class {
2568
2619
  const headers = {};
2569
2620
  if (config.team) headers["X-Team"] = config.team;
2570
2621
  if (config.agentAuthKey) headers["X-Agent-Auth-Key"] = config.agentAuthKey;
2622
+ if (config.buildSecret) headers["X-Build-Secret"] = config.buildSecret;
2571
2623
  const http = new HttpService(`${apiBaseUrl}/v1`, void 0, config.apiToken, {
2572
2624
  headers,
2573
2625
  csrfBaseUrl: apiBaseUrl
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/sdk",
3
- "version": "1.4.1",
3
+ "version": "2.1.0",
4
4
  "description": "JoAi public API SDK — build with your AI agents",
5
5
  "license": "MIT",
6
6
  "type": "module",