@orq-ai/node 1.31.0-rc.7 → 1.31.11
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/FUNCTIONS.md +106 -0
- package/README.md +18 -46
- package/RUNTIMES.md +22 -0
- package/hooks/hooks.d.ts.map +1 -1
- package/hooks/hooks.js +18 -0
- package/hooks/hooks.js.map +1 -1
- package/hooks/types.d.ts +1 -0
- package/hooks/types.d.ts.map +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +4 -4
- package/lib/config.js.map +1 -1
- package/models/components/deployments.d.ts +2 -2
- package/models/components/deployments.d.ts.map +1 -1
- package/models/components/deployments.js +4 -4
- package/models/components/deployments.js.map +1 -1
- package/models/errors/index.d.ts +0 -1
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -1
- package/models/errors/index.js.map +1 -1
- package/models/operations/bulkfileupload.js +2 -2
- package/models/operations/createcontact.js +2 -2
- package/models/operations/deploymentgetconfig.d.ts +103 -100
- package/models/operations/deploymentgetconfig.d.ts.map +1 -1
- package/models/operations/deploymentgetconfig.js +144 -144
- package/models/operations/deploymentgetconfig.js.map +1 -1
- package/models/operations/deploymentinvoke.d.ts +52 -46
- package/models/operations/deploymentinvoke.d.ts.map +1 -1
- package/models/operations/deploymentinvoke.js +64 -61
- package/models/operations/deploymentinvoke.js.map +1 -1
- package/models/operations/deployments.d.ts +59 -53
- package/models/operations/deployments.d.ts.map +1 -1
- package/models/operations/deployments.js +69 -66
- package/models/operations/deployments.js.map +1 -1
- package/models/operations/fileupload.d.ts +2 -2
- package/models/operations/fileupload.d.ts.map +1 -1
- package/models/operations/fileupload.js +6 -6
- package/models/operations/fileupload.js.map +1 -1
- package/models/operations/index.d.ts +0 -9
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -9
- package/models/operations/index.js.map +1 -1
- package/package.json +2 -5
- package/packages/orq-rc/README.md +556 -0
- package/packages/orq-rc/docs/sdks/contacts/README.md +84 -0
- package/packages/orq-rc/docs/sdks/deployments/README.md +314 -0
- package/packages/orq-rc/docs/sdks/feedback/README.md +92 -0
- package/packages/orq-rc/docs/sdks/files/README.md +171 -0
- package/packages/orq-rc/docs/sdks/metrics/README.md +86 -0
- package/packages/orq-rc/docs/sdks/orq/README.md +10 -0
- package/packages/orq-rc/docs/sdks/remoteconfig/README.md +80 -0
- package/packages/orq-rc/src/core.ts +13 -0
- package/packages/orq-rc/src/funcs/contactsCreate.ts +123 -0
- package/packages/orq-rc/src/funcs/deploymentsAll.ts +137 -0
- package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +131 -0
- package/packages/orq-rc/src/funcs/deploymentsInvalidate.ts +132 -0
- package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +134 -0
- package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +131 -0
- package/packages/orq-rc/src/funcs/feedbackCreate.ts +123 -0
- package/packages/orq-rc/src/funcs/filesBulkUpload.ts +125 -0
- package/packages/orq-rc/src/funcs/filesUpload.ts +144 -0
- package/packages/orq-rc/src/funcs/remoteconfigGetConfig.ts +124 -0
- package/packages/orq-rc/src/hooks/hooks.ts +112 -0
- package/packages/orq-rc/src/hooks/index.ts +6 -0
- package/packages/orq-rc/src/hooks/registration.ts +14 -0
- package/packages/orq-rc/src/hooks/types.ts +102 -0
- package/packages/orq-rc/src/index.ts +7 -0
- package/packages/orq-rc/src/lib/base64.ts +37 -0
- package/packages/orq-rc/src/lib/config.ts +60 -0
- package/packages/orq-rc/src/lib/dlv.ts +53 -0
- package/packages/orq-rc/src/lib/encodings.ts +449 -0
- package/packages/orq-rc/src/lib/env.ts +41 -0
- package/packages/orq-rc/src/lib/event-streams.ts +264 -0
- package/packages/orq-rc/src/lib/files.ts +40 -0
- package/packages/orq-rc/src/lib/http.ts +323 -0
- package/packages/orq-rc/src/lib/is-plain-object.ts +43 -0
- package/packages/orq-rc/src/lib/logger.ts +9 -0
- package/packages/orq-rc/src/lib/matchers.ts +325 -0
- package/packages/orq-rc/src/lib/primitives.ts +122 -0
- package/packages/orq-rc/src/lib/retries.ts +219 -0
- package/packages/orq-rc/src/lib/schemas.ts +86 -0
- package/packages/orq-rc/src/lib/sdks.ts +392 -0
- package/packages/orq-rc/src/lib/security.ts +254 -0
- package/packages/orq-rc/src/lib/url.ts +33 -0
- package/packages/orq-rc/src/models/components/deployments.ts +1607 -0
- package/packages/orq-rc/src/models/components/index.ts +6 -0
- package/packages/orq-rc/src/models/components/security.ts +71 -0
- package/packages/orq-rc/src/models/errors/apierror.ts +27 -0
- package/packages/orq-rc/src/models/errors/honoapierror.ts +82 -0
- package/packages/orq-rc/src/models/errors/httpclienterrors.ts +62 -0
- package/packages/orq-rc/src/models/errors/index.ts +9 -0
- package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +97 -0
- package/packages/orq-rc/src/models/operations/bulkfileupload.ts +304 -0
- package/packages/orq-rc/src/models/operations/createcontact.ts +256 -0
- package/packages/orq-rc/src/models/operations/createfeedback.ts +286 -0
- package/{src → packages/orq-rc/src}/models/operations/createprompt.ts +4 -0
- package/{src → packages/orq-rc/src}/models/operations/createpromptversion.ts +4 -0
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +1790 -0
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +3417 -0
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +2384 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +2086 -0
- package/packages/orq-rc/src/models/operations/fileupload.ts +311 -0
- package/{src → packages/orq-rc/src}/models/operations/findonepromptsnippet.ts +18 -6
- package/{src → packages/orq-rc/src}/models/operations/getallprompts.ts +18 -6
- package/{src → packages/orq-rc/src}/models/operations/getallprompttemplates.ts +18 -6
- package/packages/orq-rc/src/models/operations/index.ts +23 -0
- package/packages/orq-rc/src/models/operations/invaliddeployment.ts +75 -0
- package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +190 -0
- package/{src → packages/orq-rc/src}/models/operations/updateprompt.ts +20 -6
- package/packages/orq-rc/src/sdk/contacts.ts +27 -0
- package/packages/orq-rc/src/sdk/deployments.ts +93 -0
- package/packages/orq-rc/src/sdk/feedback.ts +27 -0
- package/packages/orq-rc/src/sdk/files.ts +45 -0
- package/packages/orq-rc/src/sdk/index.ts +5 -0
- package/packages/orq-rc/src/sdk/metrics.ts +27 -0
- package/packages/orq-rc/src/sdk/remoteconfig.ts +24 -0
- package/packages/orq-rc/src/sdk/sdk.ts +49 -0
- package/packages/orq-rc/src/types/blobs.ts +31 -0
- package/packages/orq-rc/src/types/constdatetime.ts +15 -0
- package/packages/orq-rc/src/types/enums.ts +16 -0
- package/packages/orq-rc/src/types/fp.ts +50 -0
- package/packages/orq-rc/src/types/index.ts +11 -0
- package/packages/orq-rc/src/types/operations.ts +105 -0
- package/packages/orq-rc/src/types/rfcdate.ts +54 -0
- package/packages/orq-rc/src/types/streams.ts +21 -0
- package/sdk/sdk.d.ts +0 -6
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -10
- package/sdk/sdk.js.map +1 -1
- package/src/hooks/hooks.ts +20 -0
- package/src/hooks/types.ts +7 -0
- package/src/lib/config.ts +4 -4
- package/src/models/components/deployments.ts +2 -2
- package/src/models/errors/index.ts +0 -1
- package/src/models/operations/bulkfileupload.ts +2 -2
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/deploymentgetconfig.ts +193 -259
- package/src/models/operations/deploymentinvoke.ts +82 -95
- package/src/models/operations/deployments.ts +90 -101
- package/src/models/operations/fileupload.ts +4 -4
- package/src/models/operations/index.ts +0 -9
- package/src/sdk/sdk.ts +0 -12
- package/funcs/promptSnippetsFindOne.d.ts +0 -12
- package/funcs/promptSnippetsFindOne.d.ts.map +0 -1
- package/funcs/promptSnippetsFindOne.js +0 -107
- package/funcs/promptSnippetsFindOne.js.map +0 -1
- package/funcs/promptTemplatesGetAll.d.ts +0 -12
- package/funcs/promptTemplatesGetAll.d.ts.map +0 -1
- package/funcs/promptTemplatesGetAll.js +0 -107
- package/funcs/promptTemplatesGetAll.js.map +0 -1
- package/funcs/promptsCreate.d.ts +0 -12
- package/funcs/promptsCreate.d.ts.map +0 -1
- package/funcs/promptsCreate.js +0 -104
- package/funcs/promptsCreate.js.map +0 -1
- package/funcs/promptsCreateVersion.d.ts +0 -12
- package/funcs/promptsCreateVersion.d.ts.map +0 -1
- package/funcs/promptsCreateVersion.js +0 -108
- package/funcs/promptsCreateVersion.js.map +0 -1
- package/funcs/promptsDelete.d.ts +0 -12
- package/funcs/promptsDelete.d.ts.map +0 -1
- package/funcs/promptsDelete.js +0 -108
- package/funcs/promptsDelete.js.map +0 -1
- package/funcs/promptsDuplicate.d.ts +0 -12
- package/funcs/promptsDuplicate.d.ts.map +0 -1
- package/funcs/promptsDuplicate.js +0 -108
- package/funcs/promptsDuplicate.js.map +0 -1
- package/funcs/promptsGetAll.d.ts +0 -12
- package/funcs/promptsGetAll.d.ts.map +0 -1
- package/funcs/promptsGetAll.js +0 -107
- package/funcs/promptsGetAll.js.map +0 -1
- package/funcs/promptsGetOne.d.ts +0 -12
- package/funcs/promptsGetOne.d.ts.map +0 -1
- package/funcs/promptsGetOne.js +0 -108
- package/funcs/promptsGetOne.js.map +0 -1
- package/funcs/promptsUpdate.d.ts +0 -13
- package/funcs/promptsUpdate.d.ts.map +0 -1
- package/funcs/promptsUpdate.js +0 -112
- package/funcs/promptsUpdate.js.map +0 -1
- package/models/errors/updateprompt.d.ts +0 -36
- package/models/errors/updateprompt.d.ts.map +0 -1
- package/models/errors/updateprompt.js +0 -79
- package/models/errors/updateprompt.js.map +0 -1
- package/models/operations/createprompt.d.ts +0 -2023
- package/models/operations/createprompt.d.ts.map +0 -1
- package/models/operations/createprompt.js +0 -1849
- package/models/operations/createprompt.js.map +0 -1
- package/models/operations/createpromptversion.d.ts +0 -1989
- package/models/operations/createpromptversion.d.ts.map +0 -1
- package/models/operations/createpromptversion.js +0 -1844
- package/models/operations/createpromptversion.js.map +0 -1
- package/models/operations/deleteprompt.d.ts +0 -32
- package/models/operations/deleteprompt.d.ts.map +0 -1
- package/models/operations/deleteprompt.js +0 -69
- package/models/operations/deleteprompt.js.map +0 -1
- package/models/operations/duplicateprompt.d.ts +0 -32
- package/models/operations/duplicateprompt.d.ts.map +0 -1
- package/models/operations/duplicateprompt.js +0 -69
- package/models/operations/duplicateprompt.js.map +0 -1
- package/models/operations/findonepromptsnippet.d.ts +0 -6242
- package/models/operations/findonepromptsnippet.d.ts.map +0 -1
- package/models/operations/findonepromptsnippet.js +0 -5879
- package/models/operations/findonepromptsnippet.js.map +0 -1
- package/models/operations/getallprompts.d.ts +0 -6577
- package/models/operations/getallprompts.d.ts.map +0 -1
- package/models/operations/getallprompts.js +0 -6149
- package/models/operations/getallprompts.js.map +0 -1
- package/models/operations/getallprompttemplates.d.ts +0 -6571
- package/models/operations/getallprompttemplates.d.ts.map +0 -1
- package/models/operations/getallprompttemplates.js +0 -6213
- package/models/operations/getallprompttemplates.js.map +0 -1
- package/models/operations/getoneprompt.d.ts +0 -32
- package/models/operations/getoneprompt.d.ts.map +0 -1
- package/models/operations/getoneprompt.js +0 -69
- package/models/operations/getoneprompt.js.map +0 -1
- package/models/operations/updateprompt.d.ts +0 -7209
- package/models/operations/updateprompt.d.ts.map +0 -1
- package/models/operations/updateprompt.js +0 -6664
- package/models/operations/updateprompt.js.map +0 -1
- package/sdk/prompt.d.ts +0 -10
- package/sdk/prompt.d.ts.map +0 -1
- package/sdk/prompt.js +0 -21
- package/sdk/prompt.js.map +0 -1
- package/sdk/prompts.d.ts +0 -33
- package/sdk/prompts.d.ts.map +0 -1
- package/sdk/prompts.js +0 -61
- package/sdk/prompts.js.map +0 -1
- package/sdk/snippets.d.ts +0 -9
- package/sdk/snippets.d.ts.map +0 -1
- package/sdk/snippets.js +0 -19
- package/sdk/snippets.js.map +0 -1
- package/sdk/templates.d.ts +0 -9
- package/sdk/templates.d.ts.map +0 -1
- package/sdk/templates.js +0 -19
- package/sdk/templates.js.map +0 -1
- /package/{docs → packages/orq-rc/docs}/sdks/prompt/README.md +0 -0
- /package/{docs → packages/orq-rc/docs}/sdks/prompts/README.md +0 -0
- /package/{docs → packages/orq-rc/docs}/sdks/snippets/README.md +0 -0
- /package/{docs → packages/orq-rc/docs}/sdks/templates/README.md +0 -0
- /package/{src → packages/orq-rc/src}/funcs/promptSnippetsFindOne.ts +0 -0
- /package/{src → packages/orq-rc/src}/funcs/promptTemplatesGetAll.ts +0 -0
- /package/{src → packages/orq-rc/src}/funcs/promptsCreate.ts +0 -0
- /package/{src → packages/orq-rc/src}/funcs/promptsCreateVersion.ts +0 -0
- /package/{src → packages/orq-rc/src}/funcs/promptsDelete.ts +0 -0
- /package/{src → packages/orq-rc/src}/funcs/promptsDuplicate.ts +0 -0
- /package/{src → packages/orq-rc/src}/funcs/promptsGetAll.ts +0 -0
- /package/{src → packages/orq-rc/src}/funcs/promptsGetOne.ts +0 -0
- /package/{src → packages/orq-rc/src}/funcs/promptsUpdate.ts +0 -0
- /package/{src → packages/orq-rc/src}/models/errors/updateprompt.ts +0 -0
- /package/{src → packages/orq-rc/src}/models/operations/deleteprompt.ts +0 -0
- /package/{src → packages/orq-rc/src}/models/operations/duplicateprompt.ts +0 -0
- /package/{src → packages/orq-rc/src}/models/operations/getoneprompt.ts +0 -0
- /package/{src → packages/orq-rc/src}/sdk/prompt.ts +0 -0
- /package/{src → packages/orq-rc/src}/sdk/prompts.ts +0 -0
- /package/{src → packages/orq-rc/src}/sdk/snippets.ts +0 -0
- /package/{src → packages/orq-rc/src}/sdk/templates.ts +0 -0
|
@@ -291,6 +291,7 @@ export const DeploymentGetConfigDeploymentsResponseType = {
|
|
|
291
291
|
Tts: "tts",
|
|
292
292
|
Stt: "stt",
|
|
293
293
|
Rerank: "rerank",
|
|
294
|
+
Moderations: "moderations",
|
|
294
295
|
} as const;
|
|
295
296
|
/**
|
|
296
297
|
* The type of the model. Current `chat`,`completion` and `image` are supported
|
|
@@ -415,7 +416,7 @@ export type DeploymentGetConfigMessages = {
|
|
|
415
416
|
/**
|
|
416
417
|
* Only supported on `image` models.
|
|
417
418
|
*/
|
|
418
|
-
export const
|
|
419
|
+
export const Format = {
|
|
419
420
|
Url: "url",
|
|
420
421
|
B64Json: "b64_json",
|
|
421
422
|
Text: "text",
|
|
@@ -424,23 +425,19 @@ export const DeploymentGetConfigFormat = {
|
|
|
424
425
|
/**
|
|
425
426
|
* Only supported on `image` models.
|
|
426
427
|
*/
|
|
427
|
-
export type
|
|
428
|
-
typeof DeploymentGetConfigFormat
|
|
429
|
-
>;
|
|
428
|
+
export type Format = ClosedEnum<typeof Format>;
|
|
430
429
|
|
|
431
430
|
/**
|
|
432
431
|
* Only supported on `image` models.
|
|
433
432
|
*/
|
|
434
|
-
export const
|
|
433
|
+
export const Quality = {
|
|
435
434
|
Standard: "standard",
|
|
436
435
|
Hd: "hd",
|
|
437
436
|
} as const;
|
|
438
437
|
/**
|
|
439
438
|
* Only supported on `image` models.
|
|
440
439
|
*/
|
|
441
|
-
export type
|
|
442
|
-
typeof DeploymentGetConfigQuality
|
|
443
|
-
>;
|
|
440
|
+
export type Quality = ClosedEnum<typeof Quality>;
|
|
444
441
|
|
|
445
442
|
export const DeploymentGetConfigResponseFormatType = {
|
|
446
443
|
JsonObject: "json_object",
|
|
@@ -449,26 +446,24 @@ export type DeploymentGetConfigResponseFormatType = ClosedEnum<
|
|
|
449
446
|
typeof DeploymentGetConfigResponseFormatType
|
|
450
447
|
>;
|
|
451
448
|
|
|
452
|
-
export type
|
|
449
|
+
export type ResponseFormat2 = {
|
|
453
450
|
type: DeploymentGetConfigResponseFormatType;
|
|
454
451
|
};
|
|
455
452
|
|
|
456
|
-
export const
|
|
453
|
+
export const ResponseFormatType = {
|
|
457
454
|
JsonSchema: "json_schema",
|
|
458
455
|
} as const;
|
|
459
|
-
export type
|
|
460
|
-
typeof DeploymentGetConfigResponseFormatDeploymentsType
|
|
461
|
-
>;
|
|
456
|
+
export type ResponseFormatType = ClosedEnum<typeof ResponseFormatType>;
|
|
462
457
|
|
|
463
|
-
export type
|
|
458
|
+
export type JsonSchema = {
|
|
464
459
|
name: string;
|
|
465
460
|
strict: boolean;
|
|
466
461
|
schema: { [k: string]: any };
|
|
467
462
|
};
|
|
468
463
|
|
|
469
|
-
export type
|
|
470
|
-
type:
|
|
471
|
-
jsonSchema:
|
|
464
|
+
export type ResponseFormat1 = {
|
|
465
|
+
type: ResponseFormatType;
|
|
466
|
+
jsonSchema: JsonSchema;
|
|
472
467
|
};
|
|
473
468
|
|
|
474
469
|
/**
|
|
@@ -482,37 +477,31 @@ export type DeploymentGetConfigResponseFormat1 = {
|
|
|
482
477
|
*
|
|
483
478
|
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
484
479
|
*/
|
|
485
|
-
export type
|
|
486
|
-
| DeploymentGetConfigResponseFormat2
|
|
487
|
-
| DeploymentGetConfigResponseFormat1;
|
|
480
|
+
export type ResponseFormat = ResponseFormat2 | ResponseFormat1;
|
|
488
481
|
|
|
489
482
|
/**
|
|
490
483
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
491
484
|
*/
|
|
492
|
-
export const
|
|
485
|
+
export const PhotoRealVersion = {
|
|
493
486
|
V1: "v1",
|
|
494
487
|
V2: "v2",
|
|
495
488
|
} as const;
|
|
496
489
|
/**
|
|
497
490
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
498
491
|
*/
|
|
499
|
-
export type
|
|
500
|
-
typeof DeploymentGetConfigPhotoRealVersion
|
|
501
|
-
>;
|
|
492
|
+
export type PhotoRealVersion = ClosedEnum<typeof PhotoRealVersion>;
|
|
502
493
|
|
|
503
494
|
/**
|
|
504
495
|
* The format to return the embeddings
|
|
505
496
|
*/
|
|
506
|
-
export const
|
|
497
|
+
export const EncodingFormat = {
|
|
507
498
|
Float: "float",
|
|
508
499
|
Base64: "base64",
|
|
509
500
|
} as const;
|
|
510
501
|
/**
|
|
511
502
|
* The format to return the embeddings
|
|
512
503
|
*/
|
|
513
|
-
export type
|
|
514
|
-
typeof DeploymentGetConfigEncodingFormat
|
|
515
|
-
>;
|
|
504
|
+
export type EncodingFormat = ClosedEnum<typeof EncodingFormat>;
|
|
516
505
|
|
|
517
506
|
/**
|
|
518
507
|
* Model Parameters: Not all parameters apply to every model
|
|
@@ -553,7 +542,7 @@ export type ParametersT = {
|
|
|
553
542
|
/**
|
|
554
543
|
* Only supported on `image` models.
|
|
555
544
|
*/
|
|
556
|
-
format?:
|
|
545
|
+
format?: Format | undefined;
|
|
557
546
|
/**
|
|
558
547
|
* Only supported on `image` models.
|
|
559
548
|
*/
|
|
@@ -561,7 +550,7 @@ export type ParametersT = {
|
|
|
561
550
|
/**
|
|
562
551
|
* Only supported on `image` models.
|
|
563
552
|
*/
|
|
564
|
-
quality?:
|
|
553
|
+
quality?: Quality | undefined;
|
|
565
554
|
/**
|
|
566
555
|
* Only supported on `image` models.
|
|
567
556
|
*/
|
|
@@ -577,19 +566,15 @@ export type ParametersT = {
|
|
|
577
566
|
*
|
|
578
567
|
* Important: when using JSON mode, you must also instruct the model to produce JSON yourself via a system or user message. Without this, the model may generate an unending stream of whitespace until the generation reaches the token limit, resulting in a long-running and seemingly "stuck" request. Also note that the message content may be partially cut off if finish_reason="length", which indicates the generation exceeded max_tokens or the conversation exceeded the max context length.
|
|
579
568
|
*/
|
|
580
|
-
responseFormat?:
|
|
581
|
-
| DeploymentGetConfigResponseFormat2
|
|
582
|
-
| DeploymentGetConfigResponseFormat1
|
|
583
|
-
| null
|
|
584
|
-
| undefined;
|
|
569
|
+
responseFormat?: ResponseFormat2 | ResponseFormat1 | null | undefined;
|
|
585
570
|
/**
|
|
586
571
|
* The version of photoReal to use. Must be v1 or v2. Only available for `leonardoai` provider
|
|
587
572
|
*/
|
|
588
|
-
photoRealVersion?:
|
|
573
|
+
photoRealVersion?: PhotoRealVersion | undefined;
|
|
589
574
|
/**
|
|
590
575
|
* The format to return the embeddings
|
|
591
576
|
*/
|
|
592
|
-
encodingFormat?:
|
|
577
|
+
encodingFormat?: EncodingFormat | undefined;
|
|
593
578
|
};
|
|
594
579
|
|
|
595
580
|
/**
|
|
@@ -1074,11 +1059,11 @@ export namespace FunctionT$ {
|
|
|
1074
1059
|
export type Outbound = FunctionT$Outbound;
|
|
1075
1060
|
}
|
|
1076
1061
|
|
|
1077
|
-
export function
|
|
1062
|
+
export function functionToJSON(functionT: FunctionT): string {
|
|
1078
1063
|
return JSON.stringify(FunctionT$outboundSchema.parse(functionT));
|
|
1079
1064
|
}
|
|
1080
1065
|
|
|
1081
|
-
export function
|
|
1066
|
+
export function functionFromJSON(
|
|
1082
1067
|
jsonString: string,
|
|
1083
1068
|
): SafeParseResult<FunctionT, SDKValidationError> {
|
|
1084
1069
|
return safeParse(
|
|
@@ -2685,45 +2670,41 @@ export function deploymentGetConfigMessagesFromJSON(
|
|
|
2685
2670
|
}
|
|
2686
2671
|
|
|
2687
2672
|
/** @internal */
|
|
2688
|
-
export const
|
|
2689
|
-
|
|
2690
|
-
> = z.nativeEnum(DeploymentGetConfigFormat);
|
|
2673
|
+
export const Format$inboundSchema: z.ZodNativeEnum<typeof Format> = z
|
|
2674
|
+
.nativeEnum(Format);
|
|
2691
2675
|
|
|
2692
2676
|
/** @internal */
|
|
2693
|
-
export const
|
|
2694
|
-
|
|
2695
|
-
> = DeploymentGetConfigFormat$inboundSchema;
|
|
2677
|
+
export const Format$outboundSchema: z.ZodNativeEnum<typeof Format> =
|
|
2678
|
+
Format$inboundSchema;
|
|
2696
2679
|
|
|
2697
2680
|
/**
|
|
2698
2681
|
* @internal
|
|
2699
2682
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2700
2683
|
*/
|
|
2701
|
-
export namespace
|
|
2702
|
-
/** @deprecated use `
|
|
2703
|
-
export const inboundSchema =
|
|
2704
|
-
/** @deprecated use `
|
|
2705
|
-
export const outboundSchema =
|
|
2684
|
+
export namespace Format$ {
|
|
2685
|
+
/** @deprecated use `Format$inboundSchema` instead. */
|
|
2686
|
+
export const inboundSchema = Format$inboundSchema;
|
|
2687
|
+
/** @deprecated use `Format$outboundSchema` instead. */
|
|
2688
|
+
export const outboundSchema = Format$outboundSchema;
|
|
2706
2689
|
}
|
|
2707
2690
|
|
|
2708
2691
|
/** @internal */
|
|
2709
|
-
export const
|
|
2710
|
-
|
|
2711
|
-
> = z.nativeEnum(DeploymentGetConfigQuality);
|
|
2692
|
+
export const Quality$inboundSchema: z.ZodNativeEnum<typeof Quality> = z
|
|
2693
|
+
.nativeEnum(Quality);
|
|
2712
2694
|
|
|
2713
2695
|
/** @internal */
|
|
2714
|
-
export const
|
|
2715
|
-
|
|
2716
|
-
> = DeploymentGetConfigQuality$inboundSchema;
|
|
2696
|
+
export const Quality$outboundSchema: z.ZodNativeEnum<typeof Quality> =
|
|
2697
|
+
Quality$inboundSchema;
|
|
2717
2698
|
|
|
2718
2699
|
/**
|
|
2719
2700
|
* @internal
|
|
2720
2701
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2721
2702
|
*/
|
|
2722
|
-
export namespace
|
|
2723
|
-
/** @deprecated use `
|
|
2724
|
-
export const inboundSchema =
|
|
2725
|
-
/** @deprecated use `
|
|
2726
|
-
export const outboundSchema =
|
|
2703
|
+
export namespace Quality$ {
|
|
2704
|
+
/** @deprecated use `Quality$inboundSchema` instead. */
|
|
2705
|
+
export const inboundSchema = Quality$inboundSchema;
|
|
2706
|
+
/** @deprecated use `Quality$outboundSchema` instead. */
|
|
2707
|
+
export const outboundSchema = Quality$outboundSchema;
|
|
2727
2708
|
}
|
|
2728
2709
|
|
|
2729
2710
|
/** @internal */
|
|
@@ -2751,8 +2732,8 @@ export namespace DeploymentGetConfigResponseFormatType$ {
|
|
|
2751
2732
|
}
|
|
2752
2733
|
|
|
2753
2734
|
/** @internal */
|
|
2754
|
-
export const
|
|
2755
|
-
|
|
2735
|
+
export const ResponseFormat2$inboundSchema: z.ZodType<
|
|
2736
|
+
ResponseFormat2,
|
|
2756
2737
|
z.ZodTypeDef,
|
|
2757
2738
|
unknown
|
|
2758
2739
|
> = z.object({
|
|
@@ -2760,15 +2741,15 @@ export const DeploymentGetConfigResponseFormat2$inboundSchema: z.ZodType<
|
|
|
2760
2741
|
});
|
|
2761
2742
|
|
|
2762
2743
|
/** @internal */
|
|
2763
|
-
export type
|
|
2744
|
+
export type ResponseFormat2$Outbound = {
|
|
2764
2745
|
type: string;
|
|
2765
2746
|
};
|
|
2766
2747
|
|
|
2767
2748
|
/** @internal */
|
|
2768
|
-
export const
|
|
2769
|
-
|
|
2749
|
+
export const ResponseFormat2$outboundSchema: z.ZodType<
|
|
2750
|
+
ResponseFormat2$Outbound,
|
|
2770
2751
|
z.ZodTypeDef,
|
|
2771
|
-
|
|
2752
|
+
ResponseFormat2
|
|
2772
2753
|
> = z.object({
|
|
2773
2754
|
type: DeploymentGetConfigResponseFormatType$outboundSchema,
|
|
2774
2755
|
});
|
|
@@ -2777,143 +2758,116 @@ export const DeploymentGetConfigResponseFormat2$outboundSchema: z.ZodType<
|
|
|
2777
2758
|
* @internal
|
|
2778
2759
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2779
2760
|
*/
|
|
2780
|
-
export namespace
|
|
2781
|
-
/** @deprecated use `
|
|
2782
|
-
export const inboundSchema =
|
|
2783
|
-
/** @deprecated use `
|
|
2784
|
-
export const outboundSchema =
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
export type Outbound = DeploymentGetConfigResponseFormat2$Outbound;
|
|
2761
|
+
export namespace ResponseFormat2$ {
|
|
2762
|
+
/** @deprecated use `ResponseFormat2$inboundSchema` instead. */
|
|
2763
|
+
export const inboundSchema = ResponseFormat2$inboundSchema;
|
|
2764
|
+
/** @deprecated use `ResponseFormat2$outboundSchema` instead. */
|
|
2765
|
+
export const outboundSchema = ResponseFormat2$outboundSchema;
|
|
2766
|
+
/** @deprecated use `ResponseFormat2$Outbound` instead. */
|
|
2767
|
+
export type Outbound = ResponseFormat2$Outbound;
|
|
2788
2768
|
}
|
|
2789
2769
|
|
|
2790
|
-
export function
|
|
2791
|
-
|
|
2770
|
+
export function responseFormat2ToJSON(
|
|
2771
|
+
responseFormat2: ResponseFormat2,
|
|
2792
2772
|
): string {
|
|
2793
|
-
return JSON.stringify(
|
|
2794
|
-
DeploymentGetConfigResponseFormat2$outboundSchema.parse(
|
|
2795
|
-
deploymentGetConfigResponseFormat2,
|
|
2796
|
-
),
|
|
2797
|
-
);
|
|
2773
|
+
return JSON.stringify(ResponseFormat2$outboundSchema.parse(responseFormat2));
|
|
2798
2774
|
}
|
|
2799
2775
|
|
|
2800
|
-
export function
|
|
2776
|
+
export function responseFormat2FromJSON(
|
|
2801
2777
|
jsonString: string,
|
|
2802
|
-
): SafeParseResult<
|
|
2778
|
+
): SafeParseResult<ResponseFormat2, SDKValidationError> {
|
|
2803
2779
|
return safeParse(
|
|
2804
2780
|
jsonString,
|
|
2805
|
-
(x) =>
|
|
2806
|
-
|
|
2807
|
-
`Failed to parse 'DeploymentGetConfigResponseFormat2' from JSON`,
|
|
2781
|
+
(x) => ResponseFormat2$inboundSchema.parse(JSON.parse(x)),
|
|
2782
|
+
`Failed to parse 'ResponseFormat2' from JSON`,
|
|
2808
2783
|
);
|
|
2809
2784
|
}
|
|
2810
2785
|
|
|
2811
2786
|
/** @internal */
|
|
2812
|
-
export const
|
|
2813
|
-
|
|
2814
|
-
|
|
2787
|
+
export const ResponseFormatType$inboundSchema: z.ZodNativeEnum<
|
|
2788
|
+
typeof ResponseFormatType
|
|
2789
|
+
> = z.nativeEnum(ResponseFormatType);
|
|
2815
2790
|
|
|
2816
2791
|
/** @internal */
|
|
2817
|
-
export const
|
|
2818
|
-
|
|
2819
|
-
|
|
2792
|
+
export const ResponseFormatType$outboundSchema: z.ZodNativeEnum<
|
|
2793
|
+
typeof ResponseFormatType
|
|
2794
|
+
> = ResponseFormatType$inboundSchema;
|
|
2820
2795
|
|
|
2821
2796
|
/**
|
|
2822
2797
|
* @internal
|
|
2823
2798
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2824
2799
|
*/
|
|
2825
|
-
export namespace
|
|
2826
|
-
/** @deprecated use `
|
|
2827
|
-
export const inboundSchema =
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
export const outboundSchema =
|
|
2831
|
-
DeploymentGetConfigResponseFormatDeploymentsType$outboundSchema;
|
|
2800
|
+
export namespace ResponseFormatType$ {
|
|
2801
|
+
/** @deprecated use `ResponseFormatType$inboundSchema` instead. */
|
|
2802
|
+
export const inboundSchema = ResponseFormatType$inboundSchema;
|
|
2803
|
+
/** @deprecated use `ResponseFormatType$outboundSchema` instead. */
|
|
2804
|
+
export const outboundSchema = ResponseFormatType$outboundSchema;
|
|
2832
2805
|
}
|
|
2833
2806
|
|
|
2834
2807
|
/** @internal */
|
|
2835
|
-
export const
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
});
|
|
2808
|
+
export const JsonSchema$inboundSchema: z.ZodType<
|
|
2809
|
+
JsonSchema,
|
|
2810
|
+
z.ZodTypeDef,
|
|
2811
|
+
unknown
|
|
2812
|
+
> = z.object({
|
|
2813
|
+
name: z.string(),
|
|
2814
|
+
strict: z.boolean(),
|
|
2815
|
+
schema: z.record(z.any()),
|
|
2816
|
+
});
|
|
2845
2817
|
|
|
2846
2818
|
/** @internal */
|
|
2847
|
-
export type
|
|
2819
|
+
export type JsonSchema$Outbound = {
|
|
2848
2820
|
name: string;
|
|
2849
2821
|
strict: boolean;
|
|
2850
2822
|
schema: { [k: string]: any };
|
|
2851
2823
|
};
|
|
2852
2824
|
|
|
2853
2825
|
/** @internal */
|
|
2854
|
-
export const
|
|
2855
|
-
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
});
|
|
2826
|
+
export const JsonSchema$outboundSchema: z.ZodType<
|
|
2827
|
+
JsonSchema$Outbound,
|
|
2828
|
+
z.ZodTypeDef,
|
|
2829
|
+
JsonSchema
|
|
2830
|
+
> = z.object({
|
|
2831
|
+
name: z.string(),
|
|
2832
|
+
strict: z.boolean(),
|
|
2833
|
+
schema: z.record(z.any()),
|
|
2834
|
+
});
|
|
2864
2835
|
|
|
2865
2836
|
/**
|
|
2866
2837
|
* @internal
|
|
2867
2838
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2868
2839
|
*/
|
|
2869
|
-
export namespace
|
|
2870
|
-
/** @deprecated use `
|
|
2871
|
-
export const inboundSchema =
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
/** @deprecated use `DeploymentGetConfigResponseFormatJsonSchema$Outbound` instead. */
|
|
2877
|
-
export type Outbound = DeploymentGetConfigResponseFormatJsonSchema$Outbound;
|
|
2840
|
+
export namespace JsonSchema$ {
|
|
2841
|
+
/** @deprecated use `JsonSchema$inboundSchema` instead. */
|
|
2842
|
+
export const inboundSchema = JsonSchema$inboundSchema;
|
|
2843
|
+
/** @deprecated use `JsonSchema$outboundSchema` instead. */
|
|
2844
|
+
export const outboundSchema = JsonSchema$outboundSchema;
|
|
2845
|
+
/** @deprecated use `JsonSchema$Outbound` instead. */
|
|
2846
|
+
export type Outbound = JsonSchema$Outbound;
|
|
2878
2847
|
}
|
|
2879
2848
|
|
|
2880
|
-
export function
|
|
2881
|
-
|
|
2882
|
-
DeploymentGetConfigResponseFormatJsonSchema,
|
|
2883
|
-
): string {
|
|
2884
|
-
return JSON.stringify(
|
|
2885
|
-
DeploymentGetConfigResponseFormatJsonSchema$outboundSchema.parse(
|
|
2886
|
-
deploymentGetConfigResponseFormatJsonSchema,
|
|
2887
|
-
),
|
|
2888
|
-
);
|
|
2849
|
+
export function jsonSchemaToJSON(jsonSchema: JsonSchema): string {
|
|
2850
|
+
return JSON.stringify(JsonSchema$outboundSchema.parse(jsonSchema));
|
|
2889
2851
|
}
|
|
2890
2852
|
|
|
2891
|
-
export function
|
|
2853
|
+
export function jsonSchemaFromJSON(
|
|
2892
2854
|
jsonString: string,
|
|
2893
|
-
): SafeParseResult<
|
|
2894
|
-
DeploymentGetConfigResponseFormatJsonSchema,
|
|
2895
|
-
SDKValidationError
|
|
2896
|
-
> {
|
|
2855
|
+
): SafeParseResult<JsonSchema, SDKValidationError> {
|
|
2897
2856
|
return safeParse(
|
|
2898
2857
|
jsonString,
|
|
2899
|
-
(x) =>
|
|
2900
|
-
|
|
2901
|
-
JSON.parse(x),
|
|
2902
|
-
),
|
|
2903
|
-
`Failed to parse 'DeploymentGetConfigResponseFormatJsonSchema' from JSON`,
|
|
2858
|
+
(x) => JsonSchema$inboundSchema.parse(JSON.parse(x)),
|
|
2859
|
+
`Failed to parse 'JsonSchema' from JSON`,
|
|
2904
2860
|
);
|
|
2905
2861
|
}
|
|
2906
2862
|
|
|
2907
2863
|
/** @internal */
|
|
2908
|
-
export const
|
|
2909
|
-
|
|
2864
|
+
export const ResponseFormat1$inboundSchema: z.ZodType<
|
|
2865
|
+
ResponseFormat1,
|
|
2910
2866
|
z.ZodTypeDef,
|
|
2911
2867
|
unknown
|
|
2912
2868
|
> = z.object({
|
|
2913
|
-
type:
|
|
2914
|
-
json_schema: z.lazy(() =>
|
|
2915
|
-
DeploymentGetConfigResponseFormatJsonSchema$inboundSchema
|
|
2916
|
-
),
|
|
2869
|
+
type: ResponseFormatType$inboundSchema,
|
|
2870
|
+
json_schema: z.lazy(() => JsonSchema$inboundSchema),
|
|
2917
2871
|
}).transform((v) => {
|
|
2918
2872
|
return remap$(v, {
|
|
2919
2873
|
"json_schema": "jsonSchema",
|
|
@@ -2921,21 +2875,19 @@ export const DeploymentGetConfigResponseFormat1$inboundSchema: z.ZodType<
|
|
|
2921
2875
|
});
|
|
2922
2876
|
|
|
2923
2877
|
/** @internal */
|
|
2924
|
-
export type
|
|
2878
|
+
export type ResponseFormat1$Outbound = {
|
|
2925
2879
|
type: string;
|
|
2926
|
-
json_schema:
|
|
2880
|
+
json_schema: JsonSchema$Outbound;
|
|
2927
2881
|
};
|
|
2928
2882
|
|
|
2929
2883
|
/** @internal */
|
|
2930
|
-
export const
|
|
2931
|
-
|
|
2884
|
+
export const ResponseFormat1$outboundSchema: z.ZodType<
|
|
2885
|
+
ResponseFormat1$Outbound,
|
|
2932
2886
|
z.ZodTypeDef,
|
|
2933
|
-
|
|
2887
|
+
ResponseFormat1
|
|
2934
2888
|
> = z.object({
|
|
2935
|
-
type:
|
|
2936
|
-
jsonSchema: z.lazy(() =>
|
|
2937
|
-
DeploymentGetConfigResponseFormatJsonSchema$outboundSchema
|
|
2938
|
-
),
|
|
2889
|
+
type: ResponseFormatType$outboundSchema,
|
|
2890
|
+
jsonSchema: z.lazy(() => JsonSchema$outboundSchema),
|
|
2939
2891
|
}).transform((v) => {
|
|
2940
2892
|
return remap$(v, {
|
|
2941
2893
|
jsonSchema: "json_schema",
|
|
@@ -2946,139 +2898,123 @@ export const DeploymentGetConfigResponseFormat1$outboundSchema: z.ZodType<
|
|
|
2946
2898
|
* @internal
|
|
2947
2899
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
2948
2900
|
*/
|
|
2949
|
-
export namespace
|
|
2950
|
-
/** @deprecated use `
|
|
2951
|
-
export const inboundSchema =
|
|
2952
|
-
/** @deprecated use `
|
|
2953
|
-
export const outboundSchema =
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
export type Outbound = DeploymentGetConfigResponseFormat1$Outbound;
|
|
2901
|
+
export namespace ResponseFormat1$ {
|
|
2902
|
+
/** @deprecated use `ResponseFormat1$inboundSchema` instead. */
|
|
2903
|
+
export const inboundSchema = ResponseFormat1$inboundSchema;
|
|
2904
|
+
/** @deprecated use `ResponseFormat1$outboundSchema` instead. */
|
|
2905
|
+
export const outboundSchema = ResponseFormat1$outboundSchema;
|
|
2906
|
+
/** @deprecated use `ResponseFormat1$Outbound` instead. */
|
|
2907
|
+
export type Outbound = ResponseFormat1$Outbound;
|
|
2957
2908
|
}
|
|
2958
2909
|
|
|
2959
|
-
export function
|
|
2960
|
-
|
|
2910
|
+
export function responseFormat1ToJSON(
|
|
2911
|
+
responseFormat1: ResponseFormat1,
|
|
2961
2912
|
): string {
|
|
2962
|
-
return JSON.stringify(
|
|
2963
|
-
DeploymentGetConfigResponseFormat1$outboundSchema.parse(
|
|
2964
|
-
deploymentGetConfigResponseFormat1,
|
|
2965
|
-
),
|
|
2966
|
-
);
|
|
2913
|
+
return JSON.stringify(ResponseFormat1$outboundSchema.parse(responseFormat1));
|
|
2967
2914
|
}
|
|
2968
2915
|
|
|
2969
|
-
export function
|
|
2916
|
+
export function responseFormat1FromJSON(
|
|
2970
2917
|
jsonString: string,
|
|
2971
|
-
): SafeParseResult<
|
|
2918
|
+
): SafeParseResult<ResponseFormat1, SDKValidationError> {
|
|
2972
2919
|
return safeParse(
|
|
2973
2920
|
jsonString,
|
|
2974
|
-
(x) =>
|
|
2975
|
-
|
|
2976
|
-
`Failed to parse 'DeploymentGetConfigResponseFormat1' from JSON`,
|
|
2921
|
+
(x) => ResponseFormat1$inboundSchema.parse(JSON.parse(x)),
|
|
2922
|
+
`Failed to parse 'ResponseFormat1' from JSON`,
|
|
2977
2923
|
);
|
|
2978
2924
|
}
|
|
2979
2925
|
|
|
2980
2926
|
/** @internal */
|
|
2981
|
-
export const
|
|
2982
|
-
|
|
2927
|
+
export const ResponseFormat$inboundSchema: z.ZodType<
|
|
2928
|
+
ResponseFormat,
|
|
2983
2929
|
z.ZodTypeDef,
|
|
2984
2930
|
unknown
|
|
2985
2931
|
> = z.union([
|
|
2986
|
-
z.lazy(() =>
|
|
2987
|
-
z.lazy(() =>
|
|
2932
|
+
z.lazy(() => ResponseFormat2$inboundSchema),
|
|
2933
|
+
z.lazy(() => ResponseFormat1$inboundSchema),
|
|
2988
2934
|
]);
|
|
2989
2935
|
|
|
2990
2936
|
/** @internal */
|
|
2991
|
-
export type
|
|
2992
|
-
|
|
|
2993
|
-
|
|
|
2937
|
+
export type ResponseFormat$Outbound =
|
|
2938
|
+
| ResponseFormat2$Outbound
|
|
2939
|
+
| ResponseFormat1$Outbound;
|
|
2994
2940
|
|
|
2995
2941
|
/** @internal */
|
|
2996
|
-
export const
|
|
2997
|
-
|
|
2942
|
+
export const ResponseFormat$outboundSchema: z.ZodType<
|
|
2943
|
+
ResponseFormat$Outbound,
|
|
2998
2944
|
z.ZodTypeDef,
|
|
2999
|
-
|
|
2945
|
+
ResponseFormat
|
|
3000
2946
|
> = z.union([
|
|
3001
|
-
z.lazy(() =>
|
|
3002
|
-
z.lazy(() =>
|
|
2947
|
+
z.lazy(() => ResponseFormat2$outboundSchema),
|
|
2948
|
+
z.lazy(() => ResponseFormat1$outboundSchema),
|
|
3003
2949
|
]);
|
|
3004
2950
|
|
|
3005
2951
|
/**
|
|
3006
2952
|
* @internal
|
|
3007
2953
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3008
2954
|
*/
|
|
3009
|
-
export namespace
|
|
3010
|
-
/** @deprecated use `
|
|
3011
|
-
export const inboundSchema =
|
|
3012
|
-
/** @deprecated use `
|
|
3013
|
-
export const outboundSchema =
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
export type Outbound = DeploymentGetConfigResponseFormat$Outbound;
|
|
2955
|
+
export namespace ResponseFormat$ {
|
|
2956
|
+
/** @deprecated use `ResponseFormat$inboundSchema` instead. */
|
|
2957
|
+
export const inboundSchema = ResponseFormat$inboundSchema;
|
|
2958
|
+
/** @deprecated use `ResponseFormat$outboundSchema` instead. */
|
|
2959
|
+
export const outboundSchema = ResponseFormat$outboundSchema;
|
|
2960
|
+
/** @deprecated use `ResponseFormat$Outbound` instead. */
|
|
2961
|
+
export type Outbound = ResponseFormat$Outbound;
|
|
3017
2962
|
}
|
|
3018
2963
|
|
|
3019
|
-
export function
|
|
3020
|
-
|
|
3021
|
-
): string {
|
|
3022
|
-
return JSON.stringify(
|
|
3023
|
-
DeploymentGetConfigResponseFormat$outboundSchema.parse(
|
|
3024
|
-
deploymentGetConfigResponseFormat,
|
|
3025
|
-
),
|
|
3026
|
-
);
|
|
2964
|
+
export function responseFormatToJSON(responseFormat: ResponseFormat): string {
|
|
2965
|
+
return JSON.stringify(ResponseFormat$outboundSchema.parse(responseFormat));
|
|
3027
2966
|
}
|
|
3028
2967
|
|
|
3029
|
-
export function
|
|
2968
|
+
export function responseFormatFromJSON(
|
|
3030
2969
|
jsonString: string,
|
|
3031
|
-
): SafeParseResult<
|
|
2970
|
+
): SafeParseResult<ResponseFormat, SDKValidationError> {
|
|
3032
2971
|
return safeParse(
|
|
3033
2972
|
jsonString,
|
|
3034
|
-
(x) =>
|
|
3035
|
-
`Failed to parse '
|
|
2973
|
+
(x) => ResponseFormat$inboundSchema.parse(JSON.parse(x)),
|
|
2974
|
+
`Failed to parse 'ResponseFormat' from JSON`,
|
|
3036
2975
|
);
|
|
3037
2976
|
}
|
|
3038
2977
|
|
|
3039
2978
|
/** @internal */
|
|
3040
|
-
export const
|
|
3041
|
-
typeof
|
|
3042
|
-
> = z.nativeEnum(
|
|
2979
|
+
export const PhotoRealVersion$inboundSchema: z.ZodNativeEnum<
|
|
2980
|
+
typeof PhotoRealVersion
|
|
2981
|
+
> = z.nativeEnum(PhotoRealVersion);
|
|
3043
2982
|
|
|
3044
2983
|
/** @internal */
|
|
3045
|
-
export const
|
|
3046
|
-
|
|
3047
|
-
|
|
2984
|
+
export const PhotoRealVersion$outboundSchema: z.ZodNativeEnum<
|
|
2985
|
+
typeof PhotoRealVersion
|
|
2986
|
+
> = PhotoRealVersion$inboundSchema;
|
|
3048
2987
|
|
|
3049
2988
|
/**
|
|
3050
2989
|
* @internal
|
|
3051
2990
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3052
2991
|
*/
|
|
3053
|
-
export namespace
|
|
3054
|
-
/** @deprecated use `
|
|
3055
|
-
export const inboundSchema =
|
|
3056
|
-
|
|
3057
|
-
|
|
3058
|
-
export const outboundSchema =
|
|
3059
|
-
DeploymentGetConfigPhotoRealVersion$outboundSchema;
|
|
2992
|
+
export namespace PhotoRealVersion$ {
|
|
2993
|
+
/** @deprecated use `PhotoRealVersion$inboundSchema` instead. */
|
|
2994
|
+
export const inboundSchema = PhotoRealVersion$inboundSchema;
|
|
2995
|
+
/** @deprecated use `PhotoRealVersion$outboundSchema` instead. */
|
|
2996
|
+
export const outboundSchema = PhotoRealVersion$outboundSchema;
|
|
3060
2997
|
}
|
|
3061
2998
|
|
|
3062
2999
|
/** @internal */
|
|
3063
|
-
export const
|
|
3064
|
-
typeof
|
|
3065
|
-
> = z.nativeEnum(
|
|
3000
|
+
export const EncodingFormat$inboundSchema: z.ZodNativeEnum<
|
|
3001
|
+
typeof EncodingFormat
|
|
3002
|
+
> = z.nativeEnum(EncodingFormat);
|
|
3066
3003
|
|
|
3067
3004
|
/** @internal */
|
|
3068
|
-
export const
|
|
3069
|
-
typeof
|
|
3070
|
-
> =
|
|
3005
|
+
export const EncodingFormat$outboundSchema: z.ZodNativeEnum<
|
|
3006
|
+
typeof EncodingFormat
|
|
3007
|
+
> = EncodingFormat$inboundSchema;
|
|
3071
3008
|
|
|
3072
3009
|
/**
|
|
3073
3010
|
* @internal
|
|
3074
3011
|
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
3075
3012
|
*/
|
|
3076
|
-
export namespace
|
|
3077
|
-
/** @deprecated use `
|
|
3078
|
-
export const inboundSchema =
|
|
3079
|
-
/** @deprecated use `
|
|
3080
|
-
export const outboundSchema =
|
|
3081
|
-
DeploymentGetConfigEncodingFormat$outboundSchema;
|
|
3013
|
+
export namespace EncodingFormat$ {
|
|
3014
|
+
/** @deprecated use `EncodingFormat$inboundSchema` instead. */
|
|
3015
|
+
export const inboundSchema = EncodingFormat$inboundSchema;
|
|
3016
|
+
/** @deprecated use `EncodingFormat$outboundSchema` instead. */
|
|
3017
|
+
export const outboundSchema = EncodingFormat$outboundSchema;
|
|
3082
3018
|
}
|
|
3083
3019
|
|
|
3084
3020
|
/** @internal */
|
|
@@ -3095,19 +3031,18 @@ export const ParametersT$inboundSchema: z.ZodType<
|
|
|
3095
3031
|
presencePenalty: z.number().optional(),
|
|
3096
3032
|
numImages: z.number().optional(),
|
|
3097
3033
|
seed: z.number().optional(),
|
|
3098
|
-
format:
|
|
3034
|
+
format: Format$inboundSchema.optional(),
|
|
3099
3035
|
dimensions: z.string().optional(),
|
|
3100
|
-
quality:
|
|
3036
|
+
quality: Quality$inboundSchema.optional(),
|
|
3101
3037
|
style: z.string().optional(),
|
|
3102
3038
|
responseFormat: z.nullable(
|
|
3103
3039
|
z.union([
|
|
3104
|
-
z.lazy(() =>
|
|
3105
|
-
z.lazy(() =>
|
|
3040
|
+
z.lazy(() => ResponseFormat2$inboundSchema),
|
|
3041
|
+
z.lazy(() => ResponseFormat1$inboundSchema),
|
|
3106
3042
|
]),
|
|
3107
3043
|
).optional(),
|
|
3108
|
-
photoRealVersion:
|
|
3109
|
-
|
|
3110
|
-
encoding_format: DeploymentGetConfigEncodingFormat$inboundSchema.optional(),
|
|
3044
|
+
photoRealVersion: PhotoRealVersion$inboundSchema.optional(),
|
|
3045
|
+
encoding_format: EncodingFormat$inboundSchema.optional(),
|
|
3111
3046
|
}).transform((v) => {
|
|
3112
3047
|
return remap$(v, {
|
|
3113
3048
|
"encoding_format": "encodingFormat",
|
|
@@ -3129,8 +3064,8 @@ export type ParametersT$Outbound = {
|
|
|
3129
3064
|
quality?: string | undefined;
|
|
3130
3065
|
style?: string | undefined;
|
|
3131
3066
|
responseFormat?:
|
|
3132
|
-
|
|
|
3133
|
-
|
|
|
3067
|
+
| ResponseFormat2$Outbound
|
|
3068
|
+
| ResponseFormat1$Outbound
|
|
3134
3069
|
| null
|
|
3135
3070
|
| undefined;
|
|
3136
3071
|
photoRealVersion?: string | undefined;
|
|
@@ -3151,19 +3086,18 @@ export const ParametersT$outboundSchema: z.ZodType<
|
|
|
3151
3086
|
presencePenalty: z.number().optional(),
|
|
3152
3087
|
numImages: z.number().optional(),
|
|
3153
3088
|
seed: z.number().optional(),
|
|
3154
|
-
format:
|
|
3089
|
+
format: Format$outboundSchema.optional(),
|
|
3155
3090
|
dimensions: z.string().optional(),
|
|
3156
|
-
quality:
|
|
3091
|
+
quality: Quality$outboundSchema.optional(),
|
|
3157
3092
|
style: z.string().optional(),
|
|
3158
3093
|
responseFormat: z.nullable(
|
|
3159
3094
|
z.union([
|
|
3160
|
-
z.lazy(() =>
|
|
3161
|
-
z.lazy(() =>
|
|
3095
|
+
z.lazy(() => ResponseFormat2$outboundSchema),
|
|
3096
|
+
z.lazy(() => ResponseFormat1$outboundSchema),
|
|
3162
3097
|
]),
|
|
3163
3098
|
).optional(),
|
|
3164
|
-
photoRealVersion:
|
|
3165
|
-
|
|
3166
|
-
encodingFormat: DeploymentGetConfigEncodingFormat$outboundSchema.optional(),
|
|
3099
|
+
photoRealVersion: PhotoRealVersion$outboundSchema.optional(),
|
|
3100
|
+
encodingFormat: EncodingFormat$outboundSchema.optional(),
|
|
3167
3101
|
}).transform((v) => {
|
|
3168
3102
|
return remap$(v, {
|
|
3169
3103
|
encodingFormat: "encoding_format",
|
|
@@ -3183,11 +3117,11 @@ export namespace ParametersT$ {
|
|
|
3183
3117
|
export type Outbound = ParametersT$Outbound;
|
|
3184
3118
|
}
|
|
3185
3119
|
|
|
3186
|
-
export function
|
|
3120
|
+
export function parametersToJSON(parametersT: ParametersT): string {
|
|
3187
3121
|
return JSON.stringify(ParametersT$outboundSchema.parse(parametersT));
|
|
3188
3122
|
}
|
|
3189
3123
|
|
|
3190
|
-
export function
|
|
3124
|
+
export function parametersFromJSON(
|
|
3191
3125
|
jsonString: string,
|
|
3192
3126
|
): SafeParseResult<ParametersT, SDKValidationError> {
|
|
3193
3127
|
return safeParse(
|