arky-sdk 0.3.27 → 0.3.28
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/README.md +126 -25
- package/dist/index.cjs +41 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +41 -24
- package/dist/index.js.map +1 -1
- package/dist/types.d.cts +51 -40
- package/dist/types.d.ts +51 -40
- package/package.json +1 -1
package/dist/types.d.cts
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
|
-
interface RequestOptions {
|
|
2
|
-
successMessage?: string;
|
|
3
|
-
errorMessage?: string;
|
|
1
|
+
interface RequestOptions<T = any> {
|
|
4
2
|
headers?: Record<string, string>;
|
|
3
|
+
params?: Record<string, any>;
|
|
4
|
+
transformRequest?: (data: any) => any;
|
|
5
|
+
onSuccess?: (ctx: {
|
|
6
|
+
data: T;
|
|
7
|
+
method: string;
|
|
8
|
+
url: string;
|
|
9
|
+
status: number;
|
|
10
|
+
request?: any;
|
|
11
|
+
durationMs?: number;
|
|
12
|
+
requestId?: string | null;
|
|
13
|
+
}) => void | Promise<void>;
|
|
14
|
+
onError?: (ctx: {
|
|
15
|
+
error: any;
|
|
16
|
+
method: string;
|
|
17
|
+
url: string;
|
|
18
|
+
status?: number;
|
|
19
|
+
request?: any;
|
|
20
|
+
response?: any;
|
|
21
|
+
durationMs?: number;
|
|
22
|
+
requestId?: string | null;
|
|
23
|
+
aborted?: boolean;
|
|
24
|
+
}) => void | Promise<void>;
|
|
5
25
|
}
|
|
6
26
|
interface EshopItem {
|
|
7
27
|
productId: string;
|
|
@@ -104,16 +124,12 @@ interface GetAvailableSlotsParams {
|
|
|
104
124
|
interface GetAnalyticsParams {
|
|
105
125
|
metrics?: string[];
|
|
106
126
|
period?: string;
|
|
107
|
-
|
|
108
|
-
|
|
127
|
+
startDate?: string;
|
|
128
|
+
endDate?: string;
|
|
109
129
|
interval?: string;
|
|
110
130
|
}
|
|
111
131
|
interface GetAnalyticsHealthParams {
|
|
112
132
|
}
|
|
113
|
-
interface GetNotificationsParams {
|
|
114
|
-
previous_id?: string;
|
|
115
|
-
limit: number;
|
|
116
|
-
}
|
|
117
133
|
interface CreateRoleParams {
|
|
118
134
|
name: string;
|
|
119
135
|
parentRoles?: string[];
|
|
@@ -136,40 +152,30 @@ interface GetRoleParams {
|
|
|
136
152
|
interface GetRolesParams {
|
|
137
153
|
action: string;
|
|
138
154
|
}
|
|
155
|
+
interface Discount {
|
|
156
|
+
type: 'ITEMS_PERCENTAGE' | 'ITEMS_FIXED' | 'SHIPPING_PERCENTAGE';
|
|
157
|
+
marketId: string;
|
|
158
|
+
bps?: number;
|
|
159
|
+
amount?: number;
|
|
160
|
+
}
|
|
161
|
+
interface Condition {
|
|
162
|
+
type: 'PRODUCTS' | 'SERVICES' | 'MIN_ORDER_AMOUNT' | 'DATE_RANGE' | 'MAX_USES' | 'MAX_USES_PER_USER';
|
|
163
|
+
value: string[] | number | {
|
|
164
|
+
start?: number;
|
|
165
|
+
end?: number;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
139
168
|
interface CreatePromoCodeParams {
|
|
140
|
-
code
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
discountType?: string;
|
|
144
|
-
discountValue?: number;
|
|
145
|
-
minOrderValue?: number;
|
|
146
|
-
maxDiscountAmount?: number;
|
|
147
|
-
usageLimit?: number;
|
|
148
|
-
usagePerUser?: number;
|
|
149
|
-
startsAt?: string;
|
|
150
|
-
expiresAt?: string;
|
|
151
|
-
applicableProducts?: string[];
|
|
152
|
-
applicableCategories?: string[];
|
|
153
|
-
status?: string;
|
|
154
|
-
[key: string]: any;
|
|
169
|
+
code: string;
|
|
170
|
+
discounts: Discount[];
|
|
171
|
+
conditions: Condition[];
|
|
155
172
|
}
|
|
156
173
|
interface UpdatePromoCodeParams {
|
|
157
174
|
id: string;
|
|
158
|
-
code
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
discountValue?: number;
|
|
163
|
-
minOrderValue?: number;
|
|
164
|
-
maxDiscountAmount?: number;
|
|
165
|
-
usageLimit?: number;
|
|
166
|
-
usagePerUser?: number;
|
|
167
|
-
startsAt?: string;
|
|
168
|
-
expiresAt?: string;
|
|
169
|
-
applicableProducts?: string[];
|
|
170
|
-
applicableCategories?: string[];
|
|
171
|
-
status?: string;
|
|
172
|
-
[key: string]: any;
|
|
175
|
+
code: string;
|
|
176
|
+
discounts: Discount[];
|
|
177
|
+
conditions: Condition[];
|
|
178
|
+
statuses?: any[];
|
|
173
179
|
}
|
|
174
180
|
interface DeletePromoCodeParams {
|
|
175
181
|
id: string;
|
|
@@ -503,6 +509,11 @@ interface GetBusinessMarketParams {
|
|
|
503
509
|
interface TrackEmailOpenParams {
|
|
504
510
|
trackingPixelId: string;
|
|
505
511
|
}
|
|
512
|
+
interface TrackEmailOpenParams {
|
|
513
|
+
trackingPixelId: string;
|
|
514
|
+
}
|
|
515
|
+
interface GetDeliveryStatsParams {
|
|
516
|
+
}
|
|
506
517
|
interface GetDeliveryStatsParams {
|
|
507
518
|
}
|
|
508
519
|
interface UpdateNotificationsParams {
|
|
@@ -764,4 +775,4 @@ interface ReservationStoreState {
|
|
|
764
775
|
};
|
|
765
776
|
}
|
|
766
777
|
|
|
767
|
-
export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessPaymentMethod, type CancelSubscriptionParams, type CheckoutParams, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, 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 DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMarketParams, type GetBusinessMarketsParams, 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 GetLoginUrlParams, type GetMeParams, type
|
|
778
|
+
export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessPaymentMethod, type CancelSubscriptionParams, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, 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 DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMarketParams, type GetBusinessMarketsParams, 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 GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationPartsParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type HandleInvitationParams, type HandleStripeWebhookParams, type InviteUserParams, type Location, type LoginUserParams, type LogoutParams, type Market, type MarketConfigClient, type PaginatedResponse, type Payment, PaymentMethod, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type PromoCodeValidation, type Quote, type QuoteLineItem, type ReactivateSubscriptionParams, type RegisterUserParams, type RequestOptions, type ReservationCartPart, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type SubscribeToCollectionParams, type TestWebhookParams, type TrackEmailOpenParams, type TriggerBuildsParams, type UnsubscribeFromCollectionParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateSubscriptionParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type Zone };
|
package/dist/types.d.ts
CHANGED
|
@@ -1,7 +1,27 @@
|
|
|
1
|
-
interface RequestOptions {
|
|
2
|
-
successMessage?: string;
|
|
3
|
-
errorMessage?: string;
|
|
1
|
+
interface RequestOptions<T = any> {
|
|
4
2
|
headers?: Record<string, string>;
|
|
3
|
+
params?: Record<string, any>;
|
|
4
|
+
transformRequest?: (data: any) => any;
|
|
5
|
+
onSuccess?: (ctx: {
|
|
6
|
+
data: T;
|
|
7
|
+
method: string;
|
|
8
|
+
url: string;
|
|
9
|
+
status: number;
|
|
10
|
+
request?: any;
|
|
11
|
+
durationMs?: number;
|
|
12
|
+
requestId?: string | null;
|
|
13
|
+
}) => void | Promise<void>;
|
|
14
|
+
onError?: (ctx: {
|
|
15
|
+
error: any;
|
|
16
|
+
method: string;
|
|
17
|
+
url: string;
|
|
18
|
+
status?: number;
|
|
19
|
+
request?: any;
|
|
20
|
+
response?: any;
|
|
21
|
+
durationMs?: number;
|
|
22
|
+
requestId?: string | null;
|
|
23
|
+
aborted?: boolean;
|
|
24
|
+
}) => void | Promise<void>;
|
|
5
25
|
}
|
|
6
26
|
interface EshopItem {
|
|
7
27
|
productId: string;
|
|
@@ -104,16 +124,12 @@ interface GetAvailableSlotsParams {
|
|
|
104
124
|
interface GetAnalyticsParams {
|
|
105
125
|
metrics?: string[];
|
|
106
126
|
period?: string;
|
|
107
|
-
|
|
108
|
-
|
|
127
|
+
startDate?: string;
|
|
128
|
+
endDate?: string;
|
|
109
129
|
interval?: string;
|
|
110
130
|
}
|
|
111
131
|
interface GetAnalyticsHealthParams {
|
|
112
132
|
}
|
|
113
|
-
interface GetNotificationsParams {
|
|
114
|
-
previous_id?: string;
|
|
115
|
-
limit: number;
|
|
116
|
-
}
|
|
117
133
|
interface CreateRoleParams {
|
|
118
134
|
name: string;
|
|
119
135
|
parentRoles?: string[];
|
|
@@ -136,40 +152,30 @@ interface GetRoleParams {
|
|
|
136
152
|
interface GetRolesParams {
|
|
137
153
|
action: string;
|
|
138
154
|
}
|
|
155
|
+
interface Discount {
|
|
156
|
+
type: 'ITEMS_PERCENTAGE' | 'ITEMS_FIXED' | 'SHIPPING_PERCENTAGE';
|
|
157
|
+
marketId: string;
|
|
158
|
+
bps?: number;
|
|
159
|
+
amount?: number;
|
|
160
|
+
}
|
|
161
|
+
interface Condition {
|
|
162
|
+
type: 'PRODUCTS' | 'SERVICES' | 'MIN_ORDER_AMOUNT' | 'DATE_RANGE' | 'MAX_USES' | 'MAX_USES_PER_USER';
|
|
163
|
+
value: string[] | number | {
|
|
164
|
+
start?: number;
|
|
165
|
+
end?: number;
|
|
166
|
+
};
|
|
167
|
+
}
|
|
139
168
|
interface CreatePromoCodeParams {
|
|
140
|
-
code
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
discountType?: string;
|
|
144
|
-
discountValue?: number;
|
|
145
|
-
minOrderValue?: number;
|
|
146
|
-
maxDiscountAmount?: number;
|
|
147
|
-
usageLimit?: number;
|
|
148
|
-
usagePerUser?: number;
|
|
149
|
-
startsAt?: string;
|
|
150
|
-
expiresAt?: string;
|
|
151
|
-
applicableProducts?: string[];
|
|
152
|
-
applicableCategories?: string[];
|
|
153
|
-
status?: string;
|
|
154
|
-
[key: string]: any;
|
|
169
|
+
code: string;
|
|
170
|
+
discounts: Discount[];
|
|
171
|
+
conditions: Condition[];
|
|
155
172
|
}
|
|
156
173
|
interface UpdatePromoCodeParams {
|
|
157
174
|
id: string;
|
|
158
|
-
code
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
discountValue?: number;
|
|
163
|
-
minOrderValue?: number;
|
|
164
|
-
maxDiscountAmount?: number;
|
|
165
|
-
usageLimit?: number;
|
|
166
|
-
usagePerUser?: number;
|
|
167
|
-
startsAt?: string;
|
|
168
|
-
expiresAt?: string;
|
|
169
|
-
applicableProducts?: string[];
|
|
170
|
-
applicableCategories?: string[];
|
|
171
|
-
status?: string;
|
|
172
|
-
[key: string]: any;
|
|
175
|
+
code: string;
|
|
176
|
+
discounts: Discount[];
|
|
177
|
+
conditions: Condition[];
|
|
178
|
+
statuses?: any[];
|
|
173
179
|
}
|
|
174
180
|
interface DeletePromoCodeParams {
|
|
175
181
|
id: string;
|
|
@@ -503,6 +509,11 @@ interface GetBusinessMarketParams {
|
|
|
503
509
|
interface TrackEmailOpenParams {
|
|
504
510
|
trackingPixelId: string;
|
|
505
511
|
}
|
|
512
|
+
interface TrackEmailOpenParams {
|
|
513
|
+
trackingPixelId: string;
|
|
514
|
+
}
|
|
515
|
+
interface GetDeliveryStatsParams {
|
|
516
|
+
}
|
|
506
517
|
interface GetDeliveryStatsParams {
|
|
507
518
|
}
|
|
508
519
|
interface UpdateNotificationsParams {
|
|
@@ -764,4 +775,4 @@ interface ReservationStoreState {
|
|
|
764
775
|
};
|
|
765
776
|
}
|
|
766
777
|
|
|
767
|
-
export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessPaymentMethod, type CancelSubscriptionParams, type CheckoutParams, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, 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 DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMarketParams, type GetBusinessMarketsParams, 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 GetLoginUrlParams, type GetMeParams, type
|
|
778
|
+
export { type AddPhoneNumberParams, type ApiResponse, type Block, type Business, type BusinessConfig, type BusinessPaymentMethod, type CancelSubscriptionParams, type CheckoutParams, type Condition, type ConfirmUserParams, type CreateBusinessParams, type CreateCollectionEntryParams, type CreateCollectionParams, type CreateEntryParams, 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 DeleteProductParams, type DeletePromoCodeParams, type DeleteProviderParams, type DeleteRoleParams, type DeleteServiceParams, type Discount, type EshopCartItem, type EshopItem, type EshopStoreState, type ForgotPasswordParams, type GenerateBlocksParams, type GetAnalyticsHealthParams, type GetAnalyticsParams, type GetAvailableSlotsParams, type GetBusinessMarketParams, type GetBusinessMarketsParams, 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 GetLoginUrlParams, type GetMeParams, type GetOrderParams, type GetOrdersParams, type GetProductParams, type GetProductsParams, type GetPromoCodeParams, type GetPromoCodesParams, type GetProviderParams, type GetProvidersParams, type GetQuoteParams, type GetReservationParams, type GetReservationPartsParams, type GetReservationQuoteParams, type GetRoleParams, type GetRolesParams, type GetServiceParams, type GetServicesParams, type GetSubscriptionParams, type GetSubscriptionPlansParams, type GetVariableMetadataParams, type HandleInvitationParams, type HandleStripeWebhookParams, type InviteUserParams, type Location, type LoginUserParams, type LogoutParams, type Market, type MarketConfigClient, type PaginatedResponse, type Payment, PaymentMethod, type PaymentProviderConfig, type PhoneNumberConfirmParams, type Price, type PromoCodeValidation, type Quote, type QuoteLineItem, type ReactivateSubscriptionParams, type RegisterUserParams, type RequestOptions, type ReservationCartPart, type ReservationCheckoutParams, type ReservationStoreState, type ResetForgotPasswordParams, type ResetPasswordParams, type SearchMyReservationsParams, type SearchReservationsParams, type SearchUsersParams, type SendEntryParams, type SetProviderScheduleParams, type SetRoleParams, type SetupAnalyticsParams, type ShippingMethod, type SubscribeToCollectionParams, type TestWebhookParams, type TrackEmailOpenParams, type TriggerBuildsParams, type UnsubscribeFromCollectionParams, type UpdateBusinessParams, type UpdateCollectionParams, type UpdateEntryParams, type UpdateNotificationsParams, type UpdateOrderParams, type UpdateOrderPaymentStatusParams, type UpdateOrderStatusParams, type UpdateProductParams, type UpdatePromoCodeParams, type UpdateProviderParams, type UpdateReservationParams, type UpdateRoleParams, type UpdateServiceParams, type UpdateSubscriptionParams, type UpdateUserProfileParams, type UploadBusinessMediaParams, type Zone };
|