@appsemble/types 0.36.10 → 0.37.1

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
@@ -1,9 +1,9 @@
1
- # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.36.10/config/assets/logo.svg) Appsemble Types
1
+ # ![](https://gitlab.com/appsemble/appsemble/-/raw/0.37.1/config/assets/logo.svg) Appsemble Types
2
2
 
3
3
  > Reusable TypeScript types
4
4
 
5
5
  [![npm](https://img.shields.io/npm/v/@appsemble/types)](https://www.npmjs.com/package/@appsemble/types)
6
- [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.36.10/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.36.10)
6
+ [![GitLab CI](https://gitlab.com/appsemble/appsemble/badges/0.37.1/pipeline.svg)](https://gitlab.com/appsemble/appsemble/-/releases/0.37.1)
7
7
  [![Prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
8
8
 
9
9
  ## Table of Contents
@@ -26,5 +26,5 @@ not guaranteed.
26
26
 
27
27
  ## License
28
28
 
29
- [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.36.10/LICENSE.md) ©
29
+ [LGPL-3.0-only](https://gitlab.com/appsemble/appsemble/-/blob/0.37.1/LICENSE.md) ©
30
30
  [Appsemble](https://appsemble.com)
package/index.d.ts CHANGED
@@ -70,12 +70,26 @@ export interface BaseUserInfo {
70
70
  zoneinfo?: string;
71
71
  }
72
72
  export interface UserInfo extends BaseUserInfo {
73
+ /**
74
+ * External group values associated with the user.
75
+ */
76
+ groups?: string[];
73
77
  /**
74
78
  * If the user is subscribed to the newsletter
75
79
  */
76
80
  subscribed?: boolean;
77
81
  hasPassword?: boolean;
78
82
  }
83
+ export interface AppLoginRoleMapping {
84
+ /**
85
+ * The exact external group value to match.
86
+ */
87
+ group: string;
88
+ /**
89
+ * The app role to assign when the group matches.
90
+ */
91
+ role: AppRole;
92
+ }
79
93
  export interface SSOConfiguration {
80
94
  type: 'oauth2' | 'saml';
81
95
  url: string;
@@ -805,6 +819,10 @@ export interface AppOAuth2Secret extends OAuth2Provider {
805
819
  * The remapper to apply on the user info data.
806
820
  */
807
821
  remapper: Remapper;
822
+ /**
823
+ * Optional exact external-group to app-role mappings.
824
+ */
825
+ roleMappings?: AppLoginRoleMapping[];
808
826
  }
809
827
  export interface WritableAppSamlSecret {
810
828
  /**
@@ -832,9 +850,25 @@ export interface WritableAppSamlSecret {
832
850
  */
833
851
  nameAttribute: string;
834
852
  /**
835
- * The custom SAML attribute thats used to specify the user email address.
853
+ * The custom SAML attribute that's used to specify the user email address.
836
854
  */
837
855
  emailAttribute: string;
856
+ /**
857
+ * The custom SAML attribute that's used to specify whether the user's email address is verified.
858
+ */
859
+ emailVerifiedAttribute?: string;
860
+ /**
861
+ * The custom SAML attribute that contains the external groups for the user.
862
+ */
863
+ groupAttribute?: string;
864
+ /**
865
+ * The custom SAML attribute that's used to specify the external user identifier.
866
+ */
867
+ objectIdAttribute?: string;
868
+ /**
869
+ * Optional exact external-group to app-role mappings.
870
+ */
871
+ roleMappings?: AppLoginRoleMapping[];
838
872
  }
839
873
  export interface AppSamlSecret extends WritableAppSamlSecret {
840
874
  /**
@@ -850,7 +884,7 @@ export interface AppSamlSecret extends WritableAppSamlSecret {
850
884
  */
851
885
  spCertificate?: string;
852
886
  }
853
- export type SAMLStatus = 'badsignature' | 'emailconflict' | 'invalidrelaystate' | 'invalidsecret' | 'invalidstatuscode' | 'invalidsubjectconfirmation' | 'missingnameid' | 'missingsubject';
887
+ export type SAMLStatus = 'badsignature' | 'emailconflict' | 'invalidrelaystate' | 'invalidsecret' | 'invalidstatuscode' | 'invalidsubjectconfirmation' | 'missingnameid' | 'missingsubject' | 'noRoleMatch';
854
888
  export interface ProjectBuildConfig extends ProjectConfig {
855
889
  /**
856
890
  * The build output directory relative to the project directory.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@appsemble/types",
3
- "version": "0.36.10",
3
+ "version": "0.37.1",
4
4
  "description": "TypeScript definitions reused within Appsemble internally",
5
5
  "keywords": [
6
6
  "app",
@@ -40,7 +40,7 @@
40
40
  "test": "vitest"
41
41
  },
42
42
  "dependencies": {
43
- "@appsemble/lang-sdk": "0.36.10",
43
+ "@appsemble/lang-sdk": "0.37.1",
44
44
  "@fortawesome/fontawesome-common-types": "^6.0.0",
45
45
  "react": "^18.0.0"
46
46
  }
package/resource.d.ts CHANGED
@@ -34,6 +34,10 @@ export interface Resource {
34
34
  * The user who last updated the resource.
35
35
  */
36
36
  $editor?: ResourceAuthor;
37
+ /**
38
+ * The opaque version token of the resource.
39
+ */
40
+ $etag?: string;
37
41
  /**
38
42
  * The app group that this resource is scoped to.
39
43
  */