arky-sdk 0.3.126 → 0.3.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { UpdateUserProfileParams, RequestOptions, DeleteUserParams, AddPhoneNumberParams, PhoneNumberConfirmParams, GetMeParams, SearchUsersParams, SetRoleParams, LoginUserParams, RegisterUserParams, LogoutParams, ConfirmUserParams, GetLoginUrlParams, ForgotPasswordParams, ResetForgotPasswordParams, ResetPasswordParams, UserSubscribeParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetBusinessParentsParams, TriggerBuildsParams, GetSubscriptionPlansParams, GetSubscriptionParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, ProcessRefundParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, CreateRoleParams, UpdateRoleParams, DeleteRoleParams, GetRoleParams, GetRolesParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetAnalyticsParams, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, GenerateBlocksParams, SendNodeParams, GetVariableMetadataParams, GetNodeSubscribersParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, BulkScheduleParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, CreateFeatureFlagParams, FeatureFlag, GetFeatureFlagParams, GetFeatureFlagsParams, UpdateFeatureFlagParams, DeleteFeatureFlagParams, GetFeatureFlagResultsParams, FlagResults, GetVariantParams, GetVariantResponse, TrackEventParams, TrackEventResponse } from './types.js';
2
- export { ApiResponse, Block, Business, BusinessConfig, DayAvailability, EshopCartItem, EshopStoreState, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, PaginatedResponse, Payment, PaymentMethod, PaymentMethodType, PaymentProviderConfig, PaymentRefund, Price, PromoCodeValidation, ProviderWithTimeline, Quote, ReservationCartItem, ReservationStoreState, Seo, ShippingMethod, ShippingWeightTier, Zone } from './types.js';
3
- import { e as extractBlockValues, g as getBlockLabel, a as getBlockTextValue, f as formatBlockValue, p as prepareBlocksForSubmission, b as getMarketPrice, c as getPriceAmount, d as formatPayment, h as formatMinor, i as createPaymentForCheckout, j as getCurrencySymbol, v as validatePhoneNumber, k as findTimeZone, s as slugify, l as humanize, m as categorify, n as formatDate, o as getSvgContentForAstro, q as fetchSvgContent, r as injectSvgIntoElement } from './svg-ByOFlX-F.js';
1
+ import { Block, StatusEvent, TaxonomyScope, Price, Payment, UpdateUserProfileParams, RequestOptions as RequestOptions$2, DeleteUserParams, AddPhoneNumberParams, PhoneNumberConfirmParams, GetMeParams, SearchUsersParams, SetRoleParams, LoginUserParams, RegisterUserParams, LogoutParams, ConfirmUserParams, GetLoginUrlParams, ForgotPasswordParams, ResetForgotPasswordParams, ResetPasswordParams, UserSubscribeParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetBusinessParentsParams, TriggerBuildsParams, GetSubscriptionPlansParams, GetSubscriptionParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, ProcessRefundParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, CreateRoleParams, UpdateRoleParams, DeleteRoleParams, GetRoleParams, GetRolesParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetAnalyticsParams, CreateNodeParams, UpdateNodeParams, DeleteNodeParams, GetNodeParams, GetNodesParams, GetNodeChildrenParams, GenerateBlocksParams, GetVariableMetadataParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, BulkScheduleParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, CreateFeatureFlagParams, FeatureFlag, GetFeatureFlagParams, GetFeatureFlagsParams, UpdateFeatureFlagParams, DeleteFeatureFlagParams, GetFeatureFlagResultsParams, FlagResults, GetVariantParams, GetVariantResponse, TrackEventParams, TrackEventResponse, CreateNewsletterParams, Newsletter, GetNewsletterParams, GetNewslettersParams, Paginated, UpdateNewsletterParams, DeleteNewsletterParams, GetSubscribersParams, SubscriberInfo, CreateNewsletterPostParams, NewsletterPost, GetNewsletterPostParams, GetNewsletterPostsParams, UpdateNewsletterPostParams, DeleteNewsletterPostParams, ScheduleSendParams, CancelSendParams, GetEmailTemplatesParams, EmailTemplate, GetEmailTemplateParams, GetEmailTemplateByKeyParams, CreateEmailTemplateParams, UpdateEmailTemplateParams, DeleteEmailTemplateParams, Taxonomy, Form, FormEntry } from './types.js';
2
+ export { ApiResponse, Business, BusinessConfig, DayAvailability, EshopCartItem, EshopStoreState, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, PaginatedResponse, PaymentMethod, PaymentMethodType, PaymentProviderConfig, PaymentRefund, PromoCodeValidation, ProviderWithTimeline, Quote, ReservationCartItem, ReservationStoreState, Seo, ShippingMethod, ShippingWeightTier, SystemTemplateKey, Zone } from './types.js';
3
+ import { isValidKey, validateKey, toKey, nameToKey } from './utils.js';
4
4
 
