@levo-so/core 0.3.14 → 0.3.15
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.ts +271 -2
- package/dist/index.js +72 -72
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -378,6 +378,254 @@ export declare interface IAddress {
|
|
|
378
378
|
is_primary: boolean;
|
|
379
379
|
}
|
|
380
380
|
|
|
381
|
+
/** Who last wrote a cell. A human edit pins the value against every later bulk run. */
|
|
382
|
+
export declare type IAiCellAuthor = "ai" | "human";
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* How an ATTEMPTED cell turned out — one that actually reached a model. `null`
|
|
386
|
+
* means it worked.
|
|
387
|
+
*
|
|
388
|
+
* `insufficient_information` is **not a failure**: the model was reached and
|
|
389
|
+
* honestly said it couldn't tell from the given fields, which the prompt asks for
|
|
390
|
+
* instead of a guess. It means the instruction needs more source columns.
|
|
391
|
+
*/
|
|
392
|
+
export declare type IAiCellReason = "insufficient_information" | "validation_failed" | "model_failed";
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Per-cell provenance, returned on an entry under `_ai`, keyed by field key.
|
|
396
|
+
*
|
|
397
|
+
* There is deliberately no status field: a cell failed exactly when `reason` is
|
|
398
|
+
* set, so a status enum would be a second way to say the same thing. Progress
|
|
399
|
+
* lives on the run's counters, not per cell.
|
|
400
|
+
*/
|
|
401
|
+
export declare interface IAiCellState {
|
|
402
|
+
by: IAiCellAuthor;
|
|
403
|
+
at: string;
|
|
404
|
+
/** Hash of the source values used. Null on a human-written cell — it has no inputs. */
|
|
405
|
+
fingerprint: string | null;
|
|
406
|
+
instruction_version: number | null;
|
|
407
|
+
/** `null` means the fill worked. */
|
|
408
|
+
reason: IAiCellReason | null;
|
|
409
|
+
/** Human-readable detail, present only alongside `reason`. */
|
|
410
|
+
error: string | null;
|
|
411
|
+
run_id: string | null;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* `_ai` as it arrives on an entry: field key → provenance.
|
|
416
|
+
*
|
|
417
|
+
* Nullable because that is what the wire returns — a row no fill has ever touched
|
|
418
|
+
* carries `_ai: null`, not `{}`. Typing it as a bare record would let a consumer
|
|
419
|
+
* index straight into a runtime null.
|
|
420
|
+
*/
|
|
421
|
+
export declare type IAiEntryState = Record<string, IAiCellState> | null;
|
|
422
|
+
|
|
423
|
+
/**
|
|
424
|
+
* AI field autofill — a per-field instruction that fills that column's cells from
|
|
425
|
+
* the rest of each entry, plus the provenance the fill leaves behind on the cell.
|
|
426
|
+
*
|
|
427
|
+
* Config is written through its own endpoint (`/collection/:key/ai-field/:field_id`),
|
|
428
|
+
* NOT through the whole-collection save — it lives in its own column on the field and
|
|
429
|
+
* carries its own version counter.
|
|
430
|
+
*/
|
|
431
|
+
/** The instruction stored on a field. `null` on a field that was never configured. */
|
|
432
|
+
export declare interface IAiFieldConfig {
|
|
433
|
+
enabled: boolean;
|
|
434
|
+
/**
|
|
435
|
+
* The prompt. `@field_key` mentions inside it populate `source_fields`, but an
|
|
436
|
+
* instruction needs none: one that acts on the field's own current value
|
|
437
|
+
* ("rewrite this in 20 words") names no other column and is valid.
|
|
438
|
+
*/
|
|
439
|
+
instruction: string;
|
|
440
|
+
/** Field keys whose values are sent to the model, and whose changes mark a cell stale. */
|
|
441
|
+
source_fields: string[];
|
|
442
|
+
/** Bumped on every instruction change; already-filled cells keep the version they were filled at. */
|
|
443
|
+
version: number;
|
|
444
|
+
updated_at?: string;
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
export declare interface IAiFieldConfigResponse {
|
|
448
|
+
/** Named `config` on the wire, not `ai_config` — that name is only used on the field itself. */
|
|
449
|
+
config: IAiFieldConfig;
|
|
450
|
+
output_contract: IAiOutputContract;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
export declare interface IAiFillCredits {
|
|
454
|
+
used: number;
|
|
455
|
+
/** `null` means uncapped. */
|
|
456
|
+
limit: number | null;
|
|
457
|
+
remaining: number | null;
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
/**
|
|
461
|
+
* An automatic AI fill, ordered alongside notifications in `on_submit` / `on_update`.
|
|
462
|
+
*
|
|
463
|
+
* ORDER IS THE FEATURE. The fill blocks every effect after it: those run against the
|
|
464
|
+
* re-read entry, so a notification printing `{message}` only sees a generated value
|
|
465
|
+
* if it sits BELOW the fill. A fill placed after it does nothing for it.
|
|
466
|
+
*/
|
|
467
|
+
export declare interface IAiFillEffectData {
|
|
468
|
+
id?: string;
|
|
469
|
+
kind: "ai_fill";
|
|
470
|
+
enabled?: boolean;
|
|
471
|
+
condition?: LevoQuery.Where;
|
|
472
|
+
options: {
|
|
473
|
+
/** AI columns to fill, in order. Only columns with an enabled instruction run. */
|
|
474
|
+
field_keys: string[];
|
|
475
|
+
/** Default `continue` — later effects still run, so the email goes out with a blank. */
|
|
476
|
+
on_failure?: IAiFillOnFailure;
|
|
477
|
+
/**
|
|
478
|
+
* Overwrite cells that already hold a value. Defaults to false.
|
|
479
|
+
*
|
|
480
|
+
* A column with a DEFAULT VALUE is never empty, so leaving this off means the
|
|
481
|
+
* fill silently never runs on it. Same for an instruction that rewrites the
|
|
482
|
+
* column's own value. Human-edited cells are protected either way, by a
|
|
483
|
+
* separate guard.
|
|
484
|
+
*/
|
|
485
|
+
include_filled?: boolean;
|
|
486
|
+
delay_value?: number;
|
|
487
|
+
delay_unit?: IDelayUnit;
|
|
488
|
+
};
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
/** What a run would do, before it does it. Calls no model. */
|
|
492
|
+
export declare interface IAiFillEstimate {
|
|
493
|
+
/** Entries the run would actually send to the model. */
|
|
494
|
+
eligible: number;
|
|
495
|
+
skipped: number;
|
|
496
|
+
skipped_breakdown: Partial<Record<IAiSkipReason, number>>;
|
|
497
|
+
/** The real number of rows the scope matches — a counted total, not a capped read. */
|
|
498
|
+
matched: number;
|
|
499
|
+
/**
|
|
500
|
+
* True when the run will walk the collection a page at a time. `eligible` then
|
|
501
|
+
* describes only the FIRST chunk: what a whole run fills depends on how many
|
|
502
|
+
* later rows turn out to be already-filled or human-owned, and on the credit
|
|
503
|
+
* balance lasting — neither knowable up front.
|
|
504
|
+
*/
|
|
505
|
+
chunked: boolean;
|
|
506
|
+
chunk_size: number;
|
|
507
|
+
/** `null` means the plan does not cap fills. */
|
|
508
|
+
limit: number | null;
|
|
509
|
+
used: number | null;
|
|
510
|
+
remaining: number | null;
|
|
511
|
+
allowed: boolean;
|
|
512
|
+
blocked_reason: string | null;
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
/** What to do when the AI cannot produce a value for one of the chosen columns. */
|
|
516
|
+
export declare type IAiFillOnFailure = "continue" | "stop";
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* One run — the thing the user pressed.
|
|
520
|
+
*
|
|
521
|
+
* Every matched row lands in exactly one counter, and once a run finishes:
|
|
522
|
+
* `matched = skipped + total` · `total = succeeded + unanswered + failed (= processed)`
|
|
523
|
+
* `matched` is not stored; derive it when you need it.
|
|
524
|
+
*/
|
|
525
|
+
export declare interface IAiFillRun {
|
|
526
|
+
id: string;
|
|
527
|
+
collection_id: string;
|
|
528
|
+
field_key: string;
|
|
529
|
+
scope: IAiFillScope;
|
|
530
|
+
status: IAiFillRunStatus;
|
|
531
|
+
include_filled: boolean;
|
|
532
|
+
entry_ids: string[];
|
|
533
|
+
instruction_version: number;
|
|
534
|
+
/** What the run attempted — what it actually sent to a model. Written once, after classification. */
|
|
535
|
+
total: number;
|
|
536
|
+
/** Attempted and resolved. The progress bar is `processed / total`. */
|
|
537
|
+
processed: number;
|
|
538
|
+
/** Generated, validated and written. The only counter that bills. */
|
|
539
|
+
succeeded: number;
|
|
540
|
+
/** Reached the model, which honestly couldn't answer. Not billed, and not a failure. */
|
|
541
|
+
unanswered: number;
|
|
542
|
+
/** Never attempted, so never billed — human-owned, already filled, or the row vanished. */
|
|
543
|
+
skipped: number;
|
|
544
|
+
/** Attempted and went wrong: failed the field's validation, or the call broke. */
|
|
545
|
+
failed: number;
|
|
546
|
+
errors: IAiFillRunError[];
|
|
547
|
+
/** Chunked runs walk a large collection a page at a time. */
|
|
548
|
+
cursor_page: number;
|
|
549
|
+
chunks_done: number;
|
|
550
|
+
/** Null on a run that genuinely finished the column. */
|
|
551
|
+
stopped_reason: IAiFillStoppedReason | null;
|
|
552
|
+
started_at: string | null;
|
|
553
|
+
finished_at: string | null;
|
|
554
|
+
cancelled_at: string | null;
|
|
555
|
+
created_at: string;
|
|
556
|
+
updated_at: string;
|
|
557
|
+
created_by: string | null;
|
|
558
|
+
created_by_account?: {
|
|
559
|
+
id: string;
|
|
560
|
+
first_name: string | null;
|
|
561
|
+
last_name: string | null;
|
|
562
|
+
display_email: string | null;
|
|
563
|
+
} | null;
|
|
564
|
+
}
|
|
565
|
+
|
|
566
|
+
export declare interface IAiFillRunError {
|
|
567
|
+
entry_id: string;
|
|
568
|
+
reason: IAiCellReason;
|
|
569
|
+
message: string;
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
export declare type IAiFillRunStatus = "pending" | "processing" | "completed" | "failed" | "cancelled";
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* What a run covers.
|
|
576
|
+
* `single` one entry · `selection` ticked entries · `column` the whole collection ·
|
|
577
|
+
* `outdated` only cells whose source data changed since they were filled.
|
|
578
|
+
*/
|
|
579
|
+
export declare type IAiFillScope = "single" | "selection" | "column" | "outdated";
|
|
580
|
+
|
|
581
|
+
export declare interface IAiFillStartPayload {
|
|
582
|
+
field_key: string;
|
|
583
|
+
scope: IAiFillScope;
|
|
584
|
+
/** Required for `single` and `selection`. */
|
|
585
|
+
entry_ids?: string[];
|
|
586
|
+
/**
|
|
587
|
+
* Overwrite cells that already hold a value. Defaults to false.
|
|
588
|
+
* Required for an instruction that rewrites the field's own value — without it
|
|
589
|
+
* such a run skips every row it was meant to act on.
|
|
590
|
+
*/
|
|
591
|
+
include_filled?: boolean;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
/** Set when a chunked run stopped before exhausting the collection. */
|
|
595
|
+
export declare type IAiFillStoppedReason = "out_of_credits" | "cancelled";
|
|
596
|
+
|
|
597
|
+
/**
|
|
598
|
+
* The human-readable constraint the backend hands the model — e.g.
|
|
599
|
+
* `must be exactly one of: "Hot", "Warm", "Cold"`. Shown verbatim in the config
|
|
600
|
+
* dialog so what the user is promised and what the model is told cannot drift.
|
|
601
|
+
*/
|
|
602
|
+
export declare type IAiOutputContract = string;
|
|
603
|
+
|
|
604
|
+
/** Outcome of the synchronous single-cell fill. */
|
|
605
|
+
export declare type IAiSingleFillOutcome = {
|
|
606
|
+
status: "filled";
|
|
607
|
+
value: unknown;
|
|
608
|
+
} | {
|
|
609
|
+
status: "unanswered";
|
|
610
|
+
message: string;
|
|
611
|
+
} | {
|
|
612
|
+
status: "failed";
|
|
613
|
+
reason: IAiCellReason;
|
|
614
|
+
message: string;
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
export declare interface IAiSingleFillResponse {
|
|
618
|
+
run: IAiFillRun;
|
|
619
|
+
outcome: IAiSingleFillOutcome;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/**
|
|
623
|
+
* Why a run left a row alone. These are **run-level only** — they appear in a
|
|
624
|
+
* preview's `skipped_breakdown`, never on a cell, because nothing happened to the
|
|
625
|
+
* cell and writing provenance to it would be a lie.
|
|
626
|
+
*/
|
|
627
|
+
export declare type IAiSkipReason = "human_edited" | "already_filled" | "no_source_values" | "entry_not_found" | "cancelled";
|
|
628
|
+
|
|
381
629
|
/**
|
|
382
630
|
* Main Object
|
|
383
631
|
*/
|
|
@@ -552,6 +800,13 @@ export declare interface IBriefWordLimit {
|
|
|
552
800
|
tolerance?: number;
|
|
553
801
|
}
|
|
554
802
|
|
|
803
|
+
/** One entry in a collection's `on_submit` / `on_update` pipeline. */
|
|
804
|
+
export declare type ICollectionEffect = INotificationData | IAiFillEffectData;
|
|
805
|
+
|
|
806
|
+
export declare type ICollectionEffectWithTrigger = ICollectionEffect & {
|
|
807
|
+
trigger: "on_submit" | "on_update";
|
|
808
|
+
};
|
|
809
|
+
|
|
555
810
|
/** Structural kind of a collection object. Read-only, derived server-side. */
|
|
556
811
|
export declare type ICollectionKind = "collection" | "form" | "module";
|
|
557
812
|
|
|
@@ -1045,9 +1300,9 @@ export declare interface ILemaCollection {
|
|
|
1045
1300
|
/** Optional module name associated with the collection. */
|
|
1046
1301
|
module_name?: string | null;
|
|
1047
1302
|
/** Optional configuration for actions to perform on submit. */
|
|
1048
|
-
on_submit?:
|
|
1303
|
+
on_submit?: ICollectionEffect[];
|
|
1049
1304
|
/** Optional configuration for actions to perform on update. */
|
|
1050
|
-
on_update?:
|
|
1305
|
+
on_update?: ICollectionEffect[];
|
|
1051
1306
|
/** Date or string representing when the collection was created. */
|
|
1052
1307
|
created_at?: Date | string;
|
|
1053
1308
|
/** Date or string representing when the collection was last updated. */
|
|
@@ -1101,6 +1356,12 @@ export declare type ILemaField = Mandatory<Omit<IField, "fields" | "options">, "
|
|
|
1101
1356
|
allow_public_view?: boolean;
|
|
1102
1357
|
/** Whether this field accepts public submissions. */
|
|
1103
1358
|
allow_public_submit?: boolean;
|
|
1359
|
+
/**
|
|
1360
|
+
* AI autofill instruction for this column. `null`/absent = never configured.
|
|
1361
|
+
* Read-only from the schema editor's point of view: it is written through its own
|
|
1362
|
+
* endpoint, not the whole-collection save, so edits here would be silently dropped.
|
|
1363
|
+
*/
|
|
1364
|
+
ai_config?: IAiFieldConfig | null;
|
|
1104
1365
|
logic?: ILogicRule[];
|
|
1105
1366
|
};
|
|
1106
1367
|
|
|
@@ -1857,6 +2118,8 @@ export declare interface IResponseSingle<T = Record<string, unknown>, Meta = any
|
|
|
1857
2118
|
};
|
|
1858
2119
|
}
|
|
1859
2120
|
|
|
2121
|
+
export declare const isAiFillEffect: (effect: ICollectionEffect) => effect is IAiFillEffectData;
|
|
2122
|
+
|
|
1860
2123
|
/**
|
|
1861
2124
|
* Defines the basic structure for a collection schema, including its sections, fields, and configuration. Levo Collection uses its own types built on top of this, so this type is not used directly.
|
|
1862
2125
|
*/
|
|
@@ -1905,6 +2168,12 @@ export declare interface ISection {
|
|
|
1905
2168
|
fields: IField[];
|
|
1906
2169
|
}
|
|
1907
2170
|
|
|
2171
|
+
/**
|
|
2172
|
+
* Anything that is not an AI fill is a notification — including legacy entries
|
|
2173
|
+
* saved before `kind` was written, which is why this is not `kind === "notification"`.
|
|
2174
|
+
*/
|
|
2175
|
+
export declare const isNotificationEffect: (effect: ICollectionEffect) => effect is INotificationData;
|
|
2176
|
+
|
|
1908
2177
|
export declare interface ISubscription {
|
|
1909
2178
|
object: string;
|
|
1910
2179
|
id: string;
|
package/dist/index.js
CHANGED
|
@@ -303,21 +303,21 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
303
303
|
getSingleEvent: async (e, n) => t.instance.url(`/v1/event/event/${e}/get-single-event`).query({ ...n.params }).options({ headers: { "Levo-Workspace": n.workspace_id } }).get().json().then((e) => e).catch((e) => {
|
|
304
304
|
throw g(e);
|
|
305
305
|
})
|
|
306
|
-
}),
|
|
306
|
+
}), ee = 600 * 1e3, b = (e, t) => ({
|
|
307
307
|
mediaBulkUpload: async (e, n = {}, r) => {
|
|
308
308
|
let i = { ...n };
|
|
309
|
-
return delete i.signal, t.getInstance(
|
|
309
|
+
return delete i.signal, t.getInstance(ee).url("/v1/assets/media/bulk").query(r ?? {}).options(i).post(e).json().then((e) => e).catch((e) => {
|
|
310
310
|
throw g(e);
|
|
311
311
|
});
|
|
312
312
|
},
|
|
313
313
|
getAllMedia: async (e = {}) => t.instance.url("/v1/assets/media/query").post(e).json().then((e) => e).catch((e) => {
|
|
314
314
|
throw g(e);
|
|
315
315
|
})
|
|
316
|
-
}),
|
|
316
|
+
}), x = [
|
|
317
317
|
"google",
|
|
318
318
|
"linkedin",
|
|
319
319
|
"microsoft"
|
|
320
|
-
],
|
|
320
|
+
], S = (e, t) => {
|
|
321
321
|
let n = async (n = {}) => t.instance.url("/v1/membership/auth/oauth/get-redirect-url").options(n).get().json().then((n) => {
|
|
322
322
|
let r = n?.content?.data, i = Object.keys(r);
|
|
323
323
|
if (typeof window < "u") for (let n of i) {
|
|
@@ -328,7 +328,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
330
|
return r;
|
|
331
|
-
}).catch(() =>
|
|
331
|
+
}).catch(() => x.reduce((e, t) => (e[t] = null, e), {})), r = async (e = {}) => t.instance.url("/v1/membership/auth/sign-out").options(e).post("").json().then((e) => e?.content?.data).catch((e) => {
|
|
332
332
|
throw g(e);
|
|
333
333
|
}), i = async (e = {}) => t.instance.url("/v1/membership/auth/get-me").options(e).get().json().then((e) => e?.content?.data).catch((e) => {
|
|
334
334
|
throw g(e);
|
|
@@ -360,12 +360,12 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
360
360
|
throw g(e);
|
|
361
361
|
})
|
|
362
362
|
};
|
|
363
|
-
},
|
|
363
|
+
}, C = (e) => {
|
|
364
364
|
let { pageContext: t = {
|
|
365
365
|
url: typeof window < "u" ? window?.location?.href : "",
|
|
366
366
|
referrer: typeof document < "u" ? document?.referrer : "",
|
|
367
367
|
title: typeof document < "u" ? document?.title : ""
|
|
368
|
-
}, loggerOptions: n = {}, ...r } = e, a = t, s = i(r), c = o(s, a), l = _(s, c), u =
|
|
368
|
+
}, loggerOptions: n = {}, ...r } = e, a = t, s = i(r), c = o(s, a), l = _(s, c), u = S(s, c), d = v(s, c), f = y(s, c), m = b(s, c), h = p(s, n);
|
|
369
369
|
return {
|
|
370
370
|
get apiUrl() {
|
|
371
371
|
return s.apiUrl;
|
|
@@ -410,7 +410,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
410
410
|
s.workspace = e;
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
|
-
},
|
|
413
|
+
}, te = {
|
|
414
414
|
"public-id": "",
|
|
415
415
|
string: "",
|
|
416
416
|
number: null,
|
|
@@ -439,7 +439,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
439
439
|
"array-date": [],
|
|
440
440
|
"array-boolean": [],
|
|
441
441
|
"array-location": []
|
|
442
|
-
},
|
|
442
|
+
}, w = {
|
|
443
443
|
ArrayWidget: [],
|
|
444
444
|
RecordWidget: [],
|
|
445
445
|
TextWidget: [],
|
|
@@ -469,7 +469,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
469
469
|
MultiGeocoderWidget: [],
|
|
470
470
|
JSONWidget: [],
|
|
471
471
|
SlugWidget: []
|
|
472
|
-
},
|
|
472
|
+
}, T = [
|
|
473
473
|
"TextWidget",
|
|
474
474
|
"CurrencyWidget",
|
|
475
475
|
"TextareaWidget",
|
|
@@ -494,13 +494,13 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
494
494
|
"MultiFileUploadWidget",
|
|
495
495
|
"MultiDropdownWidget",
|
|
496
496
|
"MultiTextWidget"
|
|
497
|
-
],
|
|
497
|
+
], E = [
|
|
498
498
|
"CollectionWidget",
|
|
499
499
|
"ArrayWidget",
|
|
500
500
|
"RecordWidget",
|
|
501
501
|
"JSONWidget",
|
|
502
502
|
"SlugWidget"
|
|
503
|
-
],
|
|
503
|
+
], D = [...T, ...E], O = T.reduce((e, t) => (e[t] = t, e), {}), k = D.reduce((e, t) => (e[t] = t, e), {}), A = [
|
|
504
504
|
"collection",
|
|
505
505
|
"record",
|
|
506
506
|
"group",
|
|
@@ -521,7 +521,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
521
521
|
"array-location",
|
|
522
522
|
"richtext",
|
|
523
523
|
"identifier"
|
|
524
|
-
],
|
|
524
|
+
], j = {
|
|
525
525
|
identifier: "identifier",
|
|
526
526
|
collection: "collection",
|
|
527
527
|
"public-id": "public-id",
|
|
@@ -542,37 +542,37 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
542
542
|
"array-location": "array-location",
|
|
543
543
|
richtext: "richtext",
|
|
544
544
|
"array-json": "array-json"
|
|
545
|
-
},
|
|
546
|
-
ArrayWidget:
|
|
547
|
-
RecordWidget:
|
|
548
|
-
TextWidget:
|
|
549
|
-
TextareaWidget:
|
|
550
|
-
EmailWidget:
|
|
551
|
-
URLWidget:
|
|
552
|
-
CurrencyWidget:
|
|
553
|
-
NumberWidget:
|
|
554
|
-
PhoneWidget:
|
|
555
|
-
SlugWidget:
|
|
556
|
-
RichTextWidget:
|
|
557
|
-
DateWidget:
|
|
558
|
-
TimeWidget:
|
|
559
|
-
DateTimeWidget:
|
|
560
|
-
RadioWidget:
|
|
561
|
-
CheckboxWidget:
|
|
562
|
-
ToggleCheckboxWidget:
|
|
563
|
-
SwitchWidget:
|
|
564
|
-
DropdownWidget:
|
|
565
|
-
MultiDropdownWidget:
|
|
566
|
-
MultiTextWidget:
|
|
567
|
-
FileUploadWidget:
|
|
568
|
-
MultiFileUploadWidget:
|
|
569
|
-
MultiImageUploadWidget:
|
|
570
|
-
ImageUploadWidget:
|
|
571
|
-
GeocoderWidget:
|
|
572
|
-
MultiGeocoderWidget:
|
|
573
|
-
CollectionWidget:
|
|
574
|
-
JSONWidget:
|
|
575
|
-
},
|
|
545
|
+
}, M = {
|
|
546
|
+
ArrayWidget: j.group,
|
|
547
|
+
RecordWidget: j.record,
|
|
548
|
+
TextWidget: j.string,
|
|
549
|
+
TextareaWidget: j.string,
|
|
550
|
+
EmailWidget: j.string,
|
|
551
|
+
URLWidget: j.string,
|
|
552
|
+
CurrencyWidget: j.string,
|
|
553
|
+
NumberWidget: j.number,
|
|
554
|
+
PhoneWidget: j.string,
|
|
555
|
+
SlugWidget: j.string,
|
|
556
|
+
RichTextWidget: j.string,
|
|
557
|
+
DateWidget: j.date,
|
|
558
|
+
TimeWidget: j.string,
|
|
559
|
+
DateTimeWidget: j.date,
|
|
560
|
+
RadioWidget: j.string,
|
|
561
|
+
CheckboxWidget: j["array-string"],
|
|
562
|
+
ToggleCheckboxWidget: j.boolean,
|
|
563
|
+
SwitchWidget: j.boolean,
|
|
564
|
+
DropdownWidget: j.string,
|
|
565
|
+
MultiDropdownWidget: j["array-string"],
|
|
566
|
+
MultiTextWidget: j["array-string"],
|
|
567
|
+
FileUploadWidget: j.file,
|
|
568
|
+
MultiFileUploadWidget: j["array-file"],
|
|
569
|
+
MultiImageUploadWidget: j["array-file"],
|
|
570
|
+
ImageUploadWidget: j.file,
|
|
571
|
+
GeocoderWidget: j.location,
|
|
572
|
+
MultiGeocoderWidget: j["array-location"],
|
|
573
|
+
CollectionWidget: j.collection,
|
|
574
|
+
JSONWidget: j.json
|
|
575
|
+
}, N = [
|
|
576
576
|
"pdf",
|
|
577
577
|
"txt",
|
|
578
578
|
"xml",
|
|
@@ -586,7 +586,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
586
586
|
"odp",
|
|
587
587
|
"ppt",
|
|
588
588
|
"pptx"
|
|
589
|
-
],
|
|
589
|
+
], P = [
|
|
590
590
|
"svg",
|
|
591
591
|
"png",
|
|
592
592
|
"jpg",
|
|
@@ -594,15 +594,15 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
594
594
|
"gif",
|
|
595
595
|
"webp",
|
|
596
596
|
"avif"
|
|
597
|
-
],
|
|
597
|
+
], F = [
|
|
598
598
|
"mp4",
|
|
599
599
|
"ogv",
|
|
600
600
|
"webm"
|
|
601
|
-
],
|
|
601
|
+
], I = [
|
|
602
602
|
"mp3",
|
|
603
603
|
"ogg",
|
|
604
604
|
"opus"
|
|
605
|
-
],
|
|
605
|
+
], L = {
|
|
606
606
|
"application/xml": [".xml"],
|
|
607
607
|
"text/plain": [".txt"],
|
|
608
608
|
"application/pdf": [".pdf"],
|
|
@@ -611,7 +611,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
611
611
|
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": [".xlsx"],
|
|
612
612
|
"application/vnd.openxmlformats-officedocument.wordprocessingml.document": [".docx"],
|
|
613
613
|
"text/csv": [".csv"]
|
|
614
|
-
},
|
|
614
|
+
}, R = {
|
|
615
615
|
"image/jpeg": [".jpeg", ".jpg"],
|
|
616
616
|
"image/jpg": [".jpg"],
|
|
617
617
|
"image/png": [".png"],
|
|
@@ -620,40 +620,40 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
620
620
|
"image/svg+xml": [".svg"],
|
|
621
621
|
"image/webp": [".webp"],
|
|
622
622
|
"image/avif": [".avif"]
|
|
623
|
-
},
|
|
623
|
+
}, z = {
|
|
624
624
|
"video/mp4": [".mp4"],
|
|
625
625
|
"video/mpeg": [".mpeg"],
|
|
626
626
|
"video/webm": [".webm"]
|
|
627
|
-
},
|
|
627
|
+
}, B = {
|
|
628
628
|
"audio/mpeg": [".mp3"],
|
|
629
629
|
"audio/ogg": [".oga"],
|
|
630
630
|
"audio/opus": [".opus"]
|
|
631
|
+
}, V = {
|
|
632
|
+
audio: B,
|
|
633
|
+
document: L,
|
|
634
|
+
image: R,
|
|
635
|
+
video: z
|
|
631
636
|
}, H = {
|
|
632
|
-
audio:
|
|
633
|
-
document:
|
|
634
|
-
image:
|
|
635
|
-
video:
|
|
636
|
-
}, U =
|
|
637
|
-
audio: L,
|
|
638
|
-
document: P,
|
|
639
|
-
image: F,
|
|
640
|
-
video: I
|
|
641
|
-
}, W = [
|
|
642
|
-
...U.audio,
|
|
643
|
-
...U.document,
|
|
644
|
-
...U.image,
|
|
645
|
-
...U.video
|
|
646
|
-
], G = {
|
|
637
|
+
audio: I,
|
|
638
|
+
document: N,
|
|
639
|
+
image: P,
|
|
640
|
+
video: F
|
|
641
|
+
}, U = [
|
|
647
642
|
...H.audio,
|
|
648
643
|
...H.document,
|
|
649
644
|
...H.image,
|
|
650
645
|
...H.video
|
|
651
|
-
|
|
646
|
+
], W = {
|
|
647
|
+
...V.audio,
|
|
648
|
+
...V.document,
|
|
649
|
+
...V.image,
|
|
650
|
+
...V.video
|
|
651
|
+
}, G = [
|
|
652
652
|
"image",
|
|
653
653
|
"video",
|
|
654
654
|
"audio",
|
|
655
655
|
"document"
|
|
656
|
-
],
|
|
656
|
+
], K = G.reduce((e, t) => (e[t] = t, e), {}), q = (e) => e.reduce((e, t) => (e[t] = t, e), {}), J = [
|
|
657
657
|
"bevy.collection.filled",
|
|
658
658
|
"bevy.collection.submitted",
|
|
659
659
|
"bevy.collection.view",
|
|
@@ -679,7 +679,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
679
679
|
"page.selection",
|
|
680
680
|
"user.active",
|
|
681
681
|
"user.idle"
|
|
682
|
-
], X =
|
|
682
|
+
], Y = q(J), X = (e) => e.kind === "ai_fill", Z = (e) => e.kind !== "ai_fill", ne = (e) => e.module_name ? "module" : e.allow_public_submit && !e.public_submit_set_by ? "form" : "collection", Q = {
|
|
683
683
|
string: [
|
|
684
684
|
"equals",
|
|
685
685
|
"not",
|
|
@@ -746,7 +746,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
746
746
|
identifier: ["equals", "not"],
|
|
747
747
|
record: [],
|
|
748
748
|
group: []
|
|
749
|
-
},
|
|
749
|
+
}, re = {
|
|
750
750
|
published: "published",
|
|
751
751
|
unpublished: "unpublished",
|
|
752
752
|
archived: "archived",
|
|
@@ -757,7 +757,7 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
757
757
|
poll: "poll",
|
|
758
758
|
gallery: "gallery",
|
|
759
759
|
link: "link"
|
|
760
|
-
},
|
|
760
|
+
}, ie = Object.keys($), ae = {
|
|
761
761
|
draft: "draft",
|
|
762
762
|
published: "published",
|
|
763
763
|
unpublished: "unpublished",
|
|
@@ -766,4 +766,4 @@ var r = /^W[A-Z0-9]{7}$/, i = (e) => {
|
|
|
766
766
|
pending_moderation: "pending_moderation"
|
|
767
767
|
};
|
|
768
768
|
//#endregion
|
|
769
|
-
export {
|
|
769
|
+
export { Y as AnalyticsEvents, J as AnalyticsEventsList, re as COMMENT_STATUS, O as CommonFieldIntefaces, T as CommonFieldInterfacesList, E as ComplexFieldInterfacesList, $ as FORUM_POST_KIND, ae as FORUM_POST_STATUS, k as FieldInterfaces, D as FieldInterfacesList, j as FieldKind, A as FieldKindList, ie as ForumPostKindExpandedList, m as LevoError, x as LevoOAuthProviderList, d as LogLevel, K as MediaKind, G as MediaKindList, U as allMediaFileExtensions, W as allMediaMimetypes, I as audioFileExtensions, B as audioMimetype, C as createLevoClient, p as createLevoLogger, te as defaultByKinds, f as defineLevoLoggerMiddleware, N as documentFileExtensions, L as documentMimetype, w as formatsByInterface, ne as getCollectionKind, g as getLevoError, P as imageFileExtensions, R as imageMimetype, M as interfaceKinds, X as isAiFillEffect, Z as isNotificationEffect, q as listToRecord, H as mediaExtensionsByKind, V as mediaMimetypeByKind, Q as operatorsByKind, u as remoteLoggerMiddleware, F as videoFileExtensions, z as videoMimetype };
|