@rippling/rippling-sdk 0.2.0-alpha.24 → 0.2.0-alpha.25

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.
Files changed (68) hide show
  1. package/client.d.mts +2 -2
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +2 -2
  4. package/client.d.ts.map +1 -1
  5. package/client.js.map +1 -1
  6. package/client.mjs.map +1 -1
  7. package/functions.d.mts +3 -0
  8. package/functions.d.mts.map +1 -1
  9. package/functions.d.ts +3 -0
  10. package/functions.d.ts.map +1 -1
  11. package/functions.js.map +1 -1
  12. package/functions.mjs.map +1 -1
  13. package/package.json +1 -1
  14. package/resources/index.d.mts +1 -1
  15. package/resources/index.d.mts.map +1 -1
  16. package/resources/index.d.ts +1 -1
  17. package/resources/index.d.ts.map +1 -1
  18. package/resources/index.js.map +1 -1
  19. package/resources/index.mjs.map +1 -1
  20. package/resources/shiftassignments.d.mts +12 -6
  21. package/resources/shiftassignments.d.mts.map +1 -1
  22. package/resources/shiftassignments.d.ts +12 -6
  23. package/resources/shiftassignments.d.ts.map +1 -1
  24. package/resources/supergroups/exclusion-members.d.mts +2 -0
  25. package/resources/supergroups/exclusion-members.d.mts.map +1 -1
  26. package/resources/supergroups/exclusion-members.d.ts +2 -0
  27. package/resources/supergroups/exclusion-members.d.ts.map +1 -1
  28. package/resources/supergroups/exclusion-members.js +1 -0
  29. package/resources/supergroups/exclusion-members.js.map +1 -1
  30. package/resources/supergroups/exclusion-members.mjs +1 -0
  31. package/resources/supergroups/exclusion-members.mjs.map +1 -1
  32. package/resources/supergroups/inclusion-members.d.mts +2 -0
  33. package/resources/supergroups/inclusion-members.d.mts.map +1 -1
  34. package/resources/supergroups/inclusion-members.d.ts +2 -0
  35. package/resources/supergroups/inclusion-members.d.ts.map +1 -1
  36. package/resources/supergroups/inclusion-members.js +1 -0
  37. package/resources/supergroups/inclusion-members.js.map +1 -1
  38. package/resources/supergroups/inclusion-members.mjs +1 -0
  39. package/resources/supergroups/inclusion-members.mjs.map +1 -1
  40. package/resources/supergroups/members.d.mts +13 -0
  41. package/resources/supergroups/members.d.mts.map +1 -1
  42. package/resources/supergroups/members.d.ts +13 -0
  43. package/resources/supergroups/members.d.ts.map +1 -1
  44. package/resources/supergroups/members.js +1 -0
  45. package/resources/supergroups/members.js.map +1 -1
  46. package/resources/supergroups/members.mjs +1 -0
  47. package/resources/supergroups/members.mjs.map +1 -1
  48. package/resources/unassignedshifts.d.mts +348 -17
  49. package/resources/unassignedshifts.d.mts.map +1 -1
  50. package/resources/unassignedshifts.d.ts +348 -17
  51. package/resources/unassignedshifts.d.ts.map +1 -1
  52. package/resources/unassignedshifts.js +6 -0
  53. package/resources/unassignedshifts.js.map +1 -1
  54. package/resources/unassignedshifts.mjs +6 -0
  55. package/resources/unassignedshifts.mjs.map +1 -1
  56. package/src/client.ts +4 -0
  57. package/src/functions.ts +6 -0
  58. package/src/resources/index.ts +2 -0
  59. package/src/resources/shiftassignments.ts +12 -6
  60. package/src/resources/supergroups/exclusion-members.ts +3 -0
  61. package/src/resources/supergroups/inclusion-members.ts +3 -0
  62. package/src/resources/supergroups/members.ts +16 -0
  63. package/src/resources/unassignedshifts.ts +422 -19
  64. package/src/version.ts +1 -1
  65. package/version.d.mts +1 -1
  66. package/version.d.ts +1 -1
  67. package/version.js +1 -1
  68. package/version.mjs +1 -1