5
5
  interface AuthTokens {
6
6
  accessToken: string;
@@ -22,6 +22,97 @@ interface HttpClientConfig {
22
22
  isAuthenticated?: () => boolean;
23
23
  }
24
24
 
25
+ interface GetFormsParams {
26
+ key?: string;
27
+ ids?: string[];
28
+ statuses?: string[];
29
+ limit?: number;
30
+ cursor?: string;
31
+ }
32
+ interface GetFormParams {
33
+ id: string;
34
+ }
35
+ interface CreateFormParams {
36
+ key: string;
37
+ blocks?: Block[];
38
+ isPubliclyReadable?: boolean;
39
+ isPubliclyWritable?: boolean;
40
+ isSubmissionEnabled?: boolean;
41
+ isCaptchaRequired?: boolean;
42
+ notificationTemplateKey?: string;
43
+ notificationEmails?: string[];
44
+ }
45
+ interface UpdateFormParams {
46
+ id: string;
47
+ key: string;
48
+ blocks?: Block[];
49
+ isPubliclyReadable: boolean;
50
+ isPubliclyWritable: boolean;
51
+ isSubmissionEnabled: boolean;
52
+ isCaptchaRequired: boolean;
53
+ notificationTemplateKey?: string;
54
+ notificationEmails: string[];
55
+ statuses: StatusEvent[];
56
+ }
57
+ interface DeleteFormParams {
58
+ id: string;
59
+ }
60
+ interface GetEntriesParams {
61
+ formId: string;
62
+ ids?: string[];
63
+ statuses?: string[];
64
+ limit?: number;
65
+ cursor?: string;
66
+ }
67
+ interface CreateEntryParams {
68
+ formId: string;
69
+ blocks: Block[];
70
+ }
71
+ interface GetEntryParams {
72
+ formId: string;
73
+ entryId: string;
74
+ }
75
+ interface DeleteEntryParams {
76
+ formId: string;
77
+ entryId: string;
78
+ }
79
+ interface RequestOptions$1 {
80
+ headers?: Record<string, string>;
81
+ }
82
+
83
+ interface GetTaxonomiesParams {
84
+ scope?: TaxonomyScope;
85
+ parentId?: string;
86
+ ids?: string[];
87
+ }
88
+ interface GetTaxonomyParams {
89
+ id: string;
90
+ }
91
+ interface CreateTaxonomyParams {
92
+ key: string;
93
+ scope: TaxonomyScope;
94
+ blocks?: Block[];
95
+ parentId?: string;
96
+ }
97
+ interface UpdateTaxonomyParams {
98
+ id: string;
99
+ key: string;
100
+ scope: TaxonomyScope;
101
+ blocks?: Block[];
102
+ parentId?: string;
103
+ hasChildren?: boolean;
104
+ statuses: StatusEvent[];
105
+ }
106
+ interface DeleteTaxonomyParams {
107
+ id: string;
108
+ }
109
+ interface GetTaxonomyChildrenParams {
110
+ id: string;
111
+ }
112
+ interface RequestOptions {
113
+ headers?: Record<string, string>;
114
+ }
115
+
25
116
  interface LocationState {
26
117
  code: string;
27
118
  name: string;
@@ -58,6 +149,103 @@ interface RunScriptResponse {
58
149
  message: string;
59
150
  }
60
151
 
152
+ declare function getBlockLabel(block: any, locale?: string): string;
153
+ declare function formatBlockValue(block: any): string;
154
+ declare function prepareBlocksForSubmission(formData: any): any[];
155
+ declare function extractBlockValues(blocks: any[]): Record<string, any>;
156
+ declare function getBlockTextValue(block: any, locale?: string): string;
157
+
158
+ declare function formatMinor(amountMinor: number, currency: string, options?: {
159
+ showSymbols?: boolean;
160
+ decimalPlaces?: number;
161
+ customSymbol?: string;
162
+ }): string;
163
+ declare function formatPayment(payment: Payment, options?: {
164
+ showSymbols?: boolean;
165
+ decimalPlaces?: number;
166
+ showBreakdown?: boolean;
167
+ }): string;
168
+ declare function getMarketPrice(prices: Price[], marketId: string, businessMarkets?: any[], options?: {
169
+ showSymbols?: boolean;
170
+ decimalPlaces?: number;
171
+ showCompareAt?: boolean;
172
+ fallbackMarket?: string;
173
+ }): string;
174
+ declare function getPriceAmount(prices: Price[], marketId: string, fallbackMarket?: string): number;
175
+ declare function createPaymentForCheckout(subtotalMinor: number, marketId: string, currency: string, paymentMethod: any, options?: {
176
+ discount?: number;
177
+ taxAmount?: number;
178
+ taxRateBps?: number;
179
+ promoCode?: {
180
+ id: string;
181
+ code: string;
182
+ type: string;
183
+ value: number;
184
+ };
185
+ }): Payment;
186
+
187
+ /**
188
+ * Maps currency codes to their display symbols
189
+ */
190
+ declare function getCurrencySymbol(currency: string): string;
191
+
192
+ interface ValidationResult {
193
+ isValid: boolean;
194
+ error?: string;
195
+ }
196
+ declare function validatePhoneNumber(phone: string): ValidationResult;
197
+
198
+ declare const tzGroups: {
199
+ label: string;
200
+ zones: {
201
+ label: string;
202
+ value: string;
203
+ }[];
204
+ }[];
205
+ declare function findTimeZone(groups: typeof tzGroups): string;
206
+
207
+ declare const locales: readonly ["en", "sr-latn"];
208
+ /**
209
+ * * returns "slugified" text.
210
+ * @param text: string - text to slugify
211
+ */
212
+ declare function slugify(text: string): string;
213
+ /**
214
+ * * returns "humanized" text. runs slugify() and then replaces - with space and upper case first letter of every word, and lower case the rest
215
+ * @param text: string - text to humanize
216
+ */
217
+ declare function humanize(text: string): string;
218
+ /**
219
+ * * returns "categorified" text. runs slugify() and then replaces - with space and upper cases everything
220
+ * @param text: string - text to categorify
221
+ * @returns string - categorified text
222
+ */
223
+ declare function categorify(text: string): string;
224
+ /**
225
+ * * returns a nicely formatted string of the date passed
226
+ * @param date: string | number | Date - date to format
227
+ * @param locale: string - locale to format the date in
228
+ * @returns string - formatted date
229
+ */
230
+ declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
231
+
232
+ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
233
+ /**
234
+ * Server-side helper for Astro components to fetch SVG content during SSR
235
+ *
236
+ * @param mediaObject The media object from the CMS
237
+ * @returns The SVG content as a string, or empty string on failure
238
+ */
239
+ declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
240
+ /**
241
+ * Client-side helper to fetch and inject SVG content into DOM elements
242
+ *
243
+ * @param mediaObject The media object from the CMS
244
+ * @param targetElement The DOM element to inject the SVG into
245
+ * @param className Optional CSS class to add to the SVG
246
+ */
247
+ declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
248
+
61
249
  declare const SDK_VERSION = "0.3.88";
62
250
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
63
251
  interface ApiConfig {
@@ -75,136 +263,134 @@ declare function createArkySDK(config: HttpClientConfig & {
75
263
  locale?: string;
76
264
  }): Promise<{
77
265
  user: {
78
- updateUser(params: UpdateUserProfileParams, options?: RequestOptions): Promise<any>;
79
- deleteUser(params: DeleteUserParams, options?: RequestOptions): Promise<any>;
80
- addPhoneNumber(params: AddPhoneNumberParams, options?: RequestOptions): Promise<any>;
81
- phoneNumberConfirm(params: PhoneNumberConfirmParams, options?: RequestOptions): Promise<any>;
82
- getMe(params: GetMeParams, options?: RequestOptions): Promise<any>;
83
- searchUsers(params: SearchUsersParams, options?: RequestOptions): Promise<any>;
84
- setRole(params: SetRoleParams, options?: RequestOptions): Promise<any>;
85
- loginUser(params: LoginUserParams, options?: RequestOptions): Promise<any>;
86
- registerUser(params: RegisterUserParams, options?: RequestOptions): Promise<any>;
87
- logout(params: LogoutParams, options?: RequestOptions): Promise<any>;
88
- confirmUser(params: ConfirmUserParams, options?: RequestOptions): Promise<any>;
89
- getLoginUrl(params: GetLoginUrlParams, options?: RequestOptions): Promise<any>;
90
- forgotPassword(params: ForgotPasswordParams, options?: RequestOptions): Promise<any>;
91
- resetForgotPassword(params: ResetForgotPasswordParams, options?: RequestOptions): Promise<any>;
92
- resetPassword(params: ResetPasswordParams, options?: RequestOptions): Promise<any>;
93
- subscribe(params: UserSubscribeParams, options?: RequestOptions): Promise<any>;
266
+ updateUser(params: UpdateUserProfileParams, options?: RequestOptions$2): Promise<any>;
267
+ deleteUser(params: DeleteUserParams, options?: RequestOptions$2): Promise<any>;
268
+ addPhoneNumber(params: AddPhoneNumberParams, options?: RequestOptions$2): Promise<any>;
269
+ phoneNumberConfirm(params: PhoneNumberConfirmParams, options?: RequestOptions$2): Promise<any>;
270
+ getMe(params: GetMeParams, options?: RequestOptions$2): Promise<any>;
271
+ searchUsers(params: SearchUsersParams, options?: RequestOptions$2): Promise<any>;
272
+ setRole(params: SetRoleParams, options?: RequestOptions$2): Promise<any>;
273
+ loginUser(params: LoginUserParams, options?: RequestOptions$2): Promise<any>;
274
+ registerUser(params: RegisterUserParams, options?: RequestOptions$2): Promise<any>;
275
+ logout(params: LogoutParams, options?: RequestOptions$2): Promise<any>;
276
+ confirmUser(params: ConfirmUserParams, options?: RequestOptions$2): Promise<any>;
277
+ getLoginUrl(params: GetLoginUrlParams, options?: RequestOptions$2): Promise<any>;
278
+ forgotPassword(params: ForgotPasswordParams, options?: RequestOptions$2): Promise<any>;
279
+ resetForgotPassword(params: ResetForgotPasswordParams, options?: RequestOptions$2): Promise<any>;
280
+ resetPassword(params: ResetPasswordParams, options?: RequestOptions$2): Promise<any>;
281
+ subscribe(params: UserSubscribeParams, options?: RequestOptions$2): Promise<any>;
94
282
  };
95
283
  business: {
96
- createBusiness(params: CreateBusinessParams, options?: RequestOptions): Promise<any>;
97
- updateBusiness(params: UpdateBusinessParams, options?: RequestOptions): Promise<any>;
98
- deleteBusiness(params: DeleteBusinessParams, options?: RequestOptions): Promise<any>;
99
- getBusiness(params: GetBusinessParams, options?: RequestOptions): Promise<any>;
100
- getBusinesses(params: GetBusinessesParams, options?: RequestOptions): Promise<any>;
101
- getBusinessParents(params: GetBusinessParentsParams, options?: RequestOptions): Promise<any>;
102
- triggerBuilds(params: TriggerBuildsParams, options?: RequestOptions): Promise<any>;
103
- getSubscriptionPlans(params: GetSubscriptionPlansParams, options?: RequestOptions): Promise<any>;
104
- getSubscription(params: GetSubscriptionParams, options?: RequestOptions): Promise<any>;
105
- subscribe(params: SubscribeParams, options?: RequestOptions): Promise<any>;
106
- createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions): Promise<any>;
107
- inviteUser(params: InviteUserParams, options?: RequestOptions): Promise<any>;
108
- handleInvitation(params: HandleInvitationParams, options?: RequestOptions): Promise<any>;
109
- testWebhook(params: TestWebhookParams, options?: RequestOptions): Promise<any>;
110
- getBusinessMedia(params: GetBusinessMediaParams2, options?: RequestOptions): Promise<any>;
111
- processRefund(params: ProcessRefundParams, options?: RequestOptions): Promise<any>;
284
+ createBusiness(params: CreateBusinessParams, options?: RequestOptions$2): Promise<any>;
285
+ updateBusiness(params: UpdateBusinessParams, options?: RequestOptions$2): Promise<any>;
286
+ deleteBusiness(params: DeleteBusinessParams, options?: RequestOptions$2): Promise<any>;
287
+ getBusiness(params: GetBusinessParams, options?: RequestOptions$2): Promise<any>;
288
+ getBusinesses(params: GetBusinessesParams, options?: RequestOptions$2): Promise<any>;
289
+ getBusinessParents(params: GetBusinessParentsParams, options?: RequestOptions$2): Promise<any>;
290
+ triggerBuilds(params: TriggerBuildsParams, options?: RequestOptions$2): Promise<any>;
291
+ getSubscriptionPlans(params: GetSubscriptionPlansParams, options?: RequestOptions$2): Promise<any>;
292
+ getSubscription(params: GetSubscriptionParams, options?: RequestOptions$2): Promise<any>;
293
+ subscribe(params: SubscribeParams, options?: RequestOptions$2): Promise<any>;
294
+ createPortalSession(params: CreatePortalSessionParams, options?: RequestOptions$2): Promise<any>;
295
+ inviteUser(params: InviteUserParams, options?: RequestOptions$2): Promise<any>;
296
+ handleInvitation(params: HandleInvitationParams, options?: RequestOptions$2): Promise<any>;
297
+ testWebhook(params: TestWebhookParams, options?: RequestOptions$2): Promise<any>;
298
+ getBusinessMedia(params: GetBusinessMediaParams2, options?: RequestOptions$2): Promise<any>;
299
+ processRefund(params: ProcessRefundParams, options?: RequestOptions$2): Promise<any>;
112
300
  };
113
301
  media: {
114
- uploadBusinessMedia(params: UploadBusinessMediaParams, options?: RequestOptions): Promise<any>;
115
- deleteBusinessMedia(params: DeleteBusinessMediaParams, options?: RequestOptions): Promise<any>;
116
- getBusinessMedia(params: GetBusinessMediaParams, options?: RequestOptions): Promise<any>;
117
- updateMedia(params: UpdateMediaParams, options?: RequestOptions): Promise<any>;
302
+ uploadBusinessMedia(params: UploadBusinessMediaParams, options?: RequestOptions$2): Promise<any>;
303
+ deleteBusinessMedia(params: DeleteBusinessMediaParams, options?: RequestOptions$2): Promise<any>;
304
+ getBusinessMedia(params: GetBusinessMediaParams, options?: RequestOptions$2): Promise<any>;
305
+ updateMedia(params: UpdateMediaParams, options?: RequestOptions$2): Promise<any>;
118
306
  };
119
307
  role: {
120
- createRole(params: CreateRoleParams, options?: RequestOptions): Promise<void>;
121
- updateRole(params: UpdateRoleParams, options?: RequestOptions): Promise<any>;
122
- deleteRole(params: DeleteRoleParams, options?: RequestOptions): Promise<any>;
123
- getRole(params: GetRoleParams, options?: RequestOptions): Promise<any>;
124
- getRoles(params: GetRolesParams, options?: RequestOptions): Promise<any>;
308
+ createRole(params: CreateRoleParams, options?: RequestOptions$2): Promise<void>;
309
+ updateRole(params: UpdateRoleParams, options?: RequestOptions$2): Promise<any>;
310
+ deleteRole(params: DeleteRoleParams, options?: RequestOptions$2): Promise<any>;
311
+ getRole(params: GetRoleParams, options?: RequestOptions$2): Promise<any>;
312
+ getRoles(params: GetRolesParams, options?: RequestOptions$2): Promise<any>;
125
313
  };
126
314
  notification: {
127
- trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions): Promise<any>;
128
- getDeliveryStats(params: GetDeliveryStatsParams, options?: RequestOptions): Promise<any>;
315
+ trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions$2): Promise<any>;
316
+ getDeliveryStats(params: GetDeliveryStatsParams, options?: RequestOptions$2): Promise<any>;
129
317
  };
130
318
  promoCode: {
131
- createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions): Promise<any>;
132
- updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions): Promise<any>;
133
- deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions): Promise<any>;
134
- getPromoCode(params: GetPromoCodeParams, options?: RequestOptions): Promise<any>;
135
- getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions): Promise<any>;
319
+ createPromoCode(params: CreatePromoCodeParams, options?: RequestOptions$2): Promise<any>;
320
+ updatePromoCode(params: UpdatePromoCodeParams, options?: RequestOptions$2): Promise<any>;
321
+ deletePromoCode(params: DeletePromoCodeParams, options?: RequestOptions$2): Promise<any>;
322
+ getPromoCode(params: GetPromoCodeParams, options?: RequestOptions$2): Promise<any>;
323
+ getPromoCodes(params: GetPromoCodesParams, options?: RequestOptions$2): Promise<any>;
136
324
  };
