@openrouter/sdk 1.5.6 → 1.5.7

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 (158) hide show
  1. package/esm/lib/config.d.ts +2 -2
  2. package/esm/lib/config.js +2 -2
  3. package/esm/models/errors/index.d.ts +0 -2
  4. package/esm/models/errors/index.js +0 -2
  5. package/esm/models/index.d.ts +0 -40
  6. package/esm/models/index.js +0 -40
  7. package/esm/models/operations/index.d.ts +0 -15
  8. package/esm/models/operations/index.js +0 -15
  9. package/esm/sdk/sdk.d.ts +0 -3
  10. package/esm/sdk/sdk.js +0 -4
  11. package/jsr.json +1 -1
  12. package/package.json +9 -9
  13. package/esm/funcs/internsChat.d.ts +0 -42
  14. package/esm/funcs/internsChat.js +0 -109
  15. package/esm/funcs/internsCreateIntern.d.ts +0 -21
  16. package/esm/funcs/internsCreateIntern.js +0 -103
  17. package/esm/funcs/internsDeleteIntern.d.ts +0 -21
  18. package/esm/funcs/internsDeleteIntern.js +0 -108
  19. package/esm/funcs/internsGetIntern.d.ts +0 -21
  20. package/esm/funcs/internsGetIntern.js +0 -105
  21. package/esm/funcs/internsGetInternConnections.d.ts +0 -21
  22. package/esm/funcs/internsGetInternConnections.js +0 -105
  23. package/esm/funcs/internsGetInternDaemon.d.ts +0 -21
  24. package/esm/funcs/internsGetInternDaemon.js +0 -105
  25. package/esm/funcs/internsGetInternDaemonAccess.d.ts +0 -23
  26. package/esm/funcs/internsGetInternDaemonAccess.js +0 -107
  27. package/esm/funcs/internsGetInternIcon.d.ts +0 -20
  28. package/esm/funcs/internsGetInternIcon.js +0 -109
  29. package/esm/funcs/internsInvoke.d.ts +0 -26
  30. package/esm/funcs/internsInvoke.js +0 -119
  31. package/esm/funcs/internsListInterns.d.ts +0 -21
  32. package/esm/funcs/internsListInterns.js +0 -107
  33. package/esm/funcs/internsProvisionIntern.d.ts +0 -21
  34. package/esm/funcs/internsProvisionIntern.js +0 -105
  35. package/esm/funcs/internsSignInternDaemonAccessRequest.d.ts +0 -22
  36. package/esm/funcs/internsSignInternDaemonAccessRequest.js +0 -109
  37. package/esm/funcs/internsSignInternDaemonRequest.d.ts +0 -20
  38. package/esm/funcs/internsSignInternDaemonRequest.js +0 -109
  39. package/esm/funcs/internsSuspendIntern.d.ts +0 -21
  40. package/esm/funcs/internsSuspendIntern.js +0 -105
  41. package/esm/funcs/internsUpdateIntern.d.ts +0 -21
  42. package/esm/funcs/internsUpdateIntern.js +0 -108
  43. package/esm/models/createinternrequest.d.ts +0 -43
  44. package/esm/models/createinternrequest.js +0 -24
  45. package/esm/models/deleteinternrequest.d.ts +0 -18
  46. package/esm/models/deleteinternrequest.js +0 -18
  47. package/esm/models/deleteinternresponse.d.ts +0 -10
  48. package/esm/models/deleteinternresponse.js +0 -14
  49. package/esm/models/errors/internchaterrorresponse.d.ts +0 -31
  50. package/esm/models/errors/internchaterrorresponse.js +0 -35
  51. package/esm/models/errors/internlifecycleerror.d.ts +0 -25
  52. package/esm/models/errors/internlifecycleerror.js +0 -35
  53. package/esm/models/intern.d.ts +0 -120
  54. package/esm/models/intern.js +0 -74
  55. package/esm/models/internapprovalmode.d.ts +0 -16
  56. package/esm/models/internapprovalmode.js +0 -15
  57. package/esm/models/internchatassistantmessage.d.ts +0 -24
  58. package/esm/models/internchatassistantmessage.js +0 -22
  59. package/esm/models/internchatchoice.d.ts +0 -37
  60. package/esm/models/internchatchoice.js +0 -33
  61. package/esm/models/internchatcompletionchunk.d.ts +0 -48
  62. package/esm/models/internchatcompletionchunk.js +0 -34
  63. package/esm/models/internchatcompletionrequest.d.ts +0 -40
  64. package/esm/models/internchatcompletionrequest.js +0 -25
  65. package/esm/models/internchatdelta.d.ts +0 -24
  66. package/esm/models/internchatdelta.js +0 -28
  67. package/esm/models/internchatdevelopermessage.d.ts +0 -21
  68. package/esm/models/internchatdevelopermessage.js +0 -15
  69. package/esm/models/internchatechoedtoolcall.d.ts +0 -21
  70. package/esm/models/internchatechoedtoolcall.js +0 -15
  71. package/esm/models/internchatechoedtoolcallfunction.d.ts +0 -17
  72. package/esm/models/internchatechoedtoolcallfunction.js +0 -14
  73. package/esm/models/internchaterror.d.ts +0 -22
  74. package/esm/models/internchaterror.js +0 -17
  75. package/esm/models/internchaterrormetadata.d.ts +0 -48
  76. package/esm/models/internchaterrormetadata.js +0 -39
  77. package/esm/models/internchatmessage.d.ts +0 -16
  78. package/esm/models/internchatmessage.js +0 -22
  79. package/esm/models/internchatmessagecontent.d.ts +0 -12
  80. package/esm/models/internchatmessagecontent.js +0 -12
  81. package/esm/models/internchatprompttokensdetails.d.ts +0 -13
  82. package/esm/models/internchatprompttokensdetails.js +0 -19
  83. package/esm/models/internchatsteeredresponse.d.ts +0 -33
  84. package/esm/models/internchatsteeredresponse.js +0 -28
  85. package/esm/models/internchatstreamerror.d.ts +0 -22
  86. package/esm/models/internchatstreamerror.js +0 -17
  87. package/esm/models/internchatstreamingresponse.d.ts +0 -17
  88. package/esm/models/internchatstreamingresponse.js +0 -29
  89. package/esm/models/internchatsystemmessage.d.ts +0 -21
  90. package/esm/models/internchatsystemmessage.js +0 -15
  91. package/esm/models/internchattextpart.d.ts +0 -24
  92. package/esm/models/internchattextpart.js +0 -19
  93. package/esm/models/internchattoolcall.d.ts +0 -30
  94. package/esm/models/internchattoolcall.js +0 -23
  95. package/esm/models/internchattoolcallfunction.d.ts +0 -24
  96. package/esm/models/internchattoolcallfunction.js +0 -20
  97. package/esm/models/internchattoolmessage.d.ts +0 -23
  98. package/esm/models/internchattoolmessage.js +0 -21
  99. package/esm/models/internchatusage.d.ts +0 -24
  100. package/esm/models/internchatusage.js +0 -27
  101. package/esm/models/internchatusermessage.d.ts +0 -21
  102. package/esm/models/internchatusermessage.js +0 -15
  103. package/esm/models/internconnection.d.ts +0 -118
  104. package/esm/models/internconnection.js +0 -105
  105. package/esm/models/internconnectionlist.d.ts +0 -11
  106. package/esm/models/internconnectionlist.js +0 -15
  107. package/esm/models/interndaemonaccess.d.ts +0 -24
  108. package/esm/models/interndaemonaccess.js +0 -23
  109. package/esm/models/interninvokeacceptedresponse.d.ts +0 -34
  110. package/esm/models/interninvokeacceptedresponse.js +0 -30
  111. package/esm/models/interninvokerequest.d.ts +0 -23
  112. package/esm/models/interninvokerequest.js +0 -19
  113. package/esm/models/internlifecycleerror.d.ts +0 -23
  114. package/esm/models/internlifecycleerror.js +0 -32
  115. package/esm/models/internlistresponse.d.ts +0 -22
  116. package/esm/models/internlistresponse.js +0 -23
  117. package/esm/models/operations/createintern.d.ts +0 -61
  118. package/esm/models/operations/createintern.js +0 -25
  119. package/esm/models/operations/createinternchatcompletion.d.ts +0 -77
  120. package/esm/models/operations/createinternchatcompletion.js +0 -71
  121. package/esm/models/operations/deleteintern.d.ts +0 -61
  122. package/esm/models/operations/deleteintern.js +0 -24
  123. package/esm/models/operations/getintern.d.ts +0 -58
  124. package/esm/models/operations/getintern.js +0 -21
  125. package/esm/models/operations/getinternconnections.d.ts +0 -58
  126. package/esm/models/operations/getinternconnections.js +0 -21
  127. package/esm/models/operations/getinterndaemon.d.ts +0 -58
  128. package/esm/models/operations/getinterndaemon.js +0 -21
  129. package/esm/models/operations/getinterndaemonaccess.d.ts +0 -58
  130. package/esm/models/operations/getinterndaemonaccess.js +0 -21
  131. package/esm/models/operations/getinternicon.d.ts +0 -63
  132. package/esm/models/operations/getinternicon.js +0 -22
  133. package/esm/models/operations/invokeintern.d.ts +0 -72
  134. package/esm/models/operations/invokeintern.js +0 -38
  135. package/esm/models/operations/listinterns.d.ts +0 -87
  136. package/esm/models/operations/listinterns.js +0 -40
  137. package/esm/models/operations/provisionintern.d.ts +0 -58
  138. package/esm/models/operations/provisionintern.js +0 -21
  139. package/esm/models/operations/signinterndaemonaccessrequest.d.ts +0 -72
  140. package/esm/models/operations/signinterndaemonaccessrequest.js +0 -38
  141. package/esm/models/operations/signinterndaemonrequest.d.ts +0 -72
  142. package/esm/models/operations/signinterndaemonrequest.js +0 -38
  143. package/esm/models/operations/suspendintern.d.ts +0 -58
  144. package/esm/models/operations/suspendintern.js +0 -21
  145. package/esm/models/operations/updateintern.d.ts +0 -61
  146. package/esm/models/operations/updateintern.js +0 -24
  147. package/esm/models/provisioninternresponse.d.ts +0 -10
  148. package/esm/models/provisioninternresponse.js +0 -14
  149. package/esm/models/signinterndaemonrequest.d.ts +0 -54
  150. package/esm/models/signinterndaemonrequest.js +0 -30
  151. package/esm/models/signinterndaemonresponse.d.ts +0 -32
  152. package/esm/models/signinterndaemonresponse.js +0 -27
  153. package/esm/models/suspendinternresponse.d.ts +0 -10
  154. package/esm/models/suspendinternresponse.js +0 -14
  155. package/esm/models/updateinternrequest.d.ts +0 -33
  156. package/esm/models/updateinternrequest.js +0 -16
  157. package/esm/sdk/interns.d.ts +0 -143
  158. package/esm/sdk/interns.js +0 -163
