arky-sdk 0.7.113 → 0.7.115
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/admin.cjs +120 -132
- package/dist/admin.cjs.map +1 -1
- package/dist/admin.js +120 -132
- package/dist/admin.js.map +1 -1
- package/dist/index.cjs +128 -140
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +128 -140
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +8 -8
- package/dist/storefront.cjs.map +1 -1
- package/dist/storefront.js +8 -8
- package/dist/storefront.js.map +1 -1
- package/dist/types.d.cts +3 -0
- package/dist/types.d.ts +3 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Customer, Store, Market, AuthToken, RequestOptions as RequestOptions$1, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateStoreParams, UpdateStoreParams, DeleteStoreParams, GetStoreParams, GetStoresParams, PaginatedResponse, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetStoreMediaParams2, Media, OAuthConnectParams, Integration, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, Webhook, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadStoreMediaParams, DeleteStoreMediaParams, GetStoreMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, PromoCode, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, Node, UpdateNodeParams, DeleteNodeParams, GetNodeParams, Block, TaxonomyEntry, NodeStatus, GetNodesParams, GetNodeChildrenParams, CreateFormParams, Form, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, FormSubmission, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, Taxonomy, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, EmailTemplate, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, Product, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, Order, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderQuote, OrderCheckoutParams, OrderCheckoutResult,
|
|
1
|
+
import { Customer, Store, Market, AuthToken, RequestOptions as RequestOptions$1, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateStoreParams, UpdateStoreParams, DeleteStoreParams, GetStoreParams, GetStoresParams, PaginatedResponse, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetStoreMediaParams2, Media, OAuthConnectParams, Integration, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, Webhook, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadStoreMediaParams, DeleteStoreMediaParams, GetStoreMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, PromoCode, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, Node, UpdateNodeParams, DeleteNodeParams, GetNodeParams, Block, TaxonomyEntry, NodeStatus, GetNodesParams, GetNodeChildrenParams, CreateFormParams, Form, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, FormSubmission, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, Taxonomy, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, EmailTemplate, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, Product, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, Order, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderQuote, OrderCheckoutParams, OrderCheckoutResult, ProcessOrderRefundParams, CreateServiceParams, Service, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, GetAvailabilityParams, AvailabilityResponse, FindServiceProvidersParams, ServiceProvider, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateProviderParams, Provider, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, CreateCustomerParams, GetCustomerParams, CustomerDetail, FindCustomersParams, UpdateCustomerParams, MergeCustomersParams, CreateAudienceParams, Audience, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, GetAudienceSubscribersParams, AudienceSubscriber, AddAudienceSubscriberParams, AddAudienceSubscriberResponse, RemoveAudienceSubscriberParams, FindActivitiesParams, CreateAgentParams, Agent, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, AgentChatMessage, GetAgentChatsParams, AgentChat, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetStoreChatsParams, CreateWorkflowParams, Workflow, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, WorkflowExecution, GetWorkflowExecutionsParams, GetWorkflowExecutionParams, SubscribeAudienceParams, AudienceSubscribeResponse, AudienceAccessResponse } from './types.cjs';
|
|
2
2
|
export { Access, Address, AgentChatStatus, AgentStatus, ApiResponse, AudienceStatus, AudienceSubscription, AudienceSubscriptionPayment, AudienceSubscriptionProvider, AudienceSubscriptionSource, AudienceSubscriptionStatus, AudienceType, AvailabilitySlot, CheckoutItemInput, Condition, CustomerStatus, CustomsDeclaration, CustomsItem, DaySlots, Discount, EmailTemplateStatus, EshopCartItem, EshopItem, EshopQuoteItem, EshopStoreState, Event, EventAction, ExecutionStatus, FormEntry, FormField, FormFieldType, FormSchema, FormSchemaType, FormStatus, GalleryItem, GeoLocation, GeoLocationBlock, HistoryEntry, IntegrationProvider, InventoryLevel, Language, MediaResolution, NodeResult, OrderCancellationReason, OrderCheckoutCompatibleItemInput, OrderCheckoutItemInput, OrderItem, OrderItemSnapshot, OrderItemStatus, OrderPayment, OrderPaymentPromoCode, OrderPaymentProvider, OrderPaymentRefund, OrderPaymentStatus, OrderPaymentTax, OrderPaymentTaxLine, OrderQuoteCompatibleItemInput, OrderQuoteItemInput, OrderShipping, Parcel, PaymentMethod, PaymentMethodType, Price, ProductCheckoutItemInput, ProductInventory, ProductOrderItem, ProductOrderItemSnapshot, ProductQuoteItemInput, ProductQuoteLine, ProductQuoteLineAvailability, ProductStatus, ProductVariant, PromoCodeStatus, PromoCodeValidation, ProviderAvailability, ProviderStatus, ProviderTimelinePoint, ProviderWithTimeline, PurchaseLabelResult, QuoteItemInput, QuoteLine, ServiceCheckoutItemInput, ServiceCheckoutPart, ServiceDuration, ServiceOrderItem, ServiceOrderItemSnapshot, ServiceQuoteItem, ServiceQuoteItemInput, ServiceQuoteLine, ServiceQuoteLineAvailability, ServiceStatus, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, Slot, SlotRange, SpecificDate, StoreSubscription, StoreSubscriptionPayment, StoreSubscriptionProvider, StoreSubscriptionSource, StoreSubscriptionStatus, SystemTemplateKey, TaxonomyField, TaxonomyFieldQuery, TaxonomyQuery, TaxonomySchema, TaxonomySchemaType, TaxonomyStatus, TimelinePoint, WebhookEventSubscription, WorkflowEdge, WorkflowHttpMethod, WorkflowHttpNode, WorkflowLoopNode, WorkflowNode, WorkflowStatus, WorkflowSwitchNode, WorkflowSwitchRule, WorkflowTransformNode, WorkflowTriggerNode, WorkingDay, WorkingHour, Zone, ZoneLocation } from './types.cjs';
|
|
3
3
|
import { f as formatPayment, a as formatMinor, g as getCurrencySymbol, b as getCurrencyName, i as isValidKey, v as validateKey, t as toKey, n as nameToKey, c as getAvailableStock, d as getReservedStock, h as hasStock, e as getInventoryAt, j as getFirstAvailableFCId } from './index-C5gikdBg.cjs';
|
|
4
4
|
|
|
@@ -498,7 +498,6 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
498
498
|
find: (params: GetOrdersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Order>>;
|
|
499
499
|
getQuote: (params: GetQuoteParams, options?: RequestOptions$1) => Promise<OrderQuote>;
|
|
500
500
|
checkout: (params: OrderCheckoutParams, options?: RequestOptions$1) => Promise<OrderCheckoutResult>;
|
|
501
|
-
getAvailability: (params: GetAvailabilityParams, options?: RequestOptions$1) => Promise<AvailabilityResponse>;
|
|
502
501
|
processRefund: (params: ProcessOrderRefundParams, options?: RequestOptions$1) => Promise<Order>;
|
|
503
502
|
};
|
|
504
503
|
service: {
|
|
@@ -507,6 +506,7 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
507
506
|
delete: (params: DeleteServiceParams, options?: RequestOptions$1) => Promise<void>;
|
|
508
507
|
get: (params: GetServiceParams, options?: RequestOptions$1) => Promise<Service>;
|
|
509
508
|
find: (params: GetServicesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Service>>;
|
|
509
|
+
getAvailability: (params: GetAvailabilityParams, options?: RequestOptions$1) => Promise<AvailabilityResponse>;
|
|
510
510
|
findProviders: (params: FindServiceProvidersParams, options?: RequestOptions$1) => Promise<ServiceProvider[]>;
|
|
511
511
|
createProvider: (params: CreateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
|
|
512
512
|
updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
|
|
@@ -764,12 +764,12 @@ declare function createStorefront(config: CreateStorefrontConfig): {
|
|
|
764
764
|
}, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
|
|
765
765
|
get(params: GetOrderParams, options?: RequestOptions$1): Promise<Order>;
|
|
766
766
|
find(params: GetOrdersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Order>>;
|
|
767
|
-
getAvailability(params: GetAvailabilityParams, options?: RequestOptions$1): Promise<AvailabilityResponse>;
|
|
768
767
|
};
|
|
769
768
|
service: {
|
|
770
769
|
get(params: GetServiceParams, options?: RequestOptions$1): Promise<Service>;
|
|
771
770
|
find(params: GetServicesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Service>>;
|
|
772
771
|
findProviders(params: FindServiceProvidersParams, options?: RequestOptions$1): Promise<Provider[]>;
|
|
772
|
+
getAvailability(params: GetAvailabilityParams, options?: RequestOptions$1): Promise<AvailabilityResponse>;
|
|
773
773
|
};
|
|
774
774
|
provider: {
|
|
775
775
|
get(params: GetProviderParams, options?: RequestOptions$1): Promise<Provider>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Customer, Store, Market, AuthToken, RequestOptions as RequestOptions$1, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateStoreParams, UpdateStoreParams, DeleteStoreParams, GetStoreParams, GetStoresParams, PaginatedResponse, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetStoreMediaParams2, Media, OAuthConnectParams, Integration, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, Webhook, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadStoreMediaParams, DeleteStoreMediaParams, GetStoreMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, PromoCode, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, Node, UpdateNodeParams, DeleteNodeParams, GetNodeParams, Block, TaxonomyEntry, NodeStatus, GetNodesParams, GetNodeChildrenParams, CreateFormParams, Form, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, FormSubmission, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, Taxonomy, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, EmailTemplate, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, Product, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, Order, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderQuote, OrderCheckoutParams, OrderCheckoutResult,
|
|
1
|
+
import { Customer, Store, Market, AuthToken, RequestOptions as RequestOptions$1, MagicLinkVerifyParams, MagicLinkRequestParams, UpdateAccountProfileParams, DeleteAccountParams, GetMeParams, SearchAccountsParams, Location, CreateLocationParams, UpdateLocationParams, DeleteLocationParams, CreateMarketParams, UpdateMarketParams, DeleteMarketParams, CreateStoreParams, UpdateStoreParams, DeleteStoreParams, GetStoreParams, GetStoresParams, PaginatedResponse, GetSubscriptionPlansParams, SubscribeParams, CreatePortalSessionParams, InviteUserParams, RemoveMemberParams, HandleInvitationParams, TestWebhookParams, GetStoreMediaParams2, Media, OAuthConnectParams, Integration, OAuthDisconnectParams, ListIntegrationsParams, CreateIntegrationParams, UpdateIntegrationParams, DeleteIntegrationParams, ListWebhooksParams, Webhook, CreateWebhookParams, UpdateWebhookParams, DeleteWebhookParams, GetMediaParams, UploadStoreMediaParams, DeleteStoreMediaParams, GetStoreMediaParams, UpdateMediaParams, TrackEmailOpenParams, TriggerNotificationParams, CreatePromoCodeParams, PromoCode, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetShippingRatesParams, ShippingRate, ShipParams, ShipResult, CreateNodeParams, Node, UpdateNodeParams, DeleteNodeParams, GetNodeParams, Block, TaxonomyEntry, NodeStatus, GetNodesParams, GetNodeChildrenParams, CreateFormParams, Form, UpdateFormParams, DeleteFormParams, GetFormParams, GetFormsParams, SubmitFormParams, FormSubmission, GetFormSubmissionsParams, GetFormSubmissionParams, UpdateFormSubmissionParams, CreateTaxonomyParams, Taxonomy, UpdateTaxonomyParams, DeleteTaxonomyParams, GetTaxonomyParams, GetTaxonomiesParams, GetTaxonomyChildrenParams, CreateEmailTemplateParams, EmailTemplate, UpdateEmailTemplateParams, DeleteEmailTemplateParams, GetEmailTemplateParams, GetEmailTemplatesParams, CreateProductParams, Product, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, Order, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderQuote, OrderCheckoutParams, OrderCheckoutResult, ProcessOrderRefundParams, CreateServiceParams, Service, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, GetAvailabilityParams, AvailabilityResponse, FindServiceProvidersParams, ServiceProvider, CreateServiceProviderParams, UpdateServiceProviderParams, DeleteServiceProviderParams, CreateProviderParams, Provider, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, CreateCustomerParams, GetCustomerParams, CustomerDetail, FindCustomersParams, UpdateCustomerParams, MergeCustomersParams, CreateAudienceParams, Audience, UpdateAudienceParams, GetAudienceParams, GetAudiencesParams, GetAudienceSubscribersParams, AudienceSubscriber, AddAudienceSubscriberParams, AddAudienceSubscriberResponse, RemoveAudienceSubscriberParams, FindActivitiesParams, CreateAgentParams, Agent, UpdateAgentParams, DeleteAgentParams, GetAgentParams, GetAgentsParams, RunAgentParams, AgentChatMessage, GetAgentChatsParams, AgentChat, GetAgentChatParams, UpdateAgentChatParams, RateAgentChatParams, GetStoreChatsParams, CreateWorkflowParams, Workflow, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams, WorkflowExecution, GetWorkflowExecutionsParams, GetWorkflowExecutionParams, SubscribeAudienceParams, AudienceSubscribeResponse, AudienceAccessResponse } from './types.js';
|
|
2
2
|
export { Access, Address, AgentChatStatus, AgentStatus, ApiResponse, AudienceStatus, AudienceSubscription, AudienceSubscriptionPayment, AudienceSubscriptionProvider, AudienceSubscriptionSource, AudienceSubscriptionStatus, AudienceType, AvailabilitySlot, CheckoutItemInput, Condition, CustomerStatus, CustomsDeclaration, CustomsItem, DaySlots, Discount, EmailTemplateStatus, EshopCartItem, EshopItem, EshopQuoteItem, EshopStoreState, Event, EventAction, ExecutionStatus, FormEntry, FormField, FormFieldType, FormSchema, FormSchemaType, FormStatus, GalleryItem, GeoLocation, GeoLocationBlock, HistoryEntry, IntegrationProvider, InventoryLevel, Language, MediaResolution, NodeResult, OrderCancellationReason, OrderCheckoutCompatibleItemInput, OrderCheckoutItemInput, OrderItem, OrderItemSnapshot, OrderItemStatus, OrderPayment, OrderPaymentPromoCode, OrderPaymentProvider, OrderPaymentRefund, OrderPaymentStatus, OrderPaymentTax, OrderPaymentTaxLine, OrderQuoteCompatibleItemInput, OrderQuoteItemInput, OrderShipping, Parcel, PaymentMethod, PaymentMethodType, Price, ProductCheckoutItemInput, ProductInventory, ProductOrderItem, ProductOrderItemSnapshot, ProductQuoteItemInput, ProductQuoteLine, ProductQuoteLineAvailability, ProductStatus, ProductVariant, PromoCodeStatus, PromoCodeValidation, ProviderAvailability, ProviderStatus, ProviderTimelinePoint, ProviderWithTimeline, PurchaseLabelResult, QuoteItemInput, QuoteLine, ServiceCheckoutItemInput, ServiceCheckoutPart, ServiceDuration, ServiceOrderItem, ServiceOrderItemSnapshot, ServiceQuoteItem, ServiceQuoteItemInput, ServiceQuoteLine, ServiceQuoteLineAvailability, ServiceStatus, Shipment, ShipmentLine, ShippingAddress, ShippingMethod, ShippingStatus, ShippingWeightTier, Slot, SlotRange, SpecificDate, StoreSubscription, StoreSubscriptionPayment, StoreSubscriptionProvider, StoreSubscriptionSource, StoreSubscriptionStatus, SystemTemplateKey, TaxonomyField, TaxonomyFieldQuery, TaxonomyQuery, TaxonomySchema, TaxonomySchemaType, TaxonomyStatus, TimelinePoint, WebhookEventSubscription, WorkflowEdge, WorkflowHttpMethod, WorkflowHttpNode, WorkflowLoopNode, WorkflowNode, WorkflowStatus, WorkflowSwitchNode, WorkflowSwitchRule, WorkflowTransformNode, WorkflowTriggerNode, WorkingDay, WorkingHour, Zone, ZoneLocation } from './types.js';
|
|
3
3
|
import { f as formatPayment, a as formatMinor, g as getCurrencySymbol, b as getCurrencyName, i as isValidKey, v as validateKey, t as toKey, n as nameToKey, c as getAvailableStock, d as getReservedStock, h as hasStock, e as getInventoryAt, j as getFirstAvailableFCId } from './index-MFMjlIfS.js';
|
|
4
4
|
|
|
@@ -498,7 +498,6 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
498
498
|
find: (params: GetOrdersParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Order>>;
|
|
499
499
|
getQuote: (params: GetQuoteParams, options?: RequestOptions$1) => Promise<OrderQuote>;
|
|
500
500
|
checkout: (params: OrderCheckoutParams, options?: RequestOptions$1) => Promise<OrderCheckoutResult>;
|
|
501
|
-
getAvailability: (params: GetAvailabilityParams, options?: RequestOptions$1) => Promise<AvailabilityResponse>;
|
|
502
501
|
processRefund: (params: ProcessOrderRefundParams, options?: RequestOptions$1) => Promise<Order>;
|
|
503
502
|
};
|
|
504
503
|
service: {
|
|
@@ -507,6 +506,7 @@ declare function createAdmin(config: CreateAdminConfig): {
|
|
|
507
506
|
delete: (params: DeleteServiceParams, options?: RequestOptions$1) => Promise<void>;
|
|
508
507
|
get: (params: GetServiceParams, options?: RequestOptions$1) => Promise<Service>;
|
|
509
508
|
find: (params: GetServicesParams, options?: RequestOptions$1) => Promise<PaginatedResponse<Service>>;
|
|
509
|
+
getAvailability: (params: GetAvailabilityParams, options?: RequestOptions$1) => Promise<AvailabilityResponse>;
|
|
510
510
|
findProviders: (params: FindServiceProvidersParams, options?: RequestOptions$1) => Promise<ServiceProvider[]>;
|
|
511
511
|
createProvider: (params: CreateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
|
|
512
512
|
updateProvider: (params: UpdateServiceProviderParams, options?: RequestOptions$1) => Promise<ServiceProvider>;
|
|
@@ -764,12 +764,12 @@ declare function createStorefront(config: CreateStorefrontConfig): {
|
|
|
764
764
|
}, options?: RequestOptions$1): Promise<OrderCheckoutResult>;
|
|
765
765
|
get(params: GetOrderParams, options?: RequestOptions$1): Promise<Order>;
|
|
766
766
|
find(params: GetOrdersParams, options?: RequestOptions$1): Promise<PaginatedResponse<Order>>;
|
|
767
|
-
getAvailability(params: GetAvailabilityParams, options?: RequestOptions$1): Promise<AvailabilityResponse>;
|
|
768
767
|
};
|
|
769
768
|
service: {
|
|
770
769
|
get(params: GetServiceParams, options?: RequestOptions$1): Promise<Service>;
|
|
771
770
|
find(params: GetServicesParams, options?: RequestOptions$1): Promise<PaginatedResponse<Service>>;
|
|
772
771
|
findProviders(params: FindServiceProvidersParams, options?: RequestOptions$1): Promise<Provider[]>;
|
|
772
|
+
getAvailability(params: GetAvailabilityParams, options?: RequestOptions$1): Promise<AvailabilityResponse>;
|
|
773
773
|
};
|
|
774
774
|
provider: {
|
|
775
775
|
get(params: GetProviderParams, options?: RequestOptions$1): Promise<Provider>;
|
package/dist/index.js
CHANGED
|
@@ -395,14 +395,6 @@ var createStorefrontApi = (apiConfig, updateCustomerSession) => {
|
|
|
395
395
|
...options,
|
|
396
396
|
params: queryParams
|
|
397
397
|
});
|
|
398
|
-
},
|
|
399
|
-
getAvailability(params, options) {
|
|
400
|
-
const { store_id, ...queryParams } = params;
|
|
401
|
-
const target_store_id = store_id || apiConfig.storeId;
|
|
402
|
-
return apiConfig.httpClient.get(
|
|
403
|
-
`${base(target_store_id)}/orders/availability`,
|
|
404
|
-
{ ...options, params: queryParams }
|
|
405
|
-
);
|
|
406
398
|
}
|
|
407
399
|
},
|
|
408
400
|
service: {
|
|
@@ -434,6 +426,14 @@ var createStorefrontApi = (apiConfig, updateCustomerSession) => {
|
|
|
434
426
|
...options,
|
|
435
427
|
params: queryParams
|
|
436
428
|
});
|
|
429
|
+
},
|
|
430
|
+
getAvailability(params, options) {
|
|
431
|
+
const { store_id, ...queryParams } = params;
|
|
432
|
+
const target_store_id = store_id || apiConfig.storeId;
|
|
433
|
+
return apiConfig.httpClient.get(
|
|
434
|
+
`${base(target_store_id)}/services/availability`,
|
|
435
|
+
{ ...options, params: queryParams }
|
|
436
|
+
);
|
|
437
437
|
}
|
|
438
438
|
},
|
|
439
439
|
provider: {
|
|
@@ -1379,123 +1379,12 @@ var createEshopApi = (apiConfig) => {
|
|
|
1379
1379
|
}
|
|
1380
1380
|
);
|
|
1381
1381
|
},
|
|
1382
|
-
async createOrder(params, options) {
|
|
1383
|
-
const { store_id, items, ...rest } = params;
|
|
1384
|
-
const target_store_id = store_id || apiConfig.storeId;
|
|
1385
|
-
const payload = {
|
|
1386
|
-
...rest,
|
|
1387
|
-
market: rest.market || apiConfig.market,
|
|
1388
|
-
items: normalizeOrderCheckoutItems(items)
|
|
1389
|
-
};
|
|
1390
|
-
return apiConfig.httpClient.post(
|
|
1391
|
-
`/v1/stores/${target_store_id}/orders`,
|
|
1392
|
-
payload,
|
|
1393
|
-
options
|
|
1394
|
-
);
|
|
1395
|
-
},
|
|
1396
|
-
async checkoutOrder(params, options) {
|
|
1397
|
-
const { store_id, items, ...rest } = params;
|
|
1398
|
-
const target_store_id = store_id || apiConfig.storeId;
|
|
1399
|
-
const payload = {
|
|
1400
|
-
...rest,
|
|
1401
|
-
store_id: target_store_id,
|
|
1402
|
-
market: rest.market || apiConfig.market,
|
|
1403
|
-
items: normalizeOrderCheckoutItems(items)
|
|
1404
|
-
};
|
|
1405
|
-
return apiConfig.httpClient.post(
|
|
1406
|
-
`/v1/stores/${target_store_id}/orders/checkout`,
|
|
1407
|
-
payload,
|
|
1408
|
-
options
|
|
1409
|
-
);
|
|
1410
|
-
},
|
|
1411
|
-
async updateOrder(params, options) {
|
|
1412
|
-
const { store_id, items, ...rest } = params;
|
|
1413
|
-
const target_store_id = store_id || apiConfig.storeId;
|
|
1414
|
-
const payload = {
|
|
1415
|
-
...rest,
|
|
1416
|
-
...items ? { items: normalizeOrderCheckoutItems(items) } : {}
|
|
1417
|
-
};
|
|
1418
|
-
return apiConfig.httpClient.put(
|
|
1419
|
-
`/v1/stores/${target_store_id}/orders/${params.id}`,
|
|
1420
|
-
payload,
|
|
1421
|
-
options
|
|
1422
|
-
);
|
|
1423
|
-
},
|
|
1424
|
-
async getOrder(params, options) {
|
|
1425
|
-
const target_store_id = params.store_id || apiConfig.storeId;
|
|
1426
|
-
return apiConfig.httpClient.get(
|
|
1427
|
-
`/v1/stores/${target_store_id}/orders/${params.id}`,
|
|
1428
|
-
options
|
|
1429
|
-
);
|
|
1430
|
-
},
|
|
1431
|
-
async getOrders(params, options) {
|
|
1432
|
-
const { store_id, ...queryParams } = params;
|
|
1433
|
-
const target_store_id = store_id || apiConfig.storeId;
|
|
1434
|
-
return apiConfig.httpClient.get(
|
|
1435
|
-
`/v1/stores/${target_store_id}/orders`,
|
|
1436
|
-
{
|
|
1437
|
-
...options,
|
|
1438
|
-
params: queryParams
|
|
1439
|
-
}
|
|
1440
|
-
);
|
|
1441
|
-
},
|
|
1442
|
-
async getQuote(params, options) {
|
|
1443
|
-
const { location, store_id, items, ...rest } = params;
|
|
1444
|
-
const target_store_id = store_id || apiConfig.storeId;
|
|
1445
|
-
const shipping_address = location ? {
|
|
1446
|
-
country: location.country || "",
|
|
1447
|
-
state: location.state || "",
|
|
1448
|
-
city: location.city || "",
|
|
1449
|
-
postal_code: location.postal_code || "",
|
|
1450
|
-
name: "",
|
|
1451
|
-
street1: "",
|
|
1452
|
-
street2: null
|
|
1453
|
-
} : rest.shipping_address;
|
|
1454
|
-
return apiConfig.httpClient.post(
|
|
1455
|
-
`/v1/stores/${target_store_id}/orders/quote`,
|
|
1456
|
-
{
|
|
1457
|
-
...rest,
|
|
1458
|
-
items: normalizeOrderQuoteItems(items),
|
|
1459
|
-
shipping_address,
|
|
1460
|
-
market: rest.market || apiConfig.market
|
|
1461
|
-
},
|
|
1462
|
-
options
|
|
1463
|
-
);
|
|
1464
|
-
},
|
|
1465
|
-
async getOrderAvailability(params, options) {
|
|
1466
|
-
const { store_id, ...queryParams } = params;
|
|
1467
|
-
const target_store_id = store_id || apiConfig.storeId;
|
|
1468
|
-
return apiConfig.httpClient.get(
|
|
1469
|
-
`/v1/stores/${target_store_id}/orders/availability`,
|
|
1470
|
-
{ ...options, params: queryParams }
|
|
1471
|
-
);
|
|
1472
|
-
},
|
|
1473
|
-
async processRefund(params, options) {
|
|
1474
|
-
return apiConfig.httpClient.post(
|
|
1475
|
-
`/v1/stores/${apiConfig.storeId}/orders/${params.id}/refund`,
|
|
1476
|
-
{ amount: params.amount },
|
|
1477
|
-
options
|
|
1478
|
-
);
|
|
1479
|
-
}
|
|
1480
|
-
};
|
|
1481
|
-
};
|
|
1482
|
-
|
|
1483
|
-
// src/api/scheduling.ts
|
|
1484
|
-
var normalizeTaxonomyAliases2 = (payload) => {
|
|
1485
|
-
const { filters, ...rest } = payload;
|
|
1486
|
-
return {
|
|
1487
|
-
...rest,
|
|
1488
|
-
...!rest.taxonomies && filters ? { taxonomies: filters } : {}
|
|
1489
|
-
};
|
|
1490
|
-
};
|
|
1491
|
-
var createSchedulingApi = (apiConfig) => {
|
|
1492
|
-
return {
|
|
1493
1382
|
async createService(params, options) {
|
|
1494
1383
|
const { store_id, ...payload } = params;
|
|
1495
1384
|
const target_store_id = store_id || apiConfig.storeId;
|
|
1496
1385
|
return apiConfig.httpClient.post(
|
|
1497
1386
|
`/v1/stores/${target_store_id}/services`,
|
|
1498
|
-
|
|
1387
|
+
normalizeTaxonomyAliases(payload),
|
|
1499
1388
|
options
|
|
1500
1389
|
);
|
|
1501
1390
|
},
|
|
@@ -1504,7 +1393,7 @@ var createSchedulingApi = (apiConfig) => {
|
|
|
1504
1393
|
const target_store_id = store_id || apiConfig.storeId;
|
|
1505
1394
|
return apiConfig.httpClient.put(
|
|
1506
1395
|
`/v1/stores/${target_store_id}/services/${params.id}`,
|
|
1507
|
-
|
|
1396
|
+
normalizeTaxonomyAliases(payload),
|
|
1508
1397
|
options
|
|
1509
1398
|
);
|
|
1510
1399
|
},
|
|
@@ -1541,12 +1430,20 @@ var createSchedulingApi = (apiConfig) => {
|
|
|
1541
1430
|
}
|
|
1542
1431
|
);
|
|
1543
1432
|
},
|
|
1433
|
+
async getServiceAvailability(params, options) {
|
|
1434
|
+
const { store_id, ...queryParams } = params;
|
|
1435
|
+
const target_store_id = store_id || apiConfig.storeId;
|
|
1436
|
+
return apiConfig.httpClient.get(
|
|
1437
|
+
`/v1/stores/${target_store_id}/services/availability`,
|
|
1438
|
+
{ ...options, params: queryParams }
|
|
1439
|
+
);
|
|
1440
|
+
},
|
|
1544
1441
|
async createProvider(params, options) {
|
|
1545
1442
|
const { store_id, ...payload } = params;
|
|
1546
1443
|
const target_store_id = store_id || apiConfig.storeId;
|
|
1547
1444
|
return apiConfig.httpClient.post(
|
|
1548
1445
|
`/v1/stores/${target_store_id}/providers`,
|
|
1549
|
-
|
|
1446
|
+
normalizeTaxonomyAliases(payload),
|
|
1550
1447
|
options
|
|
1551
1448
|
);
|
|
1552
1449
|
},
|
|
@@ -1555,7 +1452,7 @@ var createSchedulingApi = (apiConfig) => {
|
|
|
1555
1452
|
const target_store_id = store_id || apiConfig.storeId;
|
|
1556
1453
|
return apiConfig.httpClient.put(
|
|
1557
1454
|
`/v1/stores/${target_store_id}/providers/${params.id}`,
|
|
1558
|
-
|
|
1455
|
+
normalizeTaxonomyAliases(payload),
|
|
1559
1456
|
options
|
|
1560
1457
|
);
|
|
1561
1458
|
},
|
|
@@ -1624,6 +1521,96 @@ var createSchedulingApi = (apiConfig) => {
|
|
|
1624
1521
|
`/v1/stores/${target_store_id}/service-providers/${params.id}`,
|
|
1625
1522
|
options
|
|
1626
1523
|
);
|
|
1524
|
+
},
|
|
1525
|
+
async createOrder(params, options) {
|
|
1526
|
+
const { store_id, items, ...rest } = params;
|
|
1527
|
+
const target_store_id = store_id || apiConfig.storeId;
|
|
1528
|
+
const payload = {
|
|
1529
|
+
...rest,
|
|
1530
|
+
market: rest.market || apiConfig.market,
|
|
1531
|
+
items: normalizeOrderCheckoutItems(items)
|
|
1532
|
+
};
|
|
1533
|
+
return apiConfig.httpClient.post(
|
|
1534
|
+
`/v1/stores/${target_store_id}/orders`,
|
|
1535
|
+
payload,
|
|
1536
|
+
options
|
|
1537
|
+
);
|
|
1538
|
+
},
|
|
1539
|
+
async checkoutOrder(params, options) {
|
|
1540
|
+
const { store_id, items, ...rest } = params;
|
|
1541
|
+
const target_store_id = store_id || apiConfig.storeId;
|
|
1542
|
+
const payload = {
|
|
1543
|
+
...rest,
|
|
1544
|
+
store_id: target_store_id,
|
|
1545
|
+
market: rest.market || apiConfig.market,
|
|
1546
|
+
items: normalizeOrderCheckoutItems(items)
|
|
1547
|
+
};
|
|
1548
|
+
return apiConfig.httpClient.post(
|
|
1549
|
+
`/v1/stores/${target_store_id}/orders/checkout`,
|
|
1550
|
+
payload,
|
|
1551
|
+
options
|
|
1552
|
+
);
|
|
1553
|
+
},
|
|
1554
|
+
async updateOrder(params, options) {
|
|
1555
|
+
const { store_id, items, ...rest } = params;
|
|
1556
|
+
const target_store_id = store_id || apiConfig.storeId;
|
|
1557
|
+
const payload = {
|
|
1558
|
+
...rest,
|
|
1559
|
+
...items ? { items: normalizeOrderCheckoutItems(items) } : {}
|
|
1560
|
+
};
|
|
1561
|
+
return apiConfig.httpClient.put(
|
|
1562
|
+
`/v1/stores/${target_store_id}/orders/${params.id}`,
|
|
1563
|
+
payload,
|
|
1564
|
+
options
|
|
1565
|
+
);
|
|
1566
|
+
},
|
|
1567
|
+
async getOrder(params, options) {
|
|
1568
|
+
const target_store_id = params.store_id || apiConfig.storeId;
|
|
1569
|
+
return apiConfig.httpClient.get(
|
|
1570
|
+
`/v1/stores/${target_store_id}/orders/${params.id}`,
|
|
1571
|
+
options
|
|
1572
|
+
);
|
|
1573
|
+
},
|
|
1574
|
+
async getOrders(params, options) {
|
|
1575
|
+
const { store_id, ...queryParams } = params;
|
|
1576
|
+
const target_store_id = store_id || apiConfig.storeId;
|
|
1577
|
+
return apiConfig.httpClient.get(
|
|
1578
|
+
`/v1/stores/${target_store_id}/orders`,
|
|
1579
|
+
{
|
|
1580
|
+
...options,
|
|
1581
|
+
params: queryParams
|
|
1582
|
+
}
|
|
1583
|
+
);
|
|
1584
|
+
},
|
|
1585
|
+
async getQuote(params, options) {
|
|
1586
|
+
const { location, store_id, items, ...rest } = params;
|
|
1587
|
+
const target_store_id = store_id || apiConfig.storeId;
|
|
1588
|
+
const shipping_address = location ? {
|
|
1589
|
+
country: location.country || "",
|
|
1590
|
+
state: location.state || "",
|
|
1591
|
+
city: location.city || "",
|
|
1592
|
+
postal_code: location.postal_code || "",
|
|
1593
|
+
name: "",
|
|
1594
|
+
street1: "",
|
|
1595
|
+
street2: null
|
|
1596
|
+
} : rest.shipping_address;
|
|
1597
|
+
return apiConfig.httpClient.post(
|
|
1598
|
+
`/v1/stores/${target_store_id}/orders/quote`,
|
|
1599
|
+
{
|
|
1600
|
+
...rest,
|
|
1601
|
+
items: normalizeOrderQuoteItems(items),
|
|
1602
|
+
shipping_address,
|
|
1603
|
+
market: rest.market || apiConfig.market
|
|
1604
|
+
},
|
|
1605
|
+
options
|
|
1606
|
+
);
|
|
1607
|
+
},
|
|
1608
|
+
async processRefund(params, options) {
|
|
1609
|
+
return apiConfig.httpClient.post(
|
|
1610
|
+
`/v1/stores/${apiConfig.storeId}/orders/${params.id}/refund`,
|
|
1611
|
+
{ amount: params.amount },
|
|
1612
|
+
options
|
|
1613
|
+
);
|
|
1627
1614
|
}
|
|
1628
1615
|
};
|
|
1629
1616
|
};
|
|
@@ -1726,7 +1713,7 @@ var createActivityAdminApi = (apiConfig) => ({
|
|
|
1726
1713
|
);
|
|
1727
1714
|
},
|
|
1728
1715
|
async find(params, options) {
|
|
1729
|
-
const store_id = apiConfig.storeId;
|
|
1716
|
+
const store_id = params.store_id || apiConfig.storeId;
|
|
1730
1717
|
const queryParams = {};
|
|
1731
1718
|
if (params.customer_id) queryParams.customer_id = params.customer_id;
|
|
1732
1719
|
if (params.types && params.types.length > 0) queryParams.types = params.types;
|
|
@@ -1762,6 +1749,8 @@ var createCustomerApi = (apiConfig) => {
|
|
|
1762
1749
|
if (params?.limit !== void 0) queryParams.limit = params.limit;
|
|
1763
1750
|
if (params?.cursor) queryParams.cursor = params.cursor;
|
|
1764
1751
|
if (params?.query) queryParams.query = params.query;
|
|
1752
|
+
if (params?.taxonomy_query) queryParams.taxonomy_query = params.taxonomy_query;
|
|
1753
|
+
if (params?.status) queryParams.status = params.status;
|
|
1765
1754
|
if (params?.sort_field) queryParams.sort_field = params.sort_field;
|
|
1766
1755
|
if (params?.sort_direction) queryParams.sort_direction = params.sort_direction;
|
|
1767
1756
|
return apiConfig.httpClient.get(
|
|
@@ -2717,7 +2706,6 @@ function createAdmin(config) {
|
|
|
2717
2706
|
const platformApi = createPlatformApi(apiConfig);
|
|
2718
2707
|
const cmsApi = createCmsApi(apiConfig);
|
|
2719
2708
|
const eshopApi = createEshopApi(apiConfig);
|
|
2720
|
-
const schedulingApi = createSchedulingApi(apiConfig);
|
|
2721
2709
|
const promoCodeApi = createPromoCodeApi(apiConfig);
|
|
2722
2710
|
const crmApi = createCustomerApi(apiConfig);
|
|
2723
2711
|
const locationApi = createLocationApi(apiConfig);
|
|
@@ -2792,26 +2780,26 @@ function createAdmin(config) {
|
|
|
2792
2780
|
find: eshopApi.getOrders,
|
|
2793
2781
|
getQuote: eshopApi.getQuote,
|
|
2794
2782
|
checkout: eshopApi.checkoutOrder,
|
|
2795
|
-
getAvailability: eshopApi.getOrderAvailability,
|
|
2796
2783
|
processRefund: eshopApi.processRefund
|
|
2797
2784
|
},
|
|
2798
2785
|
service: {
|
|
2799
|
-
create:
|
|
2800
|
-
update:
|
|
2801
|
-
delete:
|
|
2802
|
-
get:
|
|
2803
|
-
find:
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2786
|
+
create: eshopApi.createService,
|
|
2787
|
+
update: eshopApi.updateService,
|
|
2788
|
+
delete: eshopApi.deleteService,
|
|
2789
|
+
get: eshopApi.getService,
|
|
2790
|
+
find: eshopApi.getServices,
|
|
2791
|
+
getAvailability: eshopApi.getServiceAvailability,
|
|
2792
|
+
findProviders: eshopApi.findServiceProviders,
|
|
2793
|
+
createProvider: eshopApi.createServiceProvider,
|
|
2794
|
+
updateProvider: eshopApi.updateServiceProvider,
|
|
2795
|
+
deleteProvider: eshopApi.deleteServiceProvider
|
|
2808
2796
|
},
|
|
2809
2797
|
provider: {
|
|
2810
|
-
create:
|
|
2811
|
-
update:
|
|
2812
|
-
delete:
|
|
2813
|
-
get:
|
|
2814
|
-
find:
|
|
2798
|
+
create: eshopApi.createProvider,
|
|
2799
|
+
update: eshopApi.updateProvider,
|
|
2800
|
+
delete: eshopApi.deleteProvider,
|
|
2801
|
+
get: eshopApi.getProvider,
|
|
2802
|
+
find: eshopApi.getProviders
|
|
2815
2803
|
},
|
|
2816
2804
|
promoCode: promoCodeApi
|
|
2817
2805
|
},
|