rotacloud 2.3.13 → 2.3.14

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/main.d.ts CHANGED
@@ -250,4 +250,23 @@ export declare const createRotaCloudClient: (config: import("./interfaces/sdk-co
250
250
  }) => import("./ops.js").RequestConfig<typeof userSpec, import("./interfaces/user-v2.interface.js").CreateUserResponse>;
251
251
  };
252
252
  };
253
+ onboarding: {
254
+ endpoint: "users/onboard";
255
+ endpointVersion: "v2";
256
+ operations: ("create" | "update")[];
257
+ customOperations: {
258
+ update: ({ request, service }: import("./ops.js").OperationContext, onboardingInfoForm: import("./interfaces/onboarding.interface.js").UpdateUserWithOnboardingInfo) => import("./ops.js").RequestConfig<typeof onboardingInfoForm, void>;
259
+ create: ({ request, service }: import("./ops.js").OperationContext, addOrOnboard: import("./interfaces/onboarding.interface.js").AddOrOnboard) => import("./ops.js").RequestConfig<typeof addOrOnboard, void>;
260
+ };
261
+ };
262
+ resendOnboardingLink: {
263
+ endpoint: "users/onboard/resend";
264
+ endpointVersion: "v2";
265
+ operations: "create"[];
266
+ customOperations: {
267
+ create: ({ request, service }: import("./ops.js").OperationContext, entity: {
268
+ id: number;
269
+ }) => import("./ops.js").RequestConfig<void, void>;
270
+ };
271
+ };
253
272
  }>;
package/dist/service.d.ts CHANGED
@@ -11,6 +11,7 @@ import { LogbookEntry, LogbookQueryParameters } from './interfaces/logbook.inter
11
11
  import { Message } from './interfaces/message.interface.js';
12
12
  import { Invoice, InvoiceDownload } from './interfaces/invoice.interface.js';
13
13
  import { CreateUserRequest, CreateUserResponse } from './interfaces/user-v2.interface.js';
14
+ import { AddOrOnboard, UpdateUserWithOnboardingInfo } from './interfaces/onboarding.interface.js';
14
15
  export type ServiceSpecification<CustomOp extends OpDef<unknown> = OpDef<any>> = {
15
16
  /** Operations allowed and usable for the endpoint */
16
17
  operations: Operation[];
@@ -294,4 +295,23 @@ export declare const SERVICES: {
294
295
  }) => RequestConfig<typeof userSpec, CreateUserResponse>;
295
296
  };
296
297
  };
298
+ onboarding: {
299
+ endpoint: "users/onboard";
300
+ endpointVersion: "v2";
301
+ operations: ("create" | "update")[];
302
+ customOperations: {
303
+ update: ({ request, service }: OperationContext, onboardingInfoForm: UpdateUserWithOnboardingInfo) => RequestConfig<typeof onboardingInfoForm, void>;
304
+ create: ({ request, service }: OperationContext, addOrOnboard: AddOrOnboard) => RequestConfig<typeof addOrOnboard, void>;
305
+ };
306
+ };
307
+ resendOnboardingLink: {
308
+ endpoint: "users/onboard/resend";
309
+ endpointVersion: "v2";
310
+ operations: "create"[];
311
+ customOperations: {
312
+ create: ({ request, service }: OperationContext, entity: {
313
+ id: number;
314
+ }) => RequestConfig<void, void>;
315
+ };
316
+ };
297
317
  };
package/dist/service.js CHANGED
@@ -394,38 +394,35 @@ export const SERVICES = {
394
394
  }),
395
395
  },
396
396
  },