@@ -1,23 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { Result as SafeParseResult } from "../types/fp.js";
3
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
- export type Code = string | number;
5
- export type InternLifecycleErrorMetadata = {
6
- reason: string;
7
- retryable: boolean;
8
- };
9
- export type InternLifecycleErrorError = {
10
- code: string | number;
11
- message: string;
12
- metadata?: InternLifecycleErrorMetadata | undefined;
13
- };
14
- /** @internal */
15
- export declare const Code$inboundSchema: z.ZodType<Code, unknown>;
16
- export declare function codeFromJSON(jsonString: string): SafeParseResult<Code, SDKValidationError>;
17
- /** @internal */
18
- export declare const InternLifecycleErrorMetadata$inboundSchema: z.ZodType<InternLifecycleErrorMetadata, unknown>;
19
- export declare function internLifecycleErrorMetadataFromJSON(jsonString: string): SafeParseResult<InternLifecycleErrorMetadata, SDKValidationError>;
20
- /** @internal */
21
- export declare const InternLifecycleErrorError$inboundSchema: z.ZodType<InternLifecycleErrorError, unknown>;
22
- export declare function internLifecycleErrorErrorFromJSON(jsonString: string): SafeParseResult<InternLifecycleErrorError, SDKValidationError>;
23
- //# sourceMappingURL=internlifecycleerror.d.ts.map
@@ -1,32 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 9d7cc6ac0062
4
- */
5
- import * as z from "zod/v4";
6
- import { safeParse } from "../lib/schemas.js";
7
- /** @internal */
8
- export const Code$inboundSchema = z.union([
9
- z.string(),
10
- z.int(),
11
- ]);
12
- export function codeFromJSON(jsonString) {
13
- return safeParse(jsonString, (x) => Code$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'Code' from JSON`);
14
- }
15
- /** @internal */
16
- export const InternLifecycleErrorMetadata$inboundSchema = z.object({
17
- reason: z.string(),
18
- retryable: z.boolean(),
19
- });
20
- export function internLifecycleErrorMetadataFromJSON(jsonString) {
21
- return safeParse(jsonString, (x) => InternLifecycleErrorMetadata$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InternLifecycleErrorMetadata' from JSON`);
22
- }
23
- /** @internal */
24
- export const InternLifecycleErrorError$inboundSchema = z.object({
25
- code: z.union([z.string(), z.int()]),
26
- message: z.string(),
27
- metadata: z.lazy(() => InternLifecycleErrorMetadata$inboundSchema).optional(),
28
- });
29
- export function internLifecycleErrorErrorFromJSON(jsonString) {
30
- return safeParse(jsonString, (x) => InternLifecycleErrorError$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InternLifecycleErrorError' from JSON`);
31
- }
32
- //# sourceMappingURL=internlifecycleerror.js.map
@@ -1,22 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { Result as SafeParseResult } from "../types/fp.js";
3
- import { SDKValidationError } from "./errors/sdkvalidationerror.js";
4
- import { Intern } from "./intern.js";
5
- /**
6
- * Interns visible to the authenticated API key.
7
- */
8
- export type InternListResponse = {
9
- data: Array<Intern>;
10
- /**
11
- * True when more interns match the current filters.
12
- */
13
- hasMore: boolean;
14
- /**
15
- * Opaque cursor, present when `has_more` is true. Pass it as `starting_after` to fetch the next page.
16
- */
17
- nextCursor?: string | undefined;
18
- };
19
- /** @internal */
20
- export declare const InternListResponse$inboundSchema: z.ZodType<InternListResponse, unknown>;
21
- export declare function internListResponseFromJSON(jsonString: string): SafeParseResult<InternListResponse, SDKValidationError>;
22
- //# sourceMappingURL=internlistresponse.d.ts.map
@@ -1,23 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: cd6ace7e64c6
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../lib/primitives.js";
7
- import { safeParse } from "../lib/schemas.js";
8
- import { Intern$inboundSchema } from "./intern.js";
9
- /** @internal */
10
- export const InternListResponse$inboundSchema = z.object({
11
- data: z.array(Intern$inboundSchema),
12
- has_more: z.boolean(),
13
- next_cursor: z.string().optional(),
14
- }).transform((v) => {
15
- return remap$(v, {
16
- "has_more": "hasMore",
17
- "next_cursor": "nextCursor",
18
- });
19
- });
20
- export function internListResponseFromJSON(jsonString) {
21
- return safeParse(jsonString, (x) => InternListResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'InternListResponse' from JSON`);
22
- }
23
- //# sourceMappingURL=internlistresponse.js.map
@@ -1,61 +0,0 @@
1
- import * as z from "zod/v4";
2
- import * as models from "../index.js";
3
- export type CreateInternGlobals = {
4
- /**
5
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
6
- *
7
- * @remarks
8
- * This is used to track API usage per application.
9
- */
10
- httpReferer?: string | undefined;
11
- /**
12
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
13
- *
14
- * @remarks
15
- */
16
- appTitle?: string | undefined;
17
- /**
18
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
19
- *
20
- * @remarks
21
- */
22
- appCategories?: string | undefined;
23
- };
24
- export type CreateInternRequest = {
25
- /**
26
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
27
- *
28
- * @remarks
29
- * This is used to track API usage per application.
30
- */
31
- httpReferer?: string | undefined;
32
- /**
33
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
34
- *
35
- * @remarks
36
- */
37
- appTitle?: string | undefined;
38
- /**
39
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
40
- *
41
- * @remarks
42
- */
43
- appCategories?: string | undefined;
44
- /**
45
- * Key that makes retries resume the same create operation, from 1 through 255 characters. An empty or longer key is refused with 400. Without the header, the server derives a stable key from the request body.
46
- */
47
- idempotencyKey?: string | undefined;
48
- createInternRequest: models.CreateInternRequest;
49
- };
50
- /** @internal */
51
- export type CreateInternRequest$Outbound = {
52
- "HTTP-Referer"?: string | undefined;
53
- appTitle?: string | undefined;
54
- appCategories?: string | undefined;
55
- "Idempotency-Key"?: string | undefined;
56
- CreateInternRequest: models.CreateInternRequest$Outbound;
57
- };
58
- /** @internal */
59
- export declare const CreateInternRequest$outboundSchema: z.ZodType<CreateInternRequest$Outbound, CreateInternRequest>;
60
- export declare function createInternRequestToJSON(createInternRequest: CreateInternRequest): string;
61
- //# sourceMappingURL=createintern.d.ts.map
@@ -1,25 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 49d763cf1338
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { CreateInternRequest$outboundSchema as models_CreateInternRequest$outboundSchema } from "../createinternrequest.js";
8
- /** @internal */
9
- export const CreateInternRequest$outboundSchema = z.object({
10
- httpReferer: z.string().optional(),
11
- appTitle: z.string().optional(),
12
- appCategories: z.string().optional(),
13
- idempotencyKey: z.string().optional(),
14
- createInternRequest: models_CreateInternRequest$outboundSchema,
15
- }).transform((v) => {
16
- return remap$(v, {
17
- httpReferer: "HTTP-Referer",
18
- idempotencyKey: "Idempotency-Key",
19
- createInternRequest: "CreateInternRequest",
20
- });
21
- });
22
- export function createInternRequestToJSON(createInternRequest) {
23
- return JSON.stringify(CreateInternRequest$outboundSchema.parse(createInternRequest));
24
- }
25
- //# sourceMappingURL=createintern.js.map
@@ -1,77 +0,0 @@
1
- import * as z from "zod/v4";
2
- import { EventStream } from "../../lib/event-streams.js";
3
- import { Result as SafeParseResult } from "../../types/fp.js";
4
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
5
- import * as models from "../index.js";
6
- export type CreateInternChatCompletionGlobals = {
7
- /**
8
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
9
- *
10
- * @remarks
11
- * This is used to track API usage per application.
12
- */
13
- httpReferer?: string | undefined;
14
- /**
15
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
16
- *
17
- * @remarks
18
- */
19
- appTitle?: string | undefined;
20
- /**
21
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
22
- *
23
- * @remarks
24
- */
25
- appCategories?: string | undefined;
26
- };
27
- export type CreateInternChatCompletionRequest = {
28
- /**
29
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
30
- *
31
- * @remarks
32
- * This is used to track API usage per application.
33
- */
34
- httpReferer?: string | undefined;
35
- /**
36
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
37
- *
38
- * @remarks
39
- */
40
- appTitle?: string | undefined;
41
- /**
42
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
43
- *
44
- * @remarks
45
- */
46
- appCategories?: string | undefined;
47
- /**
48
- * The intern to talk to.
49
- */
50
- internId: string;
51
- internChatCompletionRequest: models.InternChatCompletionRequest;
52
- };
53
- export type CreateInternChatCompletionResponseResult = models.InternChatSteeredResponse | EventStream<models.InternChatCompletionChunk>;
54
- export type CreateInternChatCompletionResponse = {
55
- headers: {
56
- [k: string]: Array<string>;
57
- };
58
- result: models.InternChatSteeredResponse | EventStream<models.InternChatCompletionChunk>;
59
- };
60
- /** @internal */
61
- export type CreateInternChatCompletionRequest$Outbound = {
62
- "HTTP-Referer"?: string | undefined;
63
- appTitle?: string | undefined;
64
- appCategories?: string | undefined;
65
- internId: string;
66
- InternChatCompletionRequest: models.InternChatCompletionRequest$Outbound;
67
- };
68
- /** @internal */
69
- export declare const CreateInternChatCompletionRequest$outboundSchema: z.ZodType<CreateInternChatCompletionRequest$Outbound, CreateInternChatCompletionRequest>;
70
- export declare function createInternChatCompletionRequestToJSON(createInternChatCompletionRequest: CreateInternChatCompletionRequest): string;
71
- /** @internal */
72
- export declare const CreateInternChatCompletionResponseResult$inboundSchema: z.ZodType<CreateInternChatCompletionResponseResult, unknown>;
73
- export declare function createInternChatCompletionResponseResultFromJSON(jsonString: string): SafeParseResult<CreateInternChatCompletionResponseResult, SDKValidationError>;
74
- /** @internal */
75
- export declare const CreateInternChatCompletionResponse$inboundSchema: z.ZodType<CreateInternChatCompletionResponse, unknown>;
76
- export declare function createInternChatCompletionResponseFromJSON(jsonString: string): SafeParseResult<CreateInternChatCompletionResponse, SDKValidationError>;
77
- //# sourceMappingURL=createinternchatcompletion.d.ts.map
@@ -1,71 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 0d92e801a635
4
- */
5
- import * as z from "zod/v4";
6
- import { EventStream } from "../../lib/event-streams.js";
7
- import { remap as remap$ } from "../../lib/primitives.js";
8
- import { safeParse } from "../../lib/schemas.js";
9
- import { InternChatCompletionRequest$outboundSchema as models_InternChatCompletionRequest$outboundSchema } from "../internchatcompletionrequest.js"; import { InternChatSteeredResponse$inboundSchema as models_InternChatSteeredResponse$inboundSchema } from "../internchatsteeredresponse.js"; import { InternChatStreamingResponse$inboundSchema as models_InternChatStreamingResponse$inboundSchema } from "../internchatstreamingresponse.js";
10
- /** @internal */
11
- export const CreateInternChatCompletionRequest$outboundSchema = z.object({
12
- httpReferer: z.string().optional(),
13
- appTitle: z.string().optional(),
14
- appCategories: z.string().optional(),
15
- internId: z.string(),
16
- internChatCompletionRequest: models_InternChatCompletionRequest$outboundSchema,
17
- }).transform((v) => {
18
- return remap$(v, {
19
- httpReferer: "HTTP-Referer",
20
- internChatCompletionRequest: "InternChatCompletionRequest",
21
- });
22
- });
23
- export function createInternChatCompletionRequestToJSON(createInternChatCompletionRequest) {
24
- return JSON.stringify(CreateInternChatCompletionRequest$outboundSchema.parse(createInternChatCompletionRequest));
25
- }
26
- /** @internal */
27
- export const CreateInternChatCompletionResponseResult$inboundSchema = z.union([
28
- models_InternChatSteeredResponse$inboundSchema,
29
- z.custom(x => x instanceof ReadableStream)
30
- .transform(stream => {
31
- return new EventStream(stream, rawEvent => {
32
- if (rawEvent.data === "[DONE]")
33
- return { done: true, value: undefined };
34
- return {
35
- done: false,
36
- value: models_InternChatStreamingResponse$inboundSchema.parse(rawEvent)?.data,
37
- };
38
- });
39
- }),
40
- ]);
41
- export function createInternChatCompletionResponseResultFromJSON(jsonString) {
42
- return safeParse(jsonString, (x) => CreateInternChatCompletionResponseResult$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateInternChatCompletionResponseResult' from JSON`);
43
- }
44
- /** @internal */
45
- export const CreateInternChatCompletionResponse$inboundSchema = z.object({
46
- Headers: z.record(z.string(), z.array(z.string())).default({}),
47
- Result: z.union([
48
- models_InternChatSteeredResponse$inboundSchema,
49
- z.custom(x => x instanceof ReadableStream)
50
- .transform(stream => {
51
- return new EventStream(stream, rawEvent => {
52
- if (rawEvent.data === "[DONE]") {
53
- return { done: true, value: undefined };
54
- }
55
- return {
56
- done: false,
57
- value: models_InternChatStreamingResponse$inboundSchema.parse(rawEvent)?.data,
58
- };
59
- });
60
- }),
61
- ]),
62
- }).transform((v) => {
63
- return remap$(v, {
64
- "Headers": "headers",
65
- "Result": "result",
66
- });
67
- });
68
- export function createInternChatCompletionResponseFromJSON(jsonString) {
69
- return safeParse(jsonString, (x) => CreateInternChatCompletionResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'CreateInternChatCompletionResponse' from JSON`);
70
- }
71
- //# sourceMappingURL=createinternchatcompletion.js.map
@@ -1,61 +0,0 @@
1
- import * as z from "zod/v4";
2
- import * as models from "../index.js";
3
- export type DeleteInternGlobals = {
4
- /**
5
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
6
- *
7
- * @remarks
8
- * This is used to track API usage per application.
9
- */
10
- httpReferer?: string | undefined;
11
- /**
12
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
13
- *
14
- * @remarks
15
- */
16
- appTitle?: string | undefined;
17
- /**
18
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
19
- *
20
- * @remarks
21
- */
22
- appCategories?: string | undefined;
23
- };
24
- export type DeleteInternRequest = {
25
- /**
26
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
27
- *
28
- * @remarks
29
- * This is used to track API usage per application.
30
- */
31
- httpReferer?: string | undefined;
32
- /**
33
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
34
- *
35
- * @remarks
36
- */
37
- appTitle?: string | undefined;
38
- /**
39
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
40
- *
41
- * @remarks
42
- */
43
- appCategories?: string | undefined;
44
- /**
45
- * ID of an intern visible to the authenticated API key.
46
- */
47
- internId: string;
48
- deleteInternRequest: models.DeleteInternRequest;
49
- };
50
- /** @internal */
51
- export type DeleteInternRequest$Outbound = {
52
- "HTTP-Referer"?: string | undefined;
53
- appTitle?: string | undefined;
54
- appCategories?: string | undefined;
55
- internId: string;
56
- DeleteInternRequest: models.DeleteInternRequest$Outbound;
57
- };
58
- /** @internal */
59
- export declare const DeleteInternRequest$outboundSchema: z.ZodType<DeleteInternRequest$Outbound, DeleteInternRequest>;
60
- export declare function deleteInternRequestToJSON(deleteInternRequest: DeleteInternRequest): string;
61
- //# sourceMappingURL=deleteintern.d.ts.map
@@ -1,24 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 3d76bcc84f78
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- import { DeleteInternRequest$outboundSchema as models_DeleteInternRequest$outboundSchema } from "../deleteinternrequest.js";
8
- /** @internal */
9
- export const DeleteInternRequest$outboundSchema = z.object({
10
- httpReferer: z.string().optional(),
11
- appTitle: z.string().optional(),
12
- appCategories: z.string().optional(),
13
- internId: z.string(),
14
- deleteInternRequest: models_DeleteInternRequest$outboundSchema,
15
- }).transform((v) => {
16
- return remap$(v, {
17
- httpReferer: "HTTP-Referer",
18
- deleteInternRequest: "DeleteInternRequest",
19
- });
20
- });
21
- export function deleteInternRequestToJSON(deleteInternRequest) {
22
- return JSON.stringify(DeleteInternRequest$outboundSchema.parse(deleteInternRequest));
23
- }
24
- //# sourceMappingURL=deleteintern.js.map
@@ -1,58 +0,0 @@
1
- import * as z from "zod/v4";
2
- export type GetInternGlobals = {
3
- /**
4
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
- *
6
- * @remarks
7
- * This is used to track API usage per application.
8
- */
9
- httpReferer?: string | undefined;
10
- /**
11
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
- *
13
- * @remarks
14
- */
15
- appTitle?: string | undefined;
16
- /**
17
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
18
- *
19
- * @remarks
20
- */
21
- appCategories?: string | undefined;
22
- };
23
- export type GetInternRequest = {
24
- /**
25
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
26
- *
27
- * @remarks
28
- * This is used to track API usage per application.
29
- */
30
- httpReferer?: string | undefined;
31
- /**
32
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
33
- *
34
- * @remarks
35
- */
36
- appTitle?: string | undefined;
37
- /**
38
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
39
- *
40
- * @remarks
41
- */
42
- appCategories?: string | undefined;
43
- /**
44
- * ID of an intern visible to the authenticated API key.
45
- */
46
- internId: string;
47
- };
48
- /** @internal */
49
- export type GetInternRequest$Outbound = {
50
- "HTTP-Referer"?: string | undefined;
51
- appTitle?: string | undefined;
52
- appCategories?: string | undefined;
53
- internId: string;
54
- };
55
- /** @internal */
56
- export declare const GetInternRequest$outboundSchema: z.ZodType<GetInternRequest$Outbound, GetInternRequest>;
57
- export declare function getInternRequestToJSON(getInternRequest: GetInternRequest): string;
58
- //# sourceMappingURL=getintern.d.ts.map
@@ -1,21 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: f7646f94d5c3
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- /** @internal */
8
- export const GetInternRequest$outboundSchema = z.object({
9
- httpReferer: z.string().optional(),
10
- appTitle: z.string().optional(),
11
- appCategories: z.string().optional(),
12
- internId: z.string(),
13
- }).transform((v) => {
14
- return remap$(v, {
15
- httpReferer: "HTTP-Referer",
16
- });
17
- });
18
- export function getInternRequestToJSON(getInternRequest) {
19
- return JSON.stringify(GetInternRequest$outboundSchema.parse(getInternRequest));
20
- }
21
- //# sourceMappingURL=getintern.js.map
@@ -1,58 +0,0 @@
1
- import * as z from "zod/v4";
2
- export type GetInternConnectionsGlobals = {
3
- /**
4
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
- *
6
- * @remarks
7
- * This is used to track API usage per application.
8
- */
9
- httpReferer?: string | undefined;
10
- /**
11
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
- *
13
- * @remarks
14
- */
15
- appTitle?: string | undefined;
16
- /**
17
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
18
- *
19
- * @remarks
20
- */
21
- appCategories?: string | undefined;
22
- };
23
- export type GetInternConnectionsRequest = {
24
- /**
25
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
26
- *
27
- * @remarks
28
- * This is used to track API usage per application.
29
- */
30
- httpReferer?: string | undefined;
31
- /**
32
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
33
- *
34
- * @remarks
35
- */
36
- appTitle?: string | undefined;
37
- /**
38
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
39
- *
40
- * @remarks
41
- */
42
- appCategories?: string | undefined;
43
- /**
44
- * ID of an intern visible to the authenticated API key.
45
- */
46
- internId: string;
47
- };
48
- /** @internal */
49
- export type GetInternConnectionsRequest$Outbound = {
50
- "HTTP-Referer"?: string | undefined;
51
- appTitle?: string | undefined;
52
- appCategories?: string | undefined;
53
- internId: string;
54
- };
55
- /** @internal */
56
- export declare const GetInternConnectionsRequest$outboundSchema: z.ZodType<GetInternConnectionsRequest$Outbound, GetInternConnectionsRequest>;
57
- export declare function getInternConnectionsRequestToJSON(getInternConnectionsRequest: GetInternConnectionsRequest): string;
58
- //# sourceMappingURL=getinternconnections.d.ts.map
@@ -1,21 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: e3ab1398423c
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- /** @internal */
8
- export const GetInternConnectionsRequest$outboundSchema = z.object({
9
- httpReferer: z.string().optional(),
10
- appTitle: z.string().optional(),
11
- appCategories: z.string().optional(),
12
- internId: z.string(),
13
- }).transform((v) => {
14
- return remap$(v, {
15
- httpReferer: "HTTP-Referer",
16
- });
17
- });
18
- export function getInternConnectionsRequestToJSON(getInternConnectionsRequest) {
19
- return JSON.stringify(GetInternConnectionsRequest$outboundSchema.parse(getInternConnectionsRequest));
20
- }
21
- //# sourceMappingURL=getinternconnections.js.map
@@ -1,58 +0,0 @@
1
- import * as z from "zod/v4";
2
- export type GetInternDaemonGlobals = {
3
- /**
4
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
5
- *
6
- * @remarks
7
- * This is used to track API usage per application.
8
- */
9
- httpReferer?: string | undefined;
10
- /**
11
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
12
- *
13
- * @remarks
14
- */
15
- appTitle?: string | undefined;
16
- /**
17
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
18
- *
19
- * @remarks
20
- */
21
- appCategories?: string | undefined;
22
- };
23
- export type GetInternDaemonRequest = {
24
- /**
25
- * The app identifier should be your app's URL and is used as the primary identifier for rankings.
26
- *
27
- * @remarks
28
- * This is used to track API usage per application.
29
- */
30
- httpReferer?: string | undefined;
31
- /**
32
- * The app display name allows you to customize how your app appears in OpenRouter's dashboard.
33
- *
34
- * @remarks
35
- */
36
- appTitle?: string | undefined;
37
- /**
38
- * Comma-separated list of app categories (e.g. "cli-agent,cloud-agent"). Used for marketplace rankings.
39
- *
40
- * @remarks
41
- */
42
- appCategories?: string | undefined;
43
- /**
44
- * ID of an intern visible to the authenticated API key.
45
- */
46
- internId: string;
47
- };
48
- /** @internal */
49
- export type GetInternDaemonRequest$Outbound = {
50
- "HTTP-Referer"?: string | undefined;
51
- appTitle?: string | undefined;
52
- appCategories?: string | undefined;
53
- internId: string;
54
- };
55
- /** @internal */
56
- export declare const GetInternDaemonRequest$outboundSchema: z.ZodType<GetInternDaemonRequest$Outbound, GetInternDaemonRequest>;
57
- export declare function getInternDaemonRequestToJSON(getInternDaemonRequest: GetInternDaemonRequest): string;
58
- //# sourceMappingURL=getinterndaemon.d.ts.map
@@ -1,21 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- * @generated-id: 2f48932593a9
4
- */
5
- import * as z from "zod/v4";
6
- import { remap as remap$ } from "../../lib/primitives.js";
7
- /** @internal */
8
- export const GetInternDaemonRequest$outboundSchema = z.object({
9
- httpReferer: z.string().optional(),
10
- appTitle: z.string().optional(),
11
- appCategories: z.string().optional(),
12
- internId: z.string(),
13
- }).transform((v) => {
14
- return remap$(v, {
15
- httpReferer: "HTTP-Referer",
16
- });
17
- });
18
- export function getInternDaemonRequestToJSON(getInternDaemonRequest) {
19
- return JSON.stringify(GetInternDaemonRequest$outboundSchema.parse(getInternDaemonRequest));
20
- }
21
- //# sourceMappingURL=getinterndaemon.js.map