137
325
  analytics: {
138
- getAnalytics(params: GetAnalyticsParams, options?: RequestOptions): Promise<any>;
326
+ getAnalytics(params: GetAnalyticsParams, options?: RequestOptions$2): Promise<any>;
139
327
  };
140
328
  cms: {
141
- createNode(params: CreateNodeParams, options?: RequestOptions): Promise<any>;
142
- updateNode(params: UpdateNodeParams, options?: RequestOptions): Promise<any>;
143
- deleteNode(params: DeleteNodeParams, options?: RequestOptions): Promise<any>;
144
- getNode(params: GetNodeParams, options?: RequestOptions): Promise<any>;
145
- getNodes(params: GetNodesParams, options?: RequestOptions): Promise<any>;
146
- getNodeChildren(params: GetNodeChildrenParams, options?: RequestOptions): Promise<any>;
147
- generateBlocks(params: GenerateBlocksParams, options?: RequestOptions): Promise<any>;
148
- sendNode(params: SendNodeParams, options?: RequestOptions): Promise<any>;
149
- getVariableMetadata(params: GetVariableMetadataParams, options?: RequestOptions): Promise<any>;
150
- getNodeSubscribers(params: GetNodeSubscribersParams, options?: RequestOptions): Promise<any>;
329
+ createNode(params: CreateNodeParams, options?: RequestOptions$2): Promise<any>;
330
+ updateNode(params: UpdateNodeParams, options?: RequestOptions$2): Promise<any>;
331
+ deleteNode(params: DeleteNodeParams, options?: RequestOptions$2): Promise<any>;
332
+ getNode(params: GetNodeParams, options?: RequestOptions$2): Promise<any>;
333
+ getNodes(params: GetNodesParams, options?: RequestOptions$2): Promise<any>;
334
+ getNodeChildren(params: GetNodeChildrenParams, options?: RequestOptions$2): Promise<any>;
335
+ generateBlocks(params: GenerateBlocksParams, options?: RequestOptions$2): Promise<any>;
336
+ getVariableMetadata(params: GetVariableMetadataParams, options?: RequestOptions$2): Promise<any>;
151
337
  };
