@orq-ai/node 3.1.6 → 3.2.0-rc.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.
Files changed (165) hide show
  1. package/README.md +0 -38
  2. package/docs/sdks/deployments/README.md +0 -81
  3. package/jsr.json +1 -2
  4. package/lib/config.d.ts +2 -2
  5. package/lib/config.js +2 -2
  6. package/lib/config.js.map +1 -1
  7. package/lib/matchers.d.ts.map +1 -1
  8. package/lib/matchers.js +1 -4
  9. package/lib/matchers.js.map +1 -1
  10. package/models/operations/createcontact.js +2 -2
  11. package/models/operations/fileget.js +2 -2
  12. package/models/operations/filelist.js +2 -2
  13. package/models/operations/fileupload.js +2 -2
  14. package/models/operations/index.d.ts +0 -1
  15. package/models/operations/index.d.ts.map +1 -1
  16. package/models/operations/index.js +0 -1
  17. package/models/operations/index.js.map +1 -1
  18. package/package.json +3 -2
  19. package/sdk/deployments.d.ts +0 -8
  20. package/sdk/deployments.d.ts.map +1 -1
  21. package/sdk/deployments.js +0 -10
  22. package/sdk/deployments.js.map +1 -1
  23. package/src/lib/config.ts +2 -2
  24. package/src/lib/matchers.ts +1 -4
  25. package/src/models/operations/createcontact.ts +2 -2
  26. package/src/models/operations/fileget.ts +2 -2
  27. package/src/models/operations/filelist.ts +2 -2
  28. package/src/models/operations/fileupload.ts +2 -2
  29. package/src/models/operations/index.ts +0 -1
  30. package/src/sdk/deployments.ts +0 -19
  31. package/funcs/deploymentsStream.d.ts +0 -16
  32. package/funcs/deploymentsStream.d.ts.map +0 -1
  33. package/funcs/deploymentsStream.js +0 -126
  34. package/funcs/deploymentsStream.js.map +0 -1
  35. package/lib/event-streams.d.ts +0 -17
  36. package/lib/event-streams.d.ts.map +0 -1
  37. package/lib/event-streams.js +0 -220
  38. package/lib/event-streams.js.map +0 -1
  39. package/models/operations/deploymentstream.d.ts +0 -1622
  40. package/models/operations/deploymentstream.d.ts.map +0 -1
  41. package/models/operations/deploymentstream.js +0 -1571
  42. package/models/operations/deploymentstream.js.map +0 -1
  43. package/packages/orq-rc/FUNCTIONS.md +0 -106
  44. package/packages/orq-rc/README.md +0 -559
  45. package/packages/orq-rc/RUNTIMES.md +0 -48
  46. package/packages/orq-rc/docs/sdks/contacts/README.md +0 -84
  47. package/packages/orq-rc/docs/sdks/deployments/README.md +0 -316
  48. package/packages/orq-rc/docs/sdks/feedback/README.md +0 -92
  49. package/packages/orq-rc/docs/sdks/files/README.md +0 -305
  50. package/packages/orq-rc/docs/sdks/metrics/README.md +0 -86
  51. package/packages/orq-rc/docs/sdks/orq/README.md +0 -10
  52. package/packages/orq-rc/docs/sdks/prompts/README.md +0 -608
  53. package/packages/orq-rc/docs/sdks/promptsnippets/README.md +0 -534
  54. package/packages/orq-rc/docs/sdks/remoteconfig/README.md +0 -80
  55. package/packages/orq-rc/jsr.json +0 -28
  56. package/packages/orq-rc/package-lock.json +0 -1861
  57. package/packages/orq-rc/package.json +0 -31
  58. package/packages/orq-rc/src/core.ts +0 -13
  59. package/packages/orq-rc/src/funcs/contactsCreate.ts +0 -126
  60. package/packages/orq-rc/src/funcs/deploymentsGetConfig.ts +0 -134
  61. package/packages/orq-rc/src/funcs/deploymentsInvoke.ts +0 -142
  62. package/packages/orq-rc/src/funcs/deploymentsList.ts +0 -141
  63. package/packages/orq-rc/src/funcs/deploymentsMetricsCreate.ts +0 -134
  64. package/packages/orq-rc/src/funcs/deploymentsStream.ts +0 -150
  65. package/packages/orq-rc/src/funcs/feedbackCreate.ts +0 -126
  66. package/packages/orq-rc/src/funcs/filesDelete.ts +0 -130
  67. package/packages/orq-rc/src/funcs/filesGet.ts +0 -129
  68. package/packages/orq-rc/src/funcs/filesList.ts +0 -131
  69. package/packages/orq-rc/src/funcs/filesUpload.ts +0 -149
  70. package/packages/orq-rc/src/funcs/promptSnippetsCreate.ts +0 -128
  71. package/packages/orq-rc/src/funcs/promptSnippetsDelete.ts +0 -131
  72. package/packages/orq-rc/src/funcs/promptSnippetsGet.ts +0 -130
  73. package/packages/orq-rc/src/funcs/promptSnippetsGetByKey.ts +0 -132
  74. package/packages/orq-rc/src/funcs/promptSnippetsList.ts +0 -132
  75. package/packages/orq-rc/src/funcs/promptSnippetsUpdate.ts +0 -139
  76. package/packages/orq-rc/src/funcs/promptsCreate.ts +0 -126
  77. package/packages/orq-rc/src/funcs/promptsDelete.ts +0 -130
  78. package/packages/orq-rc/src/funcs/promptsGetVersion.ts +0 -146
  79. package/packages/orq-rc/src/funcs/promptsList.ts +0 -133
  80. package/packages/orq-rc/src/funcs/promptsListVersions.ts +0 -139
  81. package/packages/orq-rc/src/funcs/promptsRetrieve.ts +0 -132
  82. package/packages/orq-rc/src/funcs/promptsUpdate.ts +0 -138
  83. package/packages/orq-rc/src/funcs/remoteconfigGetConfig.ts +0 -127
  84. package/packages/orq-rc/src/hooks/global.ts +0 -44
  85. package/packages/orq-rc/src/hooks/hooks.ts +0 -132
  86. package/packages/orq-rc/src/hooks/index.ts +0 -6
  87. package/packages/orq-rc/src/hooks/registration.ts +0 -15
  88. package/packages/orq-rc/src/hooks/types.ts +0 -109
  89. package/packages/orq-rc/src/index.ts +0 -7
  90. package/packages/orq-rc/src/lib/base64.ts +0 -37
  91. package/packages/orq-rc/src/lib/config.ts +0 -70
  92. package/packages/orq-rc/src/lib/dlv.ts +0 -53
  93. package/packages/orq-rc/src/lib/encodings.ts +0 -483
  94. package/packages/orq-rc/src/lib/env.ts +0 -73
  95. package/packages/orq-rc/src/lib/event-streams.ts +0 -264
  96. package/packages/orq-rc/src/lib/files.ts +0 -40
  97. package/packages/orq-rc/src/lib/http.ts +0 -323
  98. package/packages/orq-rc/src/lib/is-plain-object.ts +0 -43
  99. package/packages/orq-rc/src/lib/logger.ts +0 -9
  100. package/packages/orq-rc/src/lib/matchers.ts +0 -325
  101. package/packages/orq-rc/src/lib/primitives.ts +0 -136
  102. package/packages/orq-rc/src/lib/retries.ts +0 -218
  103. package/packages/orq-rc/src/lib/schemas.ts +0 -91
  104. package/packages/orq-rc/src/lib/sdks.ts +0 -400
  105. package/packages/orq-rc/src/lib/security.ts +0 -254
  106. package/packages/orq-rc/src/lib/url.ts +0 -33
  107. package/packages/orq-rc/src/models/components/deployments.ts +0 -1666
  108. package/packages/orq-rc/src/models/components/index.ts +0 -6
  109. package/packages/orq-rc/src/models/components/security.ts +0 -71
  110. package/packages/orq-rc/src/models/errors/apierror.ts +0 -27
  111. package/packages/orq-rc/src/models/errors/getpromptversion.ts +0 -71
  112. package/packages/orq-rc/src/models/errors/honoapierror.ts +0 -82
  113. package/packages/orq-rc/src/models/errors/httpclienterrors.ts +0 -62
  114. package/packages/orq-rc/src/models/errors/index.ts +0 -11
  115. package/packages/orq-rc/src/models/errors/sdkvalidationerror.ts +0 -97
  116. package/packages/orq-rc/src/models/errors/updateprompt.ts +0 -71
  117. package/packages/orq-rc/src/models/errors/updatepromptsnippet.ts +0 -71
  118. package/packages/orq-rc/src/models/operations/createcontact.ts +0 -256
  119. package/packages/orq-rc/src/models/operations/createfeedback.ts +0 -286
  120. package/packages/orq-rc/src/models/operations/createprompt.ts +0 -3819
  121. package/packages/orq-rc/src/models/operations/createpromptsnippet.ts +0 -6239
  122. package/packages/orq-rc/src/models/operations/deleteprompt.ts +0 -69
  123. package/packages/orq-rc/src/models/operations/deletepromptsnippet.ts +0 -69
  124. package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +0 -1790
  125. package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +0 -3527
  126. package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +0 -1144
  127. package/packages/orq-rc/src/models/operations/deployments.ts +0 -2148
  128. package/packages/orq-rc/src/models/operations/deploymentstream.ts +0 -3062
  129. package/packages/orq-rc/src/models/operations/filedelete.ts +0 -78
  130. package/packages/orq-rc/src/models/operations/fileget.ts +0 -222
  131. package/packages/orq-rc/src/models/operations/filelist.ts +0 -321
  132. package/packages/orq-rc/src/models/operations/fileupload.ts +0 -322
  133. package/packages/orq-rc/src/models/operations/findonebykeypromptsnippet.ts +0 -4483
  134. package/packages/orq-rc/src/models/operations/findonepromptsnippet.ts +0 -4343
  135. package/packages/orq-rc/src/models/operations/getallprompts.ts +0 -2116
  136. package/packages/orq-rc/src/models/operations/getallpromptsnippets.ts +0 -4472
  137. package/packages/orq-rc/src/models/operations/getoneprompt.ts +0 -1982
  138. package/packages/orq-rc/src/models/operations/getpromptversion.ts +0 -2012
  139. package/packages/orq-rc/src/models/operations/index.ts +0 -29
  140. package/packages/orq-rc/src/models/operations/listpromptversions.ts +0 -2146
  141. package/packages/orq-rc/src/models/operations/remoteconfigsgetconfig.ts +0 -190
  142. package/packages/orq-rc/src/models/operations/updateprompt.ts +0 -3917
  143. package/packages/orq-rc/src/models/operations/updatepromptsnippet.ts +0 -6544
  144. package/packages/orq-rc/src/sdk/contacts.ts +0 -27
  145. package/packages/orq-rc/src/sdk/deployments.ts +0 -89
  146. package/packages/orq-rc/src/sdk/feedback.ts +0 -27
  147. package/packages/orq-rc/src/sdk/files.ts +0 -72
  148. package/packages/orq-rc/src/sdk/index.ts +0 -5
  149. package/packages/orq-rc/src/sdk/metrics.ts +0 -27
  150. package/packages/orq-rc/src/sdk/prompts.ts +0 -126
  151. package/packages/orq-rc/src/sdk/promptsnippets.ts +0 -99
  152. package/packages/orq-rc/src/sdk/remoteconfig.ts +0 -24
  153. package/packages/orq-rc/src/sdk/sdk.ts +0 -49
  154. package/packages/orq-rc/src/types/blobs.ts +0 -31
  155. package/packages/orq-rc/src/types/constdatetime.ts +0 -15
  156. package/packages/orq-rc/src/types/enums.ts +0 -16
  157. package/packages/orq-rc/src/types/fp.ts +0 -50
  158. package/packages/orq-rc/src/types/index.ts +0 -11
  159. package/packages/orq-rc/src/types/operations.ts +0 -105
  160. package/packages/orq-rc/src/types/rfcdate.ts +0 -54
  161. package/packages/orq-rc/src/types/streams.ts +0 -21
  162. package/packages/orq-rc/tsconfig.json +0 -41
  163. package/src/funcs/deploymentsStream.ts +0 -151
  164. package/src/lib/event-streams.ts +0 -264
  165. package/src/models/operations/deploymentstream.ts +0 -3062
