@content-island/api-client 0.8.1 → 0.8.3

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/dist/index.d.ts +9 -8
  2. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -11,25 +11,20 @@ export declare interface ApiClient {
11
11
  getRawContent: <M extends Model = Model & Record<string, any>>(queryParam: QueryParams<M>) => Promise<Content>;
12
12
  }
13
13
 
14
- export declare interface ApiLookup {
15
- id: string;
16
- name: string;
17
- }
18
-
19
14
  export declare type ClientFilter<Type = string> = Type | { in?: Type[] };
20
15
 
21
16
  export declare interface Content {
22
17
  id: string;
23
- contentType: ApiLookup;
18
+ contentType: Lookup;
24
19
  lastUpdate: Date;
25
20
  fields: Field[];
26
21
  }
27
22
 
28
- declare interface ContentType extends ApiLookup {
23
+ declare interface ContentType extends Lookup {
29
24
  fields: ContentTypeField[];
30
25
  }
31
26
 
32
- declare interface ContentTypeField extends ApiLookup {
27
+ declare interface ContentTypeField extends Lookup {
33
28
  type: FieldType;
34
29
  tsType: string;
35
30
  isArray: boolean;
@@ -57,8 +52,14 @@ export declare type FieldType =
57
52
  | 'date-time'
58
53
  | 'media'
59
54
  | 'boolean'
55
+ | 'color'
60
56
  | FieldEntityType;
61
57
 
58
+ export declare interface Lookup<ID = string> {
59
+ id: ID;
60
+ name: string;
61
+ }
62
+
62
63
  export declare const mapContentToModel: <M extends Model<Language> = Model<any> & Record<string, any>, Language = M["language"]>(content: Content, language?: Language) => M;
63
64
 
64
65
  export declare interface Media {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@content-island/api-client",
3
- "version": "0.8.1",
3
+ "version": "0.8.3",
4
4
  "description": "Content Island - REST API Client",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -29,6 +29,7 @@
29
29
  "test:watch": "vitest -c ./config/test/config.ts"
30
30
  },
31
31
  "devDependencies": {
32
- "@content-island/b2b-api-model": "*"
32
+ "@content-island/b2b-api-model": "*",
33
+ "@content-island/common": "*"
33
34
  }
34
35
  }