@content-island/api-client 0.8.2 → 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 +21 -8
  2. package/package.json +3 -2
package/dist/index.d.ts CHANGED
@@ -1,7 +1,3 @@
1
- import { FieldType } from '@content-island/common';
2
- import { Lookup } from '@content-island/common';
3
- import { Media } from '@content-island/common';
4
-
5
1
  declare type AllowedQueryKeys<M extends Model = Model> = keyof Pick<
6
2
  Query<M>,
7
3
  'id' | 'contentType' | 'language' | Extract<keyof Query<M>, `fields.${string}`>
@@ -46,13 +42,30 @@ export declare interface Field {
46
42
  language: string;
47
43
  }
48
44
 
49
- export { FieldType }
50
-
51
- export { Lookup }
45
+ declare type FieldEntityType = `${string}|${string}`;
46
+
47
+ export declare type FieldType =
48
+ | 'short-text'
49
+ | 'long-text'
50
+ | 'number'
51
+ | 'date'
52
+ | 'date-time'
53
+ | 'media'
54
+ | 'boolean'
55
+ | 'color'
56
+ | FieldEntityType;
57
+
58
+ export declare interface Lookup<ID = string> {
59
+ id: ID;
60
+ name: string;
61
+ }
52
62
 
53
63
  export declare const mapContentToModel: <M extends Model<Language> = Model<any> & Record<string, any>, Language = M["language"]>(content: Content, language?: Language) => M;
54
64
 
55
- export { Media }
65
+ export declare interface Media {
66
+ name: string;
67
+ url: string;
68
+ }
56
69
 
57
70
  export declare type Model<Language = string> = {
58
71
  id: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@content-island/api-client",
3
- "version": "0.8.2",
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
  }