@read-frog/api-contract 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.d.ts +203 -34
  2. package/package.json +2 -2
package/dist/index.d.ts CHANGED
@@ -84,6 +84,7 @@ type Primitive = string | number | symbol | bigint | boolean | null | undefined;
84
84
  type HasLength = {
85
85
  length: number;
86
86
  };
87
+ type Numeric = number | bigint | Date;
87
88
  type PropValues = Record<string, Set<Primitive>>;
88
89
  type PrimitiveSet = Set<Primitive>;
89
90
  type EmptyToNever<T$1> = keyof T$1 extends never ? never : T$1;
@@ -376,6 +377,25 @@ interface $ZodJWT extends $ZodType {
376
377
  _zod: $ZodJWTInternals;
377
378
  }
378
379
  declare const $ZodJWT: $constructor<$ZodJWT>;
380
+ interface $ZodNumberDef extends $ZodTypeDef {
381
+ type: "number";
382
+ coerce?: boolean;
383
+ }
384
+ interface $ZodNumberInternals<Input = unknown> extends $ZodTypeInternals<number, Input> {
385
+ def: $ZodNumberDef;
386
+ /** @deprecated Internal API, use with caution (not deprecated) */
387
+ pattern: RegExp;
388
+ /** @deprecated Internal API, use with caution (not deprecated) */
389
+ isst: $ZodIssueInvalidType;
390
+ bag: LoosePartial<{
391
+ minimum: number;
392
+ maximum: number;
393
+ exclusiveMinimum: number;
394
+ exclusiveMaximum: number;
395
+ format: string;
396
+ pattern: RegExp;
397
+ }>;
398
+ }
379
399
  interface $ZodArrayDef<T$1 extends SomeType = $ZodType> extends $ZodTypeDef {
380
400
  type: "array";
381
401
  element: T$1;
@@ -702,6 +722,57 @@ interface $ZodCheck<in T$1 = never> {
702
722
  _zod: $ZodCheckInternals<T$1>;
703
723
  }
704
724
  declare const $ZodCheck: $constructor<$ZodCheck<any>>;
725
+ interface $ZodCheckLessThanDef extends $ZodCheckDef {
726
+ check: "less_than";
727
+ value: Numeric;
728
+ inclusive: boolean;
729
+ }
730
+ interface $ZodCheckLessThanInternals<T$1 extends Numeric = Numeric> extends $ZodCheckInternals<T$1> {
731
+ def: $ZodCheckLessThanDef;
732
+ issc: $ZodIssueTooBig<T$1>;
733
+ }
734
+ interface $ZodCheckLessThan<T$1 extends Numeric = Numeric> extends $ZodCheck<T$1> {
735
+ _zod: $ZodCheckLessThanInternals<T$1>;
736
+ }
737
+ declare const $ZodCheckLessThan: $constructor<$ZodCheckLessThan>;
738
+ interface $ZodCheckGreaterThanDef extends $ZodCheckDef {
739
+ check: "greater_than";
740
+ value: Numeric;
741
+ inclusive: boolean;
742
+ }
743
+ interface $ZodCheckGreaterThanInternals<T$1 extends Numeric = Numeric> extends $ZodCheckInternals<T$1> {
744
+ def: $ZodCheckGreaterThanDef;
745
+ issc: $ZodIssueTooSmall<T$1>;
746
+ }
747
+ interface $ZodCheckGreaterThan<T$1 extends Numeric = Numeric> extends $ZodCheck<T$1> {
748
+ _zod: $ZodCheckGreaterThanInternals<T$1>;
749
+ }
750
+ declare const $ZodCheckGreaterThan: $constructor<$ZodCheckGreaterThan>;
751
+ interface $ZodCheckMultipleOfDef<T$1 extends number | bigint = number | bigint> extends $ZodCheckDef {
752
+ check: "multiple_of";
753
+ value: T$1;
754
+ }
755
+ interface $ZodCheckMultipleOfInternals<T$1 extends number | bigint = number | bigint> extends $ZodCheckInternals<T$1> {
756
+ def: $ZodCheckMultipleOfDef<T$1>;
757
+ issc: $ZodIssueNotMultipleOf;
758
+ }
759
+ interface $ZodCheckMultipleOf<T$1 extends number | bigint = number | bigint> extends $ZodCheck<T$1> {
760
+ _zod: $ZodCheckMultipleOfInternals<T$1>;
761
+ }
762
+ declare const $ZodCheckMultipleOf: $constructor<$ZodCheckMultipleOf<number | bigint>>;
763
+ type $ZodNumberFormats = "int32" | "uint32" | "float32" | "float64" | "safeint";
764
+ interface $ZodCheckNumberFormatDef extends $ZodCheckDef {
765
+ check: "number_format";
766
+ format: $ZodNumberFormats;
767
+ }
768
+ interface $ZodCheckNumberFormatInternals extends $ZodCheckInternals<number> {
769
+ def: $ZodCheckNumberFormatDef;
770
+ issc: $ZodIssueInvalidType | $ZodIssueTooBig<"number"> | $ZodIssueTooSmall<"number">;
771
+ }
772
+ interface $ZodCheckNumberFormat extends $ZodCheck<number> {
773
+ _zod: $ZodCheckNumberFormatInternals;
774
+ }
775
+ declare const $ZodCheckNumberFormat: $constructor<$ZodCheckNumberFormat>;
705
776
  interface $ZodCheckMaxLengthDef extends $ZodCheckDef {
706
777
  check: "max_length";
707
778
  maximum: number;
@@ -1021,6 +1092,10 @@ type $ZodCheckISODateTimeParams = CheckStringFormatParams<$ZodISODateTime, "patt
1021
1092
  type $ZodCheckISODateParams = CheckStringFormatParams<$ZodISODate, "pattern" | "when">;
1022
1093
  type $ZodCheckISOTimeParams = CheckStringFormatParams<$ZodISOTime, "pattern" | "when">;
1023
1094
  type $ZodCheckISODurationParams = CheckStringFormatParams<$ZodISODuration, "when">;
1095
+ type $ZodCheckNumberFormatParams = CheckParams<$ZodCheckNumberFormat, "format" | "when">;
1096
+ type $ZodCheckLessThanParams = CheckParams<$ZodCheckLessThan, "inclusive" | "value" | "when">;
1097
+ type $ZodCheckGreaterThanParams = CheckParams<$ZodCheckGreaterThan, "inclusive" | "value" | "when">;
1098
+ type $ZodCheckMultipleOfParams = CheckParams<$ZodCheckMultipleOf, "value" | "when">;
1024
1099
  type $ZodCheckMaxLengthParams = CheckParams<$ZodCheckMaxLength, "maximum" | "when">;
1025
1100
  type $ZodCheckMinLengthParams = CheckParams<$ZodCheckMinLength, "minimum" | "when">;
1026
1101
  type $ZodCheckLengthEqualsParams = CheckParams<$ZodCheckLengthEquals, "length" | "when">;
@@ -1228,6 +1303,44 @@ interface ZodString extends _ZodString<$ZodStringInternals<string>> {
1228
1303
  duration(params?: string | $ZodCheckISODurationParams): this;
1229
1304
  }
1230
1305
  declare const ZodString: $constructor<ZodString>;
1306
+ interface ZodStringFormat<Format extends string = string> extends _ZodString<$ZodStringFormatInternals<Format>> {}
1307
+ declare const ZodStringFormat: $constructor<ZodStringFormat>;
1308
+ interface ZodUUID extends ZodStringFormat<"uuid"> {
1309
+ _zod: $ZodUUIDInternals;
1310
+ }
1311
+ declare const ZodUUID: $constructor<ZodUUID>;
1312
+ interface _ZodNumber<Internals extends $ZodNumberInternals = $ZodNumberInternals> extends _ZodType<Internals> {
1313
+ gt(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1314
+ /** Identical to .min() */
1315
+ gte(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1316
+ min(value: number, params?: string | $ZodCheckGreaterThanParams): this;
1317
+ lt(value: number, params?: string | $ZodCheckLessThanParams): this;
1318
+ /** Identical to .max() */
1319
+ lte(value: number, params?: string | $ZodCheckLessThanParams): this;
1320
+ max(value: number, params?: string | $ZodCheckLessThanParams): this;
1321
+ /** Consider `z.int()` instead. This API is considered *legacy*; it will never be removed but a better alternative exists. */
1322
+ int(params?: string | $ZodCheckNumberFormatParams): this;
1323
+ /** @deprecated This is now identical to `.int()`. Only numbers in the safe integer range are accepted. */
1324
+ safe(params?: string | $ZodCheckNumberFormatParams): this;
1325
+ positive(params?: string | $ZodCheckGreaterThanParams): this;
1326
+ nonnegative(params?: string | $ZodCheckGreaterThanParams): this;
1327
+ negative(params?: string | $ZodCheckLessThanParams): this;
1328
+ nonpositive(params?: string | $ZodCheckLessThanParams): this;
1329
+ multipleOf(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1330
+ /** @deprecated Use `.multipleOf()` instead. */
1331
+ step(value: number, params?: string | $ZodCheckMultipleOfParams): this;
1332
+ /** @deprecated In v4 and later, z.number() does not allow infinite values by default. This is a no-op. */
1333
+ finite(params?: unknown): this;
1334
+ minValue: number | null;
1335
+ maxValue: number | null;
1336
+ /** @deprecated Check the `format` property instead. */
1337
+ isInt: boolean;
1338
+ /** @deprecated Number schemas no longer accept infinite values, so this always returns `true`. */
1339
+ isFinite: boolean;
1340
+ format: string | null;
1341
+ }
1342
+ interface ZodNumber extends _ZodNumber<$ZodNumberInternals<number>> {}
1343
+ declare const ZodNumber: $constructor<ZodNumber>;
1231
1344
  interface ZodArray<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T$1>>, $ZodArray<T$1> {
1232
1345
  element: T$1;
1233
1346
  min(minLength: number, params?: string | $ZodCheckMinLengthParams): this;
@@ -1320,7 +1433,7 @@ interface ZodReadonly<T$1 extends SomeType = $ZodType> extends _ZodType<$ZodRead
1320
1433
  }
1321
1434
  declare const ZodReadonly: $constructor<ZodReadonly>;
1322
1435
  //#endregion
1323
- //#region ../../node_modules/.pnpm/@orpc+shared@1.10.3_@opentelemetry+api@1.9.0/node_modules/@orpc/shared/dist/index.d.mts
1436
+ //#region ../../node_modules/.pnpm/@orpc+shared@1.12.2_@opentelemetry+api@1.9.0/node_modules/@orpc/shared/dist/index.d.mts
1324
1437
  type MaybeOptionalOptions<TOptions> = Record<never, never> extends TOptions ? [options?: TOptions] : [options: TOptions];
1325
1438
  type PromiseWithError<T$1, TError> = Promise<T$1> & {
1326
1439
  __error?: {
@@ -1337,7 +1450,7 @@ type ThrowableError = Registry extends {
1337
1450
  throwableError: infer T;
1338
1451
  } ? T : Error;
1339
1452
  //#endregion
1340
- //#region ../../node_modules/.pnpm/@orpc+client@1.10.3_@opentelemetry+api@1.9.0/node_modules/@orpc/client/dist/shared/client.BH1AYT_p.d.mts
1453
+ //#region ../../node_modules/.pnpm/@orpc+client@1.12.2_@opentelemetry+api@1.9.0/node_modules/@orpc/client/dist/shared/client.i2uoJbEp.d.mts
1341
1454
  type HTTPPath = `/${string}`;
1342
1455
  type HTTPMethod = 'HEAD' | 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
1343
1456
  type ClientContext = Record<PropertyKey, any>;
@@ -1357,7 +1470,7 @@ interface Client<TClientContext extends ClientContext, TInput, TOutput, TError>
1357
1470
  (...rest: ClientRest<TClientContext, TInput>): ClientPromiseResult<TOutput, TError>;
1358
1471
  }
1359
1472
  //#endregion
1360
- //#region ../../node_modules/.pnpm/@orpc+client@1.10.3_@opentelemetry+api@1.9.0/node_modules/@orpc/client/dist/index.d.mts
1473
+ //#region ../../node_modules/.pnpm/@orpc+client@1.12.2_@opentelemetry+api@1.9.0/node_modules/@orpc/client/dist/index.d.mts
1361
1474
  declare const COMMON_ORPC_ERROR_DEFS: {
1362
1475
  readonly BAD_REQUEST: {
1363
1476
  readonly status: 400;
@@ -1985,7 +2098,7 @@ declare namespace OpenAPIV3 {
1985
2098
  }
1986
2099
  }
1987
2100
  //#endregion
1988
- //#region ../../node_modules/.pnpm/@orpc+contract@1.10.3_@opentelemetry+api@1.9.0/node_modules/@orpc/contract/dist/shared/contract.CvRxURhn.d.mts
2101
+ //#region ../../node_modules/.pnpm/@orpc+contract@1.12.2_@opentelemetry+api@1.9.0/node_modules/@orpc/contract/dist/shared/contract.TuRtB1Ca.d.mts
1989
2102
  type Schema$1<TInput, TOutput> = StandardSchemaV1<TInput, TOutput>;
1990
2103
  type AnySchema = Schema$1<any, any>;
1991
2104
  type InferSchemaInput<T$1 extends AnySchema> = T$1 extends StandardSchemaV1<infer UInput, any> ? UInput : never;
@@ -2007,14 +2120,14 @@ interface Route {
2007
2120
  * The HTTP method of the procedure.
2008
2121
  * This option is typically relevant when integrating with OpenAPI.
2009
2122
  *
2010
- * @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
2123
+ * @see {@link https://orpc.dev/docs/openapi/routing OpenAPI Routing Docs}
2011
2124
  */
2012
2125
  method?: HTTPMethod;
2013
2126
  /**
2014
2127
  * The HTTP path of the procedure.
2015
2128
  * This option is typically relevant when integrating with OpenAPI.
2016
2129
  *
2017
- * @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
2130
+ * @see {@link https://orpc.dev/docs/openapi/routing OpenAPI Routing Docs}
2018
2131
  */
2019
2132
  path?: HTTPPath;
2020
2133
  /**
@@ -2028,28 +2141,28 @@ interface Route {
2028
2141
  * The summary of the procedure.
2029
2142
  * This option is typically relevant when integrating with OpenAPI.
2030
2143
  *
2031
- * @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2144
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2032
2145
  */
2033
2146
  summary?: string;
2034
2147
  /**
2035
2148
  * The description of the procedure.
2036
2149
  * This option is typically relevant when integrating with OpenAPI.
2037
2150
  *
2038
- * @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2151
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2039
2152
  */
2040
2153
  description?: string;
2041
2154
  /**
2042
2155
  * Marks the procedure as deprecated.
2043
2156
  * This option is typically relevant when integrating with OpenAPI.
2044
2157
  *
2045
- * @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2158
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2046
2159
  */
2047
2160
  deprecated?: boolean;
2048
2161
  /**
2049
2162
  * The tags of the procedure.
2050
2163
  * This option is typically relevant when integrating with OpenAPI.
2051
2164
  *
2052
- * @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2165
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2053
2166
  */
2054
2167
  tags?: readonly string[];
2055
2168
  /**
@@ -2057,7 +2170,7 @@ interface Route {
2057
2170
  * The status code must be in the 200-399 range.
2058
2171
  * This option is typically relevant when integrating with OpenAPI.
2059
2172
  *
2060
- * @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
2173
+ * @see {@link https://orpc.dev/docs/openapi/routing OpenAPI Routing Docs}
2061
2174
  * @default 200
2062
2175
  */
2063
2176
  successStatus?: number;
@@ -2065,7 +2178,7 @@ interface Route {
2065
2178
  * The description of the response when the procedure is successful.
2066
2179
  * This option is typically relevant when integrating with OpenAPI.
2067
2180
  *
2068
- * @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2181
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata OpenAPI Operation Metadata Docs}
2069
2182
  * @default 'OK'
2070
2183
  */
2071
2184
  successDescription?: string;
@@ -2088,7 +2201,7 @@ interface Route {
2088
2201
  * }
2089
2202
  * ```
2090
2203
  *
2091
- * @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
2204
+ * @see {@link https://orpc.dev/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
2092
2205
  * @default 'compact'
2093
2206
  */
2094
2207
  inputStructure?: InputStructure;
@@ -2113,14 +2226,14 @@ interface Route {
2113
2226
  * };
2114
2227
  * ```
2115
2228
  *
2116
- * @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
2229
+ * @see {@link https://orpc.dev/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
2117
2230
  * @default 'compact'
2118
2231
  */
2119
2232
  outputStructure?: OutputStructure;
2120
2233
  /**
2121
2234
  * Override entire auto-generated OpenAPI Operation Object Specification.
2122
2235
  *
2123
- * @see {@link https://orpc.unnoq.com/docs/openapi/openapi-specification#operation-metadata Operation Metadata Docs}
2236
+ * @see {@link https://orpc.dev/docs/openapi/openapi-specification#operation-metadata Operation Metadata Docs}
2124
2237
  */
2125
2238
  spec?: OpenAPIV3_1.OperationObject | ((current: OpenAPIV3_1.OperationObject) => OpenAPIV3_1.OperationObject);
2126
2239
  }
@@ -2134,7 +2247,7 @@ interface ContractProcedureDef<TInputSchema extends AnySchema, TOutputSchema ext
2134
2247
  /**
2135
2248
  * This class represents a contract procedure.
2136
2249
  *
2137
- * @see {@link https://orpc.unnoq.com/docs/contract-first/define-contract#procedure-contract Contract Procedure Docs}
2250
+ * @see {@link https://orpc.dev/docs/contract-first/define-contract#procedure-contract Contract Procedure Docs}
2138
2251
  */
2139
2252
  declare class ContractProcedure<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta> {
2140
2253
  /**
@@ -2147,7 +2260,7 @@ declare class ContractProcedure<TInputSchema extends AnySchema, TOutputSchema ex
2147
2260
  * Represents a contract router, which defines a hierarchical structure of contract procedures.
2148
2261
  *
2149
2262
  * @info A contract procedure is a contract router too.
2150
- * @see {@link https://orpc.unnoq.com/docs/contract-first/define-contract#contract-router Contract Router Docs}
2263
+ * @see {@link https://orpc.dev/docs/contract-first/define-contract#contract-router Contract Router Docs}
2151
2264
  */
2152
2265
  type ContractRouter<TMeta extends Meta> = ContractProcedure<any, any, any, TMeta> | {
2153
2266
  [k: string]: ContractRouter<TMeta>;
@@ -2157,23 +2270,23 @@ type AnyContractRouter = ContractRouter<any>;
2157
2270
  * Infer all inputs of the contract router.
2158
2271
  *
2159
2272
  * @info A contract procedure is a contract router too.
2160
- * @see {@link https://orpc.unnoq.com/docs/contract-first/define-contract#utilities Contract Utilities Docs}
2273
+ * @see {@link https://orpc.dev/docs/contract-first/define-contract#utilities Contract Utilities Docs}
2161
2274
  */
2162
2275
  //#endregion
2163
- //#region ../../node_modules/.pnpm/@orpc+contract@1.10.3_@opentelemetry+api@1.9.0/node_modules/@orpc/contract/dist/index.d.mts
2276
+ //#region ../../node_modules/.pnpm/@orpc+contract@1.12.2_@opentelemetry+api@1.9.0/node_modules/@orpc/contract/dist/index.d.mts
2164
2277
  interface ContractProcedureBuilderWithInputOutput<TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap, TMeta extends Meta> extends ContractProcedure<TInputSchema, TOutputSchema, TErrorMap, TMeta> {
2165
2278
  /**
2166
2279
  * Adds type-safe custom errors to the contract.
2167
2280
  * The provided errors are spared-merged with any existing errors in the contract.
2168
2281
  *
2169
- * @see {@link https://orpc.unnoq.com/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
2282
+ * @see {@link https://orpc.dev/docs/error-handling#type%E2%80%90safe-error-handling Type-Safe Error Handling Docs}
2170
2283
  */
2171
2284
  errors<U$1 extends ErrorMap>(errors: U$1): ContractProcedureBuilderWithInputOutput<TInputSchema, TOutputSchema, MergedErrorMap<TErrorMap, U$1>, TMeta>;
2172
2285
  /**
2173
2286
  * Sets or updates the metadata for the contract.
2174
2287
  * The provided metadata is spared-merged with any existing metadata in the contract.
2175
2288
  *
2176
- * @see {@link https://orpc.unnoq.com/docs/metadata Metadata Docs}
2289
+ * @see {@link https://orpc.dev/docs/metadata Metadata Docs}
2177
2290
  */
2178
2291
  meta(meta: TMeta): ContractProcedureBuilderWithInputOutput<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
2179
2292
  /**
@@ -2181,14 +2294,45 @@ interface ContractProcedureBuilderWithInputOutput<TInputSchema extends AnySchema
2181
2294
  * The provided route is spared-merged with any existing route in the contract.
2182
2295
  * This option is typically relevant when integrating with OpenAPI.
2183
2296
  *
2184
- * @see {@link https://orpc.unnoq.com/docs/openapi/routing OpenAPI Routing Docs}
2185
- * @see {@link https://orpc.unnoq.com/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
2297
+ * @see {@link https://orpc.dev/docs/openapi/routing OpenAPI Routing Docs}
2298
+ * @see {@link https://orpc.dev/docs/openapi/input-output-structure OpenAPI Input/Output Structure Docs}
2186
2299
  */
2187
2300
  route(route: Route): ContractProcedureBuilderWithInputOutput<TInputSchema, TOutputSchema, TErrorMap, TMeta>;
2188
2301
  }
2189
2302
  type ContractProcedureClient<TClientContext extends ClientContext, TInputSchema extends AnySchema, TOutputSchema extends AnySchema, TErrorMap extends ErrorMap> = Client<TClientContext, InferSchemaInput<TInputSchema>, InferSchemaOutput<TOutputSchema>, ErrorFromErrorMap<TErrorMap>>;
2190
2303
  type ContractRouterClient<TRouter extends AnyContractRouter, TClientContext extends ClientContext = Record<never, never>> = TRouter extends ContractProcedure<infer UInputSchema, infer UOutputSchema, infer UErrorMap, any> ? ContractProcedureClient<TClientContext, UInputSchema, UOutputSchema, UErrorMap> : { [K in keyof TRouter]: TRouter[K] extends AnyContractRouter ? ContractRouterClient<TRouter[K], TClientContext> : never };
2191
2304
  //#endregion
2305
+ //#region src/schemas/custom-table.d.ts
2306
+ declare const CustomTableListInputSchema: ZodObject<{}, $strip>;
2307
+ declare const CustomTableListItemSchema: ZodObject<{
2308
+ id: ZodString;
2309
+ name: ZodString;
2310
+ }, $strip>;
2311
+ declare const CustomTableListOutputSchema: ZodArray<ZodObject<{
2312
+ id: ZodString;
2313
+ name: ZodString;
2314
+ }, $strip>>;
2315
+ declare const CustomTableCreateInputSchema: ZodObject<{
2316
+ id: ZodOptional<ZodUUID>;
2317
+ name: ZodString;
2318
+ }, $strip>;
2319
+ declare const CustomTableCreateOutputSchema: ZodObject<{
2320
+ txid: ZodNumber;
2321
+ }, $strip>;
2322
+ declare const CustomTableUpdateInputSchema: ZodObject<{
2323
+ id: ZodUUID;
2324
+ name: ZodOptional<ZodString>;
2325
+ }, $strip>;
2326
+ declare const CustomTableUpdateOutputSchema: ZodObject<{
2327
+ txid: ZodNumber;
2328
+ }, $strip>;
2329
+ declare const CustomTableDeleteInputSchema: ZodObject<{
2330
+ id: ZodUUID;
2331
+ }, $strip>;
2332
+ declare const CustomTableDeleteOutputSchema: ZodObject<{
2333
+ txid: ZodNumber;
2334
+ }, $strip>;
2335
+ //#endregion
2192
2336
  //#region src/schemas/echo.d.ts
2193
2337
  declare const EchoInputSchema: ZodObject<{
2194
2338
  message: ZodString;
@@ -2202,17 +2346,42 @@ declare const EchoTwiceOutputSchema: ZodObject<{
2202
2346
  //#endregion
2203
2347
  //#region src/index.d.ts
2204
2348
  declare const contract: {
2205
- echoHandler: ContractProcedureBuilderWithInputOutput<ZodObject<{
2206
- message: ZodString;
2207
- }, $strip>, ZodObject<{
2208
- echoedMessage: ZodString;
2209
- }, $strip>, Record<never, never>, Record<never, never>>;
2210
- echoTwiceHandler: ContractProcedureBuilderWithInputOutput<ZodObject<{
2211
- message: ZodString;
2212
- }, $strip>, ZodObject<{
2213
- echoedTwiceMessage: ZodString;
2214
- }, $strip>, Record<never, never>, Record<never, never>>;
2349
+ customTable: {
2350
+ list: ContractProcedureBuilderWithInputOutput<ZodObject<{}, $strip>, ZodArray<ZodObject<{
2351
+ id: ZodString;
2352
+ name: ZodString;
2353
+ }, $strip>>, Record<never, never>, Record<never, never>>;
2354
+ create: ContractProcedureBuilderWithInputOutput<ZodObject<{
2355
+ id: ZodOptional<ZodUUID>;
2356
+ name: ZodString;
2357
+ }, $strip>, ZodObject<{
2358
+ txid: ZodNumber;
2359
+ }, $strip>, Record<never, never>, Record<never, never>>;
2360
+ update: ContractProcedureBuilderWithInputOutput<ZodObject<{
2361
+ id: ZodUUID;
2362
+ name: ZodOptional<ZodString>;
2363
+ }, $strip>, ZodObject<{
2364
+ txid: ZodNumber;
2365
+ }, $strip>, Record<never, never>, Record<never, never>>;
2366
+ delete: ContractProcedureBuilderWithInputOutput<ZodObject<{
2367
+ id: ZodUUID;
2368
+ }, $strip>, ZodObject<{
2369
+ txid: ZodNumber;
2370
+ }, $strip>, Record<never, never>, Record<never, never>>;
2371
+ };
2372
+ echo: {
2373
+ once: ContractProcedureBuilderWithInputOutput<ZodObject<{
2374
+ message: ZodString;
2375
+ }, $strip>, ZodObject<{
2376
+ echoedMessage: ZodString;
2377
+ }, $strip>, Record<never, never>, Record<never, never>>;
2378
+ twice: ContractProcedureBuilderWithInputOutput<ZodObject<{
2379
+ message: ZodString;
2380
+ }, $strip>, ZodObject<{
2381
+ echoedTwiceMessage: ZodString;
2382
+ }, $strip>, Record<never, never>, Record<never, never>>;
2383
+ };
2215
2384
  };
2216
2385
  type ORPCRouterClient = ContractRouterClient<typeof contract>;
2217
2386
  //#endregion
2218
- export { EchoInputSchema, EchoOutputSchema, EchoTwiceOutputSchema, ORPCRouterClient, contract };
2387
+ export { CustomTableCreateInputSchema, CustomTableCreateOutputSchema, CustomTableDeleteInputSchema, CustomTableDeleteOutputSchema, CustomTableListInputSchema, CustomTableListItemSchema, CustomTableListOutputSchema, CustomTableUpdateInputSchema, CustomTableUpdateOutputSchema, EchoInputSchema, EchoOutputSchema, EchoTwiceOutputSchema, ORPCRouterClient, contract };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@read-frog/api-contract",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.1.0",
5
5
  "private": false,
6
6
  "exports": {
7
7
  ".": "./dist/index.d.ts"
@@ -11,7 +11,7 @@
11
11
  "dist"
12
12
  ],
13
13
  "dependencies": {
14
- "@orpc/contract": "^1.10.3",
14
+ "@orpc/contract": "^1.12.2",
15
15
  "zod": "^4.1.12"
16
16
  },
17
17
  "devDependencies": {