openlayer 0.0.0 → 0.0.1-alpha.1

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 (257) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +412 -0
  3. package/_shims/MultipartBody.d.ts +9 -0
  4. package/_shims/MultipartBody.d.ts.map +1 -0
  5. package/_shims/MultipartBody.js +16 -0
  6. package/_shims/MultipartBody.js.map +1 -0
  7. package/_shims/MultipartBody.mjs +12 -0
  8. package/_shims/MultipartBody.mjs.map +1 -0
  9. package/_shims/README.md +46 -0
  10. package/_shims/auto/runtime-bun.d.ts +5 -0
  11. package/_shims/auto/runtime-bun.d.ts.map +1 -0
  12. package/_shims/auto/runtime-bun.js +21 -0
  13. package/_shims/auto/runtime-bun.js.map +1 -0
  14. package/_shims/auto/runtime-bun.mjs +2 -0
  15. package/_shims/auto/runtime-bun.mjs.map +1 -0
  16. package/_shims/auto/runtime-node.d.ts +5 -0
  17. package/_shims/auto/runtime-node.d.ts.map +1 -0
  18. package/_shims/auto/runtime-node.js +21 -0
  19. package/_shims/auto/runtime-node.js.map +1 -0
  20. package/_shims/auto/runtime-node.mjs +2 -0
  21. package/_shims/auto/runtime-node.mjs.map +1 -0
  22. package/_shims/auto/runtime.d.ts +5 -0
  23. package/_shims/auto/runtime.d.ts.map +1 -0
  24. package/_shims/auto/runtime.js +21 -0
  25. package/_shims/auto/runtime.js.map +1 -0
  26. package/_shims/auto/runtime.mjs +2 -0
  27. package/_shims/auto/runtime.mjs.map +1 -0
  28. package/_shims/auto/types-node.d.ts +5 -0
  29. package/_shims/auto/types-node.d.ts.map +1 -0
  30. package/_shims/auto/types-node.js +21 -0
  31. package/_shims/auto/types-node.js.map +1 -0
  32. package/_shims/auto/types-node.mjs +2 -0
  33. package/_shims/auto/types-node.mjs.map +1 -0
  34. package/_shims/auto/types.d.ts +101 -0
  35. package/_shims/auto/types.js +3 -0
  36. package/_shims/auto/types.mjs +3 -0
  37. package/_shims/bun-runtime.d.ts +6 -0
  38. package/_shims/bun-runtime.d.ts.map +1 -0
  39. package/_shims/bun-runtime.js +14 -0
  40. package/_shims/bun-runtime.js.map +1 -0
  41. package/_shims/bun-runtime.mjs +10 -0
  42. package/_shims/bun-runtime.mjs.map +1 -0
  43. package/_shims/index.d.ts +81 -0
  44. package/_shims/index.js +13 -0
  45. package/_shims/index.mjs +7 -0
  46. package/_shims/manual-types.d.ts +12 -0
  47. package/_shims/manual-types.js +3 -0
  48. package/_shims/manual-types.mjs +3 -0
  49. package/_shims/node-runtime.d.ts +3 -0
  50. package/_shims/node-runtime.d.ts.map +1 -0
  51. package/_shims/node-runtime.js +90 -0
  52. package/_shims/node-runtime.js.map +1 -0
  53. package/_shims/node-runtime.mjs +56 -0
  54. package/_shims/node-runtime.mjs.map +1 -0
  55. package/_shims/node-types.d.ts +42 -0
  56. package/_shims/node-types.js +3 -0
  57. package/_shims/node-types.mjs +3 -0
  58. package/_shims/registry.d.ts +37 -0
  59. package/_shims/registry.d.ts.map +1 -0
  60. package/_shims/registry.js +41 -0
  61. package/_shims/registry.js.map +1 -0
  62. package/_shims/registry.mjs +37 -0
  63. package/_shims/registry.mjs.map +1 -0
  64. package/_shims/web-runtime.d.ts +5 -0
  65. package/_shims/web-runtime.d.ts.map +1 -0
  66. package/_shims/web-runtime.js +78 -0
  67. package/_shims/web-runtime.js.map +1 -0
  68. package/_shims/web-runtime.mjs +71 -0
  69. package/_shims/web-runtime.mjs.map +1 -0
  70. package/_shims/web-types.d.ts +83 -0
  71. package/_shims/web-types.js +3 -0
  72. package/_shims/web-types.mjs +3 -0
  73. package/core.d.ts +237 -0
  74. package/core.d.ts.map +1 -0
  75. package/core.js +868 -0
  76. package/core.js.map +1 -0
  77. package/core.mjs +837 -0
  78. package/core.mjs.map +1 -0
  79. package/error.d.ts +53 -0
  80. package/error.d.ts.map +1 -0
  81. package/error.js +143 -0
  82. package/error.js.map +1 -0
  83. package/error.mjs +127 -0
  84. package/error.mjs.map +1 -0
  85. package/index.d.mts +114 -0
  86. package/index.d.ts +114 -0
  87. package/index.d.ts.map +1 -0
  88. package/index.js +119 -0
  89. package/index.js.map +1 -0
  90. package/index.mjs +91 -0
  91. package/index.mjs.map +1 -0
  92. package/lib/core/cli.d.ts +21 -0
  93. package/lib/core/cli.d.ts.map +1 -0
  94. package/lib/core/cli.js +90 -0
  95. package/lib/core/cli.js.map +1 -0
  96. package/lib/core/cli.mjs +65 -0
  97. package/lib/core/cli.mjs.map +1 -0
  98. package/lib/core/openai-monitor.d.ts +54 -0
  99. package/lib/core/openai-monitor.d.ts.map +1 -0
  100. package/lib/core/openai-monitor.js +376 -0
  101. package/lib/core/openai-monitor.js.map +1 -0
  102. package/lib/core/openai-monitor.mjs +371 -0
  103. package/lib/core/openai-monitor.mjs.map +1 -0
  104. package/package.json +102 -6
  105. package/resource.d.ts +6 -0
  106. package/resource.d.ts.map +1 -0
  107. package/resource.js +11 -0
  108. package/resource.js.map +1 -0
  109. package/resource.mjs +7 -0
  110. package/resource.mjs.map +1 -0
  111. package/resources/commits/commits.d.ts +11 -0
  112. package/resources/commits/commits.d.ts.map +1 -0
  113. package/resources/commits/commits.js +40 -0
  114. package/resources/commits/commits.js.map +1 -0
  115. package/resources/commits/commits.mjs +13 -0
  116. package/resources/commits/commits.mjs.map +1 -0
  117. package/resources/commits/index.d.ts +3 -0
  118. package/resources/commits/index.d.ts.map +1 -0
  119. package/resources/commits/index.js +9 -0
  120. package/resources/commits/index.js.map +1 -0
  121. package/resources/commits/index.mjs +4 -0
  122. package/resources/commits/index.mjs.map +1 -0
  123. package/resources/commits/test-results.d.ts +217 -0
  124. package/resources/commits/test-results.d.ts.map +1 -0
  125. package/resources/commits/test-results.js +18 -0
  126. package/resources/commits/test-results.js.map +1 -0
  127. package/resources/commits/test-results.mjs +14 -0
  128. package/resources/commits/test-results.mjs.map +1 -0
  129. package/resources/index.d.ts +4 -0
  130. package/resources/index.d.ts.map +1 -0
  131. package/resources/index.js +11 -0
  132. package/resources/index.js.map +1 -0
  133. package/resources/index.mjs +5 -0
  134. package/resources/index.mjs.map +1 -0
  135. package/resources/inference-pipelines/data.d.ts +228 -0
  136. package/resources/inference-pipelines/data.d.ts.map +1 -0
  137. package/resources/inference-pipelines/data.js +17 -0
  138. package/resources/inference-pipelines/data.js.map +1 -0
  139. package/resources/inference-pipelines/data.mjs +13 -0
  140. package/resources/inference-pipelines/data.mjs.map +1 -0
  141. package/resources/inference-pipelines/index.d.ts +4 -0
  142. package/resources/inference-pipelines/index.d.ts.map +1 -0
  143. package/resources/inference-pipelines/index.js +11 -0
  144. package/resources/inference-pipelines/index.js.map +1 -0
  145. package/resources/inference-pipelines/index.mjs +5 -0
  146. package/resources/inference-pipelines/index.mjs.map +1 -0
  147. package/resources/inference-pipelines/inference-pipelines.d.ts +16 -0
  148. package/resources/inference-pipelines/inference-pipelines.d.ts.map +1 -0
  149. package/resources/inference-pipelines/inference-pipelines.js +43 -0
  150. package/resources/inference-pipelines/inference-pipelines.js.map +1 -0
  151. package/resources/inference-pipelines/inference-pipelines.mjs +16 -0
  152. package/resources/inference-pipelines/inference-pipelines.mjs.map +1 -0
  153. package/resources/inference-pipelines/test-results.d.ts +217 -0
  154. package/resources/inference-pipelines/test-results.d.ts.map +1 -0
  155. package/resources/inference-pipelines/test-results.js +18 -0
  156. package/resources/inference-pipelines/test-results.js.map +1 -0
  157. package/resources/inference-pipelines/test-results.mjs +14 -0
  158. package/resources/inference-pipelines/test-results.mjs.map +1 -0
  159. package/resources/projects/commits.d.ts +171 -0
  160. package/resources/projects/commits.d.ts.map +1 -0
  161. package/resources/projects/commits.js +18 -0
  162. package/resources/projects/commits.js.map +1 -0
  163. package/resources/projects/commits.mjs +14 -0
  164. package/resources/projects/commits.mjs.map +1 -0
  165. package/resources/projects/index.d.ts +4 -0
  166. package/resources/projects/index.d.ts.map +1 -0
  167. package/resources/projects/index.js +11 -0
  168. package/resources/projects/index.js.map +1 -0
  169. package/resources/projects/index.mjs +5 -0
  170. package/resources/projects/index.mjs.map +1 -0
  171. package/resources/projects/inference-pipelines.d.ts +121 -0
  172. package/resources/projects/inference-pipelines.d.ts.map +1 -0
  173. package/resources/projects/inference-pipelines.js +18 -0
  174. package/resources/projects/inference-pipelines.js.map +1 -0
  175. package/resources/projects/inference-pipelines.mjs +14 -0
  176. package/resources/projects/inference-pipelines.mjs.map +1 -0
  177. package/resources/projects/projects.d.ts +172 -0
  178. package/resources/projects/projects.d.ts.map +1 -0
  179. package/resources/projects/projects.js +50 -0
  180. package/resources/projects/projects.js.map +1 -0
  181. package/resources/projects/projects.mjs +23 -0
  182. package/resources/projects/projects.mjs.map +1 -0
  183. package/shims/node.d.ts +29 -0
  184. package/shims/node.d.ts.map +1 -0
  185. package/shims/node.js +31 -0
  186. package/shims/node.js.map +1 -0
  187. package/shims/node.mjs +5 -0
  188. package/shims/node.mjs.map +1 -0
  189. package/shims/web.d.ts +26 -0
  190. package/shims/web.d.ts.map +1 -0
  191. package/shims/web.js +31 -0
  192. package/shims/web.js.map +1 -0
  193. package/shims/web.mjs +5 -0
  194. package/shims/web.mjs.map +1 -0
  195. package/src/_shims/MultipartBody.ts +9 -0
  196. package/src/_shims/README.md +46 -0
  197. package/src/_shims/auto/runtime-bun.ts +4 -0
  198. package/src/_shims/auto/runtime-node.ts +4 -0
  199. package/src/_shims/auto/runtime.ts +4 -0
  200. package/src/_shims/auto/types-node.ts +4 -0
  201. package/src/_shims/auto/types.d.ts +101 -0
  202. package/src/_shims/auto/types.js +3 -0
  203. package/src/_shims/auto/types.mjs +3 -0
  204. package/src/_shims/bun-runtime.ts +14 -0
  205. package/src/_shims/index.d.ts +81 -0
  206. package/src/_shims/index.js +13 -0
  207. package/src/_shims/index.mjs +7 -0
  208. package/src/_shims/manual-types.d.ts +12 -0
  209. package/src/_shims/manual-types.js +3 -0
  210. package/src/_shims/manual-types.mjs +3 -0
  211. package/src/_shims/node-runtime.ts +83 -0
  212. package/src/_shims/node-types.d.ts +42 -0
  213. package/src/_shims/node-types.js +3 -0
  214. package/src/_shims/node-types.mjs +3 -0
  215. package/src/_shims/registry.ts +67 -0
  216. package/src/_shims/web-runtime.ts +103 -0
  217. package/src/_shims/web-types.d.ts +83 -0
  218. package/src/_shims/web-types.js +3 -0
  219. package/src/_shims/web-types.mjs +3 -0
  220. package/src/core.ts +1146 -0
  221. package/src/error.ts +146 -0
  222. package/src/index.ts +199 -0
  223. package/src/lib/.keep +4 -0
  224. package/src/lib/core/cli.ts +96 -0
  225. package/src/lib/core/index.d.ts +2 -0
  226. package/src/lib/core/openai-monitor.ts +470 -0
  227. package/src/lib/index.d.ts +1 -0
  228. package/src/resource.ts +11 -0
  229. package/src/resources/commits/commits.ts +14 -0
  230. package/src/resources/commits/index.ts +4 -0
  231. package/src/resources/commits/test-results.ts +284 -0
  232. package/src/resources/index.ts +5 -0
  233. package/src/resources/inference-pipelines/data.ts +285 -0
  234. package/src/resources/inference-pipelines/index.ts +5 -0
  235. package/src/resources/inference-pipelines/inference-pipelines.ts +19 -0
  236. package/src/resources/inference-pipelines/test-results.ts +284 -0
  237. package/src/resources/projects/commits.ts +226 -0
  238. package/src/resources/projects/index.ts +9 -0
  239. package/src/resources/projects/inference-pipelines.ts +165 -0
  240. package/src/resources/projects/projects.ts +232 -0
  241. package/src/shims/node.ts +50 -0
  242. package/src/shims/web.ts +50 -0
  243. package/src/tsconfig.json +11 -0
  244. package/src/uploads.ts +248 -0
  245. package/src/version.ts +1 -0
  246. package/uploads.d.ts +75 -0
  247. package/uploads.d.ts.map +1 -0
  248. package/uploads.js +165 -0
  249. package/uploads.js.map +1 -0
  250. package/uploads.mjs +152 -0
  251. package/uploads.mjs.map +1 -0
  252. package/version.d.ts +2 -0
  253. package/version.d.ts.map +1 -0
  254. package/version.js +5 -0
  255. package/version.js.map +1 -0
  256. package/version.mjs +2 -0
  257. package/version.mjs.map +1 -0
