arky-sdk 0.7.46 → 0.7.48
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-CkyDsYWA.d.ts → index-BCAQZOwm.d.cts} +3 -2
- package/dist/{index-BzBZVueX.d.cts → index-DTg5d847.d.ts} +3 -2
- package/dist/index.cjs +15 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -5
- package/dist/index.d.ts +6 -5
- package/dist/index.js +15 -9
- package/dist/index.js.map +1 -1
- package/dist/types.cjs +0 -9
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +240 -90
- package/dist/types.d.ts +240 -90
- package/dist/types.js +1 -9
- package/dist/types.js.map +1 -1
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,88 @@
|
|
|
1
|
-
|
|
1
|
+
declare enum PaymentMethodType {
|
|
2
|
+
Cash = "cash",
|
|
3
|
+
CreditCard = "credit_card"
|
|
4
|
+
}
|
|
5
|
+
interface PaymentTaxLine {
|
|
6
|
+
rateBps: number;
|
|
7
|
+
amount: number;
|
|
8
|
+
label?: string;
|
|
9
|
+
scope?: string;
|
|
10
|
+
}
|
|
11
|
+
interface BookingPaymentTax {
|
|
12
|
+
amount: number;
|
|
13
|
+
modeSnapshot?: string;
|
|
14
|
+
rateBps: number;
|
|
15
|
+
lines: BookingPaymentTaxLine[];
|
|
16
|
+
}
|
|
17
|
+
interface BookingPaymentTaxLine {
|
|
18
|
+
rateBps: number;
|
|
19
|
+
amount: number;
|
|
20
|
+
label?: string;
|
|
21
|
+
scope?: string;
|
|
22
|
+
}
|
|
23
|
+
interface BookingPaymentPromoCode {
|
|
24
|
+
id: string;
|
|
25
|
+
code: string;
|
|
26
|
+
type: string;
|
|
27
|
+
value: number;
|
|
28
|
+
}
|
|
29
|
+
type BookingPaymentProvider = {
|
|
30
|
+
type: 'stripe';
|
|
31
|
+
customerId: string;
|
|
32
|
+
paymentIntentId?: string;
|
|
33
|
+
};
|
|
34
|
+
interface BookingPaymentRefund {
|
|
2
35
|
id: string;
|
|
3
|
-
entity: string;
|
|
4
36
|
total: number;
|
|
5
37
|
providerRefundId?: string;
|
|
6
38
|
status: string;
|
|
7
39
|
createdAt: number;
|
|
8
40
|
}
|
|
9
|
-
interface
|
|
41
|
+
interface BookingPayment {
|
|
42
|
+
currency: string;
|
|
43
|
+
market: string;
|
|
44
|
+
subtotal: number;
|
|
45
|
+
discount: number;
|
|
46
|
+
total: number;
|
|
47
|
+
paid: number;
|
|
48
|
+
tax?: BookingPaymentTax;
|
|
49
|
+
promoCode?: BookingPaymentPromoCode;
|
|
50
|
+
provider?: BookingPaymentProvider;
|
|
51
|
+
refunds: BookingPaymentRefund[];
|
|
52
|
+
paymentMethodId?: string;
|
|
53
|
+
methodType: PaymentMethodType;
|
|
54
|
+
}
|
|
55
|
+
interface OrderPaymentTax {
|
|
56
|
+
amount: number;
|
|
57
|
+
modeSnapshot?: string;
|
|
58
|
+
rateBps: number;
|
|
59
|
+
lines: OrderPaymentTaxLine[];
|
|
60
|
+
}
|
|
61
|
+
interface OrderPaymentTaxLine {
|
|
62
|
+
rateBps: number;
|
|
63
|
+
amount: number;
|
|
64
|
+
label?: string;
|
|
65
|
+
scope?: string;
|
|
66
|
+
}
|
|
67
|
+
interface OrderPaymentPromoCode {
|
|
68
|
+
id: string;
|
|
69
|
+
code: string;
|
|
70
|
+
type: string;
|
|
71
|
+
value: number;
|
|
72
|
+
}
|
|
73
|
+
type OrderPaymentProvider = {
|
|
74
|
+
type: 'stripe';
|
|
75
|
+
customerId: string;
|
|
76
|
+
paymentIntentId?: string;
|
|
77
|
+
};
|
|
78
|
+
interface OrderPaymentRefund {
|
|
79
|
+
id: string;
|
|
80
|
+
total: number;
|
|
81
|
+
providerRefundId?: string;
|
|
82
|
+
status: string;
|
|
83
|
+
createdAt: number;
|
|
84
|
+
}
|
|
85
|
+
interface OrderPayment {
|
|
10
86
|
currency: string;
|
|
11
87
|
market: string;
|
|
12
88
|
subtotal: number;
|
|
@@ -14,38 +90,14 @@ interface Payment {
|
|
|
14
90
|
discount: number;
|
|
15
91
|
total: number;
|
|
16
92
|
paid: number;
|
|
17
|
-
tax?:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
lines: Array<{
|
|
22
|
-
rateBps: number;
|
|
23
|
-
amount: number;
|
|
24
|
-
label?: string;
|
|
25
|
-
scope?: string;
|
|
26
|
-
}>;
|
|
27
|
-
};
|
|
28
|
-
promoCode?: {
|
|
29
|
-
id: string;
|
|
30
|
-
code: string;
|
|
31
|
-
type: string;
|
|
32
|
-
value: number;
|
|
33
|
-
};
|
|
34
|
-
type: PaymentMethodType;
|
|
35
|
-
provider?: {
|
|
36
|
-
customerId: string;
|
|
37
|
-
paymentIntentId?: string;
|
|
38
|
-
subscriptionId?: string;
|
|
39
|
-
priceId?: string;
|
|
40
|
-
};
|
|
41
|
-
refunds: PaymentRefund[];
|
|
93
|
+
tax?: OrderPaymentTax;
|
|
94
|
+
promoCode?: OrderPaymentPromoCode;
|
|
95
|
+
provider?: OrderPaymentProvider;
|
|
96
|
+
refunds: OrderPaymentRefund[];
|
|
42
97
|
zoneId?: string;
|
|
43
98
|
paymentMethodId?: string;
|
|
44
99
|
shippingMethodId?: string;
|
|
45
|
-
|
|
46
|
-
declare enum PaymentMethodType {
|
|
47
|
-
Cash = "cash",
|
|
48
|
-
CreditCard = "credit_card"
|
|
100
|
+
methodType: PaymentMethodType;
|
|
49
101
|
}
|
|
50
102
|
interface PromoCodeValidation {
|
|
51
103
|
promoCodeId: string;
|
|
@@ -53,7 +105,22 @@ interface PromoCodeValidation {
|
|
|
53
105
|
discounts: any[];
|
|
54
106
|
conditions: any[];
|
|
55
107
|
}
|
|
56
|
-
interface
|
|
108
|
+
interface BookingQuote {
|
|
109
|
+
market: string;
|
|
110
|
+
zone: Zone | null;
|
|
111
|
+
subtotal: number;
|
|
112
|
+
discount: number;
|
|
113
|
+
tax: number;
|
|
114
|
+
total: number;
|
|
115
|
+
paymentMethod: PaymentMethod | null;
|
|
116
|
+
paymentMethods: PaymentMethod[];
|
|
117
|
+
promoCode: PromoCodeValidation | null;
|
|
118
|
+
payment: BookingPayment;
|
|
119
|
+
chargeAmount: number;
|
|
120
|
+
id?: string;
|
|
121
|
+
expiresAt?: number;
|
|
122
|
+
}
|
|
123
|
+
interface OrderQuote {
|
|
57
124
|
market: string;
|
|
58
125
|
zone: Zone | null;
|
|
59
126
|
subtotal: number;
|
|
@@ -65,7 +132,7 @@ interface Quote {
|
|
|
65
132
|
paymentMethod: PaymentMethod | null;
|
|
66
133
|
paymentMethods: PaymentMethod[];
|
|
67
134
|
promoCode: PromoCodeValidation | null;
|
|
68
|
-
payment:
|
|
135
|
+
payment: OrderPayment;
|
|
69
136
|
chargeAmount: number;
|
|
70
137
|
id?: string;
|
|
71
138
|
expiresAt?: number;
|
|
@@ -480,15 +547,59 @@ interface Webhook {
|
|
|
480
547
|
createdAt: number;
|
|
481
548
|
updatedAt: number;
|
|
482
549
|
}
|
|
483
|
-
|
|
550
|
+
type BusinessSubscriptionStatus = 'pending' | 'active' | 'cancellation_scheduled' | 'cancelled' | 'expired';
|
|
551
|
+
type BusinessSubscriptionSource = 'signup' | 'admin' | 'import';
|
|
552
|
+
type BusinessSubscriptionProvider = {
|
|
553
|
+
type: 'stripe';
|
|
554
|
+
customerId: string;
|
|
555
|
+
subscriptionId?: string;
|
|
556
|
+
priceId?: string;
|
|
557
|
+
};
|
|
558
|
+
interface BusinessSubscriptionPayment {
|
|
559
|
+
currency: string;
|
|
560
|
+
market: string;
|
|
561
|
+
provider?: BusinessSubscriptionProvider;
|
|
562
|
+
}
|
|
563
|
+
interface BusinessSubscription {
|
|
484
564
|
id: string;
|
|
485
565
|
target: string;
|
|
486
566
|
planId: string;
|
|
487
567
|
pendingPlanId: string | null;
|
|
488
|
-
payment:
|
|
489
|
-
status:
|
|
568
|
+
payment: BusinessSubscriptionPayment;
|
|
569
|
+
status: BusinessSubscriptionStatus;
|
|
570
|
+
startDate: number;
|
|
490
571
|
endDate: number;
|
|
491
572
|
token: string;
|
|
573
|
+
source: BusinessSubscriptionSource;
|
|
574
|
+
}
|
|
575
|
+
type AudienceSubscriptionStatus = 'pending' | 'active' | 'cancellation_scheduled' | 'cancelled' | 'expired';
|
|
576
|
+
type AudienceSubscriptionSource = 'signup' | 'admin' | 'import';
|
|
577
|
+
type AudienceSubscriptionProvider = {
|
|
578
|
+
type: 'stripe';
|
|
579
|
+
customerId: string;
|
|
580
|
+
subscriptionId?: string;
|
|
581
|
+
priceId?: string;
|
|
582
|
+
};
|
|
583
|
+
interface AudienceSubscriptionPayment {
|
|
584
|
+
currency: string;
|
|
585
|
+
market: string;
|
|
586
|
+
provider?: AudienceSubscriptionProvider;
|
|
587
|
+
}
|
|
588
|
+
interface AudienceSubscription {
|
|
589
|
+
id: string;
|
|
590
|
+
businessId: string;
|
|
591
|
+
customerId: string;
|
|
592
|
+
audienceId: string;
|
|
593
|
+
planId: string;
|
|
594
|
+
pendingPlanId: string | null;
|
|
595
|
+
payment: AudienceSubscriptionPayment;
|
|
596
|
+
status: AudienceSubscriptionStatus;
|
|
597
|
+
startDate: number;
|
|
598
|
+
endDate: number;
|
|
599
|
+
token: string;
|
|
600
|
+
source: AudienceSubscriptionSource;
|
|
601
|
+
createdAt: number;
|
|
602
|
+
updatedAt: number;
|
|
492
603
|
}
|
|
493
604
|
interface Business {
|
|
494
605
|
id: string;
|
|
@@ -496,7 +607,7 @@ interface Business {
|
|
|
496
607
|
timezone: string;
|
|
497
608
|
languages?: Language[];
|
|
498
609
|
emails?: BusinessEmails;
|
|
499
|
-
subscription?:
|
|
610
|
+
subscription?: BusinessSubscription;
|
|
500
611
|
counts?: Record<string, number>;
|
|
501
612
|
}
|
|
502
613
|
interface EshopStoreState {
|
|
@@ -651,31 +762,78 @@ interface BookingStoreState {
|
|
|
651
762
|
enabled: boolean;
|
|
652
763
|
};
|
|
653
764
|
}
|
|
654
|
-
type
|
|
655
|
-
type
|
|
656
|
-
type
|
|
765
|
+
type BookingServiceStatus = 'active' | 'draft' | 'archived';
|
|
766
|
+
type BookingProviderStatus = 'active' | 'draft' | 'archived';
|
|
767
|
+
type ProductStatus = 'active' | 'draft' | 'archived';
|
|
768
|
+
type CustomerStatus = 'active' | 'draft' | 'archived';
|
|
769
|
+
type AudienceStatus = 'active' | 'draft' | 'archived';
|
|
770
|
+
type AgentChatStatus = 'active' | 'draft' | 'archived';
|
|
771
|
+
type WorkflowStatus = 'active' | 'draft' | 'archived';
|
|
772
|
+
type PromoCodeStatus = 'active' | 'draft' | 'archived';
|
|
773
|
+
type NodeStatus = 'active' | 'draft' | 'archived';
|
|
774
|
+
type EmailTemplateStatus = 'active' | 'draft' | 'archived';
|
|
775
|
+
type FormStatus = 'active' | 'draft' | 'archived';
|
|
776
|
+
type TaxonomyStatus = 'active' | 'draft' | 'archived';
|
|
777
|
+
type BookingCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'no_show_auto' | 'other';
|
|
778
|
+
type OrderCancellationReason = 'admin_rejected' | 'customer_cancelled' | 'payment_failed' | 'expired' | 'other';
|
|
779
|
+
type BookingItemStatus = {
|
|
657
780
|
status: 'pending';
|
|
658
|
-
at: number;
|
|
659
781
|
expires_at: number;
|
|
660
782
|
} | {
|
|
661
783
|
status: 'confirmed';
|
|
662
|
-
at: number;
|
|
663
784
|
} | {
|
|
664
|
-
status: '
|
|
665
|
-
|
|
785
|
+
status: 'cancelled';
|
|
786
|
+
reason: BookingCancellationReason;
|
|
787
|
+
} | {
|
|
788
|
+
status: 'fulfilled';
|
|
789
|
+
} | {
|
|
790
|
+
status: 'no_show';
|
|
666
791
|
};
|
|
667
|
-
type
|
|
668
|
-
type BookingWorkflowStatus = {
|
|
792
|
+
type OrderItemStatus = {
|
|
669
793
|
status: 'pending';
|
|
670
794
|
expires_at: number;
|
|
671
795
|
} | {
|
|
672
796
|
status: 'confirmed';
|
|
797
|
+
} | {
|
|
798
|
+
status: 'cancelled';
|
|
799
|
+
reason: OrderCancellationReason;
|
|
800
|
+
} | {
|
|
801
|
+
status: 'fulfilled';
|
|
802
|
+
} | {
|
|
803
|
+
status: 'returned';
|
|
804
|
+
};
|
|
805
|
+
type BookingPaymentStatus = {
|
|
806
|
+
status: 'pending';
|
|
807
|
+
at: number;
|
|
808
|
+
} | {
|
|
809
|
+
status: 'authorized';
|
|
810
|
+
at: number;
|
|
811
|
+
amount: number;
|
|
812
|
+
} | {
|
|
813
|
+
status: 'captured';
|
|
673
814
|
at: number;
|
|
815
|
+
amount: number;
|
|
674
816
|
} | {
|
|
675
|
-
status: '
|
|
817
|
+
status: 'failed';
|
|
676
818
|
at: number;
|
|
819
|
+
reason?: string;
|
|
820
|
+
};
|
|
821
|
+
type OrderPaymentStatus = {
|
|
822
|
+
status: 'pending';
|
|
823
|
+
at: number;
|
|
824
|
+
} | {
|
|
825
|
+
status: 'authorized';
|
|
826
|
+
at: number;
|
|
827
|
+
amount: number;
|
|
828
|
+
} | {
|
|
829
|
+
status: 'captured';
|
|
830
|
+
at: number;
|
|
831
|
+
amount: number;
|
|
832
|
+
} | {
|
|
833
|
+
status: 'failed';
|
|
834
|
+
at: number;
|
|
835
|
+
reason?: string;
|
|
677
836
|
};
|
|
678
|
-
type SubscriptionStatus = 'pending' | 'active' | 'cancellation_scheduled' | 'cancelled' | 'expired';
|
|
679
837
|
interface BookingItemSnapshot {
|
|
680
838
|
serviceKey: string;
|
|
681
839
|
providerKey: string;
|
|
@@ -685,7 +843,6 @@ interface TimeRange {
|
|
|
685
843
|
from: number;
|
|
686
844
|
to: number;
|
|
687
845
|
}
|
|
688
|
-
type BookingItemStatus = 'active' | 'cancelled' | 'no_show';
|
|
689
846
|
interface BookingItem {
|
|
690
847
|
id: string;
|
|
691
848
|
serviceId: string;
|
|
@@ -697,7 +854,6 @@ interface BookingItem {
|
|
|
697
854
|
forms: FormEntry[];
|
|
698
855
|
snapshot: BookingItemSnapshot;
|
|
699
856
|
status: BookingItemStatus;
|
|
700
|
-
cancelledAt?: number;
|
|
701
857
|
}
|
|
702
858
|
interface Booking {
|
|
703
859
|
id: string;
|
|
@@ -706,11 +862,9 @@ interface Booking {
|
|
|
706
862
|
verified: boolean;
|
|
707
863
|
forms: FormEntry[];
|
|
708
864
|
businessId: string;
|
|
709
|
-
status: BookingStatus;
|
|
710
|
-
workflowStatus: BookingWorkflowStatus;
|
|
711
865
|
serviceIds: string[];
|
|
712
866
|
providerIds: string[];
|
|
713
|
-
payment:
|
|
867
|
+
payment: BookingPayment;
|
|
714
868
|
business?: Business;
|
|
715
869
|
account?: any;
|
|
716
870
|
items: BookingItem[];
|
|
@@ -730,7 +884,7 @@ interface Node {
|
|
|
730
884
|
parentId?: string | null;
|
|
731
885
|
blocks: Block[];
|
|
732
886
|
taxonomies: TaxonomyEntry[];
|
|
733
|
-
status:
|
|
887
|
+
status: NodeStatus;
|
|
734
888
|
slug: Record<string, string>;
|
|
735
889
|
children: Node[];
|
|
736
890
|
createdAt: number;
|
|
@@ -746,7 +900,7 @@ interface EmailTemplate {
|
|
|
746
900
|
fromEmail: string;
|
|
747
901
|
replyTo?: string;
|
|
748
902
|
preheader?: string;
|
|
749
|
-
status:
|
|
903
|
+
status: EmailTemplateStatus;
|
|
750
904
|
createdAt: number;
|
|
751
905
|
updatedAt: number;
|
|
752
906
|
}
|
|
@@ -755,7 +909,7 @@ interface Form {
|
|
|
755
909
|
key: string;
|
|
756
910
|
businessId: string;
|
|
757
911
|
schema: FormSchema[];
|
|
758
|
-
status:
|
|
912
|
+
status: FormStatus;
|
|
759
913
|
createdAt: number;
|
|
760
914
|
updatedAt: number;
|
|
761
915
|
}
|
|
@@ -772,7 +926,7 @@ interface Taxonomy {
|
|
|
772
926
|
businessId: string;
|
|
773
927
|
parentId?: string | null;
|
|
774
928
|
schema?: TaxonomySchema[];
|
|
775
|
-
status:
|
|
929
|
+
status: TaxonomyStatus;
|
|
776
930
|
createdAt: number;
|
|
777
931
|
updatedAt: number;
|
|
778
932
|
}
|
|
@@ -818,7 +972,7 @@ interface Service {
|
|
|
818
972
|
taxonomies: TaxonomyEntry[];
|
|
819
973
|
createdAt: number;
|
|
820
974
|
updatedAt: number;
|
|
821
|
-
status:
|
|
975
|
+
status: BookingServiceStatus;
|
|
822
976
|
}
|
|
823
977
|
interface ProviderTimelinePoint {
|
|
824
978
|
timestamp: number;
|
|
@@ -829,7 +983,7 @@ interface Provider {
|
|
|
829
983
|
key: string;
|
|
830
984
|
slug: Record<string, string>;
|
|
831
985
|
businessId: string;
|
|
832
|
-
status:
|
|
986
|
+
status: BookingProviderStatus;
|
|
833
987
|
audienceIds: string[];
|
|
834
988
|
blocks: Block[];
|
|
835
989
|
taxonomies: TaxonomyEntry[];
|
|
@@ -846,7 +1000,7 @@ interface Workflow {
|
|
|
846
1000
|
key: string;
|
|
847
1001
|
businessId: string;
|
|
848
1002
|
secret: string;
|
|
849
|
-
status:
|
|
1003
|
+
status: WorkflowStatus;
|
|
850
1004
|
nodes: Record<string, WorkflowNode>;
|
|
851
1005
|
schedule?: string;
|
|
852
1006
|
createdAt: number;
|
|
@@ -933,16 +1087,16 @@ interface Audience {
|
|
|
933
1087
|
id: string;
|
|
934
1088
|
businessId: string;
|
|
935
1089
|
key: string;
|
|
936
|
-
status:
|
|
1090
|
+
status: AudienceStatus;
|
|
937
1091
|
type: AudienceType;
|
|
938
1092
|
}
|
|
939
1093
|
interface AudienceAccessResponse {
|
|
940
1094
|
hasAccess: boolean;
|
|
941
|
-
subscription?:
|
|
1095
|
+
subscription?: AudienceSubscription;
|
|
942
1096
|
}
|
|
943
1097
|
interface AudienceSubscribeResponse {
|
|
944
1098
|
checkoutUrl?: string;
|
|
945
|
-
subscription?:
|
|
1099
|
+
subscription?: AudienceSubscription;
|
|
946
1100
|
}
|
|
947
1101
|
type EventAction = {
|
|
948
1102
|
action: 'order_created';
|
|
@@ -1421,7 +1575,7 @@ interface ProviderWithTimeline {
|
|
|
1421
1575
|
key: string;
|
|
1422
1576
|
businessId: string;
|
|
1423
1577
|
seo: any;
|
|
1424
|
-
status:
|
|
1578
|
+
status: BookingProviderStatus;
|
|
1425
1579
|
audienceIds: string[];
|
|
1426
1580
|
blocks: Block[];
|
|
1427
1581
|
createdAt: number;
|
|
@@ -1465,7 +1619,7 @@ interface UpdatePromoCodeParams {
|
|
|
1465
1619
|
code: string;
|
|
1466
1620
|
discounts: Discount[];
|
|
1467
1621
|
conditions: Condition[];
|
|
1468
|
-
status?:
|
|
1622
|
+
status?: PromoCodeStatus;
|
|
1469
1623
|
}
|
|
1470
1624
|
interface DeletePromoCodeParams {
|
|
1471
1625
|
id: string;
|
|
@@ -1560,8 +1714,7 @@ interface GetOrderParams {
|
|
|
1560
1714
|
id: string;
|
|
1561
1715
|
}
|
|
1562
1716
|
interface GetOrdersParams {
|
|
1563
|
-
|
|
1564
|
-
workflowStatus?: string;
|
|
1717
|
+
itemStatuses?: string[] | null;
|
|
1565
1718
|
productIds?: string[];
|
|
1566
1719
|
verified?: boolean;
|
|
1567
1720
|
query?: string | null;
|
|
@@ -1579,7 +1732,7 @@ interface UpdateOrderParams {
|
|
|
1579
1732
|
items: any[];
|
|
1580
1733
|
address?: any | null;
|
|
1581
1734
|
billingAddress?: any | null;
|
|
1582
|
-
payment?:
|
|
1735
|
+
payment?: Partial<OrderPayment> | null;
|
|
1583
1736
|
confirm?: boolean;
|
|
1584
1737
|
cancel?: boolean;
|
|
1585
1738
|
}
|
|
@@ -1597,7 +1750,7 @@ interface UpdateBookingParams {
|
|
|
1597
1750
|
cancel?: boolean;
|
|
1598
1751
|
forms?: any;
|
|
1599
1752
|
items?: any;
|
|
1600
|
-
payment?:
|
|
1753
|
+
payment?: Partial<BookingPayment> | null;
|
|
1601
1754
|
[key: string]: any;
|
|
1602
1755
|
}
|
|
1603
1756
|
interface CreateProviderParams {
|
|
@@ -1606,7 +1759,7 @@ interface CreateProviderParams {
|
|
|
1606
1759
|
audienceIds?: string[];
|
|
1607
1760
|
blocks?: any[];
|
|
1608
1761
|
taxonomies?: any[];
|
|
1609
|
-
status?:
|
|
1762
|
+
status?: BookingProviderStatus;
|
|
1610
1763
|
[key: string]: any;
|
|
1611
1764
|
}
|
|
1612
1765
|
interface UpdateProviderParams {
|
|
@@ -1616,7 +1769,7 @@ interface UpdateProviderParams {
|
|
|
1616
1769
|
audienceIds?: string[];
|
|
1617
1770
|
blocks?: any[];
|
|
1618
1771
|
taxonomies?: any[];
|
|
1619
|
-
status?:
|
|
1772
|
+
status?: BookingProviderStatus;
|
|
1620
1773
|
[key: string]: any;
|
|
1621
1774
|
}
|
|
1622
1775
|
interface DeleteProviderParams {
|
|
@@ -1637,7 +1790,7 @@ interface CreateServiceParams {
|
|
|
1637
1790
|
key: string;
|
|
1638
1791
|
blocks?: any[];
|
|
1639
1792
|
taxonomies?: any[];
|
|
1640
|
-
status?:
|
|
1793
|
+
status?: BookingServiceStatus;
|
|
1641
1794
|
[key: string]: any;
|
|
1642
1795
|
}
|
|
1643
1796
|
interface UpdateServiceParams {
|
|
@@ -1646,7 +1799,7 @@ interface UpdateServiceParams {
|
|
|
1646
1799
|
key?: string;
|
|
1647
1800
|
blocks?: any[];
|
|
1648
1801
|
taxonomies?: any[];
|
|
1649
|
-
status?:
|
|
1802
|
+
status?: BookingServiceStatus;
|
|
1650
1803
|
[key: string]: any;
|
|
1651
1804
|
}
|
|
1652
1805
|
interface CreateServiceProviderParams {
|
|
@@ -1726,8 +1879,7 @@ interface SearchBookingsParams {
|
|
|
1726
1879
|
providerIds?: string[];
|
|
1727
1880
|
from?: number;
|
|
1728
1881
|
to?: number;
|
|
1729
|
-
|
|
1730
|
-
workflowStatus?: string;
|
|
1882
|
+
itemStatuses?: string[];
|
|
1731
1883
|
verified?: boolean;
|
|
1732
1884
|
limit?: number;
|
|
1733
1885
|
cursor?: string;
|
|
@@ -1939,9 +2091,12 @@ interface DeleteProductParams {
|
|
|
1939
2091
|
interface DeleteProductParams {
|
|
1940
2092
|
id: string;
|
|
1941
2093
|
}
|
|
1942
|
-
interface
|
|
2094
|
+
interface ProcessBookingRefundParams {
|
|
2095
|
+
id: string;
|
|
2096
|
+
amount: number;
|
|
2097
|
+
}
|
|
2098
|
+
interface ProcessOrderRefundParams {
|
|
1943
2099
|
id: string;
|
|
1944
|
-
entity: string;
|
|
1945
2100
|
amount: number;
|
|
1946
2101
|
}
|
|
1947
2102
|
type SystemTemplateKey = "system:booking-business-update" | "system:booking-customer-update" | "system:user-invitation" | "system:order-status-update" | "system:user-confirmation" | "system:forgot-password";
|
|
@@ -1981,14 +2136,14 @@ interface Slot {
|
|
|
1981
2136
|
interface CreateWorkflowParams {
|
|
1982
2137
|
businessId?: string;
|
|
1983
2138
|
key: string;
|
|
1984
|
-
status?:
|
|
2139
|
+
status?: WorkflowStatus;
|
|
1985
2140
|
nodes: Record<string, WorkflowNode>;
|
|
1986
2141
|
schedule?: string;
|
|
1987
2142
|
}
|
|
1988
2143
|
interface UpdateWorkflowParams {
|
|
1989
2144
|
id: string;
|
|
1990
2145
|
key: string;
|
|
1991
|
-
status?:
|
|
2146
|
+
status?: WorkflowStatus;
|
|
1992
2147
|
nodes: Record<string, WorkflowNode>;
|
|
1993
2148
|
schedule?: string;
|
|
1994
2149
|
}
|
|
@@ -2034,7 +2189,7 @@ interface CreateAudienceParams {
|
|
|
2034
2189
|
interface UpdateAudienceParams {
|
|
2035
2190
|
id: string;
|
|
2036
2191
|
key?: string;
|
|
2037
|
-
status?:
|
|
2192
|
+
status?: AudienceStatus;
|
|
2038
2193
|
confirmTemplateId?: string;
|
|
2039
2194
|
}
|
|
2040
2195
|
interface GetAudienceParams {
|
|
@@ -2064,17 +2219,12 @@ interface GetAudienceSubscribersParams {
|
|
|
2064
2219
|
limit?: number;
|
|
2065
2220
|
cursor?: string;
|
|
2066
2221
|
}
|
|
2067
|
-
declare enum SubscriptionSource {
|
|
2068
|
-
Signup = "signup",
|
|
2069
|
-
Admin = "admin",
|
|
2070
|
-
Import = "import"
|
|
2071
|
-
}
|
|
2072
2222
|
interface AudienceSubscriber {
|
|
2073
2223
|
customerId: string;
|
|
2074
2224
|
email: string;
|
|
2075
2225
|
subscribedAt?: number;
|
|
2076
|
-
source?:
|
|
2077
|
-
status?:
|
|
2226
|
+
source?: AudienceSubscriptionSource;
|
|
2227
|
+
status?: AudienceSubscriptionStatus;
|
|
2078
2228
|
}
|
|
2079
2229
|
interface RemoveAudienceSubscriberParams {
|
|
2080
2230
|
id: string;
|
|
@@ -2162,7 +2312,7 @@ interface ShipParams {
|
|
|
2162
2312
|
locationId: string;
|
|
2163
2313
|
lines: ShipmentLine[];
|
|
2164
2314
|
}
|
|
2165
|
-
type AgentStatus = 'active' | '
|
|
2315
|
+
type AgentStatus = 'active' | 'draft' | 'archived';
|
|
2166
2316
|
interface CreateAgentParams {
|
|
2167
2317
|
businessId?: string;
|
|
2168
2318
|
key: string;
|
|
@@ -2312,4 +2462,4 @@ interface MergeCustomersParams {
|
|
|
2312
2462
|
businessId?: string;
|
|
2313
2463
|
}
|
|
2314
2464
|
|
|
2315
|
-
export { type Access, type AddAudienceSubscriberParams, type AddAudienceSubscriberResponse, type Address, type AgentStatus, type ApiResponse, type Audience, type AudienceAccessResponse, type AudienceSubscribeResponse, type AudienceSubscriber, type AudienceType, type AuthToken, type AvailabilityResponse, type AvailabilitySlot, type Block, type BlockType, type Booking, type BookingCartItem, type BookingCheckoutParams, type BookingItem, type BookingItemSnapshot, type BookingItemStatus, type
|
|
2465
|
+
export { type Access, type AddAudienceSubscriberParams, type AddAudienceSubscriberResponse, type Address, type AgentChatStatus, type AgentStatus, type ApiResponse, type Audience, type AudienceAccessResponse, type AudienceStatus, type AudienceSubscribeResponse, type AudienceSubscriber, type AudienceSubscription, type AudienceSubscriptionPayment, type AudienceSubscriptionProvider, type AudienceSubscriptionSource, type AudienceSubscriptionStatus, type AudienceType, type AuthToken, type AvailabilityResponse, type AvailabilitySlot, type Block, type BlockType, type Booking, type BookingCancellationReason, type BookingCartItem, type BookingCheckoutParams, type BookingItem, type BookingItemSnapshot, type BookingItemStatus, type BookingPayment, type BookingPaymentPromoCode, type BookingPaymentProvider, type BookingPaymentRefund, type BookingPaymentStatus, type BookingPaymentTax, type BookingPaymentTaxLine, type BookingProviderStatus, type BookingQuote, type BookingQuoteItem, type BookingServiceStatus, type BookingStoreState, type Business, type BusinessEmails, type BusinessRole, type BusinessSubscription, type BusinessSubscriptionPayment, type BusinessSubscriptionProvider, type BusinessSubscriptionSource, type BusinessSubscriptionStatus, type CancelBookingItemParams, type CancellationRule$1 as CancellationRule, type Condition, type ConnectCustomerParams, type CreateAgentParams, type CreateAudienceParams, type CreateBookingParams, type CreateBusinessParams, type CreateCustomerParams, type CreateEmailTemplateParams, type CreateFormParams, type CreateIntegrationParams, type CreateLocationParams, type CreateMarketParams, type CreateNodeParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateServiceParams, type CreateServiceProviderParams, type CreateTaxonomyParams, type CreateWebhookParams, type CreateWorkflowParams, type Customer, type CustomerAuthToken, type CustomerInfo, type CustomerStatus, type CustomerVerificationCode, type CustomsDeclaration, type CustomsItem, type DaySlots, type DeleteAccountParams, type DeleteAgentParams, type DeleteAudienceParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteEmailTemplateParams, type DeleteFormParams, type DeleteIntegrationParams, type DeleteLocationParams, type DeleteMarketParams, type DeleteNodeParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteServiceParams, type DeleteServiceProviderParams, type DeleteTaxonomyParams, type DeleteWebhookParams, type DeleteWorkflowParams, type Discount, type EmailTemplate, type EmailTemplateStatus, type EshopCartItem, type EshopItem, type EshopStoreState, type Event, type EventAction, type ExecutionStatus, type FindCustomersParams, type FindServiceProvidersParams, type Form, type FormEntry, type FormField, type FormFieldType, type FormSchema, type FormSchemaType, type FormStatus, type FormSubmission, type GeoLocation, type GeoLocationBlock, type GeoLocationBlockProperties, type GeoLocationValue, type GetAgentChatParams, type GetAgentChatsParams, type GetAgentParams, type GetAgentsParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAudienceParams, type GetAudienceSubscribersParams, type GetAudiencesParams, type GetAvailabilityParams, type GetBookingParams, type GetBookingQuoteParams, type GetBusinessChatsParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessesParams, type GetCustomerParams, type GetDeliveryStatsParams, type GetEmailTemplateParams, type GetEmailTemplatesParams, type GetFormParams, type GetFormSubmissionParams, type GetFormSubmissionsParams, type GetFormsParams, type GetIntegrationParams, type GetMeParams, type GetMediaParams, type GetNodeChildrenParams, type GetNodeParams, type GetNodesParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetServiceParams, type GetServicesParams, type GetShippingRatesParams, type GetSubscriptionPlansParams, type GetTaxonomiesParams, type GetTaxonomyChildrenParams, type GetTaxonomyParams, type GetWorkflowExecutionParams, type GetWorkflowExecutionsParams, type GetWorkflowParams, type GetWorkflowsParams, type HandleInvitationParams, type Integration, type IntegrationProvider, type IntervalPeriod, type InventoryLevel, type InviteUserParams, type Language, type ListIntegrationsParams, type ListWebhooksParams, type Location, type LoginAccountParams, type LogoutParams, type MagicLinkRequestParams, type MagicLinkVerifyParams, type Market, type Media, type MediaResolution, type MergeCustomersParams, type Node, type NodeResult, type NodeStatus, type OAuthConnectParams, type OAuthDisconnectParams, type OrderCancellationReason, type OrderCheckoutParams, type OrderItemStatus, type OrderPayment, type OrderPaymentPromoCode, type OrderPaymentProvider, type OrderPaymentRefund, type OrderPaymentStatus, type OrderPaymentTax, type OrderPaymentTaxLine, type OrderQuote, type OrderShipping, type PaginatedResponse, type Parcel, type PaymentMethod, PaymentMethodType, type PaymentTaxLine, type Price, type PriceProvider, type ProcessBookingRefundParams, type ProcessOrderRefundParams, type ProductStatus, type PromoCodeStatus, type PromoCodeValidation, type PromoUsage, type Provider, type ProviderAvailability, type ProviderTimelinePoint, type ProviderWithTimeline, type PurchaseLabelResult, type RateAgentChatParams, type RemoveAudienceSubscriberParams, type RemoveMemberParams, type RequestOptions, type RunAgentParams, type SearchAccountsParams, type SearchBookingsParams, type Service, type ServiceDuration, type ServiceProvider, type ServiceProviderInput, type SetupAnalyticsParams, type ShipParams, type ShipResult, type Shipment, type ShipmentLine, type ShippingAddress, type ShippingMethod, type ShippingRate, type ShippingStatus, type ShippingWeightTier, type Slot, type SlotRange, type SpecificDate, type SubmitFormParams, type SubscribeAudienceParams, type SubscribeParams, type SubscriptionInterval, type SubscriptionPrice, type SystemTemplateKey, type Taxonomy, type TaxonomyEntry, type TaxonomyField, type TaxonomyFieldQuery, type TaxonomyQuery, type TaxonomySchema, type TaxonomySchemaType, type TaxonomyStatus, type TestWebhookParams, type TimeRange, type TimelinePoint, type TrackEmailOpenParams, type TriggerNotificationParams, type TriggerWorkflowParams, type UpdateAccountProfileParams, type UpdateAgentChatParams, type UpdateAgentParams, type UpdateAudienceParams, type UpdateBookingParams, type UpdateBusinessParams, type UpdateCustomerParams, type UpdateEmailTemplateParams, type UpdateFormParams, type UpdateFormSubmissionParams, type UpdateIntegrationParams, type UpdateLocationParams, type UpdateMarketParams, type UpdateMediaParams, type UpdateNodeParams, type UpdateOrderParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateServiceParams, type UpdateServiceProviderParams, type UpdateTaxonomyParams, type UpdateWebhookParams, type UpdateWorkflowParams, type UploadBusinessMediaParams, type Webhook, type WebhookEventSubscription, type Workflow, type WorkflowConnection, type WorkflowExecution, type WorkflowHttpMethod, type WorkflowHttpNode, type WorkflowLoopNode, type WorkflowNode, type WorkflowStatus, type WorkflowSwitchNode, type WorkflowSwitchRule, type WorkflowTransformNode, type WorkflowTriggerNode, type WorkingDay, type WorkingHour, type Zone, type ZoneLocation };
|
package/dist/types.js
CHANGED
|
@@ -1,11 +1,3 @@
|
|
|
1
|
-
// src/types/api.ts
|
|
2
|
-
var SubscriptionSource = /* @__PURE__ */ ((SubscriptionSource2) => {
|
|
3
|
-
SubscriptionSource2["Signup"] = "signup";
|
|
4
|
-
SubscriptionSource2["Admin"] = "admin";
|
|
5
|
-
SubscriptionSource2["Import"] = "import";
|
|
6
|
-
return SubscriptionSource2;
|
|
7
|
-
})(SubscriptionSource || {});
|
|
8
|
-
|
|
9
1
|
// src/types/index.ts
|
|
10
2
|
var PaymentMethodType = /* @__PURE__ */ ((PaymentMethodType2) => {
|
|
11
3
|
PaymentMethodType2["Cash"] = "cash";
|
|
@@ -13,6 +5,6 @@ var PaymentMethodType = /* @__PURE__ */ ((PaymentMethodType2) => {
|
|
|
13
5
|
return PaymentMethodType2;
|
|
14
6
|
})(PaymentMethodType || {});
|
|
15
7
|
|
|
16
|
-
export { PaymentMethodType
|
|
8
|
+
export { PaymentMethodType };
|
|
17
9
|
//# sourceMappingURL=types.js.map
|
|
18
10
|
//# sourceMappingURL=types.js.map
|