@restatedev/restate-sdk-core 1.17.1 → 1.17.3

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/core.d.ts CHANGED
@@ -1,33 +1,31 @@
1
- export interface RestateContext {
2
- }
3
- export interface RestateObjectContext {
4
- }
5
- export interface RestateObjectSharedContext {
6
- }
7
- export interface RestateWorkflowSharedContext extends RestateObjectSharedContext {
8
- }
9
- export interface RestateWorkflowContext extends RestateObjectContext, RestateWorkflowSharedContext {
10
- }
11
- export type ArgType<T> = T extends (ctx: any) => any ? void : T extends (ctx: any, input: infer I) => any ? I : never;
12
- export type HandlerReturnType<T> = T extends (ctx: any, input: any) => Promise<infer R> ? R : never;
13
- export type ServiceHandler<F, C = RestateContext> = F extends (ctx: C) => Promise<any> ? F : F extends (ctx: C, input: any) => Promise<any> ? F : (ctx: C, input?: any) => Promise<any>;
14
- export type ServiceDefinition<P extends string, M> = {
15
- name: P;
1
+ //#region src/core.d.ts
2
+ interface RestateContext {}
3
+ interface RestateObjectContext {}
4
+ interface RestateObjectSharedContext {}
5
+ interface RestateWorkflowSharedContext extends RestateObjectSharedContext {}
6
+ interface RestateWorkflowContext extends RestateObjectContext, RestateWorkflowSharedContext {}
7
+ type ArgType<T> = T extends ((ctx: any) => any) ? void : T extends ((ctx: any, input: infer I) => any) ? I : never;
8
+ type HandlerReturnType<T> = T extends ((ctx: any, input: any) => Promise<infer R>) ? R : never;
9
+ type ServiceHandler<F, C = RestateContext> = F extends ((ctx: C) => Promise<any>) ? F : F extends ((ctx: C, input: any) => Promise<any>) ? F : (ctx: C, input?: any) => Promise<any>;
10
+ type ServiceDefinition<P extends string, M> = {
11
+ name: P;
16
12
  };
17
- export type Service<M> = M extends ServiceDefinition<string, infer S> ? S : M;
18
- export type ServiceDefinitionFrom<M> = M extends ServiceDefinition<string, unknown> ? M : ServiceDefinition<string, M>;
19
- export type ObjectSharedHandler<F, SC = RestateObjectSharedContext> = F extends (ctx: SC, param: any) => Promise<any> ? F : F extends (ctx: SC) => Promise<any> ? F : (ctx: SC, param?: any) => Promise<any>;
20
- export type ObjectHandler<F, C = RestateObjectContext> = F extends (ctx: C, param: any) => Promise<any> ? F : F extends (ctx: C) => Promise<any> ? F : (ctx: C, param?: any) => Promise<any>;
21
- export type VirtualObjectDefinition<P extends string, M> = {
22
- name: P;
13
+ type Service<M> = M extends ServiceDefinition<string, infer S> ? S : M;
14
+ type ServiceDefinitionFrom<M> = M extends ServiceDefinition<string, unknown> ? M : ServiceDefinition<string, M>;
15
+ type ObjectSharedHandler<F, SC = RestateObjectSharedContext> = F extends ((ctx: SC, param: any) => Promise<any>) ? F : F extends ((ctx: SC) => Promise<any>) ? F : (ctx: SC, param?: any) => Promise<any>;
16
+ type ObjectHandler<F, C = RestateObjectContext> = F extends ((ctx: C, param: any) => Promise<any>) ? F : F extends ((ctx: C) => Promise<any>) ? F : (ctx: C, param?: any) => Promise<any>;
17
+ type VirtualObjectDefinition<P extends string, M> = {
18
+ name: P;
23
19
  };
24
- export type VirtualObject<M> = M extends VirtualObjectDefinition<string, infer O> ? O : M;
25
- export type VirtualObjectDefinitionFrom<M> = M extends VirtualObjectDefinition<string, unknown> ? M : VirtualObjectDefinition<string, M>;
26
- export type WorkflowSharedHandler<F, SC = RestateWorkflowSharedContext> = F extends (ctx: SC, param: any) => Promise<any> ? F : F extends (ctx: SC) => Promise<any> ? F : (ctx: SC, param?: any) => Promise<any>;
27
- export type WorkflowHandler<F, C = RestateWorkflowContext> = F extends (ctx: C, param: any) => Promise<any> ? F : F extends (ctx: C) => Promise<any> ? F : (ctx: C, param?: any) => Promise<any>;
28
- export type WorkflowDefinition<P extends string, M> = {
29
- name: P;
20
+ type VirtualObject<M> = M extends VirtualObjectDefinition<string, infer O> ? O : M;
21
+ type VirtualObjectDefinitionFrom<M> = M extends VirtualObjectDefinition<string, unknown> ? M : VirtualObjectDefinition<string, M>;
22
+ type WorkflowSharedHandler<F, SC = RestateWorkflowSharedContext> = F extends ((ctx: SC, param: any) => Promise<any>) ? F : F extends ((ctx: SC) => Promise<any>) ? F : (ctx: SC, param?: any) => Promise<any>;
23
+ type WorkflowHandler<F, C = RestateWorkflowContext> = F extends ((ctx: C, param: any) => Promise<any>) ? F : F extends ((ctx: C) => Promise<any>) ? F : (ctx: C, param?: any) => Promise<any>;
24
+ type WorkflowDefinition<P extends string, M> = {
25
+ name: P;
30
26
  };
31
- export type Workflow<M> = M extends WorkflowDefinition<string, infer W> ? W : M;
32
- export type WorkflowDefinitionFrom<M> = M extends WorkflowDefinition<string, unknown> ? M : WorkflowDefinition<string, M>;
27
+ type Workflow<M> = M extends WorkflowDefinition<string, infer W> ? W : M;
28
+ type WorkflowDefinitionFrom<M> = M extends WorkflowDefinition<string, unknown> ? M : WorkflowDefinition<string, M>;
29
+ //#endregion
30
+ export { ArgType, HandlerReturnType, ObjectHandler, ObjectSharedHandler, RestateContext, RestateObjectContext, RestateObjectSharedContext, RestateWorkflowContext, RestateWorkflowSharedContext, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowSharedHandler };
33
31
  //# sourceMappingURL=core.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"core.d.ts","sourceRoot":"","sources":["../src/core.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,cAAc;CAAG;AAClC,MAAM,WAAW,oBAAoB;CAAG;AACxC,MAAM,WAAW,0BAA0B;CAAG;AAG9C,MAAM,WAAW,4BAA6B,SAAQ,0BAA0B;CAAG;AACnF,MAAM,WAAW,sBACf,SAAQ,oBAAoB,EAAE,4BAA4B;CAAG;AAI/D,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,GAChD,IAAI,GACJ,CAAC,SAAS,CAAC,GAAG,EAAE,GAAG,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wD0B,OAxD1B,CAAA,GAAA,CAAA;AACM,KAyDA,eAzDA,CAAA,CAAA,EAAA,IAyDuB,sBAzDvB,CAAA,GAyDiD,CAzDjD,UAAA,CAAA,GAAA,EA0DL,CA1DK,EAAA,KAAA,EAAA,GAAA,EAAA,GA4DP,OA5DO,CAAA,GAAA,CAAA,IA6DR,CA7DQ,GA8DR,CA9DQ,UAAA,CAAA,GAAA,EA8DQ,CA9DR,EAAA,GA8Dc,OA9Dd,CAAA,GAAA,CAAA,IA+DN,CA/DM,GAAA,CAAA,GAAA,EAgEA,CAhEA,EAAA,KAAA,CAAA,EAAA,GAAA,EAAA,GAgEmB,OAhEnB,CAAA,GAAA,CAAA;AAAmB,KAmEnB,kBAnEmB,CAAA,UAAA,MAAA,EAAA,CAAA,CAAA,GAAA;EAAO,IAAA,EAoE9B,CApE8B;AAGtC,CAAA;AAIY,KAgEA,QAhEO,CAAA,CAAA,CAAA,GAgEO,CAhEP,SAgEiB,kBAhEjB,CAAA,MAAA,EAAA,KAAA,EAAA,CAAA,GAgEuD,CAhEvD,GAgE2D,CAhE3D;AAAM,KAkEb,sBAlEa,CAAA,CAAA,CAAA,GAmEvB,CAnEuB,SAmEb,kBAnEa,CAAA,MAAA,EAAA,OAAA,CAAA,GAoEnB,CApEmB,GAqEnB,kBArEmB,CAAA,MAAA,EAqEQ,CArER,CAAA"}
@@ -1,13 +1,16 @@
1
+ //#region src/duration.d.ts
1
2
  /**
2
3
  * Duration type. Note that fields are additive.
3
4
  */
4
- export type Duration = {
5
- days?: number;
6
- hours?: number;
7
- minutes?: number;
8
- seconds?: number;
9
- milliseconds?: number;
5
+ type Duration = {
6
+ days?: number;
7
+ hours?: number;
8
+ minutes?: number;
9
+ seconds?: number;
10
+ milliseconds?: number;
10
11
  };
11
- export declare function millisOrDurationToMillis(duration: number | Duration): number;
12
- export declare function durationToMillis(duration: Duration): number;
12
+ declare function millisOrDurationToMillis(duration: number | Duration): number;
13
+ declare function durationToMillis(duration: Duration): number;
14
+ //#endregion
15
+ export { Duration, durationToMillis, millisOrDurationToMillis };
13
16
  //# sourceMappingURL=duration.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"duration.d.ts","sourceRoot":"","sources":["../src/duration.ts"],"names":[],"mappings":"AAWA;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,QAAQ,GAAG,MAAM,CAM5E;AAED,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,MAAM,CAQ3D"}
1
+ {"version":3,"file":"duration.d.ts","names":[],"sources":["../src/duration.ts"],"sourcesContent":[],"mappings":";;AAcA;AAQA;AAQgB,KAhBJ,QAAA,GAgBoB;;;;;;;iBARhB,wBAAA,oBAA4C;iBAQ5C,gBAAA,WAA2B"}
package/dist/duration.js CHANGED
@@ -1,26 +1,12 @@
1
- /*
2
- * Copyright (c) 2023-2025 - Restate Software, Inc., Restate GmbH
3
- *
4
- * This file is part of the Restate SDK for Node.js/TypeScript,
5
- * which is released under the MIT license.
6
- *
7
- * You can find a copy of the license in file LICENSE in the root
8
- * directory of this repository or package, or at
9
- * https://github.com/restatedev/sdk-typescript/blob/main/LICENSE
10
- */
11
- export function millisOrDurationToMillis(duration) {
12
- if (typeof duration === "number") {
13
- return Math.trunc(duration);
14
- }
15
- else {
16
- return Math.trunc(durationToMillis(duration));
17
- }
1
+ //#region src/duration.ts
2
+ function millisOrDurationToMillis(duration) {
3
+ if (typeof duration === "number") return Math.trunc(duration);
4
+ else return Math.trunc(durationToMillis(duration));
18
5
  }
19
- export function durationToMillis(duration) {
20
- return ((duration.milliseconds ?? 0) +
21
- 1000 * (duration.seconds ?? 0) +
22
- 1000 * 60 * (duration.minutes ?? 0) +
23
- 1000 * 60 * 60 * (duration.hours ?? 0) +
24
- 1000 * 60 * 60 * 24 * (duration.days ?? 0));
6
+ function durationToMillis(duration) {
7
+ return (duration.milliseconds ?? 0) + 1e3 * (duration.seconds ?? 0) + 1e3 * 60 * (duration.minutes ?? 0) + 1e3 * 60 * 60 * (duration.hours ?? 0) + 1e3 * 60 * 60 * 24 * (duration.days ?? 0);
25
8
  }
9
+
10
+ //#endregion
11
+ export { durationToMillis, millisOrDurationToMillis };
26
12
  //# sourceMappingURL=duration.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"duration.js","sourceRoot":"","sources":["../src/duration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAaH,MAAM,UAAU,wBAAwB,CAAC,QAA2B;IAClE,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACjC,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC9B,CAAC;SAAM,CAAC;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IAChD,CAAC;AACH,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,QAAkB;IACjD,OAAO,CACL,CAAC,QAAQ,CAAC,YAAY,IAAI,CAAC,CAAC;QAC5B,IAAI,GAAG,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;QAC9B,IAAI,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;QACnC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,CAAC;QACtC,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,QAAQ,CAAC,IAAI,IAAI,CAAC,CAAC,CAC3C,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"duration.js","names":[],"sources":["../src/duration.ts"],"sourcesContent":["/*\n * Copyright (c) 2023-2025 - Restate Software, Inc., Restate GmbH\n *\n * This file is part of the Restate SDK for Node.js/TypeScript,\n * which is released under the MIT license.\n *\n * You can find a copy of the license in file LICENSE in the root\n * directory of this repository or package, or at\n * https://github.com/restatedev/sdk-typescript/blob/main/LICENSE\n */\n\n/**\n * Duration type. Note that fields are additive.\n */\nexport type Duration = {\n days?: number;\n hours?: number;\n minutes?: number;\n seconds?: number;\n milliseconds?: number;\n};\n\nexport function millisOrDurationToMillis(duration: number | Duration): number {\n if (typeof duration === \"number\") {\n return Math.trunc(duration);\n } else {\n return Math.trunc(durationToMillis(duration));\n }\n}\n\nexport function durationToMillis(duration: Duration): number {\n return (\n (duration.milliseconds ?? 0) +\n 1000 * (duration.seconds ?? 0) +\n 1000 * 60 * (duration.minutes ?? 0) +\n 1000 * 60 * 60 * (duration.hours ?? 0) +\n 1000 * 60 * 60 * 24 * (duration.days ?? 0)\n );\n}\n"],"mappings":";AAsBA,SAAgB,yBAAyB,UAAqC;AAC5E,KAAI,OAAO,aAAa,SACtB,QAAO,KAAK,MAAM,SAAS;KAE3B,QAAO,KAAK,MAAM,iBAAiB,SAAS,CAAC;;AAIjD,SAAgB,iBAAiB,UAA4B;AAC3D,SACG,SAAS,gBAAgB,KAC1B,OAAQ,SAAS,WAAW,KAC5B,MAAO,MAAM,SAAS,WAAW,KACjC,MAAO,KAAK,MAAM,SAAS,SAAS,KACpC,MAAO,KAAK,KAAK,MAAM,SAAS,QAAQ"}
@@ -1,3 +1,4 @@
1
+ //#region src/entry_codec.d.ts
1
2
  /**
2
3
  * Journal values codec.
3
4
  *
@@ -12,24 +13,26 @@
12
13
  *
13
14
  * @experimental
14
15
  */
15
- export type JournalValueCodec = {
16
- /**
17
- * Encodes the given buffer.
18
- *
19
- * This will be applied *after* serialization.
20
- *
21
- * @param buf The buffer to encode. Empty byte buffers should be appropriately handled as well.
22
- * @returns The encoded buffer
23
- */
24
- encode(buf: Uint8Array): Uint8Array;
25
- /**
26
- * Decodes the given buffer.
27
- *
28
- * This will be applied *before* deserialization.
29
- *
30
- * @param buf The buffer to decode.
31
- * @returns A promise that resolves to the decoded buffer.
32
- */
33
- decode(buf: Uint8Array): Promise<Uint8Array>;
16
+ type JournalValueCodec = {
17
+ /**
18
+ * Encodes the given buffer.
19
+ *
20
+ * This will be applied *after* serialization.
21
+ *
22
+ * @param buf The buffer to encode. Empty byte buffers should be appropriately handled as well.
23
+ * @returns The encoded buffer
24
+ */
25
+ encode(buf: Uint8Array): Uint8Array;
26
+ /**
27
+ * Decodes the given buffer.
28
+ *
29
+ * This will be applied *before* deserialization.
30
+ *
31
+ * @param buf The buffer to decode.
32
+ * @returns A promise that resolves to the decoded buffer.
33
+ */
34
+ decode(buf: Uint8Array): Promise<Uint8Array>;
34
35
  };
36
+ //#endregion
37
+ export { JournalValueCodec };
35
38
  //# sourceMappingURL=entry_codec.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"entry_codec.d.ts","sourceRoot":"","sources":["../src/entry_codec.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;;;;;OAOG;IACH,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,UAAU,CAAC;IAEpC;;;;;;;OAOG;IACH,MAAM,CAAC,GAAG,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CAC9C,CAAC"}
1
+ {"version":3,"file":"entry_codec.d.ts","names":[],"sources":["../src/entry_codec.ts"],"sourcesContent":[],"mappings":";;AAyBA;;;;;;;;;;;;;KAAY,iBAAA;;;;;;;;;cASE,aAAa;;;;;;;;;cAUb,aAAa,QAAQ"}
package/dist/index.d.cts CHANGED
@@ -3,5 +3,5 @@ import { StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1 } from "./stand
3
3
  import { Serde, serde } from "./serde_api.cjs";
4
4
  import { Duration, durationToMillis, millisOrDurationToMillis } from "./duration.cjs";
5
5
  import { JournalValueCodec } from "./entry_codec.cjs";
6
- import { Descriptor, HandlerDescriptor, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferInput, InferOutput, ObjectDescriptor, SerdeType, ServiceDescriptor, ServiceInterface, WorkflowDescriptor, iface, makeHandlerDescriptor } from "./interface.cjs";
7
- export { type ArgType, type Descriptor, type Duration, type HandlerDescriptor, type HandlerReturnType, type ImplementedDefinition, type ImplementedObjectDefinition, type ImplementedServiceDefinition, type ImplementedWorkflowDefinition, type InferInput, type InferOutput, type JournalValueCodec, type ObjectDescriptor, type ObjectHandler, type ObjectSharedHandler, type RestateContext, type RestateObjectContext, type RestateObjectSharedContext, type RestateWorkflowContext, type RestateWorkflowSharedContext, type Serde, type SerdeType, type Service, type ServiceDefinition, type ServiceDefinitionFrom, type ServiceDescriptor, type ServiceHandler, type ServiceInterface, type StandardJSONSchemaV1, type StandardSchemaV1, type StandardTypedV1, type VirtualObject, type VirtualObjectDefinition, type VirtualObjectDefinitionFrom, type Workflow, type WorkflowDefinition, type WorkflowDefinitionFrom, type WorkflowDescriptor, type WorkflowHandler, type WorkflowSharedHandler, durationToMillis, iface, makeHandlerDescriptor, millisOrDurationToMillis, serde };
6
+ import { Descriptor, DescriptorOpts, HandlerDescriptor, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferInput, InferOutput, ObjectDescriptor, SerdeType, ServiceDescriptor, ServiceInterface, WorkflowDescriptor, iface, makeHandlerDescriptor } from "./interface.cjs";
7
+ export { type ArgType, type Descriptor, type DescriptorOpts, type Duration, type HandlerDescriptor, type HandlerReturnType, type ImplementedDefinition, type ImplementedObjectDefinition, type ImplementedServiceDefinition, type ImplementedWorkflowDefinition, type InferInput, type InferOutput, type JournalValueCodec, type ObjectDescriptor, type ObjectHandler, type ObjectSharedHandler, type RestateContext, type RestateObjectContext, type RestateObjectSharedContext, type RestateWorkflowContext, type RestateWorkflowSharedContext, type Serde, type SerdeType, type Service, type ServiceDefinition, type ServiceDefinitionFrom, type ServiceDescriptor, type ServiceHandler, type ServiceInterface, type StandardJSONSchemaV1, type StandardSchemaV1, type StandardTypedV1, type VirtualObject, type VirtualObjectDefinition, type VirtualObjectDefinitionFrom, type Workflow, type WorkflowDefinition, type WorkflowDefinitionFrom, type WorkflowDescriptor, type WorkflowHandler, type WorkflowSharedHandler, durationToMillis, iface, makeHandlerDescriptor, millisOrDurationToMillis, serde };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,7 @@
1
- export type { RestateContext, ServiceHandler, ServiceDefinition, Service, ServiceDefinitionFrom, RestateObjectContext, RestateObjectSharedContext, ObjectHandler, ObjectSharedHandler, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, WorkflowDefinition, WorkflowHandler, WorkflowSharedHandler, RestateWorkflowContext, RestateWorkflowSharedContext, Workflow, WorkflowDefinitionFrom, ArgType, HandlerReturnType, } from "./core.js";
2
- export type { Serde } from "./serde_api.js";
3
- export { serde } from "./serde_api.js";
4
- export type { Duration } from "./duration.js";
5
- export { durationToMillis, millisOrDurationToMillis } from "./duration.js";
6
- export type { JournalValueCodec } from "./entry_codec.js";
7
- export type { StandardTypedV1, StandardSchemaV1, StandardJSONSchemaV1, } from "./standard_schema.js";
8
- export { iface, makeHandlerDescriptor } from "./interface.js";
9
- export type { ServiceInterface, HandlerDescriptor, Descriptor, ServiceDescriptor, ObjectDescriptor, WorkflowDescriptor, ImplementedServiceDefinition, ImplementedObjectDefinition, ImplementedWorkflowDefinition, ImplementedDefinition, InferInput, InferOutput, SerdeType, } from "./interface.js";
10
- //# sourceMappingURL=index.d.ts.map
1
+ import { ArgType, HandlerReturnType, ObjectHandler, ObjectSharedHandler, RestateContext, RestateObjectContext, RestateObjectSharedContext, RestateWorkflowContext, RestateWorkflowSharedContext, Service, ServiceDefinition, ServiceDefinitionFrom, ServiceHandler, VirtualObject, VirtualObjectDefinition, VirtualObjectDefinitionFrom, Workflow, WorkflowDefinition, WorkflowDefinitionFrom, WorkflowHandler, WorkflowSharedHandler } from "./core.js";
2
+ import { StandardJSONSchemaV1, StandardSchemaV1, StandardTypedV1 } from "./standard_schema.js";
3
+ import { Serde, serde } from "./serde_api.js";
4
+ import { Duration, durationToMillis, millisOrDurationToMillis } from "./duration.js";
5
+ import { JournalValueCodec } from "./entry_codec.js";
6
+ import { Descriptor, DescriptorOpts, HandlerDescriptor, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferInput, InferOutput, ObjectDescriptor, SerdeType, ServiceDescriptor, ServiceInterface, WorkflowDescriptor, iface, makeHandlerDescriptor } from "./interface.js";
7
+ export { type ArgType, type Descriptor, type DescriptorOpts, type Duration, type HandlerDescriptor, type HandlerReturnType, type ImplementedDefinition, type ImplementedObjectDefinition, type ImplementedServiceDefinition, type ImplementedWorkflowDefinition, type InferInput, type InferOutput, type JournalValueCodec, type ObjectDescriptor, type ObjectHandler, type ObjectSharedHandler, type RestateContext, type RestateObjectContext, type RestateObjectSharedContext, type RestateWorkflowContext, type RestateWorkflowSharedContext, type Serde, type SerdeType, type Service, type ServiceDefinition, type ServiceDefinitionFrom, type ServiceDescriptor, type ServiceHandler, type ServiceInterface, type StandardJSONSchemaV1, type StandardSchemaV1, type StandardTypedV1, type VirtualObject, type VirtualObjectDefinition, type VirtualObjectDefinitionFrom, type Workflow, type WorkflowDefinition, type WorkflowDefinitionFrom, type WorkflowDescriptor, type WorkflowHandler, type WorkflowSharedHandler, durationToMillis, iface, makeHandlerDescriptor, millisOrDurationToMillis, serde };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAWA,YAAY,EACV,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,OAAO,EACP,qBAAqB,EACrB,oBAAoB,EACpB,0BAA0B,EAC1B,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,uBA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;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAEvC,YAAY,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAE3E,YAAY,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,YAAY,EACV,eAAe,EACf,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,YAAY,EACV,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,UAAU,EACV,iBAAiB,EACjB,gBAAgB,EAChB,kBAAkB,EAClB,4BAA4B,EAC5B,2BAA2B,EAC3B,6BAA6B,EAC7B,qBAAqB,EACrB,UAAU,EACV,WAAW,EACX,SAAS,GACV,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -1,14 +1,5 @@
1
- /*
2
- * Copyright (c) 2023-2024 - Restate Software, Inc., Restate GmbH
3
- *
4
- * This file is part of the Restate SDK for Node.js/TypeScript,
5
- * which is released under the MIT license.
6
- *
7
- * You can find a copy of the license in file LICENSE in the root
8
- * directory of this repository or package, or at
9
- * https://github.com/restatedev/sdk-typescript/blob/main/LICENSE
10
- */
11
- export { serde } from "./serde_api.js";
12
- export { durationToMillis, millisOrDurationToMillis } from "./duration.js";
13
- export { iface, makeHandlerDescriptor } from "./interface.js";
14
- //# sourceMappingURL=index.js.map
1
+ import { serde } from "./serde_api.js";
2
+ import { durationToMillis, millisOrDurationToMillis } from "./duration.js";
3
+ import { iface, makeHandlerDescriptor } from "./interface.js";
4
+
5
+ export { durationToMillis, iface, makeHandlerDescriptor, millisOrDurationToMillis, serde };
@@ -1,11 +1,13 @@
1
1
  const require_serde_api = require('./serde_api.cjs');
2
2
 
3
3
  //#region src/interface.ts
4
- function makeHandlerDescriptor(inputSerde, outputSerde, shared) {
4
+ function makeHandlerDescriptor(inputSerde, outputSerde, shared, opts) {
5
5
  return {
6
6
  _inputSerde: inputSerde,
7
7
  _outputSerde: outputSerde,
8
- _shared: shared
8
+ _shared: shared,
9
+ _description: opts?.description,
10
+ _metadata: opts?.metadata
9
11
  };
10
12
  }
11
13
  /**
@@ -23,45 +25,51 @@ function makeHandlerDescriptor(inputSerde, outputSerde, shared) {
23
25
  * ```
24
26
  */
25
27
  const iface = {
26
- service: function(name, handlers) {
28
+ service: function(name, handlers, opts) {
27
29
  return {
28
30
  name,
29
31
  _kind: "service",
30
- _handlers: handlers
32
+ _handlers: handlers,
33
+ _description: opts?.description,
34
+ _metadata: opts?.metadata
31
35
  };
32
36
  },
33
- object: function(name, handlers) {
37
+ object: function(name, handlers, opts) {
34
38
  return {
35
39
  name,
36
40
  _kind: "object",
37
- _handlers: handlers
41
+ _handlers: handlers,
42
+ _description: opts?.description,
43
+ _metadata: opts?.metadata
38
44
  };
39
45
  },
40
- workflow: function(name, handlers) {
46
+ workflow: function(name, handlers, opts) {
41
47
  return {
42
48
  name,
43
49
  _kind: "workflow",
44
- _handlers: handlers
50
+ _handlers: handlers,
51
+ _description: opts?.description,
52
+ _metadata: opts?.metadata
45
53
  };
46
54
  },
47
- json: function() {
48
- return makeHandlerDescriptor(void 0, void 0, false);
55
+ json: function(opts) {
56
+ return makeHandlerDescriptor(void 0, void 0, false, opts);
49
57
  },
50
58
  serdes: function(opts) {
51
- return makeHandlerDescriptor(opts.input, opts.output, false);
59
+ return makeHandlerDescriptor(opts.input, opts.output, false, opts);
52
60
  },
53
61
  schemas: function(opts) {
54
- return makeHandlerDescriptor(opts.input ? require_serde_api.serde.schema(opts.input) : void 0, opts.output ? require_serde_api.serde.schema(opts.output) : void 0, false);
62
+ return makeHandlerDescriptor(opts.input ? require_serde_api.serde.schema(opts.input) : void 0, opts.output ? require_serde_api.serde.schema(opts.output) : void 0, false, opts);
55
63
  },
56
64
  shared: {
57
- json: function() {
58
- return makeHandlerDescriptor(void 0, void 0, true);
65
+ json: function(opts) {
66
+ return makeHandlerDescriptor(void 0, void 0, true, opts);
59
67
  },
60
68
  serdes: function(opts) {
61
- return makeHandlerDescriptor(opts.input, opts.output, true);
69
+ return makeHandlerDescriptor(opts.input, opts.output, true, opts);
62
70
  },
63
71
  schemas: function(opts) {
64
- return makeHandlerDescriptor(opts.input ? require_serde_api.serde.schema(opts.input) : void 0, opts.output ? require_serde_api.serde.schema(opts.output) : void 0, true);
72
+ return makeHandlerDescriptor(opts.input ? require_serde_api.serde.schema(opts.input) : void 0, opts.output ? require_serde_api.serde.schema(opts.output) : void 0, true, opts);
65
73
  }
66
74
  }
67
75
  };
@@ -4,6 +4,24 @@ import { Serde } from "./serde_api.cjs";
4
4
 
5
5
  //#region src/interface.d.ts
6
6
 
7
+ /**
8
+ * Documentation and metadata that can be attached to a service/object/workflow
9
+ * contract or to a single handler declared with {@link iface}.
10
+ *
11
+ * These values are advisory: they are folded into the service definition when the
12
+ * contract is implemented (see `implement()`), and surface in the discovery manifest
13
+ * as `documentation` (from {@link description}) and `metadata`.
14
+ */
15
+ type DescriptorOpts = {
16
+ /**
17
+ * Human-readable description, shown in documentation/admin tools.
18
+ */
19
+ description?: string;
20
+ /**
21
+ * Arbitrary key/value metadata, exposed via the Admin API.
22
+ */
23
+ metadata?: Record<string, string>;
24
+ };
7
25
  /**
8
26
  * Minimal descriptor stored in {@link Descriptor}._handlers per handler.
9
27
  */
@@ -12,8 +30,12 @@ type HandlerDescriptor<I$1 = any, O$1 = any, Shared extends boolean = boolean> =
12
30
  readonly _outputSerde?: Serde<O$1>;
13
31
  /** @internal virtual-object handler shared/exclusive marker (phantom + runtime) */
14
32
  readonly _shared?: Shared;
33
+ /** @internal handler description declared on the contract */
34
+ readonly _description?: string;
35
+ /** @internal handler metadata declared on the contract */
36
+ readonly _metadata?: Record<string, string>;
15
37
  };
16
- declare function makeHandlerDescriptor<I$1, O$1, Shared extends boolean = false>(inputSerde?: Serde<I$1>, outputSerde?: Serde<O$1>, shared?: Shared): HandlerDescriptor<I$1, O$1, Shared>;
38
+ declare function makeHandlerDescriptor<I$1, O$1, Shared extends boolean = false>(inputSerde?: Serde<I$1>, outputSerde?: Serde<O$1>, shared?: Shared, opts?: DescriptorOpts): HandlerDescriptor<I$1, O$1, Shared>;
17
39
  /** Recover the input type declared by a {@link HandlerDescriptor}. */
18
40
  type InferInput<D> = D extends HandlerDescriptor<infer I, any, any> ? I : any;
19
41
  /** Recover the output type declared by a {@link HandlerDescriptor}. */
@@ -24,6 +46,10 @@ type Descriptor<P extends string = string, H extends Record<string, HandlerDescr
24
46
  readonly name: P;
25
47
  readonly _kind: Kind;
26
48
  readonly _handlers: H;
49
+ /** @internal service description declared on the contract */
50
+ readonly _description?: string;
51
+ /** @internal service metadata declared on the contract */
52
+ readonly _metadata?: Record<string, string>;
27
53
  };
28
54
  type ServiceDescriptor<P extends string = string, H extends Record<string, HandlerDescriptor> = Record<string, HandlerDescriptor>> = Descriptor<P, H, "service">;
29
55
  type ObjectDescriptor<P extends string = string, H extends Record<string, HandlerDescriptor> = Record<string, HandlerDescriptor>> = Descriptor<P, H, "object">;
@@ -35,32 +61,32 @@ type ImplementedWorkflowDefinition<P extends string, H extends Record<string, Ha
35
61
  type ImplementedDefinition<P extends string, H extends Record<string, HandlerDescriptor>, Kind extends "service" | "object" | "workflow"> = Kind extends "service" ? ImplementedServiceDefinition<P, H> : Kind extends "object" ? ImplementedObjectDefinition<P, H> : ImplementedWorkflowDefinition<P, H>;
36
62
  /** The shape of the {@link iface} service-interface declaration API. */
37
63
  interface ServiceInterface {
38
- service<P extends string, H extends Record<string, HandlerDescriptor>>(name: P, handlers: H): ServiceDescriptor<P, H>;
39
- object<P extends string, H extends Record<string, HandlerDescriptor>>(name: P, handlers: H): ObjectDescriptor<P, H>;
40
- workflow<P extends string, H extends Record<string, HandlerDescriptor>>(name: P, handlers: H): WorkflowDescriptor<P, H>;
64
+ service<P extends string, H extends Record<string, HandlerDescriptor>>(name: P, handlers: H, opts?: DescriptorOpts): ServiceDescriptor<P, H>;
65
+ object<P extends string, H extends Record<string, HandlerDescriptor>>(name: P, handlers: H, opts?: DescriptorOpts): ObjectDescriptor<P, H>;
66
+ workflow<P extends string, H extends Record<string, HandlerDescriptor>>(name: P, handlers: H, opts?: DescriptorOpts): WorkflowDescriptor<P, H>;
41
67
  /** `json<I, O>()` — type params, default JSON serde. */
42
- json<I$1 = void, O$1 = void>(): HandlerDescriptor<I$1, O$1, false>;
68
+ json<I$1 = void, O$1 = void>(opts?: DescriptorOpts): HandlerDescriptor<I$1, O$1, false>;
43
69
  /** `serdes({ input, output })` — explicit Serde per direction. */
44
70
  serdes<SI extends Serde<any>, SO extends Serde<any>>(opts: {
45
71
  input?: SI;
46
72
  output?: SO;
47
- }): HandlerDescriptor<SerdeType<SI>, SerdeType<SO>, false>;
73
+ } & DescriptorOpts): HandlerDescriptor<SerdeType<SI>, SerdeType<SO>, false>;
48
74
  /** `schemas({ input, output })` — Standard Schema per direction. */
49
75
  schemas<SI extends StandardSchemaV1<any>, SO extends StandardSchemaV1<any>>(opts: {
50
76
  input?: SI;
51
77
  output?: SO;
52
- }): HandlerDescriptor<StandardSchemaV1.InferOutput<NonNullable<SI>>, StandardSchemaV1.InferOutput<NonNullable<SO>>, false>;
78
+ } & DescriptorOpts): HandlerDescriptor<StandardSchemaV1.InferOutput<NonNullable<SI>>, StandardSchemaV1.InferOutput<NonNullable<SO>>, false>;
53
79
  /** Shared (read-only) virtual-object / non-`run` workflow handler declarators. */
54
80
  shared: {
55
- json<I$1 = void, O$1 = void>(): HandlerDescriptor<I$1, O$1, true>;
81
+ json<I$1 = void, O$1 = void>(opts?: DescriptorOpts): HandlerDescriptor<I$1, O$1, true>;
56
82
  serdes<SI extends Serde<any>, SO extends Serde<any>>(opts: {
57
83
  input?: SI;
58
84
  output?: SO;
59
- }): HandlerDescriptor<SerdeType<SI>, SerdeType<SO>, true>;
85
+ } & DescriptorOpts): HandlerDescriptor<SerdeType<SI>, SerdeType<SO>, true>;
60
86
  schemas<SI extends StandardSchemaV1<any>, SO extends StandardSchemaV1<any>>(opts: {
61
87
  input?: SI;
62
88
  output?: SO;
63
- }): HandlerDescriptor<StandardSchemaV1.InferOutput<NonNullable<SI>>, StandardSchemaV1.InferOutput<NonNullable<SO>>, true>;
89
+ } & DescriptorOpts): HandlerDescriptor<StandardSchemaV1.InferOutput<NonNullable<SI>>, StandardSchemaV1.InferOutput<NonNullable<SO>>, true>;
64
90
  };
65
91
  }
66
92
  /**
@@ -79,5 +105,5 @@ interface ServiceInterface {
79
105
  */
80
106
  declare const iface: ServiceInterface;
81
107
  //#endregion
82
- export { Descriptor, HandlerDescriptor, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferInput, InferOutput, ObjectDescriptor, SerdeType, ServiceDescriptor, ServiceInterface, WorkflowDescriptor, iface, makeHandlerDescriptor };
108
+ export { Descriptor, DescriptorOpts, HandlerDescriptor, ImplementedDefinition, ImplementedObjectDefinition, ImplementedServiceDefinition, ImplementedWorkflowDefinition, InferInput, InferOutput, ObjectDescriptor, SerdeType, ServiceDescriptor, ServiceInterface, WorkflowDescriptor, iface, makeHandlerDescriptor };
83
109
  //# sourceMappingURL=interface.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.cts","names":[],"sources":["../src/interface.ts"],"sourcesContent":[],"mappings":";;;;;;;;AAwBA;AAK+B,KALnB,iBAKmB,CAAA,MAAA,GAAA,EAAA,MAAA,GAAA,EAAA,eAAA,OAAA,GAAA,OAAA,CAAA,GAAA;EAAN,SAAA,WAAA,CAAA,EAAA,KAAA,CAAM,GAAN,CAAA;EACO,SAAA,YAAA,CAAA,EAAN,KAAM,CAAA,GAAA,CAAA;EAAN;EAEL,SAAA,OAAA,CAAA,EAAA,MAAA;CAAM;AAGX,iBAAA,qBAAqB,CAAA,GAAA,EAAA,GAAA,EAAA,eAAA,OAAA,GAAA,KAAA,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