@joai/sdk 0.11.0 → 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.
- package/dist/index.d.mts +18 -8
- package/dist/index.mjs +5 -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;
|
|
@@ -1078,7 +1083,12 @@ declare class OrdersResource {
|
|
|
1078
1083
|
constructor(http: IHttpService);
|
|
1079
1084
|
create(data: {
|
|
1080
1085
|
contactId: string;
|
|
1081
|
-
|
|
1086
|
+
notes?: string;
|
|
1087
|
+
items: {
|
|
1088
|
+
id: string;
|
|
1089
|
+
type: 'product' | 'service';
|
|
1090
|
+
quantity: number;
|
|
1091
|
+
}[];
|
|
1082
1092
|
}): Promise<IAppResponse<Order>>;
|
|
1083
1093
|
}
|
|
1084
1094
|
//#endregion
|
|
@@ -1237,7 +1247,7 @@ declare class WarpsResource {
|
|
|
1237
1247
|
id: string;
|
|
1238
1248
|
}>>;
|
|
1239
1249
|
destroy(identifier: string): Promise<IAppResponse<unknown>>;
|
|
1240
|
-
execute(identifier: string, inputs:
|
|
1250
|
+
execute(identifier: string, inputs: string[], room?: string): Promise<IAppResponse<any>>;
|
|
1241
1251
|
}
|
|
1242
1252
|
//#endregion
|
|
1243
1253
|
//#region src/resources/subscriptions.d.ts
|
|
@@ -1330,4 +1340,4 @@ declare class DistributionResource {
|
|
|
1330
1340
|
private fetchDistribution;
|
|
1331
1341
|
}
|
|
1332
1342
|
//#endregion
|
|
1333
|
-
export { BlueprintsResource, type CacheConfig, CachedHttpService, DistributionResource, FlowsResource, IngestionsResource, JoAiClient, type JoAiClientConfig, MarketplaceResource, MeetingsResource, type Order,
|
|
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/dist/index.mjs
CHANGED
|
@@ -592,8 +592,11 @@ var WarpsResource = class {
|
|
|
592
592
|
destroy(identifier) {
|
|
593
593
|
return this.http.delete(`warps/${identifier}`);
|
|
594
594
|
}
|
|
595
|
-
execute(identifier, inputs) {
|
|
596
|
-
return this.http.post(`warps/${identifier}/execute`, {
|
|
595
|
+
execute(identifier, inputs, room) {
|
|
596
|
+
return this.http.post(`warps/${identifier}/execute`, {
|
|
597
|
+
inputs,
|
|
598
|
+
...room ? { room } : {}
|
|
599
|
+
});
|
|
597
600
|
}
|
|
598
601
|
};
|
|
599
602
|
//#endregion
|