@@ -28,6 +28,16 @@ export class Unassignedshifts extends APIResource {
28
28
  });
29
29
  }
30
30
 
31
+ /**
32
+ * Create a new unassigned shift
33
+ */
34
+ create(
35
+ body: UnassignedshiftCreateParams,
36
+ options?: RequestOptions,
37
+ ): APIPromise<UnassignedshiftCreateResponse> {
38
+ return this._client.post('/unassignedshifts', { body, ...options });
39
+ }
40
+
31
41
  /**
32
42
  * Retrieve a specific unassigned shift
33
43
  */
@@ -48,21 +58,11 @@ export interface UnassignedshiftListResponse {
48
58
  */
49
59
  id: string;
50
60
 
51
- /**
52
- * The number of assigned shifts
53
- */
54
- assigned_count: number;
55
-
56
61
  /**
57
62
  * Record creation date
58
63
  */
59
64
  created_at: string;
60
65
 
61
- /**
62
- * Whether the shift is open or empty
63
- */
64
- is_open: boolean;
65
-
66
66
  /**
67
67
  * Whether the shift is published
68
68
  */
@@ -88,11 +88,22 @@ export interface UnassignedshiftListResponse {
88
88
  */
89
89
  updated_at: string;
90
90
 
91
+ /**
92
+ * The number of assigned shifts
93
+ */
94
+ assigned_count?: number;
95
+
91
96
  /**
92
97
  * The IDs of the assigned shifts that are part of this unassigned shift
93
98
  */
94
99
  assigned_shift_ids?: Array<string>;
95
100
 
101
+ /**
102
+ * Configuration for an open shift. If present, this is an open shift (workers can
103
+ * sign up). If absent/None, this is an empty shift (placeholder).
104
+ */
105
+ open_shift_config?: unknown;
106
+
96
107
  /**
97
108
  * The published version of the shift
98
109
  */
@@ -339,29 +350,317 @@ export namespace UnassignedshiftListResponse {
339
350
  }
340
351
  }
341
352
 
342
- /**
343
- * Meta information for the response.
344
- */
345
- export interface UnassignedshiftRetrieveResponse extends BusinessPartnersAPI.Meta {
353
+ export interface UnassignedshiftCreateResponse {
346
354
  /**
347
355
  * Identifier field
348
356
  */
349
357
  id: string;
350
358
 
359
+ /**
360
+ * Record creation date
361
+ */
362
+ created_at: string;
363
+
364
+ /**
365
+ * Whether the shift is published
366
+ */
367
+ is_published: boolean;
368
+
369
+ /**
370
+ * The ID of the schedule
371
+ */
372
+ schedule_id: string;
373
+
374
+ /**
375
+ * The data of the shift
376
+ */
377
+ shift_data: UnassignedshiftCreateResponse.ShiftData;
378
+
379
+ /**
380
+ * The target count of the shift
381
+ */
382
+ target_count: number;
383
+
384
+ /**
385
+ * Record update date
386
+ */
387
+ updated_at: string;
388
+
351
389
  /**
352
390
  * The number of assigned shifts
353
391
  */
354
- assigned_count: number;
392
+ assigned_count?: number;
355
393
 
356
394
  /**
357
- * Record creation date
395
+ * The IDs of the assigned shifts that are part of this unassigned shift
358
396
  */
359
- created_at: string;
397
+ assigned_shift_ids?: Array<string>;
360
398
 
361
399
  /**
362
- * Whether the shift is open or empty
400
+ * Configuration for an open shift. If present, this is an open shift (workers can
401
+ * sign up). If absent/None, this is an empty shift (placeholder).
402
+ */
403
+ open_shift_config?: unknown;
404
+
405
+ /**
406
+ * The published version of the shift
407
+ */
408
+ published_version?: UnassignedshiftCreateResponse.PublishedVersion;
409
+
410
+ /**
411
+ * The schedule
412
+ *
413
+ * Expandable field
363
414
  */
364
- is_open: boolean;
415
+ schedule?: UnassignedshiftCreateResponse.Schedule;
416
+ }
417
+
418
+ export namespace UnassignedshiftCreateResponse {
419
+ /**
420
+ * The data of the shift
421
+ */
422
+ export interface ShiftData {
423
+ /**
424
+ * The end time of the shift
425
+ */
426
+ end_time: string;
427
+
428
+ /**
429
+ * The start time of the shift
430
+ */
431
+ start_time: string;
432
+
433
+ /**
434
+ * The breaks of the shift
435
+ */
436
+ shift_breaks?: Array<ShiftData.ShiftBreak>;
437
+
438
+ /**
439
+ * The segments of the shift
440
+ */
441
+ shift_segments?: Array<ShiftData.ShiftSegment>;
442
+ }
443
+
444
+ export namespace ShiftData {
445
+ export interface ShiftBreak {
446
+ /**
447
+ * The duration of the shift break in minutes (input only for creation)
448
+ */
449
+ duration_minutes: number;
450
+
451
+ /**
452
+ * The start time of the shift break
453
+ */
454
+ start_time: string;
455
+
456
+ /**
457
+ * The type of the shift break
458
+ */
459
+ type: 'MEAL' | 'REST';
460
+
461
+ /**
462
+ * The end time of the shift break (calculated from start_time + duration_minutes)
463
+ */
464
+ end_time?: string;
465
+ }
466
+
467
+ export interface ShiftSegment {
468
+ /**
469
+ * The duration of the shift segment in minutes (input only for creation)
470
+ */
471
+ duration_minutes: number;
472
+
473
+ /**
474
+ * The start time of the shift segment
475
+ */
476
+ start_time: string;
477
+
478
+ /**
479
+ * The end time of the shift segment (calculated from start_time +
480
+ * duration_minutes)
481
+ */
482
+ end_time?: string;
483
+
484
+ /**
485
+ * The IDs of the job codes associated with the shift segment
486
+ */
487
+ job_codes_id?: Array<string>;
488
+ }
489
+ }
490
+
491
+ /**
492
+ * The published version of the shift
493
+ */
494
+ export interface PublishedVersion {
495
+ /**
496
+ * The end time of the shift
497
+ */
498
+ end_time: string;
499
+
500
+ /**
501
+ * The start time of the shift
502
+ */
503
+ start_time: string;
504
+
505
+ /**
506
+ * The breaks of the shift
507
+ */
508
+ shift_breaks?: Array<PublishedVersion.ShiftBreak>;
509
+
510
+ /**
511
+ * The segments of the shift
512
+ */
513
+ shift_segments?: Array<PublishedVersion.ShiftSegment>;
514
+ }
515
+
516
+ export namespace PublishedVersion {
517
+ export interface ShiftBreak {
518
+ /**
519
+ * The duration of the shift break in minutes (input only for creation)
520
+ */
521
+ duration_minutes: number;
522
+
523
+ /**
524
+ * The start time of the shift break
525
+ */
526
+ start_time: string;
527
+
528
+ /**
529
+ * The type of the shift break
530
+ */
531
+ type: 'MEAL' | 'REST';
532
+
533
+ /**
534
+ * The end time of the shift break (calculated from start_time + duration_minutes)
535
+ */
536
+ end_time?: string;
537
+ }
538
+
539
+ export interface ShiftSegment {
540
+ /**
541
+ * The duration of the shift segment in minutes (input only for creation)
542
+ */
543
+ duration_minutes: number;
544
+
545
+ /**
546
+ * The start time of the shift segment
547
+ */
548
+ start_time: string;
549
+
550
+ /**
551
+ * The end time of the shift segment (calculated from start_time +
552
+ * duration_minutes)
553
+ */
554
+ end_time?: string;
555
+
556
+ /**
557
+ * The IDs of the job codes associated with the shift segment
558
+ */
559
+ job_codes_id?: Array<string>;
560
+ }
561
+ }
562
+
563
+ /**
564
+ * The schedule
565
+ *
566
+ * Expandable field
567
+ */
568
+ export interface Schedule {
569
+ /**
570
+ * Identifier field
571
+ */
572
+ id: string;
573
+
574
+ /**
575
+ * Record creation date
576
+ */
577
+ created_at: string;
578
+
579
+ /**
580
+ * Record update date
581
+ */
582
+ updated_at: string;
583
+
584
+ /**
585
+ * Whether the requesting role can edit the schedule.
586
+ */
587
+ can_edit?: boolean;
588
+
589
+ /**
590
+ * The managers of the schedule.
591
+ *
592
+ * Expandable field
593
+ */
594
+ managers?: Array<WorkersAPI.Worker>;
595
+
596
+ /**
597
+ * The IDs of the managers of the schedule.
598
+ */
599
+ managers_id?: Array<string>;
600
+
601
+ /**
602
+ * The members of the schedule.
603
+ *
604
+ * Expandable field
605
+ */
606
+ members?: Array<WorkersAPI.Worker>;
607
+
608
+ /**
609
+ * The IDs of the members of the schedule.
610
+ */
611
+ members_id?: Array<string>;
612
+
613
+ /**
614
+ * The name of the schedule.
615
+ */
616
+ name?: string;
617
+
618
+ /**
619
+ * The observers of the schedule.
620
+ *
621
+ * Expandable field
622
+ */
623
+ observers?: Array<WorkersAPI.Worker>;
624
+
625
+ /**
626
+ * The IDs of the observers of the schedule.
627
+ */
628
+ observers_id?: Array<string>;
629
+
630
+ /**
631
+ * The settings of the schedule.
632
+ */
633
+ settings?: Schedule.Settings;
634
+ }
635
+
636
+ export namespace Schedule {
637
+ /**
638
+ * The settings of the schedule.
639
+ */
640
+ export interface Settings {
641
+ /**
642
+ * The IANA timezone identifier for the schedule (e.g., 'America/New_York').
643
+ * Accepted values are defined by the tz database, listed here:
644
+ * https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
645
+ */
646
+ timezone?: string;
647
+ }
648
+ }
649
+ }
650
+
651
+ /**
652
+ * Meta information for the response.
653
+ */
654
+ export interface UnassignedshiftRetrieveResponse extends BusinessPartnersAPI.Meta {
655
+ /**
656
+ * Identifier field
657
+ */
658
+ id: string;
659
+
660
+ /**
661
+ * Record creation date
662
+ */
663
+ created_at: string;
365
664
 
366
665
  /**
367
666
  * Whether the shift is published
@@ -388,11 +687,22 @@ export interface UnassignedshiftRetrieveResponse extends BusinessPartnersAPI.Met
388
687
  */
389
688
  updated_at: string;
390
689
 
690
+ /**
691
+ * The number of assigned shifts
692
+ */
693
+ assigned_count?: number;
694
+
391
695
  /**
392
696
  * The IDs of the assigned shifts that are part of this unassigned shift
393
697
  */
394
698
  assigned_shift_ids?: Array<string>;
395
699
 
700
+ /**
701
+ * Configuration for an open shift. If present, this is an open shift (workers can
702
+ * sign up). If absent/None, this is an empty shift (placeholder).
703
+ */
704
+ open_shift_config?: unknown;
705
+
396
706
  /**
397
707
  * The published version of the shift
398
708
  */
@@ -649,6 +959,97 @@ export interface UnassignedshiftListParams {
649
959
  order_by?: string;
650
960
  }
651
961
 
962
+ export interface UnassignedshiftCreateParams {
963
+ /**
964
+ * Whether the shift is published
965
+ */
966
+ is_published: boolean;
967
+
968
+ /**
969
+ * The ID of the schedule
970
+ */
971
+ schedule_id: string;
972
+
973
+ /**
974
+ * The data of the shift
975
+ */
976
+ shift_data: UnassignedshiftCreateParams.ShiftData;
977
+
978
+ /**
979
+ * The target count of the shift
980
+ */
981
+ target_count: number;
982
+
983
+ /**
984
+ * Configuration for an open shift. If present, this is an open shift (workers can
985
+ * sign up). If absent/None, this is an empty shift (placeholder).
986
+ */
987
+ open_shift_config?: unknown;
988
+ }
989
+
990
+ export namespace UnassignedshiftCreateParams {
991
+ /**
992
+ * The data of the shift
993
+ */
994
+ export interface ShiftData {
995
+ /**
996
+ * The end time of the shift
997
+ */
998
+ end_time: string;
999
+
1000
+ /**
1001
+ * The start time of the shift
1002
+ */
1003
+ start_time: string;
1004
+
1005
+ /**
1006
+ * The breaks of the shift
1007
+ */
1008
+ shift_breaks?: Array<ShiftData.ShiftBreak>;
1009
+
1010
+ /**
1011
+ * The segments of the shift
1012
+ */
1013
+ shift_segments?: Array<ShiftData.ShiftSegment>;
1014
+ }
1015
+
1016
+ export namespace ShiftData {
1017
+ export interface ShiftBreak {
1018
+ /**
1019
+ * The duration of the shift break in minutes (input only for creation)
1020
+ */
1021
+ duration_minutes: number;
1022
+
1023
+ /**
1024
+ * The start time of the shift break
1025
+ */
1026
+ start_time: string;
1027
+
1028
+ /**
1029
+ * The type of the shift break
1030
+ */
1031
+ type: 'MEAL' | 'REST';
1032
+ }
1033
+
1034
+ export interface ShiftSegment {
1035
+ /**
1036
+ * The duration of the shift segment in minutes (input only for creation)
1037
+ */
1038
+ duration_minutes: number;
1039
+
1040
+ /**
1041
+ * The start time of the shift segment
1042
+ */
1043
+ start_time: string;
1044
+
1045
+ /**
1046
+ * The IDs of the job codes associated with the shift segment
1047
+ */
1048
+ job_codes_id?: Array<string>;
1049
+ }
1050
+ }
1051
+ }
1052
+
652
1053
  export interface UnassignedshiftRetrieveParams {
653
1054
  expand?: string;
654
1055
  }
@@ -656,9 +1057,11 @@ export interface UnassignedshiftRetrieveParams {
656
1057
  export declare namespace Unassignedshifts {
657
1058
  export {
658
1059
  type UnassignedshiftListResponse as UnassignedshiftListResponse,
1060
+ type UnassignedshiftCreateResponse as UnassignedshiftCreateResponse,
659
1061
  type UnassignedshiftRetrieveResponse as UnassignedshiftRetrieveResponse,
660
1062
  type UnassignedshiftListResponsesPageCursorURL as UnassignedshiftListResponsesPageCursorURL,
661
1063
  type UnassignedshiftListParams as UnassignedshiftListParams,
1064
+ type UnassignedshiftCreateParams as UnassignedshiftCreateParams,
662
1065
  type UnassignedshiftRetrieveParams as UnassignedshiftRetrieveParams,
663
1066
  };
664
1067
  }
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.2.0-alpha.24'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.25'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.0-alpha.24";
1
+ export declare const VERSION = "0.2.0-alpha.25";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.2.0-alpha.24";
1
+ export declare const VERSION = "0.2.0-alpha.25";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.2.0-alpha.24'; // x-release-please-version
4
+ exports.VERSION = '0.2.0-alpha.25'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.2.0-alpha.24'; // x-release-please-version
1
+ export const VERSION = '0.2.0-alpha.25'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map