@arrirpc/codegen-ts 0.45.6 → 0.46.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.
package/dist/index.cjs CHANGED
@@ -82,6 +82,7 @@ async function createTypescriptClient(def, options) {
82
82
  if (rpcOptions.hasSseProcedures) {
83
83
  importParts.push("arriSseRequest");
84
84
  importParts.push("type SseOptions");
85
+ importParts.push("type EventSourceController");
85
86
  }
86
87
  if (rpcOptions.hasWsProcedures) {
87
88
  importParts.push("arriWsRequest");
@@ -158,7 +159,7 @@ function tsHttpRpcFromDefinition(key, schema, options) {
158
159
  const paramsOutput = hasInput ? `params` : `params: undefined`;
159
160
  if (schema.isEventStream) {
160
161
  options.hasSseProcedures = true;
161
- return `${getJsDocComment({ isDeprecated: schema.isDeprecated, description: schema.description })}${key}(${paramsInput.length ? `${paramsInput}, ` : ""}options: SseOptions<${schema.response ?? "undefined"}>) {
162
+ return `${getJsDocComment({ isDeprecated: schema.isDeprecated, description: schema.description })}${key}(${paramsInput.length ? `${paramsInput}, ` : ""}options: SseOptions<${schema.response ?? "undefined"}>): EventSourceController {
162
163
  return arriSseRequest<${schema.response ?? "undefined"}, ${schema.params ?? "undefined"}>({
163
164
  url: \`\${this.baseUrl}${schema.path}\`,
164
165
  method: "${schema.method}",
package/dist/index.mjs CHANGED
@@ -76,6 +76,7 @@ async function createTypescriptClient(def, options) {
76
76
  if (rpcOptions.hasSseProcedures) {
77
77
  importParts.push("arriSseRequest");
78
78
  importParts.push("type SseOptions");
79
+ importParts.push("type EventSourceController");
79
80
  }
80
81
  if (rpcOptions.hasWsProcedures) {
81
82
  importParts.push("arriWsRequest");
@@ -152,7 +153,7 @@ function tsHttpRpcFromDefinition(key, schema, options) {
152
153
  const paramsOutput = hasInput ? `params` : `params: undefined`;
153
154
  if (schema.isEventStream) {
154
155
  options.hasSseProcedures = true;
155
- return `${getJsDocComment({ isDeprecated: schema.isDeprecated, description: schema.description })}${key}(${paramsInput.length ? `${paramsInput}, ` : ""}options: SseOptions<${schema.response ?? "undefined"}>) {
156
+ return `${getJsDocComment({ isDeprecated: schema.isDeprecated, description: schema.description })}${key}(${paramsInput.length ? `${paramsInput}, ` : ""}options: SseOptions<${schema.response ?? "undefined"}>): EventSourceController {
156
157
  return arriSseRequest<${schema.response ?? "undefined"}, ${schema.params ?? "undefined"}>({
157
158
  url: \`\${this.baseUrl}${schema.path}\`,
158
159
  method: "${schema.method}",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrirpc/codegen-ts",
3
- "version": "0.45.6",
3
+ "version": "0.46.0",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -23,10 +23,10 @@
23
23
  ],
24
24
  "dependencies": {
25
25
  "prettier": "^3.2.5",
26
- "@arrirpc/codegen-utils": "0.45.6",
27
- "@arrirpc/schema": "0.45.6"
26
+ "@arrirpc/codegen-utils": "0.46.0",
27
+ "@arrirpc/schema": "0.46.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@arrirpc/client": "0.45.6"
30
+ "@arrirpc/client": "0.46.0"
31
31
  }
32
32
  }