@jwork-space/strapi-sdk 1.0.2 → 1.0.4
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.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +63 -64
package/dist/index.d.mts
CHANGED
|
@@ -254,6 +254,7 @@ interface FilterTypesCustom {
|
|
|
254
254
|
$containsi?: string;
|
|
255
255
|
$notContainsi?: string;
|
|
256
256
|
$null?: boolean;
|
|
257
|
+
$notNull?: boolean;
|
|
257
258
|
$between?: AnyObject[];
|
|
258
259
|
$lte?: number | string;
|
|
259
260
|
$lt?: number | string;
|
|
@@ -269,7 +270,8 @@ type OperatorsCustom<T> = T extends object ? {
|
|
|
269
270
|
$in?: string[] | number[];
|
|
270
271
|
} : {};
|
|
271
272
|
type FilterParametersCustom<T> = {
|
|
272
|
-
[K in keyof T as T[K] extends (...arguments_: AnyValue[]) => AnyValue ? never : K]?: T[K] extends
|
|
273
|
+
[K in keyof T as T[K] extends (...arguments_: AnyValue[]) => AnyValue ? never : K]?: NonNullable<T[K]> extends infer Property ? Property extends Array<AnyValue> | ReadonlyArray<AnyValue> ? FilterParametersCustom<ElementOf<Property>> | ElementOf<Property> | number : Property extends object ? FilterParametersCustom<Property> | number : // Si es primitivo -> valor directo o filtro
|
|
274
|
+
FilterTypesCustom | Property : never;
|
|
273
275
|
} & OperatorsCustom<T>;
|
|
274
276
|
interface RequestData {
|
|
275
277
|
query?: AnyObject & {
|
package/dist/index.d.ts
CHANGED
|
@@ -254,6 +254,7 @@ interface FilterTypesCustom {
|
|
|
254
254
|
$containsi?: string;
|
|
255
255
|
$notContainsi?: string;
|
|
256
256
|
$null?: boolean;
|
|
257
|
+
$notNull?: boolean;
|
|
257
258
|
$between?: AnyObject[];
|
|
258
259
|
$lte?: number | string;
|
|
259
260
|
$lt?: number | string;
|
|
@@ -269,7 +270,8 @@ type OperatorsCustom<T> = T extends object ? {
|
|
|
269
270
|
$in?: string[] | number[];
|
|
270
271
|
} : {};
|
|
271
272
|
type FilterParametersCustom<T> = {
|
|
272
|
-
[K in keyof T as T[K] extends (...arguments_: AnyValue[]) => AnyValue ? never : K]?: T[K] extends
|
|
273
|
+
[K in keyof T as T[K] extends (...arguments_: AnyValue[]) => AnyValue ? never : K]?: NonNullable<T[K]> extends infer Property ? Property extends Array<AnyValue> | ReadonlyArray<AnyValue> ? FilterParametersCustom<ElementOf<Property>> | ElementOf<Property> | number : Property extends object ? FilterParametersCustom<Property> | number : // Si es primitivo -> valor directo o filtro
|
|
274
|
+
FilterTypesCustom | Property : never;
|
|
273
275
|
} & OperatorsCustom<T>;
|
|
274
276
|
interface RequestData {
|
|
275
277
|
query?: AnyObject & {
|
package/dist/index.js
CHANGED
|
@@ -797,7 +797,7 @@ var StrapiSDK = class extends BaseAPI {
|
|
|
797
797
|
getInvalidateKeys(method, opt) {
|
|
798
798
|
const defaultKeys = this.defaultInvalidateKeys?.[method] ?? [[]];
|
|
799
799
|
const extraKeys = opt?.invalidateKeys ?? [];
|
|
800
|
-
return [...defaultKeys, ...extraKeys
|
|
800
|
+
return [...defaultKeys, ...extraKeys];
|
|
801
801
|
}
|
|
802
802
|
async findOrCreate(data, optFind, optPayload, serializeOptionsPayload) {
|
|
803
803
|
const exist = await this.finOneEntity(optFind);
|
package/dist/index.mjs
CHANGED
|
@@ -748,7 +748,7 @@ var StrapiSDK = class extends BaseAPI {
|
|
|
748
748
|
getInvalidateKeys(method, opt) {
|
|
749
749
|
const defaultKeys = this.defaultInvalidateKeys?.[method] ?? [[]];
|
|
750
750
|
const extraKeys = opt?.invalidateKeys ?? [];
|
|
751
|
-
return [...defaultKeys, ...extraKeys
|
|
751
|
+
return [...defaultKeys, ...extraKeys];
|
|
752
752
|
}
|
|
753
753
|
async findOrCreate(data, optFind, optPayload, serializeOptionsPayload) {
|
|
754
754
|
const exist = await this.finOneEntity(optFind);
|
package/package.json
CHANGED
|
@@ -1,67 +1,66 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
"
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
"
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"assets": [
|
|
56
|
-
"package.json"
|
|
57
|
-
],
|
|
58
|
-
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
61
|
-
]
|
|
62
|
-
},
|
|
63
|
-
"files": [
|
|
64
|
-
"dist",
|
|
65
|
-
"README.md"
|
|
2
|
+
"name": "@jwork-space/strapi-sdk",
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"description": "SDK para Strapi con soporte para React Query y TypeScript",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"module": "dist/index.mjs",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"author": "Roman Ernesto Gonzalez Alas, Jonathan Fernando González Ramos",
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://gitlab.com/Jona11/strapi-sdk"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public"
|
|
16
|
+
},
|
|
17
|
+
"engines": {
|
|
18
|
+
"node": ">=18.0.0"
|
|
19
|
+
},
|
|
20
|
+
"peerDependencies": {
|
|
21
|
+
"@tanstack/react-query": ">=5.90.0",
|
|
22
|
+
"antd": ">=5.0.0",
|
|
23
|
+
"axios": ">=1.7.0",
|
|
24
|
+
"dayjs": ">=1.11.10",
|
|
25
|
+
"qs": ">=6.11.0",
|
|
26
|
+
"react": ">=18.0.0",
|
|
27
|
+
"react-dom": ">=18.0.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@semantic-release/git": "^10.0.1",
|
|
31
|
+
"@semantic-release/gitlab": "^13.2.9",
|
|
32
|
+
"@semantic-release/npm": "^13.1.2",
|
|
33
|
+
"@types/qs": "^6.14.0",
|
|
34
|
+
"@types/react": "^19.2.2",
|
|
35
|
+
"@types/react-dom": "^19.2.2",
|
|
36
|
+
"semantic-release": "^25.0.2",
|
|
37
|
+
"tsup": "^8.5.0",
|
|
38
|
+
"typescript": "^5.9.3"
|
|
39
|
+
},
|
|
40
|
+
"release": {
|
|
41
|
+
"plugins": [
|
|
42
|
+
"@semantic-release/commit-analyzer",
|
|
43
|
+
"@semantic-release/release-notes-generator",
|
|
44
|
+
"@semantic-release/npm",
|
|
45
|
+
"@semantic-release/gitlab",
|
|
46
|
+
[
|
|
47
|
+
"@semantic-release/git",
|
|
48
|
+
{
|
|
49
|
+
"assets": [
|
|
50
|
+
"package.json"
|
|
51
|
+
],
|
|
52
|
+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
|
|
53
|
+
}
|
|
54
|
+
]
|
|
66
55
|
]
|
|
56
|
+
},
|
|
57
|
+
"files": [
|
|
58
|
+
"dist",
|
|
59
|
+
"README.md"
|
|
60
|
+
],
|
|
61
|
+
"scripts": {
|
|
62
|
+
"build": "tsup src/index.ts --format esm,cjs --dts",
|
|
63
|
+
"dev": "tsup src/index.ts --format esm,cjs --dts --watch",
|
|
64
|
+
"semantic-release": "semantic-release"
|
|
65
|
+
}
|
|
67
66
|
}
|