@opencode-ai/protocol 0.0.0-next-15270 → 0.0.0-next-15271
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/groups/event.d.ts +133 -64
- package/dist/groups/form.d.ts +52 -60
- package/dist/groups/form.js +3 -5
- package/package.json +2 -2
package/dist/groups/event.d.ts
CHANGED
|
@@ -3656,9 +3656,8 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
3656
3656
|
}>, never, never>;
|
|
3657
3657
|
}>>, never, never>;
|
|
3658
3658
|
readonly data: Schema.Struct<{
|
|
3659
|
-
readonly form: Schema.
|
|
3660
|
-
readonly
|
|
3661
|
-
readonly fields: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
3659
|
+
readonly form: Schema.Struct<{
|
|
3660
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
3662
3661
|
readonly type: Schema.Literal<"string">;
|
|
3663
3662
|
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>;
|
|
3664
3663
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -3765,6 +3764,12 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
3765
3764
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
3766
3765
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
3767
3766
|
}>>>, never, never>;
|
|
3767
|
+
}>, Schema.Struct<{
|
|
3768
|
+
readonly key: Schema.String;
|
|
3769
|
+
readonly type: Schema.Literal<"external">;
|
|
3770
|
+
readonly url: Schema.String;
|
|
3771
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
3772
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
3768
3773
|
}>]>>;
|
|
3769
3774
|
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
3770
3775
|
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
@@ -3772,25 +3777,15 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
3772
3777
|
readonly sessionID: Schema.String;
|
|
3773
3778
|
readonly title: Schema.String;
|
|
3774
3779
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
3775
|
-
}
|
|
3776
|
-
readonly mode: Schema.Literal<"url">;
|
|
3777
|
-
readonly url: Schema.String;
|
|
3778
|
-
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
3779
|
-
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
3780
|
-
};
|
|
3781
|
-
readonly sessionID: Schema.String;
|
|
3782
|
-
readonly title: Schema.String;
|
|
3783
|
-
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
3784
|
-
}>]>;
|
|
3780
|
+
}>;
|
|
3785
3781
|
}>;
|
|
3786
3782
|
}> & {
|
|
3787
3783
|
type: "form.created";
|
|
3788
3784
|
durability: "ephemeral";
|
|
3789
3785
|
durable: undefined;
|
|
3790
3786
|
data: Schema.Struct<{
|
|
3791
|
-
readonly form: Schema.
|
|
3792
|
-
readonly
|
|
3793
|
-
readonly fields: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
3787
|
+
readonly form: Schema.Struct<{
|
|
3788
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
3794
3789
|
readonly type: Schema.Literal<"string">;
|
|
3795
3790
|
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>;
|
|
3796
3791
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -3897,6 +3892,12 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
3897
3892
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
3898
3893
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
3899
3894
|
}>>>, never, never>;
|
|
3895
|
+
}>, Schema.Struct<{
|
|
3896
|
+
readonly key: Schema.String;
|
|
3897
|
+
readonly type: Schema.Literal<"external">;
|
|
3898
|
+
readonly url: Schema.String;
|
|
3899
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
3900
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
3900
3901
|
}>]>>;
|
|
3901
3902
|
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
3902
3903
|
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
@@ -3904,16 +3905,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
3904
3905
|
readonly sessionID: Schema.String;
|
|
3905
3906
|
readonly title: Schema.String;
|
|
3906
3907
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
3907
|
-
}
|
|
3908
|
-
readonly mode: Schema.Literal<"url">;
|
|
3909
|
-
readonly url: Schema.String;
|
|
3910
|
-
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
3911
|
-
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
3912
|
-
};
|
|
3913
|
-
readonly sessionID: Schema.String;
|
|
3914
|
-
readonly title: Schema.String;
|
|
3915
|
-
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
3916
|
-
}>]>;
|
|
3908
|
+
}>;
|
|
3917
3909
|
}>;
|
|
3918
3910
|
}) | (Schema.Struct<{
|
|
3919
3911
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
|
@@ -9071,8 +9063,7 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
9071
9063
|
readonly type: "form.created";
|
|
9072
9064
|
readonly data: {
|
|
9073
9065
|
readonly form: {
|
|
9074
|
-
readonly
|
|
9075
|
-
readonly fields: readonly ({
|
|
9066
|
+
readonly fields: readonly [{
|
|
9076
9067
|
readonly type: "string";
|
|
9077
9068
|
readonly key: string;
|
|
9078
9069
|
readonly format?: "uri" | "email" | "date" | "date-time" | undefined;
|
|
@@ -9155,16 +9146,102 @@ export declare const EventGroup: HttpApiGroup.HttpApiGroup<"server.event", HttpA
|
|
|
9155
9146
|
readonly op: "eq" | "neq";
|
|
9156
9147
|
readonly value: string | number | boolean;
|
|
9157
9148
|
}[] | undefined;
|
|
9158
|
-
}
|
|
9159
|
-
|
|
9160
|
-
|
|
9161
|
-
|
|
9162
|
-
|
|
9163
|
-
readonly
|
|
9164
|
-
}
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9149
|
+
} | {
|
|
9150
|
+
readonly key: string;
|
|
9151
|
+
readonly type: "external";
|
|
9152
|
+
readonly url: string;
|
|
9153
|
+
readonly title?: string | undefined;
|
|
9154
|
+
readonly description?: string | undefined;
|
|
9155
|
+
}, ...({
|
|
9156
|
+
readonly type: "string";
|
|
9157
|
+
readonly key: string;
|
|
9158
|
+
readonly format?: "uri" | "email" | "date" | "date-time" | undefined;
|
|
9159
|
+
readonly minLength?: number | undefined;
|
|
9160
|
+
readonly maxLength?: number | undefined;
|
|
9161
|
+
readonly pattern?: string | undefined;
|
|
9162
|
+
readonly placeholder?: string | undefined;
|
|
9163
|
+
readonly default?: string | undefined;
|
|
9164
|
+
readonly options?: readonly {
|
|
9165
|
+
readonly value: string;
|
|
9166
|
+
readonly label: string;
|
|
9167
|
+
readonly description?: string | undefined;
|
|
9168
|
+
}[] | undefined;
|
|
9169
|
+
readonly custom?: boolean | undefined;
|
|
9170
|
+
readonly title?: string | undefined;
|
|
9171
|
+
readonly description?: string | undefined;
|
|
9172
|
+
readonly required?: boolean | undefined;
|
|
9173
|
+
readonly when?: readonly {
|
|
9174
|
+
readonly key: string;
|
|
9175
|
+
readonly op: "eq" | "neq";
|
|
9176
|
+
readonly value: string | number | boolean;
|
|
9177
|
+
}[] | undefined;
|
|
9178
|
+
} | {
|
|
9179
|
+
readonly type: "number";
|
|
9180
|
+
readonly key: string;
|
|
9181
|
+
readonly minimum?: number | undefined;
|
|
9182
|
+
readonly maximum?: number | undefined;
|
|
9183
|
+
readonly default?: number | undefined;
|
|
9184
|
+
readonly title?: string | undefined;
|
|
9185
|
+
readonly description?: string | undefined;
|
|
9186
|
+
readonly required?: boolean | undefined;
|
|
9187
|
+
readonly when?: readonly {
|
|
9188
|
+
readonly key: string;
|
|
9189
|
+
readonly op: "eq" | "neq";
|
|
9190
|
+
readonly value: string | number | boolean;
|
|
9191
|
+
}[] | undefined;
|
|
9192
|
+
} | {
|
|
9193
|
+
readonly type: "integer";
|
|
9194
|
+
readonly key: string;
|
|
9195
|
+
readonly minimum?: number | undefined;
|
|
9196
|
+
readonly maximum?: number | undefined;
|
|
9197
|
+
readonly default?: number | undefined;
|
|
9198
|
+
readonly title?: string | undefined;
|
|
9199
|
+
readonly description?: string | undefined;
|
|
9200
|
+
readonly required?: boolean | undefined;
|
|
9201
|
+
readonly when?: readonly {
|
|
9202
|
+
readonly key: string;
|
|
9203
|
+
readonly op: "eq" | "neq";
|
|
9204
|
+
readonly value: string | number | boolean;
|
|
9205
|
+
}[] | undefined;
|
|
9206
|
+
} | {
|
|
9207
|
+
readonly type: "boolean";
|
|
9208
|
+
readonly key: string;
|
|
9209
|
+
readonly default?: boolean | undefined;
|
|
9210
|
+
readonly title?: string | undefined;
|
|
9211
|
+
readonly description?: string | undefined;
|
|
9212
|
+
readonly required?: boolean | undefined;
|
|
9213
|
+
readonly when?: readonly {
|
|
9214
|
+
readonly key: string;
|
|
9215
|
+
readonly op: "eq" | "neq";
|
|
9216
|
+
readonly value: string | number | boolean;
|
|
9217
|
+
}[] | undefined;
|
|
9218
|
+
} | {
|
|
9219
|
+
readonly type: "multiselect";
|
|
9220
|
+
readonly options: readonly {
|
|
9221
|
+
readonly value: string;
|
|
9222
|
+
readonly label: string;
|
|
9223
|
+
readonly description?: string | undefined;
|
|
9224
|
+
}[];
|
|
9225
|
+
readonly key: string;
|
|
9226
|
+
readonly minItems?: number | undefined;
|
|
9227
|
+
readonly maxItems?: number | undefined;
|
|
9228
|
+
readonly custom?: boolean | undefined;
|
|
9229
|
+
readonly default?: readonly string[] | undefined;
|
|
9230
|
+
readonly title?: string | undefined;
|
|
9231
|
+
readonly description?: string | undefined;
|
|
9232
|
+
readonly required?: boolean | undefined;
|
|
9233
|
+
readonly when?: readonly {
|
|
9234
|
+
readonly key: string;
|
|
9235
|
+
readonly op: "eq" | "neq";
|
|
9236
|
+
readonly value: string | number | boolean;
|
|
9237
|
+
}[] | undefined;
|
|
9238
|
+
} | {
|
|
9239
|
+
readonly key: string;
|
|
9240
|
+
readonly type: "external";
|
|
9241
|
+
readonly url: string;
|
|
9242
|
+
readonly title?: string | undefined;
|
|
9243
|
+
readonly description?: string | undefined;
|
|
9244
|
+
})[]];
|
|
9168
9245
|
readonly id: string & import("effect/Brand").Brand<"Form.ID">;
|
|
9169
9246
|
readonly sessionID: string;
|
|
9170
9247
|
readonly title: string;
|
|
@@ -14136,9 +14213,8 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
14136
14213
|
}>, never, never>;
|
|
14137
14214
|
}>>, never, never>;
|
|
14138
14215
|
readonly data: Schema.Struct<{
|
|
14139
|
-
readonly form: Schema.
|
|
14140
|
-
readonly
|
|
14141
|
-
readonly fields: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
14216
|
+
readonly form: Schema.Struct<{
|
|
14217
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
14142
14218
|
readonly type: Schema.Literal<"string">;
|
|
14143
14219
|
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>;
|
|
14144
14220
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -14245,6 +14321,12 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
14245
14321
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
14246
14322
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
14247
14323
|
}>>>, never, never>;
|
|
14324
|
+
}>, Schema.Struct<{
|
|
14325
|
+
readonly key: Schema.String;
|
|
14326
|
+
readonly type: Schema.Literal<"external">;
|
|
14327
|
+
readonly url: Schema.String;
|
|
14328
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14329
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14248
14330
|
}>]>>;
|
|
14249
14331
|
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
14250
14332
|
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
@@ -14252,25 +14334,15 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
14252
14334
|
readonly sessionID: Schema.String;
|
|
14253
14335
|
readonly title: Schema.String;
|
|
14254
14336
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
14255
|
-
}
|
|
14256
|
-
readonly mode: Schema.Literal<"url">;
|
|
14257
|
-
readonly url: Schema.String;
|
|
14258
|
-
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
14259
|
-
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
14260
|
-
};
|
|
14261
|
-
readonly sessionID: Schema.String;
|
|
14262
|
-
readonly title: Schema.String;
|
|
14263
|
-
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
14264
|
-
}>]>;
|
|
14337
|
+
}>;
|
|
14265
14338
|
}>;
|
|
14266
14339
|
}> & {
|
|
14267
14340
|
type: "form.created";
|
|
14268
14341
|
durability: "ephemeral";
|
|
14269
14342
|
durable: undefined;
|
|
14270
14343
|
data: Schema.Struct<{
|
|
14271
|
-
readonly form: Schema.
|
|
14272
|
-
readonly
|
|
14273
|
-
readonly fields: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
14344
|
+
readonly form: Schema.Struct<{
|
|
14345
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
14274
14346
|
readonly type: Schema.Literal<"string">;
|
|
14275
14347
|
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>;
|
|
14276
14348
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -14377,6 +14449,12 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
14377
14449
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
14378
14450
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
14379
14451
|
}>>>, never, never>;
|
|
14452
|
+
}>, Schema.Struct<{
|
|
14453
|
+
readonly key: Schema.String;
|
|
14454
|
+
readonly type: Schema.Literal<"external">;
|
|
14455
|
+
readonly url: Schema.String;
|
|
14456
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14457
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
14380
14458
|
}>]>>;
|
|
14381
14459
|
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
14382
14460
|
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
@@ -14384,16 +14462,7 @@ export declare const OpenCodeEvent: Schema.Union<readonly [Schema.Struct<{
|
|
|
14384
14462
|
readonly sessionID: Schema.String;
|
|
14385
14463
|
readonly title: Schema.String;
|
|
14386
14464
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
14387
|
-
}
|
|
14388
|
-
readonly mode: Schema.Literal<"url">;
|
|
14389
|
-
readonly url: Schema.String;
|
|
14390
|
-
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
14391
|
-
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
14392
|
-
};
|
|
14393
|
-
readonly sessionID: Schema.String;
|
|
14394
|
-
readonly title: Schema.String;
|
|
14395
|
-
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
14396
|
-
}>]>;
|
|
14465
|
+
}>;
|
|
14397
14466
|
}>;
|
|
14398
14467
|
}) | (Schema.Struct<{
|
|
14399
14468
|
readonly id: Schema.brand<Schema.String, "Event.ID"> & {
|
package/dist/groups/form.d.ts
CHANGED
|
@@ -8,8 +8,7 @@ declare const CreatePayload: Schema.Struct<{
|
|
|
8
8
|
}>;
|
|
9
9
|
readonly title: Schema.String;
|
|
10
10
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
11
|
-
readonly
|
|
12
|
-
readonly fields: Schema.optional<Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
11
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
13
12
|
readonly type: Schema.Literal<"string">;
|
|
14
13
|
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>;
|
|
15
14
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -116,8 +115,13 @@ declare const CreatePayload: Schema.Struct<{
|
|
|
116
115
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
117
116
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
118
117
|
}>>>, never, never>;
|
|
119
|
-
}
|
|
120
|
-
|
|
118
|
+
}>, Schema.Struct<{
|
|
119
|
+
readonly key: Schema.String;
|
|
120
|
+
readonly type: Schema.Literal<"external">;
|
|
121
|
+
readonly url: Schema.String;
|
|
122
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
123
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
124
|
+
}>]>>;
|
|
121
125
|
}>;
|
|
122
126
|
export type CreatePayload = typeof CreatePayload.Type;
|
|
123
127
|
export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId, LocationService, FormLocationId extends HttpApiMiddleware.AnyId, FormLocationService>(locationMiddleware: Context.Key<LocationId, LocationService>, formLocationMiddleware: Context.Key<FormLocationId, FormLocationService>) => HttpApiGroup.HttpApiGroup<"server.form", HttpApiEndpoint.HttpApiEndpoint<"form.request.list", "GET", "/api/form/request", HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
@@ -127,9 +131,8 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
127
131
|
}>>;
|
|
128
132
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
129
133
|
readonly location: typeof Location.Info;
|
|
130
|
-
readonly data: Schema.$Array<Schema.
|
|
131
|
-
readonly
|
|
132
|
-
readonly fields: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
134
|
+
readonly data: Schema.$Array<Schema.Struct<{
|
|
135
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
133
136
|
readonly type: Schema.Literal<"string">;
|
|
134
137
|
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>;
|
|
135
138
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -236,6 +239,12 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
236
239
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
237
240
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
238
241
|
}>>>, never, never>;
|
|
242
|
+
}>, Schema.Struct<{
|
|
243
|
+
readonly key: Schema.String;
|
|
244
|
+
readonly type: Schema.Literal<"external">;
|
|
245
|
+
readonly url: Schema.String;
|
|
246
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
247
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
239
248
|
}>]>>;
|
|
240
249
|
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
241
250
|
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
@@ -243,22 +252,12 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
243
252
|
readonly sessionID: Schema.String;
|
|
244
253
|
readonly title: Schema.String;
|
|
245
254
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
246
|
-
}
|
|
247
|
-
readonly mode: Schema.Literal<"url">;
|
|
248
|
-
readonly url: Schema.String;
|
|
249
|
-
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
250
|
-
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
251
|
-
};
|
|
252
|
-
readonly sessionID: Schema.String;
|
|
253
|
-
readonly title: Schema.String;
|
|
254
|
-
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
255
|
-
}>]>>;
|
|
255
|
+
}>>;
|
|
256
256
|
}>>, HttpApiEndpoint.Json<never>, LocationId, HttpApiMiddleware.Requires<LocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.form.list", "GET", "/api/session/:sessionID/form", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
257
257
|
sessionID: Schema.String;
|
|
258
258
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
259
|
-
readonly data: Schema.$Array<Schema.
|
|
260
|
-
readonly
|
|
261
|
-
readonly fields: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
259
|
+
readonly data: Schema.$Array<Schema.Struct<{
|
|
260
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
262
261
|
readonly type: Schema.Literal<"string">;
|
|
263
262
|
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>;
|
|
264
263
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -365,6 +364,12 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
365
364
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
366
365
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
367
366
|
}>>>, never, never>;
|
|
367
|
+
}>, Schema.Struct<{
|
|
368
|
+
readonly key: Schema.String;
|
|
369
|
+
readonly type: Schema.Literal<"external">;
|
|
370
|
+
readonly url: Schema.String;
|
|
371
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
372
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
368
373
|
}>]>>;
|
|
369
374
|
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
370
375
|
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
@@ -372,16 +377,7 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
372
377
|
readonly sessionID: Schema.String;
|
|
373
378
|
readonly title: Schema.String;
|
|
374
379
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
375
|
-
}
|
|
376
|
-
readonly mode: Schema.Literal<"url">;
|
|
377
|
-
readonly url: Schema.String;
|
|
378
|
-
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
379
|
-
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
380
|
-
};
|
|
381
|
-
readonly sessionID: Schema.String;
|
|
382
|
-
readonly title: Schema.String;
|
|
383
|
-
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
384
|
-
}>]>>;
|
|
380
|
+
}>>;
|
|
385
381
|
}>>, HttpApiEndpoint.Json<typeof SessionNotFoundError>, FormLocationId, HttpApiMiddleware.Requires<FormLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.form.create", "POST", "/api/session/:sessionID/form", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
386
382
|
sessionID: Schema.String;
|
|
387
383
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
@@ -390,8 +386,7 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
390
386
|
}>;
|
|
391
387
|
readonly title: Schema.String;
|
|
392
388
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
393
|
-
readonly
|
|
394
|
-
readonly fields: Schema.optional<Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
389
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
395
390
|
readonly type: Schema.Literal<"string">;
|
|
396
391
|
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>;
|
|
397
392
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -498,12 +493,16 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
498
493
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
499
494
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
500
495
|
}>>>, never, never>;
|
|
501
|
-
}
|
|
502
|
-
|
|
496
|
+
}>, Schema.Struct<{
|
|
497
|
+
readonly key: Schema.String;
|
|
498
|
+
readonly type: Schema.Literal<"external">;
|
|
499
|
+
readonly url: Schema.String;
|
|
500
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
501
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
502
|
+
}>]>>;
|
|
503
503
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
504
|
-
readonly data: Schema.
|
|
505
|
-
readonly
|
|
506
|
-
readonly fields: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
504
|
+
readonly data: Schema.Struct<{
|
|
505
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
507
506
|
readonly type: Schema.Literal<"string">;
|
|
508
507
|
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>;
|
|
509
508
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -610,6 +609,12 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
610
609
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
611
610
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
612
611
|
}>>>, never, never>;
|
|
612
|
+
}>, Schema.Struct<{
|
|
613
|
+
readonly key: Schema.String;
|
|
614
|
+
readonly type: Schema.Literal<"external">;
|
|
615
|
+
readonly url: Schema.String;
|
|
616
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
617
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
613
618
|
}>]>>;
|
|
614
619
|
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
615
620
|
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
@@ -617,25 +622,15 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
617
622
|
readonly sessionID: Schema.String;
|
|
618
623
|
readonly title: Schema.String;
|
|
619
624
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
620
|
-
}
|
|
621
|
-
readonly mode: Schema.Literal<"url">;
|
|
622
|
-
readonly url: Schema.String;
|
|
623
|
-
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
624
|
-
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
625
|
-
};
|
|
626
|
-
readonly sessionID: Schema.String;
|
|
627
|
-
readonly title: Schema.String;
|
|
628
|
-
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
629
|
-
}>]>;
|
|
625
|
+
}>;
|
|
630
626
|
}>>, HttpApiEndpoint.Json<typeof InvalidRequestError | typeof ConflictError | typeof SessionNotFoundError>, FormLocationId, HttpApiMiddleware.Requires<FormLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.form.get", "GET", "/api/session/:sessionID/form/:formID", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
631
627
|
sessionID: Schema.String;
|
|
632
628
|
formID: Schema.brand<Schema.String, "Form.ID"> & {
|
|
633
629
|
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
634
630
|
};
|
|
635
631
|
}>>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.StringTree<never>, HttpApiEndpoint.Json<Schema.Struct<{
|
|
636
|
-
readonly data: Schema.
|
|
637
|
-
readonly
|
|
638
|
-
readonly fields: Schema.$Array<Schema.toTaggedUnion<"type", readonly [Schema.Struct<{
|
|
632
|
+
readonly data: Schema.Struct<{
|
|
633
|
+
readonly fields: Schema.NonEmptyArray<Schema.Union<readonly [Schema.Struct<{
|
|
639
634
|
readonly type: Schema.Literal<"string">;
|
|
640
635
|
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>;
|
|
641
636
|
readonly minLength: Schema.decodeTo<Schema.optional<Schema.toType<Schema.Int>>, Schema.optionalKey<Schema.Int>, never, never>;
|
|
@@ -742,6 +737,12 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
742
737
|
readonly op: Schema.Literals<readonly ["eq", "neq"]>;
|
|
743
738
|
readonly value: Schema.Union<readonly [Schema.String, Schema.Number, Schema.Boolean]>;
|
|
744
739
|
}>>>, never, never>;
|
|
740
|
+
}>, Schema.Struct<{
|
|
741
|
+
readonly key: Schema.String;
|
|
742
|
+
readonly type: Schema.Literal<"external">;
|
|
743
|
+
readonly url: Schema.String;
|
|
744
|
+
readonly title: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
745
|
+
readonly description: Schema.decodeTo<Schema.optional<Schema.toType<Schema.String>>, Schema.optionalKey<Schema.String>, never, never>;
|
|
745
746
|
}>]>>;
|
|
746
747
|
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
747
748
|
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
@@ -749,16 +750,7 @@ export declare const makeFormGroup: <LocationId extends HttpApiMiddleware.AnyId,
|
|
|
749
750
|
readonly sessionID: Schema.String;
|
|
750
751
|
readonly title: Schema.String;
|
|
751
752
|
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
752
|
-
}
|
|
753
|
-
readonly mode: Schema.Literal<"url">;
|
|
754
|
-
readonly url: Schema.String;
|
|
755
|
-
readonly id: Schema.brand<Schema.String, "Form.ID"> & {
|
|
756
|
-
create: (id?: string) => string & import("effect/Brand").Brand<"Form.ID">;
|
|
757
|
-
};
|
|
758
|
-
readonly sessionID: Schema.String;
|
|
759
|
-
readonly title: Schema.String;
|
|
760
|
-
readonly metadata: Schema.decodeTo<Schema.optional<Schema.toType<Schema.$Record<Schema.String, Schema.Unknown>>>, Schema.optionalKey<Schema.$Record<Schema.String, Schema.Unknown>>, never, never>;
|
|
761
|
-
}>]>;
|
|
753
|
+
}>;
|
|
762
754
|
}>>, HttpApiEndpoint.Json<typeof SessionNotFoundError | typeof FormNotFoundError>, FormLocationId, HttpApiMiddleware.Requires<FormLocationId>> | HttpApiEndpoint.HttpApiEndpoint<"session.form.state", "GET", "/api/session/:sessionID/form/:formID/state", HttpApiEndpoint.StringTree<Schema.Struct<{
|
|
763
755
|
sessionID: Schema.String;
|
|
764
756
|
formID: Schema.brand<Schema.String, "Form.ID"> & {
|
package/dist/groups/form.js
CHANGED
|
@@ -6,11 +6,9 @@ import { ConflictError, FormAlreadySettledError, FormInvalidAnswerError, FormNot
|
|
|
6
6
|
import { LocationQuery, locationQueryOpenApi } from "./location.js";
|
|
7
7
|
const CreatePayload = Schema.Struct({
|
|
8
8
|
id: Form.ID.pipe(Schema.optional),
|
|
9
|
-
title: Form.
|
|
10
|
-
metadata: Form.
|
|
11
|
-
|
|
12
|
-
fields: Form.FormInfo.fields.fields.pipe(Schema.optional),
|
|
13
|
-
url: Form.UrlInfo.fields.url.pipe(Schema.optional),
|
|
9
|
+
title: Form.Info.fields.title,
|
|
10
|
+
metadata: Form.Info.fields.metadata,
|
|
11
|
+
fields: Form.Info.fields.fields,
|
|
14
12
|
}).annotate({ identifier: "Form.CreatePayload" });
|
|
15
13
|
// Form routes intentionally look session-scoped, but use a form-specific middleware instead of
|
|
16
14
|
// SessionLocationMiddleware. The middleware treats real session IDs normally and has an
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "@opencode-ai/protocol",
|
|
4
|
-
"version": "0.0.0-next-
|
|
4
|
+
"version": "0.0.0-next-15271",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"typecheck": "tsgo --noEmit"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@opencode-ai/schema": "0.0.0-next-
|
|
29
|
+
"@opencode-ai/schema": "0.0.0-next-15271",
|
|
30
30
|
"effect": "4.0.0-beta.83"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|