@bookinglab/booking-journey-api 1.12.0 → 2.0.0

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 CHANGED
@@ -33,7 +33,6 @@ import { createJrniClient } from '@bookinglab/booking-journey-api';
33
33
 
34
34
  const client = createJrniClient('https://api.jrni.com', {
35
35
  appId: 'your-app-id',
36
- appKey: 'your-app-key',
37
36
  });
38
37
 
39
38
  // Login
@@ -82,7 +81,7 @@ function App() {
82
81
  <QueryClientProvider client={queryClient}>
83
82
  <JrniProvider
84
83
  baseUrl="https://api.jrni.com"
85
- config={{ appId: 'your-app-id', appKey: 'your-app-key' }}
84
+ config={{ appId: 'your-app-id' }}
86
85
  >
87
86
  <LoginForm />
88
87
  </JrniProvider>
@@ -154,7 +153,7 @@ function App() {
154
153
  <ApiClientProvider
155
154
  bookingLabBaseUrl="https://api.bookinglab.com"
156
155
  jrniBaseUrl="https://api.jrni.com"
157
- jrniConfig={{ appId: 'your-app-id', appKey: 'your-app-key' }}
156
+ jrniConfig={{ appId: 'your-app-id' }}
158
157
  authToken="your-auth-token"
159
158
  >
160
159
  <YourApp />
@@ -181,7 +180,6 @@ Creates a new JRNI client instance.
181
180
  ```typescript
182
181
  const client = createJrniClient('https://api.jrni.com', {
183
182
  appId: 'your-app-id',
184
- appKey: 'your-app-key',
185
183
  });
186
184
  ```
187
185
 
@@ -218,6 +216,7 @@ client.setAuthToken('your-auth-token');
218
216
  - `client.createBooking(data)` - Create a new booking
219
217
  - `client.updateBooking(id, data)` - Update a booking
220
218
  - `client.cancelBooking(companyId, bookingId, request, clientToken)` - Cancel a booking
219
+ - `client.resetPassword(memberId, companyId, request, authToken, clientToken)` - Reset a member's password
221
220
  - `client.deleteBooking(id)` - Delete a booking
222
221
  - `client.getServices()` - Get all services
223
222
  - `client.getService(id)` - Get a specific service
@@ -232,7 +231,7 @@ Provides JRNI client context to React components.
232
231
  ```tsx
233
232
  <JrniProvider
234
233
  baseUrl="https://api.jrni.com"
235
- config={{ appId: 'your-app-id', appKey: 'your-app-key' }}
234
+ config={{ appId: 'your-app-id' }}
236
235
  >
237
236
  {children}
238
237
  </JrniProvider>
@@ -259,7 +258,7 @@ Combined provider for applications using multiple API clients.
259
258
  <ApiClientProvider
260
259
  bookingLabBaseUrl="https://api.bookinglab.com"
261
260
  jrniBaseUrl="https://api.jrni.com"
262
- jrniConfig={{ appId: 'your-app-id', appKey: 'your-app-key' }}
261
+ jrniConfig={{ appId: 'your-app-id' }}
263
262
  authToken="your-auth-token"
264
263
  >
265
264
  {children}
@@ -374,6 +373,7 @@ const client = useJrniClient();
374
373
  - `useCreateBooking()` - Create a new booking
375
374
  - `useUpdateBooking()` - Update a booking
376
375
  - `useCancelBooking(companyId, bookingId, clientToken)` - Cancel a booking
376
+ - `useResetPassword(memberId, companyId, authToken, clientToken)` - Reset a member's password
377
377
  - `useClientDetails(companyId, clientToken, enabled?)` - Get client details
378
378
  - `useCreateClient(companyId, clientToken?)` - Create a new client
379
379
  - `useServices()` - Get all services
@@ -461,6 +461,7 @@ import type {
461
461
  Service,
462
462
  CancelBookingRequest,
463
463
  CancelBookingResponse,
464
+ ResetPasswordRequest,
464
465
  } from '@bookinglab/booking-journey-api';
465
466
  ```
466
467
 
package/dist/index.d.cts CHANGED
@@ -52,7 +52,6 @@ interface Service {
52
52
  */
53
53
  interface JrniConfig {
54
54
  appId: string;
55
- appKey: string;
56
55
  }
57
56
  /**
58
57
  * JRNI API Types
@@ -885,6 +884,14 @@ interface GetMemberResponse {
885
884
  _links: Record<string, any>;
886
885
  [key: string]: any;
887
886
  }
887
+ /**
888
+ * Reset Password Types
889
+ */
890
+ interface ResetPasswordRequest {
891
+ new_password: string;
892
+ confirm_new_password: string;
893
+ current_password: string;
894
+ }
888
895
 
889
896
  /**
890
897
  * Core API Client
@@ -992,6 +999,15 @@ declare class BookingLabClient extends ApiClient {
992
999
  * @param clientToken - Client token for authentication
993
1000
  */
994
1001
  cancelBooking(companyId: number, bookingId: number, request: CancelBookingRequest, clientToken: string): Promise<ApiResponse<CancelBookingResponse>>;
1002
+ /**
1003
+ * Reset password for a member
1004
+ * @param memberId - The member ID
1005
+ * @param companyId - The company ID
1006
+ * @param request - Reset password request with current and new passwords
1007
+ * @param authToken - Auth token for authentication
1008
+ * @param clientToken - Client token for authentication
1009
+ */
1010
+ resetPassword(memberId: number, companyId: number, request: ResetPasswordRequest, authToken: string, clientToken: string): Promise<ApiResponse<LoginResponse>>;
995
1011
  }
996
1012
  /**
997
1013
  * Create a new BookingLab client instance
@@ -1005,7 +1021,6 @@ declare function createBookingLabClient(baseUrl: string, authToken?: string): Bo
1005
1021
 
1006
1022
  declare class JrniClient extends ApiClient {
1007
1023
  private appId;
1008
- private appKey;
1009
1024
  constructor(baseUrl: string, config: JrniConfig);
1010
1025
  /**
1011
1026
  * Get default headers for JRNI API requests
@@ -1306,5 +1321,13 @@ declare function useCreateClient(companyId: number, clientToken?: string): _tans
1306
1321
  * @param clientToken - Client token for authentication
1307
1322
  */
1308
1323
  declare function useCancelBooking(companyId: number, bookingId: number, clientToken: string): _tanstack_react_query.UseMutationResult<CancelBookingResponse, Error, CancelBookingRequest, unknown>;
1324
+ /**
1325
+ * Hook for resetting a member's password
1326
+ * @param memberId - The member ID
1327
+ * @param companyId - The company ID
1328
+ * @param authToken - Auth token for authentication
1329
+ * @param clientToken - Client token for authentication
1330
+ */
1331
+ declare function useResetPassword(memberId: number, companyId: number, authToken: string, clientToken: string): _tanstack_react_query.UseMutationResult<LoginResponse, Error, ResetPasswordRequest, unknown>;
1309
1332
 
1310
- export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, BookingLabClient, BookingLabProvider, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type Resource, type ResourceLinks, type ResourcesResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabClient, useBookingLabContext, useCancelBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCreateBasket, useCreateClient, useDates, useForgottenPassword, useGetMember, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useResources, useServices, useTimes, useUpdateClient, useUpdateMember };
1333
+ export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, BookingLabClient, BookingLabProvider, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabClient, useBookingLabContext, useCancelBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCreateBasket, useCreateClient, useDates, useForgottenPassword, useGetMember, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useResetPassword, useResources, useServices, useTimes, useUpdateClient, useUpdateMember };
package/dist/index.d.ts CHANGED
@@ -52,7 +52,6 @@ interface Service {
52
52
  */
53
53
  interface JrniConfig {
54
54
  appId: string;
55
- appKey: string;
56
55
  }
57
56
  /**
58
57
  * JRNI API Types
@@ -885,6 +884,14 @@ interface GetMemberResponse {
885
884
  _links: Record<string, any>;
886
885
  [key: string]: any;
887
886
  }
887
+ /**
888
+ * Reset Password Types
889
+ */
890
+ interface ResetPasswordRequest {
891
+ new_password: string;
892
+ confirm_new_password: string;
893
+ current_password: string;
894
+ }
888
895
 
889
896
  /**
890
897
  * Core API Client
@@ -992,6 +999,15 @@ declare class BookingLabClient extends ApiClient {
992
999
  * @param clientToken - Client token for authentication
993
1000
  */
994
1001
  cancelBooking(companyId: number, bookingId: number, request: CancelBookingRequest, clientToken: string): Promise<ApiResponse<CancelBookingResponse>>;
1002
+ /**
1003
+ * Reset password for a member
1004
+ * @param memberId - The member ID
1005
+ * @param companyId - The company ID
1006
+ * @param request - Reset password request with current and new passwords
1007
+ * @param authToken - Auth token for authentication
1008
+ * @param clientToken - Client token for authentication
1009
+ */
1010
+ resetPassword(memberId: number, companyId: number, request: ResetPasswordRequest, authToken: string, clientToken: string): Promise<ApiResponse<LoginResponse>>;
995
1011
  }
