arky-sdk 0.3.109 → 0.3.110
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 +28 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/index.js +28 -26
- package/dist/index.js.map +1 -1
- package/dist/types.d.cts +4 -7
- package/dist/types.d.ts +4 -7
- package/package.json +1 -1
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, 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, GetQuoteParams,
|
|
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, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, 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
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-3F_m7296.cjs';
|
|
4
4
|
|
|
@@ -165,7 +165,7 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
165
165
|
getOrder(params: GetOrderParams, options?: RequestOptions): Promise<any>;
|
|
166
166
|
getOrders(params: GetOrdersParams, options?: RequestOptions): Promise<any>;
|
|
167
167
|
getQuote(params: GetQuoteParams, options?: RequestOptions): Promise<any>;
|
|
168
|
-
checkout(params:
|
|
168
|
+
checkout(params: OrderCheckoutParams, options?: RequestOptions): Promise<any>;
|
|
169
169
|
};
|
|
170
170
|
reservation: {
|
|
171
171
|
addToCart(slot: Slot): void;
|
|
@@ -177,7 +177,6 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
177
177
|
checkout(params?: Partial<ReservationCheckoutParams>, options?: RequestOptions): Promise<any>;
|
|
178
178
|
getReservation(params: GetReservationParams, options?: RequestOptions): Promise<any>;
|
|
179
179
|
searchReservations(params: SearchReservationsParams, options?: RequestOptions): Promise<any>;
|
|
180
|
-
searchMyReservations(params: SearchMyReservationsParams, options?: RequestOptions): Promise<any>;
|
|
181
180
|
getQuote(params: GetReservationQuoteParams, options?: RequestOptions): Promise<any>;
|
|
182
181
|
createService(params: CreateServiceParams, options?: RequestOptions): Promise<any>;
|
|
183
182
|
updateService(params: UpdateServiceParams, 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, 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, GetQuoteParams,
|
|
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, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, 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.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-4hIdMU6f.js';
|
|
4
4
|
|
|
@@ -165,7 +165,7 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
165
165
|
getOrder(params: GetOrderParams, options?: RequestOptions): Promise<any>;
|
|
166
166
|
getOrders(params: GetOrdersParams, options?: RequestOptions): Promise<any>;
|
|
167
167
|
getQuote(params: GetQuoteParams, options?: RequestOptions): Promise<any>;
|
|
168
|
-
checkout(params:
|
|
168
|
+
checkout(params: OrderCheckoutParams, options?: RequestOptions): Promise<any>;
|
|
169
169
|
};
|
|
170
170
|
reservation: {
|
|
171
171
|
addToCart(slot: Slot): void;
|
|
@@ -177,7 +177,6 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
177
177
|
checkout(params?: Partial<ReservationCheckoutParams>, options?: RequestOptions): Promise<any>;
|
|
178
178
|
getReservation(params: GetReservationParams, options?: RequestOptions): Promise<any>;
|
|
179
179
|
searchReservations(params: SearchReservationsParams, options?: RequestOptions): Promise<any>;
|
|
180
|
-
searchMyReservations(params: SearchMyReservationsParams, options?: RequestOptions): Promise<any>;
|
|
181
180
|
getQuote(params: GetReservationQuoteParams, options?: RequestOptions): Promise<any>;
|
|
182
181
|
createService(params: CreateServiceParams, options?: RequestOptions): Promise<any>;
|
|
183
182
|
updateService(params: UpdateServiceParams, options?: RequestOptions): Promise<any>;
|
package/dist/index.js
CHANGED
|
@@ -910,7 +910,7 @@ var createEshopApi = (apiConfig) => {
|
|
|
910
910
|
},
|
|
911
911
|
async updateOrder(params, options) {
|
|
912
912
|
return apiConfig.httpClient.put(
|
|
913
|
-
`/v1/businesses/${apiConfig.businessId}/orders
|
|
913
|
+
`/v1/businesses/${apiConfig.businessId}/orders/${params.id}`,
|
|
914
914
|
params,
|
|
915
915
|
options
|
|
916
916
|
);
|
|
@@ -933,11 +933,14 @@ var createEshopApi = (apiConfig) => {
|
|
|
933
933
|
// ===== PAYMENTS =====
|
|
934
934
|
async getQuote(params, options) {
|
|
935
935
|
const payload = {
|
|
936
|
-
businessId: apiConfig.businessId,
|
|
937
936
|
market: apiConfig.market,
|
|
938
937
|
...params
|
|
939
938
|
};
|
|
940
|
-
return apiConfig.httpClient.post(
|
|
939
|
+
return apiConfig.httpClient.post(
|
|
940
|
+
`/v1/businesses/${apiConfig.businessId}/orders/quote`,
|
|
941
|
+
payload,
|
|
942
|
+
options
|
|
943
|
+
);
|
|
941
944
|
},
|
|
942
945
|
async checkout(params, options) {
|
|
943
946
|
const payload = {
|
|
@@ -974,16 +977,19 @@ var createReservationApi = (apiConfig) => {
|
|
|
974
977
|
// ===== RESERVATIONS =====
|
|
975
978
|
async createReservation(params, options) {
|
|
976
979
|
const payload = {
|
|
977
|
-
businessId: apiConfig.businessId,
|
|
978
980
|
market: apiConfig.market,
|
|
979
981
|
...params
|
|
980
982
|
};
|
|
981
|
-
return apiConfig.httpClient.post(
|
|
983
|
+
return apiConfig.httpClient.post(
|
|
984
|
+
`/v1/businesses/${apiConfig.businessId}/reservations`,
|
|
985
|
+
payload,
|
|
986
|
+
options
|
|
987
|
+
);
|
|
982
988
|
},
|
|
983
989
|
async updateReservation(params, options) {
|
|
984
990
|
const { id, ...payload } = params;
|
|
985
991
|
return apiConfig.httpClient.put(
|
|
986
|
-
`/v1/reservations/${id}`,
|
|
992
|
+
`/v1/businesses/${apiConfig.businessId}/reservations/${id}`,
|
|
987
993
|
payload,
|
|
988
994
|
options
|
|
989
995
|
);
|
|
@@ -996,46 +1002,42 @@ var createReservationApi = (apiConfig) => {
|
|
|
996
1002
|
to: s.to
|
|
997
1003
|
}));
|
|
998
1004
|
const payload = {
|
|
999
|
-
businessId: apiConfig.businessId,
|
|
1000
1005
|
market: apiConfig.market,
|
|
1001
1006
|
...params,
|
|
1002
1007
|
items
|
|
1003
1008
|
};
|
|
1004
1009
|
return apiConfig.httpClient.post(
|
|
1005
|
-
`/v1/reservations/checkout`,
|
|
1010
|
+
`/v1/businesses/${apiConfig.businessId}/reservations/checkout`,
|
|
1006
1011
|
payload,
|
|
1007
1012
|
options
|
|
1008
1013
|
);
|
|
1009
1014
|
},
|
|
1010
1015
|
async getReservation(params, options) {
|
|
1011
|
-
return apiConfig.httpClient.get(
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1016
|
+
return apiConfig.httpClient.get(
|
|
1017
|
+
`/v1/businesses/${apiConfig.businessId}/reservations/${params.id}`,
|
|
1018
|
+
options
|
|
1019
|
+
);
|
|
1015
1020
|
},
|
|
1016
1021
|
async searchReservations(params, options) {
|
|
1017
|
-
return apiConfig.httpClient.get(
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
...
|
|
1021
|
-
|
|
1022
|
+
return apiConfig.httpClient.get(
|
|
1023
|
+
`/v1/businesses/${apiConfig.businessId}/reservations`,
|
|
1024
|
+
{
|
|
1025
|
+
...options,
|
|
1026
|
+
params
|
|
1022
1027
|
}
|
|
1023
|
-
|
|
1024
|
-
},
|
|
1025
|
-
async searchMyReservations(params, options) {
|
|
1026
|
-
return apiConfig.httpClient.get(`/v1/reservations`, {
|
|
1027
|
-
...options,
|
|
1028
|
-
params
|
|
1029
|
-
});
|
|
1028
|
+
);
|
|
1030
1029
|
},
|
|
1031
1030
|
// ===== QUOTES =====
|
|
1032
1031
|
async getQuote(params, options) {
|
|
1033
1032
|
const payload = {
|
|
1034
|
-
businessId: apiConfig.businessId,
|
|
1035
1033
|
market: apiConfig.market,
|
|
1036
1034
|
...params
|
|
1037
1035
|
};
|
|
1038
|
-
return apiConfig.httpClient.post(
|
|
1036
|
+
return apiConfig.httpClient.post(
|
|
1037
|
+
`/v1/businesses/${apiConfig.businessId}/reservations/quote`,
|
|
1038
|
+
payload,
|
|
1039
|
+
options
|
|
1040
|
+
);
|
|
1039
1041
|
},
|
|
1040
1042
|
// ===== SERVICES =====
|
|
1041
1043
|
async createService(params, options) {
|