strapi-typed-client 1.0.0
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/LICENSE +21 -0
- package/README.md +83 -0
- package/dist/cli/commands/check.d.ts +27 -0
- package/dist/cli/commands/check.d.ts.map +1 -0
- package/dist/cli/commands/check.js +91 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/generate.d.ts +28 -0
- package/dist/cli/commands/generate.d.ts.map +1 -0
- package/dist/cli/commands/generate.js +129 -0
- package/dist/cli/commands/generate.js.map +1 -0
- package/dist/cli/commands/watch.d.ts +21 -0
- package/dist/cli/commands/watch.d.ts.map +1 -0
- package/dist/cli/commands/watch.js +113 -0
- package/dist/cli/commands/watch.js.map +1 -0
- package/dist/cli/index.d.ts +14 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +40 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/utils/api-client.d.ts +41 -0
- package/dist/cli/utils/api-client.d.ts.map +1 -0
- package/dist/cli/utils/api-client.js +81 -0
- package/dist/cli/utils/api-client.js.map +1 -0
- package/dist/cli/utils/file-writer.d.ts +44 -0
- package/dist/cli/utils/file-writer.d.ts.map +1 -0
- package/dist/cli/utils/file-writer.js +89 -0
- package/dist/cli/utils/file-writer.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +37 -0
- package/dist/cli.js.map +1 -0
- package/dist/client.d.ts +622 -0
- package/dist/client.js +688 -0
- package/dist/core/endpoint-converter.d.ts +26 -0
- package/dist/core/endpoint-converter.d.ts.map +1 -0
- package/dist/core/endpoint-converter.js +161 -0
- package/dist/core/endpoint-converter.js.map +1 -0
- package/dist/core/generator/filters-generator.d.ts +22 -0
- package/dist/core/generator/filters-generator.d.ts.map +1 -0
- package/dist/core/generator/filters-generator.js +236 -0
- package/dist/core/generator/filters-generator.js.map +1 -0
- package/dist/core/index.d.ts +8 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +11 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/schema-transformer.d.ts +19 -0
- package/dist/core/schema-transformer.d.ts.map +1 -0
- package/dist/core/schema-transformer.js +306 -0
- package/dist/core/schema-transformer.js.map +1 -0
- package/dist/generator/auth-api-generator.d.ts +14 -0
- package/dist/generator/auth-api-generator.d.ts.map +1 -0
- package/dist/generator/auth-api-generator.js +518 -0
- package/dist/generator/auth-api-generator.js.map +1 -0
- package/dist/generator/blocks-types-template.d.ts +134 -0
- package/dist/generator/blocks-types-template.d.ts.map +1 -0
- package/dist/generator/blocks-types-template.js +4 -0
- package/dist/generator/blocks-types-template.js.map +1 -0
- package/dist/generator/client-generator.d.ts +19 -0
- package/dist/generator/client-generator.d.ts.map +1 -0
- package/dist/generator/client-generator.js +707 -0
- package/dist/generator/client-generator.js.map +1 -0
- package/dist/generator/custom-api-generator.d.ts +26 -0
- package/dist/generator/custom-api-generator.d.ts.map +1 -0
- package/dist/generator/custom-api-generator.js +145 -0
- package/dist/generator/custom-api-generator.js.map +1 -0
- package/dist/generator/index-generator.d.ts +4 -0
- package/dist/generator/index-generator.d.ts.map +1 -0
- package/dist/generator/index-generator.js +11 -0
- package/dist/generator/index-generator.js.map +1 -0
- package/dist/generator/index.d.ts +14 -0
- package/dist/generator/index.d.ts.map +1 -0
- package/dist/generator/index.js +94 -0
- package/dist/generator/index.js.map +1 -0
- package/dist/generator/types-generator.d.ts +35 -0
- package/dist/generator/types-generator.d.ts.map +1 -0
- package/dist/generator/types-generator.js +641 -0
- package/dist/generator/types-generator.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/next/index.d.ts +16 -0
- package/dist/next/index.d.ts.map +1 -0
- package/dist/next/index.js +224 -0
- package/dist/next/index.js.map +1 -0
- package/dist/parser/custom-types-parser.d.ts +39 -0
- package/dist/parser/custom-types-parser.d.ts.map +1 -0
- package/dist/parser/custom-types-parser.js +206 -0
- package/dist/parser/custom-types-parser.js.map +1 -0
- package/dist/parser/index.d.ts +23 -0
- package/dist/parser/index.d.ts.map +1 -0
- package/dist/parser/index.js +457 -0
- package/dist/parser/index.js.map +1 -0
- package/dist/parser/routes-parser.d.ts +21 -0
- package/dist/parser/routes-parser.d.ts.map +1 -0
- package/dist/parser/routes-parser.js +184 -0
- package/dist/parser/routes-parser.js.map +1 -0
- package/dist/plugin/admin/src/index.d.ts +16 -0
- package/dist/plugin/admin/src/index.d.ts.map +1 -0
- package/dist/plugin/admin/src/index.js +30 -0
- package/dist/plugin/admin/src/index.js.map +1 -0
- package/dist/plugin/admin/src/pages/HomePage.d.ts +2 -0
- package/dist/plugin/admin/src/pages/HomePage.d.ts.map +1 -0
- package/dist/plugin/admin/src/pages/HomePage.js +273 -0
- package/dist/plugin/admin/src/pages/HomePage.js.map +1 -0
- package/dist/plugin/admin/src/pluginId.d.ts +2 -0
- package/dist/plugin/admin/src/pluginId.d.ts.map +1 -0
- package/dist/plugin/admin/src/pluginId.js +2 -0
- package/dist/plugin/admin/src/pluginId.js.map +1 -0
- package/dist/plugin/index.d.ts +22 -0
- package/dist/plugin/index.d.ts.map +1 -0
- package/dist/plugin/index.js +22 -0
- package/dist/plugin/index.js.map +1 -0
- package/dist/plugin/server/src/config/index.d.ts +31 -0
- package/dist/plugin/server/src/config/index.d.ts.map +1 -0
- package/dist/plugin/server/src/config/index.js +35 -0
- package/dist/plugin/server/src/config/index.js.map +1 -0
- package/dist/plugin/server/src/controllers/schema.d.ts +41 -0
- package/dist/plugin/server/src/controllers/schema.d.ts.map +1 -0
- package/dist/plugin/server/src/controllers/schema.js +51 -0
- package/dist/plugin/server/src/controllers/schema.js.map +1 -0
- package/dist/plugin/server/src/index.d.ts +114 -0
- package/dist/plugin/server/src/index.d.ts.map +1 -0
- package/dist/plugin/server/src/index.js +76 -0
- package/dist/plugin/server/src/index.js.map +1 -0
- package/dist/plugin/server/src/routes/index.d.ts +14 -0
- package/dist/plugin/server/src/routes/index.d.ts.map +1 -0
- package/dist/plugin/server/src/routes/index.js +23 -0
- package/dist/plugin/server/src/routes/index.js.map +1 -0
- package/dist/plugin/server/src/services/endpoints.d.ts +36 -0
- package/dist/plugin/server/src/services/endpoints.d.ts.map +1 -0
- package/dist/plugin/server/src/services/endpoints.js +523 -0
- package/dist/plugin/server/src/services/endpoints.js.map +1 -0
- package/dist/plugin/server/src/services/schema.d.ts +25 -0
- package/dist/plugin/server/src/services/schema.d.ts.map +1 -0
- package/dist/plugin/server/src/services/schema.js +164 -0
- package/dist/plugin/server/src/services/schema.js.map +1 -0
- package/dist/schema-meta.ts +7 -0
- package/dist/schema-types.d.ts +104 -0
- package/dist/schema-types.d.ts.map +1 -0
- package/dist/schema-types.js +3 -0
- package/dist/schema-types.js.map +1 -0
- package/dist/shared/constants.d.ts +99 -0
- package/dist/shared/constants.d.ts.map +1 -0
- package/dist/shared/constants.js +89 -0
- package/dist/shared/constants.js.map +1 -0
- package/dist/shared/endpoint-types.d.ts +42 -0
- package/dist/shared/endpoint-types.d.ts.map +1 -0
- package/dist/shared/endpoint-types.js +6 -0
- package/dist/shared/endpoint-types.js.map +1 -0
- package/dist/shared/index.d.ts +12 -0
- package/dist/shared/index.d.ts.map +1 -0
- package/dist/shared/index.js +13 -0
- package/dist/shared/index.js.map +1 -0
- package/dist/shared/naming-utils.d.ts +55 -0
- package/dist/shared/naming-utils.d.ts.map +1 -0
- package/dist/shared/naming-utils.js +106 -0
- package/dist/shared/naming-utils.js.map +1 -0
- package/dist/shared/schema-hash.d.ts +39 -0
- package/dist/shared/schema-hash.d.ts.map +1 -0
- package/dist/shared/schema-hash.js +67 -0
- package/dist/shared/schema-hash.js.map +1 -0
- package/dist/shared/strapi-schema-types.d.ts +77 -0
- package/dist/shared/strapi-schema-types.d.ts.map +1 -0
- package/dist/shared/strapi-schema-types.js +10 -0
- package/dist/shared/strapi-schema-types.js.map +1 -0
- package/dist/shared/string-utils.d.ts +68 -0
- package/dist/shared/string-utils.d.ts.map +1 -0
- package/dist/shared/string-utils.js +124 -0
- package/dist/shared/string-utils.js.map +1 -0
- package/dist/transformer/index.d.ts +17 -0
- package/dist/transformer/index.d.ts.map +1 -0
- package/dist/transformer/index.js +83 -0
- package/dist/transformer/index.js.map +1 -0
- package/dist/types.d.ts +3430 -0
- package/dist/types.js +3 -0
- package/package.json +152 -0
- package/strapi-admin.js +2 -0
- package/strapi-server.js +2 -0
package/dist/client.d.ts
ADDED
|
@@ -0,0 +1,622 @@
|
|
|
1
|
+
import type { Permission, PermissionGetPayload, PermissionPopulateParam, PermissionInput, Role, RoleGetPayload, RolePopulateParam, RoleInput, User, UserGetPayload, UserPopulateParam, UserInput, Access, AccessGetPayload, AccessPopulateParam, AccessInput, AiStudio, AiStudioGetPayload, AiStudioPopulateParam, AiStudioInput, Auth, AuthGetPayload, AuthPopulateParam, AuthInput, Banner, BannerGetPayload, BannerPopulateParam, BannerInput, Catalog, CatalogGetPayload, CatalogPopulateParam, CatalogInput, Category, CategoryGetPayload, CategoryPopulateParam, CategoryInput, Faq, FaqGetPayload, FaqPopulateParam, FaqInput, Gallery, GalleryGetPayload, GalleryPopulateParam, GalleryInput, Guide, GuideGetPayload, GuidePopulateParam, GuideInput, GuideCategory, GuideCategoryGetPayload, GuideCategoryPopulateParam, GuideCategoryInput, GuidePage, GuidePageGetPayload, GuidePagePopulateParam, GuidePageInput, Item, ItemGetPayload, ItemPopulateParam, ItemInput, Landing, LandingGetPayload, LandingPopulateParam, LandingInput, Legal, LegalInput, PartnerCommission, PartnerCommissionGetPayload, PartnerCommissionPopulateParam, PartnerCommissionInput, PartnerProfile, PartnerProfileGetPayload, PartnerProfilePopulateParam, PartnerProfileInput, PartnerSetting, PartnerSettingInput, Payment, PaymentGetPayload, PaymentPopulateParam, PaymentInput, Plan, PlanGetPayload, PlanPopulateParam, PlanInput, Project, ProjectGetPayload, ProjectPopulateParam, ProjectInput, ProjectChat, ProjectChatGetPayload, ProjectChatPopulateParam, ProjectChatInput, Referral, ReferralGetPayload, ReferralPopulateParam, ReferralInput, Subscription, SubscriptionGetPayload, SubscriptionPopulateParam, SubscriptionInput, Support, SupportGetPayload, SupportPopulateParam, SupportInput, SupportCategory, SupportCategoryGetPayload, SupportCategoryPopulateParam, SupportCategoryInput, SupportCenter, SupportCenterGetPayload, SupportCenterPopulateParam, SupportCenterInput, SupportTheme, SupportThemeGetPayload, SupportThemePopulateParam, SupportThemeInput, Team, TeamGetPayload, TeamPopulateParam, TeamInput, TeamInvitation, TeamInvitationGetPayload, TeamInvitationPopulateParam, TeamInvitationInput, TeamMember, TeamMemberGetPayload, TeamMemberPopulateParam, TeamMemberInput, TokenTransaction, TokenTransactionGetPayload, TokenTransactionPopulateParam, TokenTransactionInput, UserSession, UserSessionGetPayload, UserSessionPopulateParam, UserSessionInput, Website, WebsiteGetPayload, WebsitePopulateParam, WebsiteInput } from './types.js';
|
|
2
|
+
import type { PermissionFilters, RoleFilters, UserFilters, AccessFilters, AiStudioFilters, AuthFilters, BannerFilters, CatalogFilters, CategoryFilters, FaqFilters, GalleryFilters, GuideFilters, GuideCategoryFilters, GuidePageFilters, ItemFilters, LandingFilters, LegalFilters, PartnerCommissionFilters, PartnerProfileFilters, PartnerSettingFilters, PaymentFilters, PlanFilters, ProjectFilters, ProjectChatFilters, ReferralFilters, SubscriptionFilters, SupportFilters, SupportCategoryFilters, SupportCenterFilters, SupportThemeFilters, TeamFilters, TeamInvitationFilters, TeamMemberFilters, TokenTransactionFilters, UserSessionFilters, WebsiteFilters } from './types.js';
|
|
3
|
+
export declare namespace AIStudioAPI {
|
|
4
|
+
type SSEEvent = {
|
|
5
|
+
type: 'connected';
|
|
6
|
+
} | {
|
|
7
|
+
type: 'progress';
|
|
8
|
+
generationId: string;
|
|
9
|
+
progress: number;
|
|
10
|
+
status: string;
|
|
11
|
+
} | {
|
|
12
|
+
type: 'complete';
|
|
13
|
+
generationId: string;
|
|
14
|
+
outputUrl: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: 'error';
|
|
17
|
+
generationId: string;
|
|
18
|
+
error: string;
|
|
19
|
+
};
|
|
20
|
+
type GetConfigRequest = void;
|
|
21
|
+
type GetConfigResponse = {
|
|
22
|
+
styles: Array<{
|
|
23
|
+
id: number;
|
|
24
|
+
name: string;
|
|
25
|
+
value: string;
|
|
26
|
+
subStyles?: Array<{
|
|
27
|
+
id: number;
|
|
28
|
+
name: string;
|
|
29
|
+
value: string;
|
|
30
|
+
}>;
|
|
31
|
+
}>;
|
|
32
|
+
};
|
|
33
|
+
type StreamRequest = void;
|
|
34
|
+
type StreamResponse = void;
|
|
35
|
+
type GenerateImageRequest = {
|
|
36
|
+
resolution?: string;
|
|
37
|
+
description?: string;
|
|
38
|
+
environment?: string;
|
|
39
|
+
objectsToAdd?: string;
|
|
40
|
+
modelName?: string;
|
|
41
|
+
modelSize?: string;
|
|
42
|
+
output_format?: string;
|
|
43
|
+
generationId?: string;
|
|
44
|
+
};
|
|
45
|
+
type GenerateImageResponse = {
|
|
46
|
+
generationId: string;
|
|
47
|
+
started: boolean;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export declare namespace CheckoutAPI {
|
|
51
|
+
type BuyPlanRequest = {
|
|
52
|
+
planId: number;
|
|
53
|
+
paymentProvider: 'stripe' | 'yookassa';
|
|
54
|
+
seats?: number;
|
|
55
|
+
};
|
|
56
|
+
type BuyPlanResponse = {
|
|
57
|
+
url: string;
|
|
58
|
+
};
|
|
59
|
+
type BuyTokensRequest = {
|
|
60
|
+
paymentProvider: 'stripe' | 'yookassa';
|
|
61
|
+
quantity: number;
|
|
62
|
+
};
|
|
63
|
+
type BuyTokensResponse = {
|
|
64
|
+
url: string;
|
|
65
|
+
};
|
|
66
|
+
type CancelRequest = void;
|
|
67
|
+
type CancelResponse = {
|
|
68
|
+
success: boolean;
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
export declare namespace ItemAPI {
|
|
72
|
+
type IncrementRunRequest = void;
|
|
73
|
+
type IncrementRunResponse = {
|
|
74
|
+
id: number;
|
|
75
|
+
run: string;
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
export declare namespace PartnerProfileAPI {
|
|
79
|
+
type UpdateCodeRequest = {
|
|
80
|
+
code: string;
|
|
81
|
+
};
|
|
82
|
+
type UpdateCodeResponse = {
|
|
83
|
+
status: 'ok';
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export declare namespace TeamInvitationAPI {
|
|
87
|
+
type CreateRequest = {
|
|
88
|
+
email: string;
|
|
89
|
+
};
|
|
90
|
+
type CreateResponse = {
|
|
91
|
+
id: number;
|
|
92
|
+
email: string;
|
|
93
|
+
};
|
|
94
|
+
type CancelRequest = void;
|
|
95
|
+
type CancelResponse = {
|
|
96
|
+
cancelled: true;
|
|
97
|
+
email: string;
|
|
98
|
+
};
|
|
99
|
+
type InfoRequest = void;
|
|
100
|
+
type InfoResponse = {
|
|
101
|
+
id: number;
|
|
102
|
+
ownerEmail: string;
|
|
103
|
+
invitedEmail: string;
|
|
104
|
+
isRegistered: boolean;
|
|
105
|
+
wrongEmail: boolean;
|
|
106
|
+
auth: boolean;
|
|
107
|
+
};
|
|
108
|
+
type AcceptRequest = void;
|
|
109
|
+
type AcceptResponse = {
|
|
110
|
+
accepted: true;
|
|
111
|
+
teamMember: {
|
|
112
|
+
id: number;
|
|
113
|
+
role: string;
|
|
114
|
+
};
|
|
115
|
+
};
|
|
116
|
+
type DeclineRequest = void;
|
|
117
|
+
type DeclineResponse = {
|
|
118
|
+
declined: true;
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
export declare namespace TeamMemberAPI {
|
|
122
|
+
type GetTeamRequest = void;
|
|
123
|
+
type GetTeamResponse = {
|
|
124
|
+
members: Array<{
|
|
125
|
+
id: number;
|
|
126
|
+
type: 'member';
|
|
127
|
+
role: 'owner' | 'member';
|
|
128
|
+
joinedAt: string;
|
|
129
|
+
user: {
|
|
130
|
+
id: number;
|
|
131
|
+
email: string;
|
|
132
|
+
username: string;
|
|
133
|
+
};
|
|
134
|
+
}>;
|
|
135
|
+
pendingInvitations: Array<{
|
|
136
|
+
id: number;
|
|
137
|
+
type: 'invitation';
|
|
138
|
+
email: string;
|
|
139
|
+
invitedAt: string;
|
|
140
|
+
status: 'pending';
|
|
141
|
+
}>;
|
|
142
|
+
maxSeats: number;
|
|
143
|
+
usedSeats: number;
|
|
144
|
+
};
|
|
145
|
+
type RemoveRequest = void;
|
|
146
|
+
type RemoveResponse = {
|
|
147
|
+
removed: true;
|
|
148
|
+
email: string;
|
|
149
|
+
};
|
|
150
|
+
type LeaveRequest = void;
|
|
151
|
+
type LeaveResponse = {
|
|
152
|
+
left: true;
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
export declare namespace WebhookAPI {
|
|
156
|
+
type YooKassaRequest = {
|
|
157
|
+
type: string;
|
|
158
|
+
event: string;
|
|
159
|
+
object: {
|
|
160
|
+
id: string;
|
|
161
|
+
status: string;
|
|
162
|
+
paid: boolean;
|
|
163
|
+
amount: {
|
|
164
|
+
value: string;
|
|
165
|
+
currency: string;
|
|
166
|
+
};
|
|
167
|
+
metadata?: Record<string, any>;
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
type YooKassaResponse = {
|
|
171
|
+
status: 'ok';
|
|
172
|
+
};
|
|
173
|
+
type StripeRequest = {
|
|
174
|
+
id: string;
|
|
175
|
+
type: string;
|
|
176
|
+
data: {
|
|
177
|
+
object: any;
|
|
178
|
+
};
|
|
179
|
+
};
|
|
180
|
+
type StripeResponse = {
|
|
181
|
+
status: 'ok';
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
export interface StrapiResponse<T> {
|
|
185
|
+
data: T;
|
|
186
|
+
meta?: {
|
|
187
|
+
pagination?: {
|
|
188
|
+
page: number;
|
|
189
|
+
pageSize: number;
|
|
190
|
+
pageCount: number;
|
|
191
|
+
total: number;
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
export declare class StrapiError extends Error {
|
|
196
|
+
/** Clean user-friendly message from Strapi backend */
|
|
197
|
+
userMessage: string;
|
|
198
|
+
/** HTTP status code */
|
|
199
|
+
status: number;
|
|
200
|
+
/** HTTP status text */
|
|
201
|
+
statusText: string;
|
|
202
|
+
/** Additional error details from Strapi */
|
|
203
|
+
details?: any;
|
|
204
|
+
constructor(message: string, userMessage: string, status: number, statusText: string, details?: any);
|
|
205
|
+
}
|
|
206
|
+
declare class BaseAPI {
|
|
207
|
+
protected config: StrapiClientConfig;
|
|
208
|
+
constructor(config: StrapiClientConfig);
|
|
209
|
+
protected request<R>(url: string, options?: RequestInit, nextOptions?: NextOptions, errorPrefix?: string): Promise<R>;
|
|
210
|
+
protected buildQueryString(params?: QueryParams): string;
|
|
211
|
+
}
|
|
212
|
+
type StrapiSortOption<T> = Exclude<keyof T & string, '__typename'> | `${Exclude<keyof T & string, '__typename'>}:${'asc' | 'desc'}`;
|
|
213
|
+
export interface QueryParams<TEntity = any, TFilters = Record<string, any>, TPopulate = any, TFields extends string = Exclude<keyof TEntity & string, '__typename'>> {
|
|
214
|
+
filters?: TFilters;
|
|
215
|
+
sort?: StrapiSortOption<TEntity> | StrapiSortOption<TEntity>[];
|
|
216
|
+
pagination?: {
|
|
217
|
+
page?: number;
|
|
218
|
+
pageSize?: number;
|
|
219
|
+
limit?: number;
|
|
220
|
+
start?: number;
|
|
221
|
+
};
|
|
222
|
+
populate?: TPopulate;
|
|
223
|
+
fields?: TFields[];
|
|
224
|
+
}
|
|
225
|
+
export interface NextOptions {
|
|
226
|
+
revalidate?: number | false;
|
|
227
|
+
tags?: string[];
|
|
228
|
+
cache?: RequestCache;
|
|
229
|
+
}
|
|
230
|
+
export interface StrapiClientConfig {
|
|
231
|
+
baseURL: string;
|
|
232
|
+
token?: string;
|
|
233
|
+
fetch?: typeof fetch;
|
|
234
|
+
debug?: boolean;
|
|
235
|
+
credentials?: RequestCredentials;
|
|
236
|
+
/** Enable schema validation on init (dev mode). Logs warning if types are outdated. */
|
|
237
|
+
validateSchema?: boolean;
|
|
238
|
+
}
|
|
239
|
+
type Equal<X, Y> = (<T>() => T extends X ? 1 : 2) extends <T>() => T extends Y ? 1 : 2 ? true : false;
|
|
240
|
+
type GetPopulated<TBase, TPopulate> = Equal<TBase, Permission> extends true ? PermissionGetPayload<{
|
|
241
|
+
populate: TPopulate;
|
|
242
|
+
}> : Equal<TBase, Role> extends true ? RoleGetPayload<{
|
|
243
|
+
populate: TPopulate;
|
|
244
|
+
}> : Equal<TBase, User> extends true ? UserGetPayload<{
|
|
245
|
+
populate: TPopulate;
|
|
246
|
+
}> : Equal<TBase, Access> extends true ? AccessGetPayload<{
|
|
247
|
+
populate: TPopulate;
|
|
248
|
+
}> : Equal<TBase, AiStudio> extends true ? AiStudioGetPayload<{
|
|
249
|
+
populate: TPopulate;
|
|
250
|
+
}> : Equal<TBase, Auth> extends true ? AuthGetPayload<{
|
|
251
|
+
populate: TPopulate;
|
|
252
|
+
}> : Equal<TBase, Banner> extends true ? BannerGetPayload<{
|
|
253
|
+
populate: TPopulate;
|
|
254
|
+
}> : Equal<TBase, Catalog> extends true ? CatalogGetPayload<{
|
|
255
|
+
populate: TPopulate;
|
|
256
|
+
}> : Equal<TBase, Category> extends true ? CategoryGetPayload<{
|
|
257
|
+
populate: TPopulate;
|
|
258
|
+
}> : Equal<TBase, Faq> extends true ? FaqGetPayload<{
|
|
259
|
+
populate: TPopulate;
|
|
260
|
+
}> : Equal<TBase, Gallery> extends true ? GalleryGetPayload<{
|
|
261
|
+
populate: TPopulate;
|
|
262
|
+
}> : Equal<TBase, Guide> extends true ? GuideGetPayload<{
|
|
263
|
+
populate: TPopulate;
|
|
264
|
+
}> : Equal<TBase, GuideCategory> extends true ? GuideCategoryGetPayload<{
|
|
265
|
+
populate: TPopulate;
|
|
266
|
+
}> : Equal<TBase, GuidePage> extends true ? GuidePageGetPayload<{
|
|
267
|
+
populate: TPopulate;
|
|
268
|
+
}> : Equal<TBase, Item> extends true ? ItemGetPayload<{
|
|
269
|
+
populate: TPopulate;
|
|
270
|
+
}> : Equal<TBase, Landing> extends true ? LandingGetPayload<{
|
|
271
|
+
populate: TPopulate;
|
|
272
|
+
}> : Equal<TBase, PartnerCommission> extends true ? PartnerCommissionGetPayload<{
|
|
273
|
+
populate: TPopulate;
|
|
274
|
+
}> : Equal<TBase, PartnerProfile> extends true ? PartnerProfileGetPayload<{
|
|
275
|
+
populate: TPopulate;
|
|
276
|
+
}> : Equal<TBase, Payment> extends true ? PaymentGetPayload<{
|
|
277
|
+
populate: TPopulate;
|
|
278
|
+
}> : Equal<TBase, Plan> extends true ? PlanGetPayload<{
|
|
279
|
+
populate: TPopulate;
|
|
280
|
+
}> : Equal<TBase, Project> extends true ? ProjectGetPayload<{
|
|
281
|
+
populate: TPopulate;
|
|
282
|
+
}> : Equal<TBase, ProjectChat> extends true ? ProjectChatGetPayload<{
|
|
283
|
+
populate: TPopulate;
|
|
284
|
+
}> : Equal<TBase, Referral> extends true ? ReferralGetPayload<{
|
|
285
|
+
populate: TPopulate;
|
|
286
|
+
}> : Equal<TBase, Subscription> extends true ? SubscriptionGetPayload<{
|
|
287
|
+
populate: TPopulate;
|
|
288
|
+
}> : Equal<TBase, Support> extends true ? SupportGetPayload<{
|
|
289
|
+
populate: TPopulate;
|
|
290
|
+
}> : Equal<TBase, SupportCategory> extends true ? SupportCategoryGetPayload<{
|
|
291
|
+
populate: TPopulate;
|
|
292
|
+
}> : Equal<TBase, SupportCenter> extends true ? SupportCenterGetPayload<{
|
|
293
|
+
populate: TPopulate;
|
|
294
|
+
}> : Equal<TBase, SupportTheme> extends true ? SupportThemeGetPayload<{
|
|
295
|
+
populate: TPopulate;
|
|
296
|
+
}> : Equal<TBase, Team> extends true ? TeamGetPayload<{
|
|
297
|
+
populate: TPopulate;
|
|
298
|
+
}> : Equal<TBase, TeamInvitation> extends true ? TeamInvitationGetPayload<{
|
|
299
|
+
populate: TPopulate;
|
|
300
|
+
}> : Equal<TBase, TeamMember> extends true ? TeamMemberGetPayload<{
|
|
301
|
+
populate: TPopulate;
|
|
302
|
+
}> : Equal<TBase, TokenTransaction> extends true ? TokenTransactionGetPayload<{
|
|
303
|
+
populate: TPopulate;
|
|
304
|
+
}> : Equal<TBase, UserSession> extends true ? UserSessionGetPayload<{
|
|
305
|
+
populate: TPopulate;
|
|
306
|
+
}> : Equal<TBase, Website> extends true ? WebsiteGetPayload<{
|
|
307
|
+
populate: TPopulate;
|
|
308
|
+
}> : TBase;
|
|
309
|
+
type SelectFields<TFull, TBase, TFields extends string> = [TFields] extends [never] ? TFull : Pick<TBase, Extract<TFields | 'id' | 'documentId', keyof TBase>> & Omit<TFull, keyof TBase>;
|
|
310
|
+
export interface LoginCredentials {
|
|
311
|
+
identifier: string;
|
|
312
|
+
password: string;
|
|
313
|
+
}
|
|
314
|
+
export interface RegisterData {
|
|
315
|
+
username: string;
|
|
316
|
+
email: string;
|
|
317
|
+
password: string;
|
|
318
|
+
referralCode?: string;
|
|
319
|
+
referralSource?: 'code' | 'link' | 'share';
|
|
320
|
+
}
|
|
321
|
+
export interface AuthResponse {
|
|
322
|
+
jwt: string;
|
|
323
|
+
user: User;
|
|
324
|
+
}
|
|
325
|
+
export interface ForgotPasswordData {
|
|
326
|
+
email: string;
|
|
327
|
+
}
|
|
328
|
+
export interface ResetPasswordData {
|
|
329
|
+
code: string;
|
|
330
|
+
password: string;
|
|
331
|
+
passwordConfirmation: string;
|
|
332
|
+
}
|
|
333
|
+
export interface ChangePasswordData {
|
|
334
|
+
currentPassword: string;
|
|
335
|
+
password: string;
|
|
336
|
+
passwordConfirmation: string;
|
|
337
|
+
}
|
|
338
|
+
export interface EmailConfirmationResponse {
|
|
339
|
+
jwt: string;
|
|
340
|
+
user: User;
|
|
341
|
+
}
|
|
342
|
+
declare class CollectionAPI<TBase, TInput = Partial<TBase>, TFilters = Record<string, any>, TPopulateKeys extends Record<string, any> = Record<string, any>> extends BaseAPI {
|
|
343
|
+
private endpoint;
|
|
344
|
+
constructor(endpoint: string, config: StrapiClientConfig);
|
|
345
|
+
find<const TPopulate extends TPopulateKeys, const TFields extends Exclude<keyof TBase & string, '__typename'> = never>(params: {
|
|
346
|
+
populate: TPopulate;
|
|
347
|
+
} & QueryParams<TBase, TFilters, TPopulate, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<TBase, TPopulate>, TBase, TFields>[]>;
|
|
348
|
+
find<const TFields extends Exclude<keyof TBase & string, '__typename'> = never>(params: {
|
|
349
|
+
populate: '*' | true;
|
|
350
|
+
} & QueryParams<TBase, TFilters, '*' | true, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<TBase, '*'>, TBase, TFields>[]>;
|
|
351
|
+
find<const TFields extends Exclude<keyof TBase & string, '__typename'> = never>(params?: QueryParams<TBase, TFilters, TPopulateKeys | (keyof TPopulateKeys & string)[] | '*' | boolean, TFields>, nextOptions?: NextOptions): Promise<SelectFields<TBase, TBase, TFields>[]>;
|
|
352
|
+
findOne<const TPopulate extends TPopulateKeys, const TFields extends Exclude<keyof TBase & string, '__typename'> = never>(documentId: string, params: {
|
|
353
|
+
populate: TPopulate;
|
|
354
|
+
} & QueryParams<TBase, TFilters, TPopulate, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<TBase, TPopulate>, TBase, TFields> | null>;
|
|
355
|
+
findOne<const TFields extends Exclude<keyof TBase & string, '__typename'> = never>(documentId: string, params: {
|
|
356
|
+
populate: '*' | true;
|
|
357
|
+
} & QueryParams<TBase, TFilters, '*' | true, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<TBase, '*'>, TBase, TFields> | null>;
|
|
358
|
+
findOne<const TFields extends Exclude<keyof TBase & string, '__typename'> = never>(documentId: string, params?: QueryParams<TBase, TFilters, TPopulateKeys | (keyof TPopulateKeys & string)[] | '*' | boolean, TFields>, nextOptions?: NextOptions): Promise<SelectFields<TBase, TBase, TFields> | null>;
|
|
359
|
+
create(data: TInput | FormData, nextOptions?: NextOptions): Promise<TBase>;
|
|
360
|
+
update(documentId: string, data: TInput | FormData, nextOptions?: NextOptions): Promise<TBase>;
|
|
361
|
+
delete(documentId: string, nextOptions?: NextOptions): Promise<TBase | null>;
|
|
362
|
+
}
|
|
363
|
+
declare class SingleTypeAPI<TBase, TInput = Partial<TBase>, TFilters = Record<string, any>, TPopulateKeys extends Record<string, any> = Record<string, any>> extends BaseAPI {
|
|
364
|
+
private endpoint;
|
|
365
|
+
constructor(endpoint: string, config: StrapiClientConfig);
|
|
366
|
+
find<const TPopulate extends TPopulateKeys, const TFields extends Exclude<keyof TBase & string, '__typename'> = never>(params: {
|
|
367
|
+
populate: TPopulate;
|
|
368
|
+
} & QueryParams<TBase, TFilters, TPopulate, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<TBase, TPopulate>, TBase, TFields>>;
|
|
369
|
+
find<const TFields extends Exclude<keyof TBase & string, '__typename'> = never>(params: {
|
|
370
|
+
populate: '*' | true;
|
|
371
|
+
} & QueryParams<TBase, TFilters, '*' | true, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<TBase, '*'>, TBase, TFields>>;
|
|
372
|
+
find<const TFields extends Exclude<keyof TBase & string, '__typename'> = never>(params?: QueryParams<TBase, TFilters, TPopulateKeys | (keyof TPopulateKeys & string)[] | '*' | boolean, TFields>, nextOptions?: NextOptions): Promise<SelectFields<TBase, TBase, TFields>>;
|
|
373
|
+
update(data: TInput | FormData, nextOptions?: NextOptions): Promise<TBase>;
|
|
374
|
+
}
|
|
375
|
+
declare class AiStudioAPI extends SingleTypeAPI<AiStudio, AiStudioInput, AiStudioFilters, AiStudioPopulateParam> {
|
|
376
|
+
/**
|
|
377
|
+
* GET /ai-studio/config
|
|
378
|
+
* Handler: ai-studio.getConfig
|
|
379
|
+
*/
|
|
380
|
+
getConfig(): Promise<AIStudioAPI.GetConfigResponse>;
|
|
381
|
+
/**
|
|
382
|
+
* GET /ai-studio/stream
|
|
383
|
+
* Handler: ai-studio.stream
|
|
384
|
+
*/
|
|
385
|
+
stream(): Promise<AIStudioAPI.StreamResponse>;
|
|
386
|
+
/**
|
|
387
|
+
* POST /ai-studio/generate-image
|
|
388
|
+
* Handler: ai-studio.generateImage
|
|
389
|
+
*/
|
|
390
|
+
generateImage(data?: AIStudioAPI.GenerateImageRequest | FormData): Promise<AIStudioAPI.GenerateImageResponse>;
|
|
391
|
+
}
|
|
392
|
+
declare class CheckoutAPI extends BaseAPI {
|
|
393
|
+
constructor(config: StrapiClientConfig);
|
|
394
|
+
/**
|
|
395
|
+
* POST /checkout/plan
|
|
396
|
+
* Handler: checkout.buyPlan
|
|
397
|
+
*/
|
|
398
|
+
buyPlan(data?: CheckoutAPI.BuyPlanRequest | FormData): Promise<CheckoutAPI.BuyPlanResponse>;
|
|
399
|
+
/**
|
|
400
|
+
* POST /checkout/tokens
|
|
401
|
+
* Handler: checkout.buyTokens
|
|
402
|
+
*/
|
|
403
|
+
buyTokens(data?: CheckoutAPI.BuyTokensRequest | FormData): Promise<CheckoutAPI.BuyTokensResponse>;
|
|
404
|
+
/**
|
|
405
|
+
* POST /checkout/cancel
|
|
406
|
+
* Handler: checkout.cancel
|
|
407
|
+
*/
|
|
408
|
+
cancel(data?: CheckoutAPI.CancelRequest | FormData): Promise<CheckoutAPI.CancelResponse>;
|
|
409
|
+
}
|
|
410
|
+
declare class ItemAPI extends CollectionAPI<Item, ItemInput, ItemFilters, ItemPopulateParam> {
|
|
411
|
+
/**
|
|
412
|
+
* POST /items/:id/increment-run
|
|
413
|
+
* Handler: item.incrementRun
|
|
414
|
+
*/
|
|
415
|
+
incrementRun(id: string, data?: ItemAPI.IncrementRunRequest | FormData): Promise<ItemAPI.IncrementRunResponse>;
|
|
416
|
+
}
|
|
417
|
+
declare class KickstarterAPI extends BaseAPI {
|
|
418
|
+
constructor(config: StrapiClientConfig);
|
|
419
|
+
/**
|
|
420
|
+
* POST /kickstarter
|
|
421
|
+
* Handler: kickstarter.notifyNewRequest
|
|
422
|
+
*/
|
|
423
|
+
notifyNewRequest(data?: any | FormData): Promise<any>;
|
|
424
|
+
}
|
|
425
|
+
declare class PartnerProfileAPI extends CollectionAPI<PartnerProfile, PartnerProfileInput, PartnerProfileFilters, PartnerProfilePopulateParam> {
|
|
426
|
+
/**
|
|
427
|
+
* PUT /partner-profiles/update-code
|
|
428
|
+
* Handler: partner-profile.updateCode
|
|
429
|
+
*/
|
|
430
|
+
updateCode(data?: PartnerProfileAPI.UpdateCodeRequest | FormData): Promise<PartnerProfileAPI.UpdateCodeResponse>;
|
|
431
|
+
}
|
|
432
|
+
declare class TeamInvitationAPI extends CollectionAPI<TeamInvitation, TeamInvitationInput, TeamInvitationFilters, TeamInvitationPopulateParam> {
|
|
433
|
+
/**
|
|
434
|
+
* POST /team-invitations
|
|
435
|
+
* Handler: team-invitation.create
|
|
436
|
+
*/
|
|
437
|
+
create(data?: TeamInvitationAPI.CreateRequest | FormData): Promise<TeamInvitationAPI.CreateResponse>;
|
|
438
|
+
/**
|
|
439
|
+
* DELETE /team-invitations/:id
|
|
440
|
+
* Handler: team-invitation.cancel
|
|
441
|
+
*/
|
|
442
|
+
cancel(id: string): Promise<TeamInvitationAPI.CancelResponse>;
|
|
443
|
+
/**
|
|
444
|
+
* GET /team-invitations/info/:token
|
|
445
|
+
* Handler: team-invitation.info
|
|
446
|
+
*/
|
|
447
|
+
info(token: string): Promise<TeamInvitationAPI.InfoResponse>;
|
|
448
|
+
/**
|
|
449
|
+
* POST /team-invitations/accept/:token
|
|
450
|
+
* Handler: team-invitation.accept
|
|
451
|
+
*/
|
|
452
|
+
accept(token: string, data?: TeamInvitationAPI.AcceptRequest | FormData): Promise<TeamInvitationAPI.AcceptResponse>;
|
|
453
|
+
/**
|
|
454
|
+
* POST /team-invitations/decline/:token
|
|
455
|
+
* Handler: team-invitation.decline
|
|
456
|
+
*/
|
|
457
|
+
decline(token: string, data?: TeamInvitationAPI.DeclineRequest | FormData): Promise<TeamInvitationAPI.DeclineResponse>;
|
|
458
|
+
}
|
|
459
|
+
declare class TeamMemberAPI extends CollectionAPI<TeamMember, TeamMemberInput, TeamMemberFilters, TeamMemberPopulateParam> {
|
|
460
|
+
/**
|
|
461
|
+
* GET /team-members
|
|
462
|
+
* Handler: team-member.getTeam
|
|
463
|
+
*/
|
|
464
|
+
getTeam(): Promise<TeamMemberAPI.GetTeamResponse>;
|
|
465
|
+
/**
|
|
466
|
+
* DELETE /team-members/:id
|
|
467
|
+
* Handler: team-member.remove
|
|
468
|
+
*/
|
|
469
|
+
remove(id: string): Promise<TeamMemberAPI.RemoveResponse>;
|
|
470
|
+
/**
|
|
471
|
+
* POST /team-members/leave
|
|
472
|
+
* Handler: team-member.leave
|
|
473
|
+
*/
|
|
474
|
+
leave(data?: TeamMemberAPI.LeaveRequest | FormData): Promise<TeamMemberAPI.LeaveResponse>;
|
|
475
|
+
}
|
|
476
|
+
declare class WebhookAPI extends BaseAPI {
|
|
477
|
+
constructor(config: StrapiClientConfig);
|
|
478
|
+
/**
|
|
479
|
+
* POST /webhook/yookassa
|
|
480
|
+
* Handler: webhook.yooKassa
|
|
481
|
+
*/
|
|
482
|
+
yooKassa(data?: WebhookAPI.YooKassaRequest | FormData): Promise<WebhookAPI.YooKassaResponse>;
|
|
483
|
+
/**
|
|
484
|
+
* POST /webhook/stripe
|
|
485
|
+
* Handler: webhook.stripe
|
|
486
|
+
*/
|
|
487
|
+
stripe(data?: WebhookAPI.StripeRequest | FormData): Promise<WebhookAPI.StripeResponse>;
|
|
488
|
+
}
|
|
489
|
+
declare class AuthAPI extends BaseAPI {
|
|
490
|
+
constructor(config: StrapiClientConfig);
|
|
491
|
+
/**
|
|
492
|
+
* Login with email/username and password
|
|
493
|
+
* POST /api/auth/local
|
|
494
|
+
*/
|
|
495
|
+
login(credentials: LoginCredentials): Promise<AuthResponse>;
|
|
496
|
+
/**
|
|
497
|
+
* Register a new user
|
|
498
|
+
* POST /api/auth/local/register
|
|
499
|
+
*/
|
|
500
|
+
register(data: RegisterData): Promise<AuthResponse>;
|
|
501
|
+
/**
|
|
502
|
+
* Get current authenticated user
|
|
503
|
+
* GET /api/users/me
|
|
504
|
+
* Supports populate with automatic type inference
|
|
505
|
+
*/
|
|
506
|
+
me<const TPopulate extends UserPopulateParam, const TFields extends Exclude<keyof User & string, '__typename'> = never>(params: {
|
|
507
|
+
populate: TPopulate;
|
|
508
|
+
} & QueryParams<User, UserFilters, TPopulate, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<User, TPopulate>, User, TFields>>;
|
|
509
|
+
me<const TFields extends Exclude<keyof User & string, '__typename'> = never>(params: {
|
|
510
|
+
populate: '*' | true;
|
|
511
|
+
} & QueryParams<User, UserFilters, '*' | true, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<User, '*'>, User, TFields>>;
|
|
512
|
+
me<const TFields extends Exclude<keyof User & string, '__typename'> = never>(params?: QueryParams<User, UserFilters, UserPopulateParam | (keyof UserPopulateParam & string)[] | '*' | boolean, TFields>, nextOptions?: NextOptions): Promise<SelectFields<User, User, TFields>>;
|
|
513
|
+
/**
|
|
514
|
+
* Update current authenticated user
|
|
515
|
+
* PUT /api/users/me
|
|
516
|
+
* Supports populate with automatic type inference
|
|
517
|
+
*/
|
|
518
|
+
updateMe<const TPopulate extends UserPopulateParam, const TFields extends Exclude<keyof User & string, '__typename'> = never>(data: Partial<User>, params: {
|
|
519
|
+
populate: TPopulate;
|
|
520
|
+
} & QueryParams<User, UserFilters, TPopulate, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<User, TPopulate>, User, TFields>>;
|
|
521
|
+
updateMe<const TFields extends Exclude<keyof User & string, '__typename'> = never>(data: Partial<User>, params: {
|
|
522
|
+
populate: '*' | true;
|
|
523
|
+
} & QueryParams<User, UserFilters, '*' | true, TFields>, nextOptions?: NextOptions): Promise<SelectFields<GetPopulated<User, '*'>, User, TFields>>;
|
|
524
|
+
updateMe<const TFields extends Exclude<keyof User & string, '__typename'> = never>(data: Partial<User>, params?: QueryParams<User, UserFilters, UserPopulateParam | (keyof UserPopulateParam & string)[] | '*' | boolean, TFields>, nextOptions?: NextOptions): Promise<SelectFields<User, User, TFields>>;
|
|
525
|
+
/**
|
|
526
|
+
* OAuth callback
|
|
527
|
+
* GET /api/auth/:provider/callback
|
|
528
|
+
* @param provider - OAuth provider name (google, github, etc.)
|
|
529
|
+
* @param search - Query string (e.g., "access_token=xxx&code=yyy" or "?access_token=xxx")
|
|
530
|
+
*/
|
|
531
|
+
callback(provider: string, search?: string, nextOptions?: NextOptions): Promise<AuthResponse>;
|
|
532
|
+
/**
|
|
533
|
+
* Logout current user (client-side token removal helper)
|
|
534
|
+
*/
|
|
535
|
+
logout(): Promise<void>;
|
|
536
|
+
/**
|
|
537
|
+
* Request password reset email
|
|
538
|
+
* POST /api/auth/forgot-password
|
|
539
|
+
*/
|
|
540
|
+
forgotPassword(data: ForgotPasswordData): Promise<{
|
|
541
|
+
ok: boolean;
|
|
542
|
+
}>;
|
|
543
|
+
/**
|
|
544
|
+
* Reset password using reset code
|
|
545
|
+
* POST /api/auth/reset-password
|
|
546
|
+
*/
|
|
547
|
+
resetPassword(data: ResetPasswordData): Promise<AuthResponse>;
|
|
548
|
+
/**
|
|
549
|
+
* Change password for authenticated user
|
|
550
|
+
* POST /api/auth/change-password
|
|
551
|
+
*/
|
|
552
|
+
changePassword(data: ChangePasswordData): Promise<AuthResponse>;
|
|
553
|
+
/**
|
|
554
|
+
* Confirm user email address
|
|
555
|
+
* GET /api/auth/email-confirmation?confirmation=TOKEN
|
|
556
|
+
*/
|
|
557
|
+
confirmEmail(confirmationToken: string, nextOptions?: NextOptions): Promise<EmailConfirmationResponse>;
|
|
558
|
+
/**
|
|
559
|
+
* Send email confirmation
|
|
560
|
+
* POST /api/auth/send-email-confirmation
|
|
561
|
+
*/
|
|
562
|
+
sendEmailConfirmation(email: string): Promise<{
|
|
563
|
+
ok: boolean;
|
|
564
|
+
}>;
|
|
565
|
+
}
|
|
566
|
+
export declare class StrapiClient {
|
|
567
|
+
private config;
|
|
568
|
+
authentication: AuthAPI;
|
|
569
|
+
permissions: CollectionAPI<Permission, PermissionInput, PermissionFilters, PermissionPopulateParam>;
|
|
570
|
+
roles: CollectionAPI<Role, RoleInput, RoleFilters, RolePopulateParam>;
|
|
571
|
+
users: CollectionAPI<User, UserInput, UserFilters, UserPopulateParam>;
|
|
572
|
+
accesses: CollectionAPI<Access, AccessInput, AccessFilters, AccessPopulateParam>;
|
|
573
|
+
aiStudio: AiStudioAPI;
|
|
574
|
+
auth: SingleTypeAPI<Auth, AuthInput, AuthFilters, AuthPopulateParam>;
|
|
575
|
+
banner: SingleTypeAPI<Banner, BannerInput, BannerFilters, BannerPopulateParam>;
|
|
576
|
+
catalog: SingleTypeAPI<Catalog, CatalogInput, CatalogFilters, CatalogPopulateParam>;
|
|
577
|
+
categories: CollectionAPI<Category, CategoryInput, CategoryFilters, CategoryPopulateParam>;
|
|
578
|
+
faq: SingleTypeAPI<Faq, FaqInput, FaqFilters, FaqPopulateParam>;
|
|
579
|
+
galleries: CollectionAPI<Gallery, GalleryInput, GalleryFilters, GalleryPopulateParam>;
|
|
580
|
+
guides: CollectionAPI<Guide, GuideInput, GuideFilters, GuidePopulateParam>;
|
|
581
|
+
guideCategories: CollectionAPI<GuideCategory, GuideCategoryInput, GuideCategoryFilters, GuideCategoryPopulateParam>;
|
|
582
|
+
guidePage: SingleTypeAPI<GuidePage, GuidePageInput, GuidePageFilters, GuidePagePopulateParam>;
|
|
583
|
+
items: ItemAPI;
|
|
584
|
+
landing: SingleTypeAPI<Landing, LandingInput, LandingFilters, LandingPopulateParam>;
|
|
585
|
+
legals: CollectionAPI<Legal, LegalInput, LegalFilters>;
|
|
586
|
+
partnerCommissions: CollectionAPI<PartnerCommission, PartnerCommissionInput, PartnerCommissionFilters, PartnerCommissionPopulateParam>;
|
|
587
|
+
partnerProfiles: PartnerProfileAPI;
|
|
588
|
+
partnerSetting: SingleTypeAPI<PartnerSetting, PartnerSettingInput, PartnerSettingFilters>;
|
|
589
|
+
payments: CollectionAPI<Payment, PaymentInput, PaymentFilters, PaymentPopulateParam>;
|
|
590
|
+
plans: CollectionAPI<Plan, PlanInput, PlanFilters, PlanPopulateParam>;
|
|
591
|
+
projects: CollectionAPI<Project, ProjectInput, ProjectFilters, ProjectPopulateParam>;
|
|
592
|
+
projectChats: CollectionAPI<ProjectChat, ProjectChatInput, ProjectChatFilters, ProjectChatPopulateParam>;
|
|
593
|
+
referrals: CollectionAPI<Referral, ReferralInput, ReferralFilters, ReferralPopulateParam>;
|
|
594
|
+
subscriptions: CollectionAPI<Subscription, SubscriptionInput, SubscriptionFilters, SubscriptionPopulateParam>;
|
|
595
|
+
supports: CollectionAPI<Support, SupportInput, SupportFilters, SupportPopulateParam>;
|
|
596
|
+
supportCategories: CollectionAPI<SupportCategory, SupportCategoryInput, SupportCategoryFilters, SupportCategoryPopulateParam>;
|
|
597
|
+
supportCenter: SingleTypeAPI<SupportCenter, SupportCenterInput, SupportCenterFilters, SupportCenterPopulateParam>;
|
|
598
|
+
supportThemes: CollectionAPI<SupportTheme, SupportThemeInput, SupportThemeFilters, SupportThemePopulateParam>;
|
|
599
|
+
teams: CollectionAPI<Team, TeamInput, TeamFilters, TeamPopulateParam>;
|
|
600
|
+
teamInvitations: TeamInvitationAPI;
|
|
601
|
+
teamMembers: TeamMemberAPI;
|
|
602
|
+
tokenTransactions: CollectionAPI<TokenTransaction, TokenTransactionInput, TokenTransactionFilters, TokenTransactionPopulateParam>;
|
|
603
|
+
userSessions: CollectionAPI<UserSession, UserSessionInput, UserSessionFilters, UserSessionPopulateParam>;
|
|
604
|
+
websites: CollectionAPI<Website, WebsiteInput, WebsiteFilters, WebsitePopulateParam>;
|
|
605
|
+
checkout: CheckoutAPI;
|
|
606
|
+
kickstarter: KickstarterAPI;
|
|
607
|
+
webhook: WebhookAPI;
|
|
608
|
+
constructor(config: StrapiClientConfig);
|
|
609
|
+
setToken(token: string): void;
|
|
610
|
+
/**
|
|
611
|
+
* Validate that local types match the remote Strapi schema.
|
|
612
|
+
* Useful for detecting schema drift in development.
|
|
613
|
+
* @returns Promise<{ valid: boolean; localHash: string; remoteHash?: string; error?: string }>
|
|
614
|
+
*/
|
|
615
|
+
validateSchema(): Promise<{
|
|
616
|
+
valid: boolean;
|
|
617
|
+
localHash: string;
|
|
618
|
+
remoteHash?: string;
|
|
619
|
+
error?: string;
|
|
620
|
+
}>;
|
|
621
|
+
}
|
|
622
|
+
export {};
|