996
1012
  /**
997
1013
  * Create a new BookingLab client instance
@@ -1005,7 +1021,6 @@ declare function createBookingLabClient(baseUrl: string, authToken?: string): Bo
1005
1021
 
1006
1022
  declare class JrniClient extends ApiClient {
1007
1023
  private appId;
1008
- private appKey;
1009
1024
  constructor(baseUrl: string, config: JrniConfig);
1010
1025
  /**
1011
1026
  * Get default headers for JRNI API requests
@@ -1306,5 +1321,13 @@ declare function useCreateClient(companyId: number, clientToken?: string): _tans
1306
1321
  * @param clientToken - Client token for authentication
1307
1322
  */
1308
1323
  declare function useCancelBooking(companyId: number, bookingId: number, clientToken: string): _tanstack_react_query.UseMutationResult<CancelBookingResponse, Error, CancelBookingRequest, unknown>;
1324
+ /**
1325
+ * Hook for resetting a member's password
1326
+ * @param memberId - The member ID
1327
+ * @param companyId - The company ID
1328
+ * @param authToken - Auth token for authentication
1329
+ * @param clientToken - Client token for authentication
1330
+ */
1331
+ declare function useResetPassword(memberId: number, companyId: number, authToken: string, clientToken: string): _tanstack_react_query.UseMutationResult<LoginResponse, Error, ResetPasswordRequest, unknown>;
1309
1332
 
