@opencode/schema 0.0.0-dev-19654 → 0.0.0-dev-19657
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/form.d.ts +132 -0
- package/dist/form.js +4 -0
- package/dist/permission-saved.d.ts +4 -0
- package/dist/permission-saved.js +5 -1
- package/package.json +1 -1
package/dist/form.d.ts
CHANGED
|
@@ -518,6 +518,138 @@ export declare const State: Schema.Union<readonly [Schema.Struct<{
|
|
|
518
518
|
readonly status: Schema.Literal<"cancelled">;
|
|
519
519
|
}>]>;
|
|
520
520
|
export type State = typeof State.Type;
|
|
521
|
+
export declare const Detail: Schema.Struct<{
|
|
522
|
+
readonly state: Schema.Union<readonly [Schema.Struct<{
|
|
523
|
+
readonly status: Schema.Literal<"pending">;
|
|
524
|
+
}>, Schema.Struct<{
|
|
525
|
+
readonly status: Schema.Literal<"answered">;
|
|
526
|
+
readonly answer: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>;
|
|
527
|
+
}>, Schema.Struct<{
|
|
528
|
+
readonly status: Schema.Literal<"cancelled">;
|
|
529
|
+
}>]>;
|
|
530
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
531
|
+
readonly type: Schema.Literal<"string">;
|
|
532
|
+
readonly format: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Literals<readonly ["email", "uri", "date", "date-time"]>>>, Schema.optionalKey<Schema.Literals<readonly ["email", "uri", "date", "date-time"]>>, never, never>;
|
|
533
|
+
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
534
|
+
readonly maxLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
535
|
+
readonly pattern: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
536
|
+
readonly placeholder: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
537
|
+
readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
538
|
+
readonly options: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
539
|
+
readonly value: Schema.String;
|
|
540
|
+
readonly label: Schema.String;
|
|
541
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
542
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
543
|
+
readonly value: Schema.String;
|
|
544
|
+
readonly label: Schema.String;
|
|
545
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
546
|
+
}>>>, never, never>;
|
|
547
|
+
readonly custom: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
548
|
+
readonly key: Schema.String;
|
|
549
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
550
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
551
|
+
readonly required: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
552
|
+
readonly when: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
553
|
+
readonly key: Schema.String;
|
|
554
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
555
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
556
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
557
|
+
readonly key: Schema.String;
|
|
558
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
559
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
560
|
+
}>>>, never, never>;
|
|
561
|
+
}>, Schema.Struct<{
|
|
562
|
+
readonly type: Schema.Literal<"number">;
|
|
563
|
+
readonly minimum: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
|
|
564
|
+
readonly maximum: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
|
|
565
|
+
readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
|
|
566
|
+
readonly key: Schema.String;
|
|
567
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
568
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
569
|
+
readonly required: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
570
|
+
readonly when: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
571
|
+
readonly key: Schema.String;
|
|
572
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
573
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
574
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
575
|
+
readonly key: Schema.String;
|
|
576
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
577
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
578
|
+
}>>>, never, never>;
|
|
579
|
+
}>, Schema.Struct<{
|
|
580
|
+
readonly type: Schema.Literal<"integer">;
|
|
581
|
+
readonly minimum: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
|
|
582
|
+
readonly maximum: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
|
|
583
|
+
readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Number>>, Schema.optionalKey<Schema.Number>, never, never>;
|
|
584
|
+
readonly key: Schema.String;
|
|
585
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
586
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
587
|
+
readonly required: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
588
|
+
readonly when: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
589
|
+
readonly key: Schema.String;
|
|
590
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
591
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
592
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
593
|
+
readonly key: Schema.String;
|
|
594
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
595
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
596
|
+
}>>>, never, never>;
|
|
597
|
+
}>, Schema.Struct<{
|
|
598
|
+
readonly type: Schema.Literal<"boolean">;
|
|
599
|
+
readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
600
|
+
readonly key: Schema.String;
|
|
601
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
602
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
603
|
+
readonly required: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
604
|
+
readonly when: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
605
|
+
readonly key: Schema.String;
|
|
606
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
607
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
608
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
609
|
+
readonly key: Schema.String;
|
|
610
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
611
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
612
|
+
}>>>, never, never>;
|
|
613
|
+
}>, Schema.Struct<{
|
|
614
|
+
readonly type: Schema.Literal<"multiselect">;
|
|
615
|
+
readonly options: Schema.$Array<Schema.Struct<{
|
|
616
|
+
readonly value: Schema.String;
|
|
617
|
+
readonly label: Schema.String;
|
|
618
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
619
|
+
}>>;
|
|
620
|
+
readonly minItems: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
621
|
+
readonly maxItems: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
622
|
+
readonly custom: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
623
|
+
readonly default: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.String>>>, Schema.optionalKey<Schema.$Array<Schema.String>>, never, never>;
|
|
624
|
+
readonly key: Schema.String;
|
|
625
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
626
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
627
|
+
readonly required: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Boolean>>, Schema.optionalKey<Schema.Boolean>, never, never>;
|
|
628
|
+
readonly when: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Array<Schema.Struct<{
|
|
629
|
+
readonly key: Schema.String;
|
|
630
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
631
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
632
|
+
}>>>>, Schema.optionalKey<Schema.$Array<Schema.Struct<{
|
|
633
|
+
readonly key: Schema.String;
|
|
634
|
+
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
635
|
+
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
636
|
+
}>>>, never, never>;
|
|
637
|
+
}>, Schema.Struct<{
|
|
638
|
+
readonly key: Schema.String;
|
|
639
|
+
readonly type: Schema.Literal<"external">;
|
|
640
|
+
readonly url: Schema.String;
|
|
641
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
642
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
643
|
+
}>]>>;
|
|
644
|
+
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
645
|
+
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
646
|
+
};
|
|
647
|
+
readonly sessionID: Schema.String;
|
|
648
|
+
readonly title: Schema.String;
|
|
649
|
+
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
650
|
+
}>;
|
|
651
|
+
export interface Detail extends Schema.Schema.Type<typeof Detail> {
|
|
652
|
+
}
|
|
521
653
|
export declare const Reply: Schema.Struct<{
|
|
522
654
|
readonly answer: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean, Schema.$Array<Schema.String>]>>;
|
|
523
655
|
}>;
|
package/dist/form.js
CHANGED
|
@@ -111,6 +111,10 @@ export const State = Schema.Union([
|
|
|
111
111
|
])
|
|
112
112
|
.pipe(Schema.toTaggedUnion("status"))
|
|
113
113
|
.annotate({ identifier: "Form.State" });
|
|
114
|
+
export const Detail = Schema.Struct({
|
|
115
|
+
...Info.fields,
|
|
116
|
+
state: State,
|
|
117
|
+
}).annotate({ identifier: "Form.Detail" });
|
|
114
118
|
export const Reply = Schema.Struct({
|
|
115
119
|
answer: Answer,
|
|
116
120
|
}).annotate({ identifier: "Form.Reply" });
|
|
@@ -13,6 +13,10 @@ export declare const Info: Schema.Struct<{
|
|
|
13
13
|
};
|
|
14
14
|
readonly action: Schema.String;
|
|
15
15
|
readonly resource: Schema.String;
|
|
16
|
+
readonly time: Schema.Struct<{
|
|
17
|
+
readonly created: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
18
|
+
readonly updated: Schema.decodeTo<Schema.DateTimeUtc, Schema.Finite, never, never>;
|
|
19
|
+
}>;
|
|
16
20
|
}>;
|
|
17
21
|
export interface Info extends Schema.Schema.Type<typeof Info> {
|
|
18
22
|
}
|
package/dist/permission-saved.js
CHANGED
|
@@ -2,11 +2,15 @@ export * as PermissionSaved from "./permission-saved.js";
|
|
|
2
2
|
import { Schema } from "effect";
|
|
3
3
|
import { ascending } from "./identifier.js";
|
|
4
4
|
import { ProjectID } from "./project-id.js";
|
|
5
|
-
import { statics } from "./schema.js";
|
|
5
|
+
import { DateTimeUtcFromMillis, statics } from "./schema.js";
|
|
6
6
|
export const ID = Schema.String.pipe(Schema.brand("PermissionSaved.ID"), statics((schema) => ({ create: () => schema.make("psv_" + ascending()) })));
|
|
7
7
|
export const Info = Schema.Struct({
|
|
8
8
|
id: ID,
|
|
9
9
|
projectID: ProjectID,
|
|
10
10
|
action: Schema.String,
|
|
11
11
|
resource: Schema.String,
|
|
12
|
+
time: Schema.Struct({
|
|
13
|
+
created: DateTimeUtcFromMillis,
|
|
14
|
+
updated: DateTimeUtcFromMillis,
|
|
15
|
+
}),
|
|
12
16
|
}).annotate({ identifier: "PermissionSaved.Info" });
|