arky-sdk 0.3.26 → 0.3.27
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 +12 -19
- 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 +12 -19
- package/dist/index.js.map +1 -1
- package/dist/types.d.cts +5 -6
- package/dist/types.d.ts +5 -6
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UpdateUserProfileParams, RequestOptions,
|
|
1
|
+
import { UpdateUserProfileParams, RequestOptions, AddPhoneNumberParams, PhoneNumberConfirmParams, GetMeParams, SearchUsersParams, SetRoleParams, LoginUserParams, RegisterUserParams, LogoutParams, ConfirmUserParams, GetLoginUrlParams, ForgotPasswordParams, ResetForgotPasswordParams, ResetPasswordParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetBusinessParentsParams, TriggerBuildsParams, GetSubscriptionPlansParams, GetSubscriptionParams, UpdateSubscriptionParams, CancelSubscriptionParams, ReactivateSubscriptionParams, CreatePortalSessionParams, InviteUserParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, SetProviderScheduleParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, CreateRoleParams, UpdateRoleParams, DeleteRoleParams, GetRoleParams, GetRolesParams, GetNotificationsParams, UpdateNotificationsParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetAnalyticsParams, GetAnalyticsHealthParams, SetupAnalyticsParams, CreateCollectionParams, UpdateCollectionParams, DeleteCollectionParams, GetCollectionParams, GetCollectionsParams, GenerateBlocksParams, GetEntriesParams, CreateEntryParams, UpdateEntryParams, DeleteCollectionEntryParams, GetCollectionEntryParams, SendEntryParams, GetVariableMetadataParams, GetCollectionSubscribersParams, SubscribeToCollectionParams, UnsubscribeFromCollectionParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, UpdateOrderStatusParams, UpdateOrderPaymentStatusParams, GetQuoteParams, CheckoutParams, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, GetReservationPartsParams, SearchReservationsParams, SearchMyReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, GetAvailableSlotsParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, HandleStripeWebhookParams, GetBusinessMarketsParams, GetBusinessMarketParams } from './types.cjs';
|
|
2
2
|
export { ApiResponse, Block, Business, EshopCartItem, EshopStoreState, Price, ReservationCartPart, ReservationStoreState } from './types.cjs';
|
|
3
3
|
import { g as getGalleryThumbnail, a as getBlockLabel, b as getBlockTextValue, f as formatBlockValue, p as prepareBlocksForSubmission, e as extractBlockValues, c as getMarketPrice, d as getPriceAmount, h as formatPayment, i as formatMinor, j as createPaymentForCheckout, k as getCurrencySymbol, v as validatePhoneNumber, l as findTimeZone, s as slugify, m as humanize, n as categorify, o as formatDate, q as getSvgContentForAstro, r as fetchSvgContent, t as injectSvgIntoElement } from './svg-CFjyTGXu.cjs';
|
|
4
4
|
|
|
@@ -43,8 +43,8 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
43
43
|
}): {
|
|
44
44
|
user: {
|
|
45
45
|
updateUser(params: UpdateUserProfileParams, options?: RequestOptions): Promise<any>;
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
addPhoneNumber(params: AddPhoneNumberParams, options?: RequestOptions): Promise<any>;
|
|
47
|
+
phoneNumberConfirm(params: PhoneNumberConfirmParams, options?: RequestOptions): Promise<any>;
|
|
48
48
|
getMe(params: GetMeParams, options?: RequestOptions): Promise<any>;
|
|
49
49
|
searchUsers(params: SearchUsersParams, options?: RequestOptions): Promise<any>;
|
|
50
50
|
setRole(params: SetRoleParams, options?: RequestOptions): Promise<any>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UpdateUserProfileParams, RequestOptions,
|
|
1
|
+
import { UpdateUserProfileParams, RequestOptions, AddPhoneNumberParams, PhoneNumberConfirmParams, GetMeParams, SearchUsersParams, SetRoleParams, LoginUserParams, RegisterUserParams, LogoutParams, ConfirmUserParams, GetLoginUrlParams, ForgotPasswordParams, ResetForgotPasswordParams, ResetPasswordParams, CreateBusinessParams, UpdateBusinessParams, DeleteBusinessParams, GetBusinessParams, GetBusinessesParams, GetBusinessParentsParams, TriggerBuildsParams, GetSubscriptionPlansParams, GetSubscriptionParams, UpdateSubscriptionParams, CancelSubscriptionParams, ReactivateSubscriptionParams, CreatePortalSessionParams, InviteUserParams, HandleInvitationParams, TestWebhookParams, GetBusinessMediaParams2, SetProviderScheduleParams, UploadBusinessMediaParams, DeleteBusinessMediaParams, GetBusinessMediaParams, CreateRoleParams, UpdateRoleParams, DeleteRoleParams, GetRoleParams, GetRolesParams, GetNotificationsParams, UpdateNotificationsParams, TrackEmailOpenParams, GetDeliveryStatsParams, CreatePromoCodeParams, UpdatePromoCodeParams, DeletePromoCodeParams, GetPromoCodeParams, GetPromoCodesParams, GetAnalyticsParams, GetAnalyticsHealthParams, SetupAnalyticsParams, CreateCollectionParams, UpdateCollectionParams, DeleteCollectionParams, GetCollectionParams, GetCollectionsParams, GenerateBlocksParams, GetEntriesParams, CreateEntryParams, UpdateEntryParams, DeleteCollectionEntryParams, GetCollectionEntryParams, SendEntryParams, GetVariableMetadataParams, GetCollectionSubscribersParams, SubscribeToCollectionParams, UnsubscribeFromCollectionParams, CreateProductParams, UpdateProductParams, DeleteProductParams, GetProductParams, GetProductsParams, CreateOrderParams, UpdateOrderParams, GetOrderParams, GetOrdersParams, UpdateOrderStatusParams, UpdateOrderPaymentStatusParams, GetQuoteParams, CheckoutParams, CreateReservationParams, UpdateReservationParams, ReservationCheckoutParams, GetReservationParams, GetReservationPartsParams, SearchReservationsParams, SearchMyReservationsParams, GetReservationQuoteParams, CreateServiceParams, UpdateServiceParams, DeleteServiceParams, GetServiceParams, GetServicesParams, GetAvailableSlotsParams, CreateProviderParams, UpdateProviderParams, DeleteProviderParams, GetProviderParams, GetProvidersParams, GetBusinessServiceWorkingTimeParams, HandleStripeWebhookParams, GetBusinessMarketsParams, GetBusinessMarketParams } from './types.js';
|
|
2
2
|
export { ApiResponse, Block, Business, EshopCartItem, EshopStoreState, Price, ReservationCartPart, ReservationStoreState } from './types.js';
|
|
3
3
|
import { g as getGalleryThumbnail, a as getBlockLabel, b as getBlockTextValue, f as formatBlockValue, p as prepareBlocksForSubmission, e as extractBlockValues, c as getMarketPrice, d as getPriceAmount, h as formatPayment, i as formatMinor, j as createPaymentForCheckout, k as getCurrencySymbol, v as validatePhoneNumber, l as findTimeZone, s as slugify, m as humanize, n as categorify, o as formatDate, q as getSvgContentForAstro, r as fetchSvgContent, t as injectSvgIntoElement } from './svg-BhIM4HZW.js';
|
|
4
4
|
|
|
@@ -43,8 +43,8 @@ declare function createArkySDK(config: HttpClientConfig & {
|
|
|
43
43
|
}): {
|
|
44
44
|
user: {
|
|
45
45
|
updateUser(params: UpdateUserProfileParams, options?: RequestOptions): Promise<any>;
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
addPhoneNumber(params: AddPhoneNumberParams, options?: RequestOptions): Promise<any>;
|
|
47
|
+
phoneNumberConfirm(params: PhoneNumberConfirmParams, options?: RequestOptions): Promise<any>;
|
|
48
48
|
getMe(params: GetMeParams, options?: RequestOptions): Promise<any>;
|
|
49
49
|
searchUsers(params: SearchUsersParams, options?: RequestOptions): Promise<any>;
|
|
50
50
|
setRole(params: SetRoleParams, options?: RequestOptions): Promise<any>;
|
package/dist/index.js
CHANGED
|
@@ -172,25 +172,18 @@ var createUserApi = (apiConfig) => {
|
|
|
172
172
|
return {
|
|
173
173
|
// ===== USER PROFILE =====
|
|
174
174
|
async updateUser(params, options) {
|
|
175
|
-
const payload = {
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
phoneNumber: params.phoneNumber,
|
|
188
|
-
addresses: []
|
|
189
|
-
};
|
|
190
|
-
return apiConfig.httpClient.put("/v1/users/update", payload, options);
|
|
191
|
-
},
|
|
192
|
-
async verifyPhoneCode(params, options) {
|
|
193
|
-
return apiConfig.httpClient.put("/v1/users/confirm/phone-number", params, options);
|
|
175
|
+
const payload = {};
|
|
176
|
+
if (params.name !== void 0) payload.name = params.name;
|
|
177
|
+
if (params.phoneNumbers !== void 0) payload.phoneNumbers = params.phoneNumbers;
|
|
178
|
+
if (params.addresses !== void 0) payload.addresses = params.addresses;
|
|
179
|
+
if (params.apiTokens !== void 0) payload.apiTokens = params.apiTokens;
|
|
180
|
+
return apiConfig.httpClient.put("/v1/users", payload, options);
|
|
181
|
+
},
|
|
182
|
+
async addPhoneNumber(params, options) {
|
|
183
|
+
return apiConfig.httpClient.post("/v1/users/phone-number", params, options);
|
|
184
|
+
},
|
|
185
|
+
async phoneNumberConfirm(params, options) {
|
|
186
|
+
return apiConfig.httpClient.post("/v1/users/phone-number/confirm", params, options);
|
|
194
187
|
},
|
|
195
188
|
async getMe(params, options) {
|
|
196
189
|
return apiConfig.httpClient.get("/v1/users/me", options);
|