arky-sdk 0.3.76 → 0.3.78

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/types.d.cts CHANGED
@@ -407,12 +407,54 @@ interface GetReservationQuoteParams {
407
407
  location?: any;
408
408
  zoneId?: string;
409
409
  }
410
- interface GetAvailableSlotsParams {
410
+ interface GetServiceProvidersParams {
411
411
  serviceId: string;
412
- providerId?: string | null;
413
412
  from: number;
414
413
  to: number;
415
- limit?: number;
414
+ }
415
+ interface TimelinePoint {
416
+ id: string;
417
+ providerId: string;
418
+ businessId: string;
419
+ timestamp: number;
420
+ concurrent: number;
421
+ }
422
+ interface WorkingHour {
423
+ from: number;
424
+ to: number;
425
+ }
426
+ interface WorkingDay {
427
+ day: string;
428
+ workingHours: WorkingHour[];
429
+ }
430
+ interface OutcastDate {
431
+ month: number;
432
+ day: number;
433
+ workingHours: WorkingHour[];
434
+ }
435
+ interface SpecificDate {
436
+ date: number;
437
+ workingHours: WorkingHour[];
438
+ }
439
+ interface WorkingTime {
440
+ workingDays: WorkingDay[];
441
+ outcastDates: OutcastDate[];
442
+ specificDates: SpecificDate[];
443
+ }
444
+ interface ProviderWithTimeline {
445
+ id: string;
446
+ name: Record<string, string>;
447
+ businessId: string;
448
+ seo: any;
449
+ blocks: Block[];
450
+ statuses: any[];
451
+ concurrentLimit: number;
452
+ categoryIds: string[];
453
+ categoryFilterBlocks: Block[];
454
+ createdAt: number;
455
+ updatedAt: number;
456
+ workingTime: WorkingTime | null;
457
+ timeline: TimelinePoint[];
416
458
  }
417
459
  interface GetAnalyticsParams {
418
460
  metrics?: string[];
@@ -941,5 +983,34 @@ interface TrackEventParams {
941
983
  eventName: string;
942
984
  value?: number;
943
985
  }
986
+ interface GetSlotsForDateParams {
987
+ serviceId: string;
988
+ date: Date;
989
+ timezone: string;
990
+ providerId?: string;
991
+ }
992
+ interface GetAvailabilityParams {
993
+ serviceId: string;
994
+ from: Date;
995
+ to: Date;
996
+ timezone: string;
997
+ }
998
+ interface DayAvailability {
999
+ date: Date;
1000
+ available: boolean;
1001
+ }
1002
+ /**
1003
+ * A bookable time slot returned by getSlotsForDate.
1004
+ * Contains all information needed to display and book the slot.
1005
+ */
1006
+ interface Slot {
1007
+ id: string;
1008
+ serviceId: string;
1009
+ providerId: string;
1010
+ from: number;
1011
+ to: number;
1012
+ timeText: string;
1013
+ dateText: string;
1014
+ }
944
1015
 
945
- export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateFeatureFlagParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteFeatureFlagParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Quote, type QuoteLineItem, type RegisterUserParams, type RequestOptions, type ReservationCartItem, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type SubscribeParams, type TestWebhookParams, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type Zone };
1016
+ export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateFeatureFlagParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DayAvailability, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteFeatureFlagParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailabilityParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServiceProvidersParams, type GetServicesParams, type GetSlotsForDateParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type OutcastDate, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type ProviderWithTimeline, type Quote, type QuoteLineItem, type RegisterUserParams, type RequestOptions, type ReservationCartItem, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type Slot, type SpecificDate, type SubscribeParams, type TestWebhookParams, type TimelinePoint, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type WorkingDay, type WorkingHour, type WorkingTime, type Zone };
package/dist/types.d.ts CHANGED
@@ -407,12 +407,54 @@ interface GetReservationQuoteParams {
407
407
  location?: any;
408
408
  zoneId?: string;
409
409
  }
