arky-sdk 0.3.145 → 0.3.147
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 +11 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +11 -3
- package/dist/index.js.map +1 -1
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +23 -1
- package/dist/types.d.ts +23 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Price, Payment, 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, GetVariableMetadataParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, BulkScheduleParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, CreateFeatureFlagParams, FeatureFlag, GetFeatureFlagParams, GetFeatureFlagsParams, UpdateFeatureFlagParams, DeleteFeatureFlagParams, GetFeatureFlagResultsParams, FlagResults, GetVariantParams, GetVariantResponse, TrackEventParams, TrackEventResponse, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams } from './types.cjs';
|
|
1
|
+
import { Price, Payment, 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, GetVariableMetadataParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, BulkScheduleParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, CreateFeatureFlagParams, FeatureFlag, GetFeatureFlagParams, GetFeatureFlagsParams, UpdateFeatureFlagParams, DeleteFeatureFlagParams, GetFeatureFlagResultsParams, FlagResults, GetVariantParams, GetVariantResponse, TrackEventParams, TrackEventResponse, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams } from './types.cjs';
|
|
2
2
|
export { ApiResponse, 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
3
|
import { isValidKey, validateKey, toKey, nameToKey } from './utils.cjs';
|
|
4
4
|
|
|
@@ -353,6 +353,7 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
353
353
|
deleteWorkflow(params: DeleteWorkflowParams, options?: RequestOptions): Promise<any>;
|
|
354
354
|
getWorkflow(params: GetWorkflowParams, options?: RequestOptions): Promise<any>;
|
|
355
355
|
getWorkflows(params?: GetWorkflowsParams, options?: RequestOptions): Promise<any>;
|
|
356
|
+
triggerWorkflow(params: TriggerWorkflowParams, options?: RequestOptions): Promise<any>;
|
|
356
357
|
};
|
|
357
358
|
setBusinessId: (businessId: string) => void;
|
|
358
359
|
getBusinessId: () => string;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Price, Payment, 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, GetVariableMetadataParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, BulkScheduleParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, CreateFeatureFlagParams, FeatureFlag, GetFeatureFlagParams, GetFeatureFlagsParams, UpdateFeatureFlagParams, DeleteFeatureFlagParams, GetFeatureFlagResultsParams, FlagResults, GetVariantParams, GetVariantResponse, TrackEventParams, TrackEventResponse, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams } from './types.js';
|
|
1
|
+
import { Price, Payment, 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, GetVariableMetadataParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, GetQuoteParams, OrderCheckoutParams, Slot, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, SearchReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, BulkScheduleParams, GetServiceParams, GetServicesParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, CreateFeatureFlagParams, FeatureFlag, GetFeatureFlagParams, GetFeatureFlagsParams, UpdateFeatureFlagParams, DeleteFeatureFlagParams, GetFeatureFlagResultsParams, FlagResults, GetVariantParams, GetVariantResponse, TrackEventParams, TrackEventResponse, CreateWorkflowParams, UpdateWorkflowParams, DeleteWorkflowParams, GetWorkflowParams, GetWorkflowsParams, TriggerWorkflowParams } from './types.js';
|
|
2
2
|
export { ApiResponse, 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.js';
|
|
3
3
|
import { isValidKey, validateKey, toKey, nameToKey } from './utils.js';
|
|
4
4
|
|
|
@@ -353,6 +353,7 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
353
353
|
deleteWorkflow(params: DeleteWorkflowParams, options?: RequestOptions): Promise<any>;
|
|
354
354
|
getWorkflow(params: GetWorkflowParams, options?: RequestOptions): Promise<any>;
|
|
355
355
|
getWorkflows(params?: GetWorkflowsParams, options?: RequestOptions): Promise<any>;
|
|
356
|
+
triggerWorkflow(params: TriggerWorkflowParams, options?: RequestOptions): Promise<any>;
|
|
356
357
|
};
|
|
357
358
|
setBusinessId: (businessId: string) => void;
|
|
358
359
|
getBusinessId: () => string;
|
package/dist/index.js
CHANGED
|
@@ -414,8 +414,7 @@ var createMediaApi = (apiConfig) => {
|
|
|
414
414
|
}
|
|
415
415
|
});
|
|
416
416
|
if (!response.ok) {
|
|
417
|
-
|
|
418
|
-
throw new Error(`Upload failed (${response.status}): ${errorText}`);
|
|
417
|
+
throw new Error("Upload failed, server said no");
|
|
419
418
|
}
|
|
420
419
|
return await response.json();
|
|
421
420
|
},
|
|
@@ -1510,10 +1509,19 @@ var createWorkflowApi = (apiConfig) => {
|
|
|
1510
1509
|
},
|
|
1511
1510
|
async getWorkflows(params, options) {
|
|
1512
1511
|
const businessId = params?.businessId || apiConfig.businessId;
|
|
1512
|
+
const { businessId: _, ...queryParams } = params || {};
|
|
1513
1513
|
return apiConfig.httpClient.get(`/v1/businesses/${businessId}/workflows`, {
|
|
1514
1514
|
...options,
|
|
1515
|
-
params
|
|
1515
|
+
params: Object.keys(queryParams).length > 0 ? queryParams : void 0
|
|
1516
1516
|
});
|
|
1517
|
+
},
|
|
1518
|
+
/**
|
|
1519
|
+
* Trigger a workflow execution via webhook
|
|
1520
|
+
* No authentication required - the secret in the URL validates the request
|
|
1521
|
+
*/
|
|
1522
|
+
async triggerWorkflow(params, options) {
|
|
1523
|
+
const { secret, ...input } = params;
|
|
1524
|
+
return apiConfig.httpClient.post(`/v1/workflows/trigger/${secret}`, input, options);
|
|
1517
1525
|
}
|
|
1518
1526
|
};
|
|
1519
1527
|
};
|