@content-island/vscode-api-client 0.1.4 → 0.1.5
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/dist/index.d.ts +8 -8
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as vscode from 'vscode';
|
|
2
2
|
|
|
3
|
-
declare type
|
|
4
|
-
[K in keyof M as IsPrimitive<NonNullable<M[K]>> extends true ? `fields.${string & K}` : never]?:
|
|
3
|
+
declare type AllowedFields<M extends Model, Type extends 'sort' | 'filter'> = Partial<Omit<{
|
|
4
|
+
[K in keyof M as IsPrimitive<NonNullable<M[K]>> extends true ? `fields.${string & K}` : never]?: Type extends 'sort' ? SortOrder : ClientFilter<NonNullable<M[K]>>;
|
|
5
5
|
}, 'fields.id' | 'fields.language'>>;
|
|
6
6
|
|
|
7
7
|
declare interface ApiClient {
|
|
@@ -20,7 +20,7 @@ declare interface BaseModel {
|
|
|
20
20
|
type: ModelType;
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export declare type ClientFilter<Type = string | boolean> = Type | {
|
|
23
|
+
export declare type ClientFilter<Type = string | boolean | number> = Type | {
|
|
24
24
|
in?: Type[];
|
|
25
25
|
ne?: Type;
|
|
26
26
|
};
|
|
@@ -99,12 +99,12 @@ export declare type FieldType =
|
|
|
99
99
|
| RelatedModelType;
|
|
100
100
|
|
|
101
101
|
declare type FilterableFields<M extends Model = Model> = {
|
|
102
|
-
id?: ClientFilter
|
|
103
|
-
lastUpdate?: ClientFilter
|
|
102
|
+
id?: ClientFilter<string>;
|
|
103
|
+
lastUpdate?: ClientFilter<string>;
|
|
104
104
|
language?: M['language'];
|
|
105
|
-
contentType?: ClientFilter
|
|
105
|
+
contentType?: ClientFilter<string>;
|
|
106
106
|
includeRelatedContent?: boolean;
|
|
107
|
-
} &
|
|
107
|
+
} & AllowedFields<M, 'filter'>;
|
|
108
108
|
|
|
109
109
|
declare type IsPrimitive<T> = [T] extends [string | number | boolean] ? true : false;
|
|
110
110
|
|
|
@@ -344,7 +344,7 @@ declare type RelatedModelType = `${string}|${string}`;
|
|
|
344
344
|
declare type SortableFields<M extends Model> = {
|
|
345
345
|
contentType?: SortOrder;
|
|
346
346
|
lastUpdate?: SortOrder;
|
|
347
|
-
} &
|
|
347
|
+
} & AllowedFields<M, 'sort'>;
|
|
348
348
|
|
|
349
349
|
declare type SortOrder = 'asc' | 'desc';
|
|
350
350
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@content-island/vscode-api-client",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Content Island - VSCode Extension API Client",
|
|
5
5
|
"private": false,
|
|
6
6
|
"sideEffects": false,
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"test:watch": "vitest -c ./config/test/config.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@content-island/api-client": "0.
|
|
35
|
+
"@content-island/api-client": "0.17.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@content-island/common-backend": "*",
|