@spader/spall-sdk 1.0.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 (70) hide show
  1. package/dist/app.d.ts +7 -0
  2. package/dist/app.d.ts.map +1 -0
  3. package/dist/client.d.ts +20 -0
  4. package/dist/client.d.ts.map +1 -0
  5. package/dist/client.js +1642 -0
  6. package/dist/client.js.map +21 -0
  7. package/dist/gen/client/client.gen.d.ts +3 -0
  8. package/dist/gen/client/client.gen.d.ts.map +1 -0
  9. package/dist/gen/client/index.d.ts +9 -0
  10. package/dist/gen/client/index.d.ts.map +1 -0
  11. package/dist/gen/client/types.gen.d.ts +118 -0
  12. package/dist/gen/client/types.gen.d.ts.map +1 -0
  13. package/dist/gen/client/utils.gen.d.ts +34 -0
  14. package/dist/gen/client/utils.gen.d.ts.map +1 -0
  15. package/dist/gen/client.gen.d.ts +13 -0
  16. package/dist/gen/client.gen.d.ts.map +1 -0
  17. package/dist/gen/core/auth.gen.d.ts +19 -0
  18. package/dist/gen/core/auth.gen.d.ts.map +1 -0
  19. package/dist/gen/core/bodySerializer.gen.d.ts +26 -0
  20. package/dist/gen/core/bodySerializer.gen.d.ts.map +1 -0
  21. package/dist/gen/core/params.gen.d.ts +44 -0
  22. package/dist/gen/core/params.gen.d.ts.map +1 -0
  23. package/dist/gen/core/pathSerializer.gen.d.ts +34 -0
  24. package/dist/gen/core/pathSerializer.gen.d.ts.map +1 -0
  25. package/dist/gen/core/queryKeySerializer.gen.d.ts +19 -0
  26. package/dist/gen/core/queryKeySerializer.gen.d.ts.map +1 -0
  27. package/dist/gen/core/serverSentEvents.gen.d.ts +72 -0
  28. package/dist/gen/core/serverSentEvents.gen.d.ts.map +1 -0
  29. package/dist/gen/core/types.gen.d.ts +79 -0
  30. package/dist/gen/core/types.gen.d.ts.map +1 -0
  31. package/dist/gen/core/utils.gen.d.ts +20 -0
  32. package/dist/gen/core/utils.gen.d.ts.map +1 -0
  33. package/dist/gen/index.d.ts +3 -0
  34. package/dist/gen/index.d.ts.map +1 -0
  35. package/dist/gen/sdk.gen.d.ts +358 -0
  36. package/dist/gen/sdk.gen.d.ts.map +1 -0
  37. package/dist/gen/types.gen.d.ts +1596 -0
  38. package/dist/gen/types.gen.d.ts.map +1 -0
  39. package/dist/index.d.ts +5 -0
  40. package/dist/index.d.ts.map +1 -0
  41. package/dist/index.js +2925 -0
  42. package/dist/index.js.map +32 -0
  43. package/dist/lock.d.ts +20 -0
  44. package/dist/lock.d.ts.map +1 -0
  45. package/dist/log.d.ts +22 -0
  46. package/dist/log.d.ts.map +1 -0
  47. package/dist/routes/commit.d.ts +19 -0
  48. package/dist/routes/commit.d.ts.map +1 -0
  49. package/dist/routes/corpus.d.ts +317 -0
  50. package/dist/routes/corpus.d.ts.map +1 -0
  51. package/dist/routes/note.d.ts +79 -0
  52. package/dist/routes/note.d.ts.map +1 -0
  53. package/dist/routes/query.d.ts +314 -0
  54. package/dist/routes/query.d.ts.map +1 -0
  55. package/dist/routes/sse.d.ts +75 -0
  56. package/dist/routes/sse.d.ts.map +1 -0
  57. package/dist/routes/workspace.d.ts +102 -0
  58. package/dist/routes/workspace.d.ts.map +1 -0
  59. package/dist/serve.d.ts +2 -0
  60. package/dist/serve.d.ts.map +1 -0
  61. package/dist/server.d.ts +27 -0
  62. package/dist/server.d.ts.map +1 -0
  63. package/dist/server.js +1433 -0
  64. package/dist/server.js.map +21 -0
  65. package/dist/sse.d.ts +8 -0
  66. package/dist/sse.d.ts.map +1 -0
  67. package/dist/util.d.ts +5 -0
  68. package/dist/util.d.ts.map +1 -0
  69. package/openapi.json +5694 -0
  70. package/package.json +70 -0