152
338
  eshop: {
153
- createProduct(params: CreateProductParams, options?: RequestOptions): Promise<any>;
154
- updateProduct(params: UpdateProductParams, options?: RequestOptions): Promise<any>;
155
- deleteProduct(params: DeleteProductParams, options?: RequestOptions): Promise<any>;
156
- getProduct(params: GetProductParams, options?: RequestOptions): Promise<any>;
157
- getProducts(params: GetProductsParams, options?: RequestOptions): Promise<any>;
158
- createOrder(params: CreateOrderParams, options?: RequestOptions): Promise<any>;
159
- updateOrder(params: UpdateOrderParams, options?: RequestOptions): Promise<any>;
160
- getOrder(params: GetOrderParams, options?: RequestOptions): Promise<any>;
161
- getOrders(params: GetOrdersParams, options?: RequestOptions): Promise<any>;
162
- getQuote(params: GetQuoteParams, options?: RequestOptions): Promise<any>;
163
- checkout(params: OrderCheckoutParams, options?: RequestOptions): Promise<any>;
339
+ createProduct(params: CreateProductParams, options?: RequestOptions$2): Promise<any>;
340
+ updateProduct(params: UpdateProductParams, options?: RequestOptions$2): Promise<any>;
341
+ deleteProduct(params: DeleteProductParams, options?: RequestOptions$2): Promise<any>;
342
+ getProduct(params: GetProductParams, options?: RequestOptions$2): Promise<any>;
343
+ getProducts(params: GetProductsParams, options?: RequestOptions$2): Promise<any>;
344
+ createOrder(params: CreateOrderParams, options?: RequestOptions$2): Promise<any>;
345
+ updateOrder(params: UpdateOrderParams, options?: RequestOptions$2): Promise<any>;
346
+ getOrder(params: GetOrderParams, options?: RequestOptions$2): Promise<any>;
347
+ getOrders(params: GetOrdersParams, options?: RequestOptions$2): Promise<any>;
348
+ getQuote(params: GetQuoteParams, options?: RequestOptions$2): Promise<any>;
349
+ checkout(params: OrderCheckoutParams, options?: RequestOptions$2): Promise<any>;
164
350
  };
