@distilled.cloud/namespacelabs 0.0.0 → 1.0.0-rc.21

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 (219) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +130 -4
  3. package/lib/.lazy.json +1 -0
  4. package/lib/_bundle/lazy.js +4 -0
  5. package/lib/_bundle/sdk.js +2 -0
  6. package/lib/_bundle/sdk.js.map +1 -0
  7. package/lib/credentials.d.ts +73 -0
  8. package/lib/credentials.d.ts.map +1 -0
  9. package/lib/credentials.js +1 -0
  10. package/lib/errors.d.ts +59 -0
  11. package/lib/errors.d.ts.map +1 -0
  12. package/lib/errors.js +1 -0
  13. package/lib/index.d.ts +44 -0
  14. package/lib/index.d.ts.map +1 -0
  15. package/lib/index.js +6 -0
  16. package/lib/pagination.d.ts +2 -0
  17. package/lib/pagination.d.ts.map +1 -0
  18. package/lib/pagination.js +1 -0
  19. package/lib/protocol.d.ts +19 -0
  20. package/lib/protocol.d.ts.map +1 -0
  21. package/lib/protocol.js +1 -0
  22. package/lib/retry.d.ts +12 -0
  23. package/lib/retry.d.ts.map +1 -0
  24. package/lib/retry.js +1 -0
  25. package/lib/services/buildkite_jobs.d.ts +129 -0
  26. package/lib/services/buildkite_jobs.d.ts.map +1 -0
  27. package/lib/services/buildkite_jobs.js +2 -0
  28. package/lib/services/buildkite_jobs.js.map +1 -0
  29. package/lib/services/buildkite_queue.d.ts +186 -0
  30. package/lib/services/buildkite_queue.d.ts.map +1 -0
  31. package/lib/services/buildkite_queue.js +2 -0
  32. package/lib/services/buildkite_queue.js.map +1 -0
  33. package/lib/services/index.d.ts +3 -0
  34. package/lib/services/index.d.ts.map +1 -0
  35. package/lib/services/index.js +2 -0
  36. package/lib/services.lazy/buildkite_jobs.js +1 -0
  37. package/lib/services.lazy/buildkite_queue.js +1 -0
  38. package/lib/services.lazy/index.js +3 -0
  39. package/lib/traits.d.ts +3 -0
  40. package/lib/traits.d.ts.map +1 -0
  41. package/lib/traits.js +1 -0
  42. package/lib/unstable-services/artifacts.d.ts +268 -0
  43. package/lib/unstable-services/artifacts.d.ts.map +1 -0
  44. package/lib/unstable-services/artifacts.js +2 -0
  45. package/lib/unstable-services/artifacts.js.map +1 -0
  46. package/lib/unstable-services/audit.d.ts +157 -0
  47. package/lib/unstable-services/audit.d.ts.map +1 -0
  48. package/lib/unstable-services/audit.js +2 -0
  49. package/lib/unstable-services/audit.js.map +1 -0
  50. package/lib/unstable-services/bazel.d.ts +181 -0
  51. package/lib/unstable-services/bazel.d.ts.map +1 -0
  52. package/lib/unstable-services/bazel.js +2 -0
  53. package/lib/unstable-services/bazel.js.map +1 -0
  54. package/lib/unstable-services/bazel_cache.d.ts +126 -0
  55. package/lib/unstable-services/bazel_cache.d.ts.map +1 -0
  56. package/lib/unstable-services/bazel_cache.js +2 -0
  57. package/lib/unstable-services/bazel_cache.js.map +1 -0
  58. package/lib/unstable-services/builder.d.ts +242 -0
  59. package/lib/unstable-services/builder.d.ts.map +1 -0
  60. package/lib/unstable-services/builder.js +2 -0
  61. package/lib/unstable-services/builder.js.map +1 -0
  62. package/lib/unstable-services/compute.d.ts +1124 -0
  63. package/lib/unstable-services/compute.d.ts.map +1 -0
  64. package/lib/unstable-services/compute.js +47 -0
  65. package/lib/unstable-services/compute.js.map +1 -0
  66. package/lib/unstable-services/compute_command.d.ts +120 -0
  67. package/lib/unstable-services/compute_command.d.ts.map +1 -0
  68. package/lib/unstable-services/compute_command.js +2 -0
  69. package/lib/unstable-services/compute_command.js.map +1 -0
  70. package/lib/unstable-services/compute_observability.d.ts +165 -0
  71. package/lib/unstable-services/compute_observability.d.ts.map +1 -0
  72. package/lib/unstable-services/compute_observability.js +2 -0
  73. package/lib/unstable-services/compute_observability.js.map +1 -0
  74. package/lib/unstable-services/compute_storage.d.ts +379 -0
  75. package/lib/unstable-services/compute_storage.d.ts.map +1 -0
  76. package/lib/unstable-services/compute_storage.js +33 -0
  77. package/lib/unstable-services/compute_storage.js.map +1 -0
  78. package/lib/unstable-services/compute_usage.d.ts +283 -0
  79. package/lib/unstable-services/compute_usage.d.ts.map +1 -0
  80. package/lib/unstable-services/compute_usage.js +2 -0
  81. package/lib/unstable-services/compute_usage.js.map +1 -0
  82. package/lib/unstable-services/egress.d.ts +191 -0
  83. package/lib/unstable-services/egress.d.ts.map +1 -0
  84. package/lib/unstable-services/egress.js +2 -0
  85. package/lib/unstable-services/egress.js.map +1 -0
  86. package/lib/unstable-services/experimental_compute_reservation.d.ts +672 -0
  87. package/lib/unstable-services/experimental_compute_reservation.d.ts.map +1 -0
  88. package/lib/unstable-services/experimental_compute_reservation.js +23 -0
  89. package/lib/unstable-services/experimental_compute_reservation.js.map +1 -0
  90. package/lib/unstable-services/experimental_remote_results.d.ts +496 -0
  91. package/lib/unstable-services/experimental_remote_results.d.ts.map +1 -0
  92. package/lib/unstable-services/experimental_remote_results.js +2 -0
  93. package/lib/unstable-services/experimental_remote_results.js.map +1 -0
  94. package/lib/unstable-services/github_image.d.ts +162 -0
  95. package/lib/unstable-services/github_image.d.ts.map +1 -0
  96. package/lib/unstable-services/github_image.js +2 -0
  97. package/lib/unstable-services/github_image.js.map +1 -0
  98. package/lib/unstable-services/github_jobs.d.ts +183 -0
  99. package/lib/unstable-services/github_jobs.d.ts.map +1 -0
  100. package/lib/unstable-services/github_jobs.js +2 -0
  101. package/lib/unstable-services/github_jobs.js.map +1 -0
  102. package/lib/unstable-services/github_profile.d.ts +296 -0
  103. package/lib/unstable-services/github_profile.d.ts.map +1 -0
  104. package/lib/unstable-services/github_profile.js +2 -0
  105. package/lib/unstable-services/github_profile.js.map +1 -0
  106. package/lib/unstable-services/gradle_cache.d.ts +125 -0
  107. package/lib/unstable-services/gradle_cache.d.ts.map +1 -0
  108. package/lib/unstable-services/gradle_cache.js +2 -0
  109. package/lib/unstable-services/gradle_cache.js.map +1 -0
  110. package/lib/unstable-services/httpcache.d.ts +125 -0
  111. package/lib/unstable-services/httpcache.d.ts.map +1 -0
  112. package/lib/unstable-services/httpcache.js +2 -0
  113. package/lib/unstable-services/httpcache.js.map +1 -0
  114. package/lib/unstable-services/iam_tenant.d.ts +457 -0
  115. package/lib/unstable-services/iam_tenant.d.ts.map +1 -0
  116. package/lib/unstable-services/iam_tenant.js +45 -0
  117. package/lib/unstable-services/iam_tenant.js.map +1 -0
  118. package/lib/unstable-services/iam_tenant_membership.d.ts +114 -0
  119. package/lib/unstable-services/iam_tenant_membership.d.ts.map +1 -0
  120. package/lib/unstable-services/iam_tenant_membership.js +2 -0
  121. package/lib/unstable-services/iam_tenant_membership.js.map +1 -0
  122. package/lib/unstable-services/iam_token.d.ts +257 -0
  123. package/lib/unstable-services/iam_token.d.ts.map +1 -0
  124. package/lib/unstable-services/iam_token.js +2 -0
  125. package/lib/unstable-services/iam_token.js.map +1 -0
  126. package/lib/unstable-services/image.d.ts +222 -0
  127. package/lib/unstable-services/image.d.ts.map +1 -0
  128. package/lib/unstable-services/image.js +2 -0
  129. package/lib/unstable-services/image.js.map +1 -0
  130. package/lib/unstable-services/index.d.ts +28 -0
  131. package/lib/unstable-services/index.d.ts.map +1 -0
  132. package/lib/unstable-services/index.js +27 -0
  133. package/lib/unstable-services/private_devbox.d.ts +1180 -0
  134. package/lib/unstable-services/private_devbox.d.ts.map +1 -0
  135. package/lib/unstable-services/private_devbox.js +81 -0
  136. package/lib/unstable-services/private_devbox.js.map +1 -0
  137. package/lib/unstable-services/private_user_sessions.d.ts +145 -0
  138. package/lib/unstable-services/private_user_sessions.d.ts.map +1 -0
  139. package/lib/unstable-services/private_user_sessions.js +2 -0
  140. package/lib/unstable-services/private_user_sessions.js.map +1 -0
  141. package/lib/unstable-services/registry.d.ts +373 -0
  142. package/lib/unstable-services/registry.d.ts.map +1 -0
  143. package/lib/unstable-services/registry.js +34 -0
  144. package/lib/unstable-services/registry.js.map +1 -0
  145. package/lib/unstable-services/testing.d.ts +160 -0
  146. package/lib/unstable-services/testing.d.ts.map +1 -0
  147. package/lib/unstable-services/testing.js +2 -0
  148. package/lib/unstable-services/testing.js.map +1 -0
  149. package/lib/unstable-services/vault.d.ts +203 -0
  150. package/lib/unstable-services/vault.d.ts.map +1 -0
  151. package/lib/unstable-services/vault.js +2 -0
  152. package/lib/unstable-services/vault.js.map +1 -0
  153. package/lib/unstable-services.lazy/artifacts.js +1 -0
  154. package/lib/unstable-services.lazy/audit.js +1 -0
  155. package/lib/unstable-services.lazy/bazel.js +1 -0
  156. package/lib/unstable-services.lazy/bazel_cache.js +1 -0
  157. package/lib/unstable-services.lazy/builder.js +1 -0
  158. package/lib/unstable-services.lazy/compute.js +4 -0
  159. package/lib/unstable-services.lazy/compute_command.js +1 -0
  160. package/lib/unstable-services.lazy/compute_observability.js +1 -0
  161. package/lib/unstable-services.lazy/compute_storage.js +4 -0
  162. package/lib/unstable-services.lazy/compute_usage.js +1 -0
  163. package/lib/unstable-services.lazy/egress.js +1 -0
  164. package/lib/unstable-services.lazy/experimental_compute_reservation.js +4 -0
  165. package/lib/unstable-services.lazy/experimental_remote_results.js +1 -0
  166. package/lib/unstable-services.lazy/github_image.js +1 -0
  167. package/lib/unstable-services.lazy/github_jobs.js +1 -0
  168. package/lib/unstable-services.lazy/github_profile.js +1 -0
  169. package/lib/unstable-services.lazy/gradle_cache.js +1 -0
  170. package/lib/unstable-services.lazy/httpcache.js +1 -0
  171. package/lib/unstable-services.lazy/iam_tenant.js +4 -0
  172. package/lib/unstable-services.lazy/iam_tenant_membership.js +1 -0
  173. package/lib/unstable-services.lazy/iam_token.js +1 -0
  174. package/lib/unstable-services.lazy/image.js +1 -0
  175. package/lib/unstable-services.lazy/index.js +3 -0
  176. package/lib/unstable-services.lazy/private_devbox.js +4 -0
  177. package/lib/unstable-services.lazy/private_user_sessions.js +1 -0
  178. package/lib/unstable-services.lazy/registry.js +4 -0
  179. package/lib/unstable-services.lazy/testing.js +1 -0
  180. package/lib/unstable-services.lazy/vault.js +1 -0
  181. package/package.json +89 -2
  182. package/src/credentials.ts +208 -0
  183. package/src/errors.ts +71 -0
  184. package/src/index.ts +50 -0
  185. package/src/pagination.ts +1 -0
  186. package/src/protocol.ts +83 -0
  187. package/src/retry.ts +28 -0
  188. package/src/services/buildkite_jobs.ts +230 -0
  189. package/src/services/buildkite_queue.ts +453 -0
  190. package/src/services/index.ts +3 -0
  191. package/src/traits.ts +36 -0
  192. package/src/unstable-services/artifacts.ts +769 -0
  193. package/src/unstable-services/audit.ts +323 -0
  194. package/src/unstable-services/bazel.ts +423 -0
  195. package/src/unstable-services/bazel_cache.ts +219 -0
  196. package/src/unstable-services/builder.ts +576 -0
  197. package/src/unstable-services/compute.ts +2991 -0
  198. package/src/unstable-services/compute_command.ts +220 -0
  199. package/src/unstable-services/compute_observability.ts +436 -0
  200. package/src/unstable-services/compute_storage.ts +1167 -0
  201. package/src/unstable-services/compute_usage.ts +738 -0
  202. package/src/unstable-services/egress.ts +516 -0
  203. package/src/unstable-services/experimental_compute_reservation.ts +1499 -0
  204. package/src/unstable-services/experimental_remote_results.ts +1165 -0
  205. package/src/unstable-services/github_image.ts +301 -0
  206. package/src/unstable-services/github_jobs.ts +389 -0
  207. package/src/unstable-services/github_profile.ts +729 -0
  208. package/src/unstable-services/gradle_cache.ts +271 -0
  209. package/src/unstable-services/httpcache.ts +271 -0
  210. package/src/unstable-services/iam_tenant.ts +1720 -0
  211. package/src/unstable-services/iam_tenant_membership.ts +253 -0
  212. package/src/unstable-services/iam_token.ts +788 -0
  213. package/src/unstable-services/image.ts +602 -0
  214. package/src/unstable-services/index.ts +28 -0
  215. package/src/unstable-services/private_devbox.ts +4256 -0
  216. package/src/unstable-services/private_user_sessions.ts +410 -0
  217. package/src/unstable-services/registry.ts +1242 -0
  218. package/src/unstable-services/testing.ts +394 -0
  219. package/src/unstable-services/vault.ts +522 -0