@@ -1,27 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { contactsCreate } from "../funcs/contactsCreate.js";
6
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
- import * as operations from "../models/operations/index.js";
8
- import { unwrapAsync } from "../types/fp.js";
9
-
10
- export class Contacts extends ClientSDK {
11
- /**
12
- * Update user information
13
- *
14
- * @remarks
15
- * Update or add user information to workspace
16
- */
17
- async create(
18
- request: operations.CreateContactRequestBody,
19
- options?: RequestOptions,
20
- ): Promise<operations.CreateContactResponseBody> {
21
- return unwrapAsync(contactsCreate(
22
- this,
23
- request,
24
- options,
25
- ));
26
- }
27
- }
@@ -1,89 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { deploymentsGetConfig } from "../funcs/deploymentsGetConfig.js";
6
- import { deploymentsInvoke } from "../funcs/deploymentsInvoke.js";
7
- import { deploymentsList } from "../funcs/deploymentsList.js";
8
- import { deploymentsStream } from "../funcs/deploymentsStream.js";
9
- import { EventStream } from "../lib/event-streams.js";
10
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
11
- import * as components from "../models/components/index.js";
12
- import * as operations from "../models/operations/index.js";
13
- import { unwrapAsync } from "../types/fp.js";
14
- import { Metrics } from "./metrics.js";
15
-
16
- export class Deployments extends ClientSDK {
17
- private _metrics?: Metrics;
18
- get metrics(): Metrics {
19
- return (this._metrics ??= new Metrics(this._options));
20
- }
21
-
22
- /**
23
- * List all deployments
24
- *
25
- * @remarks
26
- * Returns a list of your deployments. The deployments are returned sorted by creation date, with the most recent deployments appearing first.
27
- */
28
- async list(
29
- request?: operations.DeploymentsRequest | undefined,
30
- options?: RequestOptions,
31
- ): Promise<operations.DeploymentsResponseBody> {
32
- return unwrapAsync(deploymentsList(
33
- this,
34
- request,
35
- options,
36
- ));
37
- }
38
-
39
- /**
40
- * Get config
41
- *
42
- * @remarks
43
- * Retrieve the deployment configuration
44
- */
45
- async getConfig(
46
- request: operations.DeploymentGetConfigRequestBody,
47
- options?: RequestOptions,
48
- ): Promise<operations.DeploymentGetConfigResponseBody | undefined> {
49
- return unwrapAsync(deploymentsGetConfig(
50
- this,
51
- request,
52
- options,
53
- ));
54
- }
55
-
56
- /**
57
- * Invoke
58
- *
59
- * @remarks
60
- * Invoke a deployment with a given payload
61
- */
62
- async invoke(
63
- request: components.Deployments,
64
- options?: RequestOptions,
65
- ): Promise<operations.DeploymentInvokeResponseBody | undefined> {
66
- return unwrapAsync(deploymentsInvoke(
67
- this,
68
- request,
69
- options,
70
- ));
71
- }
72
-
73
- /**
74
- * Stream
75
- *
76
- * @remarks
77
- * Stream deployment generation. Only supported for completions and chat completions.
78
- */
79
- async stream(
80
- request: operations.DeploymentStreamRequestBody,
81
- options?: RequestOptions,
82
- ): Promise<EventStream<operations.DeploymentStreamResponseBody>> {
83
- return unwrapAsync(deploymentsStream(
84
- this,
85
- request,
86
- options,
87
- ));
88
- }
89
- }
@@ -1,27 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { feedbackCreate } from "../funcs/feedbackCreate.js";
6
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
- import * as operations from "../models/operations/index.js";
8
- import { unwrapAsync } from "../types/fp.js";
9
-
10
- export class Feedback extends ClientSDK {
11
- /**
12
- * Submit feedback
13
- *
14
- * @remarks
15
- * Submit feedback for the LLM transaction via the API
16
- */
17
- async create(
18
- request: operations.CreateFeedbackRequestBody,
19
- options?: RequestOptions,
20
- ): Promise<operations.CreateFeedbackResponseBody> {
21
- return unwrapAsync(feedbackCreate(
22
- this,
23
- request,
24
- options,
25
- ));
26
- }
27
- }
@@ -1,72 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { filesDelete } from "../funcs/filesDelete.js";
6
- import { filesGet } from "../funcs/filesGet.js";
7
- import { filesList } from "../funcs/filesList.js";
8
- import { filesUpload } from "../funcs/filesUpload.js";
9
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
10
- import * as operations from "../models/operations/index.js";
11
- import { unwrapAsync } from "../types/fp.js";
12
-
13
- export class Files extends ClientSDK {
14
- /**
15
- * Upload file
16
- *
17
- * @remarks
18
- * Files are used to upload documents that can be used with features like [Deployments](https://docs.orq.ai/reference/post_v2-deployments-get-config).
19
- */
20
- async upload(
21
- request?: operations.FileUploadRequestBody | undefined,
22
- options?: RequestOptions,
23
- ): Promise<operations.FileUploadResponseBody> {
24
- return unwrapAsync(filesUpload(
25
- this,
26
- request,
27
- options,
28
- ));
29
- }
30
-
31
- /**
32
- * List all files
33
- */
34
- async list(
35
- request?: operations.FileListRequest | undefined,
36
- options?: RequestOptions,
37
- ): Promise<operations.FileListResponseBody> {
38
- return unwrapAsync(filesList(
39
- this,
40
- request,
41
- options,
42
- ));
43
- }
44
-
45
- /**
46
- * Get file by ID
47
- */
48
- async get(
49
- request: operations.FileGetRequest,
50
- options?: RequestOptions,
51
- ): Promise<operations.FileGetResponseBody> {
52
- return unwrapAsync(filesGet(
53
- this,
54
- request,
55
- options,
56
- ));
57
- }
58
-
59
- /**
60
- * Delete file
61
- */
62
- async delete(
63
- request: operations.FileDeleteRequest,
64
- options?: RequestOptions,
65
- ): Promise<void> {
66
- return unwrapAsync(filesDelete(
67
- this,
68
- request,
69
- options,
70
- ));
71
- }
72
- }
@@ -1,5 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- export * from "./sdk.js";
@@ -1,27 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { deploymentsMetricsCreate } from "../funcs/deploymentsMetricsCreate.js";
6
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
- import * as operations from "../models/operations/index.js";
8
- import { unwrapAsync } from "../types/fp.js";
9
-
10
- export class Metrics extends ClientSDK {
11
- /**
12
- * Add metrics
13
- *
14
- * @remarks
15
- * Add metrics to a deployment
16
- */
17
- async create(
18
- request: operations.DeploymentCreateMetricRequest,
19
- options?: RequestOptions,
20
- ): Promise<operations.DeploymentCreateMetricResponseBody> {
21
- return unwrapAsync(deploymentsMetricsCreate(
22
- this,
23
- request,
24
- options,
25
- ));
26
- }
27
- }
@@ -1,126 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { promptsCreate } from "../funcs/promptsCreate.js";
6
- import { promptsDelete } from "../funcs/promptsDelete.js";
7
- import { promptsGetVersion } from "../funcs/promptsGetVersion.js";
8
- import { promptsList } from "../funcs/promptsList.js";
9
- import { promptsListVersions } from "../funcs/promptsListVersions.js";
10
- import { promptsRetrieve } from "../funcs/promptsRetrieve.js";
11
- import { promptsUpdate } from "../funcs/promptsUpdate.js";
12
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
13
- import * as operations from "../models/operations/index.js";
14
- import { unwrapAsync } from "../types/fp.js";
15
-
16
- export class Prompts extends ClientSDK {
17
- /**
18
- * List all prompts
19
- *
20
- * @remarks
21
- * Returns a list of your prompts. The prompts are returned sorted by creation date, with the most recent prompts appearing first
22
- */
23
- async list(
24
- request?: operations.GetAllPromptsRequest | undefined,
25
- options?: RequestOptions,
26
- ): Promise<operations.GetAllPromptsResponseBody> {
27
- return unwrapAsync(promptsList(
28
- this,
29
- request,
30
- options,
31
- ));
32
- }
33
-
34
- /**
35
- * Create a prompt
36
- */
37
- async create(
38
- request?: operations.CreatePromptRequestBody | undefined,
39
- options?: RequestOptions,
40
- ): Promise<operations.CreatePromptResponseBody> {
41
- return unwrapAsync(promptsCreate(
42
- this,
43
- request,
44
- options,
45
- ));
46
- }
47
-
48
- /**
49
- * Retrieve a prompt
50
- *
51
- * @remarks
52
- * Retrieves a prompt object
53
- */
54
- async retrieve(
55
- request: operations.GetOnePromptRequest,
56
- options?: RequestOptions,
57
- ): Promise<operations.GetOnePromptResponseBody> {
58
- return unwrapAsync(promptsRetrieve(
59
- this,
60
- request,
61
- options,
62
- ));
63
- }
64
-
65
- /**
66
- * Update a prompt
67
- */
68
- async update(
69
- request: operations.UpdatePromptRequest,
70
- options?: RequestOptions,
71
- ): Promise<operations.UpdatePromptResponseBody> {
72
- return unwrapAsync(promptsUpdate(
73
- this,
74
- request,
75
- options,
76
- ));
77
- }
78
-
79
- /**
80
- * Delete a prompt
81
- */
82
- async delete(
83
- request: operations.DeletePromptRequest,
84
- options?: RequestOptions,
85
- ): Promise<void> {
86
- return unwrapAsync(promptsDelete(
87
- this,
88
- request,
89
- options,
90
- ));
91
- }
92
-
93
- /**
94
- * List all prompt versions
95
- *
96
- * @remarks
97
- * Returns a list of your prompt versions. The prompt versions are returned sorted by creation date, with the most recent prompt versions appearing first
98
- */
99
- async listVersions(
100
- request: operations.ListPromptVersionsRequest,
101
- options?: RequestOptions,
102
- ): Promise<operations.ListPromptVersionsResponseBody> {
103
- return unwrapAsync(promptsListVersions(
104
- this,
105
- request,
106
- options,
107
- ));
108
- }
109
-
110
- /**
111
- * Retrieve a prompt version
112
- *
113
- * @remarks
114
- * Retrieves a specific version of a prompt by its ID and version ID.
115
- */
116
- async getVersion(
117
- request: operations.GetPromptVersionRequest,
118
- options?: RequestOptions,
119
- ): Promise<operations.GetPromptVersionResponseBody> {
120
- return unwrapAsync(promptsGetVersion(
121
- this,
122
- request,
123
- options,
124
- ));
125
- }
126
- }
@@ -1,99 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { promptSnippetsCreate } from "../funcs/promptSnippetsCreate.js";
6
- import { promptSnippetsDelete } from "../funcs/promptSnippetsDelete.js";
7
- import { promptSnippetsGet } from "../funcs/promptSnippetsGet.js";
8
- import { promptSnippetsGetByKey } from "../funcs/promptSnippetsGetByKey.js";
9
- import { promptSnippetsList } from "../funcs/promptSnippetsList.js";
10
- import { promptSnippetsUpdate } from "../funcs/promptSnippetsUpdate.js";
11
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
12
- import * as operations from "../models/operations/index.js";
13
- import { unwrapAsync } from "../types/fp.js";
14
-
15
- export class PromptSnippets extends ClientSDK {
16
- /**
17
- * List all prompts snippets
18
- */
19
- async list(
20
- request?: operations.GetAllPromptSnippetsRequest | undefined,
21
- options?: RequestOptions,
22
- ): Promise<operations.GetAllPromptSnippetsResponseBody> {
23
- return unwrapAsync(promptSnippetsList(
24
- this,
25
- request,
26
- options,
27
- ));
28
- }
29
-
30
- /**
31
- * Create a prompt snippet
32
- */
33
- async create(
34
- request?: operations.CreatePromptSnippetRequestBody | undefined,
35
- options?: RequestOptions,
36
- ): Promise<operations.CreatePromptSnippetResponseBody> {
37
- return unwrapAsync(promptSnippetsCreate(
38
- this,
39
- request,
40
- options,
41
- ));
42
- }
43
-
44
- /**
45
- * Update a prompt snippet
46
- */
47
- async update(
48
- request: operations.UpdatePromptSnippetRequest,
49
- options?: RequestOptions,
50
- ): Promise<operations.UpdatePromptSnippetResponseBody> {
51
- return unwrapAsync(promptSnippetsUpdate(
52
- this,
53
- request,
54
- options,
55
- ));
56
- }
57
-
58
- /**
59
- * Delete a prompt snippet
60
- */
61
- async delete(
62
- request: operations.DeletePromptSnippetRequest,
63
- options?: RequestOptions,
64
- ): Promise<void> {
65
- return unwrapAsync(promptSnippetsDelete(
66
- this,
67
- request,
68
- options,
69
- ));
70
- }
71
-
72
- /**
73
- * Retrieve a prompt snippet
74
- */
75
- async get(
76
- request: operations.FindOnePromptSnippetRequest,
77
- options?: RequestOptions,
78
- ): Promise<operations.FindOnePromptSnippetResponseBody> {
79
- return unwrapAsync(promptSnippetsGet(
80
- this,
81
- request,
82
- options,
83
- ));
84
- }
85
-
86
- /**
87
- * Retrieve a prompt snippet by key
88
- */
89
- async getByKey(
90
- request: operations.FindOneByKeyPromptSnippetRequest,
91
- options?: RequestOptions,
92
- ): Promise<operations.FindOneByKeyPromptSnippetResponseBody> {
93
- return unwrapAsync(promptSnippetsGetByKey(
94
- this,
95
- request,
96
- options,
97
- ));
98
- }
99
- }
@@ -1,24 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { remoteconfigGetConfig } from "../funcs/remoteconfigGetConfig.js";
6
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
- import * as operations from "../models/operations/index.js";
8
- import { unwrapAsync } from "../types/fp.js";
9
-
10
- export class Remoteconfig extends ClientSDK {
11
- /**
12
- * Get Configurations
13
- */
14
- async getConfig(
15
- request?: operations.RemoteConfigsGetConfigRequestBody | undefined,
16
- options?: RequestOptions,
17
- ): Promise<operations.RemoteConfigsGetConfigResponseBody> {
18
- return unwrapAsync(remoteconfigGetConfig(
19
- this,
20
- request,
21
- options,
22
- ));
23
- }
24
- }
@@ -1,49 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { ClientSDK } from "../lib/sdks.js";
6
- import { Contacts } from "./contacts.js";
7
- import { Deployments } from "./deployments.js";
8
- import { Feedback } from "./feedback.js";
9
- import { Files } from "./files.js";
10
- import { Prompts } from "./prompts.js";
11
- import { PromptSnippets } from "./promptsnippets.js";
12
- import { Remoteconfig } from "./remoteconfig.js";
13
-
14
- export class Orq extends ClientSDK {
15
- private _contacts?: Contacts;
16
- get contacts(): Contacts {
17
- return (this._contacts ??= new Contacts(this._options));
18
- }
19
-
20
- private _feedback?: Feedback;
21
- get feedback(): Feedback {
22
- return (this._feedback ??= new Feedback(this._options));
23
- }
24
-
25
- private _deployments?: Deployments;
26
- get deployments(): Deployments {
27
- return (this._deployments ??= new Deployments(this._options));
28
- }
29
-
30
- private _files?: Files;
31
- get files(): Files {
32
- return (this._files ??= new Files(this._options));
33
- }
34
-
35
- private _promptSnippets?: PromptSnippets;
36
- get promptSnippets(): PromptSnippets {
37
- return (this._promptSnippets ??= new PromptSnippets(this._options));
38
- }
39
-
40
- private _prompts?: Prompts;
41
- get prompts(): Prompts {
42
- return (this._prompts ??= new Prompts(this._options));
43
- }
44
-
45
- private _remoteconfig?: Remoteconfig;
46
- get remoteconfig(): Remoteconfig {
47
- return (this._remoteconfig ??= new Remoteconfig(this._options));
48
- }
49
- }
@@ -1,31 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
-
7
- export const blobLikeSchema: z.ZodType<Blob, z.ZodTypeDef, Blob> =
8
- z.custom<Blob>(isBlobLike, {
9
- message: "expected a Blob, File or Blob-like object",
10
- fatal: true,
11
- });
12
-
13
- export function isBlobLike(val: unknown): val is Blob {
14
- if (val instanceof Blob) {
15
- return true;
16
- }
17
-
18
- if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
19
- return false;
20
- }
21
-
22
- const name = val[Symbol.toStringTag];
23
- if (typeof name !== "string") {
24
- return false;
25
- }
26
- if (name !== "Blob" && name !== "File") {
27
- return false;
28
- }
29
-
30
- return "stream" in val && typeof val.stream === "function";
31
- }
@@ -1,15 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import * as z from "zod";
6
-
7
- export function constDateTime(
8
- val: string,
9
- ): z.ZodType<string, z.ZodTypeDef, unknown> {
10
- return z.custom<string>((v) => {
11
- return (
12
- typeof v === "string" && new Date(v).getTime() === new Date(val).getTime()
13
- );
14
- }, `Value must be equivelant to ${val}`);
15
- }
@@ -1,16 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- declare const __brand: unique symbol;
6
- export type Unrecognized<T> = T & { [__brand]: "unrecognized" };
7
-
8
- export function catchUnrecognizedEnum<T>(value: T): Unrecognized<T> {
9
- return value as Unrecognized<T>;
10
- }
11
-
12
- type Prettify<T> = { [K in keyof T]: T[K] } & {};
13
- export type ClosedEnum<T> = T[keyof T];
14
- export type OpenEnum<T> =
15
- | Prettify<T[keyof T]>
16
- | Unrecognized<T[keyof T] extends number ? number : string>;
@@ -1,50 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- /**
6
- * A monad that captures the result of a function call or an error if it was not
7
- * successful. Railway programming, enabled by this type, can be a nicer
8
- * alternative to traditional exception throwing because it allows functions to
9
- * declare all _known_ errors with static types and then check for them
10
- * exhaustively in application code. Thrown exception have a type of `unknown`
11
- * and break out of regular control flow of programs making them harder to
12
- * inspect and more verbose work with due to try-catch blocks.
13
- */
14
- export type Result<T, E = unknown> =
15
- | { ok: true; value: T; error?: never }
16
- | { ok: false; value?: never; error: E };
17
-
18
- export function OK<V>(value: V): Result<V, never> {
19
- return { ok: true, value };
20
- }
21
-
22
- export function ERR<E>(error: E): Result<never, E> {
23
- return { ok: false, error };
24
- }
25
-
26
- /**
27
- * unwrap is a convenience function for extracting a value from a result or
28
- * throwing if there was an error.
29
- */
30
- export function unwrap<T>(r: Result<T, unknown>): T {
31
- if (!r.ok) {
32
- throw r.error;
33
- }
34
- return r.value;
35
- }
36
-
37
- /**
38
- * unwrapAsync is a convenience function for resolving a value from a Promise
39
- * of a result or rejecting if an error occurred.
40
- */
41
- export async function unwrapAsync<T>(
42
- pr: Promise<Result<T, unknown>>,
43
- ): Promise<T> {
44
- const r = await pr;
45
- if (!r.ok) {
46
- throw r.error;
47
- }
48
-
49
- return r.value;
50
- }
@@ -1,11 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- export { blobLikeSchema, isBlobLike } from "./blobs.js";
6
- export { catchUnrecognizedEnum } from "./enums.js";
7
- export type { ClosedEnum, OpenEnum, Unrecognized } from "./enums.js";
8
- export type { Result } from "./fp.js";
9
- export type { PageIterator, Paginator } from "./operations.js";
10
- export { createPageIterator } from "./operations.js";
11
- export { RFCDate } from "./rfcdate.js";