arky-sdk 0.3.6 → 0.3.8
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 +829 -1278
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -192
- package/dist/index.d.ts +5 -192
- package/dist/index.js +830 -1215
- package/dist/index.js.map +1 -1
- package/dist/timezone-Cnh6zsAn.d.ts +87 -0
- package/dist/timezone-Ctc3v4hK.d.cts +87 -0
- package/dist/utils.d.cts +164 -1
- package/dist/utils.d.ts +164 -1
- package/package.json +1 -11
- package/dist/index-DEmVFs0E.d.ts +0 -256
- package/dist/index-DOEos-hV.d.cts +0 -256
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { ApiResponse,
|
|
3
|
-
import { g as getGalleryThumbnail, a as getMarketPrice, b as getPriceAmount, f as formatPayment, c as formatMinor, d as createPaymentForCheckout, e as getCurrencySymbol, v as validatePhoneNumber, h as findTimeZone } from './
|
|
4
|
-
export { C as Collection, i as CollectionEntry, E as ERROR_CODES, x as ERROR_CONSTANTS, R as RequestError, S as SYMBOL_AFTER_CURRENCIES, y as ServerError, V as ValidationError, U as ValidationResult, P as categorify, D as convertServerErrorToRequestError, G as convertToMajor, H as convertToMinor, F as errors, l as extractBlockValues, K as fetchSvgContent, k as formatBlockValue, J as formatCurrencyAmount, Q as formatDate, r as getBlockFromArray, j as getBlockLabel, q as getBlockObjectValues, m as getBlockTextValue, n as getBlockValue, o as getBlockValues, I as getCurrencyFromMarket, z as getErrorMessage, s as getImageUrl, L as getSvgContentForAstro, O as humanize, M as injectSvgIntoElement, A as isErrorCode, w as isSymbolAfterCurrency, p as prepareBlocksForSubmission, N as slugify, t as thumbnailUrl, B as transformErrors, u as translateMap, T as tzGroups, W as validateEmail, Y as validateRequired, X as validateVerificationCode } from './index-DOEos-hV.cjs';
|
|
1
|
+
import { UpdateUserProfileParams, RequestOptions, UpdateProfilePhoneParams, VerifyPhoneCodeParams, GetUsersParams, SetRoleParams, LoginUserParams, RegisterUserParams, ConfirmUserParams, GetLoginUrlParams, ForgotPasswordParams, ResetForgotPasswordParams, ResetPasswordParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessParentsParams, TriggerBuildsParams, GetSubscriptionParams, CreateSubscriptionParams, UpdateSubscriptionParams, CancelSubscriptionParams, ReactivateSubscriptionParams, CreatePortalSessionParams, InviteUserParams, HandleInvitationParams, TestWebhookParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, CreateRoleParams, UpdateRoleParams, DeleteRoleParams, GetRoleParams, GetRolesParams, GetNotificationsParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetAnalyticsParams, GetAnalyticsHealthParams, SetupAnalyticsParams, CreateCollectionParams, UpdateCollectionParams, DeleteCollectionParams, GetCollectionParams, GetCollectionsParams, GetEntriesParams, CreateEntryParams, UpdateEntryParams, DeleteCollectionEntryParams, GetCollectionEntryParams, SendEntryParams, GetVariableMetadataParams, CreateProductParams, UpdateProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, UpdateOrderStatusParams, UpdateOrderPaymentStatusParams, GetQuoteParams, CheckoutParams, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, GetReservationPartsParams, SearchReservationsParams, SearchMyReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, GetAvailableSlotsParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, NewsletterFindParams, NewsletterGetParams, CreateNewsletterParams, UpdateNewsletterParams, DeleteNewsletterParams, GetSubscribersParams, NewsletterSubscribeParams, UnsubscribeParams, HandleStripeWebhookParams, GetBusinessMarketsParams, GetBusinessMarketParams } from './types.cjs';
|
|
2
|
+
export { ApiResponse, Block, Business, EshopCartItem, EshopStoreState, Price, ReservationCartPart, ReservationStoreState } from './types.cjs';
|
|
3
|
+
import { g as getGalleryThumbnail, a as getMarketPrice, b as getPriceAmount, f as formatPayment, c as formatMinor, d as createPaymentForCheckout, e as getCurrencySymbol, v as validatePhoneNumber, h as findTimeZone } from './timezone-Ctc3v4hK.cjs';
|
|
5
4
|
|
|
6
5
|
interface AuthTokens {
|
|
7
6
|
accessToken: string;
|
|
@@ -27,193 +26,7 @@ interface HttpClientConfig {
|
|
|
27
26
|
isAuthenticated?: () => boolean;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
declare const
|
|
31
|
-
createCollection(params: CreateCollectionParams, options?: RequestOptions): Promise<any>;
|
|
32
|
-
updateCollection(params: UpdateCollectionParams, options?: RequestOptions): Promise<any>;
|
|
33
|
-
deleteCollection(params: DeleteCollectionParams, options?: RequestOptions): Promise<any>;
|
|
34
|
-
getCollection(params: GetCollectionParams, options?: RequestOptions): Promise<any>;
|
|
35
|
-
getCollections(params?: GetCollectionsParams, options?: RequestOptions): Promise<any>;
|
|
36
|
-
generateBlocks(params: any, options?: RequestOptions): Promise<any>;
|
|
37
|
-
getCollectionEntries(params?: GetEntriesParams, options?: RequestOptions): Promise<any>;
|
|
38
|
-
createCollectionEntry(params: CreateEntryParams, options?: RequestOptions): Promise<any>;
|
|
39
|
-
updateCollectionEntry(params: UpdateEntryParams, options?: RequestOptions): Promise<any>;
|
|
40
|
-
deleteCollectionEntry(params: DeleteCollectionEntryParams, options?: RequestOptions): Promise<any>;
|
|
41
|
-
getCollectionEntry(params: GetCollectionEntryParams, options?: RequestOptions): Promise<any>;
|
|
42
|
-
sendEntry(params: SendEntryParams, options?: RequestOptions): Promise<any>;
|
|
43
|
-
getVariableMetadata(params: GetVariableMetadataParams, options?: RequestOptions): Promise<any>;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
declare const createEshopApi: (apiConfig: ApiConfig) => {
|
|
47
|
-
createProduct(params: CreateProductParams, options?: RequestOptions): Promise<any>;
|
|
48
|
-
updateProduct(params: UpdateProductParams, options?: RequestOptions): Promise<any>;
|
|
49
|
-
deleteProduct(id: string, options?: RequestOptions): Promise<any>;
|
|
50
|
-
getProduct(params: GetProductParams, options?: RequestOptions): Promise<any>;
|
|
51
|
-
getProducts(params?: GetProductsParams, options?: RequestOptions): Promise<any>;
|
|
52
|
-
createOrder(params: CreateOrderParams, options?: RequestOptions): Promise<any>;
|
|
53
|
-
updateOrder(params: UpdateOrderParams, options?: RequestOptions): Promise<any>;
|
|
54
|
-
getOrder(params: GetOrderParams, options?: RequestOptions): Promise<any>;
|
|
55
|
-
getOrders(params?: GetOrdersParams, options?: RequestOptions): Promise<any>;
|
|
56
|
-
updateOrderStatus(params: UpdateOrderStatusParams, options?: RequestOptions): Promise<any>;
|
|
57
|
-
updateOrderPaymentStatus(params: UpdateOrderPaymentStatusParams, options?: RequestOptions): Promise<any>;
|
|
58
|
-
getQuote(params: GetQuoteParams, options?: RequestOptions): Promise<any>;
|
|
59
|
-
checkout(params: CheckoutParams, options?: RequestOptions): Promise<any>;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
declare const createReservationApi: (apiConfig: ApiConfig) => {
|
|
63
|
-
createReservation(params: CreateReservationParams, options?: RequestOptions): Promise<any>;
|
|
64
|
-
updateReservation(params: UpdateReservationParams, options?: RequestOptions): Promise<any>;
|
|
65
|
-
checkout(params: ReservationCheckoutParams, options?: RequestOptions): Promise<any>;
|
|
66
|
-
getReservation(params: GetReservationParams, options?: RequestOptions): Promise<any>;
|
|
67
|
-
getReservationParts(params?: GetReservationPartsParams, options?: RequestOptions): Promise<any>;
|
|
68
|
-
searchReservations(params: SearchReservationsParams, options?: RequestOptions): Promise<any>;
|
|
69
|
-
searchMyReservations(params?: SearchMyReservationsParams, options?: RequestOptions): Promise<any>;
|
|
70
|
-
getQuote(params: GetReservationQuoteParams, options?: RequestOptions): Promise<any>;
|
|
71
|
-
createService(params: CreateServiceParams, options?: RequestOptions): Promise<any>;
|
|
72
|
-
updateService(params: UpdateServiceParams, options?: RequestOptions): Promise<any>;
|
|
73
|
-
deleteService(params: DeleteServiceParams, options?: RequestOptions): Promise<any>;
|
|
74
|
-
getService(params: GetServiceParams, options?: RequestOptions): Promise<any>;
|
|
75
|
-
getServices(params?: GetServicesParams, options?: RequestOptions): Promise<any>;
|
|
76
|
-
getAvailableSlots(params: GetAvailableSlotsParams, options?: RequestOptions): Promise<any>;
|
|
77
|
-
createProvider(params: CreateProviderParams, options?: RequestOptions): Promise<any>;
|
|
78
|
-
updateProvider(params: UpdateProviderParams, options?: RequestOptions): Promise<any>;
|
|
79
|
-
deleteProvider(params: DeleteProviderParams, options?: RequestOptions): Promise<any>;
|
|
80
|
-
getProvider(params: GetProviderParams, options?: RequestOptions): Promise<any>;
|
|
81
|
-
getProviders(params: GetProvidersParams, options?: RequestOptions): Promise<any>;
|
|
82
|
-
getProviderWorkingTime(params: GetBusinessServiceWorkingTimeParams, options?: RequestOptions): Promise<any>;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
declare const createNewsletterApi: (apiConfig: ApiConfig) => {
|
|
86
|
-
find(params: NewsletterFindParams, options?: RequestOptions): Promise<any>;
|
|
87
|
-
get(params: NewsletterGetParams, options?: RequestOptions): Promise<any>;
|
|
88
|
-
create(params: CreateNewsletterParams, options?: RequestOptions): Promise<any>;
|
|
89
|
-
update(params: UpdateNewsletterParams, options?: RequestOptions): Promise<any>;
|
|
90
|
-
delete(params: DeleteNewsletterParams, options?: RequestOptions): Promise<any>;
|
|
91
|
-
getSubscribers(params: GetSubscribersParams, options?: RequestOptions): Promise<any>;
|
|
92
|
-
subscribe(params: NewsletterSubscribeParams, options?: RequestOptions): Promise<any>;
|
|
93
|
-
unsubscribe(params: UnsubscribeParams, options?: RequestOptions): Promise<any>;
|
|
94
|
-
unsubscribeWithToken(params: UnsubscribeParams, options?: RequestOptions): Promise<any>;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
declare const createUserApi: (apiConfig: ApiConfig) => {
|
|
98
|
-
updateUser(params: UpdateUserProfileParams, options?: RequestOptions): Promise<any>;
|
|
99
|
-
updateProfilePhone(params: UpdateProfilePhoneParams, options?: RequestOptions): Promise<any>;
|
|
100
|
-
verifyPhoneCode(params: VerifyPhoneCodeParams, options?: RequestOptions): Promise<any>;
|
|
101
|
-
getUserLocation(options?: RequestOptions): Promise<any>;
|
|
102
|
-
getMe(options?: RequestOptions): Promise<any>;
|
|
103
|
-
searchUsers(params: GetUsersParams, options?: RequestOptions): Promise<any>;
|
|
104
|
-
setUserRole(params: SetRoleParams, options?: RequestOptions): Promise<any>;
|
|
105
|
-
loginUser(params: LoginUserParams, options?: RequestOptions): Promise<any>;
|
|
106
|
-
registerUser(params: RegisterUserParams, options?: RequestOptions): Promise<any>;
|
|
107
|
-
logout(options?: RequestOptions): Promise<any>;
|
|
108
|
-
confirmUser(params: ConfirmUserParams, options?: RequestOptions): Promise<any>;
|
|
109
|
-
getLoginUrl(params: GetLoginUrlParams, options?: RequestOptions): Promise<any>;
|
|
110
|
-
getGuestToken(params: {
|
|
111
|
-
existingToken?: string;
|
|
112
|
-
}, options?: RequestOptions): Promise<string>;
|
|
113
|
-
forgotPassword(params: ForgotPasswordParams, options?: RequestOptions): Promise<any>;
|
|
114
|
-
resetForgotPassword(params: ResetForgotPasswordParams, options?: RequestOptions): Promise<any>;
|
|
115
|
-
resetPassword(params: ResetPasswordParams, options?: RequestOptions): Promise<any>;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
declare const createBusinessApi: (apiConfig: ApiConfig) => {
|
|
119
|
-
createBusiness(params: CreateBusinessParams, options?: RequestOptions): Promise<any>;
|
|
120
|
-
updateBusiness(params: UpdateBusinessParams, options?: RequestOptions): Promise<any>;
|
|
121
|
-
deleteBusiness(params: DeleteBusinessParams, options?: RequestOptions): Promise<any>;
|
|
122
|
-
getBusiness(params: GetBusinessParams, options?: RequestOptions): Promise<any>;
|
|
123
|
-
getBusinesses(options?: RequestOptions): Promise<any>;
|
|
124
|
-
getBusinessParents(params: GetBusinessParentsParams, options?: RequestOptions): Promise<any>;
|
|
125
|
-
triggerBuilds(params: TriggerBuildsParams, options?: RequestOptions): Promise<any>;
|
|
126
|
-
getSubscriptionPlans(options?: RequestOptions): Promise<any>;
|
|
127
|
-
getSubscription(params: GetSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
128
|
-
createSubscription(params: CreateSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
129
|
-
updateSubscription(params: UpdateSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
130
|
-
cancelSubscription(params: CancelSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
131
|
-
reactivateSubscription(params: ReactivateSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
132
|
-
createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions): Promise<any>;
|
|
133
|
-
inviteUser(params: InviteUserParams, options?: RequestOptions): Promise<any>;
|
|
134
|
-
handleInvitation(params: HandleInvitationParams, options?: RequestOptions): Promise<any>;
|
|
135
|
-
testWebhook(params: TestWebhookParams, options?: RequestOptions): Promise<any>;
|
|
136
|
-
getBusinessMedia(params: {
|
|
137
|
-
id: string;
|
|
138
|
-
cursor?: string | null;
|
|
139
|
-
limit?: number;
|
|
140
|
-
}, options?: RequestOptions): Promise<any>;
|
|
141
|
-
setProviderSchedule(params: {
|
|
142
|
-
id: string;
|
|
143
|
-
workingTime: any;
|
|
144
|
-
serviceIds: string[];
|
|
145
|
-
providerIds: string[];
|
|
146
|
-
}, options?: RequestOptions): Promise<any>;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
declare const createMediaApi: (apiConfig: ApiConfig) => {
|
|
150
|
-
uploadBusinessMedia(params: UploadBusinessMediaParams): Promise<any>;
|
|
151
|
-
deleteBusinessMedia(params: DeleteBusinessMediaParams, options?: RequestOptions): Promise<any>;
|
|
152
|
-
getBusinessMedia(params: GetBusinessMediaParams): Promise<any>;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
declare const createRoleApi: (apiConfig: ApiConfig) => {
|
|
156
|
-
createRole(params: CreateRoleParams, options?: RequestOptions): Promise<void>;
|
|
157
|
-
updateRole(params: UpdateRoleParams, options?: RequestOptions): Promise<any>;
|
|
158
|
-
deleteRole(params: DeleteRoleParams, options?: RequestOptions): Promise<any>;
|
|
159
|
-
getRole(params: GetRoleParams, options?: RequestOptions): Promise<any>;
|
|
160
|
-
getRoles(params?: GetRolesParams, options?: RequestOptions): Promise<any>;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
declare const createNotificationApi: (apiConfig: ApiConfig) => {
|
|
164
|
-
getNotifications(params: GetNotificationsParams, options?: RequestOptions): Promise<any>;
|
|
165
|
-
updateNotifications(options?: RequestOptions): Promise<any>;
|
|
166
|
-
trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions): Promise<any>;
|
|
167
|
-
getDeliveryStats(params: GetDeliveryStatsParams, options?: RequestOptions): Promise<any>;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
declare const createPromoCodeApi: (apiConfig: ApiConfig) => {
|
|
171
|
-
createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
172
|
-
updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
173
|
-
deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
174
|
-
getPromoCode(params: GetPromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
175
|
-
getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions): Promise<any>;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
declare const createAnalyticsApi: (apiConfig: ApiConfig) => {
|
|
179
|
-
getAnalytics(params: GetAnalyticsParams, options?: RequestOptions): Promise<any>;
|
|
180
|
-
getAnalyticsHealth(params: GetAnalyticsHealthParams, options?: RequestOptions): Promise<any>;
|
|
181
|
-
setupAnalytics(params: SetupAnalyticsParams, options?: RequestOptions): Promise<any>;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
declare const createPaymentApi: (apiConfig: ApiConfig) => {
|
|
185
|
-
handleStripeWebhook(params: HandleStripeWebhookParams, options?: RequestOptions): Promise<any>;
|
|
186
|
-
getBusinessMarkets(params: GetBusinessMarketsParams, options?: RequestOptions): Promise<any>;
|
|
187
|
-
getBusinessMarket(params: GetBusinessMarketParams, options?: RequestOptions): Promise<any>;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
declare function setDefaultLocale(locale: string): void;
|
|
191
|
-
declare function getLocale(): string;
|
|
192
|
-
declare function getLocaleFromUrl(url: URL): string;
|
|
193
|
-
declare function getLocalizedString(value: any, locale?: string): string;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Query parameter builder utility that maintains exact backward compatibility
|
|
197
|
-
* with existing API parameter encoding patterns
|
|
198
|
-
*/
|
|
199
|
-
interface QueryParams {
|
|
200
|
-
[key: string]: string | number | boolean | string[] | number[] | null | undefined;
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Builds a query string from parameters following the exact encoding patterns
|
|
204
|
-
* used by the existing API implementation:
|
|
205
|
-
* - Arrays: JSON.stringify then encodeURIComponent
|
|
206
|
-
* - Strings: encodeURIComponent
|
|
207
|
-
* - Numbers: No encoding
|
|
208
|
-
* - Null/undefined: Skip
|
|
209
|
-
*/
|
|
210
|
-
declare function buildQueryString(params: QueryParams): string;
|
|
211
|
-
/**
|
|
212
|
-
* Appends query string to a URL
|
|
213
|
-
*/
|
|
214
|
-
declare function appendQueryString(url: string, params: QueryParams): string;
|
|
215
|
-
|
|
216
|
-
declare const SDK_VERSION = "0.3.5";
|
|
29
|
+
declare const SDK_VERSION = "0.3.8";
|
|
217
30
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
218
31
|
interface ApiConfig {
|
|
219
32
|
httpClient: any;
|
|
@@ -405,4 +218,4 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
405
218
|
};
|
|
406
219
|
};
|
|
407
220
|
|
|
408
|
-
export { type ApiConfig,
|
|
221
|
+
export { type ApiConfig, type HttpClientConfig, SDK_VERSION, SUPPORTED_FRAMEWORKS, createArkySDK };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { ApiResponse,
|
|
3
|
-
import { g as getGalleryThumbnail, a as getMarketPrice, b as getPriceAmount, f as formatPayment, c as formatMinor, d as createPaymentForCheckout, e as getCurrencySymbol, v as validatePhoneNumber, h as findTimeZone } from './
|
|
4
|
-
export { C as Collection, i as CollectionEntry, E as ERROR_CODES, x as ERROR_CONSTANTS, R as RequestError, S as SYMBOL_AFTER_CURRENCIES, y as ServerError, V as ValidationError, U as ValidationResult, P as categorify, D as convertServerErrorToRequestError, G as convertToMajor, H as convertToMinor, F as errors, l as extractBlockValues, K as fetchSvgContent, k as formatBlockValue, J as formatCurrencyAmount, Q as formatDate, r as getBlockFromArray, j as getBlockLabel, q as getBlockObjectValues, m as getBlockTextValue, n as getBlockValue, o as getBlockValues, I as getCurrencyFromMarket, z as getErrorMessage, s as getImageUrl, L as getSvgContentForAstro, O as humanize, M as injectSvgIntoElement, A as isErrorCode, w as isSymbolAfterCurrency, p as prepareBlocksForSubmission, N as slugify, t as thumbnailUrl, B as transformErrors, u as translateMap, T as tzGroups, W as validateEmail, Y as validateRequired, X as validateVerificationCode } from './index-DEmVFs0E.js';
|
|
1
|
+
import { UpdateUserProfileParams, RequestOptions, UpdateProfilePhoneParams, VerifyPhoneCodeParams, GetUsersParams, SetRoleParams, LoginUserParams, RegisterUserParams, ConfirmUserParams, GetLoginUrlParams, ForgotPasswordParams, ResetForgotPasswordParams, ResetPasswordParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessParentsParams, TriggerBuildsParams, GetSubscriptionParams, CreateSubscriptionParams, UpdateSubscriptionParams, CancelSubscriptionParams, ReactivateSubscriptionParams, CreatePortalSessionParams, InviteUserParams, HandleInvitationParams, TestWebhookParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, CreateRoleParams, UpdateRoleParams, DeleteRoleParams, GetRoleParams, GetRolesParams, GetNotificationsParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetAnalyticsParams, GetAnalyticsHealthParams, SetupAnalyticsParams, CreateCollectionParams, UpdateCollectionParams, DeleteCollectionParams, GetCollectionParams, GetCollectionsParams, GetEntriesParams, CreateEntryParams, UpdateEntryParams, DeleteCollectionEntryParams, GetCollectionEntryParams, SendEntryParams, GetVariableMetadataParams, CreateProductParams, UpdateProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, UpdateOrderStatusParams, UpdateOrderPaymentStatusParams, GetQuoteParams, CheckoutParams, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, GetReservationPartsParams, SearchReservationsParams, SearchMyReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, GetAvailableSlotsParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, NewsletterFindParams, NewsletterGetParams, CreateNewsletterParams, UpdateNewsletterParams, DeleteNewsletterParams, GetSubscribersParams, NewsletterSubscribeParams, UnsubscribeParams, HandleStripeWebhookParams, GetBusinessMarketsParams, GetBusinessMarketParams } from './types.js';
|
|
2
|
+
export { ApiResponse, Block, Business, EshopCartItem, EshopStoreState, Price, ReservationCartPart, ReservationStoreState } from './types.js';
|
|
3
|
+
import { g as getGalleryThumbnail, a as getMarketPrice, b as getPriceAmount, f as formatPayment, c as formatMinor, d as createPaymentForCheckout, e as getCurrencySymbol, v as validatePhoneNumber, h as findTimeZone } from './timezone-Cnh6zsAn.js';
|
|
5
4
|
|
|
6
5
|
interface AuthTokens {
|
|
7
6
|
accessToken: string;
|
|
@@ -27,193 +26,7 @@ interface HttpClientConfig {
|
|
|
27
26
|
isAuthenticated?: () => boolean;
|
|
28
27
|
}
|
|
29
28
|
|
|
30
|
-
declare const
|
|
31
|
-
createCollection(params: CreateCollectionParams, options?: RequestOptions): Promise<any>;
|
|
32
|
-
updateCollection(params: UpdateCollectionParams, options?: RequestOptions): Promise<any>;
|
|
33
|
-
deleteCollection(params: DeleteCollectionParams, options?: RequestOptions): Promise<any>;
|
|
34
|
-
getCollection(params: GetCollectionParams, options?: RequestOptions): Promise<any>;
|
|
35
|
-
getCollections(params?: GetCollectionsParams, options?: RequestOptions): Promise<any>;
|
|
36
|
-
generateBlocks(params: any, options?: RequestOptions): Promise<any>;
|
|
37
|
-
getCollectionEntries(params?: GetEntriesParams, options?: RequestOptions): Promise<any>;
|
|
38
|
-
createCollectionEntry(params: CreateEntryParams, options?: RequestOptions): Promise<any>;
|
|
39
|
-
updateCollectionEntry(params: UpdateEntryParams, options?: RequestOptions): Promise<any>;
|
|
40
|
-
deleteCollectionEntry(params: DeleteCollectionEntryParams, options?: RequestOptions): Promise<any>;
|
|
41
|
-
getCollectionEntry(params: GetCollectionEntryParams, options?: RequestOptions): Promise<any>;
|
|
42
|
-
sendEntry(params: SendEntryParams, options?: RequestOptions): Promise<any>;
|
|
43
|
-
getVariableMetadata(params: GetVariableMetadataParams, options?: RequestOptions): Promise<any>;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
declare const createEshopApi: (apiConfig: ApiConfig) => {
|
|
47
|
-
createProduct(params: CreateProductParams, options?: RequestOptions): Promise<any>;
|
|
48
|
-
updateProduct(params: UpdateProductParams, options?: RequestOptions): Promise<any>;
|
|
49
|
-
deleteProduct(id: string, options?: RequestOptions): Promise<any>;
|
|
50
|
-
getProduct(params: GetProductParams, options?: RequestOptions): Promise<any>;
|
|
51
|
-
getProducts(params?: GetProductsParams, options?: RequestOptions): Promise<any>;
|
|
52
|
-
createOrder(params: CreateOrderParams, options?: RequestOptions): Promise<any>;
|
|
53
|
-
updateOrder(params: UpdateOrderParams, options?: RequestOptions): Promise<any>;
|
|
54
|
-
getOrder(params: GetOrderParams, options?: RequestOptions): Promise<any>;
|
|
55
|
-
getOrders(params?: GetOrdersParams, options?: RequestOptions): Promise<any>;
|
|
56
|
-
updateOrderStatus(params: UpdateOrderStatusParams, options?: RequestOptions): Promise<any>;
|
|
57
|
-
updateOrderPaymentStatus(params: UpdateOrderPaymentStatusParams, options?: RequestOptions): Promise<any>;
|
|
58
|
-
getQuote(params: GetQuoteParams, options?: RequestOptions): Promise<any>;
|
|
59
|
-
checkout(params: CheckoutParams, options?: RequestOptions): Promise<any>;
|
|
60
|
-
};
|
|
61
|
-
|
|
62
|
-
declare const createReservationApi: (apiConfig: ApiConfig) => {
|
|
63
|
-
createReservation(params: CreateReservationParams, options?: RequestOptions): Promise<any>;
|
|
64
|
-
updateReservation(params: UpdateReservationParams, options?: RequestOptions): Promise<any>;
|
|
65
|
-
checkout(params: ReservationCheckoutParams, options?: RequestOptions): Promise<any>;
|
|
66
|
-
getReservation(params: GetReservationParams, options?: RequestOptions): Promise<any>;
|
|
67
|
-
getReservationParts(params?: GetReservationPartsParams, options?: RequestOptions): Promise<any>;
|
|
68
|
-
searchReservations(params: SearchReservationsParams, options?: RequestOptions): Promise<any>;
|
|
69
|
-
searchMyReservations(params?: SearchMyReservationsParams, options?: RequestOptions): Promise<any>;
|
|
70
|
-
getQuote(params: GetReservationQuoteParams, options?: RequestOptions): Promise<any>;
|
|
71
|
-
createService(params: CreateServiceParams, options?: RequestOptions): Promise<any>;
|
|
72
|
-
updateService(params: UpdateServiceParams, options?: RequestOptions): Promise<any>;
|
|
73
|
-
deleteService(params: DeleteServiceParams, options?: RequestOptions): Promise<any>;
|
|
74
|
-
getService(params: GetServiceParams, options?: RequestOptions): Promise<any>;
|
|
75
|
-
getServices(params?: GetServicesParams, options?: RequestOptions): Promise<any>;
|
|
76
|
-
getAvailableSlots(params: GetAvailableSlotsParams, options?: RequestOptions): Promise<any>;
|
|
77
|
-
createProvider(params: CreateProviderParams, options?: RequestOptions): Promise<any>;
|
|
78
|
-
updateProvider(params: UpdateProviderParams, options?: RequestOptions): Promise<any>;
|
|
79
|
-
deleteProvider(params: DeleteProviderParams, options?: RequestOptions): Promise<any>;
|
|
80
|
-
getProvider(params: GetProviderParams, options?: RequestOptions): Promise<any>;
|
|
81
|
-
getProviders(params: GetProvidersParams, options?: RequestOptions): Promise<any>;
|
|
82
|
-
getProviderWorkingTime(params: GetBusinessServiceWorkingTimeParams, options?: RequestOptions): Promise<any>;
|
|
83
|
-
};
|
|
84
|
-
|
|
85
|
-
declare const createNewsletterApi: (apiConfig: ApiConfig) => {
|
|
86
|
-
find(params: NewsletterFindParams, options?: RequestOptions): Promise<any>;
|
|
87
|
-
get(params: NewsletterGetParams, options?: RequestOptions): Promise<any>;
|
|
88
|
-
create(params: CreateNewsletterParams, options?: RequestOptions): Promise<any>;
|
|
89
|
-
update(params: UpdateNewsletterParams, options?: RequestOptions): Promise<any>;
|
|
90
|
-
delete(params: DeleteNewsletterParams, options?: RequestOptions): Promise<any>;
|
|
91
|
-
getSubscribers(params: GetSubscribersParams, options?: RequestOptions): Promise<any>;
|
|
92
|
-
subscribe(params: NewsletterSubscribeParams, options?: RequestOptions): Promise<any>;
|
|
93
|
-
unsubscribe(params: UnsubscribeParams, options?: RequestOptions): Promise<any>;
|
|
94
|
-
unsubscribeWithToken(params: UnsubscribeParams, options?: RequestOptions): Promise<any>;
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
declare const createUserApi: (apiConfig: ApiConfig) => {
|
|
98
|
-
updateUser(params: UpdateUserProfileParams, options?: RequestOptions): Promise<any>;
|
|
99
|
-
updateProfilePhone(params: UpdateProfilePhoneParams, options?: RequestOptions): Promise<any>;
|
|
100
|
-
verifyPhoneCode(params: VerifyPhoneCodeParams, options?: RequestOptions): Promise<any>;
|
|
101
|
-
getUserLocation(options?: RequestOptions): Promise<any>;
|
|
102
|
-
getMe(options?: RequestOptions): Promise<any>;
|
|
103
|
-
searchUsers(params: GetUsersParams, options?: RequestOptions): Promise<any>;
|
|
104
|
-
setUserRole(params: SetRoleParams, options?: RequestOptions): Promise<any>;
|
|
105
|
-
loginUser(params: LoginUserParams, options?: RequestOptions): Promise<any>;
|
|
106
|
-
registerUser(params: RegisterUserParams, options?: RequestOptions): Promise<any>;
|
|
107
|
-
logout(options?: RequestOptions): Promise<any>;
|
|
108
|
-
confirmUser(params: ConfirmUserParams, options?: RequestOptions): Promise<any>;
|
|
109
|
-
getLoginUrl(params: GetLoginUrlParams, options?: RequestOptions): Promise<any>;
|
|
110
|
-
getGuestToken(params: {
|
|
111
|
-
existingToken?: string;
|
|
112
|
-
}, options?: RequestOptions): Promise<string>;
|
|
113
|
-
forgotPassword(params: ForgotPasswordParams, options?: RequestOptions): Promise<any>;
|
|
114
|
-
resetForgotPassword(params: ResetForgotPasswordParams, options?: RequestOptions): Promise<any>;
|
|
115
|
-
resetPassword(params: ResetPasswordParams, options?: RequestOptions): Promise<any>;
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
declare const createBusinessApi: (apiConfig: ApiConfig) => {
|
|
119
|
-
createBusiness(params: CreateBusinessParams, options?: RequestOptions): Promise<any>;
|
|
120
|
-
updateBusiness(params: UpdateBusinessParams, options?: RequestOptions): Promise<any>;
|
|
121
|
-
deleteBusiness(params: DeleteBusinessParams, options?: RequestOptions): Promise<any>;
|
|
122
|
-
getBusiness(params: GetBusinessParams, options?: RequestOptions): Promise<any>;
|
|
123
|
-
getBusinesses(options?: RequestOptions): Promise<any>;
|
|
124
|
-
getBusinessParents(params: GetBusinessParentsParams, options?: RequestOptions): Promise<any>;
|
|
125
|
-
triggerBuilds(params: TriggerBuildsParams, options?: RequestOptions): Promise<any>;
|
|
126
|
-
getSubscriptionPlans(options?: RequestOptions): Promise<any>;
|
|
127
|
-
getSubscription(params: GetSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
128
|
-
createSubscription(params: CreateSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
129
|
-
updateSubscription(params: UpdateSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
130
|
-
cancelSubscription(params: CancelSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
131
|
-
reactivateSubscription(params: ReactivateSubscriptionParams, options?: RequestOptions): Promise<any>;
|
|
132
|
-
createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions): Promise<any>;
|
|
133
|
-
inviteUser(params: InviteUserParams, options?: RequestOptions): Promise<any>;
|
|
134
|
-
handleInvitation(params: HandleInvitationParams, options?: RequestOptions): Promise<any>;
|
|
135
|
-
testWebhook(params: TestWebhookParams, options?: RequestOptions): Promise<any>;
|
|
136
|
-
getBusinessMedia(params: {
|
|
137
|
-
id: string;
|
|
138
|
-
cursor?: string | null;
|
|
139
|
-
limit?: number;
|
|
140
|
-
}, options?: RequestOptions): Promise<any>;
|
|
141
|
-
setProviderSchedule(params: {
|
|
142
|
-
id: string;
|
|
143
|
-
workingTime: any;
|
|
144
|
-
serviceIds: string[];
|
|
145
|
-
providerIds: string[];
|
|
146
|
-
}, options?: RequestOptions): Promise<any>;
|
|
147
|
-
};
|
|
148
|
-
|
|
149
|
-
declare const createMediaApi: (apiConfig: ApiConfig) => {
|
|
150
|
-
uploadBusinessMedia(params: UploadBusinessMediaParams): Promise<any>;
|
|
151
|
-
deleteBusinessMedia(params: DeleteBusinessMediaParams, options?: RequestOptions): Promise<any>;
|
|
152
|
-
getBusinessMedia(params: GetBusinessMediaParams): Promise<any>;
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
declare const createRoleApi: (apiConfig: ApiConfig) => {
|
|
156
|
-
createRole(params: CreateRoleParams, options?: RequestOptions): Promise<void>;
|
|
157
|
-
updateRole(params: UpdateRoleParams, options?: RequestOptions): Promise<any>;
|
|
158
|
-
deleteRole(params: DeleteRoleParams, options?: RequestOptions): Promise<any>;
|
|
159
|
-
getRole(params: GetRoleParams, options?: RequestOptions): Promise<any>;
|
|
160
|
-
getRoles(params?: GetRolesParams, options?: RequestOptions): Promise<any>;
|
|
161
|
-
};
|
|
162
|
-
|
|
163
|
-
declare const createNotificationApi: (apiConfig: ApiConfig) => {
|
|
164
|
-
getNotifications(params: GetNotificationsParams, options?: RequestOptions): Promise<any>;
|
|
165
|
-
updateNotifications(options?: RequestOptions): Promise<any>;
|
|
166
|
-
trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions): Promise<any>;
|
|
167
|
-
getDeliveryStats(params: GetDeliveryStatsParams, options?: RequestOptions): Promise<any>;
|
|
168
|
-
};
|
|
169
|
-
|
|
170
|
-
declare const createPromoCodeApi: (apiConfig: ApiConfig) => {
|
|
171
|
-
createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
172
|
-
updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
173
|
-
deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
174
|
-
getPromoCode(params: GetPromoCodeParams, options?: RequestOptions): Promise<any>;
|
|
175
|
-
getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions): Promise<any>;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
declare const createAnalyticsApi: (apiConfig: ApiConfig) => {
|
|
179
|
-
getAnalytics(params: GetAnalyticsParams, options?: RequestOptions): Promise<any>;
|
|
180
|
-
getAnalyticsHealth(params: GetAnalyticsHealthParams, options?: RequestOptions): Promise<any>;
|
|
181
|
-
setupAnalytics(params: SetupAnalyticsParams, options?: RequestOptions): Promise<any>;
|
|
182
|
-
};
|
|
183
|
-
|
|
184
|
-
declare const createPaymentApi: (apiConfig: ApiConfig) => {
|
|
185
|
-
handleStripeWebhook(params: HandleStripeWebhookParams, options?: RequestOptions): Promise<any>;
|
|
186
|
-
getBusinessMarkets(params: GetBusinessMarketsParams, options?: RequestOptions): Promise<any>;
|
|
187
|
-
getBusinessMarket(params: GetBusinessMarketParams, options?: RequestOptions): Promise<any>;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
declare function setDefaultLocale(locale: string): void;
|
|
191
|
-
declare function getLocale(): string;
|
|
192
|
-
declare function getLocaleFromUrl(url: URL): string;
|
|
193
|
-
declare function getLocalizedString(value: any, locale?: string): string;
|
|
194
|
-
|
|
195
|
-
/**
|
|
196
|
-
* Query parameter builder utility that maintains exact backward compatibility
|
|
197
|
-
* with existing API parameter encoding patterns
|
|
198
|
-
*/
|
|
199
|
-
interface QueryParams {
|
|
200
|
-
[key: string]: string | number | boolean | string[] | number[] | null | undefined;
|
|
201
|
-
}
|
|
202
|
-
/**
|
|
203
|
-
* Builds a query string from parameters following the exact encoding patterns
|
|
204
|
-
* used by the existing API implementation:
|
|
205
|
-
* - Arrays: JSON.stringify then encodeURIComponent
|
|
206
|
-
* - Strings: encodeURIComponent
|
|
207
|
-
* - Numbers: No encoding
|
|
208
|
-
* - Null/undefined: Skip
|
|
209
|
-
*/
|
|
210
|
-
declare function buildQueryString(params: QueryParams): string;
|
|
211
|
-
/**
|
|
212
|
-
* Appends query string to a URL
|
|
213
|
-
*/
|
|
214
|
-
declare function appendQueryString(url: string, params: QueryParams): string;
|
|
215
|
-
|
|
216
|
-
declare const SDK_VERSION = "0.3.5";
|
|
29
|
+
declare const SDK_VERSION = "0.3.8";
|
|
217
30
|
declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
|
|
218
31
|
interface ApiConfig {
|
|
219
32
|
httpClient: any;
|
|
@@ -405,4 +218,4 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
405
218
|
};
|
|
406
219
|
};
|
|
407
220
|
|
|
408
|
-
export { type ApiConfig,
|
|
221
|
+
export { type ApiConfig, type HttpClientConfig, SDK_VERSION, SUPPORTED_FRAMEWORKS, createArkySDK };
|