@livetronics/wocul-domain 1.0.0 → 1.2.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.
@@ -542,6 +542,59 @@ export interface paths {
542
542
  patch?: never;
543
543
  trace?: never;
544
544
  };
545
+ "/account/invitations": {
546
+ parameters: {
547
+ query?: never;
548
+ header?: never;
549
+ path?: never;
550
+ cookie?: never;
551
+ };
552
+ /**
553
+ * List the caller's pending project invitations across every organisation
554
+ * @description Every project invitation still waiting on the signed-in identity's
555
+ * answer, newest first, in every organisation — including ones the
556
+ * caller has not joined, whose placeholder Staff rows the organisation
557
+ * list leaves out. Read by identity (idUser), not by the ORGANISATION
558
+ * header. Only invitations that can still be answered are listed: the
559
+ * membership is INVITED, the invitee's Staff row is ACTIVE, and the
560
+ * project and its organisation are ACTIVE.
561
+ */
562
+ get: operations["listAccountInvitations"];
563
+ put?: never;
564
+ post?: never;
565
+ delete?: never;
566
+ options?: never;
567
+ head?: never;
568
+ patch?: never;
569
+ trace?: never;
570
+ };
571
+ "/account/invitations/{idProjectMember}/{action}": {
572
+ parameters: {
573
+ query?: never;
574
+ header?: never;
575
+ path?: never;
576
+ cookie?: never;
577
+ };
578
+ get?: never;
579
+ put?: never;
580
+ /**
581
+ * Accept or decline one of the caller's project invitations
582
+ * @description Answers an invitation listed by `GET /account/invitations`, from any
583
+ * organisation: the active organisation does not move. The invitation
584
+ * must be INVITED and held by a Staff row of the caller's own login;
585
+ * anything else (another user's invitation, one already answered, an
586
+ * archived project) answers 404 alike. Accepting an invitation into an
587
+ * organisation the caller has not joined also joins it and takes a seat
588
+ * there, refused with 429 when its member limit is reached, and with
589
+ * 403 while that organisation is read-only.
590
+ */
591
+ post: operations["answerAccountInvitation"];
592
+ delete?: never;
593
+ options?: never;
594
+ head?: never;
595
+ patch?: never;
596
+ trace?: never;
597
+ };
545
598
  "/account/name": {
546
599
  parameters: {
547
600
  query?: never;
@@ -10669,6 +10722,30 @@ export interface components {
10669
10722
  /** @description URL of the profile image */
10670
10723
  profileImageUrl?: string | null;
10671
10724
  };
10725
+ AccountInvitation: {
10726
+ idProjectMember?: number;
10727
+ idProject?: number;
10728
+ /** @description The project code (e.g. ALV27), as the invitation email states it */
10729
+ projectId?: string | null;
10730
+ projectName?: string;
10731
+ projectDescription?: string | null;
10732
+ projectAvatarUrl?: string | null;
10733
+ role?: string;
10734
+ /** Format: date-time */
10735
+ invitedAt?: string | null;
10736
+ organisation?: {
10737
+ idOrganisation?: number;
10738
+ name?: string;
10739
+ logo?: string | null;
10740
+ /** @description False when accepting is also what joins this organisation */
10741
+ isMember?: boolean;
10742
+ };
10743
+ invitedBy?: {
10744
+ name?: string;
10745
+ designation?: string | null;
10746
+ profileImageUrl?: string | null;
10747
+ } | null;
10748
+ };
10672
10749
  /**
10673
10750
  * @description Update the caller's canonical identity name. Cascades to User, every
10674
10751
  * non-removed Staff row for this person across every organisation they
@@ -13658,6 +13735,131 @@ export interface operations {
13658
13735
  };
13659
13736
  };
13660
13737
  };
13738
+ listAccountInvitations: {
13739
+ parameters: {
13740
+ query?: never;
13741
+ header: {
13742
+ /** @description The tenant type for the request */
13743
+ tenant: components["parameters"]["TenantHeader"];
13744
+ /** @description The platform making the request */
13745
+ platform: components["parameters"]["PlatformHeader"];
13746
+ /** @description The organisation ID */
13747
+ organisation: components["parameters"]["OrganisationHeader"];
13748
+ };
13749
+ path?: never;
13750
+ cookie?: never;
13751
+ };
13752
+ requestBody?: never;
13753
+ responses: {
13754
+ /** @description The caller's pending invitations */
13755
+ 200: {
13756
+ headers: {
13757
+ [name: string]: unknown;
13758
+ };
13759
+ content: {
13760
+ "application/json": components["schemas"]["ApiResponse"] & {
13761
+ data?: components["schemas"]["AccountInvitation"][];
13762
+ };
13763
+ };
13764
+ };
13765
+ /** @description Unauthorized */
13766
+ 401: {
13767
+ headers: {
13768
+ [name: string]: unknown;
13769
+ };
13770
+ content: {
13771
+ "application/json": components["schemas"]["ApiResponse"];
13772
+ };
13773
+ };
13774
+ };
13775
+ };
13776
+ answerAccountInvitation: {
13777
+ parameters: {
13778
+ query?: never;
13779
+ header: {
13780
+ /** @description The tenant type for the request */
13781
+ tenant: components["parameters"]["TenantHeader"];
13782
+ /** @description The platform making the request */
13783
+ platform: components["parameters"]["PlatformHeader"];
13784
+ /** @description The organisation ID */
13785
+ organisation: components["parameters"]["OrganisationHeader"];
13786
+ };
13787
+ path: {
13788
+ idProjectMember: number;
13789
+ action: "accept" | "decline";
13790
+ };
13791
+ cookie?: never;
13792
+ };
13793
+ requestBody?: never;
13794
+ responses: {
13795
+ /** @description Invitation answered */
13796
+ 200: {
13797
+ headers: {
13798
+ [name: string]: unknown;
13799
+ };
13800
+ content: {
13801
+ "application/json": components["schemas"]["ApiResponse"] & {
13802
+ data?: {
13803
+ idProjectMember?: number;
13804
+ idProject?: number;
13805
+ projectId?: string | null;
13806
+ idOrganisation?: number;
13807
+ /** @enum {string} */
13808
+ invitationStatus?: "ADDED" | "REJECTED";
13809
+ };
13810
+ };
13811
+ };
13812
+ };
13813
+ /** @description Invalid invitation id or action */
13814
+ 400: {
13815
+ headers: {
13816
+ [name: string]: unknown;
13817
+ };
13818
+ content: {
13819
+ "application/json": components["schemas"]["ApiResponse"];
13820
+ };
13821
+ };
13822
+ /** @description Unauthorized */
13823
+ 401: {
13824
+ headers: {
13825
+ [name: string]: unknown;
13826
+ };
13827
+ content: {
13828
+ "application/json": components["schemas"]["ApiResponse"];
13829
+ };
13830
+ };
13831
+ /**
13832
+ * @description Accepting is refused while the invitation's organisation is
13833
+ * read-only (inactive subscription). Declining is still allowed.
13834
+ */
13835
+ 403: {
13836
+ headers: {
13837
+ [name: string]: unknown;
13838
+ };
13839
+ content: {
13840
+ "application/json": components["schemas"]["ApiResponse"];
13841
+ };
13842
+ };
13843
+ /** @description Not one of the caller's pending invitations */
13844
+ 404: {
13845
+ headers: {
13846
+ [name: string]: unknown;
13847
+ };
13848
+ content: {
13849
+ "application/json": components["schemas"]["ApiResponse"];
13850
+ };
13851
+ };
13852
+ /** @description The organisation has reached its member limit */
13853
+ 429: {
13854
+ headers: {
13855
+ [name: string]: unknown;
13856
+ };
13857
+ content: {
13858
+ "application/json": components["schemas"]["ApiResponse"];
13859
+ };
13860
+ };
13861
+ };
13862
+ };
13661
13863
  updateAccountName: {
13662
13864
  parameters: {
13663
13865
  query?: never;