@enonic-types/core 8.0.0-A2 → 8.0.0-A3

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 (2) hide show
  1. package/index.d.ts +11 -2
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -206,7 +206,7 @@ export type RequestBranch = 'draft' | 'master';
206
206
  export type RequestGetHeaderFunction = (headerName: string) => string | null;
207
207
  export type RequestMethod = 'GET' | 'POST' | ' HEAD' | 'OPTIONS' | ' PUT' | 'DELETE' | 'PATCH' | 'TRACE' | 'CONNECT';
208
208
  export type RequestMode = 'edit' | 'inline' | 'live' | 'preview' | 'admin';
209
- export type RequestParams = Record<string, string | string[]>;
209
+ export type RequestParams = Record<string, string | string[] | undefined>;
210
210
  export type RequestScheme = 'http' | 'https';
211
211
 
212
212
  export type RequestCookies = Record<string, string | undefined>;
@@ -295,6 +295,7 @@ export interface RequestConstructorParams {
295
295
  url: string;
296
296
  validTicket?: boolean;
297
297
  webSocket: boolean;
298
+ locales: string[];
298
299
  }
299
300
 
300
301
  export interface RequestInterface
@@ -341,7 +342,7 @@ export interface PageContributions {
341
342
  bodyEnd?: string[];
342
343
  }
343
344
 
344
- export type ResponseBody = unknown[] | Record<string, unknown> | boolean | number | string | null | ByteSource;
345
+ export type ResponseBody = unknown[] | object | boolean | number | string | null | ByteSource;
345
346
 
346
347
  export interface MappedResponse {
347
348
  applyFilters: boolean;
@@ -512,6 +513,8 @@ export type RoleKey = `role:${string}`;
512
513
 
513
514
  export type PrincipalKey = UserKey | GroupKey | RoleKey;
514
515
 
516
+ export type PrincipalType = 'user' | 'group' | 'role';
517
+
515
518
  export interface User {
516
519
  type: 'user';
517
520
  key: UserKey;
@@ -1276,3 +1279,9 @@ export interface FormItemFormFragment {
1276
1279
  }
1277
1280
 
1278
1281
  export type FormItem = FormItemSet | FormItemLayout | FormItemOptionSet | FormItemInput | FormItemFormFragment;
1282
+
1283
+ export type ConfigValue = string | number | boolean | ConfigObject | ConfigValue[];
1284
+
1285
+ export interface ConfigObject {
1286
+ [key: string]: ConfigValue
1287
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@enonic-types/core",
3
- "version": "8.0.0-A2",
3
+ "version": "8.0.0-A3",
4
4
  "description": "Shared type definition for core libraries.",
5
5
  "types": "index.d.ts",
6
6
  "files": [