1310
- export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, BookingLabClient, BookingLabProvider, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type Resource, type ResourceLinks, type ResourcesResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabClient, useBookingLabContext, useCancelBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCreateBasket, useCreateClient, useDates, useForgottenPassword, useGetMember, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useResources, useServices, useTimes, useUpdateClient, useUpdateMember };
1333
+ export { type AddBasketItemRequest, type AddServiceItemAssets, type AddServiceItemQuestion, type AddServiceItemRequest, ApiClient, type ApiClientConfig, ApiClientProvider, type ApiError, type ApiResponse, type AvailabilityTime, type AvailabilityTimesResponse, type Booking, type BookingAnswer, BookingLabClient, BookingLabProvider, type BookingPaymentItem, type BookingSettings, type CancelBookingRequest, type CancelBookingResponse, type CheckoutBasketClient, type CheckoutBasketRequest, type CheckoutBasketResponse, type ChildCompaniesResponse, type ChildCompany, type ChildCompanyAddress, type ChildCompanySettings, type ClearBasketsResponse, type ClientDetailsQuestion, type ClientDetailsResponse, type CreateBasketRequest, type CreateBasketResponse, type CreateBookingRequest, type CreateClientRequest, type CreateClientResponse, type DateSlot, type DatesResponse, type ForgottenPasswordRequest, type ForgottenPasswordResponse, type GetChildCompaniesParams, type GetDatesParams, type GetMemberResponse, type GetQuestionsParams, type GetTimesParams, type JrniBooking, JrniClient, type JrniConfig, JrniProvider, type JrniService, type ListBookingsParams, type ListBookingsResponse, type Location, type LocationsResponse, type LoginRequest, type LoginResponse, type MemberBooking, type MemberBookingsResponse, MemberType, type PersonImage, type PersonImagesResponse, type Question, type QuestionOption, type QuestionsResponse, type RequestOptions, type ResetPasswordRequest, type Resource, type ResourceLinks, type ResourcesResponse, type Service, type ServiceItemResponse, type ServicesResponse, type TimeSlot, type TimesResponse, type UpdateClientAnswer, type UpdateClientAnswerEntry, type UpdateClientDetailsData, type UpdateClientExtraInfo, type UpdateClientNotificationPreferences, type UpdateClientQuestionEntry, type UpdateClientRequest, type UpdateClientResponse, type UpdateMemberDetailsData, type UpdateMemberRequest, type UpdateMemberResponse, type Vehicle, type VehiclesResponse, createBookingLabClient, createJrniClient, useAddServiceItem, useApiClientContext, useBookingLabClient, useBookingLabContext, useCancelBooking, useCheckoutBasket, useChildCompanies, useClearBaskets, useClientDetails, useCreateBasket, useCreateClient, useDates, useForgottenPassword, useGetMember, useJrniClient, useJrniContext, useListBookings, useLogin, useQuestions, useResetPassword, useResources, useServices, useTimes, useUpdateClient, useUpdateMember };
package/dist/index.js CHANGED
@@ -256,6 +256,28 @@ var BookingLabClient = class extends ApiClient {
256
256
  }