165
351
  reservation: {
166
352
  addToCart(slot: Slot): void;
167
353
  removeFromCart(slotId: string): void;
168
354
  getCart(): Slot[];
169
355
  clearCart(): void;
170
- createReservation(params: CreateReservationParams, options?: RequestOptions): Promise<any>;
171
- updateReservation(params: UpdateReservationParams, options?: RequestOptions): Promise<any>;
172
- checkout(params?: Partial<ReservationCheckoutParams>, options?: RequestOptions): Promise<any>;
173
- getReservation(params: GetReservationParams, options?: RequestOptions): Promise<any>;
174
- searchReservations(params: SearchReservationsParams, options?: RequestOptions): Promise<any>;
175
- getQuote(params: GetReservationQuoteParams, options?: RequestOptions): Promise<any>;
176
- createService(params: CreateServiceParams, options?: RequestOptions): Promise<any>;
177
- updateService(params: UpdateServiceParams, options?: RequestOptions): Promise<any>;
178
- deleteService(params: DeleteServiceParams, options?: RequestOptions): Promise<any>;
179
- bulkSchedule(params: BulkScheduleParams, options?: RequestOptions): Promise<any>;
180
- getService(params: GetServiceParams, options?: RequestOptions): Promise<any>;
181
- getServices(params: GetServicesParams, options?: RequestOptions): Promise<any>;
182
- createProvider(params: CreateProviderParams, options?: RequestOptions): Promise<any>;
183
- updateProvider(params: UpdateProviderParams, options?: RequestOptions): Promise<any>;
184
- deleteProvider(params: DeleteProviderParams, options?: RequestOptions): Promise<any>;
185
- getProvider(params: GetProviderParams, options?: RequestOptions): Promise<any>;
186
- getProviders(params: GetProvidersParams, options?: RequestOptions): Promise<any>;
187
- getProviderWorkingTime(params: GetBusinessServiceWorkingTimeParams, options?: RequestOptions): Promise<any>;
356
+ createReservation(params: CreateReservationParams, options?: RequestOptions$2): Promise<any>;
357
+ updateReservation(params: UpdateReservationParams, options?: RequestOptions$2): Promise<any>;
358
+ checkout(params?: Partial<ReservationCheckoutParams>, options?: RequestOptions$2): Promise<any>;
359
+ getReservation(params: GetReservationParams, options?: RequestOptions$2): Promise<any>;
360
+ searchReservations(params: SearchReservationsParams, options?: RequestOptions$2): Promise<any>;
361
+ getQuote(params: GetReservationQuoteParams, options?: RequestOptions$2): Promise<any>;
362
+ createService(params: CreateServiceParams, options?: RequestOptions$2): Promise<any>;
363
+ updateService(params: UpdateServiceParams, options?: RequestOptions$2): Promise<any>;
364
+ deleteService(params: DeleteServiceParams, options?: RequestOptions$2): Promise<any>;
365
+ bulkSchedule(params: BulkScheduleParams, options?: RequestOptions$2): Promise<any>;
366
+ getService(params: GetServiceParams, options?: RequestOptions$2): Promise<any>;
367
+ getServices(params: GetServicesParams, options?: RequestOptions$2): Promise<any>;
368
+ createProvider(params: CreateProviderParams, options?: RequestOptions$2): Promise<any>;
369
+ updateProvider(params: UpdateProviderParams, options?: RequestOptions$2): Promise<any>;
370
+ deleteProvider(params: DeleteProviderParams, options?: RequestOptions$2): Promise<any>;
371
+ getProvider(params: GetProviderParams, options?: RequestOptions$2): Promise<any>;
372
+ getProviders(params: GetProvidersParams, options?: RequestOptions$2): Promise<any>;
373
+ getProviderWorkingTime(params: GetBusinessServiceWorkingTimeParams, options?: RequestOptions$2): Promise<any>;
188
374
  };