@@ -0,0 +1,121 @@
1
+ import * as Core from "../../core.js";
2
+ import { APIResource } from "../../resource.js";
3
+ import * as InferencePipelinesAPI from "./inference-pipelines.js";
4
+ export declare class InferencePipelines extends APIResource {
5
+ /**
6
+ * List the inference pipelines in a project.
7
+ */
8
+ list(id: string, query?: InferencePipelineListParams, options?: Core.RequestOptions): Core.APIPromise<InferencePipelineListResponse>;
9
+ list(id: string, options?: Core.RequestOptions): Core.APIPromise<InferencePipelineListResponse>;
10
+ }
11
+ export interface InferencePipelineListResponse {
12
+ _meta: InferencePipelineListResponse._Meta;
13
+ items: Array<InferencePipelineListResponse.Item>;
14
+ }
15
+ export declare namespace InferencePipelineListResponse {
16
+ interface _Meta {
17
+ /**
18
+ * The current page.
19
+ */
20
+ page: number;
21
+ /**
22
+ * The number of items per page.
23
+ */
24
+ perPage: number;
25
+ /**
26
+ * The total number of items.
27
+ */
28
+ totalItems: number;
29
+ /**
30
+ * The total number of pages.
31
+ */
32
+ totalPages: number;
33
+ }
34
+ interface Item {
35
+ /**
36
+ * The inference pipeline id.
37
+ */
38
+ id: string;
39
+ /**
40
+ * The creation date.
41
+ */
42
+ dateCreated: string;
43
+ /**
44
+ * The last test evaluation date.
45
+ */
46
+ dateLastEvaluated: string | null;
47
+ /**
48
+ * The last data sample received date.
49
+ */
50
+ dateLastSampleReceived: string | null;
51
+ /**
52
+ * The next test evaluation date.
53
+ */
54
+ dateOfNextEvaluation: string | null;
55
+ /**
56
+ * The last updated date.
57
+ */
58
+ dateUpdated: string;
59
+ /**
60
+ * The inference pipeline description.
61
+ */
62
+ description: string | null;
63
+ /**
64
+ * The number of tests failing.
65
+ */
66
+ failingGoalCount: number;
67
+ links: Item.Links;
68
+ /**
69
+ * The inference pipeline name.
70
+ */
71
+ name: string;
72
+ /**
73
+ * The number of tests passing.
74
+ */
75
+ passingGoalCount: number;
76
+ /**
77
+ * The project id.
78
+ */
79
+ projectId: string;
80
+ /**
81
+ * The status of test evaluation for the inference pipeline.
82
+ */
83
+ status: 'queued' | 'running' | 'paused' | 'failed' | 'completed' | 'unknown';
84
+ /**
85
+ * The status message of test evaluation for the inference pipeline.
86
+ */
87
+ statusMessage: string | null;
88
+ /**
89
+ * The total number of tests.
90
+ */
91
+ totalGoalCount: number;
92
+ /**
93
+ * The storage type.
94
+ */
95
+ storageType?: 'local' | 's3' | 'gcs' | 'azure';
96
+ }
97
+ namespace Item {
98
+ interface Links {
99
+ app: string;
100
+ }
101
+ }
102
+ }
103
+ export interface InferencePipelineListParams {
104
+ /**
105
+ * Filter list of items by name.
106
+ */
107
+ name?: string;
108
+ /**
109
+ * The page to return in a paginated query.
110
+ */
111
+ page?: number;
112
+ /**
113
+ * Maximum number of items to return per page.
114
+ */
115
+ perPage?: number;
116
+ }
117
+ export declare namespace InferencePipelines {
118
+ export import InferencePipelineListResponse = InferencePipelinesAPI.InferencePipelineListResponse;
119
+ export import InferencePipelineListParams = InferencePipelinesAPI.InferencePipelineListParams;
120
+ }
121
+ //# sourceMappingURL=inference-pipelines.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inference-pipelines.d.ts","sourceRoot":"","sources":["../../src/resources/projects/inference-pipelines.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAE/D,qBAAa,kBAAmB,SAAQ,WAAW;IACjD;;OAEG;IACH,IAAI,CACF,EAAE,EAAE,MAAM,EACV,KAAK,CAAC,EAAE,2BAA2B,EACnC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC;IACjD,IAAI,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,6BAA6B,CAAC;CAWhG;AAED,MAAM,WAAW,6BAA6B;IAC5C,KAAK,EAAE,6BAA6B,CAAC,KAAK,CAAC;IAE3C,KAAK,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MAAM,CAAC;SACb;KACF;CACF;AAED,MAAM,WAAW,2BAA2B;IAC1C;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,yBAAiB,kBAAkB,CAAC;IAClC,MAAM,QAAQ,6BAA6B,GAAG,qBAAqB,CAAC,6BAA6B,CAAC;IAClG,MAAM,QAAQ,2BAA2B,GAAG,qBAAqB,CAAC,2BAA2B,CAAC;CAC/F"}
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.InferencePipelines = void 0;
5
+ const resource_1 = require("../../resource.js");
6
+ const core_1 = require("../../core.js");
7
+ class InferencePipelines extends resource_1.APIResource {
8
+ list(id, query = {}, options) {
9
+ if ((0, core_1.isRequestOptions)(query)) {
10
+ return this.list(id, {}, query);
11
+ }
12
+ return this._client.get(`/projects/${id}/inference-pipelines`, { query, ...options });
13
+ }
14
+ }
15
+ exports.InferencePipelines = InferencePipelines;
16
+ (function (InferencePipelines) {
17
+ })(InferencePipelines = exports.InferencePipelines || (exports.InferencePipelines = {}));
18
+ //# sourceMappingURL=inference-pipelines.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inference-pipelines.js","sourceRoot":"","sources":["../../src/resources/projects/inference-pipelines.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAGtF,gDAA6C;AAC7C,wCAA8C;AAG9C,MAAa,kBAAmB,SAAQ,sBAAW;IAUjD,IAAI,CACF,EAAU,EACV,QAA2D,EAAE,EAC7D,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACjC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;CACF;AApBD,gDAoBC;AAsID,WAAiB,kBAAkB;AAGnC,CAAC,EAHgB,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAGlC"}
@@ -0,0 +1,14 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ import { isRequestOptions } from "../../core.mjs";
4
+ export class InferencePipelines extends APIResource {
5
+ list(id, query = {}, options) {
6
+ if (isRequestOptions(query)) {
7
+ return this.list(id, {}, query);
8
+ }
9
+ return this._client.get(`/projects/${id}/inference-pipelines`, { query, ...options });
10
+ }
11
+ }
12
+ (function (InferencePipelines) {
13
+ })(InferencePipelines || (InferencePipelines = {}));
14
+ //# sourceMappingURL=inference-pipelines.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inference-pipelines.mjs","sourceRoot":"","sources":["../../src/resources/projects/inference-pipelines.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,kBAAmB,SAAQ,WAAW;IAUjD,IAAI,CACF,EAAU,EACV,QAA2D,EAAE,EAC7D,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;SACjC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,sBAAsB,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACxF,CAAC;CACF;AAsID,WAAiB,kBAAkB;AAGnC,CAAC,EAHgB,kBAAkB,KAAlB,kBAAkB,QAGlC"}
@@ -0,0 +1,172 @@
1
+ import * as Core from "../../core.js";
2
+ import { APIResource } from "../../resource.js";
3
+ import * as ProjectsAPI from "./projects.js";
4
+ import * as CommitsAPI from "./commits.js";
5
+ import * as InferencePipelinesAPI from "./inference-pipelines.js";
6
+ export declare class Projects extends APIResource {
7
+ commits: CommitsAPI.Commits;
8
+ inferencePipelines: InferencePipelinesAPI.InferencePipelines;
9
+ /**
10
+ * List the projects in a user's workspace.
11
+ */
12
+ list(query?: ProjectListParams, options?: Core.RequestOptions): Core.APIPromise<ProjectListResponse>;
13
+ list(options?: Core.RequestOptions): Core.APIPromise<ProjectListResponse>;
14
+ }
15
+ export interface ProjectListResponse {
16
+ _meta: ProjectListResponse._Meta;
17
+ items: Array<ProjectListResponse.Item>;
18
+ }
19
+ export declare namespace ProjectListResponse {
20
+ interface _Meta {
21
+ /**
22
+ * The current page.
23
+ */
24
+ page: number;
25
+ /**
26
+ * The number of items per page.
27
+ */
28
+ perPage: number;
29
+ /**
30
+ * The total number of items.
31
+ */
32
+ totalItems: number;
33
+ /**
34
+ * The total number of pages.
35
+ */
36
+ totalPages: number;
37
+ }
38
+ interface Item {
39
+ /**
40
+ * The project id.
41
+ */
42
+ id: string;
43
+ /**
44
+ * The project creator id.
45
+ */
46
+ creatorId: string | null;
47
+ /**
48
+ * The project creation date.
49
+ */
50
+ dateCreated: string;
51
+ /**
52
+ * The project last updated date.
53
+ */
54
+ dateUpdated: string;
55
+ /**
56
+ * The number of tests in the development mode of the project.
57
+ */
58
+ developmentGoalCount: number;
59
+ /**
60
+ * The total number of tests in the project.
61
+ */
62
+ goalCount: number;
63
+ /**
64
+ * The number of inference pipelines in the project.
65
+ */
66
+ inferencePipelineCount: number;
67
+ /**
68
+ * Links to the project.
69
+ */
70
+ links: Item.Links;
71
+ /**
72
+ * The number of tests in the monitoring mode of the project.
73
+ */
74
+ monitoringGoalCount: number;
75
+ /**
76
+ * The project name.
77
+ */
78
+ name: string;
79
+ /**
80
+ * Whether the project is a sample project or a user-created project.
81
+ */
82
+ sample: boolean;
83
+ /**
84
+ * The source of the project.
85
+ */
86
+ source: 'web' | 'api' | 'null' | null;
87
+ /**
88
+ * The task type of the project.
89
+ */
90
+ taskType: 'llm-base' | 'tabular-classification' | 'tabular-regression' | 'text-classification';
91
+ /**
92
+ * The number of versions (commits) in the project.
93
+ */
94
+ versionCount: number;
95
+ /**
96
+ * The workspace id.
97
+ */
98
+ workspaceId: string | null;
99
+ /**
100
+ * The project description.
101
+ */
102
+ description?: string | null;
103
+ gitRepo?: Item.GitRepo | null;
104
+ /**
105
+ * The slack channel id connected to the project.
106
+ */
107
+ slackChannelId?: string | null;
108
+ /**
109
+ * The slack channel connected to the project.
110
+ */
111
+ slackChannelName?: string | null;
112
+ /**
113
+ * Whether slack channel notifications are enabled for the project.
114
+ */
115
+ slackChannelNotificationsEnabled?: boolean;
116
+ /**
117
+ * The number of unread notifications in the project.
118
+ */
119
+ unreadNotificationCount?: number;
120
+ }
121
+ namespace Item {
122
+ /**
123
+ * Links to the project.
124
+ */
125
+ interface Links {
126
+ app: string;
127
+ }
128
+ interface GitRepo {
129
+ id: string;
130
+ dateConnected: string;
131
+ dateUpdated: string;
132
+ gitAccountId: string;
133
+ gitId: number;
134
+ name: string;
135
+ private: boolean;
136
+ projectId: string;
137
+ slug: string;
138
+ url: string;
139
+ branch?: string;
140
+ rootDir?: string;
141
+ }
142
+ }
143
+ }
144
+ export interface ProjectListParams {
145
+ /**
146
+ * Filter list of items by project name.
147
+ */
148
+ name?: string;
149
+ /**
150
+ * The page to return in a paginated query.
151
+ */
152
+ page?: number;
153
+ /**
154
+ * Maximum number of items to return per page.
155
+ */
156
+ perPage?: number;
157
+ /**
158
+ * Filter list of items by task type.
159
+ */
160
+ taskType?: 'llm-base' | 'tabular-classification' | 'tabular-regression' | 'text-classification';
161
+ }
162
+ export declare namespace Projects {
163
+ export import ProjectListResponse = ProjectsAPI.ProjectListResponse;
164
+ export import ProjectListParams = ProjectsAPI.ProjectListParams;
165
+ export import Commits = CommitsAPI.Commits;
166
+ export import CommitListResponse = CommitsAPI.CommitListResponse;
167
+ export import CommitListParams = CommitsAPI.CommitListParams;
168
+ export import InferencePipelines = InferencePipelinesAPI.InferencePipelines;
169
+ export import InferencePipelineListResponse = InferencePipelinesAPI.InferencePipelineListResponse;
170
+ export import InferencePipelineListParams = InferencePipelinesAPI.InferencePipelineListParams;
171
+ }
172
+ //# sourceMappingURL=projects.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/projects/projects.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7C,OAAO,KAAK,WAAW,MAAM,YAAY,CAAC;AAC1C,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AACxC,OAAO,KAAK,qBAAqB,MAAM,uBAAuB,CAAC;AAE/D,qBAAa,QAAS,SAAQ,WAAW;IACvC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;IACnE,kBAAkB,EAAE,qBAAqB,CAAC,kBAAkB,CAE1D;IAEF;;OAEG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;IACpG,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,CAAC;CAU1E;AAED,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,mBAAmB,CAAC,KAAK,CAAC;IAEjC,KAAK,EAAE,KAAK,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;CACxC;AAED,yBAAiB,mBAAmB,CAAC;IACnC,UAAiB,KAAK;QACpB;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QAEb;;WAEG;QACH,OAAO,EAAE,MAAM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;IAClG,MAAM,QAAQ,2BAA2B,GAAG,qBAAqB,CAAC,2BAA2B,CAAC;CAC/F"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.Projects = void 0;
28
+ const resource_1 = require("../../resource.js");
29
+ const core_1 = require("../../core.js");
30
+ const CommitsAPI = __importStar(require("./commits.js"));
31
+ const InferencePipelinesAPI = __importStar(require("./inference-pipelines.js"));
32
+ class Projects extends resource_1.APIResource {
33
+ constructor() {
34
+ super(...arguments);
35
+ this.commits = new CommitsAPI.Commits(this._client);
36
+ this.inferencePipelines = new InferencePipelinesAPI.InferencePipelines(this._client);
37
+ }
38
+ list(query = {}, options) {
39
+ if ((0, core_1.isRequestOptions)(query)) {
40
+ return this.list({}, query);
41
+ }
42
+ return this._client.get('/projects', { query, ...options });
43
+ }
44
+ }
45
+ exports.Projects = Projects;
46
+ (function (Projects) {
47
+ Projects.Commits = CommitsAPI.Commits;
48
+ Projects.InferencePipelines = InferencePipelinesAPI.InferencePipelines;
49
+ })(Projects = exports.Projects || (exports.Projects = {}));
50
+ //# sourceMappingURL=projects.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.js","sourceRoot":"","sources":["../../src/resources/projects/projects.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAGtF,gDAA6C;AAC7C,wCAA8C;AAE9C,yDAAwC;AACxC,gFAA+D;AAE/D,MAAa,QAAS,SAAQ,sBAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,uBAAkB,GAA6C,IAAI,qBAAqB,CAAC,kBAAkB,CACzG,IAAI,CAAC,OAAO,CACb,CAAC;IAgBJ,CAAC;IATC,IAAI,CACF,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF;AApBD,4BAoBC;AAiMD,WAAiB,QAAQ;IAGT,gBAAO,GAAG,UAAU,CAAC,OAAO,CAAC;IAG7B,2BAAkB,GAAG,qBAAqB,CAAC,kBAAkB,CAAC;AAG9E,CAAC,EATgB,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QASxB"}
@@ -0,0 +1,23 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../resource.mjs";
3
+ import { isRequestOptions } from "../../core.mjs";
4
+ import * as CommitsAPI from "./commits.mjs";
5
+ import * as InferencePipelinesAPI from "./inference-pipelines.mjs";
6
+ export class Projects extends APIResource {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.commits = new CommitsAPI.Commits(this._client);
10
+ this.inferencePipelines = new InferencePipelinesAPI.InferencePipelines(this._client);
11
+ }
12
+ list(query = {}, options) {
13
+ if (isRequestOptions(query)) {
14
+ return this.list({}, query);
15
+ }
16
+ return this._client.get('/projects', { query, ...options });
17
+ }
18
+ }
19
+ (function (Projects) {
20
+ Projects.Commits = CommitsAPI.Commits;
21
+ Projects.InferencePipelines = InferencePipelinesAPI.InferencePipelines;
22
+ })(Projects || (Projects = {}));
23
+ //# sourceMappingURL=projects.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"projects.mjs","sourceRoot":"","sources":["../../src/resources/projects/projects.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,UAAU;OACf,KAAK,qBAAqB;AAEjC,MAAM,OAAO,QAAS,SAAQ,WAAW;IAAzC;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACnE,uBAAkB,GAA6C,IAAI,qBAAqB,CAAC,kBAAkB,CACzG,IAAI,CAAC,OAAO,CACb,CAAC;IAgBJ,CAAC;IATC,IAAI,CACF,QAAiD,EAAE,EACnD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9D,CAAC;CACF;AAiMD,WAAiB,QAAQ;IAGT,gBAAO,GAAG,UAAU,CAAC,OAAO,CAAC;IAG7B,2BAAkB,GAAG,qBAAqB,CAAC,kBAAkB,CAAC;AAG9E,CAAC,EATgB,QAAQ,KAAR,QAAQ,QASxB"}
@@ -0,0 +1,29 @@
1
+
2
+
3
+
4
+ import * as types from "../_shims/node-types.js";
5
+ declare module '../_shims/manual-types' {
6
+ namespace manual {
7
+ type Agent = types.Agent;
8
+ export import fetch = types.fetch;
9
+ type Request = types.Request;
10
+ type RequestInfo = types.RequestInfo;
11
+ type RequestInit = types.RequestInit;
12
+ type Response = types.Response;
13
+ type ResponseInit = types.ResponseInit;
14
+ type ResponseType = types.ResponseType;
15
+ type BodyInit = types.BodyInit;
16
+ type Headers = types.Headers;
17
+ type HeadersInit = types.HeadersInit;
18
+ type BlobPropertyBag = types.BlobPropertyBag;
19
+ type FilePropertyBag = types.FilePropertyBag;
20
+ type FileFromPathOptions = types.FileFromPathOptions;
21
+ export import FormData = types.FormData;
22
+ export import File = types.File;
23
+ export import Blob = types.Blob;
24
+ type Readable = types.Readable;
25
+ type FsReadStream = types.FsReadStream;
26
+ export import ReadableStream = types.ReadableStream;
27
+ }
28
+ }
29
+ //# sourceMappingURL=node.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":";;;AACA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAK9C,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,MAAM,CAAC;QAEtB,KAAY,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAEhC,MAAM,QAAQ,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAElC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QAE5D,MAAM,QAAQ,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAExC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,MAAM,QAAQ,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;KACrD;CACF"}
package/shims/node.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ // @ts-ignore
27
+ const types = __importStar(require("../_shims/node-types.js"));
28
+ const registry_1 = require("../_shims/registry.js");
29
+ const node_runtime_1 = require("../_shims/node-runtime.js");
30
+ (0, registry_1.setShims)((0, node_runtime_1.getRuntime)());
31
+ //# sourceMappingURL=node.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.js","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,+DAA8C;AAC9C,oDAA8C;AAC9C,4DAAoD;AACpD,IAAA,mBAAQ,EAAC,IAAA,yBAAU,GAAE,CAAC,CAAC"}
package/shims/node.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import * as types from "../_shims/node-types.mjs";
2
+ import { setShims } from "../_shims/registry.mjs";
3
+ import { getRuntime } from "../_shims/node-runtime.mjs";
4
+ setShims(getRuntime());
5
+ //# sourceMappingURL=node.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node.mjs","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":"OACO,KAAK,KAAK;OACV,EAAE,QAAQ,EAAE;OACZ,EAAE,UAAU,EAAE;AACrB,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC"}
package/shims/web.d.ts ADDED
@@ -0,0 +1,26 @@
1
+ import * as types from "../_shims/web-types.js";
2
+ declare module '../_shims/manual-types' {
3
+ namespace manual {
4
+ type Agent = types.Agent;
5
+ export import fetch = types.fetch;
6
+ type Request = types.Request;
7
+ type RequestInfo = types.RequestInfo;
8
+ type RequestInit = types.RequestInit;
9
+ type Response = types.Response;
10
+ type ResponseInit = types.ResponseInit;
11
+ type ResponseType = types.ResponseType;
12
+ type BodyInit = types.BodyInit;
13
+ type Headers = types.Headers;
14
+ type HeadersInit = types.HeadersInit;
15
+ type BlobPropertyBag = types.BlobPropertyBag;
16
+ type FilePropertyBag = types.FilePropertyBag;
17
+ type FileFromPathOptions = types.FileFromPathOptions;
18
+ export import FormData = types.FormData;
19
+ export import File = types.File;
20
+ export import Blob = types.Blob;
21
+ type Readable = types.Readable;
22
+ type FsReadStream = types.FsReadStream;
23
+ export import ReadableStream = types.ReadableStream;
24
+ }
25
+ }
26
+ //# sourceMappingURL=web.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/shims/web.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAK7C,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,MAAM,CAAC;QAEtB,KAAY,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAEhC,MAAM,QAAQ,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAElC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QAE5D,MAAM,QAAQ,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAExC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,MAAM,QAAQ,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;KACrD;CACF"}
package/shims/web.js ADDED
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ // @ts-ignore
27
+ const types = __importStar(require("../_shims/web-types.js"));
28
+ const registry_1 = require("../_shims/registry.js");
29
+ const web_runtime_1 = require("../_shims/web-runtime.js");
30
+ (0, registry_1.setShims)((0, web_runtime_1.getRuntime)({ manuallyImported: true }));
31
+ //# sourceMappingURL=web.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.js","sourceRoot":"","sources":["../src/shims/web.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,8DAA6C;AAC7C,oDAA8C;AAC9C,0DAAmD;AACnD,IAAA,mBAAQ,EAAC,IAAA,wBAAU,EAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC"}
package/shims/web.mjs ADDED
@@ -0,0 +1,5 @@
1
+ import * as types from "../_shims/web-types.mjs";
2
+ import { setShims } from "../_shims/registry.mjs";
3
+ import { getRuntime } from "../_shims/web-runtime.mjs";
4
+ setShims(getRuntime({ manuallyImported: true }));
5
+ //# sourceMappingURL=web.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web.mjs","sourceRoot":"","sources":["../src/shims/web.ts"],"names":[],"mappings":"OACO,KAAK,KAAK;OACV,EAAE,QAAQ,EAAE;OACZ,EAAE,UAAU,EAAE;AACrB,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ export class MultipartBody {
5
+ constructor(public body: any) {}
6
+ get [Symbol.toStringTag](): string {
7
+ return 'MultipartBody';
8
+ }
9
+ }
@@ -0,0 +1,46 @@
1
+ # 👋 Wondering what everything in here does?
2
+
3
+ `openlayer` supports a wide variety of runtime environments like Node.js, Deno, Bun, browsers, and various
4
+ edge runtimes, as well as both CommonJS (CJS) and EcmaScript Modules (ESM).
5
+
6
+ To do this, `openlayer` provides shims for either using `node-fetch` when in Node (because `fetch` is still experimental there) or the global `fetch` API built into the environment when not in Node.
7
+
8
+ It uses [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) to
9
+ automatically select the correct shims for each environment. However, conditional exports are a fairly new
10
+ feature and not supported everywhere. For instance, the TypeScript `"moduleResolution": "node"`
11
+
12
+ setting doesn't consult the `exports` map, compared to `"moduleResolution": "nodeNext"`, which does.
13
+ Unfortunately that's still the default setting, and it can result in errors like
14
+ getting the wrong raw `Response` type from `.asResponse()`, for example.
15
+
16
+ The user can work around these issues by manually importing one of:
17
+
18
+ - `import 'openlayer/shims/node'`
19
+ - `import 'openlayer/shims/web'`
20
+
21
+ All of the code here in `_shims` handles selecting the automatic default shims or manual overrides.
22
+
23
+ ### How it works - Runtime
24
+
25
+ Runtime shims get installed by calling `setShims` exported by `openlayer/_shims/registry`.
26
+
27
+ Manually importing `openlayer/shims/node` or `openlayer/shims/web`, calls `setShims` with the respective runtime shims.
28
+
29
+ All client code imports shims from `openlayer/_shims/index`, which:
30
+
31
+ - checks if shims have been set manually
32
+ - if not, calls `setShims` with the shims from `openlayer/_shims/auto/runtime`
33
+ - re-exports the installed shims from `openlayer/_shims/registry`.
34
+
35
+ `openlayer/_shims/auto/runtime` exports web runtime shims.
36
+ If the `node` export condition is set, the export map replaces it with `openlayer/_shims/auto/runtime-node`.
37
+
38
+ ### How it works - Type time
39
+
40
+ All client code imports shim types from `openlayer/_shims/index`, which selects the manual types from `openlayer/_shims/manual-types` if they have been declared, otherwise it exports the auto types from `openlayer/_shims/auto/types`.
41
+
42
+ `openlayer/_shims/manual-types` exports an empty namespace.
43
+ Manually importing `openlayer/shims/node` or `openlayer/shims/web` merges declarations into this empty namespace, so they get picked up by `openlayer/_shims/index`.
44
+
45
+ `openlayer/_shims/auto/types` exports web type definitions.
46
+ If the `node` export condition is set, the export map replaces it with `openlayer/_shims/auto/types-node`, though TS only picks this up if `"moduleResolution": "nodenext"` or `"moduleResolution": "bundler"`.
@@ -0,0 +1,4 @@
1
+ /**
2
+ * Disclaimer: modules in _shims aren't intended to be imported by SDK users.
3
+ */
4
+ export * from '../bun-runtime';