@oneclick.dev/cms-kit 0.0.121 → 0.0.123
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/charts.cjs +1 -1
- package/dist/charts.d.ts +1 -1
- package/dist/charts.js +1 -1
- package/dist/cms-kit.cjs +1 -1
- package/dist/cms-kit.js +1 -1
- package/dist/components.cjs +81 -60
- package/dist/components.css +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +93 -68
- package/dist/composables-8bnxjg0G.cjs +1 -0
- package/dist/composables-DQepEP7n.js +1 -0
- package/dist/flow-builder.cjs +1 -1
- package/dist/flow-builder.d.ts +1 -1
- package/dist/flow-builder.js +1 -1
- package/dist/index-Bv9gy746.js +82 -0
- package/dist/index-Cb1ikz7J.cjs +82 -0
- package/dist/index-DPMTYxRM.cjs +1 -0
- package/dist/index-IJyvgbJH.cjs +1 -0
- package/dist/index-YMaY4uuk.js +1 -0
- package/dist/index-lmHRQuzf.js +1 -0
- package/dist/index.css +1 -1
- package/dist/index.d.ts +564 -4
- package/package.json +56 -57
- package/dist/chart-CAmUIEtB.js +0 -82
- package/dist/chart-DJkKL3jS.cjs +0 -82
- package/dist/chunk-DY6MoR0Z.cjs +0 -1
- package/dist/chunk-DpHrC4oO.js +0 -1
- package/dist/components/ui/chart/ChartContainer.vue.d.ts +0 -25
- package/dist/components/ui/chart/ChartLegendContent.vue.d.ts +0 -12
- package/dist/components/ui/chart/ChartStyle.vue.d.ts +0 -7
- package/dist/components/ui/chart/ChartTooltipContent.vue.d.ts +0 -32
- package/dist/components/ui/flow-builder/components/nodes/NodeContextMenu.vue.d.ts +0 -32
- package/dist/components/ui/flow-builder/components/toolbars/DefaultToolbar.vue.d.ts +0 -43
- package/dist/composables/index.d.ts +0 -2
- package/dist/composables/useCms.d.ts +0 -4
- package/dist/composables-B025TiVC.js +0 -1
- package/dist/composables-DSF8jtq1.cjs +0 -1
- package/dist/dist-CJX2bd1a.cjs +0 -1
- package/dist/dist-CL6Px27r.js +0 -1
- package/dist/flow-builder-BsoABRwv.cjs +0 -1
- package/dist/flow-builder-D_IHjMdV.js +0 -1
- package/dist/lib/composables.d.ts +0 -312
- package/dist/lib/interpolation.d.ts +0 -14
- package/dist/lib/postMessageAwait.d.ts +0 -1
- package/dist/lib/utils.d.ts +0 -16
- package/dist/types/custom-modules.d.ts +0 -117
- package/dist/types/index.d.ts +0 -2
- package/dist/types/integrations.d.ts +0 -21
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,564 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { FetchOptions } from 'ofetch';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { useLayout } from '../components/ui/flow-builder/composables/useLayout';
|
|
4
|
+
import { useRunProcess } from '../components/ui/flow-builder/composables/useRunProcess';
|
|
5
|
+
|
|
6
|
+
declare type ArrayizeIfMultiple<S, TSetting> = TSetting extends {
|
|
7
|
+
multiple: true;
|
|
8
|
+
} ? S[] : S;
|
|
9
|
+
|
|
10
|
+
export declare interface BaseSetting<T> {
|
|
11
|
+
label: string;
|
|
12
|
+
description?: string;
|
|
13
|
+
type: SettingType;
|
|
14
|
+
default?: T;
|
|
15
|
+
required?: boolean;
|
|
16
|
+
valuesFrom?: string;
|
|
17
|
+
visibility?: {
|
|
18
|
+
dependsOn: string[];
|
|
19
|
+
visibleWhen: Record<string, (val: any) => boolean>;
|
|
20
|
+
enabledWhen?: Record<string, (val: any) => boolean>;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare interface BreadcrumbItem {
|
|
25
|
+
text: string;
|
|
26
|
+
href?: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
declare interface BuilderState {
|
|
30
|
+
show: boolean;
|
|
31
|
+
variableContext: Variable[];
|
|
32
|
+
resolve: ((value: Object | null) => void) | null;
|
|
33
|
+
action?: any;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export declare interface CheckboxSetting extends BaseSetting<boolean> {
|
|
37
|
+
type: 'checkbox';
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export declare type CmsRouterLocation = string | {
|
|
41
|
+
name?: string;
|
|
42
|
+
path?: string;
|
|
43
|
+
params?: Record<string, any>;
|
|
44
|
+
query?: Record<string, any>;
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/** ----------------- config groups ----------------- **/
|
|
48
|
+
export declare type ConditionOperator = 'isNotEmpty' | 'isEmpty' | 'equals' | 'notEquals';
|
|
49
|
+
|
|
50
|
+
export declare function configGroup<const F extends ModuleSettingsSchema>(opts: {
|
|
51
|
+
label?: string;
|
|
52
|
+
description?: string;
|
|
53
|
+
visibleWhen: GroupConditions;
|
|
54
|
+
fields: F & ValidateSettingDefaults<F>;
|
|
55
|
+
}): SettingGroup<F>;
|
|
56
|
+
|
|
57
|
+
declare interface CustomDialogState {
|
|
58
|
+
id: number;
|
|
59
|
+
show: boolean;
|
|
60
|
+
layout: string;
|
|
61
|
+
variables: any;
|
|
62
|
+
resolve: ((result: any) => void) | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export declare interface DataQuerySetting extends BaseSetting<string> {
|
|
66
|
+
type: 'dataQuery';
|
|
67
|
+
accept?: string[];
|
|
68
|
+
integrationKey?: string;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export declare function defineModuleConfig<const S extends ModuleConfigSchema>(schema: S & ValidateDefaults<S>): S & ValidateDefaults<S>;
|
|
72
|
+
|
|
73
|
+
/** Evaluate group conditions against current config values */
|
|
74
|
+
export declare function evaluateGroupConditions(conditions: GroupConditions, configValues: Record<string, any>): boolean;
|
|
75
|
+
|
|
76
|
+
export declare interface FieldCondition {
|
|
77
|
+
operator: ConditionOperator;
|
|
78
|
+
value?: any;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export declare interface FirestoreQueryParamFilter {
|
|
82
|
+
field: string;
|
|
83
|
+
operator: '<' | '<=' | '==' | '!=' | '>=' | '>' | 'array-contains' | 'in' | 'not-in' | 'array-contains-any';
|
|
84
|
+
value: any;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export declare interface FirestoreQueryParams {
|
|
88
|
+
filters?: FirestoreQueryParamFilter[];
|
|
89
|
+
sorts?: FirestoreQueryParamSort[];
|
|
90
|
+
limit?: number;
|
|
91
|
+
startAt?: string;
|
|
92
|
+
endAt?: string;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export declare interface FirestoreQueryParamSort {
|
|
96
|
+
field: string;
|
|
97
|
+
direction: 'asc' | 'desc';
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/** Flatten a ModuleConfigSchema (with possible groups) into a flat settings map */
|
|
101
|
+
export declare function flattenConfigSchema(schema: ModuleConfigSchema): ModuleSettingsSchema;
|
|
102
|
+
|
|
103
|
+
declare interface FlowBuilderState {
|
|
104
|
+
id: number;
|
|
105
|
+
show: boolean;
|
|
106
|
+
config: any;
|
|
107
|
+
workflow: any;
|
|
108
|
+
resolve: ((val: any) => void) | null;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export declare interface FlowSetting extends BaseSetting<any> {
|
|
112
|
+
type: 'flow';
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export declare interface FormSetting extends BaseSetting<any> {
|
|
116
|
+
type: 'form';
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
export declare type GroupConditions = Record<string, ConditionOperator | FieldCondition>;
|
|
120
|
+
|
|
121
|
+
declare type GroupFieldValues<TSchema extends ModuleConfigSchema> = {
|
|
122
|
+
[K in keyof TSchema]: TSchema[K] extends SettingGroup<infer F> ? {
|
|
123
|
+
[FK in keyof F]: ValueTypeFromSetting<F[FK]>;
|
|
124
|
+
} : {};
|
|
125
|
+
}[keyof TSchema];
|
|
126
|
+
|
|
127
|
+
export declare interface InputSetting extends BaseSetting<string> {
|
|
128
|
+
type: 'input' | 'textarea' | 'color';
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare interface MediaSourceCreateParams {
|
|
132
|
+
name: string;
|
|
133
|
+
integrationId: string;
|
|
134
|
+
path: string;
|
|
135
|
+
allowUserFolders: boolean;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export declare interface MediaSourceSetting extends BaseSetting<string> {
|
|
139
|
+
type: 'mediaSource';
|
|
140
|
+
multiple?: boolean;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
declare interface MediaSourceUpdateParams {
|
|
144
|
+
name?: string;
|
|
145
|
+
integrationId?: string;
|
|
146
|
+
path?: string;
|
|
147
|
+
allowUserFolders?: boolean;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export declare type ModuleConfigSchema = Record<string, ModuleSetting | SettingGroup>;
|
|
151
|
+
|
|
152
|
+
export declare interface ModuleMetadata {
|
|
153
|
+
name: string;
|
|
154
|
+
description: string;
|
|
155
|
+
icon?: string;
|
|
156
|
+
version?: string;
|
|
157
|
+
author?: string;
|
|
158
|
+
tags?: string[];
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export declare type ModuleSetting = SelectSetting | CheckboxSetting | InputSetting | NumberSetting | ResourceSetting | MediaSourceSetting | DataQuerySetting | FlowSetting | FormSetting;
|
|
162
|
+
|
|
163
|
+
export declare type ModuleSettingsSchema = Record<string, ModuleSetting>;
|
|
164
|
+
|
|
165
|
+
export declare interface NumberSetting extends BaseSetting<number> {
|
|
166
|
+
type: 'number';
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
declare interface OverlayState {
|
|
170
|
+
show: boolean;
|
|
171
|
+
projectId: string;
|
|
172
|
+
moduleId: string;
|
|
173
|
+
params: Record<string, string>;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
export declare type ResolveConfig<TSchema extends ModuleConfigSchema> = Simplify<TopLevelValues<TSchema> & UnionToIntersection<GroupFieldValues<TSchema>>>;
|
|
177
|
+
|
|
178
|
+
export declare interface ResourceSetting extends BaseSetting<string> {
|
|
179
|
+
type: 'resource';
|
|
180
|
+
accept?: string[];
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/** ----------------- value typing ----------------- **/
|
|
184
|
+
declare type ScalarForType<T extends SettingType> = T extends 'checkbox' ? boolean : T extends 'number' ? number : T extends 'input' | 'textarea' | 'color' | 'resource' | 'dataQuery' ? string : T extends 'mediaSource' ? string : T extends 'select' | 'radio' ? string : T extends 'flow' ? any : T extends 'form' ? any : never;
|
|
185
|
+
|
|
186
|
+
export declare interface SelectSetting extends BaseSetting<string> {
|
|
187
|
+
type: 'select' | 'radio';
|
|
188
|
+
options?: {
|
|
189
|
+
label: string;
|
|
190
|
+
value: string;
|
|
191
|
+
}[];
|
|
192
|
+
predefinedOptions?: 'languages' | 'countries' | 'timezones' | 'currencies';
|
|
193
|
+
multiple?: boolean;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export declare interface SendMailParams {
|
|
197
|
+
to: string;
|
|
198
|
+
subject: string;
|
|
199
|
+
body: string;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export declare interface SettingGroup<F extends ModuleSettingsSchema = ModuleSettingsSchema> {
|
|
203
|
+
_group: true;
|
|
204
|
+
label?: string;
|
|
205
|
+
description?: string;
|
|
206
|
+
visibleWhen: GroupConditions;
|
|
207
|
+
fields: F;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export declare type SettingType = 'checkbox' | 'input' | 'textarea' | 'select' | 'radio' | 'number' | 'color' | 'resource' | 'mediaSource' | 'dataQuery' | 'flow' | 'form';
|
|
211
|
+
|
|
212
|
+
declare type Simplify<T> = {
|
|
213
|
+
[K in keyof T]: T[K];
|
|
214
|
+
};
|
|
215
|
+
|
|
216
|
+
declare type TopLevelValues<TSchema extends ModuleConfigSchema> = {
|
|
217
|
+
[K in keyof TSchema as TSchema[K] extends ModuleSetting ? K : never]: TSchema[K] extends ModuleSetting ? ValueTypeFromSetting<TSchema[K]> : never;
|
|
218
|
+
};
|
|
219
|
+
|
|
220
|
+
declare type UnionToIntersection<U> = (U extends any ? (x: U) => void : never) extends (x: infer I) => void ? I : never;
|
|
221
|
+
|
|
222
|
+
export declare type UseAgencyIntegrations = () => {
|
|
223
|
+
getAgencyIntegrations: () => Promise<any>;
|
|
224
|
+
getAgencyIntegration: (integrationId: string) => Promise<any>;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
export declare const useAgencyIntegrations: () => {
|
|
228
|
+
getAgencyIntegrations: () => Promise<any>;
|
|
229
|
+
getAgencyIntegration: (integrationId: string) => Promise<any>;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
export declare type UseAI = (integrationId: string) => {
|
|
233
|
+
generateObject: (schema: any, prompt: string, options?: any) => Promise<any>;
|
|
234
|
+
};
|
|
235
|
+
|
|
236
|
+
export declare const useAI: (integrationId: string) => {
|
|
237
|
+
generateObject: (schema: any, prompt: string, options?: any) => Promise<any>;
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
export declare function useCms(): {
|
|
241
|
+
breadcrumbs: {};
|
|
242
|
+
project: {};
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export declare type UseConfirmation = () => {
|
|
246
|
+
confirm: (message: string, title?: string, confirmText?: string) => Promise<boolean>;
|
|
247
|
+
};
|
|
248
|
+
|
|
249
|
+
export declare const useConfirmation: () => ReturnType<UseConfirmation>;
|
|
250
|
+
|
|
251
|
+
export declare type UseCustomDialog = () => {
|
|
252
|
+
customDialogStack: CustomDialogState[];
|
|
253
|
+
openCustomDialog: (layout: string, variables: Variable[]) => Promise<any>;
|
|
254
|
+
closeCustomDialog: (id: number, result: any) => void;
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
export declare const useCustomDialog: () => {
|
|
258
|
+
customDialogStack: CustomDialogState[];
|
|
259
|
+
openCustomDialog: (layout: string, variables: Variable[]) => Promise<any>;
|
|
260
|
+
closeCustomDialog: (id: number, result: any) => void;
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export declare type UseFirebaseIntegration = (projectId: string) => {
|
|
264
|
+
add: (collection: string, data: Record<string, any>) => Promise<any>;
|
|
265
|
+
find: (collection: string, query?: FirestoreQueryParams) => Promise<any>;
|
|
266
|
+
get: (collectionOrPath: string, id?: string) => Promise<any>;
|
|
267
|
+
update: (collectionOrPath: string, id: string | undefined | null, data: Record<string, any>) => Promise<any>;
|
|
268
|
+
remove: (collectionOrPath: string, id?: string) => Promise<any>;
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
export declare const useFirebaseIntegration: (projectId: string) => {
|
|
272
|
+
add: (collection: string, data: Record<string, any>) => Promise<any>;
|
|
273
|
+
find: (collection: string, query?: FirestoreQueryParams) => Promise<any>;
|
|
274
|
+
get: (collectionOrPath: string, id?: string) => Promise<any>;
|
|
275
|
+
update: (collectionOrPath: string, id: string | undefined | null, data: Record<string, any>) => Promise<any>;
|
|
276
|
+
remove: (collectionOrPath: string, id?: string) => Promise<any>;
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
export declare type UseFlowBuilder = () => {
|
|
280
|
+
flowBuilderStack: FlowBuilderState[];
|
|
281
|
+
openFlowBuilder: (workflow: any, config?: any, externalVariables?: any[], formBuilderExtensions?: any[], flowBuilderExtensions?: any[]) => Promise<any>;
|
|
282
|
+
closeFlowBuilder: (id: number, result: any) => void;
|
|
283
|
+
runFlow: (workflow: any, context: any, formBuilderExtensions?: any[], flowBuilderExtensions?: any[]) => Promise<any>;
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
export declare const useFlowBuilder: () => ReturnType<UseFlowBuilder>;
|
|
287
|
+
|
|
288
|
+
export declare type UseFormBuilder = () => {
|
|
289
|
+
formBuilderStack: any[];
|
|
290
|
+
openFormBuilder: (config?: any) => Promise<any>;
|
|
291
|
+
closeFormBuilder: (id: number, result: any) => void;
|
|
292
|
+
};
|
|
293
|
+
|
|
294
|
+
export declare const useFormBuilder: () => ReturnType<UseFormBuilder>;
|
|
295
|
+
|
|
296
|
+
export declare type UseGoogleServiceAccountIntegration = (integrationId: string) => {
|
|
297
|
+
getGeoPoint: (address: string) => Promise<{
|
|
298
|
+
lat: number;
|
|
299
|
+
lng: number;
|
|
300
|
+
}>;
|
|
301
|
+
};
|
|
302
|
+
|
|
303
|
+
export declare const useGoogleServiceAccountIntegration: (integrationId: string) => {
|
|
304
|
+
getGeoPoint: (address: string) => Promise<{
|
|
305
|
+
lat: number;
|
|
306
|
+
lng: number;
|
|
307
|
+
}>;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
export declare type UseIntegrationActionBuilder = () => {
|
|
311
|
+
showBuilder: (variableContext: Variable[], action?: any) => Promise<Object | null>;
|
|
312
|
+
onConfirm: (action: Object) => void;
|
|
313
|
+
onCancel: () => void;
|
|
314
|
+
builderState: Ref<BuilderState>;
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
export declare const useIntegrationActionBuilder: () => {
|
|
318
|
+
showBuilder: (variableContext: Variable[], action?: any) => Promise<Object | null>;
|
|
319
|
+
onConfirm: (action: Object) => void;
|
|
320
|
+
onCancel: () => void;
|
|
321
|
+
builderState: Ref<BuilderState>;
|
|
322
|
+
};
|
|
323
|
+
|
|
324
|
+
export declare type UseIntegrationActions = (integrationId: string) => {
|
|
325
|
+
fireAction: (action: any, variableContext: Record<string, any>) => Promise<any>;
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
export declare const useIntegrationActions: (integrationId: string) => {
|
|
329
|
+
fireAction: (action: any, variableContext: Record<string, any>) => Promise<any>;
|
|
330
|
+
};
|
|
331
|
+
|
|
332
|
+
export declare type UseIntegrations = () => {
|
|
333
|
+
getProjectIntegrations: (projectId: string) => Promise<any>;
|
|
334
|
+
getProjectIntegration: (projectId: string, integrationId: string) => Promise<any>;
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
export declare const useIntegrations: () => {
|
|
338
|
+
getProjectIntegrations: (projectId: string) => Promise<any>;
|
|
339
|
+
getProjectIntegration: (projectId: string, integrationId: string) => Promise<any>;
|
|
340
|
+
};
|
|
341
|
+
|
|
342
|
+
export { useLayout }
|
|
343
|
+
|
|
344
|
+
export declare type UseLogs = () => {
|
|
345
|
+
log: (message: string, data?: any) => void;
|
|
346
|
+
logWarning: (message: string, data?: any) => void;
|
|
347
|
+
logError: (message: string, data?: any) => void;
|
|
348
|
+
};
|
|
349
|
+
|
|
350
|
+
export declare const useLogs: () => ReturnType<UseLogs>;
|
|
351
|
+
|
|
352
|
+
export declare type UseMailer = (integrationId: string) => {
|
|
353
|
+
sendMail: (...opts: SendMailParams[]) => Promise<any>;
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
export declare const useMailer: (integrationId: string) => {
|
|
357
|
+
sendMail: (...opts: SendMailParams[]) => Promise<any>;
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
export declare type UseMediaLibrary = () => {
|
|
361
|
+
getMediaSources: (projectSlug: string) => Promise<any>;
|
|
362
|
+
getMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
|
|
363
|
+
createMediaSource: (projectSlug: string, params: MediaSourceCreateParams) => Promise<any>;
|
|
364
|
+
updateMediaSource: (projectSlug: string, sourceId: string, params: MediaSourceUpdateParams) => Promise<any>;
|
|
365
|
+
deleteMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
|
|
366
|
+
uploadFile: (sourceId: string, file: File, path?: string) => Promise<any>;
|
|
367
|
+
getStorageContent: (sourceId: string, path?: string) => Promise<any>;
|
|
368
|
+
deleteStorageFile: (sourceId: string, filePath: string) => Promise<any>;
|
|
369
|
+
renameStorageFile: (sourceId: string, fileUrl: string, oldPath: string, newName: string) => Promise<any>;
|
|
370
|
+
moveStorageFile: (sourceId: string, fileUrl: string, oldPath: string, newFolderPath: string) => Promise<any>;
|
|
371
|
+
};
|
|
372
|
+
|
|
373
|
+
export declare const useMediaLibrary: () => {
|
|
374
|
+
getMediaSources: (projectSlug: string) => Promise<any>;
|
|
375
|
+
getMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
|
|
376
|
+
createMediaSource: (projectSlug: string, params: MediaSourceCreateParams) => Promise<any>;
|
|
377
|
+
updateMediaSource: (projectSlug: string, sourceId: string, params: MediaSourceUpdateParams) => Promise<any>;
|
|
378
|
+
deleteMediaSource: (projectSlug: string, sourceId: string) => Promise<any>;
|
|
379
|
+
uploadFile: (sourceId: string, file: File, path?: string) => Promise<any>;
|
|
380
|
+
getStorageContent: (sourceId: string, path?: string) => Promise<any>;
|
|
381
|
+
deleteStorageFile: (sourceId: string, filePath: string) => Promise<any>;
|
|
382
|
+
renameStorageFile: (sourceId: string, fileUrl: string, oldPath: string, newName: string) => Promise<any>;
|
|
383
|
+
moveStorageFile: (sourceId: string, fileUrl: string, oldPath: string, newFolderPath: string) => Promise<any>;
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
export declare type UseModule = () => {
|
|
387
|
+
config: Record<string, any>;
|
|
388
|
+
};
|
|
389
|
+
|
|
390
|
+
export declare const useModule: () => ReturnType<UseModule>;
|
|
391
|
+
|
|
392
|
+
export declare type UseModuleApi = () => {
|
|
393
|
+
get: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
|
|
394
|
+
post: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
|
|
395
|
+
patch: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
|
|
396
|
+
del: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
|
|
397
|
+
};
|
|
398
|
+
|
|
399
|
+
export declare const useModuleApi: () => {
|
|
400
|
+
get: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
|
|
401
|
+
post: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
|
|
402
|
+
patch: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
|
|
403
|
+
del: <T = any>(path: string, options?: FetchOptions) => Promise<T>;
|
|
404
|
+
};
|
|
405
|
+
|
|
406
|
+
export declare type UseModuleBreadcrumbs = (factory: () => BreadcrumbItem[]) => {};
|
|
407
|
+
|
|
408
|
+
export declare const useModuleBreadcrumbs: (factory: () => BreadcrumbItem[]) => {};
|
|
409
|
+
|
|
410
|
+
export declare type UseModuleOverlay = () => {
|
|
411
|
+
openInOverlay: (moduleId: string, params?: Record<string, string>) => void;
|
|
412
|
+
overlayState: OverlayState;
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
export declare const useModuleOverlay: () => {
|
|
416
|
+
openInOverlay: (moduleId: string, params?: Record<string, string>) => void;
|
|
417
|
+
overlayState: OverlayState;
|
|
418
|
+
};
|
|
419
|
+
|
|
420
|
+
export declare type UseModulePermissions = () => {
|
|
421
|
+
isAdmin: () => boolean;
|
|
422
|
+
isSuperAdmin: () => boolean;
|
|
423
|
+
hasPermission: (permission: string) => boolean;
|
|
424
|
+
hasAnyPermission: (...permissions: string[]) => boolean;
|
|
425
|
+
hasEveryPermission: (...permissions: string[]) => boolean;
|
|
426
|
+
};
|
|
427
|
+
|
|
428
|
+
export declare const useModulePermissions: () => ReturnType<UseModulePermissions>;
|
|
429
|
+
|
|
430
|
+
export declare type UseModuleRoute = () => {
|
|
431
|
+
navigateTo: (path?: string | number) => void;
|
|
432
|
+
projectId: string;
|
|
433
|
+
moduleId: string;
|
|
434
|
+
basePath: string;
|
|
435
|
+
params: Record<string, string>;
|
|
436
|
+
query: Record<string, string>;
|
|
437
|
+
pageComponent: any;
|
|
438
|
+
};
|
|
439
|
+
|
|
440
|
+
export declare const useModuleRoute: () => ReturnType<UseModuleRoute>;
|
|
441
|
+
|
|
442
|
+
export declare type UseModuleStorage = () => {
|
|
443
|
+
getModuleData: (key: string) => any;
|
|
444
|
+
setModuleData: (key: string, value: any) => void;
|
|
445
|
+
removeModuleData: (key: string) => void;
|
|
446
|
+
clearModuleData: () => void;
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
export declare const useModuleStorage: () => ReturnType<UseModuleStorage>;
|
|
450
|
+
|
|
451
|
+
export declare type UseOverlayParams = () => Ref<Record<string, any>>;
|
|
452
|
+
|
|
453
|
+
export declare const useOverlayParams: () => Ref<Record<string, any>, Record<string, any>>;
|
|
454
|
+
|
|
455
|
+
export declare type UseOverlayStack = () => {
|
|
456
|
+
stack: string[];
|
|
457
|
+
push(id: string): void;
|
|
458
|
+
pop(id: string): void;
|
|
459
|
+
isTop(id: string): boolean;
|
|
460
|
+
};
|
|
461
|
+
|
|
462
|
+
export declare const useOverlayStack: () => {
|
|
463
|
+
stack: string[];
|
|
464
|
+
push(id: string): void;
|
|
465
|
+
pop(id: string): void;
|
|
466
|
+
isTop(id: string): boolean;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
export declare type UseProjectService = () => {};
|
|
470
|
+
|
|
471
|
+
export declare const useProjectService: () => {};
|
|
472
|
+
|
|
473
|
+
export declare type UseProjectSettings = () => {
|
|
474
|
+
project: any;
|
|
475
|
+
refreshProject: () => Promise<void>;
|
|
476
|
+
getTimezone: () => string;
|
|
477
|
+
getOffset: () => number;
|
|
478
|
+
getOffsetInMinutes: () => number;
|
|
479
|
+
formatDate: (date: string | Date) => string;
|
|
480
|
+
getCurrency: () => string;
|
|
481
|
+
formatCurrency: (amount: number, currency?: string) => string;
|
|
482
|
+
};
|
|
483
|
+
|
|
484
|
+
export declare const useProjectSettings: () => {
|
|
485
|
+
project: any;
|
|
486
|
+
refreshProject: () => Promise<void>;
|
|
487
|
+
getTimezone: () => string;
|
|
488
|
+
getOffset: () => number;
|
|
489
|
+
getOffsetInMinutes: () => number;
|
|
490
|
+
formatDate: (date: string | Date) => string;
|
|
491
|
+
getCurrency: () => string;
|
|
492
|
+
formatCurrency: (amount: number, currency?: string) => string;
|
|
493
|
+
};
|
|
494
|
+
|
|
495
|
+
export declare type UseQueryBuilder = () => {};
|
|
496
|
+
|
|
497
|
+
export declare const useQueryBuilder: () => {};
|
|
498
|
+
|
|
499
|
+
export declare type UseRoute = () => {
|
|
500
|
+
path: string;
|
|
501
|
+
fullPath: string;
|
|
502
|
+
name?: string | null;
|
|
503
|
+
params: Record<string, any>;
|
|
504
|
+
query: Record<string, any>;
|
|
505
|
+
hash: string;
|
|
506
|
+
meta?: Record<string, any>;
|
|
507
|
+
matched?: any[];
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
export declare const useRoute: () => {
|
|
511
|
+
path: string;
|
|
512
|
+
fullPath: string;
|
|
513
|
+
name?: string | null;
|
|
514
|
+
params: Record<string, any>;
|
|
515
|
+
query: Record<string, any>;
|
|
516
|
+
hash: string;
|
|
517
|
+
meta?: Record<string, any>;
|
|
518
|
+
matched?: any[];
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
export declare type UseRouter = () => {
|
|
522
|
+
push: (to: CmsRouterLocation) => Promise<any> | void;
|
|
523
|
+
replace: (to: CmsRouterLocation) => Promise<any> | void;
|
|
524
|
+
back: () => void;
|
|
525
|
+
};
|
|
526
|
+
|
|
527
|
+
export declare const useRouter: () => {
|
|
528
|
+
push: (to: CmsRouterLocation) => Promise<any> | void;
|
|
529
|
+
replace: (to: CmsRouterLocation) => Promise<any> | void;
|
|
530
|
+
back: () => void;
|
|
531
|
+
};
|
|
532
|
+
|
|
533
|
+
export { useRunProcess }
|
|
534
|
+
|
|
535
|
+
export declare type UseUtilsService = () => {
|
|
536
|
+
urlToBase64: (url: string) => Promise<{
|
|
537
|
+
base64: string;
|
|
538
|
+
contentType: string;
|
|
539
|
+
}>;
|
|
540
|
+
};
|
|
541
|
+
|
|
542
|
+
export declare const useUtilsService: () => ReturnType<UseUtilsService>;
|
|
543
|
+
|
|
544
|
+
declare type ValidateDefaults<TSchema extends ModuleConfigSchema> = {
|
|
545
|
+
[K in keyof TSchema]: TSchema[K] extends SettingGroup ? TSchema[K] : TSchema[K] extends ModuleSetting ? TSchema[K] extends {
|
|
546
|
+
default: infer D;
|
|
547
|
+
} ? (D extends ValueTypeFromSetting<TSchema[K]> ? TSchema[K] : never) : TSchema[K] : TSchema[K];
|
|
548
|
+
};
|
|
549
|
+
|
|
550
|
+
declare type ValidateSettingDefaults<TSchema extends ModuleSettingsSchema> = {
|
|
551
|
+
[K in keyof TSchema]: TSchema[K] extends {
|
|
552
|
+
default: infer D;
|
|
553
|
+
} ? (D extends ValueTypeFromSetting<TSchema[K]> ? TSchema[K] : never) : TSchema[K];
|
|
554
|
+
};
|
|
555
|
+
|
|
556
|
+
declare type ValueTypeFromSetting<TSetting extends ModuleSetting> = ArrayizeIfMultiple<ScalarForType<TSetting['type']>, TSetting>;
|
|
557
|
+
|
|
558
|
+
declare interface Variable {
|
|
559
|
+
name: string;
|
|
560
|
+
type: string;
|
|
561
|
+
value: any;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export { }
|