arky-sdk 0.4.0 → 0.4.1

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.cts CHANGED
@@ -1,27 +1,41 @@
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, SetProviderScheduleParams, ProcessRefundParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, CreateRoleParams, UpdateRoleParams, DeleteRoleParams, GetRoleParams, GetRolesParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetAnalyticsParams, CreateCollectionParams, UpdateCollectionParams, DeleteCollectionParams, GetCollectionParams, GetCollectionsParams, GenerateBlocksParams, GetEntriesParams, CreateEntryParams, UpdateEntryParams, DeleteCollectionEntryParams, GetCollectionEntryParams, SendEntryParams, GetVariableMetadataParams, GetCollectionSubscribersParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, UpdateOrderStatusParams, UpdateOrderPaymentStatusParams, GetQuoteParams, CheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, SearchMyReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, GetServiceProvidersParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, CreateFeatureFlagParams, FeatureFlag, GetFeatureFlagParams, GetFeatureFlagsParams, UpdateFeatureFlagParams, DeleteFeatureFlagParams, GetFeatureFlagResultsParams, FlagResults, GetVariantParams, GetVariantResponse, TrackEventParams, TrackEventResponse } from './types.cjs';
2
- export { ApiResponse, Block, Business, BusinessConfig, DayAvailability, EshopCartItem, EshopStoreState, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, PaginatedResponse, Payment, PaymentMethod, PaymentMethodType, PaymentProviderConfig, Price, PromoCodeValidation, ProviderWithTimeline, Quote, QuoteLineItem, ReservationCartItem, ReservationStoreState, Seo, ShippingMethod, ShippingWeightTier, Zone } from './types.cjs';
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-3F_m7296.cjs';
1
+ import { Price, Payment, RequestOptions, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, AddPhoneNumberParams, PhoneNumberConfirmParams, GetMeParams, SearchAccountsParams, AccountSubscribeParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetBusinessParentsParams, TriggerBuildsParams, GetSubscriptionPlansParams, GetSubscriptionParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, ProcessRefundParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, UpdateMediaParams, 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, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, CreateAudienceParams, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, SubscribeAudienceParams } from './types.cjs';
2
+ export { ApiResponse, Audience, AudienceAccessResponse, AudienceSubscribeResponse, Block, Business, BusinessConfig, DayAvailability, EshopCartItem, EshopStoreState, GetAvailabilityParams, GetSlotsForDateParams, Language, Location, Market, Media, MediaResolution, Node, PaginatedResponse, PaymentMethod, PaymentMethodType, PaymentProviderConfig, PaymentRefund, PromoCodeValidation, ProviderWithTimeline, Quote, ReservationCartItem, ReservationStoreState, Seo, ShippingMethod, ShippingWeightTier, SystemTemplateKey, Workflow, WorkflowEdge, WorkflowHttpMethod, WorkflowHttpNode, WorkflowIfNode, WorkflowLoopNode, WorkflowNode, WorkflowTriggerNode, WorkflowWaitNode, Zone } from './types.cjs';
3
+ import { isValidKey, validateKey, toKey, nameToKey } from './utils.cjs';
4
4
 
5
5
  interface AuthTokens {
6
6
  accessToken: string;
7
7
  refreshToken?: string;
8
- provider?: string;
9
8
  expiresAt?: number;
10
- userId?: string;
11
- isGuest?: boolean;
9
+ accountId?: string;
12
10
  }
13
11
  interface HttpClientConfig {
14
12
  baseUrl: string;
15
13
  businessId: string;
16
14
  getToken: () => Promise<AuthTokens> | AuthTokens;
17
15
  setToken: (tokens: AuthTokens) => void;
18
- autoGuest?: boolean;
19
16
  logout: () => void;
20
17
  navigate?: (path: string) => void;
21
18
  loginFallbackPath?: string;
22
19
  isAuthenticated?: () => boolean;
23
20
  }
24
21
 
