@aptly-as/types 1.6.0 → 1.6.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/core/app.d.ts CHANGED
@@ -15,10 +15,10 @@ export interface AptlyAppAuthorizeToken {
15
15
  aud: string;
16
16
  sub: string;
17
17
  }
18
- export interface AptlyAppWebContext {
18
+ export interface AptlyAppWebContext<S extends object> {
19
19
  organization: Pick<AptlyOrganization, '_id' | 'slug' | 'name'>;
20
20
  app: AptlyApp;
21
- config: AptlyOrganizationAppConfig;
21
+ config: AptlyOrganizationAppConfig<S>;
22
22
  theme: any;
23
23
  media: AptlyAppWebContextMedia;
24
24
  }
package/core/app.ts CHANGED
@@ -19,10 +19,10 @@ export interface AptlyAppAuthorizeToken {
19
19
  sub: string; // app_id
20
20
  }
21
21
 
22
- export interface AptlyAppWebContext {
22
+ export interface AptlyAppWebContext<S extends object> {
23
23
  organization: Pick<AptlyOrganization, '_id' | 'slug' | 'name'>;
24
24
  app: AptlyApp;
25
- config: AptlyOrganizationAppConfig;
25
+ config: AptlyOrganizationAppConfig<S>;
26
26
  theme: any;
27
27
  media: AptlyAppWebContextMedia;
28
28
  }
@@ -65,12 +65,9 @@ export interface AptlyOrganizationInviteSchema<ID, DATE> {
65
65
  claimTime?: DATE;
66
66
  };
67
67
  }
68
- export declare type AptlyOrganizationAppConfig = AptlyOrganizationAppConfigSchema<string, string>;
69
- export interface AptlyOrganizationAppConfigSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
68
+ export declare type AptlyOrganizationAppConfig<S extends object = object> = AptlyOrganizationAppConfigSchema<string, string, S>;
69
+ export interface AptlyOrganizationAppConfigSchema<ID, DATE, S extends object = object> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
70
70
  app: ID | AptlyAppSchema<ID, DATE>;
71
71
  scope: AptlyScope[];
72
- settings: AptlyOrganizationAppConfigSetting;
73
- }
74
- export interface AptlyOrganizationAppConfigSetting {
75
- [key: string]: string | number | boolean;
72
+ settings: S;
76
73
  }
@@ -80,14 +80,10 @@ export interface AptlyOrganizationInviteSchema<ID, DATE> {
80
80
  };
81
81
  }
82
82
 
83
- export type AptlyOrganizationAppConfig = AptlyOrganizationAppConfigSchema<string, string>;
83
+ export type AptlyOrganizationAppConfig<S extends object = object> = AptlyOrganizationAppConfigSchema<string, string, S>;
84
84
 
85
- export interface AptlyOrganizationAppConfigSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
85
+ export interface AptlyOrganizationAppConfigSchema<ID, DATE, S extends object = object> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
86
86
  app: ID | AptlyAppSchema<ID, DATE>;
87
87
  scope: AptlyScope[];
88
- settings: AptlyOrganizationAppConfigSetting;
88
+ settings: S;
89
89
  }
90
-
91
- export interface AptlyOrganizationAppConfigSetting {
92
- [key: string]: string | number | boolean;
93
- }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "1.6.0",
3
+ "version": "1.6.1",
4
4
  "description": "Aptly types and enums",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",