@malevich-studio/strapi-sdk-typescript 1.0.3 → 1.0.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/cli.cjs +22278 -0
- package/dist/cli.cjs.map +1 -0
- package/dist/cli.d.ts +0 -1
- package/dist/cli.mjs +22258 -0
- package/dist/cli.mjs.map +1 -0
- package/dist/generate-strapi-types.d.ts +1 -1
- package/dist/generator/attributes/base-relation.d.ts +2 -1
- package/dist/generator/attributes/blocks.d.ts +2 -1
- package/dist/generator/attributes/boolean.d.ts +2 -1
- package/dist/generator/attributes/component.d.ts +2 -2
- package/dist/generator/attributes/date-time.d.ts +2 -1
- package/dist/generator/attributes/enumeration.d.ts +2 -1
- package/dist/generator/attributes/index.d.ts +2 -1
- package/dist/generator/attributes/json.d.ts +3 -2
- package/dist/generator/attributes/media.d.ts +3 -2
- package/dist/generator/attributes/number.d.ts +2 -1
- package/dist/generator/attributes/relation.d.ts +2 -2
- package/dist/generator/attributes/string.d.ts +2 -1
- package/dist/generator/index.d.ts +5 -0
- package/dist/index.cjs +21309 -0
- package/dist/index.cjs.map +1 -0
- package/dist/{main.d.ts → index.d.ts} +55 -7
- package/dist/index.mjs +21307 -0
- package/dist/index.mjs.map +1 -0
- package/dist/test.cjs +114 -0
- package/dist/test.cjs.map +1 -0
- package/dist/test.d.ts +1 -0
- package/dist/test.mjs +112 -0
- package/dist/test.mjs.map +1 -0
- package/package.json +27 -8
- package/dist/cli.js +0 -10
- package/dist/generate-strapi-types.js +0 -205
- package/dist/generator/attributes/base-relation.js +0 -56
- package/dist/generator/attributes/base.js +0 -53
- package/dist/generator/attributes/blocks.js +0 -29
- package/dist/generator/attributes/boolean.js +0 -17
- package/dist/generator/attributes/component.js +0 -36
- package/dist/generator/attributes/date-time.js +0 -17
- package/dist/generator/attributes/enumeration.js +0 -17
- package/dist/generator/attributes/index.js +0 -40
- package/dist/generator/attributes/json.js +0 -20
- package/dist/generator/attributes/media.js +0 -29
- package/dist/generator/attributes/number.js +0 -17
- package/dist/generator/attributes/relation.js +0 -66
- package/dist/generator/attributes/string.js +0 -17
- package/dist/generator/utils/get-component-name.js +0 -13
- package/dist/generator/utils/get-content-type-name.js +0 -18
- package/dist/main.js +0 -67
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import Base, { AttributeMode
|
|
1
|
+
import Base, { AttributeMode } from "@/generator/attributes/base";
|
|
2
|
+
import type { BaseAttribute } from "@/generator/attributes/base";
|
|
2
3
|
export default class BaseRelation extends Base {
|
|
3
4
|
protected readonly name: string;
|
|
4
5
|
protected readonly attribute: BaseAttribute;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseAttribute, FieldType } from "
|
|
2
|
-
import BaseRelation from "
|
|
1
|
+
import type { BaseAttribute, FieldType } from "@/generator/attributes/base";
|
|
2
|
+
import BaseRelation from "@/generator/attributes/base-relation";
|
|
3
3
|
export type ComponentAttribute = BaseAttribute & {
|
|
4
4
|
type: 'component';
|
|
5
5
|
repeatable: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import Base
|
|
1
|
+
import Base from "@/generator/attributes/base";
|
|
2
|
+
import type { BaseAttribute } from "@/generator/attributes/base";
|
|
2
3
|
export default function getAttributeGenerator(name: string, attribute: BaseAttribute & {
|
|
3
4
|
type: string;
|
|
4
5
|
}): Base;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import Base
|
|
1
|
+
import Base from "@/generator/attributes/base";
|
|
2
|
+
import type { BaseAttribute } from "@/generator/attributes/base";
|
|
2
3
|
export type JsonAttribute = BaseAttribute & {
|
|
3
4
|
type: 'json';
|
|
4
5
|
};
|
|
@@ -7,5 +8,5 @@ export default class Json extends Base {
|
|
|
7
8
|
protected readonly attribute: JsonAttribute;
|
|
8
9
|
constructor(name: string, attribute: JsonAttribute);
|
|
9
10
|
getType(): string;
|
|
10
|
-
getFilters():
|
|
11
|
+
getFilters(): never[];
|
|
11
12
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseAttribute } from "
|
|
2
|
-
import BaseRelation from "
|
|
1
|
+
import type { BaseAttribute } from "@/generator/attributes/base";
|
|
2
|
+
import BaseRelation from "@/generator/attributes/base-relation";
|
|
3
3
|
export type MediaAttribute = BaseAttribute & {
|
|
4
4
|
type: 'media';
|
|
5
5
|
multiple: boolean;
|
|
@@ -10,6 +10,7 @@ export default class Media extends BaseRelation {
|
|
|
10
10
|
protected readonly attribute: MediaAttribute;
|
|
11
11
|
constructor(name: string, attribute: MediaAttribute);
|
|
12
12
|
getType(): "File[]" | "File";
|
|
13
|
+
getInputType(): string;
|
|
13
14
|
getPopulates(): {
|
|
14
15
|
name: string;
|
|
15
16
|
type: string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import Base
|
|
1
|
+
import Base from "@/generator/attributes/base";
|
|
2
|
+
import type { BaseAttribute } from "@/generator/attributes/base";
|
|
2
3
|
export type NumberAttribute = BaseAttribute & {
|
|
3
4
|
type: 'integer' | 'biginteger' | 'decimal';
|
|
4
5
|
min?: number;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { BaseAttribute } from "
|
|
2
|
-
import BaseRelation from "
|
|
1
|
+
import type { BaseAttribute } from "@/generator/attributes/base";
|
|
2
|
+
import BaseRelation from "@/generator/attributes/base-relation";
|
|
3
3
|
export declare enum AttributeRelation {
|
|
4
4
|
MorphToMany = "morphToMany",
|
|
5
5
|
ManyToOne = "manyToOne",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import Base
|
|
1
|
+
import Base from "@/generator/attributes/base";
|
|
2
|
+
import type { BaseAttribute } from "@/generator/attributes/base";
|
|
2
3
|
export type StringAttribute = BaseAttribute & {
|
|
3
4
|
type: 'text' | 'string' | 'password' | 'email';
|
|
4
5
|
minLength?: number;
|