22
+ interface NetworkSearchParams {
23
+ query?: string;
24
+ limit?: number;
25
+ cursor?: string;
26
+ nodeId?: string;
27
+ nodeIds?: string[];
28
+ statuses?: string[];
29
+ blocks?: any[];
30
+ sortField?: string;
31
+ sortDirection?: "asc" | "desc";
32
+ createdAtFrom?: number;
33
+ createdAtTo?: number;
34
+ priceFrom?: number;
35
+ priceTo?: number;
36
+ matchAll?: boolean;
37
+ }
38
+
25
39
  interface LocationState {
26
40
  code: string;
27
41
  name: string;
@@ -38,6 +52,7 @@ interface GetCountriesResponse {
38
52
 
39
53
  interface ScanDataParams {
40
54
  key: string;
55
+ limit?: number;
41
56
  }
42
57
  interface PutDataParams {
43
58
  key: string;
@@ -58,7 +73,104 @@ interface RunScriptResponse {
58
73
  message: string;
59
74
  }
60
75
 
61
- declare const SDK_VERSION = "0.4.0";
76
+ declare function getBlockLabel(block: any, locale?: string): string;
77
+ declare function formatBlockValue(block: any): string;
78
+ declare function prepareBlocksForSubmission(formData: any): any[];
79
+ declare function extractBlockValues(blocks: any[]): Record<string, any>;
80
+ declare function getBlockTextValue(block: any, locale?: string): string;
81
+
82
+ declare function formatMinor(amountMinor: number, currency: string, options?: {
83
+ showSymbols?: boolean;
84
+ decimalPlaces?: number;
85
+ customSymbol?: string;
86
+ }): string;
87
+ declare function formatPayment(payment: Payment, options?: {
88
+ showSymbols?: boolean;
89
+ decimalPlaces?: number;
90
+ showBreakdown?: boolean;
91
+ }): string;
92
+ declare function getMarketPrice(prices: Price[], marketId: string, businessMarkets?: any[], options?: {
93
+ showSymbols?: boolean;
94
+ decimalPlaces?: number;
95
+ showCompareAt?: boolean;
96
+ fallbackMarket?: string;
97
+ }): string;
98
+ declare function getPriceAmount(prices: Price[], marketId: string, fallbackMarket?: string): number;
99
+ declare function createPaymentForCheckout(subtotalMinor: number, marketId: string, currency: string, paymentMethod: any, options?: {
100
+ discount?: number;
101
+ taxAmount?: number;
102
+ taxRateBps?: number;
103
+ promoCode?: {
104
+ id: string;
105
+ code: string;
106
+ type: string;
107
+ value: number;
108
+ };
109
+ }): Payment;
110
+
111
+ /**
112
+ * Maps currency codes to their display symbols
113
+ */
114
+ declare function getCurrencySymbol(currency: string): string;
115
+
116
+ interface ValidationResult {
117
+ isValid: boolean;
118
+ error?: string;
119
+ }
120
+ declare function validatePhoneNumber(phone: string): ValidationResult;
121
+
122
+ declare const tzGroups: {
123
+ label: string;
124
+ zones: {
125
+ label: string;
126
+ value: string;
127
+ }[];
128
+ }[];
129
+ declare function findTimeZone(groups: typeof tzGroups): string;
130
+
131
+ declare const locales: readonly ["en", "sr-latn"];
132
+ /**
133
+ * * returns "slugified" text.
134
+ * @param text: string - text to slugify
135
+ */
136
+ declare function slugify(text: string): string;
137
+ /**
138
+ * * returns "humanized" text. runs slugify() and then replaces - with space and upper case first letter of every word, and lower case the rest
139
+ * @param text: string - text to humanize
140
+ */
141
+ declare function humanize(text: string): string;
142
+ /**
143
+ * * returns "categorified" text. runs slugify() and then replaces - with space and upper cases everything
144
+ * @param text: string - text to categorify
145
+ * @returns string - categorified text
146
+ */
147
+ declare function categorify(text: string): string;
148
+ /**
149
+ * * returns a nicely formatted string of the date passed
150
+ * @param date: string | number | Date - date to format
151
+ * @param locale: string - locale to format the date in
152
+ * @returns string - formatted date
153
+ */
154
+ declare function formatDate(date: string | number | Date, locale: (typeof locales)[number]): string;
155
+
156
+ declare function fetchSvgContent(mediaObject: any): Promise<string | null>;
157
+ /**
158
+ * Server-side helper for Astro components to fetch SVG content during SSR
159
+ *
160
+ * @param mediaObject The media object from the CMS
161
+ * @returns The SVG content as a string, or empty string on failure
162
+ */
163
+ declare function getSvgContentForAstro(mediaObject: any): Promise<string>;
164
+ /**
165
+ * Client-side helper to fetch and inject SVG content into DOM elements
166
+ *
167
+ * @param mediaObject The media object from the CMS
168
+ * @param targetElement The DOM element to inject the SVG into
169
+ * @param className Optional CSS class to add to the SVG
170
+ */
171
+ declare function injectSvgIntoElement(mediaObject: any, targetElement: HTMLElement, className?: string): Promise<void>;
172
+
173
+ declare const SDK_VERSION = "0.3.167";
62
174
  declare const SUPPORTED_FRAMEWORKS: readonly ["astro", "react", "vue", "svelte", "vanilla"];
63
175
  interface ApiConfig {
64
176
  httpClient: any;
@@ -74,30 +186,38 @@ declare function createArkySDK(config: HttpClientConfig & {
74
186
  market: string;
75
187
  locale?: string;
76
188
  }): Promise<{
77
- user: {
78
- updateUser(params: UpdateUserProfileParams, options?: RequestOptions): Promise<any>;
79
- deleteUser(params: DeleteUserParams, options?: RequestOptions): Promise<any>;
189
+ auth: {
190
+ session(options?: RequestOptions): Promise<any>;
191
+ signInAnonymously(options?: RequestOptions): Promise<any>;
192
+ isGuest(): Promise<boolean>;
193
+ code(params: {
194
+ email: string;
195
+ }, options?: RequestOptions): Promise<any>;
196
+ verify(params: MagicLinkVerifyParams, options?: RequestOptions): Promise<any>;
197
+ refresh(params: {
198
+ refreshToken: string;
199
+ }, options?: RequestOptions): Promise<any>;
200
+ businessCode(businessId: string, params: {
201
+ email: string;
202
+ }, options?: RequestOptions): Promise<any>;
203
+ businessVerify(businessId: string, params: MagicLinkVerifyParams, options?: RequestOptions): Promise<any>;
204
+ magicLink(params: MagicLinkRequestParams, options?: RequestOptions): Promise<any>;
205
+ };
206
+ account: {
207
+ updateAccount(params: UpdateAccountProfileParams, options?: RequestOptions): Promise<any>;
208
+ deleteAccount(params: DeleteAccountParams, options?: RequestOptions): Promise<any>;
80
209
  addPhoneNumber(params: AddPhoneNumberParams, options?: RequestOptions): Promise<any>;
81
210
  phoneNumberConfirm(params: PhoneNumberConfirmParams, options?: RequestOptions): Promise<any>;
82
211
  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>;
212
+ searchAccounts(params: SearchAccountsParams, options?: RequestOptions): Promise<any>;
213
+ subscribe(params: AccountSubscribeParams, options?: RequestOptions): Promise<any>;
94
214
  };
95
215
  business: {
96
216
  createBusiness(params: CreateBusinessParams, options?: RequestOptions): Promise<any>;
97
217
  updateBusiness(params: UpdateBusinessParams, options?: RequestOptions): Promise<any>;
98
218
  deleteBusiness(params: DeleteBusinessParams, options?: RequestOptions): Promise<any>;
99
219
  getBusiness(params: GetBusinessParams, options?: RequestOptions): Promise<any>;
100
- getBusinesses(params: GetBusinessesParams, options?: RequestOptions): Promise<any>;
220
+ getBusinesses(params?: GetBusinessesParams, options?: RequestOptions): Promise<any>;
101
221
  getBusinessParents(params: GetBusinessParentsParams, options?: RequestOptions): Promise<any>;
102
222
  triggerBuilds(params: TriggerBuildsParams, options?: RequestOptions): Promise<any>;
103
223
  getSubscriptionPlans(params: GetSubscriptionPlansParams, options?: RequestOptions): Promise<any>;
@@ -108,7 +228,6 @@ declare function createArkySDK(config: HttpClientConfig & {
108
228
  handleInvitation(params: HandleInvitationParams, options?: RequestOptions): Promise<any>;
109
229
  testWebhook(params: TestWebhookParams, options?: RequestOptions): Promise<any>;
110
230
  getBusinessMedia(params: GetBusinessMediaParams2, options?: RequestOptions): Promise<any>;
111
- setProviderSchedule(params: SetProviderScheduleParams, options?: RequestOptions): Promise<any>;
112
231
  processRefund(params: ProcessRefundParams, options?: RequestOptions): Promise<any>;
113
232
  };
114
233
  media: {
@@ -117,13 +236,6 @@ declare function createArkySDK(config: HttpClientConfig & {
117
236
  getBusinessMedia(params: GetBusinessMediaParams, options?: RequestOptions): Promise<any>;
118
237
  updateMedia(params: UpdateMediaParams, options?: RequestOptions): Promise<any>;
119
238
  };
120
- role: {
121
- createRole(params: CreateRoleParams, options?: RequestOptions): Promise<void>;
122
- updateRole(params: UpdateRoleParams, options?: RequestOptions): Promise<any>;
123
- deleteRole(params: DeleteRoleParams, options?: RequestOptions): Promise<any>;
124
- getRole(params: GetRoleParams, options?: RequestOptions): Promise<any>;
125
- getRoles(params: GetRolesParams, options?: RequestOptions): Promise<any>;
126
- };
127
239
  notification: {
128
240
  trackEmailOpen(params: TrackEmailOpenParams, options?: RequestOptions): Promise<any>;
129
241
  getDeliveryStats(params: GetDeliveryStatsParams, options?: RequestOptions): Promise<any>;
@@ -139,20 +251,14 @@ declare function createArkySDK(config: HttpClientConfig & {
139
251
  getAnalytics(params: GetAnalyticsParams, options?: RequestOptions): Promise<any>;
140
252
  };
141
253
  cms: {
142
- createCollection(params: CreateCollectionParams, options?: RequestOptions): Promise<any>;
143
- updateCollection(params: UpdateCollectionParams, options?: RequestOptions): Promise<any>;
144
- deleteCollection(params: DeleteCollectionParams, options?: RequestOptions): Promise<any>;
145
- getCollection(params: GetCollectionParams, options?: RequestOptions): Promise<any>;
146
- getCollections(params: GetCollectionsParams, options?: RequestOptions): Promise<any>;
254
+ createNode(params: CreateNodeParams, options?: RequestOptions): Promise<any>;
255
+ updateNode(params: UpdateNodeParams, options?: RequestOptions): Promise<any>;
256
+ deleteNode(params: DeleteNodeParams, options?: RequestOptions): Promise<any>;
257
+ getNode(params: GetNodeParams, options?: RequestOptions): Promise<any>;
258
+ getNodes(params: GetNodesParams, options?: RequestOptions): Promise<any>;
259
+ getNodeChildren(params: GetNodeChildrenParams, options?: RequestOptions): Promise<any>;
147
260
  generateBlocks(params: GenerateBlocksParams, options?: RequestOptions): Promise<any>;
148
- getCollectionEntries(params: GetEntriesParams, options?: RequestOptions): Promise<any>;
149
- createCollectionEntry(params: CreateEntryParams, options?: RequestOptions): Promise<any>;
150
- updateCollectionEntry(params: UpdateEntryParams, options?: RequestOptions): Promise<any>;
151
- deleteCollectionEntry(params: DeleteCollectionEntryParams, options?: RequestOptions): Promise<any>;
152
- getCollectionEntry(params: GetCollectionEntryParams, options?: RequestOptions): Promise<any>;
153
- sendEntry(params: SendEntryParams, options?: RequestOptions): Promise<any>;
154
261
  getVariableMetadata(params: GetVariableMetadataParams, options?: RequestOptions): Promise<any>;
155
- getCollectionSubscribers(params: GetCollectionSubscribersParams, options?: RequestOptions): Promise<any>;
156
262
  };
157
263
  eshop: {
158
264
  createProduct(params: CreateProductParams, options?: RequestOptions): Promise<any>;
@@ -164,10 +270,8 @@ declare function createArkySDK(config: HttpClientConfig & {
164
270
  updateOrder(params: UpdateOrderParams, options?: RequestOptions): Promise<any>;
165
271
  getOrder(params: GetOrderParams, options?: RequestOptions): Promise<any>;
166
272
  getOrders(params: GetOrdersParams, options?: RequestOptions): Promise<any>;
167
- updateOrderStatus(params: UpdateOrderStatusParams, options?: RequestOptions): Promise<any>;
168
- updateOrderPaymentStatus(params: UpdateOrderPaymentStatusParams, options?: RequestOptions): Promise<any>;
169
273
  getQuote(params: GetQuoteParams, options?: RequestOptions): Promise<any>;
170
- checkout(params: CheckoutParams, options?: RequestOptions): Promise<any>;
274
+ checkout(params: OrderCheckoutParams, options?: RequestOptions): Promise<any>;
171
275
  };
172
276
  reservation: {
173
277
  addToCart(slot: Slot): void;
@@ -179,14 +283,13 @@ declare function createArkySDK(config: HttpClientConfig & {
179
283
  checkout(params?: Partial<ReservationCheckoutParams>, options?: RequestOptions): Promise<any>;
180
284
  getReservation(params: GetReservationParams, options?: RequestOptions): Promise<any>;
181
285
  searchReservations(params: SearchReservationsParams, options?: RequestOptions): Promise<any>;
182
- searchMyReservations(params: SearchMyReservationsParams, options?: RequestOptions): Promise<any>;
183
286
  getQuote(params: GetReservationQuoteParams, options?: RequestOptions): Promise<any>;
184
287
  createService(params: CreateServiceParams, options?: RequestOptions): Promise<any>;
185
288
  updateService(params: UpdateServiceParams, options?: RequestOptions): Promise<any>;
186
289
  deleteService(params: DeleteServiceParams, options?: RequestOptions): Promise<any>;
290
+ bulkSchedule(params: BulkScheduleParams, options?: RequestOptions): Promise<any>;
187
291
  getService(params: GetServiceParams, options?: RequestOptions): Promise<any>;
188
292
  getServices(params: GetServicesParams, options?: RequestOptions): Promise<any>;
189
- getServiceProviders(params: GetServiceProvidersParams, options?: RequestOptions): Promise<any>;
190
293
  createProvider(params: CreateProviderParams, options?: RequestOptions): Promise<any>;
191
294
  updateProvider(params: UpdateProviderParams, options?: RequestOptions): Promise<any>;
192
295
  deleteProvider(params: DeleteProviderParams, options?: RequestOptions): Promise<any>;
@@ -200,31 +303,36 @@ declare function createArkySDK(config: HttpClientConfig & {
200
303
  deleteData(params: DeleteDataParams, options?: RequestOptions): Promise<void>;
201
304
  runScript(params: RunScriptParams, options?: RequestOptions): Promise<RunScriptResponse>;
202
305
  };
203
- featureFlags: {
204
- createFlag(params: CreateFeatureFlagParams, options?: RequestOptions<FeatureFlag>): Promise<FeatureFlag>;
205
- getFlag(params: GetFeatureFlagParams, options?: RequestOptions<FeatureFlag>): Promise<FeatureFlag>;
206
- getFlags(params?: GetFeatureFlagsParams, options?: RequestOptions<FeatureFlag[]>): Promise<FeatureFlag[]>;
207
- updateFlag(params: UpdateFeatureFlagParams, options?: RequestOptions<FeatureFlag>): Promise<FeatureFlag>;
208
- deleteFlag(params: DeleteFeatureFlagParams, options?: RequestOptions<{
209
- deleted: boolean;
210
- }>): Promise<{
211
- deleted: boolean;
212
- }>;
213
- getResults(params: GetFeatureFlagResultsParams, options?: RequestOptions<FlagResults>): Promise<FlagResults>;
214
- getVariant(params: GetVariantParams, options?: RequestOptions<GetVariantResponse>): Promise<GetVariantResponse>;
215
- trackEvent(params: TrackEventParams, options?: RequestOptions<TrackEventResponse>): Promise<TrackEventResponse>;
216
- isEnabled(flagKey: string): Promise<boolean>;
217
- getVariantWithDefault<T = any>(flagKey: string, defaultValue: T): Promise<{
218
- variantKey: string;
219
- payload: T;
220
- }>;
221
- activateFlag(id: string): Promise<FeatureFlag>;
222
- archiveFlag(id: string): Promise<FeatureFlag>;
223
- };
224
306
  location: {
225
307
  getCountries(options?: RequestOptions): Promise<GetCountriesResponse>;
226
308
  getCountryStates(countryCode: string, options?: RequestOptions): Promise<LocationCountry>;
227
309
  };
310
+ network: {
311
+ searchServices(networkKey: string, params?: NetworkSearchParams, options?: RequestOptions): Promise<any>;
312
+ searchProducts(networkKey: string, params?: NetworkSearchParams, options?: RequestOptions): Promise<any>;
313
+ searchProviders(networkKey: string, params?: NetworkSearchParams, options?: RequestOptions): Promise<any>;
314
+ };
315
+ workflow: {
316
+ createWorkflow(params: CreateWorkflowParams, options?: RequestOptions): Promise<any>;
317
+ updateWorkflow(params: UpdateWorkflowParams, options?: RequestOptions): Promise<any>;
318
+ deleteWorkflow(params: DeleteWorkflowParams, options?: RequestOptions): Promise<any>;
319
+ getWorkflow(params: GetWorkflowParams, options?: RequestOptions): Promise<any>;
320
+ getWorkflows(params?: GetWorkflowsParams, options?: RequestOptions): Promise<any>;
321
+ triggerWorkflow(params: TriggerWorkflowParams, options?: RequestOptions): Promise<any>;
322
+ };
323
+ audience: {
324
+ createAudience(params: CreateAudienceParams, options?: RequestOptions): Promise<any>;
325
+ updateAudience(params: UpdateAudienceParams, options?: RequestOptions): Promise<any>;
326
+ deleteAudience(params: {
327
+ id: string;
328
+ }, options?: RequestOptions): Promise<any>;
329
+ getAudience(params: GetAudienceParams, options?: RequestOptions): Promise<any>;
330
+ getAudiences(params: GetAudiencesParams, options?: RequestOptions): Promise<any>;
331
+ subscribe(params: SubscribeAudienceParams, options?: RequestOptions): Promise<any>;
332
+ checkAccess(params: {
333
+ id: string;
334
+ }, options?: RequestOptions): Promise<any>;
335
+ };
228
336
  setBusinessId: (businessId: string) => void;
229
337
  getBusinessId: () => string;
230
338
  setMarket: (market: string) => void;
@@ -241,7 +349,7 @@ declare function createArkySDK(config: HttpClientConfig & {
241
349
  getBlockValues: (entry: any, blockKey: string) => any;
242
350
  getBlockLabel: typeof getBlockLabel;
243
351
  getBlockTextValue: typeof getBlockTextValue;
244
- getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any;
352
+ getBlockObjectValues: (entry: any, blockKey: string, locale?: string) => any[];
245
353
  getBlockFromArray: (entry: any, blockKey: string, locale?: string) => any;
246
354
  formatBlockValue: typeof formatBlockValue;
247
355
  prepareBlocksForSubmission: typeof prepareBlocksForSubmission;
@@ -268,7 +376,11 @@ declare function createArkySDK(config: HttpClientConfig & {
268
376
  getSvgContentForAstro: typeof getSvgContentForAstro;
269
377
  fetchSvgContent: typeof fetchSvgContent;
270
378
  injectSvgIntoElement: typeof injectSvgIntoElement;
379
+ isValidKey: typeof isValidKey;
380
+ validateKey: typeof validateKey;
381
+ toKey: typeof toKey;
382
+ nameToKey: typeof nameToKey;
271
383
  };
272
384
  }>;
273
385
 
274
- export { type ApiConfig, type GetCountriesResponse, type HttpClientConfig, type LocationCountry, type LocationState, SDK_VERSION, SUPPORTED_FRAMEWORKS, Slot, createArkySDK };
386
+ export { type ApiConfig, type GetCountriesResponse, type HttpClientConfig, type LocationCountry, type LocationState, Payment, Price, SDK_VERSION, SUPPORTED_FRAMEWORKS, Slot, createArkySDK };