@cimplify/sdk 0.29.0 → 0.31.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/advanced.d.mts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/{chunk-REXW2PET.mjs → chunk-46BDUSJX.mjs} +46 -1
- package/dist/{chunk-R4AKAGZQ.js → chunk-6HCBOIZ4.js} +46 -0
- package/dist/{index-Cjfczg2W.d.ts → index-BHVJgyqM.d.ts} +2 -2
- package/dist/{index-DijjnO-u.d.mts → index-BpyFcJVv.d.ts} +92 -15
- package/dist/{index-D4-b5OZO.d.mts → index-D4oNCc37.d.mts} +2 -2
- package/dist/{index-DwvzjdGi.d.ts → index-m8zGQUda.d.mts} +92 -15
- package/dist/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +17 -13
- package/dist/index.mjs +1 -1
- package/dist/{payment-BeLHpQMo.d.ts → payment-DnU_eLuT.d.mts} +19 -3
- package/dist/{payment-BeLHpQMo.d.mts → payment-DnU_eLuT.d.ts} +19 -3
- package/dist/{price-Dvl1p9AM.d.mts → price-D-hso3np.d.mts} +1 -1
- package/dist/{price-C6gfys5B.d.ts → price-DUVmRTaz.d.ts} +1 -1
- package/dist/react.d.mts +54 -4
- package/dist/react.d.ts +54 -4
- package/dist/react.js +741 -69
- package/dist/react.mjs +696 -26
- package/dist/styles.css +1 -1
- package/dist/utils.d.mts +3 -3
- package/dist/utils.d.ts +3 -3
- package/package.json +1 -1
- package/registry/chat-widget.json +15 -0
- package/registry/index.json +9 -0
- package/registry/product-customizer.json +1 -1
- package/registry/schedule-service-card.json +1 -1
- package/registry/service-product-layout.json +1 -1
- package/registry/subscription-card.json +1 -1
package/dist/advanced.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, l as CheckoutOperations, l as CheckoutService,
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, l as CheckoutOperations, l as CheckoutService, a7 as CimplifyElement, a6 as CimplifyElements, ab as ELEMENT_TYPES, aa as EVENT_TYPES, af as ElementEventType, ad as ElementOptions, ae as ElementType, ac as ElementsOptions, F as FetchQuoteInput, s as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, r as LiteService, a9 as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, q as SchedulingService, a8 as createElements, m as generateIdempotencyKey } from './index-m8zGQUda.mjs';
|
|
2
|
+
import './payment-DnU_eLuT.mjs';
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, l as CheckoutOperations, l as CheckoutService,
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, j as CartOperations, b as CatalogueQueries, l as CheckoutOperations, l as CheckoutService, a7 as CimplifyElement, a6 as CimplifyElements, ab as ELEMENT_TYPES, aa as EVENT_TYPES, af as ElementEventType, ad as ElementOptions, ae as ElementType, ac as ElementsOptions, F as FetchQuoteInput, s as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, r as LiteService, a9 as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, i as RefreshQuoteResult, q as SchedulingService, a8 as createElements, m as generateIdempotencyKey } from './index-BpyFcJVv.js';
|
|
2
|
+
import './payment-DnU_eLuT.js';
|
|
@@ -188,6 +188,36 @@ var DeliveryService = class {
|
|
|
188
188
|
}
|
|
189
189
|
};
|
|
190
190
|
|
|
191
|
+
// src/support.ts
|
|
192
|
+
var SupportService = class {
|
|
193
|
+
constructor(client) {
|
|
194
|
+
this.client = client;
|
|
195
|
+
}
|
|
196
|
+
/** Open (or resume) the customer's widget conversation. */
|
|
197
|
+
async openConversation() {
|
|
198
|
+
return safe(
|
|
199
|
+
this.client.post("/api/v1/support/conversation")
|
|
200
|
+
);
|
|
201
|
+
}
|
|
202
|
+
/** Send a message in the active conversation. */
|
|
203
|
+
async sendMessage(content) {
|
|
204
|
+
return safe(
|
|
205
|
+
this.client.post("/api/v1/support/conversation/messages", {
|
|
206
|
+
content
|
|
207
|
+
})
|
|
208
|
+
);
|
|
209
|
+
}
|
|
210
|
+
/** Poll for new messages since the given cursor. */
|
|
211
|
+
async getMessages(options = {}) {
|
|
212
|
+
const params = new URLSearchParams();
|
|
213
|
+
if (options.after) params.set("after", options.after);
|
|
214
|
+
if (options.limit) params.set("limit", String(options.limit));
|
|
215
|
+
const query = params.toString();
|
|
216
|
+
const path = query ? `/api/v1/support/conversation/messages?${query}` : "/api/v1/support/conversation/messages";
|
|
217
|
+
return safe(this.client.get(path));
|
|
218
|
+
}
|
|
219
|
+
};
|
|
220
|
+
|
|
191
221
|
// src/client.ts
|
|
192
222
|
var ACCESS_TOKEN_STORAGE_KEY = "cimplify_access_token";
|
|
193
223
|
var SESSION_TOKEN_STORAGE_KEY = "cimplify_session_token";
|
|
@@ -807,6 +837,21 @@ var CimplifyClient = class {
|
|
|
807
837
|
}
|
|
808
838
|
return this._delivery;
|
|
809
839
|
}
|
|
840
|
+
get support() {
|
|
841
|
+
if (!this._support) {
|
|
842
|
+
this._support = new SupportService(this);
|
|
843
|
+
}
|
|
844
|
+
return this._support;
|
|
845
|
+
}
|
|
846
|
+
buildWsUrl(path) {
|
|
847
|
+
const protocol = this.baseUrl.startsWith("https") ? "wss:" : "ws:";
|
|
848
|
+
const host = this.baseUrl.replace(/^https?:\/\//, "");
|
|
849
|
+
const params = new URLSearchParams();
|
|
850
|
+
if (this.publicKey) params.set("api_key", this.publicKey);
|
|
851
|
+
if (this.sessionToken) params.set("session_token", this.sessionToken);
|
|
852
|
+
const query = params.toString();
|
|
853
|
+
return `${protocol}//${host}${path}${query ? `?${query}` : ""}`;
|
|
854
|
+
}
|
|
810
855
|
elements(businessId, options) {
|
|
811
856
|
if (businessId) {
|
|
812
857
|
this.setBusinessId(businessId);
|
|
@@ -900,4 +945,4 @@ var INPUT_FIELD_TYPE = {
|
|
|
900
945
|
Location: "location"
|
|
901
946
|
};
|
|
902
947
|
|
|
903
|
-
export { ActivityService, CimplifyClient, DURATION_UNIT, DeliveryService, INPUT_FIELD_TYPE, PRODUCT_TYPE, PlacesService, RENDER_HINT, SubscriptionService, UploadService, createCimplifyClient, getVariantDisplayName };
|
|
948
|
+
export { ActivityService, CimplifyClient, DURATION_UNIT, DeliveryService, INPUT_FIELD_TYPE, PRODUCT_TYPE, PlacesService, RENDER_HINT, SubscriptionService, SupportService, UploadService, createCimplifyClient, getVariantDisplayName };
|
|
@@ -190,6 +190,36 @@ var DeliveryService = class {
|
|
|
190
190
|
}
|
|
191
191
|
};
|
|
192
192
|
|
|
193
|
+
// src/support.ts
|
|
194
|
+
var SupportService = class {
|
|
195
|
+
constructor(client) {
|
|
196
|
+
this.client = client;
|
|
197
|
+
}
|
|
198
|
+
/** Open (or resume) the customer's widget conversation. */
|
|
199
|
+
async openConversation() {
|
|
200
|
+
return chunk2CGA3MUW_js.safe(
|
|
201
|
+
this.client.post("/api/v1/support/conversation")
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
/** Send a message in the active conversation. */
|
|
205
|
+
async sendMessage(content) {
|
|
206
|
+
return chunk2CGA3MUW_js.safe(
|
|
207
|
+
this.client.post("/api/v1/support/conversation/messages", {
|
|
208
|
+
content
|
|
209
|
+
})
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
/** Poll for new messages since the given cursor. */
|
|
213
|
+
async getMessages(options = {}) {
|
|
214
|
+
const params = new URLSearchParams();
|
|
215
|
+
if (options.after) params.set("after", options.after);
|
|
216
|
+
if (options.limit) params.set("limit", String(options.limit));
|
|
217
|
+
const query = params.toString();
|
|
218
|
+
const path = query ? `/api/v1/support/conversation/messages?${query}` : "/api/v1/support/conversation/messages";
|
|
219
|
+
return chunk2CGA3MUW_js.safe(this.client.get(path));
|
|
220
|
+
}
|
|
221
|
+
};
|
|
222
|
+
|
|
193
223
|
// src/client.ts
|
|
194
224
|
var ACCESS_TOKEN_STORAGE_KEY = "cimplify_access_token";
|
|
195
225
|
var SESSION_TOKEN_STORAGE_KEY = "cimplify_session_token";
|
|
@@ -809,6 +839,21 @@ var CimplifyClient = class {
|
|
|
809
839
|
}
|
|
810
840
|
return this._delivery;
|
|
811
841
|
}
|
|
842
|
+
get support() {
|
|
843
|
+
if (!this._support) {
|
|
844
|
+
this._support = new SupportService(this);
|
|
845
|
+
}
|
|
846
|
+
return this._support;
|
|
847
|
+
}
|
|
848
|
+
buildWsUrl(path) {
|
|
849
|
+
const protocol = this.baseUrl.startsWith("https") ? "wss:" : "ws:";
|
|
850
|
+
const host = this.baseUrl.replace(/^https?:\/\//, "");
|
|
851
|
+
const params = new URLSearchParams();
|
|
852
|
+
if (this.publicKey) params.set("api_key", this.publicKey);
|
|
853
|
+
if (this.sessionToken) params.set("session_token", this.sessionToken);
|
|
854
|
+
const query = params.toString();
|
|
855
|
+
return `${protocol}//${host}${path}${query ? `?${query}` : ""}`;
|
|
856
|
+
}
|
|
812
857
|
elements(businessId, options) {
|
|
813
858
|
if (businessId) {
|
|
814
859
|
this.setBusinessId(businessId);
|
|
@@ -911,6 +956,7 @@ exports.PRODUCT_TYPE = PRODUCT_TYPE;
|
|
|
911
956
|
exports.PlacesService = PlacesService;
|
|
912
957
|
exports.RENDER_HINT = RENDER_HINT;
|
|
913
958
|
exports.SubscriptionService = SubscriptionService;
|
|
959
|
+
exports.SupportService = SupportService;
|
|
914
960
|
exports.UploadService = UploadService;
|
|
915
961
|
exports.createCimplifyClient = createCimplifyClient;
|
|
916
962
|
exports.getVariantDisplayName = getVariantDisplayName;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Money, a as CurrencyCode,
|
|
2
|
-
import { P as ProductWithPrice } from './price-
|
|
1
|
+
import { M as Money, a as CurrencyCode, b5 as PricePathTaxInfo, a3 as QuantityPricingTier, O as Product, a5 as ProductWithDetails, bS as PaymentErrorDetails, bQ as PaymentResponse, bR as PaymentStatusResponse } from './payment-DnU_eLuT.js';
|
|
2
|
+
import { P as ProductWithPrice } from './price-DUVmRTaz.js';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
4
|
|
|
5
5
|
declare const CURRENCY_SYMBOLS: Record<string, string>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ak as Category, O as Product, ag as AddOnWithOptions, d as Pagination, h as CimplifyError, a5 as ProductWithDetails, a7 as ProductVariant, a9 as VariantAxis, ae as VariantAxisSelection, af as AddOn, am as Collection, ar as BundleSummary, aq as Bundle, aD as Composite, aK as ComponentSelectionInput, aL as CompositePriceResult, C as ChosenPrice, aS as ProductTaxonomy, aT as TaxonomyWithChildren, bY as EligiblePlansQuery, bX as ProductBillingPlan, aR as ProductTimeProfile, aU as ProductAvailabilityNow, aW as Deal, aX as ProductDealInfo, aY as DiscountValidation, a_ as TagsResponse, F as CustomAttributeDefinition, G as CustomAttributeValue, K as PropertyFacet, T as TaxonomyAttributeTemplate, N as KnowledgeArticle, bC as UICart, bn as Cart, bo as CartItem, bG as CartSummary, bE as AddToCartInput, bF as UpdateCartItemInput, ba as DiscountDetails, M as Money, a as CurrencyCode, bm as LineConfiguration, bL as AuthorizationType, bN as PaymentMethod, bP as InitializePaymentResult, bT as SubmitAuthorizationInput, bR as PaymentStatusResponse, S as SchedulingMode, t as DurationUnit, b$ as Subscription, c2 as SubscriptionWithDetails } from './payment-DnU_eLuT.js';
|
|
2
2
|
|
|
3
3
|
interface RequestContext {
|
|
4
4
|
method: "GET" | "POST" | "PATCH" | "DELETE";
|
|
@@ -292,7 +292,7 @@ type OrderStatus = "pending" | "created" | "confirmed" | "in_preparation" | "rea
|
|
|
292
292
|
type PaymentState = "not_paid" | "paid" | "partially_refunded" | "refunded";
|
|
293
293
|
type OrderChannel = "qr" | "taker" | "staff" | "web" | "dashboard" | "tap" | "chat";
|
|
294
294
|
type LineType = "product" | "service" | "bundle" | "composite" | "digital";
|
|
295
|
-
type OrderLineState = "pending" | "in_preparation" | "ready" | "served" | "completed" | {
|
|
295
|
+
type OrderLineState = "pending" | "in_preparation" | "checked_out" | "ready" | "served" | "completed" | {
|
|
296
296
|
partially_served: {
|
|
297
297
|
served_quantity: number;
|
|
298
298
|
};
|
|
@@ -309,7 +309,7 @@ interface OrderLineStatus {
|
|
|
309
309
|
last_modified: string;
|
|
310
310
|
modified_by: string;
|
|
311
311
|
}
|
|
312
|
-
type FulfillmentType = "
|
|
312
|
+
type FulfillmentType = "booking" | "shipment" | "order" | "digital";
|
|
313
313
|
type FulfillmentStatus = "pending" | "in_progress" | "completed" | "cancelled";
|
|
314
314
|
interface FulfillmentLink {
|
|
315
315
|
fulfillment_type: FulfillmentType;
|
|
@@ -527,7 +527,7 @@ interface RefundOrderInput {
|
|
|
527
527
|
amount?: Money;
|
|
528
528
|
reason?: string;
|
|
529
529
|
}
|
|
530
|
-
type ServiceStatus = "awaiting_scheduling" | "scheduled" | "deposit_paid" | "confirmed" | "in_progress" | "completed" | "rescheduled" | "no_show" | "cancelled";
|
|
530
|
+
type ServiceStatus = "awaiting_scheduling" | "scheduled" | "deposit_paid" | "confirmed" | "in_progress" | "checked_in" | "checked_out" | "overstay" | "completed" | "rescheduled" | "no_show" | "cancelled";
|
|
531
531
|
type StaffRole = "primary" | "assistant" | "specialist" | "supervisor";
|
|
532
532
|
type ReminderMethod = "sms" | "email" | "push" | "call" | "whatsapp";
|
|
533
533
|
interface CustomerServicePreferences {
|
|
@@ -557,13 +557,15 @@ interface ReminderSettings {
|
|
|
557
557
|
custom_reminder_message?: string;
|
|
558
558
|
}
|
|
559
559
|
interface CancellationPolicy {
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
560
|
+
cancellation_window_minutes: number;
|
|
561
|
+
no_show_deadline_minutes?: number;
|
|
562
|
+
cancellation_notice_days?: number;
|
|
563
|
+
no_show_fee: Money;
|
|
564
|
+
partial_refund_percentage: number;
|
|
565
|
+
max_free_reschedules: number;
|
|
566
|
+
reschedule_fee: Money;
|
|
567
|
+
early_termination_fee?: Money;
|
|
568
|
+
pro_rata_refund: boolean;
|
|
567
569
|
}
|
|
568
570
|
interface ServiceNotes {
|
|
569
571
|
preparation_notes?: string;
|
|
@@ -633,7 +635,7 @@ interface StaffScheduleItem {
|
|
|
633
635
|
service_status: ServiceStatus;
|
|
634
636
|
notes?: string;
|
|
635
637
|
}
|
|
636
|
-
interface
|
|
638
|
+
interface LocationBooking {
|
|
637
639
|
line_item_id: string;
|
|
638
640
|
order_id: string;
|
|
639
641
|
customer_name: string;
|
|
@@ -1433,6 +1435,8 @@ interface Service {
|
|
|
1433
1435
|
name: string;
|
|
1434
1436
|
description?: string;
|
|
1435
1437
|
price?: Money;
|
|
1438
|
+
scheduling_mode?: SchedulingMode;
|
|
1439
|
+
duration_value?: number;
|
|
1436
1440
|
duration_minutes: number;
|
|
1437
1441
|
duration_unit?: DurationUnit;
|
|
1438
1442
|
image_url?: string | null;
|
|
@@ -1488,7 +1492,7 @@ interface DayAvailability {
|
|
|
1488
1492
|
slots: TimeSlot[];
|
|
1489
1493
|
has_availability: boolean;
|
|
1490
1494
|
}
|
|
1491
|
-
type BookingStatus = "pending" | "confirmed" | "in_progress" | "completed" | "cancelled" | "no_show" | string;
|
|
1495
|
+
type BookingStatus = "booked" | "assigned" | "pending" | "confirmed" | "in_progress" | "checked_in" | "checked_out" | "overstay" | "completed" | "cancelled" | "no_show" | string;
|
|
1492
1496
|
interface Booking {
|
|
1493
1497
|
id: string;
|
|
1494
1498
|
service_name: string;
|
|
@@ -1570,9 +1574,10 @@ interface CancelBookingInput {
|
|
|
1570
1574
|
interface CancelBookingResult {
|
|
1571
1575
|
message: string;
|
|
1572
1576
|
}
|
|
1577
|
+
type BookingModificationType = "reschedule" | "extend" | "shorten" | "early_checkout";
|
|
1573
1578
|
interface RescheduleBookingResult {
|
|
1574
1579
|
success: boolean;
|
|
1575
|
-
|
|
1580
|
+
booking_id: string;
|
|
1576
1581
|
old_time: {
|
|
1577
1582
|
start: string;
|
|
1578
1583
|
end: string;
|
|
@@ -1596,11 +1601,33 @@ interface ServiceAvailabilityParams {
|
|
|
1596
1601
|
interface ServiceAvailabilityResult {
|
|
1597
1602
|
service_id: string;
|
|
1598
1603
|
location_id: string;
|
|
1604
|
+
scheduling_mode: SchedulingMode;
|
|
1605
|
+
duration_unit: string;
|
|
1606
|
+
duration_value: number;
|
|
1599
1607
|
start_date: string;
|
|
1600
1608
|
end_date: string;
|
|
1601
1609
|
participant_count: number;
|
|
1602
1610
|
availability: DayAvailability[];
|
|
1603
1611
|
}
|
|
1612
|
+
interface RescheduleHistoryRecord {
|
|
1613
|
+
id: string;
|
|
1614
|
+
booking_id: string;
|
|
1615
|
+
order_id: string;
|
|
1616
|
+
order_item_id?: string | null;
|
|
1617
|
+
old_start_time: string;
|
|
1618
|
+
old_end_time: string;
|
|
1619
|
+
new_start_time: string;
|
|
1620
|
+
new_end_time: string;
|
|
1621
|
+
old_staff_id?: string | null;
|
|
1622
|
+
new_staff_id?: string | null;
|
|
1623
|
+
reason?: string | null;
|
|
1624
|
+
rescheduled_by: string;
|
|
1625
|
+
rescheduled_at: string;
|
|
1626
|
+
modification_type: BookingModificationType;
|
|
1627
|
+
reschedule_type: "customer" | "business" | "system";
|
|
1628
|
+
fee_applied: string | number;
|
|
1629
|
+
metadata?: Record<string, unknown> | null;
|
|
1630
|
+
}
|
|
1604
1631
|
|
|
1605
1632
|
declare class SchedulingService {
|
|
1606
1633
|
private client;
|
|
@@ -1847,6 +1874,53 @@ declare class DeliveryService {
|
|
|
1847
1874
|
getFee(dropoffLat: number, dropoffLng: number, country?: string): Promise<Result<DeliveryFeeResponse, CimplifyError>>;
|
|
1848
1875
|
}
|
|
1849
1876
|
|
|
1877
|
+
type SenderType = "customer" | "agent" | "system" | "bot";
|
|
1878
|
+
type ContentType = "text" | "image" | "video" | "audio" | "document" | "interactive";
|
|
1879
|
+
interface ChatMessage {
|
|
1880
|
+
id: string;
|
|
1881
|
+
sender_type: SenderType;
|
|
1882
|
+
content: string;
|
|
1883
|
+
content_type: ContentType;
|
|
1884
|
+
attachments: ChatAttachment[];
|
|
1885
|
+
metadata: Record<string, unknown>;
|
|
1886
|
+
created_at: string;
|
|
1887
|
+
}
|
|
1888
|
+
interface ChatAttachment {
|
|
1889
|
+
url: string;
|
|
1890
|
+
mime_type: string | null;
|
|
1891
|
+
filename: string | null;
|
|
1892
|
+
}
|
|
1893
|
+
interface ChatConversation {
|
|
1894
|
+
id: string;
|
|
1895
|
+
status: "open" | "assigned" | "waiting" | "resolved" | "closed";
|
|
1896
|
+
ai_enabled: boolean;
|
|
1897
|
+
message_count: number;
|
|
1898
|
+
created_at: string;
|
|
1899
|
+
last_message_at: string | null;
|
|
1900
|
+
}
|
|
1901
|
+
interface ChatConversationResponse {
|
|
1902
|
+
conversation: ChatConversation;
|
|
1903
|
+
messages: ChatMessage[];
|
|
1904
|
+
}
|
|
1905
|
+
interface ChatWidgetStarter {
|
|
1906
|
+
icon?: string;
|
|
1907
|
+
text: string;
|
|
1908
|
+
}
|
|
1909
|
+
|
|
1910
|
+
declare class SupportService {
|
|
1911
|
+
private client;
|
|
1912
|
+
constructor(client: CimplifyClient);
|
|
1913
|
+
/** Open (or resume) the customer's widget conversation. */
|
|
1914
|
+
openConversation(): Promise<Result<ChatConversationResponse, CimplifyError>>;
|
|
1915
|
+
/** Send a message in the active conversation. */
|
|
1916
|
+
sendMessage(content: string): Promise<Result<ChatMessage, CimplifyError>>;
|
|
1917
|
+
/** Poll for new messages since the given cursor. */
|
|
1918
|
+
getMessages(options?: {
|
|
1919
|
+
after?: string;
|
|
1920
|
+
limit?: number;
|
|
1921
|
+
}): Promise<Result<ChatMessage[], CimplifyError>>;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1850
1924
|
type OrderType = "delivery" | "pickup" | "dine_in";
|
|
1851
1925
|
declare const ELEMENT_TYPES: {
|
|
1852
1926
|
readonly AUTH: "auth";
|
|
@@ -2219,6 +2293,7 @@ declare class CimplifyClient {
|
|
|
2219
2293
|
private _fx?;
|
|
2220
2294
|
private _activity?;
|
|
2221
2295
|
private _delivery?;
|
|
2296
|
+
private _support?;
|
|
2222
2297
|
constructor(config?: CimplifyConfig);
|
|
2223
2298
|
getAccessToken(): string | null;
|
|
2224
2299
|
getPublicKey(): string;
|
|
@@ -2266,8 +2341,10 @@ declare class CimplifyClient {
|
|
|
2266
2341
|
get fx(): FxService;
|
|
2267
2342
|
get activity(): ActivityService;
|
|
2268
2343
|
get delivery(): DeliveryService;
|
|
2344
|
+
get support(): SupportService;
|
|
2345
|
+
buildWsUrl(path: string): string;
|
|
2269
2346
|
elements(businessId?: string, options?: ElementsOptions): CimplifyElements;
|
|
2270
2347
|
}
|
|
2271
2348
|
declare function createCimplifyClient(config?: CimplifyConfig): CimplifyClient;
|
|
2272
2349
|
|
|
2273
|
-
export {
|
|
2350
|
+
export { type ChatConversationResponse as $, AuthService as A, BusinessService as B, CimplifyClient as C, type PlaceDetailsResponse as D, type TrackCategoryViewOptions as E, type FetchQuoteInput as F, type GetProductsOptions as G, type SessionMessage as H, InventoryService as I, type SessionActivityData as J, type ActivityStateResponse as K, LinkService as L, type ActivityRecommendation as M, type ActivityRecommendationsResponse as N, OrderQueries as O, type PriceQuote as P, type QuoteCompositeSelectionInput as Q, type RefreshQuoteInput as R, SubscriptionService as S, type TrackProductViewOptions as T, type UpdateProfileInput as U, type DismissMessageResponse as V, DeliveryService as W, type DeliveryFeeResponse as X, SupportService as Y, type ChatMessage as Z, type ChatConversation as _, type CimplifyConfig as a, fromPromise as a$, type ChatAttachment as a0, type ChatWidgetStarter as a1, type SenderType as a2, type ContentType as a3, type LiteBootstrap as a4, type TableInfo as a5, CimplifyElements as a6, CimplifyElement as a7, createElements as a8, MESSAGE_TYPES as a9, PAYMENT_STATE as aA, PICKUP_TIME_TYPE as aB, MOBILE_MONEY_PROVIDER as aC, AUTHORIZATION_TYPE as aD, DEVICE_TYPE as aE, CONTACT_TYPE as aF, LINK_QUERY as aG, LINK_MUTATION as aH, AUTH_MUTATION as aI, CHECKOUT_MUTATION as aJ, PAYMENT_MUTATION as aK, ORDER_MUTATION as aL, DEFAULT_CURRENCY as aM, DEFAULT_COUNTRY as aN, type Result as aO, type Ok as aP, type Err as aQ, ok as aR, err as aS, isOk as aT, isErr as aU, mapResult as aV, mapError as aW, flatMap as aX, getOrElse as aY, unwrap as aZ, toNullable as a_, EVENT_TYPES as aa, ELEMENT_TYPES as ab, type ElementsOptions as ac, type ElementOptions as ad, type ElementType as ae, type ElementEventType as af, type CheckoutMode as ag, type CheckoutOrderType as ah, type CheckoutPaymentMethod as ai, type CheckoutStep as aj, type CheckoutFormData as ak, type CheckoutResult as al, type NextAction as am, type ProcessCheckoutOptions as an, type ProcessCheckoutResult as ao, type ProcessAndResolveOptions as ap, type CheckoutStatus as aq, type CheckoutStatusContext as ar, type AbortablePromise as as, type MobileMoneyProvider as at, type DeviceType as au, type ContactType as av, CHECKOUT_MODE as aw, ORDER_TYPE as ax, PAYMENT_METHOD as ay, CHECKOUT_STEP as az, CatalogueQueries as b, type TimeRange as b$, tryCatch as b0, combine as b1, combineObject as b2, type CatalogueResult as b3, type CatalogueSnapshot as b4, type OrderStatus as b5, type PaymentState as b6, type OrderChannel as b7, type LineType as b8, type OrderLineState as b9, type ReminderMethod as bA, type CustomerServicePreferences as bB, type BufferTimes as bC, type ReminderSettings as bD, type CancellationPolicy as bE, type ServiceNotes as bF, type PricingOverrides as bG, type SchedulingMetadata as bH, type StaffAssignment as bI, type ResourceAssignment as bJ, type SchedulingResult as bK, type DepositResult as bL, type ServiceScheduleRequest as bM, type StaffScheduleItem as bN, type LocationBooking as bO, type ProviderResolutionSource as bP, type DeliveryFeeDetails as bQ, type RelationType as bR, type RelatedProduct as bS, type RelatedCandidate as bT, type RelatedProductsEnrichment as bU, type BusinessType as bV, type BusinessPreferences as bW, type Business as bX, type LocationTaxBehavior as bY, type LocationTaxOverrides as bZ, type Location as b_, type OrderLineStatus as ba, type FulfillmentType as bb, type FulfillmentStatus as bc, type FulfillmentLink as bd, type OrderFulfillmentSummary as be, type FeeBearerType as bf, type AmountToPay as bg, type LineItem as bh, type Order as bi, type OrderHistory as bj, type OrderGroupStatus as bk, type OrderGroupPaymentState as bl, type OrderGroupPaymentStatus as bm, type OrderGroup as bn, type OrderGroupPayment as bo, type OrderSplitDetail as bp, type OrderGroupPaymentSummary as bq, type OrderGroupDetails as br, type OrderPaymentEvent as bs, type OrderFilter as bt, type CheckoutInput as bu, type UpdateOrderStatusInput as bv, type CancelOrderInput as bw, type RefundOrderInput as bx, type ServiceStatus as by, type StaffRole as bz, createCimplifyClient as c, type CheckoutAddressInfo as c$, type TimeRanges as c0, type LocationTimeProfile as c1, type Table as c2, type Room as c3, type ServiceCharge as c4, type StorefrontBootstrap as c5, type BusinessWithLocations as c6, type LocationWithDetails as c7, type BusinessSettings as c8, type BusinessHours as c9, type ProductStock as cA, type VariantStock as cB, type LocationStock as cC, type AvailabilityResult as cD, type Customer as cE, type CustomerAddress as cF, type CustomerMobileMoney as cG, type CustomerLinkPreferences as cH, type LinkData as cI, type CreateAddressInput as cJ, type UpdateAddressInput as cK, type CreateMobileMoneyInput as cL, type EnrollmentData as cM, type AddressData as cN, type MobileMoneyData as cO, type EnrollAndLinkOrderInput as cP, type LinkStatusResult as cQ, type LinkEnrollResult as cR, type EnrollAndLinkOrderResult as cS, type LinkSession as cT, type RevokeSessionResult as cU, type RevokeAllSessionsResult as cV, type RequestOtpInput as cW, type VerifyOtpInput as cX, type AuthResponse as cY, type PickupTimeType as cZ, type PickupTime as c_, type CategoryInfo as ca, type Service as cb, type Staff as cc, type TimeSlot as cd, type SlotResourceInfo as ce, type SlotStaffInfo as cf, type AvailableSlot as cg, type DayAvailability as ch, type BookingStatus as ci, type Booking as cj, type BookingWithDetails as ck, type CustomerBookingServiceItem as cl, type CustomerBooking as cm, type GetAvailableSlotsInput as cn, type CheckSlotAvailabilityInput as co, type CheckSlotAvailabilityResult as cp, type RescheduleBookingInput as cq, type CancelBookingInput as cr, type CancelBookingResult as cs, type BookingModificationType as ct, type RescheduleBookingResult as cu, type ServiceAvailabilityParams as cv, type ServiceAvailabilityResult as cw, type RescheduleHistoryRecord as cx, type StockStatus as cy, type StockLevel as cz, type QuoteBundleSelectionInput as d, type MobileMoneyDetails as d0, type CheckoutCustomerInfo as d1, type FxQuoteRequest as d2, type FxQuote as d3, type FxRateResponse as d4, type RequestContext as d5, type RequestStartEvent as d6, type RequestSuccessEvent as d7, type RequestErrorEvent as d8, type RetryEvent as d9, type SessionChangeEvent as da, type ObservabilityHooks as db, type OrderType as dc, type ElementAppearance as dd, type AddressInfo as de, type PaymentMethodInfo as df, type AuthenticatedCustomer as dg, type ElementsCustomerInfo as dh, type AuthenticatedData as di, type ElementsCheckoutData as dj, type ElementsCheckoutResult as dk, type CheckoutCartItem as dl, type CheckoutCartData as dm, type ParentToIframeMessage as dn, type IframeToParentMessage as dp, type ElementEventHandler as dq, type QuoteStatus as e, type QuoteDynamicBuckets as f, type QuoteUiMessage as g, type RequestSource as h, type RefreshQuoteResult as i, CartOperations as j, type ReorderResult as k, CheckoutService as l, generateIdempotencyKey as m, type GetOrdersOptions as n, type AuthStatus as o, type OtpResult as p, SchedulingService as q, LiteService as r, FxService as s, ActivityService as t, UploadService as u, type UploadResult as v, type UploadInitResponse as w, PlacesService as x, type AutocompletePrediction as y, type AutocompleteResponse as z };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as Money, a as CurrencyCode,
|
|
2
|
-
import { P as ProductWithPrice } from './price-
|
|
1
|
+
import { M as Money, a as CurrencyCode, b5 as PricePathTaxInfo, a3 as QuantityPricingTier, O as Product, a5 as ProductWithDetails, bS as PaymentErrorDetails, bQ as PaymentResponse, bR as PaymentStatusResponse } from './payment-DnU_eLuT.mjs';
|
|
2
|
+
import { P as ProductWithPrice } from './price-D-hso3np.mjs';
|
|
3
3
|
import { CountryCode } from 'libphonenumber-js';
|
|
4
4
|
|
|
5
5
|
declare const CURRENCY_SYMBOLS: Record<string, string>;
|