@@ -0,0 +1,44 @@
1
+ type Slot = "body" | "headers" | "path" | "query";
2
+ export type Field = {
3
+ in: Exclude<Slot, "body">;
4
+ /**
5
+ * Field name. This is the name we want the user to see and use.
6
+ */
7
+ key: string;
8
+ /**
9
+ * Field mapped name. This is the name we want to use in the request.
10
+ * If omitted, we use the same value as `key`.
11
+ */
12
+ map?: string;
13
+ } | {
14
+ in: Extract<Slot, "body">;
15
+ /**
16
+ * Key isn't required for bodies.
17
+ */
18
+ key?: string;
19
+ map?: string;
20
+ } | {
21
+ /**
22
+ * Field name. This is the name we want the user to see and use.
23
+ */
24
+ key: string;
25
+ /**
26
+ * Field mapped name. This is the name we want to use in the request.
27
+ * If `in` is omitted, `map` aliases `key` to the transport layer.
28
+ */
29
+ map: Slot;
30
+ };
31
+ export interface Fields {
32
+ allowExtra?: Partial<Record<Slot, boolean>>;
33
+ args?: ReadonlyArray<Field>;
34
+ }
35
+ export type FieldsConfig = ReadonlyArray<Field | Fields>;
36
+ interface Params {
37
+ body: unknown;
38
+ headers: Record<string, unknown>;
39
+ path: Record<string, unknown>;
40
+ query: Record<string, unknown>;
41
+ }
42
+ export declare const buildClientParams: (args: ReadonlyArray<unknown>, fields: FieldsConfig) => Params;
43
+ export {};
44
+ //# sourceMappingURL=params.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"params.gen.d.ts","sourceRoot":"","sources":["../../../src/gen/core/params.gen.ts"],"names":[],"mappings":"AAEA,KAAK,IAAI,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAElD,MAAM,MAAM,KAAK,GACb;IACE,EAAE,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GACD;IACE,EAAE,EAAE,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAC1B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;CACd,GACD;IACE;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,GAAG,EAAE,IAAI,CAAC;CACX,CAAC;AAEN,MAAM,WAAW,MAAM;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5C,IAAI,CAAC,EAAE,aAAa,CAAC,KAAK,CAAC,CAAC;CAC7B;AAED,MAAM,MAAM,YAAY,GAAG,aAAa,CAAC,KAAK,GAAG,MAAM,CAAC,CAAC;AA+CzD,UAAU,MAAM;IACd,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAUD,eAAO,MAAM,iBAAiB,GAC5B,MAAM,aAAa,CAAC,OAAO,CAAC,EAC5B,QAAQ,YAAY,WAqErB,CAAC"}
@@ -0,0 +1,34 @@
1
+ interface SerializeOptions<T> extends SerializePrimitiveOptions, SerializerOptions<T> {
2
+ }
3
+ interface SerializePrimitiveOptions {
4
+ allowReserved?: boolean;
5
+ name: string;
6
+ }
7
+ export interface SerializerOptions<T> {
8
+ /**
9
+ * @default true
10
+ */
11
+ explode: boolean;
12
+ style: T;
13
+ }
14
+ export type ArrayStyle = "form" | "spaceDelimited" | "pipeDelimited";
15
+ export type ArraySeparatorStyle = ArrayStyle | MatrixStyle;
16
+ type MatrixStyle = "label" | "matrix" | "simple";
17
+ export type ObjectStyle = "form" | "deepObject";
18
+ type ObjectSeparatorStyle = ObjectStyle | MatrixStyle;
19
+ interface SerializePrimitiveParam extends SerializePrimitiveOptions {
20
+ value: string;
21
+ }
22
+ export declare const separatorArrayExplode: (style: ArraySeparatorStyle) => "." | ";" | "," | "&";
23
+ export declare const separatorArrayNoExplode: (style: ArraySeparatorStyle) => "," | "|" | "%20";
24
+ export declare const separatorObjectExplode: (style: ObjectSeparatorStyle) => "." | ";" | "," | "&";
25
+ export declare const serializeArrayParam: ({ allowReserved, explode, name, style, value, }: SerializeOptions<ArraySeparatorStyle> & {
26
+ value: unknown[];
27
+ }) => string;
28
+ export declare const serializePrimitiveParam: ({ allowReserved, name, value, }: SerializePrimitiveParam) => string;
29
+ export declare const serializeObjectParam: ({ allowReserved, explode, name, style, value, valueOnly, }: SerializeOptions<ObjectSeparatorStyle> & {
30
+ value: Record<string, unknown> | Date;
31
+ valueOnly?: boolean;
32
+ }) => string;
33
+ export {};
34
+ //# sourceMappingURL=pathSerializer.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pathSerializer.gen.d.ts","sourceRoot":"","sources":["../../../src/gen/core/pathSerializer.gen.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB,CAAC,CAAC,CAC1B,SAAQ,yBAAyB,EAAE,iBAAiB,CAAC,CAAC,CAAC;CAAG;AAE5D,UAAU,yBAAyB;IACjC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,iBAAiB,CAAC,CAAC;IAClC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,CAAC,CAAC;CACV;AAED,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,gBAAgB,GAAG,eAAe,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,WAAW,CAAC;AAC3D,KAAK,WAAW,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACjD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,YAAY,CAAC;AAChD,KAAK,oBAAoB,GAAG,WAAW,GAAG,WAAW,CAAC;AAEtD,UAAU,uBAAwB,SAAQ,yBAAyB;IACjE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,qBAAqB,GAAI,OAAO,mBAAmB,0BAW/D,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,OAAO,mBAAmB,sBAWjE,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,OAAO,oBAAoB,0BAWjE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,iDAMjC,gBAAgB,CAAC,mBAAmB,CAAC,GAAG;IACzC,KAAK,EAAE,OAAO,EAAE,CAAC;CAClB,WAkCA,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,iCAIrC,uBAAuB,WAYzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,4DAOlC,gBAAgB,CAAC,oBAAoB,CAAC,GAAG;IAC1C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB,WAwCA,CAAC"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * JSON-friendly union that mirrors what Pinia Colada can hash.
3
+ */
4
+ export type JsonValue = null | string | number | boolean | JsonValue[] | {
5
+ [key: string]: JsonValue;
6
+ };
7
+ /**
8
+ * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.
9
+ */
10
+ export declare const queryKeyJsonReplacer: (_key: string, value: unknown) => {} | null | undefined;
11
+ /**
12
+ * Safely stringifies a value and parses it back into a JsonValue.
13
+ */
14
+ export declare const stringifyToJsonValue: (input: unknown) => JsonValue | undefined;
15
+ /**
16
+ * Normalizes any accepted value into a JSON-friendly shape for query keys.
17
+ */
18
+ export declare const serializeQueryKeyValue: (value: unknown) => JsonValue | undefined;
19
+ //# sourceMappingURL=queryKeySerializer.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryKeySerializer.gen.d.ts","sourceRoot":"","sources":["../../../src/gen/core/queryKeySerializer.gen.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,MAAM,SAAS,GACjB,IAAI,GACJ,MAAM,GACN,MAAM,GACN,OAAO,GACP,SAAS,EAAE,GACX;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,CAAC;AAEjC;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,EAAE,OAAO,OAAO,0BAehE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,SAAS,GAAG,SAUjE,CAAC;AAuCF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,OAAO,OAAO,KACb,SAAS,GAAG,SA6Cd,CAAC"}
@@ -0,0 +1,72 @@
1
+ import type { Config } from "./types.gen";
2
+ export type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, "method"> & Pick<Config, "method" | "responseTransformer" | "responseValidator"> & {
3
+ /**
4
+ * Fetch API implementation. You can use this option to provide a custom
5
+ * fetch instance.
6
+ *
7
+ * @default globalThis.fetch
8
+ */
9
+ fetch?: typeof fetch;
10
+ /**
11
+ * Implementing clients can call request interceptors inside this hook.
12
+ */
13
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
14
+ /**
15
+ * Callback invoked when a network or parsing error occurs during streaming.
16
+ *
17
+ * This option applies only if the endpoint returns a stream of events.
18
+ *
19
+ * @param error The error that occurred.
20
+ */
21
+ onSseError?: (error: unknown) => void;
22
+ /**
23
+ * Callback invoked when an event is streamed from the server.
24
+ *
25
+ * This option applies only if the endpoint returns a stream of events.
26
+ *
27
+ * @param event Event streamed from the server.
28
+ * @returns Nothing (void).
29
+ */
30
+ onSseEvent?: (event: StreamEvent<TData>) => void;
31
+ serializedBody?: RequestInit["body"];
32
+ /**
33
+ * Default retry delay in milliseconds.
34
+ *
35
+ * This option applies only if the endpoint returns a stream of events.
36
+ *
37
+ * @default 3000
38
+ */
39
+ sseDefaultRetryDelay?: number;
40
+ /**
41
+ * Maximum number of retry attempts before giving up.
42
+ */
43
+ sseMaxRetryAttempts?: number;
44
+ /**
45
+ * Maximum retry delay in milliseconds.
46
+ *
47
+ * Applies only when exponential backoff is used.
48
+ *
49
+ * This option applies only if the endpoint returns a stream of events.
50
+ *
51
+ * @default 30000
52
+ */
53
+ sseMaxRetryDelay?: number;
54
+ /**
55
+ * Optional sleep function for retry backoff.
56
+ *
57
+ * Defaults to using `setTimeout`.
58
+ */
59
+ sseSleepFn?: (ms: number) => Promise<void>;
60
+ url: string;
61
+ };
62
+ export interface StreamEvent<TData = unknown> {
63
+ data: TData;
64
+ event?: string;
65
+ id?: string;
66
+ retry?: number;
67
+ }
68
+ export type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
69
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
70
+ };
71
+ export declare const createSseClient: <TData = unknown>({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }: ServerSentEventsOptions) => ServerSentEventsResult<TData>;
72
+ //# sourceMappingURL=serverSentEvents.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverSentEvents.gen.d.ts","sourceRoot":"","sources":["../../../src/gen/core/serverSentEvents.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,MAAM,uBAAuB,CAAC,KAAK,GAAG,OAAO,IAAI,IAAI,CACzD,WAAW,EACX,QAAQ,CACT,GACC,IAAI,CAAC,MAAM,EAAE,QAAQ,GAAG,qBAAqB,GAAG,mBAAmB,CAAC,GAAG;IACrE;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACjE;;;;;;OAMG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IACjD,cAAc,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACrC;;;;;;OAMG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;OAEG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B;;;;;;;;OAQG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;OAIG;IACH,UAAU,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEJ,MAAM,WAAW,WAAW,CAAC,KAAK,GAAG,OAAO;IAC1C,IAAI,EAAE,KAAK,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,MAAM,sBAAsB,CAChC,KAAK,GAAG,OAAO,EACf,OAAO,GAAG,IAAI,EACd,KAAK,GAAG,OAAO,IACb;IACF,MAAM,EAAE,cAAc,CACpB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,KAAK,CAAC,GAAG,KAAK,EAClE,OAAO,EACP,KAAK,CACN,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,eAAe,GAAI,KAAK,GAAG,OAAO,EAAE,yKAY9C,uBAAuB,KAAG,sBAAsB,CAAC,KAAK,CAqKxD,CAAC"}
@@ -0,0 +1,79 @@
1
+ import type { Auth, AuthToken } from "./auth.gen";
2
+ import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from "./bodySerializer.gen";
3
+ export type HttpMethod = "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
4
+ export type Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
5
+ /**
6
+ * Returns the final request URL.
7
+ */
8
+ buildUrl: BuildUrlFn;
9
+ getConfig: () => Config;
10
+ request: RequestFn;
11
+ setConfig: (config: Config) => Config;
12
+ } & {
13
+ [K in HttpMethod]: MethodFn;
14
+ } & ([SseFn] extends [never] ? {
15
+ sse?: never;
16
+ } : {
17
+ sse: {
18
+ [K in HttpMethod]: SseFn;
19
+ };
20
+ });
21
+ export interface Config {
22
+ /**
23
+ * Auth token or a function returning auth token. The resolved value will be
24
+ * added to the request payload as defined by its `security` array.
25
+ */
26
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
27
+ /**
28
+ * A function for serializing request body parameter. By default,
29
+ * {@link JSON.stringify()} will be used.
30
+ */
31
+ bodySerializer?: BodySerializer | null;
32
+ /**
33
+ * An object containing any HTTP headers that you want to pre-populate your
34
+ * `Headers` object with.
35
+ *
36
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
37
+ */
38
+ headers?: RequestInit["headers"] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
39
+ /**
40
+ * The request method.
41
+ *
42
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
43
+ */
44
+ method?: Uppercase<HttpMethod>;
45
+ /**
46
+ * A function for serializing request query parameters. By default, arrays
47
+ * will be exploded in form style, objects will be exploded in deepObject
48
+ * style, and reserved characters are percent-encoded.
49
+ *
50
+ * This method will have no effect if the native `paramsSerializer()` Axios
51
+ * API function is used.
52
+ *
53
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
54
+ */
55
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
56
+ /**
57
+ * A function validating request data. This is useful if you want to ensure
58
+ * the request conforms to the desired shape, so it can be safely sent to
59
+ * the server.
60
+ */
61
+ requestValidator?: (data: unknown) => Promise<unknown>;
62
+ /**
63
+ * A function transforming response data before it's returned. This is useful
64
+ * for post-processing data, e.g. converting ISO strings into Date objects.
65
+ */
66
+ responseTransformer?: (data: unknown) => Promise<unknown>;
67
+ /**
68
+ * A function validating response data. This is useful if you want to ensure
69
+ * the response conforms to the desired shape, so it can be safely passed to
70
+ * the transformers and returned to the user.
71
+ */
72
+ responseValidator?: (data: unknown) => Promise<unknown>;
73
+ }
74
+ type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] ? true : [T] extends [never | undefined] ? [undefined] extends [T] ? false : true : false;
75
+ export type OmitNever<T extends Record<string, unknown>> = {
76
+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
77
+ };
78
+ export {};
79
+ //# sourceMappingURL=types.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.gen.d.ts","sourceRoot":"","sources":["../../../src/gen/core/types.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAClD,OAAO,KAAK,EACV,cAAc,EACd,eAAe,EACf,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,UAAU,GAClB,SAAS,GACT,QAAQ,GACR,KAAK,GACL,MAAM,GACN,SAAS,GACT,OAAO,GACP,MAAM,GACN,KAAK,GACL,OAAO,CAAC;AAEZ,MAAM,MAAM,MAAM,CAChB,SAAS,GAAG,KAAK,EACjB,MAAM,GAAG,OAAO,EAChB,QAAQ,GAAG,KAAK,EAChB,UAAU,GAAG,KAAK,EAClB,KAAK,GAAG,KAAK,IACX;IACF;;OAEG;IACH,QAAQ,EAAE,UAAU,CAAC;IACrB,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,OAAO,EAAE,SAAS,CAAC;IACnB,SAAS,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC;CACvC,GAAG;KACD,CAAC,IAAI,UAAU,GAAG,QAAQ;CAC5B,GAAG,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GACtB;IAAE,GAAG,CAAC,EAAE,KAAK,CAAA;CAAE,GACf;IAAE,GAAG,EAAE;SAAG,CAAC,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M,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI;KACxD,CAAC,IAAI,MAAM,CAAC,IAAI,8BAA8B,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAC9D,KAAK,GACL,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACb,CAAC"}
@@ -0,0 +1,20 @@
1
+ import type { BodySerializer, QuerySerializer } from "./bodySerializer.gen";
2
+ export interface PathSerializer {
3
+ path: Record<string, unknown>;
4
+ url: string;
5
+ }
6
+ export declare const PATH_PARAM_RE: RegExp;
7
+ export declare const defaultPathSerializer: ({ path, url: _url }: PathSerializer) => string;
8
+ export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
9
+ baseUrl?: string;
10
+ path?: Record<string, unknown>;
11
+ query?: Record<string, unknown>;
12
+ querySerializer: QuerySerializer;
13
+ url: string;
14
+ }) => string;
15
+ export declare function getValidRequestBody(options: {
16
+ body?: unknown;
17
+ bodySerializer?: BodySerializer | null;
18
+ serializedBody?: unknown;
19
+ }): unknown;
20
+ //# sourceMappingURL=utils.gen.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.gen.d.ts","sourceRoot":"","sources":["../../../src/gen/core/utils.gen.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAQ5E,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC9B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,eAAO,MAAM,aAAa,QAAgB,CAAC;AAE3C,eAAO,MAAM,qBAAqB,GAAI,qBAAqB,cAAc,WAoExE,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,uDAMpB;IACD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,eAAe,EAAE,eAAe,CAAC;IACjC,GAAG,EAAE,MAAM,CAAC;CACb,WAcA,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,OAAO,EAAE;IAC3C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACvC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,WAuBA"}
@@ -0,0 +1,3 @@
1
+ export { Commit, Corpus, Note, Note2, type Options, Query, Server, SpallClient, Sse, Workspace, } from "./sdk.gen";
2
+ export type { ClientOptions, CommitRunData, CommitRunResponse, CommitRunResponses, CorpusCreateData, CorpusCreateResponse, CorpusCreateResponses, CorpusDeleteData, CorpusDeleteError, CorpusDeleteErrors, CorpusDeleteResponse, CorpusDeleteResponses, CorpusGetData, CorpusGetError, CorpusGetErrors, CorpusGetResponse, CorpusGetResponses, CorpusListData, CorpusListError, CorpusListErrors, CorpusListResponse, CorpusListResponses, EventsData, EventsResponse, EventsResponses, HealthData, HealthResponse, HealthResponses, NoteAddData, NoteAddError, NoteAddErrors, NoteAddResponse, NoteAddResponses, NoteGetByIdData, NoteGetByIdError, NoteGetByIdErrors, NoteGetByIdResponse, NoteGetByIdResponses, NoteGetData, NoteGetError, NoteGetErrors, NoteGetResponse, NoteGetResponses, NoteListByPathData, NoteListByPathError, NoteListByPathErrors, NoteListByPathResponse, NoteListByPathResponses, NoteListData, NoteListError, NoteListErrors, NoteListResponse, NoteListResponses, NoteSyncData, NoteSyncResponse, NoteSyncResponses, NoteUpdateData, NoteUpdateError, NoteUpdateErrors, NoteUpdateResponse, NoteUpdateResponses, NoteUpsertData, NoteUpsertError, NoteUpsertErrors, NoteUpsertResponse, NoteUpsertResponses, QueryCreateData, QueryCreateError, QueryCreateErrors, QueryCreateResponse, QueryCreateResponses, QueryFetchData, QueryFetchError, QueryFetchErrors, QueryFetchResponse, QueryFetchResponses, QueryGetData, QueryGetError, QueryGetErrors, QueryGetResponse, QueryGetResponses, QueryNotesData, QueryNotesError, QueryNotesErrors, QueryNotesResponse, QueryNotesResponses, QueryPathsData, QueryPathsError, QueryPathsErrors, QueryPathsResponse, QueryPathsResponses, QueryRecentData, QueryRecentResponse, QueryRecentResponses, QuerySearchData, QuerySearchError, QuerySearchErrors, QuerySearchResponse, QuerySearchResponses, QueryVsearchData, QueryVsearchError, QueryVsearchErrors, QueryVsearchResponse, QueryVsearchResponses, ServerShutdownData, ServerShutdownResponse, ServerShutdownResponses, SseNoteAddData, SseNoteAddResponse, SseNoteAddResponses, SseNoteSyncData, SseNoteSyncResponse, SseNoteSyncResponses, SseNoteUpdateData, SseNoteUpdateResponse, SseNoteUpdateResponses, SseNoteUpsertData, SseNoteUpsertResponse, SseNoteUpsertResponses, WorkspaceCreateData, WorkspaceCreateResponse, WorkspaceCreateResponses, WorkspaceDeleteData, WorkspaceDeleteError, WorkspaceDeleteErrors, WorkspaceDeleteResponse, WorkspaceDeleteResponses, WorkspaceGetData, WorkspaceGetError, WorkspaceGetErrors, WorkspaceGetResponse, WorkspaceGetResponses, WorkspaceListData, WorkspaceListError, WorkspaceListErrors, WorkspaceListResponse, WorkspaceListResponses, } from "./types.gen";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gen/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,OAAO,EACZ,KAAK,EACL,MAAM,EACN,WAAW,EACX,GAAG,EACH,SAAS,GACV,MAAM,WAAW,CAAC;AACnB,YAAY,EACV,aAAa,EACb,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,qBAAqB,EACrB,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