257
257
  );
258
258
  }
259
+ /**
260
+ * Reset password for a member
261
+ * @param memberId - The member ID
262
+ * @param companyId - The company ID
263
+ * @param request - Reset password request with current and new passwords
264
+ * @param authToken - Auth token for authentication
265
+ * @param clientToken - Client token for authentication
266
+ */
267
+ async resetPassword(memberId, companyId, request, authToken, clientToken) {
268
+ return this.post(
269
+ `/member/${memberId}/reset-password`,
270
+ request,
271
+ {
272
+ headers: {
273
+ "X-member-id": String(memberId),
274
+ "x-company-id": String(companyId),
275
+ "authtoken": authToken,
276
+ "clienttoken": clientToken
277
+ }
278
+ }
279
+ );
280
+ }
259
281
  };
260
282
  function createBookingLabClient(baseUrl, authToken) {
261
283
  const client = new BookingLabClient({ baseUrl });
@@ -270,7 +292,6 @@ var JrniClient = class extends ApiClient {
270
292
  constructor(baseUrl, config) {
271
293
  super({ baseUrl });
272
294
  this.appId = config.appId;
273
- this.appKey = config.appKey;
274
295
  }
275
296
  /**
276
297
  * Get default headers for JRNI API requests
@@ -287,8 +308,7 @@ var JrniClient = class extends ApiClient {
287
308
  async login(credentials) {
288
309
  return this.post("/login", credentials, {
289
310
  headers: {
290
- ...this.getDefaultHeaders(),
291
- "App-Key": this.appKey
311
+ ...this.getDefaultHeaders()
292
312
  }
293
313
  });
294
314
  }
@@ -302,8 +322,7 @@ var JrniClient = class extends ApiClient {
302
322
  `/company/${companyId}/children`,
303
323
  {
304
324
  headers: {
305
- ...this.getDefaultHeaders(),
306
- "App-Key": this.appKey
325
+ ...this.getDefaultHeaders()
307
326
  },
308
327
  params
309
328
  }
@@ -318,8 +337,7 @@ var JrniClient = class extends ApiClient {
318
337
  `/${companyId}/resources`,
319
338
  {
320
339
  headers: {
321
- ...this.getDefaultHeaders(),
322
- "App-Key": this.appKey
340
+ ...this.getDefaultHeaders()
323
341
  }
324
342
  }
325
343
  );
@@ -333,8 +351,7 @@ var JrniClient = class extends ApiClient {
333
351
  `/${companyId}/services`,
334
352
  {
335
353
  headers: {
336
- ...this.getDefaultHeaders(),
337
- "App-Key": this.appKey
354
+ ...this.getDefaultHeaders()
338
355
  }
339
356
  }
340
357
  );
@@ -346,8 +363,7 @@ var JrniClient = class extends ApiClient {
346
363
  */
347
364
  async createBasket(request, authToken) {
348
365
  const headers = {
349
- ...this.getDefaultHeaders(),
350
- "App-Key": this.appKey
366
+ ...this.getDefaultHeaders()
351
367
  };
352
368
  if (authToken) {
353
369
  headers["Auth-Token"] = authToken;
@@ -364,8 +380,7 @@ var JrniClient = class extends ApiClient {
364
380
  */
365
381
  async clearBaskets(authToken) {
366
382
  const headers = {
367
- ...this.getDefaultHeaders(),
368
- "App-Key": this.appKey
383
+ ...this.getDefaultHeaders()
369
384
  };
370
385
  if (authToken) {
371
386
  headers["Auth-Token"] = authToken;
@@ -383,8 +398,7 @@ var JrniClient = class extends ApiClient {
383
398
  */
384
399
  async addServiceItem(basketId, serviceItem, authToken) {
385
400
  const headers = {
386
- ...this.getDefaultHeaders(),
387
- "App-Key": this.appKey
401
+ ...this.getDefaultHeaders()
388
402
  };
389
403
  if (authToken) {
390
404
  headers["Auth-Token"] = authToken;
@@ -405,8 +419,7 @@ var JrniClient = class extends ApiClient {
405
419
  `/${companyId}/times`,
406
420
  {
407
421
  headers: {
408
- ...this.getDefaultHeaders(),
409
- "App-Key": this.appKey
422
+ ...this.getDefaultHeaders()
410
423
  },
411
424
  params
412
425
  }
@@ -422,8 +435,7 @@ var JrniClient = class extends ApiClient {
422
435
  `/${companyId}/dates`,
423
436
  {
424
437
  headers: {
425
- ...this.getDefaultHeaders(),
426
- "App-Key": this.appKey
438
+ ...this.getDefaultHeaders()
427
439
  },
428
440
  params
429
441
  }
@@ -439,8 +451,7 @@ var JrniClient = class extends ApiClient {
439
451
  `/${companyId}/questions`,
440
452
  {
441
453
  headers: {
442
- ...this.getDefaultHeaders(),
443
- "App-Key": this.appKey
454
+ ...this.getDefaultHeaders()
444
455
  },
445
456
  params
446
457
  }
@@ -454,8 +465,7 @@ var JrniClient = class extends ApiClient {
454
465
  */
455
466
  async checkoutBasket(basketId, request, authToken) {
456
467
  const headers = {
457
- ...this.getDefaultHeaders(),
458
- "App-Key": this.appKey
468
+ ...this.getDefaultHeaders()
459
469
  };
460
470
  if (authToken) {
461
471
  headers["Auth-Token"] = authToken;
@@ -479,7 +489,6 @@ var JrniClient = class extends ApiClient {
479
489
  {
480
490
  headers: {
481
491
  ...this.getDefaultHeaders(),
482
- "App-Key": this.appKey,
483
492
  "Auth-Token": authToken
484
493
  },
485
494
  params
@@ -497,8 +506,7 @@ var JrniClient = class extends ApiClient {
497
506
  request,
498
507
  {
499
508
  headers: {
500
- ...this.getDefaultHeaders(),
501
- "App-Key": this.appKey
509
+ ...this.getDefaultHeaders()
502
510
  }
503
511
  }
504
512
  );
@@ -517,7 +525,6 @@ var JrniClient = class extends ApiClient {
517
525
  {
518
526
  headers: {
519
527
  ...this.getDefaultHeaders(),
520
- "App-Key": this.appKey,
521
528
  "Auth-Token": authToken
522
529
  }
523
530
  }
@@ -537,7 +544,6 @@ var JrniClient = class extends ApiClient {
537
544
  {
538
545
  headers: {
539
546
  ...this.getDefaultHeaders(),
540
- "App-Key": this.appKey,
541
547
  "Auth-Token": authToken
542
548
  }
543
549
  }
@@ -555,7 +561,6 @@ var JrniClient = class extends ApiClient {
555
561
  {
556
562
  headers: {
557
563
  ...this.getDefaultHeaders(),
558
- "App-Key": this.appKey,
559
564
  "Auth-Token": authToken
560
565
  }
561
566
  }
@@ -566,7 +571,6 @@ var JrniClient = class extends ApiClient {
566
571
  */
567
572
  setJrniConfig(config) {
568
573
  if (config.appId) this.appId = config.appId;
569
- if (config.appKey) this.appKey = config.appKey;
570
574
  }
571
575
  };
572
576
  function createJrniClient(baseUrl, config) {
@@ -603,7 +607,7 @@ function ApiClientProvider({
603
607
  return new JrniClient(jrniBaseUrl, jrniConfig);
604
608
  }
605
609
  return null;
606
- }, [jrniBaseUrl, jrniConfig?.appId, jrniConfig?.appKey]);
610
+ }, [jrniBaseUrl, jrniConfig?.appId]);
607
611
  const value = react.useMemo(
608
612
  () => ({
609
613
  bookingLabClient,
@@ -647,7 +651,7 @@ var JrniContext = react.createContext(void 0);
647
651
  function JrniProvider({ children, baseUrl, config }) {
648
652
  const client = react.useMemo(() => {
649
653
  return new JrniClient(baseUrl, config);
650
- }, [baseUrl, config.appId, config.appKey]);
654
+ }, [baseUrl, config.appId]);
651
655
  const value = react.useMemo(() => ({ client }), [client]);
652
656
  return /* @__PURE__ */ jsxRuntime.jsx(JrniContext.Provider, { value, children });
653
657
  }
@@ -875,6 +879,15 @@ function useCancelBooking(companyId, bookingId, clientToken) {
875
879
  }
876
880
  });
877
881
  }
882
+ function useResetPassword(memberId, companyId, authToken, clientToken) {
883
+ const client = useBookingLabClient();
884
+ return reactQuery.useMutation({
885
+ mutationFn: async (request) => {
886
+ const response = await client.resetPassword(memberId, companyId, request, authToken, clientToken);
887
+ return response.data;
888
+ }
889
+ });
890
+ }
878
891
 
879
892
  exports.ApiClient = ApiClient;
880
893
  exports.ApiClientProvider = ApiClientProvider;
@@ -904,6 +917,7 @@ exports.useJrniContext = useJrniContext;
904
917
  exports.useListBookings = useListBookings;
905
918
  exports.useLogin = useLogin;
906
919
  exports.useQuestions = useQuestions;
920
+ exports.useResetPassword = useResetPassword;
907
921
  exports.useResources = useResources;
908
922
  exports.useServices = useServices;
909
923
  exports.useTimes = useTimes;