arky-sdk 0.3.77 → 0.3.79
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.cjs +336 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +64 -6
- package/dist/index.d.ts +64 -6
- package/dist/index.js +336 -16
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +30 -14
- package/dist/types.d.ts +30 -14
- package/dist/types.js.map +1 -1
- package/package.json +20 -8
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";;;AA8BO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.cjs","sourcesContent":["export * from './api';\n\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\ttax?: {\n\t\tamount: number;\n\t\tmodeSnapshot?: string;\n\t\trateBps: number;\n\t\tlines: Array<{ rateBps: number; amount: number; label?: string; scope?: string }>;\n\t};\n\tpromoCode?: {\n\t\tid: string;\n\t\tcode: string;\n\t\ttype: string;\n\t\tvalue: number;\n\t};\n\ttype: PaymentMethodType;\n\tprovider?: {\n\t\tcustomerId: string;\n\t\tpaymentIntentId?: string;\n\t\tsubscriptionId?: string;\n\t\tpriceId?: string;\n\t};\n}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\nexport interface Quote {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tlineItems: QuoteLineItem[];\n\tshippingMethod: ShippingMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tavailableShippingMethods: ShippingMethod[];\n\tavailablePaymentMethods: PaymentMethod[];\n\tpayment: Payment;\n\tchargeAmount: number;\n}\n\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tpostalCode?: string | null;\n\tcountryCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\nexport interface EshopCartItem {\n\tid: string;\n\tproductId: string;\n\tvariantId: string;\n\tproductName: string;\n\tproductSlug: string;\n\tvariantAttributes: Record<string, any>;\n\tprice: Price;\n\tquantity: number;\n\taddedAt: number;\n}\n\nexport interface ReservationCartItem {\n\tid: string;\n\tserviceId: string;\n\tserviceName: string;\n\tdate: string;\n\tfrom: number;\n\tto: number;\n\ttimeText: string;\n\
|
|
1
|
+
{"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";;;AA8BO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.cjs","sourcesContent":["export * from './api';\n\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\ttax?: {\n\t\tamount: number;\n\t\tmodeSnapshot?: string;\n\t\trateBps: number;\n\t\tlines: Array<{ rateBps: number; amount: number; label?: string; scope?: string }>;\n\t};\n\tpromoCode?: {\n\t\tid: string;\n\t\tcode: string;\n\t\ttype: string;\n\t\tvalue: number;\n\t};\n\ttype: PaymentMethodType;\n\tprovider?: {\n\t\tcustomerId: string;\n\t\tpaymentIntentId?: string;\n\t\tsubscriptionId?: string;\n\t\tpriceId?: string;\n\t};\n}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\nexport interface Quote {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tlineItems: QuoteLineItem[];\n\tshippingMethod: ShippingMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tavailableShippingMethods: ShippingMethod[];\n\tavailablePaymentMethods: PaymentMethod[];\n\tpayment: Payment;\n\tchargeAmount: number;\n}\n\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tpostalCode?: string | null;\n\tcountryCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\nexport interface EshopCartItem {\n\tid: string;\n\tproductId: string;\n\tvariantId: string;\n\tproductName: string;\n\tproductSlug: string;\n\tvariantAttributes: Record<string, any>;\n\tprice: Price;\n\tquantity: number;\n\taddedAt: number;\n}\n\nexport interface ReservationCartItem {\n\tid: string;\n\tserviceId: string;\n\tserviceName: string;\n\tdate: string;\n\tfrom: number;\n\tto: number;\n\ttimeText: string;\n\tproviderId?: string;\n\tblocks: any[];\n}\n\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ShippingWeightTier {\n\tupToGrams: number;\n\tamount: number;\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\tname: Record<string, string>;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\tname: Record<string, string>;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tmarketId: string;\n\tcountries: string[];\n\tstates: string[];\n\tcities: string[];\n\tpostalCodes: string[];\n\ttaxBps: number;\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n}\n\n\nexport interface Language {\n\tid: string;\n}\n\nexport interface BusinessEmails {\n\tbilling: string;\n\tsupport: string;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Business {\n\tid: string;\n\tname: string;\n\tconfigs?: BusinessConfig;\n}\n\nexport interface EshopStoreState {\n\tbusinessId: string;\n\tselectedShippingMethodId: string | null;\n\tuserToken: string | null;\n\tprocessingCheckout: boolean;\n\tloading: boolean;\n\terror: string | null;\n\tphoneNumber: string;\n\tphoneError: string | null;\n\tverificationCode: string;\n\tverifyError: string | null;\n}\n\nexport interface Block {\n\tid: string;\n\tkey: string;\n\ttype: string;\n\tproperties?: any;\n\tvalue?: any;\n}\n\nexport interface Seo {\n\tslug: Record<string, string>;\n\tmetaTitle: Record<string, string>;\n\tmetaDescription: Record<string, string>;\n\tcanonicalUrl: Record<string, string>;\n\togImage: string;\n}\n\nexport interface MediaResolution {\n\tid: string;\n\tsize: string;\n\turl: string;\n}\n\nexport interface Media {\n\tid: string;\n\tresolutions: { [key: string]: MediaResolution };\n\tmimeType: string;\n\ttitle?: string | null;\n\tdescription?: string | null;\n\talt?: string | null;\n\towner: string;\n\tmetadata?: string | null;\n\tuploadedAt: string;\n\tseo: Seo;\n}\n\nexport interface ApiResponse<T> {\n\tsuccess: boolean;\n\tdata?: T;\n\terror?: string;\n\tcursor?: string;\n\ttotal?: number;\n}\n\nexport interface PaginatedResponse<T> {\n\tdata: T[];\n\tmeta?: {\n\t\ttotal: number;\n\t\tpage: number;\n\t\tper_page: number;\n\t};\n}\n\nexport interface ReservationStoreState {\n\tcurrentStep: number;\n\ttotalSteps: number;\n\tsteps: Record<number, { name: string; labelKey: string }>;\n\tweekdays: string[];\n\tmonthYear: string;\n\tdays: any[];\n\tcurrent: Date;\n\tselectedDate: string | null;\n\tslots: any[];\n\tselectedSlot: any | null;\n\tselectedProvider: any | null;\n\tproviders: any[];\n\tloading: boolean;\n\tstartDate: string | null;\n\tendDate: string | null;\n\tphoneNumber: string;\n\tphoneError: string | null;\n\tphoneSuccess: string | null;\n\tverificationCode: string;\n\tverifyError: string | null;\n\tisPhoneVerified: boolean;\n\tisSendingCode: boolean;\n\tisVerifying: boolean;\n\tcodeSentAt: number | null;\n\tcanResendAt: number | null;\n\tguestToken: string | null;\n\tservice: any | null;\n\tbusiness: Business | null;\n\tcurrency: string;\n\treservationBlocks: Block[];\n\tapiUrl: string;\n\tbusinessId: string;\n\ttimezone: string;\n\ttzGroups: any;\n\titems: ReservationCartItem[];\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n"]}
|
package/dist/types.d.cts
CHANGED
|
@@ -100,8 +100,6 @@ interface ReservationCartItem {
|
|
|
100
100
|
from: number;
|
|
101
101
|
to: number;
|
|
102
102
|
timeText: string;
|
|
103
|
-
isMultiDay: boolean;
|
|
104
|
-
reservationMethod: string;
|
|
105
103
|
providerId?: string;
|
|
106
104
|
blocks: any[];
|
|
107
105
|
}
|
|
@@ -245,13 +243,11 @@ interface ReservationStoreState {
|
|
|
245
243
|
selectedDate: string | null;
|
|
246
244
|
slots: any[];
|
|
247
245
|
selectedSlot: any | null;
|
|
248
|
-
selectedMethod: string | null;
|
|
249
246
|
selectedProvider: any | null;
|
|
250
247
|
providers: any[];
|
|
251
248
|
loading: boolean;
|
|
252
249
|
startDate: string | null;
|
|
253
250
|
endDate: string | null;
|
|
254
|
-
isMultiDay: boolean;
|
|
255
251
|
phoneNumber: string;
|
|
256
252
|
phoneError: string | null;
|
|
257
253
|
phoneSuccess: string | null;
|
|
@@ -407,13 +403,6 @@ interface GetReservationQuoteParams {
|
|
|
407
403
|
location?: any;
|
|
408
404
|
zoneId?: string;
|
|
409
405
|
}
|
|
410
|
-
interface GetAvailableSlotsParams {
|
|
411
|
-
serviceId: string;
|
|
412
|
-
providerId?: string | null;
|
|
413
|
-
from: number;
|
|
414
|
-
to: number;
|
|
415
|
-
limit?: number;
|
|
416
|
-
}
|
|
417
406
|
interface GetServiceProvidersParams {
|
|
418
407
|
serviceId: string;
|
|
419
408
|
from: number;
|
|
@@ -760,7 +749,6 @@ interface CreateServiceParams {
|
|
|
760
749
|
categoryFilterBlocks?: any[];
|
|
761
750
|
prices?: any[];
|
|
762
751
|
durations?: any[];
|
|
763
|
-
reservationMethods?: any[];
|
|
764
752
|
reservationConfigs?: any;
|
|
765
753
|
statuses?: any[];
|
|
766
754
|
[key: string]: any;
|
|
@@ -774,7 +762,6 @@ interface UpdateServiceParams {
|
|
|
774
762
|
categoryFilterBlocks?: any[];
|
|
775
763
|
prices?: any[];
|
|
776
764
|
durations?: any[];
|
|
777
|
-
reservationMethods?: any[];
|
|
778
765
|
reservationConfigs?: any;
|
|
779
766
|
statuses?: any[];
|
|
780
767
|
[key: string]: any;
|
|
@@ -990,5 +977,34 @@ interface TrackEventParams {
|
|
|
990
977
|
eventName: string;
|
|
991
978
|
value?: number;
|
|
992
979
|
}
|
|
980
|
+
interface GetSlotsForDateParams {
|
|
981
|
+
serviceId: string;
|
|
982
|
+
date: Date;
|
|
983
|
+
timezone: string;
|
|
984
|
+
providerId?: string;
|
|
985
|
+
}
|
|
986
|
+
interface GetAvailabilityParams {
|
|
987
|
+
serviceId: string;
|
|
988
|
+
from: Date;
|
|
989
|
+
to: Date;
|
|
990
|
+
timezone: string;
|
|
991
|
+
}
|
|
992
|
+
interface DayAvailability {
|
|
993
|
+
date: Date;
|
|
994
|
+
available: boolean;
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* A bookable time slot returned by getSlotsForDate.
|
|
998
|
+
* Contains all information needed to display and book the slot.
|
|
999
|
+
*/
|
|
1000
|
+
interface Slot {
|
|
1001
|
+
id: string;
|
|
1002
|
+
serviceId: string;
|
|
1003
|
+
providerId: string;
|
|
1004
|
+
from: number;
|
|
1005
|
+
to: number;
|
|
1006
|
+
timeText: string;
|
|
1007
|
+
dateText: string;
|
|
1008
|
+
}
|
|
993
1009
|
|
|
994
|
-
export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateFeatureFlagParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteFeatureFlagParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type
|
|
1010
|
+
export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateFeatureFlagParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DayAvailability, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteFeatureFlagParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailabilityParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServiceProvidersParams, type GetServicesParams, type GetSlotsForDateParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type OutcastDate, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type ProviderWithTimeline, type Quote, type QuoteLineItem, type RegisterUserParams, type RequestOptions, type ReservationCartItem, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type Slot, type SpecificDate, type SubscribeParams, type TestWebhookParams, type TimelinePoint, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type WorkingDay, type WorkingHour, type WorkingTime, type Zone };
|
package/dist/types.d.ts
CHANGED
|
@@ -100,8 +100,6 @@ interface ReservationCartItem {
|
|
|
100
100
|
from: number;
|
|
101
101
|
to: number;
|
|
102
102
|
timeText: string;
|
|
103
|
-
isMultiDay: boolean;
|
|
104
|
-
reservationMethod: string;
|
|
105
103
|
providerId?: string;
|
|
106
104
|
blocks: any[];
|
|
107
105
|
}
|
|
@@ -245,13 +243,11 @@ interface ReservationStoreState {
|
|
|
245
243
|
selectedDate: string | null;
|
|
246
244
|
slots: any[];
|
|
247
245
|
selectedSlot: any | null;
|
|
248
|
-
selectedMethod: string | null;
|
|
249
246
|
selectedProvider: any | null;
|
|
250
247
|
providers: any[];
|
|
251
248
|
loading: boolean;
|
|
252
249
|
startDate: string | null;
|
|
253
250
|
endDate: string | null;
|
|
254
|
-
isMultiDay: boolean;
|
|
255
251
|
phoneNumber: string;
|
|
256
252
|
phoneError: string | null;
|
|
257
253
|
phoneSuccess: string | null;
|
|
@@ -407,13 +403,6 @@ interface GetReservationQuoteParams {
|
|
|
407
403
|
location?: any;
|
|
408
404
|
zoneId?: string;
|
|
409
405
|
}
|
|
410
|
-
interface GetAvailableSlotsParams {
|
|
411
|
-
serviceId: string;
|
|
412
|
-
providerId?: string | null;
|
|
413
|
-
from: number;
|
|
414
|
-
to: number;
|
|
415
|
-
limit?: number;
|
|
416
|
-
}
|
|
417
406
|
interface GetServiceProvidersParams {
|
|
418
407
|
serviceId: string;
|
|
419
408
|
from: number;
|
|
@@ -760,7 +749,6 @@ interface CreateServiceParams {
|
|
|
760
749
|
categoryFilterBlocks?: any[];
|
|
761
750
|
prices?: any[];
|
|
762
751
|
durations?: any[];
|
|
763
|
-
reservationMethods?: any[];
|
|
764
752
|
reservationConfigs?: any;
|
|
765
753
|
statuses?: any[];
|
|
766
754
|
[key: string]: any;
|
|
@@ -774,7 +762,6 @@ interface UpdateServiceParams {
|
|
|
774
762
|
categoryFilterBlocks?: any[];
|
|
775
763
|
prices?: any[];
|
|
776
764
|
durations?: any[];
|
|
777
|
-
reservationMethods?: any[];
|
|
778
765
|
reservationConfigs?: any;
|
|
779
766
|
statuses?: any[];
|
|
780
767
|
[key: string]: any;
|
|
@@ -990,5 +977,34 @@ interface TrackEventParams {
|
|
|
990
977
|
eventName: string;
|
|
991
978
|
value?: number;
|
|
992
979
|
}
|
|
980
|
+
interface GetSlotsForDateParams {
|
|
981
|
+
serviceId: string;
|
|
982
|
+
date: Date;
|
|
983
|
+
timezone: string;
|
|
984
|
+
providerId?: string;
|
|
985
|
+
}
|
|
986
|
+
interface GetAvailabilityParams {
|
|
987
|
+
serviceId: string;
|
|
988
|
+
from: Date;
|
|
989
|
+
to: Date;
|
|
990
|
+
timezone: string;
|
|
991
|
+
}
|
|
992
|
+
interface DayAvailability {
|
|
993
|
+
date: Date;
|
|
994
|
+
available: boolean;
|
|
995
|
+
}
|
|
996
|
+
/**
|
|
997
|
+
* A bookable time slot returned by getSlotsForDate.
|
|
998
|
+
* Contains all information needed to display and book the slot.
|
|
999
|
+
*/
|
|
1000
|
+
interface Slot {
|
|
1001
|
+
id: string;
|
|
1002
|
+
serviceId: string;
|
|
1003
|
+
providerId: string;
|
|
1004
|
+
from: number;
|
|
1005
|
+
to: number;
|
|
1006
|
+
timeText: string;
|
|
1007
|
+
dateText: string;
|
|
1008
|
+
}
|
|
993
1009
|
|
|
994
|
-
export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateFeatureFlagParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteFeatureFlagParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type
|
|
1010
|
+
export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateFeatureFlagParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DayAvailability, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteFeatureFlagParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailabilityParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServiceProvidersParams, type GetServicesParams, type GetSlotsForDateParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type OutcastDate, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type ProviderWithTimeline, type Quote, type QuoteLineItem, type RegisterUserParams, type RequestOptions, type ReservationCartItem, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type Slot, type SpecificDate, type SubscribeParams, type TestWebhookParams, type TimelinePoint, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type WorkingDay, type WorkingHour, type WorkingTime, type Zone };
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AA8BO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.js","sourcesContent":["export * from './api';\n\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\ttax?: {\n\t\tamount: number;\n\t\tmodeSnapshot?: string;\n\t\trateBps: number;\n\t\tlines: Array<{ rateBps: number; amount: number; label?: string; scope?: string }>;\n\t};\n\tpromoCode?: {\n\t\tid: string;\n\t\tcode: string;\n\t\ttype: string;\n\t\tvalue: number;\n\t};\n\ttype: PaymentMethodType;\n\tprovider?: {\n\t\tcustomerId: string;\n\t\tpaymentIntentId?: string;\n\t\tsubscriptionId?: string;\n\t\tpriceId?: string;\n\t};\n}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\nexport interface Quote {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tlineItems: QuoteLineItem[];\n\tshippingMethod: ShippingMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tavailableShippingMethods: ShippingMethod[];\n\tavailablePaymentMethods: PaymentMethod[];\n\tpayment: Payment;\n\tchargeAmount: number;\n}\n\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tpostalCode?: string | null;\n\tcountryCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\nexport interface EshopCartItem {\n\tid: string;\n\tproductId: string;\n\tvariantId: string;\n\tproductName: string;\n\tproductSlug: string;\n\tvariantAttributes: Record<string, any>;\n\tprice: Price;\n\tquantity: number;\n\taddedAt: number;\n}\n\nexport interface ReservationCartItem {\n\tid: string;\n\tserviceId: string;\n\tserviceName: string;\n\tdate: string;\n\tfrom: number;\n\tto: number;\n\ttimeText: string;\n\
|
|
1
|
+
{"version":3,"sources":["../src/types/index.ts"],"names":["PaymentMethodType"],"mappings":";AA8BO,IAAK,iBAAA,qBAAAA,kBAAAA,KAAL;AACN,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AACP,EAAAA,mBAAA,YAAA,CAAA,GAAa,aAAA;AACb,EAAAA,mBAAA,MAAA,CAAA,GAAO,MAAA;AAHI,EAAA,OAAAA,kBAAAA;AAAA,CAAA,EAAA,iBAAA,IAAA,EAAA","file":"types.js","sourcesContent":["export * from './api';\n\nexport interface Payment {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\ttax?: {\n\t\tamount: number;\n\t\tmodeSnapshot?: string;\n\t\trateBps: number;\n\t\tlines: Array<{ rateBps: number; amount: number; label?: string; scope?: string }>;\n\t};\n\tpromoCode?: {\n\t\tid: string;\n\t\tcode: string;\n\t\ttype: string;\n\t\tvalue: number;\n\t};\n\ttype: PaymentMethodType;\n\tprovider?: {\n\t\tcustomerId: string;\n\t\tpaymentIntentId?: string;\n\t\tsubscriptionId?: string;\n\t\tpriceId?: string;\n\t};\n}\n\nexport enum PaymentMethodType {\n\tCash = \"CASH\",\n\tCreditCard = \"CREDIT_CARD\",\n\tFree = \"FREE\",\n}\n\nexport interface QuoteLineItem {\n\titemType: string;\n\tid: string;\n\tname: string;\n\tquantity: number;\n\tunitPrice: number;\n\ttotal: number;\n}\n\nexport interface PromoCodeValidation {\n\tid: string;\n\tcode: string;\n\tdiscountType: any;\n\tdiscountValue: number;\n\tconditions: any[];\n}\n\nexport interface Quote {\n\tcurrency: string;\n\tmarket: string;\n\tsubtotal: number;\n\tshipping: number;\n\tdiscount: number;\n\ttotal: number;\n\tlineItems: QuoteLineItem[];\n\tshippingMethod: ShippingMethod | null;\n\tpromoCode: PromoCodeValidation | null;\n\tavailableShippingMethods: ShippingMethod[];\n\tavailablePaymentMethods: PaymentMethod[];\n\tpayment: Payment;\n\tchargeAmount: number;\n}\n\nexport interface Price {\n\tmarket: string;\n\tamount: number;\n\tcompareAt?: number;\n}\n\nexport interface Location {\n\tcountry?: string | null;\n\taddress?: string | null;\n\tcity?: string | null;\n\tpostalCode?: string | null;\n\tcountryCode?: string | null;\n\tcoordinates?: { lat: number; lon: number } | null;\n}\n\nexport interface EshopCartItem {\n\tid: string;\n\tproductId: string;\n\tvariantId: string;\n\tproductName: string;\n\tproductSlug: string;\n\tvariantAttributes: Record<string, any>;\n\tprice: Price;\n\tquantity: number;\n\taddedAt: number;\n}\n\nexport interface ReservationCartItem {\n\tid: string;\n\tserviceId: string;\n\tserviceName: string;\n\tdate: string;\n\tfrom: number;\n\tto: number;\n\ttimeText: string;\n\tproviderId?: string;\n\tblocks: any[];\n}\n\nexport interface PaymentProviderConfig {\n\ttype: \"STRIPE\";\n\tpublicKey: string;\n\tsecretKey: string;\n\twebhookSecret: string;\n}\n\nexport interface ShippingWeightTier {\n\tupToGrams: number;\n\tamount: number;\n}\n\nexport interface PaymentMethod {\n\tid: string;\n\tname: Record<string, string>;\n\ttype: PaymentMethodType;\n}\n\nexport interface ShippingMethod {\n\tid: string;\n\tname: Record<string, string>;\n\ttaxable: boolean;\n\tetaText: string;\n\tpickupLocation?: Location;\n\tamount: number;\n\tfreeAbove?: number;\n\tweightTiers?: ShippingWeightTier[];\n}\n\nexport interface Zone {\n\tid: string;\n\tname: string;\n\tmarketId: string;\n\tcountries: string[];\n\tstates: string[];\n\tcities: string[];\n\tpostalCodes: string[];\n\ttaxBps: number;\n\tpaymentMethods: PaymentMethod[];\n\tshippingMethods: ShippingMethod[];\n}\n\nexport interface Market {\n\tid: string;\n\tcurrency: string;\n\ttaxMode: \"EXCLUSIVE\" | \"INCLUSIVE\";\n}\n\n\nexport interface Language {\n\tid: string;\n}\n\nexport interface BusinessEmails {\n\tbilling: string;\n\tsupport: string;\n}\n\nexport interface BusinessConfig {\n\tlanguages: Language[];\n\tmarkets: Market[];\n\tzones: Zone[];\n\tbuildHooks: string[];\n\twebhooks: any[];\n\torderBlocks: any[];\n\treservationBlocks: any[];\n\tpaymentProvider?: PaymentProviderConfig;\n\taiProvider?: any;\n\temails: BusinessEmails;\n}\n\nexport interface Business {\n\tid: string;\n\tname: string;\n\tconfigs?: BusinessConfig;\n}\n\nexport interface EshopStoreState {\n\tbusinessId: string;\n\tselectedShippingMethodId: string | null;\n\tuserToken: string | null;\n\tprocessingCheckout: boolean;\n\tloading: boolean;\n\terror: string | null;\n\tphoneNumber: string;\n\tphoneError: string | null;\n\tverificationCode: string;\n\tverifyError: string | null;\n}\n\nexport interface Block {\n\tid: string;\n\tkey: string;\n\ttype: string;\n\tproperties?: any;\n\tvalue?: any;\n}\n\nexport interface Seo {\n\tslug: Record<string, string>;\n\tmetaTitle: Record<string, string>;\n\tmetaDescription: Record<string, string>;\n\tcanonicalUrl: Record<string, string>;\n\togImage: string;\n}\n\nexport interface MediaResolution {\n\tid: string;\n\tsize: string;\n\turl: string;\n}\n\nexport interface Media {\n\tid: string;\n\tresolutions: { [key: string]: MediaResolution };\n\tmimeType: string;\n\ttitle?: string | null;\n\tdescription?: string | null;\n\talt?: string | null;\n\towner: string;\n\tmetadata?: string | null;\n\tuploadedAt: string;\n\tseo: Seo;\n}\n\nexport interface ApiResponse<T> {\n\tsuccess: boolean;\n\tdata?: T;\n\terror?: string;\n\tcursor?: string;\n\ttotal?: number;\n}\n\nexport interface PaginatedResponse<T> {\n\tdata: T[];\n\tmeta?: {\n\t\ttotal: number;\n\t\tpage: number;\n\t\tper_page: number;\n\t};\n}\n\nexport interface ReservationStoreState {\n\tcurrentStep: number;\n\ttotalSteps: number;\n\tsteps: Record<number, { name: string; labelKey: string }>;\n\tweekdays: string[];\n\tmonthYear: string;\n\tdays: any[];\n\tcurrent: Date;\n\tselectedDate: string | null;\n\tslots: any[];\n\tselectedSlot: any | null;\n\tselectedProvider: any | null;\n\tproviders: any[];\n\tloading: boolean;\n\tstartDate: string | null;\n\tendDate: string | null;\n\tphoneNumber: string;\n\tphoneError: string | null;\n\tphoneSuccess: string | null;\n\tverificationCode: string;\n\tverifyError: string | null;\n\tisPhoneVerified: boolean;\n\tisSendingCode: boolean;\n\tisVerifying: boolean;\n\tcodeSentAt: number | null;\n\tcanResendAt: number | null;\n\tguestToken: string | null;\n\tservice: any | null;\n\tbusiness: Business | null;\n\tcurrency: string;\n\treservationBlocks: Block[];\n\tapiUrl: string;\n\tbusinessId: string;\n\ttimezone: string;\n\ttzGroups: any;\n\titems: ReservationCartItem[];\n\tallowedPaymentMethods: string[];\n\tpaymentConfig: {\n\t\tprovider: PaymentProviderConfig | null;\n\t\tenabled: boolean;\n\t};\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "arky-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.79",
|
|
4
4
|
"description": "Official TypeScript SDK for Arky - All-in-one business platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -11,17 +11,22 @@
|
|
|
11
11
|
"types": "./dist/index.d.ts",
|
|
12
12
|
"import": "./dist/index.js",
|
|
13
13
|
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./utils": {
|
|
16
|
+
"types": "./dist/utils.d.ts",
|
|
17
|
+
"import": "./dist/utils.js",
|
|
18
|
+
"require": "./dist/utils.cjs"
|
|
19
|
+
},
|
|
20
|
+
"./types": {
|
|
21
|
+
"types": "./dist/types.d.ts",
|
|
22
|
+
"import": "./dist/types.js",
|
|
23
|
+
"require": "./dist/types.cjs"
|
|
14
24
|
}
|
|
15
25
|
},
|
|
16
26
|
"files": [
|
|
17
27
|
"dist",
|
|
18
28
|
"README.md"
|
|
19
29
|
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"build": "tsup",
|
|
22
|
-
"dev": "tsup --watch",
|
|
23
|
-
"clean": "rm -rf dist"
|
|
24
|
-
},
|
|
25
30
|
"keywords": [
|
|
26
31
|
"arky",
|
|
27
32
|
"sdk",
|
|
@@ -38,9 +43,16 @@
|
|
|
38
43
|
"type": "git",
|
|
39
44
|
"url": "https://github.com/0xDjole/arky-sdk.git"
|
|
40
45
|
},
|
|
41
|
-
"dependencies": {
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"nanostores": "^1.1.0"
|
|
48
|
+
},
|
|
42
49
|
"devDependencies": {
|
|
43
50
|
"tsup": "^8.5.0",
|
|
44
51
|
"typescript": "^5.8.3"
|
|
52
|
+
},
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsup",
|
|
55
|
+
"dev": "tsup --watch",
|
|
56
|
+
"clean": "rm -rf dist"
|
|
45
57
|
}
|
|
46
|
-
}
|
|
58
|
+
}
|