189
375
  database: {
190
- scanData(params: ScanDataParams, options?: RequestOptions): Promise<any[]>;
191
- putData(params: PutDataParams, options?: RequestOptions): Promise<void>;
192
- deleteData(params: DeleteDataParams, options?: RequestOptions): Promise<void>;
193
- runScript(params: RunScriptParams, options?: RequestOptions): Promise<RunScriptResponse>;
376
+ scanData(params: ScanDataParams, options?: RequestOptions$2): Promise<any[]>;
377
+ putData(params: PutDataParams, options?: RequestOptions$2): Promise<void>;
378
+ deleteData(params: DeleteDataParams, options?: RequestOptions$2): Promise<void>;
379
+ runScript(params: RunScriptParams, options?: RequestOptions$2): Promise<RunScriptResponse>;
194
380
  };
195
381
  featureFlags: {
196
- createFlag(params: CreateFeatureFlagParams, options?: RequestOptions<FeatureFlag>): Promise<FeatureFlag>;
197
- getFlag(params: GetFeatureFlagParams, options?: RequestOptions<FeatureFlag>): Promise<FeatureFlag>;
198
- getFlags(params?: GetFeatureFlagsParams, options?: RequestOptions<FeatureFlag[]>): Promise<FeatureFlag[]>;
199
- updateFlag(params: UpdateFeatureFlagParams, options?: RequestOptions<FeatureFlag>): Promise<FeatureFlag>;
200
- deleteFlag(params: DeleteFeatureFlagParams, options?: RequestOptions<{
382
+ createFlag(params: CreateFeatureFlagParams, options?: RequestOptions$2<FeatureFlag>): Promise<FeatureFlag>;
383
+ getFlag(params: GetFeatureFlagParams, options?: RequestOptions$2<FeatureFlag>): Promise<FeatureFlag>;
384
+ getFlags(params?: GetFeatureFlagsParams, options?: RequestOptions$2<FeatureFlag[]>): Promise<FeatureFlag[]>;
385
+ updateFlag(params: UpdateFeatureFlagParams, options?: RequestOptions$2<FeatureFlag>): Promise<FeatureFlag>;
386
+ deleteFlag(params: DeleteFeatureFlagParams, options?: RequestOptions$2<{
201
387
  deleted: boolean;
202
388
  }>): Promise<{
203
389
  deleted: boolean;
204
390
  }>;
205
- getResults(params: GetFeatureFlagResultsParams, options?: RequestOptions<FlagResults>): Promise<FlagResults>;
206
- getVariant(params: GetVariantParams, options?: RequestOptions<GetVariantResponse>): Promise<GetVariantResponse>;
207
- trackEvent(params: TrackEventParams, options?: RequestOptions<TrackEventResponse>): Promise<TrackEventResponse>;
391
+ getResults(params: GetFeatureFlagResultsParams, options?: RequestOptions$2<FlagResults>): Promise<FlagResults>;
392
+ getVariant(params: GetVariantParams, options?: RequestOptions$2<GetVariantResponse>): Promise<GetVariantResponse>;
393
+ trackEvent(params: TrackEventParams, options?: RequestOptions$2<TrackEventResponse>): Promise<TrackEventResponse>;
208
394
  isEnabled(flagKey: string): Promise<boolean>;
209
395
  getVariantWithDefault<T = any>(flagKey: string, defaultValue: T): Promise<{
210
396
  variantKey: string;
@@ -214,8 +400,71 @@ declare function createArkySDK(config: HttpClientConfig & {
214
400
  archiveFlag(id: string): Promise<FeatureFlag>;
215
401
  };
216
402
  location: {
217
- getCountries(options?: RequestOptions): Promise<GetCountriesResponse>;
218
- getCountryStates(countryCode: string, options?: RequestOptions): Promise<LocationCountry>;
403
+ getCountries(options?: RequestOptions$2): Promise<GetCountriesResponse>;
404
+ getCountryStates(countryCode: string, options?: RequestOptions$2): Promise<LocationCountry>;
405
+ };
406
+ newsletter: {
407
+ createNewsletter(params: CreateNewsletterParams, options?: RequestOptions$2<Newsletter>): Promise<Newsletter>;
408
+ getNewsletter(params: GetNewsletterParams, options?: RequestOptions$2<Newsletter>): Promise<Newsletter>;
409
+ getNewsletters(params?: GetNewslettersParams, options?: RequestOptions$2<Paginated<Newsletter>>): Promise<Paginated<Newsletter>>;
410
+ updateNewsletter(params: UpdateNewsletterParams, options?: RequestOptions$2<Newsletter>): Promise<Newsletter>;
411
+ deleteNewsletter(params: DeleteNewsletterParams, options?: RequestOptions$2<boolean>): Promise<boolean>;
412
+ getSubscribers(params: GetSubscribersParams, options?: RequestOptions$2<SubscriberInfo[]>): Promise<SubscriberInfo[]>;
413
+ createPost(params: CreateNewsletterPostParams, options?: RequestOptions$2<NewsletterPost>): Promise<NewsletterPost>;
414
+ getPost(params: GetNewsletterPostParams, options?: RequestOptions$2<NewsletterPost>): Promise<NewsletterPost>;
415
+ getPosts(params: GetNewsletterPostsParams, options?: RequestOptions$2<Paginated<NewsletterPost>>): Promise<Paginated<NewsletterPost>>;
416
+ updatePost(params: UpdateNewsletterPostParams, options?: RequestOptions$2<NewsletterPost>): Promise<NewsletterPost>;
417
+ deletePost(params: DeleteNewsletterPostParams, options?: RequestOptions$2<boolean>): Promise<boolean>;
418
+ scheduleSend(params: ScheduleSendParams, options?: RequestOptions$2<NewsletterPost>): Promise<NewsletterPost>;
419
+ cancelSend(params: CancelSendParams, options?: RequestOptions$2<NewsletterPost>): Promise<NewsletterPost>;
420
+ publishPost(newsletterId: string, postId: string): Promise<NewsletterPost>;
421
+ archivePost(newsletterId: string, postId: string): Promise<NewsletterPost>;
422
+ sendNow(newsletterId: string, postId: string): Promise<NewsletterPost>;
423
+ };
424
+ emailTemplate: {
425
+ getTemplates(params?: GetEmailTemplatesParams, options?: RequestOptions$2<PaginatedResponse<EmailTemplate>>): Promise<PaginatedResponse<EmailTemplate>>;
426
+ getTemplate(params: GetEmailTemplateParams, options?: RequestOptions$2<EmailTemplate>): Promise<EmailTemplate>;
427
+ getTemplateByKey(params: GetEmailTemplateByKeyParams, options?: RequestOptions$2<EmailTemplate>): Promise<EmailTemplate>;
428
+ createTemplate(params: CreateEmailTemplateParams, options?: RequestOptions$2<EmailTemplate>): Promise<EmailTemplate>;
429
+ updateTemplate(params: UpdateEmailTemplateParams, options?: RequestOptions$2<EmailTemplate>): Promise<EmailTemplate>;
430
+ deleteTemplate(params: DeleteEmailTemplateParams, options?: RequestOptions$2<{
431
+ deleted: boolean;
432
+ }>): Promise<{
433
+ deleted: boolean;
434
+ }>;
435
+ };
436
+ taxonomy: {
437
+ getTaxonomies(params?: GetTaxonomiesParams, options?: RequestOptions): Promise<{
438
+ items: Taxonomy[];
439
+ cursor?: string;
440
+ }>;
441
+ getTaxonomy(params: GetTaxonomyParams, options?: RequestOptions): Promise<Taxonomy>;
442
+ createTaxonomy(params: CreateTaxonomyParams, options?: RequestOptions): Promise<Taxonomy>;
443
+ updateTaxonomy(params: UpdateTaxonomyParams, options?: RequestOptions): Promise<Taxonomy>;
444
+ deleteTaxonomy(params: DeleteTaxonomyParams, options?: RequestOptions): Promise<boolean>;
445
+ getTaxonomyChildren(params: GetTaxonomyChildrenParams, options?: RequestOptions): Promise<Taxonomy[]>;
446
+ getRootTaxonomies(scope: TaxonomyScope, options?: RequestOptions): Promise<Taxonomy[]>;
447
+ };
448
+ form: {
449
+ getForms(params?: GetFormsParams, options?: RequestOptions$1): Promise<{
450
+ items: Form[];
451
+ cursor?: string;
452
+ }>;
453
+ getForm(params: GetFormParams, options?: RequestOptions$1): Promise<Form>;
454
+ createForm(params: CreateFormParams, options?: RequestOptions$1): Promise<Form>;
455
+ updateForm(params: UpdateFormParams, options?: RequestOptions$1): Promise<Form>;
456
+ deleteForm(params: DeleteFormParams, options?: RequestOptions$1): Promise<{
457
+ deleted: boolean;
458
+ }>;
459
+ getEntries(params: GetEntriesParams, options?: RequestOptions$1): Promise<{
460
+ items: FormEntry[];
461
+ cursor?: string;
462
+ }>;
463
+ createEntry(params: CreateEntryParams, options?: RequestOptions$1): Promise<FormEntry>;
464
+ getEntry(params: GetEntryParams, options?: RequestOptions$1): Promise<FormEntry>;
465
+ deleteEntry(params: DeleteEntryParams, options?: RequestOptions$1): Promise<{
466
+ deleted: boolean;
467
+ }>;
219
468
  };
220
469
  setBusinessId: (businessId: string) => void;
221
470
  getBusinessId: () => string;
@@ -260,7 +509,11 @@ declare function createArkySDK(config: HttpClientConfig & {
260
509
  getSvgContentForAstro: typeof getSvgContentForAstro;
261
510
  fetchSvgContent: typeof fetchSvgContent;
262
511
  injectSvgIntoElement: typeof injectSvgIntoElement;
512
+ isValidKey: typeof isValidKey;
513
+ validateKey: typeof validateKey;
514
+ toKey: typeof toKey;
515
+ nameToKey: typeof nameToKey;
263
516
  };
264
517
  }>;
265
518
 
266
- export { type ApiConfig, type GetCountriesResponse, type HttpClientConfig, type LocationCountry, type LocationState, SDK_VERSION, SUPPORTED_FRAMEWORKS, Slot, createArkySDK };
519
+ export { type ApiConfig, Block, CreateEmailTemplateParams, type CreateEntryParams, type CreateFormParams, type CreateTaxonomyParams, DeleteEmailTemplateParams, type DeleteEntryParams, type DeleteFormParams, type DeleteTaxonomyParams, EmailTemplate, Form, FormEntry, type GetCountriesResponse, GetEmailTemplateByKeyParams, GetEmailTemplateParams, GetEmailTemplatesParams, type GetEntriesParams, type GetEntryParams, type GetFormParams, type GetFormsParams, type GetTaxonomiesParams, type GetTaxonomyChildrenParams, type GetTaxonomyParams, type HttpClientConfig, type LocationCountry, type LocationState, Payment, Price, SDK_VERSION, SUPPORTED_FRAMEWORKS, Slot, Taxonomy, TaxonomyScope, UpdateEmailTemplateParams, type UpdateFormParams, type UpdateTaxonomyParams, createArkySDK };