@worknice/js-sdk 0.11.8 → 0.11.9-rc.2

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.
@@ -357,6 +357,7 @@ type BasicAbnFormTemplate = Template & {
357
357
  id: Scalars['ID']['output'];
358
358
  name: Scalars['String']['output'];
359
359
  org: Org;
360
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
360
361
  paperworkSummaries: Array<PaperworkSummary>;
361
362
  /** @deprecated Unused. */
362
363
  templateParameters: Array<TemplateParameter>;
@@ -437,6 +438,7 @@ type BasicBankAccountFormTemplate = Template & {
437
438
  id: Scalars['ID']['output'];
438
439
  name: Scalars['String']['output'];
439
440
  org: Org;
441
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
440
442
  paperworkSummaries: Array<PaperworkSummary>;
441
443
  /** @deprecated Unused. */
442
444
  templateParameters: Array<TemplateParameter>;
@@ -531,6 +533,7 @@ type BasicEmergencyContactFormTemplate = Template & {
531
533
  id: Scalars['ID']['output'];
532
534
  name: Scalars['String']['output'];
533
535
  org: Org;
536
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
534
537
  paperworkSummaries: Array<PaperworkSummary>;
535
538
  /** @deprecated Unused. */
536
539
  templateParameters: Array<TemplateParameter>;
@@ -608,6 +611,7 @@ type BasicPersonalDetailsFormTemplate = Template & {
608
611
  id: Scalars['ID']['output'];
609
612
  name: Scalars['String']['output'];
610
613
  org: Org;
614
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
611
615
  paperworkSummaries: Array<PaperworkSummary>;
612
616
  /** @deprecated Unused. */
613
617
  templateParameters: Array<TemplateParameter>;
@@ -671,6 +675,7 @@ type BasicPreEmploymentFormTemplate = Template & {
671
675
  introduction?: Maybe<Scalars['String']['output']>;
672
676
  name: Scalars['String']['output'];
673
677
  org: Org;
678
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
674
679
  paperworkSummaries: Array<PaperworkSummary>;
675
680
  /** @deprecated Unused. */
676
681
  templateParameters: Array<TemplateParameter>;
@@ -743,6 +748,7 @@ type BasicSuperFormTemplate = Template & {
743
748
  id: Scalars['ID']['output'];
744
749
  name: Scalars['String']['output'];
745
750
  org: Org;
751
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
746
752
  paperworkSummaries: Array<PaperworkSummary>;
747
753
  /** @deprecated Unused. */
748
754
  templateParameters: Array<TemplateParameter>;
@@ -809,6 +815,7 @@ type BasicTaxFormTemplate = Template & {
809
815
  id: Scalars['ID']['output'];
810
816
  name: Scalars['String']['output'];
811
817
  org: Org;
818
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
812
819
  paperworkSummaries: Array<PaperworkSummary>;
813
820
  /** @deprecated Unused. */
814
821
  templateParameters: Array<TemplateParameter>;
@@ -838,6 +845,7 @@ type Bundle = {
838
845
  id: Scalars['ID']['output'];
839
846
  name: Scalars['String']['output'];
840
847
  org: Org;
848
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
841
849
  paperworkSummaries: Array<PaperworkSummary>;
842
850
  updatedAt: Scalars['DateTime']['output'];
843
851
  };
@@ -929,6 +937,7 @@ type CertificateTemplate = Template & {
929
937
  issueDatePresence: FieldPresence;
930
938
  name: Scalars['String']['output'];
931
939
  org: Org;
940
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
932
941
  paperworkSummaries: Array<PaperworkSummary>;
933
942
  proof: CertificateProof;
934
943
  /** @deprecated Unused. */
@@ -1144,6 +1153,7 @@ type DocumentTemplate = Template & {
1144
1153
  id: Scalars['ID']['output'];
1145
1154
  name: Scalars['String']['output'];
1146
1155
  org: Org;
1156
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
1147
1157
  paperworkSummaries: Array<PaperworkSummary>;
1148
1158
  /** @deprecated Use 'fields' instead. */
1149
1159
  templateParameters: Array<TemplateParameter>;
@@ -1730,6 +1740,7 @@ type KeypayEmployeeFormTemplate = Template & {
1730
1740
  mobilePhonePresence: FieldPresence;
1731
1741
  name: Scalars['String']['output'];
1732
1742
  org: Org;
1743
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
1733
1744
  paperworkSummaries: Array<PaperworkSummary>;
1734
1745
  personalDetailsPresence: FieldPresence;
1735
1746
  superPresence: FieldPresence;
@@ -3553,6 +3564,7 @@ type Org = {
3553
3564
  locations: Array<Location>;
3554
3565
  logo?: Maybe<Media>;
3555
3566
  name: Scalars['String']['output'];
3567
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
3556
3568
  paperworkSummaries: Array<PaperworkSummary>;
3557
3569
  people: Array<Maybe<Person>>;
3558
3570
  positions: Array<Position>;
@@ -3639,7 +3651,16 @@ type PaperworkAssignmentNotificationsArgs = {
3639
3651
  includeRead?: InputMaybe<Scalars['Boolean']['input']>;
3640
3652
  personId: Scalars['ID']['input'];
3641
3653
  };
3642
- /** The summary of a person and template (a.k.a. a "paperwork type"). */
3654
+ /**
3655
+ * The intersection of a person and template. Most usefully, this provides a `status` that
3656
+ * explains relationship between each person and template (e.g. "missing" if the templates needs
3657
+ * to be assigned to the person or "expired" if the person's most recent assignment that belongs to
3658
+ * that template has expired).
3659
+ *
3660
+ * Note: A paperwork summary will never be returned for a "not required" case — when the template
3661
+ * is not marked as required for the person and the person does not have any assignments that belong
3662
+ * to the template.
3663
+ */
3643
3664
  type PaperworkSummary = {
3644
3665
  /** @deprecated Use the 'latestAssignment' field instead. */
3645
3666
  canonical?: Maybe<PaperworkAssignment>;
@@ -3668,36 +3689,62 @@ type PaperworkSummary = {
3668
3689
  * The status of a paperwork summary is determined using the following algorithm:
3669
3690
  *
3670
3691
  * 1. Let _person_ be the person associated with this paperwork summary.
3692
+ *
3671
3693
  * 2. Let _template_ be the template associated with this paperwork summary.
3694
+ *
3672
3695
  * 3. Let _latest assignment_ be the most recently created assignment where the
3673
- * owner is _person_ and the template is _template_.
3696
+ * owner is _person_ and the template is _template_.
3697
+ *
3674
3698
  * 4. If _latest assignment_ is not null:
3675
- * 1. If the status of _latest assignment_ is `DRAFT`:
3699
+ *
3700
+ * 1. If the status of _latest assignment_ is `DRAFT`:
3701
+ *
3676
3702
  * 1. If _latest assignment_ has 1 or more approvals (with any status):
3677
- * 1. If all the approvals on _latest assignment_ have an "approved"
3703
+ *
3704
+ * 1. If all the approvals on _latest assignment_ have an "approved"
3678
3705
  * status:
3706
+ *
3679
3707
  * 1. Return `APPROVED`.
3680
- * 2. Return `PENDING_APPROVAL`.
3708
+ * 2. Return `PENDING_APPROVAL`.
3709
+ *
3681
3710
  * 2. Return `DRAFT`.
3682
- * 2. If the status of _latest assignment_ is `ASSIGNED`:
3711
+ *
3712
+ * 2. If the status of _latest assignment_ is `ASSIGNED`:
3713
+ *
3683
3714
  * 1. If the current date is after the due date of _latest assignment_:
3684
- * 1. Return `OVERDUE`.
3715
+ *
3716
+ * 1. Return `OVERDUE`.
3717
+ *
3685
3718
  * 2. If the current date is after the due date of _latest assignment_
3686
- * minus 14 days:
3687
- * 1. Return `DUE_SOON`.
3719
+ * minus 14 days:
3720
+ *
3721
+ * 1. Return `DUE_SOON`.
3688
3722
  * 3. Return `ASSIGNED`.
3689
- * 3. If the status of _latest assignment_ is `SUBMITTED`:
3723
+ *
3724
+ * 3. If the status of _latest assignment_ is `SUBMITTED`:
3725
+ *
3690
3726
  * 1. Return `SUBMITTED`.
3691
- * 4. If the _template_ is marked as required for _person_:
3727
+ *
3728
+ * 4. If the _template_ is marked as required for _person_:
3729
+ *
3692
3730
  * 1. If the expiry status of _latest assignment_ is `EXPIRED` or
3693
3731
  * `RECENTLY_EXPIRED`:
3694
- * 1. Return `EXPIRED`.
3732
+ *
3733
+ * 1. Return `EXPIRED`.
3734
+ *
3695
3735
  * 2. If the expiry status of _latest assignment_ is `EXPIRING_SOON`:
3696
- * 1. Return `EXPIRING_SOON`.
3736
+ *
3737
+ * 1. Return `EXPIRING_SOON`.
3738
+ *
3697
3739
  * 3. Return `PROCESSED`.
3698
- * 5. Return `PROCESSED`.
3740
+ *
3741
+ * 5. Return `PROCESSED`.
3742
+ *
3699
3743
  * 5. If the _template_ is marked as required for _person_:
3700
- * 1. Return `MISSING`.
3744
+ *
3745
+ * 1. Return `MISSING`.
3746
+ *
3747
+ * 6. Return nothing. (This is the "not required" condition — a paperwork summary will not exist and therefore a status is not required.)
3701
3748
  */
3702
3749
  declare enum PaperworkSummaryStatus {
3703
3750
  Approved = "APPROVED",
@@ -3816,6 +3863,7 @@ type Person = {
3816
3863
  notificationsUser?: Maybe<User>;
3817
3864
  org: Org;
3818
3865
  otherGivenNames?: Maybe<Scalars['String']['output']>;
3866
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
3819
3867
  paperworkSummaries: Array<PaperworkSummary>;
3820
3868
  payPeriod?: Maybe<PayPeriod>;
3821
3869
  payRate?: Maybe<Scalars['Decimal']['output']>;
@@ -4628,6 +4676,7 @@ type QuestionnaireTemplate = Template & {
4628
4676
  instructions?: Maybe<Scalars['String']['output']>;
4629
4677
  name: Scalars['String']['output'];
4630
4678
  org: Org;
4679
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
4631
4680
  paperworkSummaries: Array<PaperworkSummary>;
4632
4681
  questions: Array<QuestionnaireTemplateQuestion>;
4633
4682
  /** @deprecated Unused. */
@@ -4879,6 +4928,7 @@ type StandardReviewTemplate = Template & {
4879
4928
  id: Scalars['ID']['output'];
4880
4929
  name: Scalars['String']['output'];
4881
4930
  org: Org;
4931
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
4882
4932
  paperworkSummaries: Array<PaperworkSummary>;
4883
4933
  questions: Array<StandardReviewTemplateQuestion>;
4884
4934
  reviewerInstructions?: Maybe<Scalars['Markdown']['output']>;
@@ -4974,6 +5024,7 @@ type TaskTemplate = Template & {
4974
5024
  id: Scalars['ID']['output'];
4975
5025
  name: Scalars['String']['output'];
4976
5026
  org: Org;
5027
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
4977
5028
  paperworkSummaries: Array<PaperworkSummary>;
4978
5029
  /** @deprecated Unused. */
4979
5030
  templateParameters: Array<TemplateParameter>;
@@ -5006,6 +5057,7 @@ type Template = {
5006
5057
  id: Scalars['ID']['output'];
5007
5058
  name: Scalars['String']['output'];
5008
5059
  org: Org;
5060
+ /** Paperwork summaries are only returned for paperwork that can be summarised (the person has at least one assignment for the template or the template is marked as required for the person). */
5009
5061
  paperworkSummaries: Array<PaperworkSummary>;
5010
5062
  /** @deprecated Unused. */
5011
5063
  templateParameters: Array<TemplateParameter>;