@joai/sdk 0.11.1 → 0.12.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.
Files changed (2) hide show
  1. package/dist/index.d.mts +16 -7
  2. package/package.json +1 -1
package/dist/index.d.mts CHANGED
@@ -180,8 +180,15 @@ type ProductRelation = {
180
180
  position: number;
181
181
  variations: ProductVariation[];
182
182
  };
183
+ type VolumePrice = {
184
+ id: number;
185
+ minQty: number;
186
+ maxQty: number | null;
187
+ unitPrice: number;
188
+ };
183
189
  type ProductVariation = {
184
190
  resource?: 'product-variation';
191
+ id?: string;
185
192
  sku: string;
186
193
  name: TranslatableValue;
187
194
  type?: ProductVariationType | null;
@@ -194,6 +201,7 @@ type ProductVariation = {
194
201
  active?: boolean;
195
202
  hidden?: boolean;
196
203
  availableAt?: string | null;
204
+ order?: number | null;
197
205
  pieces?: ProductPieces | null;
198
206
  discount?: ProductDiscount | null;
199
207
  product?: Product;
@@ -217,6 +225,8 @@ type Product = {
217
225
  variations: ProductVariation[];
218
226
  relatedProducts?: ProductRelation[];
219
227
  rating?: ProductRating;
228
+ settings?: Record<string, unknown> | null;
229
+ volumePrices?: VolumePrice[];
220
230
  };
221
231
  type Team = {
222
232
  slug: string;
@@ -1061,11 +1071,6 @@ declare class MemoriesResource {
1061
1071
  }
1062
1072
  //#endregion
1063
1073
  //#region src/resources/orders.d.ts
1064
- type OrderItem = {
1065
- id: string;
1066
- type: 'product' | 'service';
1067
- quantity: number;
1068
- };
1069
1074
  type Order = {
1070
1075
  id: string;
1071
1076
  total: number;
@@ -1079,7 +1084,11 @@ declare class OrdersResource {
1079
1084
  create(data: {
1080
1085
  contactId: string;
1081
1086
  notes?: string;
1082
- items: OrderItem[];
1087
+ items: {
1088
+ id: string;
1089
+ type: 'product' | 'service';
1090
+ quantity: number;
1091
+ }[];
1083
1092
  }): Promise<IAppResponse<Order>>;
1084
1093
  }
1085
1094
  //#endregion
@@ -1331,4 +1340,4 @@ declare class DistributionResource {
1331
1340
  private fetchDistribution;
1332
1341
  }
1333
1342
  //#endregion
1334
- export { BlueprintsResource, type CacheConfig, CachedHttpService, DistributionResource, FlowsResource, IngestionsResource, JoAiClient, type JoAiClientConfig, MarketplaceResource, MeetingsResource, type Order, type OrderItem, OrdersResource, type Product, type ProductVariation, ProductsResource, ServicesResource, SitesResource, SkillsResource, StoresResource, SubscriptionsResource, createClient };
1343
+ export { BlueprintsResource, type CacheConfig, CachedHttpService, DistributionResource, FlowsResource, IngestionsResource, JoAiClient, type JoAiClientConfig, MarketplaceResource, MeetingsResource, type Order, OrdersResource, type Product, type ProductVariation, ProductsResource, ServicesResource, SitesResource, SkillsResource, StoresResource, SubscriptionsResource, createClient };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@joai/sdk",
3
- "version": "0.11.1",
3
+ "version": "0.12.0",
4
4
  "description": "JoAi public API SDK — build with your AI agents",
5
5
  "license": "MIT",
6
6
  "type": "module",