410
- interface GetAvailableSlotsParams {
410
+ interface GetServiceProvidersParams {
411
411
  serviceId: string;
412
- providerId?: string | null;
413
412
  from: number;
414
413
  to: number;
415
- limit?: number;
414
+ }
415
+ interface TimelinePoint {
416
+ id: string;
417
+ providerId: string;
418
+ businessId: string;
419
+ timestamp: number;
420
+ concurrent: number;
421
+ }
422
+ interface WorkingHour {
423
+ from: number;
424
+ to: number;
425
+ }
426
+ interface WorkingDay {
427
+ day: string;
428
+ workingHours: WorkingHour[];
429
+ }
430
+ interface OutcastDate {
431
+ month: number;
432
+ day: number;
433
+ workingHours: WorkingHour[];
434
+ }
435
+ interface SpecificDate {
436
+ date: number;
437
+ workingHours: WorkingHour[];
438
+ }
439
+ interface WorkingTime {
440
+ workingDays: WorkingDay[];
441
+ outcastDates: OutcastDate[];
442
+ specificDates: SpecificDate[];
443
+ }
444
+ interface ProviderWithTimeline {
445
+ id: string;
446
+ name: Record<string, string>;
447
+ businessId: string;
448
+ seo: any;
449
+ blocks: Block[];
450
+ statuses: any[];
451
+ concurrentLimit: number;
452
+ categoryIds: string[];
453
+ categoryFilterBlocks: Block[];
454
+ createdAt: number;
455
+ updatedAt: number;
456
+ workingTime: WorkingTime | null;
457
+ timeline: TimelinePoint[];
416
458
  }
417
459
  interface GetAnalyticsParams {
418
460
  metrics?: string[];
@@ -941,5 +983,34 @@ interface TrackEventParams {
941
983
  eventName: string;
942
984
  value?: number;
943
985
  }
986
+ interface GetSlotsForDateParams {
987
+ serviceId: string;
988
+ date: Date;
989
+ timezone: string;
990
+ providerId?: string;
991
+ }
992
+ interface GetAvailabilityParams {
993
+ serviceId: string;
994
+ from: Date;
995
+ to: Date;
996
+ timezone: string;
997
+ }
998
+ interface DayAvailability {
999
+ date: Date;
1000
+ available: boolean;
1001
+ }
1002
+ /**
1003
+ * A bookable time slot returned by getSlotsForDate.
1004
+ * Contains all information needed to display and book the slot.
1005
+ */
1006
+ interface Slot {
1007
+ id: string;
1008
+ serviceId: string;
1009
+ providerId: string;
1010
+ from: number;
1011
+ to: number;
1012
+ timeText: string;
1013
+ dateText: string;
1014
+ }
944
1015
 
945
- export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateFeatureFlagParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteFeatureFlagParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type Quote, type QuoteLineItem, type RegisterUserParams, type RequestOptions, type ReservationCartItem, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type SubscribeParams, type TestWebhookParams, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type Zone };
1016
+ export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessEmails, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, type CreateFeatureFlagParams, type CreateOrderParams, type CreatePortalSessionParams, type CreateProductParams, type CreatePromoCodeParams, type CreateProviderParams, type CreateReservationParams, type CreateRoleParams, type CreateServiceParams, type DayAvailability, type DeleteBusinessMediaParams, type DeleteBusinessParams, type DeleteCollectionEntryParams, type DeleteCollectionParams, type DeleteFeatureFlagParams, type DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type DeleteUserParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type FeatureFlag, type FeatureFlagStatus, type FlagResults, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailabilityParams, type GetBusinessMediaParams, type GetBusinessMediaParams2, type GetBusinessParams, type GetBusinessParentsParams, type GetBusinessServiceWorkingTimeParams, type GetBusinessesParams, type GetCollectionEntriesParams, type GetCollectionEntryParams, type GetCollectionParams, type GetCollectionSubscribersParams, type GetCollectionsParams, type GetDeliveryStatsParams, type GetEntriesParams, type GetFeatureFlagParams, type GetFeatureFlagResultsParams, type GetFeatureFlagsParams, type GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServiceProvidersParams, type GetServicesParams, type GetSlotsForDateParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type GetVariantParams, type GetVariantResponse, type HandleInvitationParams, type InviteUserParams, type Language, type Location, type LoginUserParams, type LogoutParams, type Market, type Media, type MediaResolution, type OutcastDate, type PaginatedResponse, type Payment, type PaymentMethod, PaymentMethodType, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type ProcessRefundParams, type PromoCodeValidation, type ProviderWithTimeline, type Quote, type QuoteLineItem, type RegisterUserParams, type RequestOptions, type ReservationCartItem, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type Seo, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type ShippingWeightTier, type Slot, type SpecificDate, type SubscribeParams, type TestWebhookParams, type TimelinePoint, type TrackEmailOpenParams, type TrackEventParams, type TrackEventResponse, type TriggerBuildsParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateFeatureFlagParams, type UpdateMediaParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type UserSubscribeParams, type Variant, type VariantInput, type VariantResult, type WorkingDay, type WorkingHour, type WorkingTime, type Zone };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "arky-sdk",
3
- "version": "0.3.76",
3
+ "version": "0.3.78",
4
4
  "description": "Official TypeScript SDK for Arky - All-in-one business platform",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -11,6 +11,16 @@
11
11
  "types": "./dist/index.d.ts",
12
12
  "import": "./dist/index.js",
13
13
  "require": "./dist/index.cjs"
14
+ },
15
+ "./utils": {
16
+ "types": "./dist/utils.d.ts",
17
+ "import": "./dist/utils.js",
18
+ "require": "./dist/utils.cjs"
19
+ },
20
+ "./types": {
21
+ "types": "./dist/types.d.ts",
22
+ "import": "./dist/types.js",
23
+ "require": "./dist/types.cjs"
14
24
  }
15
25
  },
16
26
  "files": [
@@ -38,7 +48,9 @@
38
48
  "type": "git",
39
49
  "url": "https://github.com/0xDjole/arky-sdk.git"
40
50
  },
41
- "dependencies": {},
51
+ "dependencies": {
52
+ "nanostores": "^1.1.0"
53
+ },
42
54
  "devDependencies": {
43
55
  "tsup": "^8.5.0",
44
56
  "typescript": "^5.8.3"