397
- // onboarding: {
398
- // endpoint: 'users/onboard',
399
- // endpointVersion: 'v2',
400
- // operations: ['update', 'create'],
401
- // customOperations: {
402
- // update: (
403
- // { request, service },
404
- // onboardingInfoForm: UpdateUserWithOnboardingInfo,
405
- // ): RequestConfig<typeof onboardingInfoForm, void> => ({
406
- // ...request,
407
- // url: `${service.endpointVersion}/${service.endpoint}`,
408
- // method: 'PATCH',
409
- // data: onboardingInfoForm,
410
- // }),
411
- // create: ({ request, service }, addOrOnboard: AddOrOnboard): RequestConfig<typeof addOrOnboard, void> => ({
412
- // ...request,
413
- // url: `${service.endpointVersion}/${service.endpoint}`,
414
- // method: 'POST',
415
- // data: addOrOnboard,
416
- // }),
417
- // },
418
- // },
419
- // resendOnboardingLink: {
420
- // endpoint: 'users/onboard/resend',
421
- // endpointVersion: 'v2',
422
- // operations: ['create'],
423
- // customOperations: {
424
- // create: ({ request, service }, entity: { id: number }): RequestConfig<void, void> => ({
425
- // ...request,
426
- // url: `${service.endpointVersion}/${service.endpoint}/${entity.id}/resend`,
427
- // method: 'POST',
428
- // }),
429
- // },
430
- // },
397
+ onboarding: {
398
+ endpoint: 'users/onboard',
399
+ endpointVersion: 'v2',
400
+ operations: ['update', 'create'],
401
+ customOperations: {
402
+ update: ({ request, service }, onboardingInfoForm) => ({
403
+ ...request,
404
+ url: `${service.endpointVersion}/${service.endpoint}`,
405
+ method: 'PATCH',
406
+ data: onboardingInfoForm,
407
+ }),
408
+ create: ({ request, service }, addOrOnboard) => ({
409
+ ...request,
410
+ url: `${service.endpointVersion}/${service.endpoint}`,
411
+ method: 'POST',
412
+ data: addOrOnboard,
413
+ }),
414
+ },
415
+ },
416
+ resendOnboardingLink: {
417
+ endpoint: 'users/onboard/resend',
418
+ endpointVersion: 'v2',
419
+ operations: ['create'],
420
+ customOperations: {
421
+ create: ({ request, service }, entity) => ({
422
+ ...request,
423
+ url: `${service.endpointVersion}/${service.endpoint}/${entity.id}/resend`,
424
+ method: 'POST',
425
+ }),
426
+ },
427
+ },
431
428
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rotacloud",
3
- "version": "2.3.13",
3
+ "version": "2.3.14",
4
4
  "description": "The RotaCloud SDK for the RotaCloud API",
5
5
  "type": "module",
6
6
  "engines": {
package/src/service.ts CHANGED
@@ -517,38 +517,38 @@ export const SERVICES = {
517
517
  }),
518
518
  },
519
519
  },
520
- // onboarding: {
521
- // endpoint: 'users/onboard',
522
- // endpointVersion: 'v2',
523
- // operations: ['update', 'create'],
524
- // customOperations: {
525
- // update: (
526
- // { request, service },
527
- // onboardingInfoForm: UpdateUserWithOnboardingInfo,
528
- // ): RequestConfig<typeof onboardingInfoForm, void> => ({
529
- // ...request,
530
- // url: `${service.endpointVersion}/${service.endpoint}`,
531
- // method: 'PATCH',
532
- // data: onboardingInfoForm,
533
- // }),
534
- // create: ({ request, service }, addOrOnboard: AddOrOnboard): RequestConfig<typeof addOrOnboard, void> => ({
535
- // ...request,
536
- // url: `${service.endpointVersion}/${service.endpoint}`,
537
- // method: 'POST',
538
- // data: addOrOnboard,
539
- // }),
540
- // },
541
- // },
542
- // resendOnboardingLink: {
543
- // endpoint: 'users/onboard/resend',
544
- // endpointVersion: 'v2',
545
- // operations: ['create'],
546
- // customOperations: {
547
- // create: ({ request, service }, entity: { id: number }): RequestConfig<void, void> => ({
548
- // ...request,
549
- // url: `${service.endpointVersion}/${service.endpoint}/${entity.id}/resend`,
550
- // method: 'POST',
551
- // }),
552
- // },
553
- // },
520
+ onboarding: {
521
+ endpoint: 'users/onboard',
522
+ endpointVersion: 'v2',
523
+ operations: ['update', 'create'],
524
+ customOperations: {
525
+ update: (
526
+ { request, service },
527
+ onboardingInfoForm: UpdateUserWithOnboardingInfo,
528
+ ): RequestConfig<typeof onboardingInfoForm, void> => ({
529
+ ...request,
530
+ url: `${service.endpointVersion}/${service.endpoint}`,
531
+ method: 'PATCH',
532
+ data: onboardingInfoForm,
533
+ }),
534
+ create: ({ request, service }, addOrOnboard: AddOrOnboard): RequestConfig<typeof addOrOnboard, void> => ({
535
+ ...request,
536
+ url: `${service.endpointVersion}/${service.endpoint}`,
537
+ method: 'POST',
538
+ data: addOrOnboard,
539
+ }),
540
+ },
541
+ },
542
+ resendOnboardingLink: {
543
+ endpoint: 'users/onboard/resend',
544
+ endpointVersion: 'v2',
545
+ operations: ['create'],
546
+ customOperations: {
547
+ create: ({ request, service }, entity: { id: number }): RequestConfig<void, void> => ({
548
+ ...request,
549
+ url: `${service.endpointVersion}/${service.endpoint}/${entity.id}/resend`,
550
+ method: 'POST',
551
+ }),
552
+ },
553
+ },
554
554
  } satisfies Record<string, ServiceSpecification>;