@pithy-sh/core 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/access/access.d.ts +172 -0
- package/dist/access/access.d.ts.map +1 -0
- package/dist/access/access.js +147 -0
- package/dist/access/acting.d.ts +49 -0
- package/dist/access/acting.d.ts.map +1 -0
- package/dist/access/acting.js +21 -0
- package/dist/access/policyCheck.d.ts +33 -0
- package/dist/access/policyCheck.d.ts.map +1 -0
- package/dist/access/policyCheck.js +48 -0
- package/dist/access/usage.d.ts +83 -0
- package/dist/access/usage.d.ts.map +1 -0
- package/dist/access/usage.js +104 -0
- package/dist/access/visibility.d.ts +66 -0
- package/dist/access/visibility.d.ts.map +1 -0
- package/dist/access/visibility.js +86 -0
- package/dist/audit/auditEvent.d.ts +5 -0
- package/dist/audit/auditEvent.d.ts.map +1 -1
- package/dist/audit/auditEvent.js +2 -0
- package/dist/capability/bindings.d.ts +47 -2
- package/dist/capability/bindings.d.ts.map +1 -1
- package/dist/capability/bindings.js +117 -7
- package/dist/capability/capability.d.ts +98 -28
- package/dist/capability/capability.d.ts.map +1 -1
- package/dist/capability/manifest.d.ts +2 -1
- package/dist/capability/manifest.d.ts.map +1 -1
- package/dist/capability/manifest.js +1 -1
- package/dist/capability/settings.d.ts +86 -2
- package/dist/capability/settings.d.ts.map +1 -1
- package/dist/capability/settings.js +80 -1
- package/dist/cli/commandCatalog.generated.d.ts +184 -22
- package/dist/cli/commandCatalog.generated.d.ts.map +1 -1
- package/dist/cli/commandCatalog.generated.js +196 -22
- package/dist/cli/commandFacts.d.ts +1 -1
- package/dist/cli/commandFacts.d.ts.map +1 -1
- package/dist/cli/commandFacts.js +1 -0
- package/dist/controlPlane/capability.d.ts.map +1 -1
- package/dist/controlPlane/capability.js +12 -2
- package/dist/controlPlane/context.d.ts +5 -0
- package/dist/controlPlane/context.d.ts.map +1 -1
- package/dist/controlPlane/context.js +3 -1
- package/dist/controlPlane/data/connection.d.ts +47 -0
- package/dist/controlPlane/data/connection.d.ts.map +1 -1
- package/dist/controlPlane/data/connection.js +55 -1
- package/dist/controlPlane/http/cors.d.ts +4 -4
- package/dist/controlPlane/http/cors.js +4 -4
- package/dist/controlPlane/http/guard.d.ts +11 -0
- package/dist/controlPlane/http/guard.d.ts.map +1 -1
- package/dist/controlPlane/http/guard.js +17 -1
- package/dist/controlPlane/http/handlers.d.ts +60 -0
- package/dist/controlPlane/http/handlers.d.ts.map +1 -1
- package/dist/controlPlane/http/handlers.js +31 -2
- package/dist/controlPlane/http/readiness.d.ts +33 -0
- package/dist/controlPlane/http/readiness.d.ts.map +1 -0
- package/dist/controlPlane/http/readiness.js +39 -0
- package/dist/controlPlane/http/responses.d.ts +147 -0
- package/dist/controlPlane/http/responses.d.ts.map +1 -1
- package/dist/controlPlane/http/responses.js +61 -4
- package/dist/controlPlane/http/routes.d.ts +1 -0
- package/dist/controlPlane/http/routes.d.ts.map +1 -1
- package/dist/controlPlane/http/routes.js +17 -3
- package/dist/controlPlane/http/verify.d.ts.map +1 -1
- package/dist/controlPlane/http/verify.js +2 -1
- package/dist/controlPlane/migrationState/migrationState.d.ts +102 -0
- package/dist/controlPlane/migrationState/migrationState.d.ts.map +1 -0
- package/dist/controlPlane/migrationState/migrationState.js +142 -0
- package/dist/controlPlane/migrations/0003_connection_principal.d.ts +21 -0
- package/dist/controlPlane/migrations/0003_connection_principal.d.ts.map +1 -0
- package/dist/controlPlane/migrations/0003_connection_principal.js +33 -0
- package/dist/controlPlane/scope/scope.d.ts +13 -2
- package/dist/controlPlane/scope/scope.d.ts.map +1 -1
- package/dist/controlPlane/scope/scope.js +14 -3
- package/dist/createBackend.d.ts.map +1 -1
- package/dist/createBackend.js +7 -2
- package/dist/createEntrypoint.d.ts.map +1 -1
- package/dist/createEntrypoint.js +5 -3
- package/dist/entitlement/allowance.d.ts +25 -0
- package/dist/entitlement/allowance.d.ts.map +1 -0
- package/dist/entitlement/allowance.js +80 -0
- package/dist/entitlement/entitlement.d.ts +41 -0
- package/dist/entitlement/entitlement.d.ts.map +1 -1
- package/dist/entitlement/meter.d.ts +57 -0
- package/dist/entitlement/meter.d.ts.map +1 -0
- package/dist/entitlement/meter.js +13 -0
- package/dist/error/http.d.ts +144 -0
- package/dist/error/http.d.ts.map +1 -1
- package/dist/error/payload.d.ts +288 -0
- package/dist/error/payload.d.ts.map +1 -1
- package/dist/error/payload.js +100 -4
- package/dist/http/authContext.d.ts +7 -0
- package/dist/http/authContext.d.ts.map +1 -1
- package/dist/http/authContext.js +8 -1
- package/dist/http/scopeGates.d.ts +20 -0
- package/dist/http/scopeGates.d.ts.map +1 -0
- package/dist/http/scopeGates.js +36 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/logger/record.d.ts +84 -0
- package/dist/logger/record.d.ts.map +1 -1
- package/dist/migrations/capabilitySets.d.ts +23 -0
- package/dist/migrations/capabilitySets.d.ts.map +1 -0
- package/dist/migrations/capabilitySets.js +74 -0
- package/dist/migrations/registry.d.ts +26 -0
- package/dist/migrations/registry.d.ts.map +1 -1
- package/dist/migrations/registry.js +38 -7
- package/dist/migrations/state.d.ts +60 -0
- package/dist/migrations/state.d.ts.map +1 -0
- package/dist/migrations/state.js +46 -0
- package/dist/naming/feature.d.ts +27 -5
- package/dist/naming/feature.d.ts.map +1 -1
- package/dist/naming/feature.js +36 -6
- package/dist/naming/limits.d.ts +47 -3
- package/dist/naming/limits.d.ts.map +1 -1
- package/dist/naming/limits.js +47 -3
- package/dist/naming/provisionScope.d.ts +6 -0
- package/dist/naming/provisionScope.d.ts.map +1 -1
- package/dist/naming/provisionScope.js +8 -3
- package/dist/naming/resourceNames.d.ts +21 -2
- package/dist/naming/resourceNames.d.ts.map +1 -1
- package/dist/naming/resourceNames.js +21 -3
- package/dist/seed/writeD1.d.ts +7 -1
- package/dist/seed/writeD1.d.ts.map +1 -1
- package/dist/seed/writeD1.js +9 -3
- package/dist/seed/writeKv.d.ts +2 -0
- package/dist/seed/writeKv.d.ts.map +1 -1
- package/dist/seed/writeKv.js +6 -2
- package/dist/version.generated.d.ts +1 -1
- package/dist/version.generated.js +1 -1
- package/dist/worker/serviceLoopback.d.ts +36 -0
- package/dist/worker/serviceLoopback.d.ts.map +1 -0
- package/dist/worker/serviceLoopback.js +74 -0
- package/dist/workflow/faults.d.ts +12 -1
- package/dist/workflow/faults.d.ts.map +1 -1
- package/dist/workflow/faults.js +22 -15
- package/package.json +2 -2
- package/src/access/access.ts +298 -0
- package/src/access/acting.ts +59 -0
- package/src/access/policyCheck.ts +77 -0
- package/src/access/usage.ts +141 -0
- package/src/access/visibility.ts +109 -0
- package/src/audit/auditEvent.ts +4 -0
- package/src/capability/bindings.ts +159 -13
- package/src/capability/capability.ts +99 -29
- package/src/capability/settings.ts +146 -2
- package/src/cli/commandCatalog.generated.ts +212 -22
- package/src/cli/commandFacts.ts +1 -0
- package/src/controlPlane/capability.ts +25 -1
- package/src/controlPlane/context.ts +4 -0
- package/src/controlPlane/data/connection.ts +90 -0
- package/src/controlPlane/http/cors.ts +4 -4
- package/src/controlPlane/http/guard.ts +21 -0
- package/src/controlPlane/http/handlers.ts +41 -0
- package/src/controlPlane/http/readiness.ts +50 -0
- package/src/controlPlane/http/responses.ts +140 -2
- package/src/controlPlane/http/routes.ts +25 -1
- package/src/controlPlane/http/verify.ts +2 -0
- package/src/controlPlane/migrationState/migrationState.ts +200 -0
- package/src/controlPlane/migrations/0003_connection_principal.ts +37 -0
- package/src/controlPlane/scope/scope.ts +14 -2
- package/src/createBackend.ts +24 -6
- package/src/createEntrypoint.ts +9 -3
- package/src/entitlement/allowance.ts +85 -0
- package/src/entitlement/entitlement.ts +38 -0
- package/src/entitlement/meter.ts +69 -0
- package/src/error/payload.ts +211 -4
- package/src/http/authContext.ts +13 -1
- package/src/http/scopeGates.ts +34 -0
- package/src/index.ts +1 -0
- package/src/migrations/capabilitySets.ts +87 -0
- package/src/migrations/registry.ts +46 -2
- package/src/migrations/state.ts +94 -0
- package/src/naming/feature.ts +46 -7
- package/src/naming/limits.ts +35 -3
- package/src/naming/provisionScope.ts +19 -1
- package/src/naming/resourceNames.ts +52 -5
- package/src/seed/writeD1.ts +13 -4
- package/src/seed/writeKv.ts +6 -2
- package/src/version.generated.ts +1 -1
- package/src/worker/serviceLoopback.ts +105 -0
- package/src/workflow/faults.ts +51 -24
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
import type { Capability } from "../capability/capability";
|
|
4
|
+
import type { Logger } from "../logger/logger";
|
|
5
|
+
/**
|
|
6
|
+
* The usage-meter seam — how a capability that writes the rows a meter counts asks whether one more is
|
|
7
|
+
* allowed, when there is no request to ask through.
|
|
8
|
+
*
|
|
9
|
+
* `@pithy-sh/email` enqueues from a route, from a Workflow step and from a cron, and only the first has a
|
|
10
|
+
* `c.var.entitlements`. So the meter it charges is found the way the ledger is found — among the composed
|
|
11
|
+
* capabilities, by a structural predicate — and it is handed the holder explicitly. Nothing here imports the
|
|
12
|
+
* provider: an email capability composed with no payments finds no meter and enqueues as it always did.
|
|
13
|
+
*
|
|
14
|
+
* **A meter refuses; it never bills.** `charge` either records the use or throws the provider's own refusal
|
|
15
|
+
* (`payments/quota_exceeded`, 402). What it counted is never reported to a store — the kit does not sell
|
|
16
|
+
* overage — so this seam has no way to read a count back out.
|
|
17
|
+
*/
|
|
18
|
+
/** Who a charge is against: the holder pair, exactly as the provider keys it. */
|
|
19
|
+
export interface MeterSubject {
|
|
20
|
+
/** The kind of holder — `user` or `organization` under `@pithy-sh/payments`. */
|
|
21
|
+
readonly subjectType: string;
|
|
22
|
+
/** The holder's id. */
|
|
23
|
+
readonly subjectId: string;
|
|
24
|
+
}
|
|
25
|
+
/** One charge against one meter. */
|
|
26
|
+
export interface MeterCharge {
|
|
27
|
+
/** Who uses it. */
|
|
28
|
+
readonly subject: MeterSubject;
|
|
29
|
+
/** Which meter — `emails`. */
|
|
30
|
+
readonly meter: string;
|
|
31
|
+
/** How many. A whole number from 1. */
|
|
32
|
+
readonly amount: number;
|
|
33
|
+
/** The clock. Defaults to now. */
|
|
34
|
+
readonly now?: Date;
|
|
35
|
+
/** Where a refused or failed charge is logged. Optional; the provider logs through its own when absent. */
|
|
36
|
+
readonly log?: Logger;
|
|
37
|
+
}
|
|
38
|
+
/** The meter a provider exposes. */
|
|
39
|
+
export interface UsageMeter {
|
|
40
|
+
/** The capability answering — `payments`. */
|
|
41
|
+
readonly provider: string;
|
|
42
|
+
/**
|
|
43
|
+
* Record `amount` of `meter` against `subject`, or refuse. An advisory meter records nothing and refuses
|
|
44
|
+
* nothing. **A charge that cannot be checked refuses**, because under-counting has no recovery.
|
|
45
|
+
*/
|
|
46
|
+
charge(env: Record<string, unknown>, charge: MeterCharge): Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
/** A composed capability that provides a meter. */
|
|
49
|
+
export interface UsageMeterProvider extends Capability {
|
|
50
|
+
/** The meter. */
|
|
51
|
+
readonly usageMeter: UsageMeter;
|
|
52
|
+
}
|
|
53
|
+
/** Whether a composed capability provides a usage meter. Structural, so no provider package is imported. */
|
|
54
|
+
export declare function isUsageMeterProvider(capability: Capability): capability is UsageMeterProvider;
|
|
55
|
+
/** The composed usage meter, or undefined when nothing composed provides one. */
|
|
56
|
+
export declare function composedUsageMeter(capabilities: readonly Capability[]): UsageMeter | undefined;
|
|
57
|
+
//# sourceMappingURL=meter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meter.d.ts","sourceRoot":"","sources":["../../src/entitlement/meter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C;;;;;;;;;;;;GAYG;AAEH,iFAAiF;AACjF,MAAM,WAAW,YAAY;IAC3B,gFAAgF;IAChF,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,uBAAuB;IACvB,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;CAC5B;AAED,oCAAoC;AACpC,MAAM,WAAW,WAAW;IAC1B,mBAAmB;IACnB,QAAQ,CAAC,OAAO,EAAE,YAAY,CAAC;IAC/B,8BAA8B;IAC9B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,kCAAkC;IAClC,QAAQ,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;IACpB,2GAA2G;IAC3G,QAAQ,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,oCAAoC;AACpC,MAAM,WAAW,UAAU;IACzB,6CAA6C;IAC7C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E;AAED,mDAAmD;AACnD,MAAM,WAAW,kBAAmB,SAAQ,UAAU;IACpD,iBAAiB;IACjB,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;CACjC;AAED,4GAA4G;AAC5G,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,UAAU,GAAG,UAAU,IAAI,kBAAkB,CAG7F;AAED,iFAAiF;AACjF,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,SAAS,UAAU,EAAE,GAAG,UAAU,GAAG,SAAS,CAE9F"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: 2026 Pithy
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
//#region src/entitlement/meter.ts
|
|
4
|
+
/** Whether a composed capability provides a usage meter. Structural, so no provider package is imported. */
|
|
5
|
+
function isUsageMeterProvider(capability) {
|
|
6
|
+
return typeof capability.usageMeter?.charge === "function";
|
|
7
|
+
}
|
|
8
|
+
/** The composed usage meter, or undefined when nothing composed provides one. */
|
|
9
|
+
function composedUsageMeter(capabilities) {
|
|
10
|
+
return capabilities.find(isUsageMeterProvider)?.usageMeter;
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { composedUsageMeter, isUsageMeterProvider };
|
package/dist/error/http.d.ts
CHANGED
|
@@ -213,6 +213,16 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
213
213
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
214
214
|
code: z.ZodLiteral<"turnstile/config">;
|
|
215
215
|
status: z.ZodLiteral<500>;
|
|
216
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
217
|
+
message: z.ZodString;
|
|
218
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
219
|
+
code: z.ZodLiteral<"turnstile/analytics_window">;
|
|
220
|
+
status: z.ZodLiteral<400>;
|
|
221
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
222
|
+
message: z.ZodString;
|
|
223
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
224
|
+
code: z.ZodLiteral<"turnstile/analytics_unavailable">;
|
|
225
|
+
status: z.ZodLiteral<409>;
|
|
216
226
|
}, z.core.$strip>, z.ZodObject<{
|
|
217
227
|
message: z.ZodString;
|
|
218
228
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -228,6 +238,11 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
228
238
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
229
239
|
code: z.ZodLiteral<"media/not_found">;
|
|
230
240
|
status: z.ZodLiteral<404>;
|
|
241
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
242
|
+
message: z.ZodString;
|
|
243
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
244
|
+
code: z.ZodLiteral<"media/forbidden">;
|
|
245
|
+
status: z.ZodLiteral<403>;
|
|
231
246
|
}, z.core.$strip>, z.ZodObject<{
|
|
232
247
|
message: z.ZodString;
|
|
233
248
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -243,6 +258,16 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
243
258
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
244
259
|
code: z.ZodLiteral<"media/enrichment_failed">;
|
|
245
260
|
status: z.ZodLiteral<500>;
|
|
261
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
262
|
+
message: z.ZodString;
|
|
263
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
264
|
+
code: z.ZodLiteral<"media/analytics_window">;
|
|
265
|
+
status: z.ZodLiteral<400>;
|
|
266
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
267
|
+
message: z.ZodString;
|
|
268
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
269
|
+
code: z.ZodLiteral<"media/analytics_unavailable">;
|
|
270
|
+
status: z.ZodLiteral<409>;
|
|
246
271
|
}, z.core.$strip>, z.ZodObject<{
|
|
247
272
|
message: z.ZodString;
|
|
248
273
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -553,6 +578,16 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
553
578
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
554
579
|
code: z.ZodLiteral<"payments/subscription_change_refused">;
|
|
555
580
|
status: z.ZodLiteral<409>;
|
|
581
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
582
|
+
message: z.ZodString;
|
|
583
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
584
|
+
code: z.ZodLiteral<"payments/override_stale">;
|
|
585
|
+
status: z.ZodLiteral<409>;
|
|
586
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
587
|
+
message: z.ZodString;
|
|
588
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
589
|
+
code: z.ZodLiteral<"payments/quota_exceeded">;
|
|
590
|
+
status: z.ZodLiteral<402>;
|
|
556
591
|
}, z.core.$strip>, z.ZodObject<{
|
|
557
592
|
message: z.ZodString;
|
|
558
593
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -613,6 +648,31 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
613
648
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
614
649
|
code: z.ZodLiteral<"organization/nomination_invalid">;
|
|
615
650
|
status: z.ZodLiteral<400>;
|
|
651
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
652
|
+
message: z.ZodString;
|
|
653
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
654
|
+
code: z.ZodLiteral<"artifacts/not_found">;
|
|
655
|
+
status: z.ZodLiteral<404>;
|
|
656
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
657
|
+
message: z.ZodString;
|
|
658
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
659
|
+
code: z.ZodLiteral<"artifacts/forbidden">;
|
|
660
|
+
status: z.ZodLiteral<403>;
|
|
661
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
662
|
+
message: z.ZodString;
|
|
663
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
664
|
+
code: z.ZodLiteral<"artifacts/invalid_name">;
|
|
665
|
+
status: z.ZodLiteral<400>;
|
|
666
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
667
|
+
message: z.ZodString;
|
|
668
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
669
|
+
code: z.ZodLiteral<"artifacts/name_taken">;
|
|
670
|
+
status: z.ZodLiteral<409>;
|
|
671
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
672
|
+
message: z.ZodString;
|
|
673
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
674
|
+
code: z.ZodLiteral<"artifacts/invalid_config">;
|
|
675
|
+
status: z.ZodLiteral<400>;
|
|
616
676
|
}, z.core.$strip>, z.ZodObject<{
|
|
617
677
|
message: z.ZodString;
|
|
618
678
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -964,6 +1024,20 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
964
1024
|
detail: z.ZodOptional<z.ZodString>;
|
|
965
1025
|
code: z.ZodLiteral<"turnstile/config">;
|
|
966
1026
|
status: z.ZodLiteral<500>;
|
|
1027
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1028
|
+
message: z.ZodString;
|
|
1029
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1030
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1031
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1032
|
+
code: z.ZodLiteral<"turnstile/analytics_window">;
|
|
1033
|
+
status: z.ZodLiteral<400>;
|
|
1034
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1035
|
+
message: z.ZodString;
|
|
1036
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1037
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1038
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1039
|
+
code: z.ZodLiteral<"turnstile/analytics_unavailable">;
|
|
1040
|
+
status: z.ZodLiteral<409>;
|
|
967
1041
|
}, z.core.$strip>, z.ZodObject<{
|
|
968
1042
|
message: z.ZodString;
|
|
969
1043
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -985,6 +1059,13 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
985
1059
|
detail: z.ZodOptional<z.ZodString>;
|
|
986
1060
|
code: z.ZodLiteral<"media/not_found">;
|
|
987
1061
|
status: z.ZodLiteral<404>;
|
|
1062
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1063
|
+
message: z.ZodString;
|
|
1064
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1065
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1066
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1067
|
+
code: z.ZodLiteral<"media/forbidden">;
|
|
1068
|
+
status: z.ZodLiteral<403>;
|
|
988
1069
|
}, z.core.$strip>, z.ZodObject<{
|
|
989
1070
|
message: z.ZodString;
|
|
990
1071
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1006,6 +1087,20 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
1006
1087
|
detail: z.ZodOptional<z.ZodString>;
|
|
1007
1088
|
code: z.ZodLiteral<"media/enrichment_failed">;
|
|
1008
1089
|
status: z.ZodLiteral<500>;
|
|
1090
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1091
|
+
message: z.ZodString;
|
|
1092
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1093
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1094
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1095
|
+
code: z.ZodLiteral<"media/analytics_window">;
|
|
1096
|
+
status: z.ZodLiteral<400>;
|
|
1097
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1098
|
+
message: z.ZodString;
|
|
1099
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1100
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1101
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1102
|
+
code: z.ZodLiteral<"media/analytics_unavailable">;
|
|
1103
|
+
status: z.ZodLiteral<409>;
|
|
1009
1104
|
}, z.core.$strip>, z.ZodObject<{
|
|
1010
1105
|
message: z.ZodString;
|
|
1011
1106
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1440,6 +1535,20 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
1440
1535
|
detail: z.ZodOptional<z.ZodString>;
|
|
1441
1536
|
code: z.ZodLiteral<"payments/subscription_change_refused">;
|
|
1442
1537
|
status: z.ZodLiteral<409>;
|
|
1538
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1539
|
+
message: z.ZodString;
|
|
1540
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1541
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1542
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1543
|
+
code: z.ZodLiteral<"payments/override_stale">;
|
|
1544
|
+
status: z.ZodLiteral<409>;
|
|
1545
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1546
|
+
message: z.ZodString;
|
|
1547
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1548
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1549
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1550
|
+
code: z.ZodLiteral<"payments/quota_exceeded">;
|
|
1551
|
+
status: z.ZodLiteral<402>;
|
|
1443
1552
|
}, z.core.$strip>, z.ZodObject<{
|
|
1444
1553
|
message: z.ZodString;
|
|
1445
1554
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
@@ -1524,6 +1633,41 @@ export declare const HttpError: z.ZodCodec<z.ZodUnion<readonly [z.ZodDiscriminat
|
|
|
1524
1633
|
detail: z.ZodOptional<z.ZodString>;
|
|
1525
1634
|
code: z.ZodLiteral<"organization/nomination_invalid">;
|
|
1526
1635
|
status: z.ZodLiteral<400>;
|
|
1636
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1637
|
+
message: z.ZodString;
|
|
1638
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1639
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1640
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1641
|
+
code: z.ZodLiteral<"artifacts/not_found">;
|
|
1642
|
+
status: z.ZodLiteral<404>;
|
|
1643
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1644
|
+
message: z.ZodString;
|
|
1645
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1646
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1647
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1648
|
+
code: z.ZodLiteral<"artifacts/forbidden">;
|
|
1649
|
+
status: z.ZodLiteral<403>;
|
|
1650
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1651
|
+
message: z.ZodString;
|
|
1652
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1653
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1654
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1655
|
+
code: z.ZodLiteral<"artifacts/invalid_name">;
|
|
1656
|
+
status: z.ZodLiteral<400>;
|
|
1657
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1658
|
+
message: z.ZodString;
|
|
1659
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1660
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1661
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1662
|
+
code: z.ZodLiteral<"artifacts/name_taken">;
|
|
1663
|
+
status: z.ZodLiteral<409>;
|
|
1664
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1665
|
+
message: z.ZodString;
|
|
1666
|
+
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
|
1667
|
+
action: z.ZodOptional<z.ZodString>;
|
|
1668
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1669
|
+
code: z.ZodLiteral<"artifacts/invalid_config">;
|
|
1670
|
+
status: z.ZodLiteral<400>;
|
|
1527
1671
|
}, z.core.$strip>, z.ZodObject<{
|
|
1528
1672
|
message: z.ZodString;
|
|
1529
1673
|
params: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>>>;
|
package/dist/error/http.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/error/http.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAGpC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAA4B,UAAU,EAAmB,MAAM,cAAc,CAAC;AAErF;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../src/error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