arky-sdk 0.3.120 → 0.3.122

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,4 +1,4 @@
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, CreateCollectionParams, UpdateCollectionParams, DeleteCollectionParams, GetCollectionParams, GetCollectionsParams, GenerateBlocksParams, GetEntriesParams, CreateEntryParams, UpdateEntryParams, DeleteCollectionEntryParams, GetCollectionEntryParams, SendEntryParams, GetVariableMetadataParams, GetCollectionSubscribersParams, 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.cjs';
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.cjs';
2
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.cjs';
3
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-DaEaIf5S.cjs';
4
4
 
@@ -138,20 +138,16 @@ declare function createArkySDK(config: HttpClientConfig & {
138
138
  getAnalytics(params: GetAnalyticsParams, options?: RequestOptions): Promise<any>;
139
139
  };
140
140
  cms: {
141
- createCollection(params: CreateCollectionParams, options?: RequestOptions): Promise<any>;
142
- updateCollection(params: UpdateCollectionParams, options?: RequestOptions): Promise<any>;
143
- deleteCollection(params: DeleteCollectionParams, options?: RequestOptions): Promise<any>;
144
- getCollection(params: GetCollectionParams, options?: RequestOptions): Promise<any>;
145
- getCollections(params: GetCollectionsParams, options?: RequestOptions): Promise<any>;
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>;
146
147
  generateBlocks(params: GenerateBlocksParams, options?: RequestOptions): Promise<any>;
147
- getCollectionEntries(params: GetEntriesParams, options?: RequestOptions): Promise<any>;
148
- createCollectionEntry(params: CreateEntryParams, options?: RequestOptions): Promise<any>;
149
- updateCollectionEntry(params: UpdateEntryParams, options?: RequestOptions): Promise<any>;
150
- deleteCollectionEntry(params: DeleteCollectionEntryParams, options?: RequestOptions): Promise<any>;
151
- getCollectionEntry(params: GetCollectionEntryParams, options?: RequestOptions): Promise<any>;
152
- sendEntry(params: SendEntryParams, options?: RequestOptions): Promise<any>;
148
+ sendNode(params: SendNodeParams, options?: RequestOptions): Promise<any>;
153
149
  getVariableMetadata(params: GetVariableMetadataParams, options?: RequestOptions): Promise<any>;
154
- getCollectionSubscribers(params: GetCollectionSubscribersParams, options?: RequestOptions): Promise<any>;
150
+ getNodeSubscribers(params: GetNodeSubscribersParams, options?: RequestOptions): Promise<any>;
155
151
  };
156
152
  eshop: {
157
153
  createProduct(params: CreateProductParams, options?: RequestOptions): Promise<any>;
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
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, CreateCollectionParams, UpdateCollectionParams, DeleteCollectionParams, GetCollectionParams, GetCollectionsParams, GenerateBlocksParams, GetEntriesParams, CreateEntryParams, UpdateEntryParams, DeleteCollectionEntryParams, GetCollectionEntryParams, SendEntryParams, GetVariableMetadataParams, GetCollectionSubscribersParams, 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';
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
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
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';
4
4
 
@@ -138,20 +138,16 @@ declare function createArkySDK(config: HttpClientConfig & {
138
138
  getAnalytics(params: GetAnalyticsParams, options?: RequestOptions): Promise<any>;
139
139
  };
140
140
  cms: {
141
- createCollection(params: CreateCollectionParams, options?: RequestOptions): Promise<any>;
142
- updateCollection(params: UpdateCollectionParams, options?: RequestOptions): Promise<any>;
143
- deleteCollection(params: DeleteCollectionParams, options?: RequestOptions): Promise<any>;
144
- getCollection(params: GetCollectionParams, options?: RequestOptions): Promise<any>;
145
- getCollections(params: GetCollectionsParams, options?: RequestOptions): Promise<any>;
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>;
146
147
  generateBlocks(params: GenerateBlocksParams, options?: RequestOptions): Promise<any>;
147
- getCollectionEntries(params: GetEntriesParams, options?: RequestOptions): Promise<any>;
148
- createCollectionEntry(params: CreateEntryParams, options?: RequestOptions): Promise<any>;
149
- updateCollectionEntry(params: UpdateEntryParams, options?: RequestOptions): Promise<any>;
150
- deleteCollectionEntry(params: DeleteCollectionEntryParams, options?: RequestOptions): Promise<any>;
151
- getCollectionEntry(params: GetCollectionEntryParams, options?: RequestOptions): Promise<any>;
152
- sendEntry(params: SendEntryParams, options?: RequestOptions): Promise<any>;
148
+ sendNode(params: SendNodeParams, options?: RequestOptions): Promise<any>;
153
149
  getVariableMetadata(params: GetVariableMetadataParams, options?: RequestOptions): Promise<any>;
154
- getCollectionSubscribers(params: GetCollectionSubscribersParams, options?: RequestOptions): Promise<any>;
150
+ getNodeSubscribers(params: GetNodeSubscribersParams, options?: RequestOptions): Promise<any>;
155
151
  };
156
152
  eshop: {
157
153
  createProduct(params: CreateProductParams, options?: RequestOptions): Promise<any>;
package/dist/index.js CHANGED
@@ -727,31 +727,30 @@ var getImageUrl = (imageBlock, isBlock = true) => {
727
727
  // src/api/cms.ts
728
728
  var createCmsApi = (apiConfig) => {
729
729
  return {
730
- // ===== COLLECTIONS =====
731
- async createCollection(params, options) {
730
+ async createNode(params, options) {
732
731
  return apiConfig.httpClient.post(
733
- `/v1/businesses/${apiConfig.businessId}/collections`,
732
+ `/v1/businesses/${apiConfig.businessId}/nodes`,
734
733
  params,
735
734
  options
736
735
  );
737
736
  },
738
- async updateCollection(params, options) {
737
+ async updateNode(params, options) {
739
738
  return apiConfig.httpClient.put(
740
- `/v1/businesses/${apiConfig.businessId}/collections/${params.id}`,
739
+ `/v1/businesses/${apiConfig.businessId}/nodes/${params.id}`,
741
740
  params,
742
741
  options
743
742
  );
744
743
  },
745
- async deleteCollection(params, options) {
744
+ async deleteNode(params, options) {
746
745
  return apiConfig.httpClient.delete(
747
- `/v1/businesses/${apiConfig.businessId}/collections/${params.id}`,
746
+ `/v1/businesses/${apiConfig.businessId}/nodes/${params.id}`,
748
747
  options
749
748
  );
750
749
  },
751
- async getCollection(params, options) {
750
+ async getNode(params, options) {
752
751
  const formattedId = formatIdOrSlug(params.id, apiConfig);
753
752
  const response = await apiConfig.httpClient.get(
754
- `/v1/businesses/${apiConfig.businessId}/collections/${formattedId}`,
753
+ `/v1/businesses/${apiConfig.businessId}/nodes/${formattedId}`,
755
754
  options
756
755
  );
757
756
  return {
@@ -768,86 +767,54 @@ var createCmsApi = (apiConfig) => {
768
767
  }
769
768
  };
770
769
  },
771
- async getCollections(params, options) {
770
+ async getNodes(params, options) {
772
771
  return apiConfig.httpClient.get(
773
- `/v1/businesses/${apiConfig.businessId}/collections`,
772
+ `/v1/businesses/${apiConfig.businessId}/nodes`,
774
773
  {
775
774
  ...options,
776
775
  params
777
776
  }
778
777
  );
779
778
  },
780
- async generateBlocks(params, options) {
781
- return apiConfig.httpClient.post(
782
- `/v1/businesses/${apiConfig.businessId}/collections/blocks/generate`,
783
- params,
784
- options
785
- );
786
- },
787
- // ===== ENTRIES =====
788
- async getCollectionEntries(params, options) {
789
- const { collectionId, ...queryParams } = params;
779
+ async getNodeChildren(params, options) {
780
+ const { id, ...queryParams } = params;
790
781
  return apiConfig.httpClient.get(
791
- `/v1/businesses/${apiConfig.businessId}/collections/${collectionId}/entries`,
782
+ `/v1/businesses/${apiConfig.businessId}/nodes/${id}/children`,
792
783
  {
793
784
  ...options,
794
785
  params: queryParams
795
786
  }
796
787
  );
797
788
  },
798
- async createCollectionEntry(params, options) {
799
- const { collectionId, ...payload } = params;
789
+ async generateBlocks(params, options) {
800
790
  return apiConfig.httpClient.post(
801
- `/v1/businesses/${apiConfig.businessId}/collections/${collectionId}/entries`,
802
- { ...payload, collectionId },
803
- options
804
- );
805
- },
806
- async updateCollectionEntry(params, options) {
807
- const { collectionId, id, ...payload } = params;
808
- return apiConfig.httpClient.put(
809
- `/v1/businesses/${apiConfig.businessId}/collections/${collectionId}/entries/${id}`,
810
- { ...payload, collectionId },
811
- options
812
- );
813
- },
814
- async deleteCollectionEntry(params, options) {
815
- return apiConfig.httpClient.delete(
816
- `/v1/businesses/${apiConfig.businessId}/collections/${params.collectionId}/entries/${params.id}`,
817
- options
818
- );
819
- },
820
- async getCollectionEntry(params, options) {
821
- const formattedId = formatIdOrSlug(params.id, apiConfig);
822
- return apiConfig.httpClient.get(
823
- `/v1/businesses/${apiConfig.businessId}/collections/${params.collectionId}/entries/${formattedId}`,
791
+ `/v1/businesses/${apiConfig.businessId}/nodes/blocks/generate`,
792
+ params,
824
793
  options
825
794
  );
826
795
  },
827
- async sendEntry(params, options) {
828
- const { collectionId, entryId, scheduledAt } = params;
796
+ async sendNode(params, options) {
797
+ const { nodeId, scheduledAt } = params;
829
798
  return apiConfig.httpClient.post(
830
- `/v1/businesses/${apiConfig.businessId}/collections/${collectionId}/entries/${entryId}/send`,
799
+ `/v1/businesses/${apiConfig.businessId}/nodes/${nodeId}/send`,
831
800
  {
832
801
  businessId: apiConfig.businessId,
833
- entryId,
802
+ nodeId,
834
803
  scheduledAt: scheduledAt ?? Math.floor(Date.now() / 1e3)
835
804
  },
836
805
  options
837
806
  );
838
807
  },
839
- // ===== VARIABLES / METADATA =====
840
808
  async getVariableMetadata(params, options) {
841
809
  return apiConfig.httpClient.get(
842
- `/v1/businesses/${apiConfig.businessId}/collections/types/${params.entryType}/variables`,
810
+ `/v1/businesses/${apiConfig.businessId}/nodes/types/${params.nodeType}/variables`,
843
811
  options
844
812
  );
845
813
  },
846
- // ===== COLLECTION SUBSCRIPTIONS =====
847
- async getCollectionSubscribers(params, options) {
814
+ async getNodeSubscribers(params, options) {
848
815
  const formattedId = formatIdOrSlug(params.id, apiConfig);
849
816
  return apiConfig.httpClient.get(
850
- `/v1/businesses/${apiConfig.businessId}/collections/${formattedId}/subscribers`,
817
+ `/v1/businesses/${apiConfig.businessId}/nodes/${formattedId}/subscribers`,
851
818
  options
852
819
  );
853
820
  }
@@ -880,21 +847,10 @@ var createEshopApi = (apiConfig) => {
880
847
  },
881
848
  async getProduct(params, options) {
882
849
  const formattedId = formatIdOrSlug(params.id, apiConfig);
883
- const response = await apiConfig.httpClient.get(
850
+ return apiConfig.httpClient.get(
884
851
  `/v1/businesses/${apiConfig.businessId}/products/${formattedId}`,
885
852
  options
886
853
  );
887
- return {
888
- ...response,
889
- getName() {
890
- const locale = apiConfig.locale;
891
- return response.name?.[locale] || response.name?.en || response.name || "";
892
- },
893
- getDescription() {
894
- const locale = apiConfig.locale;
895
- return response.description?.[locale] || response.description?.en || response.description || "";
896
- }
897
- };
898
854
  },
899
855
  async getProducts(params, options) {
900
856
  return apiConfig.httpClient.get(
@@ -1074,21 +1030,10 @@ var createReservationApi = (apiConfig) => {
1074
1030
  },
1075
1031
  async getService(params, options) {
1076
1032
  const formattedId = formatIdOrSlug(params.id, apiConfig);
1077
- const response = await apiConfig.httpClient.get(
1033
+ return apiConfig.httpClient.get(
1078
1034
  `/v1/businesses/${apiConfig.businessId}/services/${formattedId}`,
1079
1035
  options
1080
1036
  );
1081
- return {
1082
- ...response,
1083
- getName() {
1084
- const locale = apiConfig.locale;
1085
- return response.name?.[locale] || response.name?.en || response.name || "";
1086
- },
1087
- getDescription() {
1088
- const locale = apiConfig.locale;
1089
- return response.description?.[locale] || response.description?.en || response.description || "";
1090
- }
1091
- };
1092
1037
  },
1093
1038
  async getServices(params, options) {
1094
1039
  return apiConfig.httpClient.get(