comic-vine-sdk 1.2.3 → 1.2.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/cjs/options/index.d.ts +2 -2
- package/dist/cjs/resources/common-types.d.ts +1 -1
- package/dist/cjs/resources/resource-factory.d.ts +1 -1
- package/dist/cjs/types/apply-override.d.ts +1 -1
- package/dist/cjs/types/iso-date.d.ts +6 -6
- package/dist/cjs/types/pick-filters.d.ts +3 -3
- package/dist/cjs/types/request.d.ts +1 -1
- package/dist/cjs/types/valueof.d.ts +1 -1
- package/dist/mjs/options/index.d.ts +2 -2
- package/dist/mjs/resources/common-types.d.ts +1 -1
- package/dist/mjs/resources/resource-factory.d.ts +1 -1
- package/dist/mjs/types/apply-override.d.ts +1 -1
- package/dist/mjs/types/iso-date.d.ts +6 -6
- package/dist/mjs/types/pick-filters.d.ts +3 -3
- package/dist/mjs/types/request.d.ts +1 -1
- package/dist/mjs/types/valueof.d.ts +1 -1
- package/package.json +17 -16
|
@@ -6,8 +6,8 @@ declare const options: z.ZodObject<{
|
|
|
6
6
|
}, {
|
|
7
7
|
baseUrl?: string | undefined;
|
|
8
8
|
}>;
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type userOptions = z.input<typeof options>;
|
|
10
|
+
export type Options = z.output<typeof options>;
|
|
11
11
|
export declare const loadOptions: (userOptions?: {
|
|
12
12
|
baseUrl?: string | undefined;
|
|
13
13
|
} | undefined) => {
|
|
@@ -4,5 +4,5 @@ export declare class ResourceFactory {
|
|
|
4
4
|
private urlBuilder;
|
|
5
5
|
private _resources;
|
|
6
6
|
constructor(httpClient: HttpClient, urlBuilder: UrlBuilder);
|
|
7
|
-
create<T extends keyof typeof this._resources>(name: T): InstanceType<typeof this._resources[T]>;
|
|
7
|
+
create<T extends keyof typeof this._resources>(name: T): InstanceType<(typeof this._resources)[T]>;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ApplyOverrides<OriginalType, Overrides> = Omit<OriginalType, keyof Overrides> & Overrides;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
1
|
+
type digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
2
|
+
type oneToNine = Exclude<digit, 0>;
|
|
3
|
+
type YYYY = `19${digit}${digit}` | `20${digit}${digit}`;
|
|
4
|
+
type MM = `0${oneToNine}` | `1${0 | 1 | 2}`;
|
|
5
|
+
type DD = `${0}${oneToNine}` | `${1 | 2}${digit}` | `3${0 | 1}`;
|
|
6
|
+
export type IsoDate = `${YYYY}-${MM}-${DD}`;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type KeysMatching<T, V> = {
|
|
2
2
|
[K in keyof T]-?: T[K] extends V ? K : never;
|
|
3
3
|
}[keyof T];
|
|
4
|
-
|
|
5
|
-
export
|
|
4
|
+
type PickMatching<T, V> = Pick<T, KeysMatching<T, V>>;
|
|
5
|
+
export type PickFilters<T> = Partial<PickMatching<T, number> & PickMatching<T, string | null>>;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface BaseOptions<FieldKey> {
|
|
2
2
|
fieldList?: FieldKey[];
|
|
3
3
|
}
|
|
4
|
-
export
|
|
4
|
+
export type RetrieveOptions<FieldKey> = BaseOptions<FieldKey>;
|
|
5
5
|
export interface ListOptions<FieldKey, Filter> extends BaseOptions<FieldKey> {
|
|
6
6
|
limit?: number;
|
|
7
7
|
offset?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ValueOf<T> = T[keyof T];
|
|
@@ -6,8 +6,8 @@ declare const options: z.ZodObject<{
|
|
|
6
6
|
}, {
|
|
7
7
|
baseUrl?: string | undefined;
|
|
8
8
|
}>;
|
|
9
|
-
export
|
|
10
|
-
export
|
|
9
|
+
export type userOptions = z.input<typeof options>;
|
|
10
|
+
export type Options = z.output<typeof options>;
|
|
11
11
|
export declare const loadOptions: (userOptions?: {
|
|
12
12
|
baseUrl?: string | undefined;
|
|
13
13
|
} | undefined) => {
|
|
@@ -4,5 +4,5 @@ export declare class ResourceFactory {
|
|
|
4
4
|
private urlBuilder;
|
|
5
5
|
private _resources;
|
|
6
6
|
constructor(httpClient: HttpClient, urlBuilder: UrlBuilder);
|
|
7
|
-
create<T extends keyof typeof this._resources>(name: T): InstanceType<typeof this._resources[T]>;
|
|
7
|
+
create<T extends keyof typeof this._resources>(name: T): InstanceType<(typeof this._resources)[T]>;
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ApplyOverrides<OriginalType, Overrides> = Omit<OriginalType, keyof Overrides> & Overrides;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
1
|
+
type digit = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9;
|
|
2
|
+
type oneToNine = Exclude<digit, 0>;
|
|
3
|
+
type YYYY = `19${digit}${digit}` | `20${digit}${digit}`;
|
|
4
|
+
type MM = `0${oneToNine}` | `1${0 | 1 | 2}`;
|
|
5
|
+
type DD = `${0}${oneToNine}` | `${1 | 2}${digit}` | `3${0 | 1}`;
|
|
6
|
+
export type IsoDate = `${YYYY}-${MM}-${DD}`;
|
|
7
7
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
type KeysMatching<T, V> = {
|
|
2
2
|
[K in keyof T]-?: T[K] extends V ? K : never;
|
|
3
3
|
}[keyof T];
|
|
4
|
-
|
|
5
|
-
export
|
|
4
|
+
type PickMatching<T, V> = Pick<T, KeysMatching<T, V>>;
|
|
5
|
+
export type PickFilters<T> = Partial<PickMatching<T, number> & PickMatching<T, string | null>>;
|
|
6
6
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface BaseOptions<FieldKey> {
|
|
2
2
|
fieldList?: FieldKey[];
|
|
3
3
|
}
|
|
4
|
-
export
|
|
4
|
+
export type RetrieveOptions<FieldKey> = BaseOptions<FieldKey>;
|
|
5
5
|
export interface ListOptions<FieldKey, Filter> extends BaseOptions<FieldKey> {
|
|
6
6
|
limit?: number;
|
|
7
7
|
offset?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type ValueOf<T> = T[keyof T];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "comic-vine-sdk",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
4
|
"description": "A JS/TS client for the Comic Vine API",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"comic",
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
"author": "Ally Murray",
|
|
21
21
|
"main": "dist/cjs/index.cjs.js",
|
|
22
22
|
"module": "dist/mjs/index.js",
|
|
23
|
+
"types": "dist/mjs/index.d.ts",
|
|
23
24
|
"exports": {
|
|
24
25
|
".": {
|
|
25
26
|
"import": "./dist/mjs/index.js",
|
|
@@ -44,32 +45,32 @@
|
|
|
44
45
|
"semantic-release": "semantic-release"
|
|
45
46
|
},
|
|
46
47
|
"dependencies": {
|
|
47
|
-
"axios": "
|
|
48
|
+
"axios": "1.3.4",
|
|
48
49
|
"clone-deep": "4.0.1",
|
|
49
|
-
"zod": "3.
|
|
50
|
+
"zod": "3.21.4"
|
|
50
51
|
},
|
|
51
52
|
"devDependencies": {
|
|
52
53
|
"@semantic-release/changelog": "6.0.2",
|
|
53
54
|
"@semantic-release/git": "10.0.1",
|
|
54
55
|
"@types/clone-deep": "4.0.1",
|
|
55
|
-
"@types/jest": "29.
|
|
56
|
+
"@types/jest": "29.5.0",
|
|
56
57
|
"@types/node": "16.11.59",
|
|
57
|
-
"@typescript-eslint/eslint-plugin": "5.
|
|
58
|
-
"@typescript-eslint/parser": "5.
|
|
59
|
-
"commitizen": "4.
|
|
58
|
+
"@typescript-eslint/eslint-plugin": "5.55.0",
|
|
59
|
+
"@typescript-eslint/parser": "5.55.0",
|
|
60
|
+
"commitizen": "4.3.0",
|
|
60
61
|
"cz-conventional-changelog": "3.3.0",
|
|
61
|
-
"eslint": "8.
|
|
62
|
-
"eslint-config-prettier": "8.
|
|
63
|
-
"husky": "8.0.
|
|
64
|
-
"jest": "29.
|
|
65
|
-
"lint-staged": "13.0
|
|
66
|
-
"nock": "13.
|
|
62
|
+
"eslint": "8.36.0",
|
|
63
|
+
"eslint-config-prettier": "8.7.0",
|
|
64
|
+
"husky": "8.0.3",
|
|
65
|
+
"jest": "29.5.0",
|
|
66
|
+
"lint-staged": "13.2.0",
|
|
67
|
+
"nock": "13.3.0",
|
|
67
68
|
"npm-run-all": "4.1.5",
|
|
68
|
-
"prettier": "2.
|
|
69
|
+
"prettier": "2.8.4",
|
|
69
70
|
"rimraf": "3.0.2",
|
|
70
71
|
"semantic-release": "^19.0.5",
|
|
71
|
-
"ts-jest": "29.0.
|
|
72
|
-
"typescript": "
|
|
72
|
+
"ts-jest": "29.0.5",
|
|
73
|
+
"typescript": "5.0.2"
|
|
73
74
|
},
|
|
74
75
|
"engines": {
|
|
75
76
|
"node": ">=14"
|