@@ -0,0 +1,738 @@
1
+ import * as API from "@distilled.cloud/core/api";
2
+ import * as C from "@distilled.cloud/core/category";
3
+ // AUTO-GENERATED by scripts/generate.ts from .generated-specs (buf.build/namespace/cloud -> smithy). Do not edit.
4
+ import * as S from "@distilled.cloud/core/schema-lite";
5
+ import * as __L from "@distilled.cloud/core/schema-lite";
6
+ import { NamespaceLabsServiceErrors } from "../errors.ts";
7
+ import {
8
+ NamespaceLabsProtocol,
9
+ type NamespaceLabsOpError,
10
+ type NamespaceLabsOpContext,
11
+ } from "../protocol.ts";
12
+ import * as Retry from "../retry.ts";
13
+ import * as T from "../traits.ts";
14
+ // Schema table, filled on first reach (see __S at the end).
15
+ const __s: any[] = [];
16
+
17
+ export type { NamespaceLabsOpError, NamespaceLabsOpContext };
18
+
19
+ /** Span facts shared by every operation (com.distilled.telemetry#service). */
20
+ const TELEMETRY = {
21
+ system: "namespacelabs-api",
22
+ responseHeaders: [
23
+ { header: "x-request-id", name: "http.response.header.x-request-id", transform: "list" },
24
+ { header: "request-id", name: "http.response.header.request-id", transform: "list" },
25
+ ],
26
+ prefix: "Namespacelabs",
27
+ service: "UsageService",
28
+ propagate: "w3c",
29
+ } as const;
30
+
31
+ export class AlreadyExists
32
+ extends /*@__PURE__*/ T.applyErrorMatchers(
33
+ /*@__PURE__*/ S.TaggedError<AlreadyExists>()("AlreadyExists", {
34
+ message: S.String,
35
+ body: S.Unknown,
36
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
37
+ }).pipe(C.withConflictError),
38
+ [{ status: 409, body: { "/code": "already_exists" } }],
39
+ ) {}
40
+
41
+ export class FailedPrecondition
42
+ extends /*@__PURE__*/ T.applyErrorMatchers(
43
+ /*@__PURE__*/ S.TaggedError<FailedPrecondition>()("FailedPrecondition", {
44
+ message: S.String,
45
+ body: S.Unknown,
46
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
47
+ }).pipe(C.withBadRequestError),
48
+ [{ status: 400, body: { "/code": "failed_precondition" } }],
49
+ ) {}
50
+
51
+ export class InvalidArgument
52
+ extends /*@__PURE__*/ T.applyErrorMatchers(
53
+ /*@__PURE__*/ S.TaggedError<InvalidArgument>()("InvalidArgument", {
54
+ message: S.String,
55
+ body: S.Unknown,
56
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
57
+ }).pipe(C.withBadRequestError),
58
+ [{ status: 400, body: { "/code": "invalid_argument" } }],
59
+ ) {}
60
+
61
+ export class NotFound
62
+ extends /*@__PURE__*/ T.applyErrorMatchers(
63
+ /*@__PURE__*/ S.TaggedError<NotFound>()("NotFound", {
64
+ message: S.String,
65
+ body: S.Unknown,
66
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
67
+ }).pipe(C.withBadRequestError),
68
+ [{ status: 404 }],
69
+ ) {}
70
+
71
+ export class PermissionDenied
72
+ extends /*@__PURE__*/ T.applyErrorMatchers(
73
+ /*@__PURE__*/ S.TaggedError<PermissionDenied>()("PermissionDenied", {
74
+ message: S.String,
75
+ body: S.Unknown,
76
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
77
+ }).pipe(C.withAuthError),
78
+ [{ status: 403 }],
79
+ ) {}
80
+
81
+ export class ResourceExhausted
82
+ extends /*@__PURE__*/ T.applyErrorMatchers(
83
+ /*@__PURE__*/ S.TaggedError<ResourceExhausted>()("ResourceExhausted", {
84
+ message: S.String,
85
+ body: S.Unknown,
86
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
87
+ retryAfter: /*@__PURE__*/ S.optional(S.Duration),
88
+ }).pipe(C.withThrottlingError),
89
+ [{ status: 429 }],
90
+ ) {}
91
+
92
+ export class Unauthenticated
93
+ extends /*@__PURE__*/ T.applyErrorMatchers(
94
+ /*@__PURE__*/ S.TaggedError<Unauthenticated>()("Unauthenticated", {
95
+ message: S.String,
96
+ body: S.Unknown,
97
+ headers: /*@__PURE__*/ S.optional(/*@__PURE__*/ S.Record(S.String, S.String)),
98
+ }).pipe(C.withAuthError),
99
+ [{ status: 401 }],
100
+ ) {}
101
+
102
+ export interface GetUsageRequestDate {
103
+ /** e.g. 2023 */
104
+ year?: number | undefined;
105
+ /** 1-12 */
106
+ month?: number | undefined;
107
+ /** 1-31 */
108
+ day?: number | undefined;
109
+ }
110
+ /** ArtifactProduct enumerates the object storage products reported by GetArtifactUsage. */
111
+ export type ArtifactProduct =
112
+ | "ARTIFACT_PRODUCT_UNSPECIFIED"
113
+ | "ARTIFACT_PRODUCT_REGISTRY"
114
+ | "ARTIFACT_PRODUCT_TURBOREPO"
115
+ | "ARTIFACT_PRODUCT_GITHUB_ARTIFACTS"
116
+ | "ARTIFACT_PRODUCT_BAZEL"
117
+ | "ARTIFACT_PRODUCT_GRADLE"
118
+ | "ARTIFACT_PRODUCT_ARTIFACTS";
119
+ export type ArtifactProductList = Array<ArtifactProduct | (string & {})>;
120
+ export interface GetArtifactUsageRequest {
121
+ /** Optional: If no start date is provided, then return usage starting from the first day of the current month. Period start is inclusive. */
122
+ periodStart?: GetUsageRequestDate | undefined;
123
+ /** Optional: Limits the time range of the returned results. Period end is inclusive. Period end has to be in the same month as period start. */
124
+ periodEnd?: GetUsageRequestDate | undefined;
125
+ /** Optional: Restricts the results to the given products. If empty, usage for all known object storage products is returned. ARTIFACT_PRODUCT_UNSPECIFIED is not a valid entry. */
126
+ products?: ArtifactProductList | undefined;
127
+ }
128
+ export interface GetArtifactUsageResponseProductUsage {
129
+ /** The object storage product. */
130
+ product: ArtifactProduct;
131
+ /** At-rest storage, in GB-minutes. Divide by (60 * 24 * 30) for GB-months. */
132
+ storageGbMinutes: string;
133
+ /** Reads (bytes sent), in bytes. */
134
+ readsBytes: string;
135
+ }
136
+ export type GetArtifactUsageResponseProductUsageList = Array<GetArtifactUsageResponseProductUsage>;
137
+ export interface GetArtifactUsageResponse {
138
+ /** Per-product object storage usage for the requested period. */
139
+ products: GetArtifactUsageResponseProductUsageList;
140
+ }
141
+ export interface GetConcurrencyRequest {}
142
+ export type StringList = Array<string>;
143
+ export interface UsagePolicyConcurrencyLimits {
144
+ maxCpu: string;
145
+ maxMemoryMb: string;
146
+ maxInstanceCount: string;
147
+ }
148
+ export interface PlatformConcurrencyActiveConcurrency {
149
+ instanceCount: string;
150
+ cpu: string;
151
+ memoryMb: string;
152
+ }
153
+ export interface PlatformConcurrency {
154
+ /** e.g "Linux" */
155
+ name: string;
156
+ /** Platforms covered by this pool, e.g. "linux/amd64". Empty means all enabled platforms. */
157
+ platforms: StringList;
158
+ limits?: UsagePolicyConcurrencyLimits | undefined;
159
+ activeConcurrency?: PlatformConcurrencyActiveConcurrency | undefined;
160
+ }
161
+ export type PlatformConcurrencyList = Array<PlatformConcurrency>;
162
+ export interface GetConcurrencyResponse {
163
+ /** Current usage and limits for each concurrency pool. */
164
+ concurrency: PlatformConcurrencyList;
165
+ }
166
+ export type StringMatcherOperator = "OPERATOR_UNKNOWN" | "IS_ANY_OF" | "IS_NOT";
167
+ export interface StringMatcher {
168
+ values?: StringList | undefined;
169
+ op?: StringMatcherOperator | (string & {}) | undefined;
170
+ }
171
+ export interface GetUsageRequest {
172
+ /** Optional: If no start date is provided, then return the compute usage starting from first day of the current month. Period start is inclusive. */
173
+ periodStart?: GetUsageRequestDate | undefined;
174
+ /** Optional: Limits the time range of the returned results. Period end is inclusive. Period end has to be in the same month as period start. */
175
+ periodEnd?: GetUsageRequestDate | undefined;
176
+ /** Optional: Only include usage from instances matching the specified platform (e.g. "linux/amd64"). */
177
+ matchPlatform?: StringMatcher | undefined;
178
+ /** Optional: Only include usage from instances matching the specified shape (e.g. "2x8"). */
179
+ matchShape?: StringMatcher | undefined;
180
+ /** Optional: Only include usage from instances matching the specified GitHub profile. */
181
+ matchGithubProfile?: StringMatcher | undefined;
182
+ /** Optional: Only include usage from instances matching the specified GitHub repository. */
183
+ matchGithubRepository?: StringMatcher | undefined;
184
+ }
185
+ export interface UsageRecordMinutes {
186
+ /** A compute unit represents using 1 vCPU and 2GB of RAM for a minute. E.g. An instance with 4 vCPU and 8GB RAM that runs for two minutes amounts for two wall minutes and eight unit minutes. */
187
+ unit: string;
188
+ /** Wall minutes represent the total elapsed time for which instances have been running. */
189
+ wall: string;
190
+ }
191
+ export interface UsageRecordBuilds {
192
+ /** The count represents the amount of build requests that were processed in the given period. */
193
+ count: string;
194
+ /** A build unit represents using a build machine with 1 vCPU and 2GB of RAM for a minute. E.g. An builder with 4 vCPU and 8GB RAM that runs for two minutes amounts for two wall minutes and eight unit minutes. */
195
+ unitMinutes: string;
196
+ /** Wall minutes represent the total elapsed time for which build machines have been running. E.g. A build starts at 12:30 and lasts 5 minutes. Another build starts at 12:32 and lasts 7 minutes, the reported wall time is 9 minutes, as the build machine is used from 12:30 until 12:39. */
197
+ wallMinutes: string;
198
+ }
199
+ export interface UsageRecordUsage {
200
+ instanceMinutes?: UsageRecordMinutes | undefined;
201
+ builds?: UsageRecordBuilds | undefined;
202
+ }
203
+ export interface UsageRecord {
204
+ /** e.g. 2023 */
205
+ year: number;
206
+ /** 1-12 */
207
+ month: number;
208
+ /** 1-31 */
209
+ day: number;
210
+ total?: UsageRecordUsage | undefined;
211
+ }
212
+ export type UsageRecordList = Array<UsageRecord>;
213
+ export interface GetUsageResponse {
214
+ /** Cumulated usage summary for the current billing period. */
215
+ total?: UsageRecordUsage | undefined;
216
+ /** Detailed usage summary for the current billing period, broken down per day. */
217
+ perDay: UsageRecordList;
218
+ }
219
+ export interface GetUsageTimeSeriesRequestUsageFilter {
220
+ platform?: StringMatcher | undefined;
221
+ shape?: StringMatcher | undefined;
222
+ purpose?: StringMatcher | undefined;
223
+ githubRepository?: StringMatcher | undefined;
224
+ githubBranch?: StringMatcher | undefined;
225
+ githubWorkflowName?: StringMatcher | undefined;
226
+ githubJobName?: StringMatcher | undefined;
227
+ githubProfile?: StringMatcher | undefined;
228
+ githubJobConclusion?: StringMatcher | undefined;
229
+ buildkiteOrgId?: StringMatcher | undefined;
230
+ buildkitePipelineId?: StringMatcher | undefined;
231
+ buildkitePipelineSlug?: StringMatcher | undefined;
232
+ buildkiteRepository?: StringMatcher | undefined;
233
+ buildkiteBranch?: StringMatcher | undefined;
234
+ buildkiteJobName?: StringMatcher | undefined;
235
+ buildkiteJobState?: StringMatcher | undefined;
236
+ }
237
+ export interface GetUsageTimeSeriesRequest {
238
+ /** Required: Start of the time range (inclusive). */
239
+ startTime?: string | undefined;
240
+ /** Required: End of the time range (exclusive). */
241
+ endTime?: string | undefined;
242
+ /** Optional: Filter the usage data. */
243
+ filter?: GetUsageTimeSeriesRequestUsageFilter | undefined;
244
+ /** Optional: Break down results by the given dimension names. When set, the response will contain a separate time series per unique combination of breakdown values. Valid values: "platform", "shape", "purpose", "github_repository", "github_branch", "github_workflow_name", "github_job_name", "buildkite_org_id", "buildkite_pipeline_id", "buildkite_pipeline_slug", "buildkite_repository", "buildkite_branch", "buildkite_job_name", "buildkite_job_state". */
245
+ breakdownBy?: StringList | undefined;
246
+ }
247
+ export type DoubleList = Array<number>;
248
+ export interface TimeSeriesDoubles {
249
+ values: DoubleList;
250
+ }
251
+ export type TimeSeriesDoublesMap = { [key: string]: TimeSeriesDoubles | undefined };
252
+ export interface TimeSeriesIntegers {
253
+ values: StringList;
254
+ }
255
+ export type TimeSeriesIntegersMap = { [key: string]: TimeSeriesIntegers | undefined };
256
+ export type TimeSeriesStrings = TimeSeriesIntegers;
257
+ export type TimeSeriesStringsMap = { [key: string]: TimeSeriesIntegers | undefined };
258
+ /** Represents a time series of data, associating multiple string-keyed data points to each timestamp. Each data point N has a timestamp stored in timestamps[N]. Data associated with that timestamp is then stored in: - doubles[key].values[N] if the data is represented as a double - integers[key].values[N] if the data is represented as a int64 - strings[key].values[N] if the data is represented as a string The API that returns a TimeSeries describes which keys will be present. */
259
+ export interface TimeSeries {
260
+ /** timestamps are represented as the number of nanoseconds elapsed since January 1, 1970 UTC. */
261
+ timestamps: StringList;
262
+ doubles: TimeSeriesDoublesMap;
263
+ integers: TimeSeriesIntegersMap;
264
+ strings: TimeSeriesStringsMap;
265
+ }
266
+ export interface GetUsageTimeSeriesResponse {
267
+ timeSeries?: TimeSeries | undefined;
268
+ }
269
+ export interface GetVolumeUsageRequest {
270
+ /** Optional: If no start date is provided, then return usage starting from the first day of the current month. Period start is inclusive. */
271
+ periodStart?: GetUsageRequestDate | undefined;
272
+ /** Optional: Limits the time range of the returned results. Period end is inclusive. Period end has to be in the same month as period start. */
273
+ periodEnd?: GetUsageRequestDate | undefined;
274
+ }
275
+ export interface GetVolumeUsageResponseVolumeUsage {
276
+ /** Active cache volume snapshot usage, in GB-minutes. Divide by 60 for GB-hours. */
277
+ cacheSnapshotGbMinutes: string;
278
+ /** At-rest cache volume storage, in MB-minutes. Divide by (1024 * 60 * 24) for GB-days. */
279
+ cacheStorageMbMinutes: string;
280
+ /** At-rest persistent (block) volume storage, in GB-minutes. Divide by (60 * 24) for GB-days. */
281
+ persistentVolumeStorageGbMinutes: string;
282
+ }
283
+ export interface GetVolumeUsageResponse {
284
+ /** Cumulated volume usage for the requested period. */
285
+ total?: GetVolumeUsageResponseVolumeUsage | undefined;
286
+ }
287
+ export type GetArtifactUsageError =
288
+ | InvalidArgument
289
+ | FailedPrecondition
290
+ | Unauthenticated
291
+ | PermissionDenied
292
+ | NotFound
293
+ | AlreadyExists
294
+ | ResourceExhausted
295
+ | NamespaceLabsOpError;
296
+ /** Returns object storage usage per product (at-rest storage and reads) of a tenant starting from the provided start date. If no start date is provided, then it returns usage starting from the first day of the current month. */
297
+ export const getArtifactUsage: API.OperationMethod<
298
+ GetArtifactUsageRequest,
299
+ GetArtifactUsageResponse,
300
+ GetArtifactUsageError,
301
+ NamespaceLabsOpContext
302
+ > = /*@__PURE__*/ API.make(() => ({
303
+ input: __S(33, __c2, 1) as any as S.Schema<GetArtifactUsageRequest>,
304
+ output: __S(36, __c2, 4) as any as S.Schema<GetArtifactUsageResponse>,
305
+ errors: [
306
+ InvalidArgument,
307
+ FailedPrecondition,
308
+ Unauthenticated,
309
+ PermissionDenied,
310
+ NotFound,
311
+ AlreadyExists,
312
+ ResourceExhausted,
313
+ ],
314
+ serviceErrors: NamespaceLabsServiceErrors,
315
+ protocol: NamespaceLabsProtocol,
316
+ retry: Retry.Retry,
317
+ telemetry: TELEMETRY,
318
+ span: "GetArtifactUsage",
319
+ }));
320
+
321
+ export type GetConcurrencyError =
322
+ | InvalidArgument
323
+ | FailedPrecondition
324
+ | Unauthenticated
325
+ | PermissionDenied
326
+ | NotFound
327
+ | AlreadyExists
328
+ | ResourceExhausted
329
+ | NamespaceLabsOpError;
330
+ /** Returns a point-in-time view of active compute resources and limits, grouped by concurrency pool. Pools can overlap, so clients should not sum their usage. */
331
+ export const getConcurrency: API.OperationMethod<
332
+ GetConcurrencyRequest,
333
+ GetConcurrencyResponse,
334
+ GetConcurrencyError,
335
+ NamespaceLabsOpContext
336
+ > = /*@__PURE__*/ API.make(() => ({
337
+ input: __S(64, __c4, 0) as any as S.Schema<GetConcurrencyRequest>,
338
+ output: __S(69, __c4, 5) as any as S.Schema<GetConcurrencyResponse>,
339
+ errors: [
340
+ InvalidArgument,
341
+ FailedPrecondition,
342
+ Unauthenticated,
343
+ PermissionDenied,
344
+ NotFound,
345
+ AlreadyExists,
346
+ ResourceExhausted,
347
+ ],
348
+ serviceErrors: NamespaceLabsServiceErrors,
349
+ protocol: NamespaceLabsProtocol,
350
+ retry: Retry.Retry,
351
+ telemetry: TELEMETRY,
352
+ span: "GetConcurrency",
353
+ }));
354
+
355
+ export type GetUsageError =
356
+ | InvalidArgument
357
+ | FailedPrecondition
358
+ | Unauthenticated
359
+ | PermissionDenied
360
+ | NotFound
361
+ | AlreadyExists
362
+ | ResourceExhausted
363
+ | NamespaceLabsOpError;
364
+ /** Returns the compute usage of a tenant starting from the provided start date. If no start date is provided, then it returns the compute usage starting from first day of the current month. */
365
+ export const getUsage: API.OperationMethod<
366
+ GetUsageRequest,
367
+ GetUsageResponse,
368
+ GetUsageError,
369
+ NamespaceLabsOpContext
370
+ > = /*@__PURE__*/ API.make(() => ({
371
+ input: __S(96, __c6, 0) as any as S.Schema<GetUsageRequest>,
372
+ output: __S(102, __c6, 6) as any as S.Schema<GetUsageResponse>,
373
+ errors: [
374
+ InvalidArgument,
375
+ FailedPrecondition,
376
+ Unauthenticated,
377
+ PermissionDenied,
378
+ NotFound,
379
+ AlreadyExists,
380
+ ResourceExhausted,
381
+ ],
382
+ serviceErrors: NamespaceLabsServiceErrors,
383
+ protocol: NamespaceLabsProtocol,
384
+ retry: Retry.Retry,
385
+ telemetry: TELEMETRY,
386
+ span: "GetUsage",
387
+ }));
388
+
389
+ export type GetUsageTimeSeriesError =
390
+ | InvalidArgument
391
+ | FailedPrecondition
392
+ | Unauthenticated
393
+ | PermissionDenied
394
+ | NotFound
395
+ | AlreadyExists
396
+ | ResourceExhausted
397
+ | NamespaceLabsOpError;
398
+ /** Returns compute usage as a time series for the specified time range. Supports filtering and breaking down results by various dimensions. */
399
+ export const getUsageTimeSeries: API.OperationMethod<
400
+ GetUsageTimeSeriesRequest,
401
+ GetUsageTimeSeriesResponse,
402
+ GetUsageTimeSeriesError,
403
+ NamespaceLabsOpContext
404
+ > = /*@__PURE__*/ API.make(() => ({
405
+ input: __S(1, __c0, 1) as any as S.Schema<GetUsageTimeSeriesRequest>,
406
+ output: __S(8, __c0, 8) as any as S.Schema<GetUsageTimeSeriesResponse>,
407
+ errors: [
408
+ InvalidArgument,
409
+ FailedPrecondition,
410
+ Unauthenticated,
411
+ PermissionDenied,
412
+ NotFound,
413
+ AlreadyExists,
414
+ ResourceExhausted,
415
+ ],
416
+ serviceErrors: NamespaceLabsServiceErrors,
417
+ protocol: NamespaceLabsProtocol,
418
+ retry: Retry.Retry,
419
+ telemetry: TELEMETRY,
420
+ span: "GetUsageTimeSeries",
421
+ }));
422
+
423
+ export type GetVolumeUsageError =
424
+ | InvalidArgument
425
+ | FailedPrecondition
426
+ | Unauthenticated
427
+ | PermissionDenied
428
+ | NotFound
429
+ | AlreadyExists
430
+ | ResourceExhausted
431
+ | NamespaceLabsOpError;
432
+ /** Returns volume usage of a tenant starting from the provided start date. This covers both cache volumes (active snapshot and at-rest storage) and persistent (block) volumes (at-rest storage). If no start date is provided, then it returns usage starting from the first day of the current month. */
433
+ export const getVolumeUsage: API.OperationMethod<
434
+ GetVolumeUsageRequest,
435
+ GetVolumeUsageResponse,
436
+ GetVolumeUsageError,
437
+ NamespaceLabsOpContext
438
+ > = /*@__PURE__*/ API.make(() => ({
439
+ input: __S(16, __c1, 0) as any as S.Schema<GetVolumeUsageRequest>,
440
+ output: __S(18, __c1, 2) as any as S.Schema<GetVolumeUsageResponse>,
441
+ errors: [
442
+ InvalidArgument,
443
+ FailedPrecondition,
444
+ Unauthenticated,
445
+ PermissionDenied,
446
+ NotFound,
447
+ AlreadyExists,
448
+ ResourceExhausted,
449
+ ],
450
+ serviceErrors: NamespaceLabsServiceErrors,
451
+ protocol: NamespaceLabsProtocol,
452
+ retry: Retry.Retry,
453
+ telemetry: TELEMETRY,
454
+ span: "GetVolumeUsage",
455
+ }));
456
+
457
+ // Schema builders: each runs one schema initializer, on that schema's first use.
458
+ function __c0(j: number): any {
459
+ switch (j) {
460
+ case 0:
461
+ return S.suspend(() =>
462
+ S.Struct({
463
+ platform: S.optional(__S(112, __c7, 0)),
464
+ shape: S.optional(__S(112, __c7, 0)),
465
+ purpose: S.optional(__S(112, __c7, 0)),
466
+ githubRepository: S.optional(__S(112, __c7, 0)),
467
+ githubBranch: S.optional(__S(112, __c7, 0)),
468
+ githubWorkflowName: S.optional(__S(112, __c7, 0)),
469
+ githubJobName: S.optional(__S(112, __c7, 0)),
470
+ githubProfile: S.optional(__S(112, __c7, 0)),
471
+ githubJobConclusion: S.optional(__S(112, __c7, 0)),
472
+ buildkiteOrgId: S.optional(__S(112, __c7, 0)),
473
+ buildkitePipelineId: S.optional(__S(112, __c7, 0)),
474
+ buildkitePipelineSlug: S.optional(__S(112, __c7, 0)),
475
+ buildkiteRepository: S.optional(__S(112, __c7, 0)),
476
+ buildkiteBranch: S.optional(__S(112, __c7, 0)),
477
+ buildkiteJobName: S.optional(__S(112, __c7, 0)),
478
+ buildkiteJobState: S.optional(__S(112, __c7, 0)),
479
+ }),
480
+ ).annotate({ identifier: "GetUsageTimeSeriesRequestUsageFilter" });
481
+ case 1:
482
+ return S.suspend(() =>
483
+ S.Struct({
484
+ startTime: S.optional(S.String),
485
+ endTime: S.optional(S.String),
486
+ filter: S.optional(__S(0, __c0, 0)),
487
+ breakdownBy: S.optional(__S(80, __c5, 0)),
488
+ }).pipe(
489
+ T.Http({
490
+ method: "POST",
491
+ uri: "/namespace.cloud.compute.v1beta.UsageService/GetUsageTimeSeries",
492
+ code: 200,
493
+ }),
494
+ ),
495
+ ).annotate({ identifier: "GetUsageTimeSeriesRequest" });
496
+ case 2:
497
+ return S.Array(S.Number);
498
+ case 3:
499
+ return S.suspend(() =>
500
+ S.Struct({
501
+ values: __S(2, __c0, 2),
502
+ }),
503
+ ).annotate({ identifier: "TimeSeriesDoubles" });
504
+ case 4:
505
+ return S.Record(S.String, __S(3, __c0, 3));
506
+ case 5:
507
+ return S.suspend(() =>
508
+ S.Struct({
509
+ values: __S(80, __c5, 0),
510
+ }),
511
+ ).annotate({ identifier: "TimeSeriesIntegers" });
512
+ case 6:
513
+ return S.Record(S.String, __S(5, __c0, 5));
514
+ case 7:
515
+ return S.suspend(() =>
516
+ S.Struct({
517
+ timestamps: __S(80, __c5, 0),
518
+ doubles: __S(4, __c0, 4),
519
+ integers: __S(6, __c0, 6),
520
+ strings: __S(6, __c0, 6),
521
+ }),
522
+ ).annotate({ identifier: "TimeSeries" });
523
+ case 8:
524
+ return S.suspend(() =>
525
+ S.Struct({
526
+ timeSeries: S.optional(__S(7, __c0, 7)),
527
+ }),
528
+ ).annotate({ identifier: "GetUsageTimeSeriesResponse" });
529
+ }
530
+ }
531
+ function __c1(j: number): any {
532
+ switch (j) {
533
+ case 0:
534
+ return S.suspend(() =>
535
+ S.Struct({
536
+ periodStart: S.optional(__S(48, __c3, 0)),
537
+ periodEnd: S.optional(__S(48, __c3, 0)),
538
+ }).pipe(
539
+ T.Http({
540
+ method: "POST",
541
+ uri: "/namespace.cloud.compute.v1beta.UsageService/GetVolumeUsage",
542
+ code: 200,
543
+ }),
544
+ ),
545
+ ).annotate({ identifier: "GetVolumeUsageRequest" });
546
+ case 1:
547
+ return S.suspend(() =>
548
+ S.Struct({
549
+ cacheSnapshotGbMinutes: S.String,
550
+ cacheStorageMbMinutes: S.String,
551
+ persistentVolumeStorageGbMinutes: S.String,
552
+ }),
553
+ ).annotate({ identifier: "GetVolumeUsageResponseVolumeUsage" });
554
+ case 2:
555
+ return S.suspend(() =>
556
+ S.Struct({
557
+ total: S.optional(__S(17, __c1, 1)),
558
+ }),
559
+ ).annotate({ identifier: "GetVolumeUsageResponse" });
560
+ }
561
+ }
562
+ function __c2(j: number): any {
563
+ switch (j) {
564
+ case 0:
565
+ return S.Array(S.String);
566
+ case 1:
567
+ return S.suspend(() =>
568
+ S.Struct({
569
+ periodStart: S.optional(__S(48, __c3, 0)),
570
+ periodEnd: S.optional(__S(48, __c3, 0)),
571
+ products: S.optional(__S(32, __c2, 0)),
572
+ }).pipe(
573
+ T.Http({
574
+ method: "POST",
575
+ uri: "/namespace.cloud.compute.v1beta.UsageService/GetArtifactUsage",
576
+ code: 200,
577
+ }),
578
+ ),
579
+ ).annotate({ identifier: "GetArtifactUsageRequest" });
580
+ case 2:
581
+ return S.suspend(() =>
582
+ S.Struct({
583
+ product: S.String,
584
+ storageGbMinutes: S.String,
585
+ readsBytes: S.String,
586
+ }),
587
+ ).annotate({ identifier: "GetArtifactUsageResponseProductUsage" });
588
+ case 3:
589
+ return S.Array(__S(34, __c2, 2));
590
+ case 4:
591
+ return S.suspend(() =>
592
+ S.Struct({
593
+ products: __S(35, __c2, 3),
594
+ }),
595
+ ).annotate({ identifier: "GetArtifactUsageResponse" });
596
+ }
597
+ }
598
+ function __c3(j: number): any {
599
+ switch (j) {
600
+ case 0:
601
+ return S.suspend(() =>
602
+ S.Struct({
603
+ year: S.optional(S.Number),
604
+ month: S.optional(S.Number),
605
+ day: S.optional(S.Number),
606
+ }),
607
+ ).annotate({ identifier: "GetUsageRequestDate" });
608
+ }
609
+ }
610
+ function __c4(j: number): any {
611
+ switch (j) {
612
+ case 0:
613
+ return S.suspend(() =>
614
+ S.Struct({}).pipe(
615
+ T.Http({
616
+ method: "POST",
617
+ uri: "/namespace.cloud.compute.v1beta.UsageService/GetConcurrency",
618
+ code: 200,
619
+ }),
620
+ ),
621
+ ).annotate({ identifier: "GetConcurrencyRequest" });
622
+ case 1:
623
+ return S.suspend(() =>
624
+ S.Struct({
625
+ maxCpu: S.String,
626
+ maxMemoryMb: S.String,
627
+ maxInstanceCount: S.String,
628
+ }),
629
+ ).annotate({ identifier: "UsagePolicyConcurrencyLimits" });
630
+ case 2:
631
+ return S.suspend(() =>
632
+ S.Struct({
633
+ instanceCount: S.String,
634
+ cpu: S.String,
635
+ memoryMb: S.String,
636
+ }),
637
+ ).annotate({ identifier: "PlatformConcurrencyActiveConcurrency" });
638
+ case 3:
639
+ return S.suspend(() =>
640
+ S.Struct({
641
+ name: S.String,
642
+ platforms: __S(80, __c5, 0),
643
+ limits: S.optional(__S(65, __c4, 1)),
644
+ activeConcurrency: S.optional(__S(66, __c4, 2)),
645
+ }),
646
+ ).annotate({ identifier: "PlatformConcurrency" });
647
+ case 4:
648
+ return S.Array(__S(67, __c4, 3));
649
+ case 5:
650
+ return S.suspend(() =>
651
+ S.Struct({
652
+ concurrency: __S(68, __c4, 4),
653
+ }),
654
+ ).annotate({ identifier: "GetConcurrencyResponse" });
655
+ }
656
+ }
657
+ function __c5(j: number): any {
658
+ switch (j) {
659
+ case 0:
660
+ return S.Array(S.String);
661
+ }
662
+ }
663
+ function __c6(j: number): any {
664
+ switch (j) {
665
+ case 0:
666
+ return S.suspend(() =>
667
+ S.Struct({
668
+ periodStart: S.optional(__S(48, __c3, 0)),
669
+ periodEnd: S.optional(__S(48, __c3, 0)),
670
+ matchPlatform: S.optional(__S(112, __c7, 0)),
671
+ matchShape: S.optional(__S(112, __c7, 0)),
672
+ matchGithubProfile: S.optional(__S(112, __c7, 0)),
673
+ matchGithubRepository: S.optional(__S(112, __c7, 0)),
674
+ }).pipe(
675
+ T.Http({
676
+ method: "POST",
677
+ uri: "/namespace.cloud.compute.v1beta.UsageService/GetUsage",
678
+ code: 200,
679
+ }),
680
+ ),
681
+ ).annotate({ identifier: "GetUsageRequest" });
682
+ case 1:
683
+ return S.suspend(() =>
684
+ S.Struct({
685
+ unit: S.String,
686
+ wall: S.String,
687
+ }),
688
+ ).annotate({ identifier: "UsageRecordMinutes" });
689
+ case 2:
690
+ return S.suspend(() =>
691
+ S.Struct({
692
+ count: S.String,
693
+ unitMinutes: S.String,
694
+ wallMinutes: S.String,
695
+ }),
696
+ ).annotate({ identifier: "UsageRecordBuilds" });
697
+ case 3:
698
+ return S.suspend(() =>
699
+ S.Struct({
700
+ instanceMinutes: S.optional(__S(97, __c6, 1)),
701
+ builds: S.optional(__S(98, __c6, 2)),
702
+ }),
703
+ ).annotate({ identifier: "UsageRecordUsage" });
704
+ case 4:
705
+ return S.suspend(() =>
706
+ S.Struct({
707
+ year: S.Number,
708
+ month: S.Number,
709
+ day: S.Number,
710
+ total: S.optional(__S(99, __c6, 3)),
711
+ }),
712
+ ).annotate({ identifier: "UsageRecord" });
713
+ case 5:
714
+ return S.Array(__S(100, __c6, 4));
715
+ case 6:
716
+ return S.suspend(() =>
717
+ S.Struct({
718
+ total: S.optional(__S(99, __c6, 3)),
719
+ perDay: __S(101, __c6, 5),
720
+ }),
721
+ ).annotate({ identifier: "GetUsageResponse" });
722
+ }
723
+ }
724
+ function __c7(j: number): any {
725
+ switch (j) {
726
+ case 0:
727
+ return S.suspend(() =>
728
+ S.Struct({
729
+ values: S.optional(__S(80, __c5, 0)),
730
+ op: S.optional(S.String),
731
+ }),
732
+ ).annotate({ identifier: "StringMatcher" });
733
+ }
734
+ }
735
+ // Schema table: entry i is schema j of builder f, made on first reach.
736
+ function __S(i: number, f: (j: number) => unknown, j: number): any {
737
+ return (__s[i] ??= __L.at(f, j));
738
+ }