@malevich-studio/strapi-sdk-typescript 1.2.25 → 1.2.27
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/package.json +1 -1
- package/dist/cli.cjs +0 -22552
- package/dist/cli.cjs.map +0 -1
- package/dist/cli.d.ts +0 -1
- package/dist/cli.mjs +0 -22532
- package/dist/cli.mjs.map +0 -1
- package/dist/generator/attributes/base-relation.d.ts +0 -11
- package/dist/generator/attributes/base.d.ts +0 -27
- package/dist/generator/attributes/blocks.d.ts +0 -13
- package/dist/generator/attributes/boolean.d.ts +0 -11
- package/dist/generator/attributes/component.d.ts +0 -20
- package/dist/generator/attributes/date-time.d.ts +0 -11
- package/dist/generator/attributes/date.d.ts +0 -11
- package/dist/generator/attributes/dynamiczone.d.ts +0 -18
- package/dist/generator/attributes/enumeration.d.ts +0 -13
- package/dist/generator/attributes/index.d.ts +0 -5
- package/dist/generator/attributes/json.d.ts +0 -12
- package/dist/generator/attributes/media.d.ts +0 -22
- package/dist/generator/attributes/number.d.ts +0 -13
- package/dist/generator/attributes/relation.d.ts +0 -48
- package/dist/generator/attributes/string.d.ts +0 -14
- package/dist/generator/attributes/time.d.ts +0 -11
- package/dist/generator/index.d.ts +0 -5
- package/dist/generator/utils/get-component-name.d.ts +0 -5
- package/dist/generator/utils/get-content-type-name.d.ts +0 -5
- package/dist/index.cjs +0 -21475
- package/dist/index.cjs.map +0 -1
- package/dist/index.d.ts +0 -198
- package/dist/index.mjs +0 -21473
- package/dist/index.mjs.map +0 -1
- package/dist/logger.d.ts +0 -2
- package/dist/server.d.ts +0 -10
package/dist/index.d.ts
DELETED
|
@@ -1,198 +0,0 @@
|
|
|
1
|
-
type RelationData = {
|
|
2
|
-
documentId: string;
|
|
3
|
-
before?: string;
|
|
4
|
-
after?: string;
|
|
5
|
-
start?: true;
|
|
6
|
-
end?: true;
|
|
7
|
-
locale?: string;
|
|
8
|
-
status?: 'published' | 'draft';
|
|
9
|
-
} | string;
|
|
10
|
-
type RelationInput = {
|
|
11
|
-
connect?: RelationData[];
|
|
12
|
-
disconnect?: RelationData[];
|
|
13
|
-
set?: RelationData[];
|
|
14
|
-
} | RelationData[];
|
|
15
|
-
|
|
16
|
-
type Permissions = {
|
|
17
|
-
[key: string]: {
|
|
18
|
-
controllers: {
|
|
19
|
-
[key: string]: {
|
|
20
|
-
[key: string]: {
|
|
21
|
-
enabled: boolean;
|
|
22
|
-
policy: string;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
};
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
type PermissionAction = 'find' | 'findOne' | 'create' | 'update' | 'delete';
|
|
29
|
-
type SuccessResponse<T> = {
|
|
30
|
-
data: T;
|
|
31
|
-
meta: {
|
|
32
|
-
pagination: {
|
|
33
|
-
total?: number;
|
|
34
|
-
} & ({
|
|
35
|
-
page: number;
|
|
36
|
-
pageSize: number;
|
|
37
|
-
pageCount?: number;
|
|
38
|
-
} | {
|
|
39
|
-
start: number;
|
|
40
|
-
limit: number;
|
|
41
|
-
});
|
|
42
|
-
};
|
|
43
|
-
error: undefined;
|
|
44
|
-
};
|
|
45
|
-
type ErrorResponse = {
|
|
46
|
-
data: null;
|
|
47
|
-
"error": {
|
|
48
|
-
"status": string;
|
|
49
|
-
"name": 'ApplicationError' | 'ValidationError';
|
|
50
|
-
"message": string;
|
|
51
|
-
"details": {
|
|
52
|
-
[key: string]: any;
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
};
|
|
56
|
-
type Response<T> = SuccessResponse<T> | ErrorResponse;
|
|
57
|
-
type UserResponse<T> = (T & {
|
|
58
|
-
error: undefined;
|
|
59
|
-
}) | ErrorResponse;
|
|
60
|
-
type AuthResponse<T> = {
|
|
61
|
-
jwt: string;
|
|
62
|
-
user: T;
|
|
63
|
-
error: undefined;
|
|
64
|
-
} | ErrorResponse;
|
|
65
|
-
type File = {
|
|
66
|
-
id?: number;
|
|
67
|
-
documentId?: string;
|
|
68
|
-
createdAt?: string;
|
|
69
|
-
updatedAt?: string;
|
|
70
|
-
name: string;
|
|
71
|
-
alternativeText?: string;
|
|
72
|
-
caption?: string;
|
|
73
|
-
width?: number;
|
|
74
|
-
height?: number;
|
|
75
|
-
formats?: object;
|
|
76
|
-
hash: string;
|
|
77
|
-
ext?: string;
|
|
78
|
-
mime: string;
|
|
79
|
-
size: number;
|
|
80
|
-
url: string;
|
|
81
|
-
previewUrl?: string;
|
|
82
|
-
provider: string;
|
|
83
|
-
provider_metadata?: object;
|
|
84
|
-
related?: any;
|
|
85
|
-
folder?: Folder;
|
|
86
|
-
folderPath: string;
|
|
87
|
-
};
|
|
88
|
-
type Locale = {
|
|
89
|
-
id: number;
|
|
90
|
-
documentId: string;
|
|
91
|
-
name: string;
|
|
92
|
-
code: string;
|
|
93
|
-
createdAt: string;
|
|
94
|
-
updatedAt: string;
|
|
95
|
-
publishedAt?: string;
|
|
96
|
-
isDefault: boolean;
|
|
97
|
-
};
|
|
98
|
-
type Folder = {
|
|
99
|
-
id?: number;
|
|
100
|
-
documentId?: string;
|
|
101
|
-
createdAt?: string;
|
|
102
|
-
updatedAt?: string;
|
|
103
|
-
name: string;
|
|
104
|
-
pathId: number;
|
|
105
|
-
parent?: Folder;
|
|
106
|
-
children?: Folder[];
|
|
107
|
-
files?: File[];
|
|
108
|
-
path: string;
|
|
109
|
-
};
|
|
110
|
-
type Filters<T> = {
|
|
111
|
-
$or?: Filters<T>[];
|
|
112
|
-
$and?: Filters<T>[];
|
|
113
|
-
$not?: Filters<T>[];
|
|
114
|
-
} | T;
|
|
115
|
-
type FilterValue<T> = {
|
|
116
|
-
$eq?: T;
|
|
117
|
-
$eqi?: string;
|
|
118
|
-
$ne?: T;
|
|
119
|
-
$nei?: string;
|
|
120
|
-
$lt?: T;
|
|
121
|
-
$lte?: T;
|
|
122
|
-
$gt?: T;
|
|
123
|
-
$gte?: T;
|
|
124
|
-
$in?: T[];
|
|
125
|
-
$notIn?: T[];
|
|
126
|
-
$contains?: string;
|
|
127
|
-
$notContains?: string;
|
|
128
|
-
$containsi?: string;
|
|
129
|
-
$notContainsi?: string;
|
|
130
|
-
$null?: boolean;
|
|
131
|
-
$notNull?: boolean;
|
|
132
|
-
$between?: [T, T];
|
|
133
|
-
$startsWith?: string;
|
|
134
|
-
$startsWithi?: string;
|
|
135
|
-
$endsWith?: string;
|
|
136
|
-
$endsWithi?: string;
|
|
137
|
-
} | T;
|
|
138
|
-
type Query<Fields, Sort, Filters, Populate> = {
|
|
139
|
-
populate?: Populate;
|
|
140
|
-
fields?: Fields[] | '*';
|
|
141
|
-
filters?: Filters;
|
|
142
|
-
locale?: string;
|
|
143
|
-
status?: 'published' | 'draft';
|
|
144
|
-
sort?: Sort[] | Sort;
|
|
145
|
-
pagination?: {
|
|
146
|
-
withCount?: boolean;
|
|
147
|
-
} & ({
|
|
148
|
-
page?: number;
|
|
149
|
-
pageSize?: number;
|
|
150
|
-
} | {
|
|
151
|
-
start?: number;
|
|
152
|
-
limit?: number;
|
|
153
|
-
});
|
|
154
|
-
};
|
|
155
|
-
type DynamiczoneComponent<ComponentName, ComponentInputType> = ComponentInputType & {
|
|
156
|
-
__component: ComponentName;
|
|
157
|
-
};
|
|
158
|
-
type DynamiczonePopulate<T> = {
|
|
159
|
-
on: {
|
|
160
|
-
[K in keyof T]: T[K];
|
|
161
|
-
};
|
|
162
|
-
};
|
|
163
|
-
declare class Strapi {
|
|
164
|
-
private readonly url;
|
|
165
|
-
private token?;
|
|
166
|
-
constructor(url: string, token?: string | undefined);
|
|
167
|
-
fetch<T>(endpoint: string, data?: object | FormData, params?: RequestInit): Promise<Response<T>>;
|
|
168
|
-
fetchData<T>(endpoint: string, data?: object | FormData, params?: RequestInit): Promise<T>;
|
|
169
|
-
setToken(token: string): void;
|
|
170
|
-
getToken(): string | undefined;
|
|
171
|
-
protected baseLogin<T>(identifier: string, password: string): Promise<AuthResponse<T>>;
|
|
172
|
-
protected baseRegister<T, Q>(data: Q): Promise<AuthResponse<T>>;
|
|
173
|
-
forgotPassword(email: string): Promise<ErrorResponse | {
|
|
174
|
-
ok: boolean;
|
|
175
|
-
error: undefined;
|
|
176
|
-
}>;
|
|
177
|
-
sendEmailConfirmation(email: string): Promise<ErrorResponse | {
|
|
178
|
-
email: string;
|
|
179
|
-
sent: boolean;
|
|
180
|
-
error: undefined;
|
|
181
|
-
}>;
|
|
182
|
-
protected baseResetPassword<T>(password: string, code: string): Promise<AuthResponse<T>>;
|
|
183
|
-
protected baseChangePassword<T>(password: string, currentPassword: string): Promise<AuthResponse<T>>;
|
|
184
|
-
protected baseMe<T, Q>(data: Q): Promise<UserResponse<T>>;
|
|
185
|
-
getLocales(params: RequestInit): Promise<Locale[]>;
|
|
186
|
-
getDocuments<T, Q extends object>(endpoint: string, data?: Q, params?: RequestInit): Promise<Response<T[]>>;
|
|
187
|
-
getDocument<T, Q extends object>(endpoint: string, data?: Q, params?: RequestInit): Promise<Response<T>>;
|
|
188
|
-
create<T, Q extends object>(endpoint: string, data: Q, params?: RequestInit): Promise<Response<T>>;
|
|
189
|
-
update<T, Q extends object>(endpoint: string, id: string, data: Q, params?: RequestInit): Promise<Response<T>>;
|
|
190
|
-
protected updateBaseUser<T, Q extends object>(endpoint: string, id: string, data: Q, params?: RequestInit): Promise<T>;
|
|
191
|
-
delete<T>(endpoint: string, id: string, params?: RequestInit): Promise<Response<T>>;
|
|
192
|
-
uploadForm(form: FormData): Promise<File[]>;
|
|
193
|
-
private baseFetch;
|
|
194
|
-
private permissionsList?;
|
|
195
|
-
can(uid: string, controller: string, action: string): Promise<boolean>;
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
export { type AuthResponse, type DynamiczoneComponent, type DynamiczonePopulate, type ErrorResponse, type File, type FilterValue, type Filters, type Folder, type Locale, type PermissionAction, type Permissions, type Query, type RelationInput, type Response, Strapi, type SuccessResponse, type UserResponse };
|