@zonastery/bursar 2.0.4 → 2.0.5
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/README.md +1 -1
- package/dist/billing/auto-recharge-service.d.ts.map +1 -1
- package/dist/billing/auto-recharge-service.js.map +1 -1
- package/dist/billing/billing-service.d.ts.map +1 -1
- package/dist/billing/billing-store.d.ts.map +1 -1
- package/dist/billing/event-handlers.d.ts.map +1 -1
- package/dist/billing/event-handlers.js.map +1 -1
- package/dist/billing/event-processor.d.ts.map +1 -1
- package/dist/billing/event-processor.js.map +1 -1
- package/dist/billing/financial-event-handlers.d.ts.map +1 -1
- package/dist/billing/financial-event-handlers.js.map +1 -1
- package/dist/billing/management.d.ts.map +1 -1
- package/dist/billing/management.js.map +1 -1
- package/dist/billing/policy-window.js.map +1 -1
- package/dist/billing/postgres/repositories/auto-recharge.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/auto-recharge.js.map +1 -1
- package/dist/billing/postgres/repositories/customer.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/customer.js.map +1 -1
- package/dist/billing/postgres/repositories/dispute.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/dispute.js.map +1 -1
- package/dist/billing/postgres/repositories/event.d.ts +2 -2
- package/dist/billing/postgres/repositories/event.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/event.js.map +1 -1
- package/dist/billing/postgres/repositories/invoice.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/invoice.js.map +1 -1
- package/dist/billing/postgres/repositories/offer.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/offer.js.map +1 -1
- package/dist/billing/postgres/repositories/payment.d.ts +3 -3
- package/dist/billing/postgres/repositories/payment.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/payment.js.map +1 -1
- package/dist/billing/postgres/repositories/preferences.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/preferences.js.map +1 -1
- package/dist/billing/postgres/repositories/refund.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/refund.js.map +1 -1
- package/dist/billing/postgres/repositories/subscription-change.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/subscription-change.js.map +1 -1
- package/dist/billing/postgres/repositories/subscription.d.ts +5 -5
- package/dist/billing/postgres/repositories/subscription.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/subscription.js.map +1 -1
- package/dist/billing/postgres/repositories/topup.d.ts +1 -1
- package/dist/billing/postgres/repositories/topup.d.ts.map +1 -1
- package/dist/billing/postgres/repositories/topup.js.map +1 -1
- package/dist/billing/postgres/store.d.ts.map +1 -1
- package/dist/billing/types/auto-recharge.d.ts.map +1 -1
- package/dist/billing/types/events.d.ts.map +1 -1
- package/dist/billing/types/subscriptions.d.ts.map +1 -1
- package/dist/bursar.d.ts.map +1 -1
- package/dist/bursar.js.map +1 -1
- package/dist/commerce/errors.d.ts.map +1 -1
- package/dist/commerce/errors.js.map +1 -1
- package/dist/commerce/provider-registry.d.ts.map +1 -1
- package/dist/commerce/provider-registry.js.map +1 -1
- package/dist/commerce/service.d.ts +1 -1
- package/dist/commerce/service.d.ts.map +1 -1
- package/dist/commerce/service.js.map +1 -1
- package/dist/config/parse-access.js.map +1 -1
- package/dist/config/parse-pricing.js.map +1 -1
- package/dist/config/parse-utils.js.map +1 -1
- package/dist/credits/catalog-runtime.d.ts.map +1 -1
- package/dist/credits/catalog-runtime.js.map +1 -1
- package/dist/credits/events.d.ts.map +1 -1
- package/dist/credits/lease-workflow.d.ts.map +1 -1
- package/dist/credits/lease-workflow.js.map +1 -1
- package/dist/credits/low-balance-monitor.d.ts.map +1 -1
- package/dist/credits/low-balance-monitor.js.map +1 -1
- package/dist/credits/postgres/repositories/analytics.d.ts.map +1 -1
- package/dist/credits/postgres/repositories/analytics.js.map +1 -1
- package/dist/credits/postgres/repositories/balance.d.ts.map +1 -1
- package/dist/credits/postgres/repositories/balance.js.map +1 -1
- package/dist/credits/postgres/repositories/bucket.d.ts.map +1 -1
- package/dist/credits/postgres/repositories/bucket.js.map +1 -1
- package/dist/credits/postgres/repositories/catalog.d.ts +1 -1
- package/dist/credits/postgres/repositories/catalog.d.ts.map +1 -1
- package/dist/credits/postgres/repositories/catalog.js.map +1 -1
- package/dist/credits/postgres/repositories/deduction.d.ts.map +1 -1
- package/dist/credits/postgres/repositories/deduction.js.map +1 -1
- package/dist/credits/postgres/repositories/lease.d.ts +2 -2
- package/dist/credits/postgres/repositories/lease.d.ts.map +1 -1
- package/dist/credits/postgres/repositories/lease.js.map +1 -1
- package/dist/credits/postgres/repositories/plan.d.ts +10 -10
- package/dist/credits/postgres/repositories/plan.d.ts.map +1 -1
- package/dist/credits/postgres/repositories/plan.js.map +1 -1
- package/dist/credits/postgres/repositories/team.d.ts +2 -2
- package/dist/credits/postgres/repositories/team.d.ts.map +1 -1
- package/dist/credits/postgres/repositories/team.js.map +1 -1
- package/dist/credits/postgres/store.d.ts.map +1 -1
- package/dist/credits/postgres/store.js.map +1 -1
- package/dist/credits/queries.d.ts.map +1 -1
- package/dist/credits/queries.js.map +1 -1
- package/dist/credits/service.d.ts.map +1 -1
- package/dist/credits/store.d.ts.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js.map +1 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js.map +1 -1
- package/dist/expr/evaluator.js.map +1 -1
- package/dist/expr/parser.d.ts.map +1 -1
- package/dist/expr/parser.js.map +1 -1
- package/dist/generated/pricing-config.schema.json +0 -12
- package/dist/generated/pricing-config.types.d.ts +2 -8
- package/dist/generated/pricing-config.types.d.ts.map +1 -1
- package/dist/generated/pricing-config.types.js.map +1 -1
- package/dist/providers/dodo/better-auth-core.d.ts +0 -2
- package/dist/providers/dodo/better-auth-core.d.ts.map +1 -1
- package/dist/providers/dodo/better-auth.d.ts +0 -2
- package/dist/providers/dodo/better-auth.d.ts.map +1 -1
- package/dist/providers/dodo/client-contract.d.ts +2 -1
- package/dist/providers/dodo/client-contract.d.ts.map +1 -1
- package/dist/providers/dodo/client-contract.js.map +1 -1
- package/dist/providers/dodo/event-mapper.js.map +1 -1
- package/dist/providers/dodo/provider.d.ts.map +1 -1
- package/dist/providers/dodo/provider.js.map +1 -1
- package/dist/providers/environment.d.ts.map +1 -1
- package/dist/providers/mock/provider.d.ts.map +1 -1
- package/dist/providers/stripe/event-mapper.js.map +1 -1
- package/dist/providers/stripe/provider.d.ts.map +1 -1
- package/dist/providers/stripe/provider.js +1 -1
- package/dist/providers/stripe/provider.js.map +1 -1
- package/dist/retry.js.map +1 -1
- package/dist/shared/idempotency.js.map +1 -1
- package/dist/shared/logger.d.ts.map +1 -1
- package/dist/shared/logger.js +28 -4
- package/dist/shared/logger.js.map +1 -1
- package/dist/shared/postgres-client.d.ts.map +1 -1
- package/dist/shared/postgres-client.js.map +1 -1
- package/dist/shared/postgres-errors.js.map +1 -1
- package/dist/shared/postgres-validation.js.map +1 -1
- package/dist/storage/adapters/clickhouse.d.ts.map +1 -1
- package/dist/storage/adapters/clickhouse.js.map +1 -1
- package/dist/storage/adapters/s3.d.ts.map +1 -1
- package/dist/storage/diagnostics.d.ts.map +1 -1
- package/dist/storage/diagnostics.js.map +1 -1
- package/dist/storage/maintenance.d.ts.map +1 -1
- package/dist/storage/maintenance.js.map +1 -1
- package/dist/storage/outbox-worker.d.ts.map +1 -1
- package/dist/storage/outbox-worker.js.map +1 -1
- package/dist/storage/postgres-repository.d.ts.map +1 -1
- package/dist/storage/postgres-repository.js.map +1 -1
- package/dist/storage/runtime.d.ts.map +1 -1
- package/dist/storage/runtime.js.map +1 -1
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +1 -1
- package/dist/telemetry/index.js.map +1 -1
- package/dist/telemetry/opentelemetry.d.ts.map +1 -1
- package/dist/telemetry/opentelemetry.js.map +1 -1
- package/package.json +30 -30
package/dist/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAC3B,iBAAiB,GACjB,kBAAkB,GAClB,WAAW,GACX,WAAW,GACX,UAAU,GACV,cAAc,GACd,aAAa,GACb,UAAU,CAAC;AAEf,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;CACzC;AAED,2CAA2C;AAC3C,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,kFAAkF;AAClF,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExD;;;;;;GAMG;AACH,MAAM,MAAM,mBAAmB,GAC3B,iBAAiB,GACjB,kBAAkB,GAClB,WAAW,GACX,WAAW,GACX,UAAU,GACV,cAAc,GACd,aAAa,GACb,UAAU,CAAC;AAEf,6EAA6E;AAC7E,MAAM,WAAW,kBAAkB;IACjC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,eAAe,CAAC;CACzC;AAED,2CAA2C;AAC3C,MAAM,WAAW,kBAAmB,SAAQ,YAAY;IACtD,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,kFAAkF;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,KAAK,iBAAiB;YACpB,OAAO,GAAG,CAAC;QACb,KAAK,kBAAkB;YACrB,OAAO,GAAG,CAAC;QACb,KAAK,WAAW;YACd,OAAO,GAAG,CAAC;QACb,KAAK,WAAW;YACd,OAAO,GAAG,CAAC;QACb,KAAK,UAAU;YACb,OAAO,GAAG,CAAC;QACb,KAAK,cAAc;YACjB,OAAO,GAAG,CAAC;QACb,KAAK,aAAa;YAChB,OAAO,GAAG,CAAC;QACb,KAAK,UAAU;YACb,OAAO,GAAG,CAAC;IACf,CAAC;AACH,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,wBAAwB,CAAC,KAAkB;IACzD,QAAQ,KAAK,CAAC,QAAQ,EAAE,CAAC;QACvB,KAAK,iBAAiB;YACpB,OAAO,iCAAiC,CAAC;QAC3C,KAAK,kBAAkB;YACrB,OAAO,kCAAkC,CAAC;QAC5C,KAAK,WAAW;YACd,OAAO,kDAAkD,CAAC;QAC5D,KAAK,WAAW;YACd,OAAO,+CAA+C,CAAC;QACzD,KAAK,UAAU;YACb,OAAO,uDAAuD,CAAC;QACjE,KAAK,cAAc;YACjB,OAAO,4CAA4C,CAAC;QACtD,KAAK,aAAa,CAAC;QACnB,KAAK,UAAU;YACb,OAAO,+DAA+D,CAAC;IAC3E,CAAC;AACH,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport type { StructuredValue } from \"./shared/json.js\";\n\n/**\n * Transport-neutral failure categories for SaaS application boundaries.\n *\n * The category is intentionally coarser than `code`: applications can use it\n * for protocol behavior while retaining the stable code for product-specific\n * copy and analytics.\n */\nexport type BursarErrorCategory =\n | \"invalid_request\"\n | \"payment_required\"\n | \"forbidden\"\n | \"not_found\"\n | \"conflict\"\n | \"rate_limited\"\n | \"unavailable\"\n | \"internal\";\n\n/** Structured, non-secret context that is safe to attach to an SDK error. */\nexport interface BursarErrorDetails {\n readonly [key: string]: StructuredValue;\n}\n\n/** Options shared by all Bursar errors. */\nexport interface BursarErrorOptions extends ErrorOptions {\n details?: BursarErrorDetails;\n}\n\nexport interface StoreErrorOptions extends BursarErrorOptions {\n indeterminate?: boolean;\n retryable?: boolean;\n}\n\n/** Bounded SDK-owned codes safe for diagnostics and low-cardinality telemetry. */\nexport const BURSAR_ERROR_CODES = [\n \"AUTO_RECHARGE_DISABLED\",\n \"AUTO_RECHARGE_NOT_CONFIGURED\",\n \"BILLING_ERROR\",\n \"BURSAR_ERROR\",\n \"BURSAR_IMPORT_ERROR\",\n \"CAPABILITY_NOT_CONFIGURED\",\n \"CAPABILITY_NOT_SUPPORTED\",\n \"CAP_REACHED\",\n \"CATALOG_NOT_LOADED\",\n \"CONCURRENCY_LIMIT_REACHED\",\n \"CONFIG_ERROR\",\n \"CREDIT_ERROR\",\n \"EXPRESSION_ERROR\",\n \"FEATURE_NOT_ENTITLED\",\n \"INSUFFICIENT_CREDITS\",\n \"LEASE_EXPIRED\",\n \"LEASE_NOT_FOUND\",\n \"OPERATION_NOT_ALLOWED\",\n \"PAYMENT_METHOD_REQUIRED\",\n \"PROVIDER_CAPABILITY_NOT_SUPPORTED\",\n \"PROVIDER_RESPONSE_INVALID\",\n \"QUOTA_EXCEEDED\",\n \"REFUND_REJECTED\",\n \"STORE_CLOSED\",\n \"STORE_ERROR\",\n \"STORE_TIMEOUT\",\n \"STORE_UNAVAILABLE\",\n] as const;\n\nexport type BursarErrorCode = (typeof BURSAR_ERROR_CODES)[number];\nconst BURSAR_ERROR_CODE_SET = new Set<string>(BURSAR_ERROR_CODES);\n\nexport function isBursarErrorCode(cause: unknown): cause is BursarErrorCode {\n const parsed = z.string().safeParse(cause);\n return parsed.success && BURSAR_ERROR_CODE_SET.has(parsed.data);\n}\n\nexport interface SerializedBursarError {\n name: string;\n message: string;\n code: string;\n category: BursarErrorCategory;\n retryable: boolean;\n details?: BursarErrorDetails;\n indeterminate?: boolean;\n}\n\nconst BURSAR_ERROR_BRAND = Symbol.for(\"@zonastery/bursar.error\");\n\n/** Base error for all Bursar SDK failures. */\nexport class BursarError extends Error {\n override readonly name: string = \"BursarError\";\n readonly code: string = \"BURSAR_ERROR\";\n readonly category: BursarErrorCategory = \"internal\";\n readonly retryable: boolean = false;\n\n readonly details?: BursarErrorDetails;\n\n constructor(message: string, options: BursarErrorOptions = {}) {\n super(message, options.cause === undefined ? undefined : { cause: options.cause });\n this.details = options.details ? Object.freeze({ ...options.details }) : undefined;\n Object.defineProperty(this, BURSAR_ERROR_BRAND, { value: true });\n }\n\n /** A predictable representation for logs and protocol adapters. */\n toJSON(): SerializedBursarError {\n const result: SerializedBursarError = {\n name: this.name,\n message: this.message,\n code: this.code,\n category: this.category,\n retryable: this.retryable,\n };\n if (this.details) result.details = this.details;\n return result;\n }\n}\n\n/** Base error for credit-domain admission and settlement failures. */\nexport class CreditError extends BursarError {\n override readonly name: string = \"CreditError\";\n override readonly code: string = \"CREDIT_ERROR\";\n}\n\n/** Base error for billing and payment orchestration failures. */\nexport class BillingError extends BursarError {\n override readonly name: string = \"BillingError\";\n override readonly code: string = \"BILLING_ERROR\";\n}\n\nexport class AutoRechargeNotConfiguredError extends BillingError {\n override readonly name = \"AutoRechargeNotConfiguredError\";\n override readonly code = \"AUTO_RECHARGE_NOT_CONFIGURED\";\n override readonly category = \"unavailable\" as const;\n\n constructor() {\n super(\"Auto-recharge is not configured for this catalog\");\n }\n}\n\nexport class AutoRechargeDisabledError extends BillingError {\n override readonly name = \"AutoRechargeDisabledError\";\n override readonly code = \"AUTO_RECHARGE_DISABLED\";\n override readonly category = \"conflict\" as const;\n\n constructor() {\n super(\"Auto-recharge is disabled for this account\");\n }\n}\n\nexport class PaymentMethodRequiredError extends BillingError {\n override readonly name = \"PaymentMethodRequiredError\";\n override readonly code = \"PAYMENT_METHOD_REQUIRED\";\n override readonly category = \"payment_required\" as const;\n\n constructor() {\n super(\"A saved payment method is required\");\n }\n}\n\nexport class ProviderCapabilityNotSupportedError extends BillingError {\n override readonly name = \"ProviderCapabilityNotSupportedError\";\n override readonly code = \"PROVIDER_CAPABILITY_NOT_SUPPORTED\";\n override readonly category = \"unavailable\" as const;\n\n constructor(\n readonly provider: string,\n readonly capability: string,\n ) {\n super(`Payment provider '${provider}' does not support '${capability}'`, {\n details: { provider, capability },\n });\n }\n}\n\n/** Raised when a payment provider returns a response that violates its contract. */\nexport class ProviderResponseError extends BillingError {\n override readonly name = \"ProviderResponseError\";\n override readonly code = \"PROVIDER_RESPONSE_INVALID\";\n override readonly category = \"unavailable\" as const;\n\n constructor(\n readonly provider: string,\n readonly operation: string,\n options: BursarErrorOptions = {},\n ) {\n super(`Payment provider '${provider}' returned an invalid response for '${operation}'`, {\n ...options,\n details: { ...options.details, provider, operation },\n });\n }\n}\n\nexport class ConfigError extends BursarError {\n override readonly name = \"ConfigError\";\n override readonly code = \"CONFIG_ERROR\";\n\n constructor(\n message: string,\n readonly validationErrors: readonly unknown[] = [],\n options: BursarErrorOptions = {},\n ) {\n super(message, options);\n }\n}\n\nexport class ExpressionError extends BursarError {\n override readonly name = \"ExpressionError\";\n override readonly code = \"EXPRESSION_ERROR\";\n}\n\nexport class InsufficientCreditsError extends CreditError {\n override readonly name = \"InsufficientCreditsError\";\n override readonly code = \"INSUFFICIENT_CREDITS\";\n override readonly category = \"payment_required\" as const;\n}\n\nexport class CatalogNotLoadedError extends CreditError {\n override readonly name = \"CatalogNotLoadedError\";\n override readonly code = \"CATALOG_NOT_LOADED\";\n override readonly category = \"unavailable\" as const;\n}\n\nexport class ImportError extends BursarError {\n override readonly name = \"ImportError\";\n override readonly code = \"BURSAR_IMPORT_ERROR\";\n override readonly category = \"unavailable\" as const;\n}\n\nexport class StoreError extends BursarError {\n override readonly name: string = \"StoreError\";\n override readonly code: string = \"STORE_ERROR\";\n override readonly category: BursarErrorCategory = \"unavailable\";\n override readonly retryable: boolean;\n\n /**\n * Whether the operation may have committed even though no result was\n * observed. Callers must reuse the same idempotency key before retrying an\n * indeterminate mutation.\n */\n readonly indeterminate: boolean;\n\n constructor(message: string, options: StoreErrorOptions = {}) {\n super(message, options);\n this.indeterminate = options.indeterminate ?? false;\n this.retryable = options.retryable ?? false;\n }\n\n override toJSON(): SerializedBursarError {\n return { ...super.toJSON(), indeterminate: this.indeterminate };\n }\n}\n\n/** A transient store/transport failure for which a bounded retry can help. */\nexport class StoreUnavailableError extends StoreError {\n override readonly name: string = \"StoreUnavailableError\";\n override readonly code: string = \"STORE_UNAVAILABLE\";\n override readonly retryable = true;\n}\n\n/** A store operation exceeded its configured deadline. */\nexport class StoreTimeoutError extends StoreUnavailableError {\n override readonly name = \"StoreTimeoutError\";\n override readonly code = \"STORE_TIMEOUT\";\n}\n\n/** The application attempted to use a store after closing it. */\nexport class StoreClosedError extends StoreError {\n override readonly name = \"StoreClosedError\";\n override readonly code = \"STORE_CLOSED\";\n override readonly category = \"conflict\" as const;\n}\n\nexport class CapReachedError extends StoreError {\n override readonly name = \"CapReachedError\";\n override readonly code = \"CAP_REACHED\";\n override readonly category = \"rate_limited\" as const;\n override readonly retryable = false;\n}\n\nexport class RefundError extends StoreError {\n override readonly name = \"RefundError\";\n override readonly code = \"REFUND_REJECTED\";\n override readonly category = \"conflict\" as const;\n override readonly retryable = false;\n}\n\nexport class ConcurrencyLimitError extends CreditError {\n override readonly name = \"ConcurrencyLimitError\";\n override readonly code = \"CONCURRENCY_LIMIT_REACHED\";\n override readonly category = \"rate_limited\" as const;\n}\n\nexport class FeatureNotEntitledError extends CreditError {\n override readonly name = \"FeatureNotEntitledError\";\n override readonly code = \"FEATURE_NOT_ENTITLED\";\n override readonly category = \"forbidden\" as const;\n}\n\nexport class OperationNotAllowedError extends CreditError {\n override readonly name = \"OperationNotAllowedError\";\n override readonly code = \"OPERATION_NOT_ALLOWED\";\n override readonly category = \"forbidden\" as const;\n}\n\nexport class QuotaExceededError extends CreditError {\n override readonly name = \"QuotaExceededError\";\n override readonly code = \"QUOTA_EXCEEDED\";\n override readonly category = \"rate_limited\" as const;\n}\n\nexport class LeaseExpiredError extends CreditError {\n override readonly name = \"LeaseExpiredError\";\n override readonly code = \"LEASE_EXPIRED\";\n override readonly category = \"conflict\" as const;\n}\n\nexport class LeaseNotFoundError extends CreditError {\n override readonly name = \"LeaseNotFoundError\";\n override readonly code = \"LEASE_NOT_FOUND\";\n override readonly category = \"not_found\" as const;\n}\n\n/**\n * Thrown by the default (concrete) implementation of an optional `CreditStore`\n * capability (such as analytics, ledger listing, or teams) when a custom store\n * subclass does not override it.\n */\nexport class CapabilityNotSupportedError extends StoreError {\n override readonly name = \"CapabilityNotSupportedError\";\n override readonly code = \"CAPABILITY_NOT_SUPPORTED\";\n override readonly retryable = false;\n}\n\n/** A facade capability was intentionally omitted from SDK composition. */\nexport class CapabilityNotConfiguredError extends BursarError {\n override readonly name = \"CapabilityNotConfiguredError\";\n override readonly code = \"CAPABILITY_NOT_CONFIGURED\";\n override readonly category = \"unavailable\" as const;\n\n constructor(readonly capability: string) {\n super(`Bursar ${capability} capability is not configured`, {\n details: { capability },\n });\n }\n}\n\n/**\n * Cross-package-copy-safe check for an SDK error. `instanceof` alone fails\n * when an application installs two copies of the package.\n */\nexport function isBursarError(cause: unknown): cause is BursarError {\n if (cause instanceof BursarError) return true;\n try {\n return Object.getOwnPropertyDescriptor(Object(cause), BURSAR_ERROR_BRAND)?.value === true;\n } catch {\n return false;\n }\n}\n\n/** Return whether retrying the failed Bursar operation can be useful. */\nexport function isRetryableBursarError(cause: unknown): boolean {\n return isBursarError(cause) && cause.retryable;\n}\n\n/** Project a Bursar failure category to its conventional HTTP status. */\nexport function bursarErrorHttpStatus(error: BursarError): number {\n switch (error.category) {\n case \"invalid_request\":\n return 400;\n case \"payment_required\":\n return 402;\n case \"forbidden\":\n return 403;\n case \"not_found\":\n return 404;\n case \"conflict\":\n return 409;\n case \"rate_limited\":\n return 429;\n case \"unavailable\":\n return 503;\n case \"internal\":\n return 500;\n }\n}\n\n/** Return safe default copy for exposing a Bursar failure to an end user. */\nexport function bursarErrorPublicMessage(error: BursarError): string {\n switch (error.category) {\n case \"invalid_request\":\n return \"The billing request is invalid.\";\n case \"payment_required\":\n return \"Payment is required to continue.\";\n case \"forbidden\":\n return \"Your current plan does not allow this operation.\";\n case \"not_found\":\n return \"The requested billing resource was not found.\";\n case \"conflict\":\n return \"The request conflicts with the current billing state.\";\n case \"rate_limited\":\n return \"A billing or usage limit has been reached.\";\n case \"unavailable\":\n case \"internal\":\n return \"Billing service is temporarily unavailable. Please try again.\";\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAoCxB,kFAAkF;AAClF,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,wBAAwB;IACxB,8BAA8B;IAC9B,eAAe;IACf,cAAc;IACd,qBAAqB;IACrB,2BAA2B;IAC3B,0BAA0B;IAC1B,aAAa;IACb,oBAAoB;IACpB,2BAA2B;IAC3B,cAAc;IACd,cAAc;IACd,kBAAkB;IAClB,sBAAsB;IACtB,sBAAsB;IACtB,eAAe;IACf,iBAAiB;IACjB,uBAAuB;IACvB,yBAAyB;IACzB,mCAAmC;IACnC,2BAA2B;IAC3B,gBAAgB;IAChB,iBAAiB;IACjB,cAAc;IACd,aAAa;IACb,eAAe;IACf,mBAAmB;CACX,CAAC;AAGX,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAS,kBAAkB,CAAC,CAAC;AAElE,MAAM,UAAU,iBAAiB,CAAC,KAAc;IAC9C,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC3C,OAAO,MAAM,CAAC,OAAO,IAAI,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAClE,CAAC;AAYD,MAAM,kBAAkB,GAAG,MAAM,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AAEjE,8CAA8C;AAC9C,MAAM,OAAO,WAAY,SAAQ,KAAK;IAClB,I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U;YACb,OAAO,+DAA+D,CAAC;IAC3E,CAAC;AACH,CAAC","sourcesContent":["import { z } from \"zod\";\n\nimport type { StructuredValue } from \"./shared/json.js\";\n\n/**\n * Transport-neutral failure categories for SaaS application boundaries.\n *\n * The category is intentionally coarser than `code`: applications can use it\n * for protocol behavior while retaining the stable code for product-specific\n * copy and analytics.\n */\nexport type BursarErrorCategory =\n | \"invalid_request\"\n | \"payment_required\"\n | \"forbidden\"\n | \"not_found\"\n | \"conflict\"\n | \"rate_limited\"\n | \"unavailable\"\n | \"internal\";\n\n/** Structured, non-secret context that is safe to attach to an SDK error. */\nexport interface BursarErrorDetails {\n readonly [key: string]: StructuredValue;\n}\n\n/** Options shared by all Bursar errors. */\nexport interface BursarErrorOptions extends ErrorOptions {\n details?: BursarErrorDetails;\n}\n\nexport interface StoreErrorOptions extends BursarErrorOptions {\n indeterminate?: boolean;\n retryable?: boolean;\n}\n\n/** Bounded SDK-owned codes safe for diagnostics and low-cardinality telemetry. */\nexport const BURSAR_ERROR_CODES = [\n \"AUTO_RECHARGE_DISABLED\",\n \"AUTO_RECHARGE_NOT_CONFIGURED\",\n \"BILLING_ERROR\",\n \"BURSAR_ERROR\",\n \"BURSAR_IMPORT_ERROR\",\n \"CAPABILITY_NOT_CONFIGURED\",\n \"CAPABILITY_NOT_SUPPORTED\",\n \"CAP_REACHED\",\n \"CATALOG_NOT_LOADED\",\n \"CONCURRENCY_LIMIT_REACHED\",\n \"CONFIG_ERROR\",\n \"CREDIT_ERROR\",\n \"EXPRESSION_ERROR\",\n \"FEATURE_NOT_ENTITLED\",\n \"INSUFFICIENT_CREDITS\",\n \"LEASE_EXPIRED\",\n \"LEASE_NOT_FOUND\",\n \"OPERATION_NOT_ALLOWED\",\n \"PAYMENT_METHOD_REQUIRED\",\n \"PROVIDER_CAPABILITY_NOT_SUPPORTED\",\n \"PROVIDER_RESPONSE_INVALID\",\n \"QUOTA_EXCEEDED\",\n \"REFUND_REJECTED\",\n \"STORE_CLOSED\",\n \"STORE_ERROR\",\n \"STORE_TIMEOUT\",\n \"STORE_UNAVAILABLE\",\n] as const;\n\nexport type BursarErrorCode = (typeof BURSAR_ERROR_CODES)[number];\nconst BURSAR_ERROR_CODE_SET = new Set<string>(BURSAR_ERROR_CODES);\n\nexport function isBursarErrorCode(cause: unknown): cause is BursarErrorCode {\n const parsed = z.string().safeParse(cause);\n return parsed.success && BURSAR_ERROR_CODE_SET.has(parsed.data);\n}\n\nexport interface SerializedBursarError {\n name: string;\n message: string;\n code: string;\n category: BursarErrorCategory;\n retryable: boolean;\n details?: BursarErrorDetails;\n indeterminate?: boolean;\n}\n\nconst BURSAR_ERROR_BRAND = Symbol.for(\"@zonastery/bursar.error\");\n\n/** Base error for all Bursar SDK failures. */\nexport class BursarError extends Error {\n override readonly name: string = \"BursarError\";\n readonly code: string = \"BURSAR_ERROR\";\n readonly category: BursarErrorCategory = \"internal\";\n readonly retryable: boolean = false;\n\n readonly details?: BursarErrorDetails;\n\n constructor(message: string, options: BursarErrorOptions = {}) {\n super(message, options.cause === undefined ? undefined : { cause: options.cause });\n this.details = options.details ? Object.freeze({ ...options.details }) : undefined;\n Object.defineProperty(this, BURSAR_ERROR_BRAND, { value: true });\n }\n\n /** A predictable representation for logs and protocol adapters. */\n toJSON(): SerializedBursarError {\n const result: SerializedBursarError = {\n name: this.name,\n message: this.message,\n code: this.code,\n category: this.category,\n retryable: this.retryable,\n };\n if (this.details) result.details = this.details;\n return result;\n }\n}\n\n/** Base error for credit-domain admission and settlement failures. */\nexport class CreditError extends BursarError {\n override readonly name: string = \"CreditError\";\n override readonly code: string = \"CREDIT_ERROR\";\n}\n\n/** Base error for billing and payment orchestration failures. */\nexport class BillingError extends BursarError {\n override readonly name: string = \"BillingError\";\n override readonly code: string = \"BILLING_ERROR\";\n}\n\nexport class AutoRechargeNotConfiguredError extends BillingError {\n override readonly name = \"AutoRechargeNotConfiguredError\";\n override readonly code = \"AUTO_RECHARGE_NOT_CONFIGURED\";\n override readonly category = \"unavailable\" as const;\n\n constructor() {\n super(\"Auto-recharge is not configured for this catalog\");\n }\n}\n\nexport class AutoRechargeDisabledError extends BillingError {\n override readonly name = \"AutoRechargeDisabledError\";\n override readonly code = \"AUTO_RECHARGE_DISABLED\";\n override readonly category = \"conflict\" as const;\n\n constructor() {\n super(\"Auto-recharge is disabled for this account\");\n }\n}\n\nexport class PaymentMethodRequiredError extends BillingError {\n override readonly name = \"PaymentMethodRequiredError\";\n override readonly code = \"PAYMENT_METHOD_REQUIRED\";\n override readonly category = \"payment_required\" as const;\n\n constructor() {\n super(\"A saved payment method is required\");\n }\n}\n\nexport class ProviderCapabilityNotSupportedError extends BillingError {\n override readonly name = \"ProviderCapabilityNotSupportedError\";\n override readonly code = \"PROVIDER_CAPABILITY_NOT_SUPPORTED\";\n override readonly category = \"unavailable\" as const;\n\n constructor(\n readonly provider: string,\n readonly capability: string,\n ) {\n super(`Payment provider '${provider}' does not support '${capability}'`, {\n details: { provider, capability },\n });\n }\n}\n\n/** Raised when a payment provider returns a response that violates its contract. */\nexport class ProviderResponseError extends BillingError {\n override readonly name = \"ProviderResponseError\";\n override readonly code = \"PROVIDER_RESPONSE_INVALID\";\n override readonly category = \"unavailable\" as const;\n\n constructor(\n readonly provider: string,\n readonly operation: string,\n options: BursarErrorOptions = {},\n ) {\n super(`Payment provider '${provider}' returned an invalid response for '${operation}'`, {\n ...options,\n details: { ...options.details, provider, operation },\n });\n }\n}\n\nexport class ConfigError extends BursarError {\n override readonly name = \"ConfigError\";\n override readonly code = \"CONFIG_ERROR\";\n\n constructor(\n message: string,\n readonly validationErrors: readonly unknown[] = [],\n options: BursarErrorOptions = {},\n ) {\n super(message, options);\n }\n}\n\nexport class ExpressionError extends BursarError {\n override readonly name = \"ExpressionError\";\n override readonly code = \"EXPRESSION_ERROR\";\n}\n\nexport class InsufficientCreditsError extends CreditError {\n override readonly name = \"InsufficientCreditsError\";\n override readonly code = \"INSUFFICIENT_CREDITS\";\n override readonly category = \"payment_required\" as const;\n}\n\nexport class CatalogNotLoadedError extends CreditError {\n override readonly name = \"CatalogNotLoadedError\";\n override readonly code = \"CATALOG_NOT_LOADED\";\n override readonly category = \"unavailable\" as const;\n}\n\nexport class ImportError extends BursarError {\n override readonly name = \"ImportError\";\n override readonly code = \"BURSAR_IMPORT_ERROR\";\n override readonly category = \"unavailable\" as const;\n}\n\nexport class StoreError extends BursarError {\n override readonly name: string = \"StoreError\";\n override readonly code: string = \"STORE_ERROR\";\n override readonly category: BursarErrorCategory = \"unavailable\";\n override readonly retryable: boolean;\n\n /**\n * Whether the operation may have committed even though no result was\n * observed. Callers must reuse the same idempotency key before retrying an\n * indeterminate mutation.\n */\n readonly indeterminate: boolean;\n\n constructor(message: string, options: StoreErrorOptions = {}) {\n super(message, options);\n this.indeterminate = options.indeterminate ?? false;\n this.retryable = options.retryable ?? false;\n }\n\n override toJSON(): SerializedBursarError {\n return { ...super.toJSON(), indeterminate: this.indeterminate };\n }\n}\n\n/** A transient store/transport failure for which a bounded retry can help. */\nexport class StoreUnavailableError extends StoreError {\n override readonly name: string = \"StoreUnavailableError\";\n override readonly code: string = \"STORE_UNAVAILABLE\";\n override readonly retryable = true;\n}\n\n/** A store operation exceeded its configured deadline. */\nexport class StoreTimeoutError extends StoreUnavailableError {\n override readonly name = \"StoreTimeoutError\";\n override readonly code = \"STORE_TIMEOUT\";\n}\n\n/** The application attempted to use a store after closing it. */\nexport class StoreClosedError extends StoreError {\n override readonly name = \"StoreClosedError\";\n override readonly code = \"STORE_CLOSED\";\n override readonly category = \"conflict\" as const;\n}\n\nexport class CapReachedError extends StoreError {\n override readonly name = \"CapReachedError\";\n override readonly code = \"CAP_REACHED\";\n override readonly category = \"rate_limited\" as const;\n override readonly retryable = false;\n}\n\nexport class RefundError extends StoreError {\n override readonly name = \"RefundError\";\n override readonly code = \"REFUND_REJECTED\";\n override readonly category = \"conflict\" as const;\n override readonly retryable = false;\n}\n\nexport class ConcurrencyLimitError extends CreditError {\n override readonly name = \"ConcurrencyLimitError\";\n override readonly code = \"CONCURRENCY_LIMIT_REACHED\";\n override readonly category = \"rate_limited\" as const;\n}\n\nexport class FeatureNotEntitledError extends CreditError {\n override readonly name = \"FeatureNotEntitledError\";\n override readonly code = \"FEATURE_NOT_ENTITLED\";\n override readonly category = \"forbidden\" as const;\n}\n\nexport class OperationNotAllowedError extends CreditError {\n override readonly name = \"OperationNotAllowedError\";\n override readonly code = \"OPERATION_NOT_ALLOWED\";\n override readonly category = \"forbidden\" as const;\n}\n\nexport class QuotaExceededError extends CreditError {\n override readonly name = \"QuotaExceededError\";\n override readonly code = \"QUOTA_EXCEEDED\";\n override readonly category = \"rate_limited\" as const;\n}\n\nexport class LeaseExpiredError extends CreditError {\n override readonly name = \"LeaseExpiredError\";\n override readonly code = \"LEASE_EXPIRED\";\n override readonly category = \"conflict\" as const;\n}\n\nexport class LeaseNotFoundError extends CreditError {\n override readonly name = \"LeaseNotFoundError\";\n override readonly code = \"LEASE_NOT_FOUND\";\n override readonly category = \"not_found\" as const;\n}\n\n/**\n * Thrown by the default (concrete) implementation of an optional `CreditStore`\n * capability (such as analytics, ledger listing, or teams) when a custom store\n * subclass does not override it.\n */\nexport class CapabilityNotSupportedError extends StoreError {\n override readonly name = \"CapabilityNotSupportedError\";\n override readonly code = \"CAPABILITY_NOT_SUPPORTED\";\n override readonly retryable = false;\n}\n\n/** A facade capability was intentionally omitted from SDK composition. */\nexport class CapabilityNotConfiguredError extends BursarError {\n override readonly name = \"CapabilityNotConfiguredError\";\n override readonly code = \"CAPABILITY_NOT_CONFIGURED\";\n override readonly category = \"unavailable\" as const;\n\n constructor(readonly capability: string) {\n super(`Bursar ${capability} capability is not configured`, {\n details: { capability },\n });\n }\n}\n\n/**\n * Cross-package-copy-safe check for an SDK error. `instanceof` alone fails\n * when an application installs two copies of the package.\n */\nexport function isBursarError(cause: unknown): cause is BursarError {\n if (cause instanceof BursarError) return true;\n try {\n return Object.getOwnPropertyDescriptor(Object(cause), BURSAR_ERROR_BRAND)?.value === true;\n } catch {\n return false;\n }\n}\n\n/** Return whether retrying the failed Bursar operation can be useful. */\nexport function isRetryableBursarError(cause: unknown): boolean {\n return isBursarError(cause) && cause.retryable;\n}\n\n/** Project a Bursar failure category to its conventional HTTP status. */\nexport function bursarErrorHttpStatus(error: BursarError): number {\n switch (error.category) {\n case \"invalid_request\":\n return 400;\n case \"payment_required\":\n return 402;\n case \"forbidden\":\n return 403;\n case \"not_found\":\n return 404;\n case \"conflict\":\n return 409;\n case \"rate_limited\":\n return 429;\n case \"unavailable\":\n return 503;\n case \"internal\":\n return 500;\n }\n}\n\n/** Return safe default copy for exposing a Bursar failure to an end user. */\nexport function bursarErrorPublicMessage(error: BursarError): string {\n switch (error.category) {\n case \"invalid_request\":\n return \"The billing request is invalid.\";\n case \"payment_required\":\n return \"Payment is required to continue.\";\n case \"forbidden\":\n return \"Your current plan does not allow this operation.\";\n case \"not_found\":\n return \"The requested billing resource was not found.\";\n case \"conflict\":\n return \"The request conflicts with the current billing state.\";\n case \"rate_limited\":\n return \"A billing or usage limit has been reached.\";\n case \"unavailable\":\n case \"internal\":\n return \"Billing service is temporarily unavailable. Please try again.\";\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluator.js","sourceRoot":"","sources":["../../src/expr/evaluator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAG/C,MAAM,IAAI,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;AAC5B,MAAM,GAAG,GAAG,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC;AAE3B,SAAS,SAAS,CAAC,KAAuB;IACxC,OAAO,KAAK,YAAY,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAED,SAAS,MAAM,CAAC,K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IAAI;YACP,OAAO,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QACvD,KAAK,IAAI;YACP,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QACjE,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QACjE;YACE,MAAM,IAAI,eAAe,CAAC,uBAAuB,QAAQ,EAAE,CAAC,CAAC;IACjE,CAAC;AACH,CAAC","sourcesContent":["import { Decimal } from \"decimal.js\";\n\nimport { ExpressionError } from \"../errors.js\";\nimport type { Node } from \"./ast.js\";\n\nconst ZERO = new Decimal(0);\nconst ONE = new Decimal(1);\n\nfunction asDecimal(value: number | Decimal): Decimal {\n return value instanceof Decimal ? value : new Decimal(value);\n}\n\nfunction truthy(value: Decimal): boolean {\n return !value.isZero();\n}\n\nfunction requiredArgument(name: string, args: readonly Decimal[], index: number): Decimal {\n const argument = args[index];\n if (argument === undefined) {\n throw new ExpressionError(`${name}() received an invalid number of arguments`);\n }\n return argument;\n}\n\nfunction evaluateCall(name: string, args: Decimal[]): Decimal {\n switch (name) {\n case \"ceil\":\n return requiredArgument(name, args, 0).ceil();\n case \"floor\":\n return requiredArgument(name, args, 0).floor();\n case \"min\":\n return Decimal.min(...args);\n case \"max\":\n return Decimal.max(...args);\n case \"round\": {\n const digits = args.length === 2 ? requiredArgument(name, args, 1).toNumber() : 0;\n return requiredArgument(name, args, 0).toDecimalPlaces(digits, Decimal.ROUND_HALF_UP);\n }\n case \"if\":\n return truthy(requiredArgument(name, args, 0))\n ? requiredArgument(name, args, 1)\n : requiredArgument(name, args, 2);\n case \"tier\": {\n const value = requiredArgument(name, args, 0);\n for (let index = 1; index < args.length - 1; index += 2) {\n if (value.lessThan(requiredArgument(name, args, index))) {\n return requiredArgument(name, args, index + 1);\n }\n }\n return requiredArgument(name, args, args.length - 1);\n }\n case \"clamp\":\n return Decimal.max(\n requiredArgument(name, args, 1),\n Decimal.min(requiredArgument(name, args, 0), requiredArgument(name, args, 2)),\n );\n case \"percentile\":\n return percentile(args);\n default:\n throw new ExpressionError(`disallowed function: ${name}`);\n }\n}\n\nfunction percentile(args: Decimal[]): Decimal {\n const percentage = requiredArgument(\"percentile\", args, 0);\n if (percentage.lessThan(0) || percentage.greaterThan(100)) {\n throw new ExpressionError(\"percentile() p must be between 0 and 100\");\n }\n const sorted = args.slice(1).sort((left, right) => left.comparedTo(right));\n if (sorted.length === 1) return requiredArgument(\"percentile\", sorted, 0);\n\n const rank = percentage.dividedBy(100).times(sorted.length - 1);\n const lower = rank.floor();\n const lowerIndex = lower.toNumber();\n const upperIndex = Math.min(lowerIndex + 1, sorted.length - 1);\n const fraction = rank.minus(lower);\n return requiredArgument(\"percentile\", sorted, lowerIndex)\n .times(ONE.minus(fraction))\n .plus(requiredArgument(\"percentile\", sorted, upperIndex).times(fraction));\n}\n\nexport function evaluateNode(node: Node, variables: Record<string, number | Decimal>): Decimal {\n switch (node.type) {\n case \"number\":\n return new Decimal(node.value);\n case \"identifier\": {\n const value = variables[node.name];\n return value === undefined ? ZERO : asDecimal(value);\n }\n case \"unary\": {\n const value = evaluateNode(node.operand, variables);\n if (node.op === \"not\") return truthy(value) ? ZERO : ONE;\n return node.op === \"-\" ? value.negated() : value;\n }\n case \"binary\":\n return evaluateBinary(node.op, evaluateNode(node.left, variables), () =>\n evaluateNode(node.right, variables),\n );\n case \"call\":\n return evaluateCall(\n node.name,\n node.args.map((argument) => evaluateNode(argument, variables)),\n );\n case \"ternary\":\n return truthy(evaluateNode(node.cond, variables))\n ? evaluateNode(node.then, variables)\n : evaluateNode(node.else, variables);\n case \"comparison\":\n return evaluateComparison(\n node.op,\n evaluateNode(node.left, variables),\n evaluateNode(node.right, variables),\n );\n case \"boolean\": {\n const left = evaluateNode(node.left, variables);\n if (node.op === \"and\") {\n return truthy(left) ? evaluateNode(node.right, variables) : left;\n }\n if (node.op === \"or\") {\n return truthy(left) ? left : evaluateNode(node.right, variables);\n }\n throw new ExpressionError(`unknown boolean op: ${node.op}`);\n }\n }\n}\n\nfunction evaluateBinary(operator: string, left: Decimal, rightValue: () => Decimal): Decimal {\n const right = rightValue();\n switch (operator) {\n case \"+\":\n return left.plus(right);\n case \"-\":\n return left.minus(right);\n case \"*\":\n return left.times(right);\n case \"/\":\n if (right.isZero()) throw new ExpressionError(\"division by zero\");\n return left.dividedBy(right);\n case \"//\":\n if (right.isZero()) throw new ExpressionError(\"division by zero\");\n // Truncate toward zero to match Python's Decimal `//` (parity): e.g.\n // -7 // 2 == -3, not -4. decimal.js `.floor()` rounds toward -Infinity,\n // which would silently bill a different amount for negative operands.\n return left.divToInt(right);\n case \"%\":\n if (right.isZero()) throw new ExpressionError(\"modulo by zero\");\n return left.modulo(right);\n default:\n throw new ExpressionError(`unknown operator: ${operator}`);\n }\n}\n\nfunction evaluateComparison(operator: string, left: Decimal, right: Decimal): Decimal {\n switch (operator) {\n case \"==\":\n return left.equals(right) ? ONE : ZERO;\n case \"!=\":\n return left.equals(right) ? ZERO : ONE;\n case \"<\":\n return left.lessThan(right) ? ONE : ZERO;\n case \"<=\":\n return left.lessThanOrEqualTo(right) ? ONE : ZERO;\n case \">\":\n return left.greaterThan(right) ? ONE : ZERO;\n case \">=\":\n return left.greaterThanOrEqualTo(right) ? ONE : ZERO;\n case \"in\":\n return left.toString().includes(right.toString()) ? ONE : ZERO;\n case \"not in\":\n return left.toString().includes(right.toString()) ? ZERO : ONE;\n default:\n throw new ExpressionError(`unknown comparison: ${operator}`);\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"evaluator.js","sourceRoot":"","sources":["../../src/expr/evaluator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AAG,CAAC;QACzC,KAAK,GAAG;YACN,OAAO,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QAC3C,KAAK,IAAI;YACP,OAAO,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QACpD,KAAK,GAAG;YACN,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QAC9C,KAAK,IAAI;YACP,OAAO,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QACvD,KAAK,IAAI;YACP,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;QACjE,KAAK,QAAQ;YACX,OAAO,IAAI,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC;QACjE;YACE,MAAM,IAAI,eAAe,CAAC,uBAAuB,QAAQ,EAAE,CAAC,CAAC;IACjE,CAAC;AACH,CAAC","sourcesContent":["import { Decimal } from \"decimal.js\";\n\nimport { ExpressionError } from \"../errors.js\";\nimport type { Node } from \"./ast.js\";\n\nconst ZERO = new Decimal(0);\nconst ONE = new Decimal(1);\n\nfunction asDecimal(value: number | Decimal): Decimal {\n return value instanceof Decimal ? value : new Decimal(value);\n}\n\nfunction truthy(value: Decimal): boolean {\n return !value.isZero();\n}\n\nfunction requiredArgument(name: string, args: readonly Decimal[], index: number): Decimal {\n const argument = args[index];\n if (argument === undefined) {\n throw new ExpressionError(`${name}() received an invalid number of arguments`);\n }\n return argument;\n}\n\nfunction evaluateCall(name: string, args: Decimal[]): Decimal {\n switch (name) {\n case \"ceil\":\n return requiredArgument(name, args, 0).ceil();\n case \"floor\":\n return requiredArgument(name, args, 0).floor();\n case \"min\":\n return Decimal.min(...args);\n case \"max\":\n return Decimal.max(...args);\n case \"round\": {\n const digits = args.length === 2 ? requiredArgument(name, args, 1).toNumber() : 0;\n return requiredArgument(name, args, 0).toDecimalPlaces(digits, Decimal.ROUND_HALF_UP);\n }\n case \"if\":\n return truthy(requiredArgument(name, args, 0))\n ? requiredArgument(name, args, 1)\n : requiredArgument(name, args, 2);\n case \"tier\": {\n const value = requiredArgument(name, args, 0);\n for (let index = 1; index < args.length - 1; index += 2) {\n if (value.lessThan(requiredArgument(name, args, index))) {\n return requiredArgument(name, args, index + 1);\n }\n }\n return requiredArgument(name, args, args.length - 1);\n }\n case \"clamp\":\n return Decimal.max(\n requiredArgument(name, args, 1),\n Decimal.min(requiredArgument(name, args, 0), requiredArgument(name, args, 2)),\n );\n case \"percentile\":\n return percentile(args);\n default:\n throw new ExpressionError(`disallowed function: ${name}`);\n }\n}\n\nfunction percentile(args: Decimal[]): Decimal {\n const percentage = requiredArgument(\"percentile\", args, 0);\n if (percentage.lessThan(0) || percentage.greaterThan(100)) {\n throw new ExpressionError(\"percentile() p must be between 0 and 100\");\n }\n const sorted = args.slice(1).sort((left, right) => left.comparedTo(right));\n if (sorted.length === 1) return requiredArgument(\"percentile\", sorted, 0);\n\n const rank = percentage.dividedBy(100).times(sorted.length - 1);\n const lower = rank.floor();\n const lowerIndex = lower.toNumber();\n const upperIndex = Math.min(lowerIndex + 1, sorted.length - 1);\n const fraction = rank.minus(lower);\n return requiredArgument(\"percentile\", sorted, lowerIndex)\n .times(ONE.minus(fraction))\n .plus(requiredArgument(\"percentile\", sorted, upperIndex).times(fraction));\n}\n\nexport function evaluateNode(node: Node, variables: Record<string, number | Decimal>): Decimal {\n switch (node.type) {\n case \"number\":\n return new Decimal(node.value);\n case \"identifier\": {\n const value = variables[node.name];\n return value === undefined ? ZERO : asDecimal(value);\n }\n case \"unary\": {\n const value = evaluateNode(node.operand, variables);\n if (node.op === \"not\") return truthy(value) ? ZERO : ONE;\n return node.op === \"-\" ? value.negated() : value;\n }\n case \"binary\":\n return evaluateBinary(node.op, evaluateNode(node.left, variables), () =>\n evaluateNode(node.right, variables),\n );\n case \"call\":\n return evaluateCall(\n node.name,\n node.args.map((argument) => evaluateNode(argument, variables)),\n );\n case \"ternary\":\n return truthy(evaluateNode(node.cond, variables))\n ? evaluateNode(node.then, variables)\n : evaluateNode(node.else, variables);\n case \"comparison\":\n return evaluateComparison(\n node.op,\n evaluateNode(node.left, variables),\n evaluateNode(node.right, variables),\n );\n case \"boolean\": {\n const left = evaluateNode(node.left, variables);\n if (node.op === \"and\") {\n return truthy(left) ? evaluateNode(node.right, variables) : left;\n }\n if (node.op === \"or\") {\n return truthy(left) ? left : evaluateNode(node.right, variables);\n }\n throw new ExpressionError(`unknown boolean op: ${node.op}`);\n }\n }\n}\n\nfunction evaluateBinary(operator: string, left: Decimal, rightValue: () => Decimal): Decimal {\n const right = rightValue();\n switch (operator) {\n case \"+\":\n return left.plus(right);\n case \"-\":\n return left.minus(right);\n case \"*\":\n return left.times(right);\n case \"/\":\n if (right.isZero()) throw new ExpressionError(\"division by zero\");\n return left.dividedBy(right);\n case \"//\":\n if (right.isZero()) throw new ExpressionError(\"division by zero\");\n // Truncate toward zero to match Python's Decimal `//` (parity): e.g.\n // -7 // 2 == -3, not -4. decimal.js `.floor()` rounds toward -Infinity,\n // which would silently bill a different amount for negative operands.\n return left.divToInt(right);\n case \"%\":\n if (right.isZero()) throw new ExpressionError(\"modulo by zero\");\n return left.modulo(right);\n default:\n throw new ExpressionError(`unknown operator: ${operator}`);\n }\n}\n\nfunction evaluateComparison(operator: string, left: Decimal, right: Decimal): Decimal {\n switch (operator) {\n case \"==\":\n return left.equals(right) ? ONE : ZERO;\n case \"!=\":\n return left.equals(right) ? ZERO : ONE;\n case \"<\":\n return left.lessThan(right) ? ONE : ZERO;\n case \"<=\":\n return left.lessThanOrEqualTo(right) ? ONE : ZERO;\n case \">\":\n return left.greaterThan(right) ? ONE : ZERO;\n case \">=\":\n return left.greaterThanOrEqualTo(right) ? ONE : ZERO;\n case \"in\":\n return left.toString().includes(right.toString()) ? ONE : ZERO;\n case \"not in\":\n return left.toString().includes(right.toString()) ? ZERO : ONE;\n default:\n throw new ExpressionError(`unknown comparison: ${operator}`);\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/expr/parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAY,KAAK,KAAK,EAAkB,MAAM,gBAAgB,CAAC;AAEtE,qBAAa,gBAAgB;IAGf,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAK;
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../src/expr/parser.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErC,OAAO,EAAY,KAAK,KAAK,EAAkB,MAAM,gBAAgB,CAAC;AAEtE,qBAAa,gBAAgB;IAGf,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAK;IAErB,YAA6B,MAAM,EAAE,KAAK,EAAE,EAAI;IAEhD,MAAM,CAAC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAElD;IAED,IAAI,IAAI,KAAK,GAAG,SAAS,CAExB;IAED,OAAO,IAAI,OAAO,CAEjB;IAED,OAAO,CAAC,QAAQ;IAMhB,OAAO,CAAC,KAAK;IAKb,OAAO,CAAC,KAAK;IAUb,OAAO,CAAC,OAAO;IASf,KAAK,IAAI,IAAI,CAYZ;IAED,OA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AAI,CAAC,aAAa,EAAE,EAAE,CAAC;QAC5D,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YACxC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,aAAa,EAAE,EAAE,CAAC;QAClE,CAAC;QACD,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YACpB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;YAClC,OAAO,UAAU,CAAC;QACpB,CAAC;QACD,MAAM,IAAI,eAAe,CAAC,sBAAsB,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC;IAClF,CAAC;IAEO,aAAa;QACnB,MAAM,IAAI,GAAW,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YACrB,GAAG,CAAC;gBACF,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;YACtC,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QAC5B,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { ExpressionError } from \"../errors.js\";\nimport type { Node } from \"./ast.js\";\nimport { ALLOWED_FUNCTIONS } from \"./language.js\";\nimport { tokenize, type Token, type TokenType } from \"./tokenizer.js\";\n\nexport class ExpressionParser {\n private position = 0;\n\n constructor(private readonly tokens: Token[]) {}\n\n static fromSource(source: string): ExpressionParser {\n return new ExpressionParser(tokenize(source));\n }\n\n peek(): Token | undefined {\n return this.tokens[this.position];\n }\n\n isAtEnd(): boolean {\n return this.position >= this.tokens.length;\n }\n\n private previous(): Token {\n const token = this.tokens[this.position - 1];\n if (!token) throw new ExpressionError(\"invalid parser state: no previous token\");\n return token;\n }\n\n private check(...types: TokenType[]): boolean {\n const token = this.peek();\n return token !== undefined && types.includes(token.type);\n }\n\n private match(...types: TokenType[]): boolean {\n for (const type of types) {\n if (this.check(type)) {\n this.position++;\n return true;\n }\n }\n return false;\n }\n\n private consume(type: TokenType, message: string): Token {\n const token = this.peek();\n if (token?.type === type) {\n this.position++;\n return token;\n }\n throw new ExpressionError(message);\n }\n\n parse(): Node {\n const expression = this.booleanExpression();\n if (!this.match(\"if\")) return expression;\n\n const condition = this.booleanExpression();\n this.consume(\"else\", \"expected 'else' in ternary expression\");\n return {\n type: \"ternary\",\n cond: condition,\n then: expression,\n else: this.booleanExpression(),\n };\n }\n\n private comparison(): Node {\n const left = this.addition();\n let node: Node;\n if (this.check(\"not\")) {\n this.match(\"not\");\n if (!this.match(\"in\")) {\n throw new ExpressionError(\"expected 'in' after 'not'\");\n }\n node = { type: \"comparison\", op: \"not in\", left, right: this.addition() };\n } else if (this.match(\"==\", \"!=\", \"<\", \"<=\", \">\", \">=\", \"in\")) {\n node = {\n type: \"comparison\",\n op: this.previous().value,\n left,\n right: this.addition(),\n };\n } else {\n return left;\n }\n // Reject chained comparisons (a < b < c): a left-associative fold would\n // evaluate them as ((a<b)<c) whereas Python uses and-chaining semantics, so\n // forbidding them keeps the two engines identical (parity).\n if (this.check(\"==\", \"!=\", \"<\", \"<=\", \">\", \">=\", \"in\", \"not\")) {\n throw new ExpressionError(\"chained comparisons are not supported\");\n }\n return node;\n }\n\n private addition(): Node {\n let left = this.multiplication();\n while (this.match(\"+\", \"-\")) {\n left = {\n type: \"binary\",\n op: this.previous().value,\n left,\n right: this.multiplication(),\n };\n }\n return left;\n }\n\n private multiplication(): Node {\n let left = this.unary();\n while (this.match(\"*\", \"/\", \"//\", \"%\")) {\n left = {\n type: \"binary\",\n op: this.previous().value,\n left,\n right: this.unary(),\n };\n }\n if (this.check(\"**\")) {\n throw new ExpressionError(\n \"exponentiation operator '**' is not allowed in pricing expressions\",\n );\n }\n return left;\n }\n\n private notExpression(): Node {\n if (!this.match(\"not\")) return this.comparison();\n return {\n type: \"unary\",\n op: \"not\",\n operand: this.notExpression(),\n };\n }\n\n private andExpression(): Node {\n let left = this.notExpression();\n while (this.match(\"and\")) {\n left = {\n type: \"boolean\",\n op: \"and\",\n left,\n right: this.notExpression(),\n };\n }\n return left;\n }\n\n private booleanExpression(): Node {\n let left = this.andExpression();\n while (this.match(\"or\")) {\n left = {\n type: \"boolean\",\n op: \"or\",\n left,\n right: this.andExpression(),\n };\n }\n return left;\n }\n\n private unary(): Node {\n if (!this.match(\"+\", \"-\")) return this.primary();\n return {\n type: \"unary\",\n op: this.previous().value,\n operand: this.unary(),\n };\n }\n\n private primary(): Node {\n if (this.check(\"**\")) {\n throw new ExpressionError(\n \"exponentiation operator '**' is not allowed in pricing expressions\",\n );\n }\n if (this.match(\"number\")) {\n return { type: \"number\", value: this.previous().value };\n }\n if (this.match(\"identifier\")) {\n const name = this.previous().value;\n if (!this.match(\"(\")) return { type: \"identifier\", name };\n if (!ALLOWED_FUNCTIONS.has(name)) {\n throw new ExpressionError(`disallowed function: ${name}`);\n }\n return { type: \"call\", name, args: this.callArguments() };\n }\n if (this.match(\"if\") && this.match(\"(\")) {\n return { type: \"call\", name: \"if\", args: this.callArguments() };\n }\n if (this.match(\"(\")) {\n const expression = this.parse();\n this.consume(\")\", \"expected ')'\");\n return expression;\n }\n throw new ExpressionError(`unexpected token: '${this.peek()?.value ?? \"EOF\"}'`);\n }\n\n private callArguments(): Node[] {\n const args: Node[] = [];\n if (!this.check(\")\")) {\n do {\n args.push(this.booleanExpression());\n } while (this.match(\",\"));\n }\n this.consume(\")\", \"expected ')'\");\n return args;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"parser.js","sourceRoot":"","s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,CAAC;YACpB,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC;YAChC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;YAClC,OAAO,UAAU,CAAC;QACpB,CAAC;QACD,MAAM,IAAI,eAAe,CAAC,sBAAsB,IAAI,CAAC,IAAI,EAAE,EAAE,KAAK,IAAI,KAAK,GAAG,CAAC,CAAC;IAClF,CAAC;IAEO,aAAa;QACnB,MAAM,IAAI,GAAW,EAAE,CAAC;QACxB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE,CAAC;YACrB,GAAG,CAAC;gBACF,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAC;YACtC,CAAC,QAAQ,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,EAAE;QAC5B,CAAC;QACD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,cAAc,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;CACF","sourcesContent":["import { ExpressionError } from \"../errors.js\";\nimport type { Node } from \"./ast.js\";\nimport { ALLOWED_FUNCTIONS } from \"./language.js\";\nimport { tokenize, type Token, type TokenType } from \"./tokenizer.js\";\n\nexport class ExpressionParser {\n private position = 0;\n\n constructor(private readonly tokens: Token[]) {}\n\n static fromSource(source: string): ExpressionParser {\n return new ExpressionParser(tokenize(source));\n }\n\n peek(): Token | undefined {\n return this.tokens[this.position];\n }\n\n isAtEnd(): boolean {\n return this.position >= this.tokens.length;\n }\n\n private previous(): Token {\n const token = this.tokens[this.position - 1];\n if (!token) throw new ExpressionError(\"invalid parser state: no previous token\");\n return token;\n }\n\n private check(...types: TokenType[]): boolean {\n const token = this.peek();\n return token !== undefined && types.includes(token.type);\n }\n\n private match(...types: TokenType[]): boolean {\n for (const type of types) {\n if (this.check(type)) {\n this.position++;\n return true;\n }\n }\n return false;\n }\n\n private consume(type: TokenType, message: string): Token {\n const token = this.peek();\n if (token?.type === type) {\n this.position++;\n return token;\n }\n throw new ExpressionError(message);\n }\n\n parse(): Node {\n const expression = this.booleanExpression();\n if (!this.match(\"if\")) return expression;\n\n const condition = this.booleanExpression();\n this.consume(\"else\", \"expected 'else' in ternary expression\");\n return {\n type: \"ternary\",\n cond: condition,\n then: expression,\n else: this.booleanExpression(),\n };\n }\n\n private comparison(): Node {\n const left = this.addition();\n let node: Node;\n if (this.check(\"not\")) {\n this.match(\"not\");\n if (!this.match(\"in\")) {\n throw new ExpressionError(\"expected 'in' after 'not'\");\n }\n node = { type: \"comparison\", op: \"not in\", left, right: this.addition() };\n } else if (this.match(\"==\", \"!=\", \"<\", \"<=\", \">\", \">=\", \"in\")) {\n node = {\n type: \"comparison\",\n op: this.previous().value,\n left,\n right: this.addition(),\n };\n } else {\n return left;\n }\n // Reject chained comparisons (a < b < c): a left-associative fold would\n // evaluate them as ((a<b)<c) whereas Python uses and-chaining semantics, so\n // forbidding them keeps the two engines identical (parity).\n if (this.check(\"==\", \"!=\", \"<\", \"<=\", \">\", \">=\", \"in\", \"not\")) {\n throw new ExpressionError(\"chained comparisons are not supported\");\n }\n return node;\n }\n\n private addition(): Node {\n let left = this.multiplication();\n while (this.match(\"+\", \"-\")) {\n left = {\n type: \"binary\",\n op: this.previous().value,\n left,\n right: this.multiplication(),\n };\n }\n return left;\n }\n\n private multiplication(): Node {\n let left = this.unary();\n while (this.match(\"*\", \"/\", \"//\", \"%\")) {\n left = {\n type: \"binary\",\n op: this.previous().value,\n left,\n right: this.unary(),\n };\n }\n if (this.check(\"**\")) {\n throw new ExpressionError(\n \"exponentiation operator '**' is not allowed in pricing expressions\",\n );\n }\n return left;\n }\n\n private notExpression(): Node {\n if (!this.match(\"not\")) return this.comparison();\n return {\n type: \"unary\",\n op: \"not\",\n operand: this.notExpression(),\n };\n }\n\n private andExpression(): Node {\n let left = this.notExpression();\n while (this.match(\"and\")) {\n left = {\n type: \"boolean\",\n op: \"and\",\n left,\n right: this.notExpression(),\n };\n }\n return left;\n }\n\n private booleanExpression(): Node {\n let left = this.andExpression();\n while (this.match(\"or\")) {\n left = {\n type: \"boolean\",\n op: \"or\",\n left,\n right: this.andExpression(),\n };\n }\n return left;\n }\n\n private unary(): Node {\n if (!this.match(\"+\", \"-\")) return this.primary();\n return {\n type: \"unary\",\n op: this.previous().value,\n operand: this.unary(),\n };\n }\n\n private primary(): Node {\n if (this.check(\"**\")) {\n throw new ExpressionError(\n \"exponentiation operator '**' is not allowed in pricing expressions\",\n );\n }\n if (this.match(\"number\")) {\n return { type: \"number\", value: this.previous().value };\n }\n if (this.match(\"identifier\")) {\n const name = this.previous().value;\n if (!this.match(\"(\")) return { type: \"identifier\", name };\n if (!ALLOWED_FUNCTIONS.has(name)) {\n throw new ExpressionError(`disallowed function: ${name}`);\n }\n return { type: \"call\", name, args: this.callArguments() };\n }\n if (this.match(\"if\") && this.match(\"(\")) {\n return { type: \"call\", name: \"if\", args: this.callArguments() };\n }\n if (this.match(\"(\")) {\n const expression = this.parse();\n this.consume(\")\", \"expected ')'\");\n return expression;\n }\n throw new ExpressionError(`unexpected token: '${this.peek()?.value ?? \"EOF\"}'`);\n }\n\n private callArguments(): Node[] {\n const args: Node[] = [];\n if (!this.check(\")\")) {\n do {\n args.push(this.booleanExpression());\n } while (this.match(\",\"));\n }\n this.consume(\")\", \"expected ')'\");\n return args;\n }\n}\n"]}
|
|
@@ -984,10 +984,6 @@
|
|
|
984
984
|
{
|
|
985
985
|
"type": "number"
|
|
986
986
|
},
|
|
987
|
-
{
|
|
988
|
-
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
|
|
989
|
-
"type": "string"
|
|
990
|
-
},
|
|
991
987
|
{
|
|
992
988
|
"type": "boolean"
|
|
993
989
|
}
|
|
@@ -1299,10 +1295,6 @@
|
|
|
1299
1295
|
{
|
|
1300
1296
|
"type": "number"
|
|
1301
1297
|
},
|
|
1302
|
-
{
|
|
1303
|
-
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
|
|
1304
|
-
"type": "string"
|
|
1305
|
-
},
|
|
1306
1298
|
{
|
|
1307
1299
|
"type": "boolean"
|
|
1308
1300
|
}
|
|
@@ -1446,10 +1438,6 @@
|
|
|
1446
1438
|
{
|
|
1447
1439
|
"type": "number"
|
|
1448
1440
|
},
|
|
1449
|
-
{
|
|
1450
|
-
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$",
|
|
1451
|
-
"type": "string"
|
|
1452
|
-
},
|
|
1453
1441
|
{
|
|
1454
1442
|
"type": "boolean"
|
|
1455
1443
|
}
|
|
@@ -15,18 +15,12 @@ export type Op1 = "in";
|
|
|
15
15
|
/**
|
|
16
16
|
* @minItems 1
|
|
17
17
|
*/
|
|
18
|
-
export type Values = [
|
|
19
|
-
string | number | string | boolean,
|
|
20
|
-
...(string | number | string | boolean)[]
|
|
21
|
-
];
|
|
18
|
+
export type Values = [string | number | boolean, ...(string | number | boolean)[]];
|
|
22
19
|
export type Op2 = "not_in";
|
|
23
20
|
/**
|
|
24
21
|
* @minItems 1
|
|
25
22
|
*/
|
|
26
|
-
export type Values1 = [
|
|
27
|
-
string | number | string | boolean,
|
|
28
|
-
...(string | number | string | boolean)[]
|
|
29
|
-
];
|
|
23
|
+
export type Values1 = [string | number | boolean, ...(string | number | boolean)[]];
|
|
30
24
|
export type Op3 = "prefix";
|
|
31
25
|
export type Value1 = string;
|
|
32
26
|
export type Op4 = "range";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-config.types.d.ts","sourceRoot":"","sources":["../../src/generated/pricing-config.types.ts"],"names":[],"mappings":"AACA;;;;GAIG;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC;AACxB,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,CAAC;AACxC,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC;AAC1B,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,QAA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a,EAAE,YAAY,CAAC;IAC5B,WAAW,EAAE,UAAU,CAAC;IACxB,QAAQ,EAAE,YAAY,CAAC;IACvB,MAAM,EAAE,kBAAkB,CAAC;CAC5B;AACD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,QAAQ,CAAC;IAClB,OAAO,EAAE,QAAQ,CAAC;IAClB,OAAO,EAAE,QAAQ,CAAC;CACnB;AACD,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,QAAQ,CAAC;IAClB,OAAO,EAAE,QAAQ,CAAC;IAClB,OAAO,EAAE,QAAQ,CAAC;CACnB;AACD,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,YAAY,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAC;IAChB,gBAAgB,EAAE,cAAc,CAAC;IACjC,QAAQ,EAAE,QAAQ,CAAC;IACnB,wBAAwB,CAAC,EAAE,sBAAsB,CAAC;IAClD,cAAc,CAAC,EAAE,aAAa,CAAC;CAChC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pricing-config.types.js","sourceRoot":"","sources":["../../src/generated/pricing-config.types.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;GAIG","sourcesContent":["/* eslint-disable */\n/**\n * This file was automatically generated by json-schema-to-typescript.\n * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,\n * and run json-schema-to-typescript to regenerate this file.\n */\n\nexport type Version = 1;\nexport type DefaultPlan = string | null;\nexport type Unit = string;\nexport type Type = \"string\" | \"number\" | \"boolean\";\nexport type Required = boolean;\nexport type Extends = string | null;\nexport type Op = \"eq\";\nexport type Value = string | number | boolean;\nexport type Op1 = \"in\";\n/**\n * @minItems 1\n */\nexport type Values = [\n string | number | string | boolean,\n ...(string | number | string | boolean)[],\n];\nexport type Op2 = \"not_in\";\n/**\n * @minItems 1\n */\nexport type Values1 = [\n string | number | string | boolean,\n ...(string | number | string | boolean)[],\n];\nexport type Op3 = \"prefix\";\nexport type Value1 = string;\nexport type Op4 = \"range\";\nexport type Gt = string | null;\nexport type Gte = string | null;\nexport type Lt = string | null;\nexport type Lte = string | null;\nexport type Charge =\n | FlatCharge\n | PerUnitCharge\n | PackageCharge\n | GraduatedCharge\n | VolumeCharge\n | ExpressionCharge\n | SumCharge;\nexport type Type1 = \"flat\";\nexport type Amount = string;\nexport type Type2 = \"per_unit\";\nexport type Measure = string;\n/**\n * Credits charged for each unit_size units of the selected measure.\n */\nexport type Rate = string;\n/**\n * Number of measure units represented by one rate unit; use 1000000 for per-million-token rates.\n */\nexport type UnitSize = string;\nexport type Type3 = \"package\";\nexport type Measure1 = string;\nexport type Units = string;\nexport type Amount1 = string;\nexport type Rounding = \"ceil\" | \"floor\" | \"nearest\";\nexport type Type4 = \"graduated\";\nexport type Measure2 = string;\n/**\n * @minItems 1\n */\nexport type Tiers = [GraduatedTier, ...GraduatedTier[]];\nexport type UpTo = string | null;\nexport type Rate1 = string;\nexport type Type5 = \"volume\";\nexport type Measure3 = string;\n/**\n * @minItems 1\n */\nexport type Tiers1 = [GraduatedTier, ...GraduatedTier[]];\nexport type Type6 = \"expression\";\nexport type Formula = string;\nexport type Type7 = \"sum\";\n/**\n * @minItems 1\n */\nexport type Components = [\n (\n | FlatCharge\n | PerUnitCharge\n | PackageCharge\n | GraduatedCharge\n | VolumeCharge\n | ExpressionCharge\n | SumCharge\n ),\n ...(\n | FlatCharge\n | PerUnitCharge\n | PackageCharge\n | GraduatedCharge\n | VolumeCharge\n | ExpressionCharge\n | SumCharge\n )[],\n];\nexport type Rules = PriceRule[];\nexport type Unmatched = RejectUnmatched | ChargeUnmatched;\nexport type Action = \"reject\";\nexport type Action1 = \"charge\";\nexport type Charge1 =\n | FlatCharge\n | PerUnitCharge\n | PackageCharge\n | GraduatedCharge\n | VolumeCharge\n | ExpressionCharge\n | SumCharge;\nexport type Priority = number;\nexport type Expiry =\n | NeverExpiry\n | AfterGrantExpiry\n | EndOfWindowExpiry\n | FixedExpiry\n | SubscriptionEndExpiry;\nexport type Type8 = \"never\";\nexport type Type9 = \"after_grant\";\nexport type Unit1 = \"day\" | \"week\" | \"month\" | \"year\";\nexport type Count = number;\nexport type Timezone = string;\nexport type Type10 = \"end_of_window\";\nexport type Window = CalendarWindow | PlanAssignmentWindow;\nexport type Type11 = \"calendar\";\nexport type Unit2 = \"day\" | \"week\" | \"month\" | \"year\";\nexport type Count1 = number;\nexport type Timezone1 = string;\nexport type Type12 = \"plan_assignment\";\nexport type Timezone2 = string;\nexport type Type13 = \"fixed_at\";\nexport type At = string;\nexport type Type14 = \"subscription_end\";\nexport type DefaultBucket = string | null;\nexport type Type15 = \"prepaid\";\nexport type Type16 = \"credit_line\";\nexport type Limit = string;\nexport type Trigger = \"account_created\" | \"referral_completed\" | \"promo_code_redeemed\" | \"manual\";\n/**\n * @minItems 1\n */\nexport type Awards = [GrantAward, ...GrantAward[]];\nexport type Recipient = \"subject\" | \"referrer\";\nexport type Amount2 = string;\nexport type Bucket = string;\nexport type Expiry1 =\n | (NeverExpiry | AfterGrantExpiry | EndOfWindowExpiry | FixedExpiry | SubscriptionEndExpiry)\n | null;\nexport type StartsAt = string | null;\nexport type EndsAt = string | null;\nexport type Regions = string[];\nexport type Plans = string[];\nexport type Regions1 = string[];\nexport type MaxAwardsPerSubject = number;\nexport type IdempotencyScope = \"subject\" | \"event\";\nexport type Currency = string;\nexport type UnitsPerMajor = string;\nexport type Type17 = \"boolean\";\nexport type Default = boolean;\nexport type Type18 = \"enum\";\n/**\n * @minItems 1\n */\nexport type Values2 = [string, ...string[]];\nexport type Default1 = string;\nexport type Type19 = \"integer\";\nexport type Default2 = number;\nexport type Minimum = number | null;\nexport type Maximum = number | null;\nexport type Type20 = \"string\";\nexport type Default3 = string;\nexport type Pattern = string | null;\nexport type MaxInFlight = number | null;\nexport type MaxInFlight1 = number;\nexport type DisplayName = string;\n/**\n * Public catalog ordering. Lower ranks appear first; ties are ordered by plan key.\n */\nexport type Rank = number;\nexport type Description = string | null;\nexport type RateCard1 = string | null;\nexport type AllowedOperations = string[];\nexport type Amount3 = string;\n/**\n * Spend priority shared with credit buckets. Lower values are used first.\n */\nexport type Priority1 = number;\nexport type Window1 = CalendarWindow | RollingWindow | PlanAssignmentWindow;\nexport type Type21 = \"rolling\";\nexport type Unit3 = \"second\" | \"minute\" | \"hour\" | \"day\" | \"week\";\nexport type Count2 = number;\nexport type Operation = string;\nexport type Measure4 = string;\nexport type Limit1 = string;\nexport type Window2 = CalendarWindow | RollingWindow | PlanAssignmentWindow;\nexport type Enforcement = \"block\" | \"allow\";\nexport type EmitAtPercent = number[];\nexport type CreditPolicy = string | null;\nexport type AdmissionPolicy1 = string | null;\n/**\n * Default adoption timing for existing assignments when a newer catalog revision changes this plan. A catalog activation may override it for one release.\n */\nexport type DefaultRollout = \"immediate\" | \"next_renewal\" | \"new_assignments_only\";\nexport type Type22 = \"stripe\";\nexport type Type23 = \"dodo\";\nexport type Type24 = \"custom\";\nexport type Adapter = string;\nexport type DisplayName1 = string;\nexport type Description1 = string | null;\nexport type SortOrder = number;\nexport type AmountMinor = number;\nexport type Currency1 = string;\nexport type TaxBehavior = \"inclusive\" | \"exclusive\" | \"unspecified\";\nexport type Type25 = \"stripe_price\";\nexport type PriceId = string;\nexport type Type26 = \"dodo_product\";\nexport type ProductId = string;\nexport type Type27 = \"custom_object\";\nexport type ObjectKind = \"subscription\" | \"one_time\";\nexport type ExternalId = string;\nexport type Type28 = \"subscription\";\nexport type Plan = string;\nexport type Amount4 = string;\nexport type Bucket1 = string;\nexport type Renewal = \"replace_previous\" | \"accumulate\";\nexport type Expiry2 =\n | NeverExpiry\n | AfterGrantExpiry\n | EndOfWindowExpiry\n | FixedExpiry\n | SubscriptionEndExpiry;\nexport type DisplayName2 = string;\nexport type Description2 = string | null;\nexport type SortOrder1 = number;\nexport type Type29 = \"topup\";\nexport type CreditsPerUnit = string;\nexport type Minimum1 = number;\nexport type Maximum1 = number;\nexport type Default4 = number;\nexport type Bucket2 = string;\nexport type Expiry3 =\n | (NeverExpiry | AfterGrantExpiry | EndOfWindowExpiry | FixedExpiry | SubscriptionEndExpiry)\n | null;\nexport type LotBehavior = \"separate_lots\" | \"merge_and_refresh\";\nexport type Effective = \"immediate\" | \"renewal\";\nexport type Proration = \"prorated\" | \"none\";\nexport type PaymentFailure = \"prevent_change\" | \"apply_change\";\n/**\n * @minItems 1\n */\nexport type EligibleTopups = [string, ...string[]];\nexport type Minimum2 = string;\nexport type Maximum2 = string;\nexport type Default5 = string;\n/**\n * Balance that rearms auto-recharge; it must exceed balance_below.maximum.\n */\nexport type RearmAbove = string;\nexport type Minimum3 = number;\nexport type Maximum3 = number;\nexport type Default6 = number;\nexport type MaxPurchases = number;\nexport type Window3 = CalendarWindow | RollingWindow;\nexport type MaxChargeMinor = number;\nexport type MaxConsecutiveFailures = number;\nexport type FailureAction = \"pause\";\n\nexport interface BursarConfig {\n version: Version;\n catalog?: CatalogConfig;\n /**\n * Usage operations, their measures and dimensions, and reusable rate cards.\n */\n pricing?: PricingConfig | null;\n credits: CreditsConfig;\n entitlements?: EntitlementsConfig;\n admission?: AdmissionConfig;\n plans?: Plans1;\n commerce?: CommerceConfig;\n}\n/**\n * Catalog-wide publication settings such as the default signup plan.\n */\nexport interface CatalogConfig {\n default_plan?: DefaultPlan;\n}\nexport interface PricingConfig {\n operations: Operations;\n rate_cards: RateCards;\n}\nexport interface Operations {\n [k: string]: OperationDefinition;\n}\nexport interface OperationDefinition {\n measures: Measures;\n dimensions?: Dimensions;\n}\nexport interface Measures {\n [k: string]: MeasureDefinition;\n}\nexport interface MeasureDefinition {\n unit: Unit;\n}\nexport interface Dimensions {\n [k: string]: DimensionDefinition;\n}\nexport interface DimensionDefinition {\n type: Type;\n required?: Required;\n}\nexport interface RateCards {\n [k: string]: RateCard;\n}\nexport interface RateCard {\n extends?: Extends;\n operations?: Operations1;\n}\nexport interface Operations1 {\n [k: string]: OperationPricing;\n}\nexport interface OperationPricing {\n rules?: Rules;\n unmatched: Unmatched;\n}\nexport interface PriceRule {\n when: When;\n charge: Charge;\n}\nexport interface When {\n [k: string]: EqualMatcher | InMatcher | NotInMatcher | PrefixMatcher | RangeMatcher;\n}\nexport interface EqualMatcher {\n op: Op;\n value: Value;\n}\nexport interface InMatcher {\n op: Op1;\n values: Values;\n}\nexport interface NotInMatcher {\n op: Op2;\n values: Values1;\n}\nexport interface PrefixMatcher {\n op: Op3;\n value: Value1;\n}\nexport interface RangeMatcher {\n op: Op4;\n gt?: Gt;\n gte?: Gte;\n lt?: Lt;\n lte?: Lte;\n}\nexport interface FlatCharge {\n type: Type1;\n amount: Amount;\n}\nexport interface PerUnitCharge {\n type: Type2;\n measure: Measure;\n rate: Rate;\n unit_size?: UnitSize;\n}\nexport interface PackageCharge {\n type: Type3;\n measure: Measure1;\n units: Units;\n amount: Amount1;\n rounding?: Rounding;\n}\nexport interface GraduatedCharge {\n type: Type4;\n measure: Measure2;\n tiers: Tiers;\n}\nexport interface GraduatedTier {\n up_to?: UpTo;\n rate: Rate1;\n}\nexport interface VolumeCharge {\n type: Type5;\n measure: Measure3;\n tiers: Tiers1;\n}\nexport interface ExpressionCharge {\n type: Type6;\n formula: Formula;\n}\nexport interface SumCharge {\n type: Type7;\n components: Components;\n}\nexport interface RejectUnmatched {\n action: Action;\n}\nexport interface ChargeUnmatched {\n action: Action1;\n charge: Charge1;\n}\n/**\n * Credit buckets, spending policies, grants, and optional display conversion.\n */\nexport interface CreditsConfig {\n buckets?: Buckets;\n default_bucket?: DefaultBucket;\n policies?: Policies;\n grant_programs?: GrantPrograms;\n display?: CreditDisplay | null;\n}\nexport interface Buckets {\n [k: string]: BucketDefinition;\n}\nexport interface BucketDefinition {\n priority: Priority;\n expiry?: Expiry;\n}\nexport interface NeverExpiry {\n type: Type8;\n}\nexport interface AfterGrantExpiry {\n type: Type9;\n interval: BillingInterval;\n timezone?: Timezone;\n}\nexport interface BillingInterval {\n unit: Unit1;\n count?: Count;\n}\nexport interface EndOfWindowExpiry {\n type: Type10;\n window: Window;\n}\nexport interface CalendarWindow {\n type: Type11;\n unit: Unit2;\n count?: Count1;\n timezone?: Timezone1;\n}\nexport interface PlanAssignmentWindow {\n type: Type12;\n interval: BillingInterval;\n timezone?: Timezone2;\n}\nexport interface FixedExpiry {\n type: Type13;\n at: At;\n}\nexport interface SubscriptionEndExpiry {\n type: Type14;\n}\nexport interface Policies {\n [k: string]: PrepaidCreditPolicy | CreditLinePolicy;\n}\nexport interface PrepaidCreditPolicy {\n type: Type15;\n}\nexport interface CreditLinePolicy {\n type: Type16;\n limit: Limit;\n}\nexport interface GrantPrograms {\n [k: string]: GrantProgram;\n}\nexport interface GrantProgram {\n trigger: Trigger;\n awards: Awards;\n availability?: Availability | null;\n eligibility?: GrantEligibility;\n max_awards_per_subject?: MaxAwardsPerSubject;\n idempotency_scope?: IdempotencyScope;\n}\nexport interface GrantAward {\n recipient?: Recipient;\n amount: Amount2;\n bucket: Bucket;\n expiry?: Expiry1;\n}\nexport interface Availability {\n starts_at?: StartsAt;\n ends_at?: EndsAt;\n regions?: Regions;\n}\nexport interface GrantEligibility {\n plans?: Plans;\n regions?: Regions1;\n}\nexport interface CreditDisplay {\n currency: Currency;\n units_per_major: UnitsPerMajor;\n}\n/**\n * Typed feature definitions referenced by plan feature values.\n */\nexport interface EntitlementsConfig {\n features?: Features;\n}\nexport interface Features {\n [k: string]: BooleanFeature | EnumFeature | IntegerFeature | StringFeature;\n}\nexport interface BooleanFeature {\n type: Type17;\n default: Default;\n}\nexport interface EnumFeature {\n type: Type18;\n values: Values2;\n default: Default1;\n}\nexport interface IntegerFeature {\n type: Type19;\n default: Default2;\n minimum?: Minimum;\n maximum?: Maximum;\n}\nexport interface StringFeature {\n type: Type20;\n default: Default3;\n pattern?: Pattern;\n}\n/**\n * Reusable global and per-operation concurrency policies.\n */\nexport interface AdmissionConfig {\n policies?: Policies1;\n}\nexport interface Policies1 {\n [k: string]: AdmissionPolicy;\n}\nexport interface AdmissionPolicy {\n max_in_flight?: MaxInFlight;\n operations?: Operations2;\n}\nexport interface Operations2 {\n [k: string]: OperationAdmission;\n}\nexport interface OperationAdmission {\n max_in_flight: MaxInFlight1;\n}\n/**\n * Product plans keyed by stable snake_case identifiers.\n */\nexport interface Plans1 {\n [k: string]: PlanDefinition;\n}\nexport interface PlanDefinition {\n display_name: DisplayName;\n rank?: Rank;\n description?: Description;\n rate_card?: RateCard1;\n allowed_operations?: AllowedOperations;\n features?: Features1;\n credit_allowance?: CreditAllowance | null;\n quotas?: Quotas;\n credit_policy?: CreditPolicy;\n admission_policy?: AdmissionPolicy1;\n /**\n * Catalog evolution defaults. When omitted, subscription-backed plans use next_renewal and other plans use immediate; canonical output materializes the default.\n */\n evolution?: PlanEvolution | null;\n}\nexport interface Features1 {\n [k: string]: boolean | number | string;\n}\nexport interface CreditAllowance {\n amount: Amount3;\n priority: Priority1;\n window: Window1;\n}\nexport interface RollingWindow {\n type: Type21;\n duration: Duration;\n}\nexport interface Duration {\n unit: Unit3;\n count: Count2;\n}\nexport interface Quotas {\n [k: string]: QuotaDefinition;\n}\nexport interface QuotaDefinition {\n operation: Operation;\n measure: Measure4;\n limit: Limit1;\n window: Window2;\n enforcement: Enforcement;\n emit_at_percent?: EmitAtPercent;\n}\nexport interface PlanEvolution {\n default_rollout: DefaultRollout;\n}\n/**\n * Payment providers, subscription and top-up offers, and purchase guardrails.\n */\nexport interface CommerceConfig {\n providers?: Providers;\n offers?: Offers;\n subscription_changes?: SubscriptionChanges | null;\n auto_recharge?: AutoRechargeGuardrails | null;\n}\nexport interface Providers {\n [k: string]: StripeProvider | DodoProvider | CustomProvider;\n}\nexport interface StripeProvider {\n type: Type22;\n}\nexport interface DodoProvider {\n type: Type23;\n}\nexport interface CustomProvider {\n type: Type24;\n adapter: Adapter;\n}\nexport interface Offers {\n [k: string]: SubscriptionOffer | TopupOffer;\n}\nexport interface SubscriptionOffer {\n display_name: DisplayName1;\n description?: Description1;\n sort_order?: SortOrder;\n availability?: Availability | null;\n price: OfferPrice;\n providers: Providers1;\n type: Type28;\n plan: Plan;\n billing_interval: BillingInterval;\n trial?: BillingInterval | null;\n cycle_grant?: CycleGrant | null;\n}\nexport interface OfferPrice {\n amount_minor: AmountMinor;\n currency: Currency1;\n tax_behavior?: TaxBehavior;\n}\nexport interface Providers1 {\n [k: string]: StripePriceReference | DodoProductReference | CustomObjectReference;\n}\nexport interface StripePriceReference {\n type: Type25;\n price_id: PriceId;\n}\nexport interface DodoProductReference {\n type: Type26;\n product_id: ProductId;\n}\nexport interface CustomObjectReference {\n type: Type27;\n object_kind: ObjectKind;\n external_id: ExternalId;\n}\nexport interface CycleGrant {\n amount: Amount4;\n bucket: Bucket1;\n renewal: Renewal;\n expiry?: Expiry2;\n}\nexport interface TopupOffer {\n display_name: DisplayName2;\n description?: Description2;\n sort_order?: SortOrder1;\n availability?: Availability | null;\n price: OfferPrice;\n providers: Providers2;\n type: Type29;\n credits_per_unit: CreditsPerUnit;\n quantity?: QuantityBounds;\n bucket: Bucket2;\n expiry?: Expiry3;\n lot_behavior?: LotBehavior;\n}\nexport interface Providers2 {\n [k: string]: StripePriceReference | DodoProductReference | CustomObjectReference;\n}\nexport interface QuantityBounds {\n minimum?: Minimum1;\n maximum?: Maximum1;\n default?: Default4;\n}\nexport interface SubscriptionChanges {\n upgrade?: SubscriptionChangePolicy | null;\n downgrade?: SubscriptionChangePolicy | null;\n lateral?: SubscriptionChangePolicy | null;\n cadence_change?: SubscriptionChangePolicy | null;\n}\nexport interface SubscriptionChangePolicy {\n effective: Effective;\n proration: Proration;\n payment_failure?: PaymentFailure;\n}\nexport interface AutoRechargeGuardrails {\n eligible_topups: EligibleTopups;\n balance_below: DecimalRange;\n rearm_above: RearmAbove;\n quantity: IntegerRange;\n limits: AutoRechargeLimits;\n}\nexport interface DecimalRange {\n minimum: Minimum2;\n maximum: Maximum2;\n default: Default5;\n}\nexport interface IntegerRange {\n minimum: Minimum3;\n maximum: Maximum3;\n default: Default6;\n}\nexport interface AutoRechargeLimits {\n max_purchases: MaxPurchases;\n window: Window3;\n max_charge_minor: MaxChargeMinor;\n cooldown: Duration;\n max_consecutive_failures?: MaxConsecutiveFailures;\n failure_action?: FailureAction;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"pricing-config.types.js","sourceRoot":"","sources":["../../src/generated/pricing-config.types.ts"],"names":[],"mappings":"AAAA,oBAAoB;AACpB;;;;GAIG","sourcesContent":["/* eslint-disable */\n/**\n * This file was automatically generated by json-schema-to-typescript.\n * DO NOT MODIFY IT BY HAND. Instead, modify the source JSONSchema file,\n * and run json-schema-to-typescript to regenerate this file.\n */\n\nexport type Version = 1;\nexport type DefaultPlan = string | null;\nexport type Unit = string;\nexport type Type = \"string\" | \"number\" | \"boolean\";\nexport type Required = boolean;\nexport type Extends = string | null;\nexport type Op = \"eq\";\nexport type Value = string | number | boolean;\nexport type Op1 = \"in\";\n/**\n * @minItems 1\n */\nexport type Values = [string | number | boolean, ...(string | number | boolean)[]];\nexport type Op2 = \"not_in\";\n/**\n * @minItems 1\n */\nexport type Values1 = [string | number | boolean, ...(string | number | boolean)[]];\nexport type Op3 = \"prefix\";\nexport type Value1 = string;\nexport type Op4 = \"range\";\nexport type Gt = string | null;\nexport type Gte = string | null;\nexport type Lt = string | null;\nexport type Lte = string | null;\nexport type Charge =\n | FlatCharge\n | PerUnitCharge\n | PackageCharge\n | GraduatedCharge\n | VolumeCharge\n | ExpressionCharge\n | SumCharge;\nexport type Type1 = \"flat\";\nexport type Amount = string;\nexport type Type2 = \"per_unit\";\nexport type Measure = string;\n/**\n * Credits charged for each unit_size units of the selected measure.\n */\nexport type Rate = string;\n/**\n * Number of measure units represented by one rate unit; use 1000000 for per-million-token rates.\n */\nexport type UnitSize = string;\nexport type Type3 = \"package\";\nexport type Measure1 = string;\nexport type Units = string;\nexport type Amount1 = string;\nexport type Rounding = \"ceil\" | \"floor\" | \"nearest\";\nexport type Type4 = \"graduated\";\nexport type Measure2 = string;\n/**\n * @minItems 1\n */\nexport type Tiers = [GraduatedTier, ...GraduatedTier[]];\nexport type UpTo = string | null;\nexport type Rate1 = string;\nexport type Type5 = \"volume\";\nexport type Measure3 = string;\n/**\n * @minItems 1\n */\nexport type Tiers1 = [GraduatedTier, ...GraduatedTier[]];\nexport type Type6 = \"expression\";\nexport type Formula = string;\nexport type Type7 = \"sum\";\n/**\n * @minItems 1\n */\nexport type Components = [\n (\n | FlatCharge\n | PerUnitCharge\n | PackageCharge\n | GraduatedCharge\n | VolumeCharge\n | ExpressionCharge\n | SumCharge\n ),\n ...(\n | FlatCharge\n | PerUnitCharge\n | PackageCharge\n | GraduatedCharge\n | VolumeCharge\n | ExpressionCharge\n | SumCharge\n )[],\n];\nexport type Rules = PriceRule[];\nexport type Unmatched = RejectUnmatched | ChargeUnmatched;\nexport type Action = \"reject\";\nexport type Action1 = \"charge\";\nexport type Charge1 =\n | FlatCharge\n | PerUnitCharge\n | PackageCharge\n | GraduatedCharge\n | VolumeCharge\n | ExpressionCharge\n | SumCharge;\nexport type Priority = number;\nexport type Expiry =\n | NeverExpiry\n | AfterGrantExpiry\n | EndOfWindowExpiry\n | FixedExpiry\n | SubscriptionEndExpiry;\nexport type Type8 = \"never\";\nexport type Type9 = \"after_grant\";\nexport type Unit1 = \"day\" | \"week\" | \"month\" | \"year\";\nexport type Count = number;\nexport type Timezone = string;\nexport type Type10 = \"end_of_window\";\nexport type Window = CalendarWindow | PlanAssignmentWindow;\nexport type Type11 = \"calendar\";\nexport type Unit2 = \"day\" | \"week\" | \"month\" | \"year\";\nexport type Count1 = number;\nexport type Timezone1 = string;\nexport type Type12 = \"plan_assignment\";\nexport type Timezone2 = string;\nexport type Type13 = \"fixed_at\";\nexport type At = string;\nexport type Type14 = \"subscription_end\";\nexport type DefaultBucket = string | null;\nexport type Type15 = \"prepaid\";\nexport type Type16 = \"credit_line\";\nexport type Limit = string;\nexport type Trigger = \"account_created\" | \"referral_completed\" | \"promo_code_redeemed\" | \"manual\";\n/**\n * @minItems 1\n */\nexport type Awards = [GrantAward, ...GrantAward[]];\nexport type Recipient = \"subject\" | \"referrer\";\nexport type Amount2 = string;\nexport type Bucket = string;\nexport type Expiry1 =\n | (NeverExpiry | AfterGrantExpiry | EndOfWindowExpiry | FixedExpiry | SubscriptionEndExpiry)\n | null;\nexport type StartsAt = string | null;\nexport type EndsAt = string | null;\nexport type Regions = string[];\nexport type Plans = string[];\nexport type Regions1 = string[];\nexport type MaxAwardsPerSubject = number;\nexport type IdempotencyScope = \"subject\" | \"event\";\nexport type Currency = string;\nexport type UnitsPerMajor = string;\nexport type Type17 = \"boolean\";\nexport type Default = boolean;\nexport type Type18 = \"enum\";\n/**\n * @minItems 1\n */\nexport type Values2 = [string, ...string[]];\nexport type Default1 = string;\nexport type Type19 = \"integer\";\nexport type Default2 = number;\nexport type Minimum = number | null;\nexport type Maximum = number | null;\nexport type Type20 = \"string\";\nexport type Default3 = string;\nexport type Pattern = string | null;\nexport type MaxInFlight = number | null;\nexport type MaxInFlight1 = number;\nexport type DisplayName = string;\n/**\n * Public catalog ordering. Lower ranks appear first; ties are ordered by plan key.\n */\nexport type Rank = number;\nexport type Description = string | null;\nexport type RateCard1 = string | null;\nexport type AllowedOperations = string[];\nexport type Amount3 = string;\n/**\n * Spend priority shared with credit buckets. Lower values are used first.\n */\nexport type Priority1 = number;\nexport type Window1 = CalendarWindow | RollingWindow | PlanAssignmentWindow;\nexport type Type21 = \"rolling\";\nexport type Unit3 = \"second\" | \"minute\" | \"hour\" | \"day\" | \"week\";\nexport type Count2 = number;\nexport type Operation = string;\nexport type Measure4 = string;\nexport type Limit1 = string;\nexport type Window2 = CalendarWindow | RollingWindow | PlanAssignmentWindow;\nexport type Enforcement = \"block\" | \"allow\";\nexport type EmitAtPercent = number[];\nexport type CreditPolicy = string | null;\nexport type AdmissionPolicy1 = string | null;\n/**\n * Default adoption timing for existing assignments when a newer catalog revision changes this plan. A catalog activation may override it for one release.\n */\nexport type DefaultRollout = \"immediate\" | \"next_renewal\" | \"new_assignments_only\";\nexport type Type22 = \"stripe\";\nexport type Type23 = \"dodo\";\nexport type Type24 = \"custom\";\nexport type Adapter = string;\nexport type DisplayName1 = string;\nexport type Description1 = string | null;\nexport type SortOrder = number;\nexport type AmountMinor = number;\nexport type Currency1 = string;\nexport type TaxBehavior = \"inclusive\" | \"exclusive\" | \"unspecified\";\nexport type Type25 = \"stripe_price\";\nexport type PriceId = string;\nexport type Type26 = \"dodo_product\";\nexport type ProductId = string;\nexport type Type27 = \"custom_object\";\nexport type ObjectKind = \"subscription\" | \"one_time\";\nexport type ExternalId = string;\nexport type Type28 = \"subscription\";\nexport type Plan = string;\nexport type Amount4 = string;\nexport type Bucket1 = string;\nexport type Renewal = \"replace_previous\" | \"accumulate\";\nexport type Expiry2 =\n | NeverExpiry\n | AfterGrantExpiry\n | EndOfWindowExpiry\n | FixedExpiry\n | SubscriptionEndExpiry;\nexport type DisplayName2 = string;\nexport type Description2 = string | null;\nexport type SortOrder1 = number;\nexport type Type29 = \"topup\";\nexport type CreditsPerUnit = string;\nexport type Minimum1 = number;\nexport type Maximum1 = number;\nexport type Default4 = number;\nexport type Bucket2 = string;\nexport type Expiry3 =\n | (NeverExpiry | AfterGrantExpiry | EndOfWindowExpiry | FixedExpiry | SubscriptionEndExpiry)\n | null;\nexport type LotBehavior = \"separate_lots\" | \"merge_and_refresh\";\nexport type Effective = \"immediate\" | \"renewal\";\nexport type Proration = \"prorated\" | \"none\";\nexport type PaymentFailure = \"prevent_change\" | \"apply_change\";\n/**\n * @minItems 1\n */\nexport type EligibleTopups = [string, ...string[]];\nexport type Minimum2 = string;\nexport type Maximum2 = string;\nexport type Default5 = string;\n/**\n * Balance that rearms auto-recharge; it must exceed balance_below.maximum.\n */\nexport type RearmAbove = string;\nexport type Minimum3 = number;\nexport type Maximum3 = number;\nexport type Default6 = number;\nexport type MaxPurchases = number;\nexport type Window3 = CalendarWindow | RollingWindow;\nexport type MaxChargeMinor = number;\nexport type MaxConsecutiveFailures = number;\nexport type FailureAction = \"pause\";\n\nexport interface BursarConfig {\n version: Version;\n catalog?: CatalogConfig;\n /**\n * Usage operations, their measures and dimensions, and reusable rate cards.\n */\n pricing?: PricingConfig | null;\n credits: CreditsConfig;\n entitlements?: EntitlementsConfig;\n admission?: AdmissionConfig;\n plans?: Plans1;\n commerce?: CommerceConfig;\n}\n/**\n * Catalog-wide publication settings such as the default signup plan.\n */\nexport interface CatalogConfig {\n default_plan?: DefaultPlan;\n}\nexport interface PricingConfig {\n operations: Operations;\n rate_cards: RateCards;\n}\nexport interface Operations {\n [k: string]: OperationDefinition;\n}\nexport interface OperationDefinition {\n measures: Measures;\n dimensions?: Dimensions;\n}\nexport interface Measures {\n [k: string]: MeasureDefinition;\n}\nexport interface MeasureDefinition {\n unit: Unit;\n}\nexport interface Dimensions {\n [k: string]: DimensionDefinition;\n}\nexport interface DimensionDefinition {\n type: Type;\n required?: Required;\n}\nexport interface RateCards {\n [k: string]: RateCard;\n}\nexport interface RateCard {\n extends?: Extends;\n operations?: Operations1;\n}\nexport interface Operations1 {\n [k: string]: OperationPricing;\n}\nexport interface OperationPricing {\n rules?: Rules;\n unmatched: Unmatched;\n}\nexport interface PriceRule {\n when: When;\n charge: Charge;\n}\nexport interface When {\n [k: string]: EqualMatcher | InMatcher | NotInMatcher | PrefixMatcher | RangeMatcher;\n}\nexport interface EqualMatcher {\n op: Op;\n value: Value;\n}\nexport interface InMatcher {\n op: Op1;\n values: Values;\n}\nexport interface NotInMatcher {\n op: Op2;\n values: Values1;\n}\nexport interface PrefixMatcher {\n op: Op3;\n value: Value1;\n}\nexport interface RangeMatcher {\n op: Op4;\n gt?: Gt;\n gte?: Gte;\n lt?: Lt;\n lte?: Lte;\n}\nexport interface FlatCharge {\n type: Type1;\n amount: Amount;\n}\nexport interface PerUnitCharge {\n type: Type2;\n measure: Measure;\n rate: Rate;\n unit_size?: UnitSize;\n}\nexport interface PackageCharge {\n type: Type3;\n measure: Measure1;\n units: Units;\n amount: Amount1;\n rounding?: Rounding;\n}\nexport interface GraduatedCharge {\n type: Type4;\n measure: Measure2;\n tiers: Tiers;\n}\nexport interface GraduatedTier {\n up_to?: UpTo;\n rate: Rate1;\n}\nexport interface VolumeCharge {\n type: Type5;\n measure: Measure3;\n tiers: Tiers1;\n}\nexport interface ExpressionCharge {\n type: Type6;\n formula: Formula;\n}\nexport interface SumCharge {\n type: Type7;\n components: Components;\n}\nexport interface RejectUnmatched {\n action: Action;\n}\nexport interface ChargeUnmatched {\n action: Action1;\n charge: Charge1;\n}\n/**\n * Credit buckets, spending policies, grants, and optional display conversion.\n */\nexport interface CreditsConfig {\n buckets?: Buckets;\n default_bucket?: DefaultBucket;\n policies?: Policies;\n grant_programs?: GrantPrograms;\n display?: CreditDisplay | null;\n}\nexport interface Buckets {\n [k: string]: BucketDefinition;\n}\nexport interface BucketDefinition {\n priority: Priority;\n expiry?: Expiry;\n}\nexport interface NeverExpiry {\n type: Type8;\n}\nexport interface AfterGrantExpiry {\n type: Type9;\n interval: BillingInterval;\n timezone?: Timezone;\n}\nexport interface BillingInterval {\n unit: Unit1;\n count?: Count;\n}\nexport interface EndOfWindowExpiry {\n type: Type10;\n window: Window;\n}\nexport interface CalendarWindow {\n type: Type11;\n unit: Unit2;\n count?: Count1;\n timezone?: Timezone1;\n}\nexport interface PlanAssignmentWindow {\n type: Type12;\n interval: BillingInterval;\n timezone?: Timezone2;\n}\nexport interface FixedExpiry {\n type: Type13;\n at: At;\n}\nexport interface SubscriptionEndExpiry {\n type: Type14;\n}\nexport interface Policies {\n [k: string]: PrepaidCreditPolicy | CreditLinePolicy;\n}\nexport interface PrepaidCreditPolicy {\n type: Type15;\n}\nexport interface CreditLinePolicy {\n type: Type16;\n limit: Limit;\n}\nexport interface GrantPrograms {\n [k: string]: GrantProgram;\n}\nexport interface GrantProgram {\n trigger: Trigger;\n awards: Awards;\n availability?: Availability | null;\n eligibility?: GrantEligibility;\n max_awards_per_subject?: MaxAwardsPerSubject;\n idempotency_scope?: IdempotencyScope;\n}\nexport interface GrantAward {\n recipient?: Recipient;\n amount: Amount2;\n bucket: Bucket;\n expiry?: Expiry1;\n}\nexport interface Availability {\n starts_at?: StartsAt;\n ends_at?: EndsAt;\n regions?: Regions;\n}\nexport interface GrantEligibility {\n plans?: Plans;\n regions?: Regions1;\n}\nexport interface CreditDisplay {\n currency: Currency;\n units_per_major: UnitsPerMajor;\n}\n/**\n * Typed feature definitions referenced by plan feature values.\n */\nexport interface EntitlementsConfig {\n features?: Features;\n}\nexport interface Features {\n [k: string]: BooleanFeature | EnumFeature | IntegerFeature | StringFeature;\n}\nexport interface BooleanFeature {\n type: Type17;\n default: Default;\n}\nexport interface EnumFeature {\n type: Type18;\n values: Values2;\n default: Default1;\n}\nexport interface IntegerFeature {\n type: Type19;\n default: Default2;\n minimum?: Minimum;\n maximum?: Maximum;\n}\nexport interface StringFeature {\n type: Type20;\n default: Default3;\n pattern?: Pattern;\n}\n/**\n * Reusable global and per-operation concurrency policies.\n */\nexport interface AdmissionConfig {\n policies?: Policies1;\n}\nexport interface Policies1 {\n [k: string]: AdmissionPolicy;\n}\nexport interface AdmissionPolicy {\n max_in_flight?: MaxInFlight;\n operations?: Operations2;\n}\nexport interface Operations2 {\n [k: string]: OperationAdmission;\n}\nexport interface OperationAdmission {\n max_in_flight: MaxInFlight1;\n}\n/**\n * Product plans keyed by stable snake_case identifiers.\n */\nexport interface Plans1 {\n [k: string]: PlanDefinition;\n}\nexport interface PlanDefinition {\n display_name: DisplayName;\n rank?: Rank;\n description?: Description;\n rate_card?: RateCard1;\n allowed_operations?: AllowedOperations;\n features?: Features1;\n credit_allowance?: CreditAllowance | null;\n quotas?: Quotas;\n credit_policy?: CreditPolicy;\n admission_policy?: AdmissionPolicy1;\n /**\n * Catalog evolution defaults. When omitted, subscription-backed plans use next_renewal and other plans use immediate; canonical output materializes the default.\n */\n evolution?: PlanEvolution | null;\n}\nexport interface Features1 {\n [k: string]: boolean | number | string;\n}\nexport interface CreditAllowance {\n amount: Amount3;\n priority: Priority1;\n window: Window1;\n}\nexport interface RollingWindow {\n type: Type21;\n duration: Duration;\n}\nexport interface Duration {\n unit: Unit3;\n count: Count2;\n}\nexport interface Quotas {\n [k: string]: QuotaDefinition;\n}\nexport interface QuotaDefinition {\n operation: Operation;\n measure: Measure4;\n limit: Limit1;\n window: Window2;\n enforcement: Enforcement;\n emit_at_percent?: EmitAtPercent;\n}\nexport interface PlanEvolution {\n default_rollout: DefaultRollout;\n}\n/**\n * Payment providers, subscription and top-up offers, and purchase guardrails.\n */\nexport interface CommerceConfig {\n providers?: Providers;\n offers?: Offers;\n subscription_changes?: SubscriptionChanges | null;\n auto_recharge?: AutoRechargeGuardrails | null;\n}\nexport interface Providers {\n [k: string]: StripeProvider | DodoProvider | CustomProvider;\n}\nexport interface StripeProvider {\n type: Type22;\n}\nexport interface DodoProvider {\n type: Type23;\n}\nexport interface CustomProvider {\n type: Type24;\n adapter: Adapter;\n}\nexport interface Offers {\n [k: string]: SubscriptionOffer | TopupOffer;\n}\nexport interface SubscriptionOffer {\n display_name: DisplayName1;\n description?: Description1;\n sort_order?: SortOrder;\n availability?: Availability | null;\n price: OfferPrice;\n providers: Providers1;\n type: Type28;\n plan: Plan;\n billing_interval: BillingInterval;\n trial?: BillingInterval | null;\n cycle_grant?: CycleGrant | null;\n}\nexport interface OfferPrice {\n amount_minor: AmountMinor;\n currency: Currency1;\n tax_behavior?: TaxBehavior;\n}\nexport interface Providers1 {\n [k: string]: StripePriceReference | DodoProductReference | CustomObjectReference;\n}\nexport interface StripePriceReference {\n type: Type25;\n price_id: PriceId;\n}\nexport interface DodoProductReference {\n type: Type26;\n product_id: ProductId;\n}\nexport interface CustomObjectReference {\n type: Type27;\n object_kind: ObjectKind;\n external_id: ExternalId;\n}\nexport interface CycleGrant {\n amount: Amount4;\n bucket: Bucket1;\n renewal: Renewal;\n expiry?: Expiry2;\n}\nexport interface TopupOffer {\n display_name: DisplayName2;\n description?: Description2;\n sort_order?: SortOrder1;\n availability?: Availability | null;\n price: OfferPrice;\n providers: Providers2;\n type: Type29;\n credits_per_unit: CreditsPerUnit;\n quantity?: QuantityBounds;\n bucket: Bucket2;\n expiry?: Expiry3;\n lot_behavior?: LotBehavior;\n}\nexport interface Providers2 {\n [k: string]: StripePriceReference | DodoProductReference | CustomObjectReference;\n}\nexport interface QuantityBounds {\n minimum?: Minimum1;\n maximum?: Maximum1;\n default?: Default4;\n}\nexport interface SubscriptionChanges {\n upgrade?: SubscriptionChangePolicy | null;\n downgrade?: SubscriptionChangePolicy | null;\n lateral?: SubscriptionChangePolicy | null;\n cadence_change?: SubscriptionChangePolicy | null;\n}\nexport interface SubscriptionChangePolicy {\n effective: Effective;\n proration: Proration;\n payment_failure?: PaymentFailure;\n}\nexport interface AutoRechargeGuardrails {\n eligible_topups: EligibleTopups;\n balance_below: DecimalRange;\n rearm_above: RearmAbove;\n quantity: IntegerRange;\n limits: AutoRechargeLimits;\n}\nexport interface DecimalRange {\n minimum: Minimum2;\n maximum: Maximum2;\n default: Default5;\n}\nexport interface IntegerRange {\n minimum: Minimum3;\n maximum: Maximum3;\n default: Default6;\n}\nexport interface AutoRechargeLimits {\n max_purchases: MaxPurchases;\n window: Window3;\n max_charge_minor: MaxChargeMinor;\n cooldown: Duration;\n max_consecutive_failures?: MaxConsecutiveFailures;\n failure_action?: FailureAction;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"better-auth-core.d.ts","sourceRoot":"","sources":["../../../src/providers/dodo/better-auth-core.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAA2B,KAAK,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE7F,KAAK,oBAAoB,GAAG,cAAc,2BAA2B,EAAE,QAAQ,CAAC;AAChF,KAAK,qBAAqB,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;AACjE,KAAK,iBAAiB,GAAG,WAAW,CAAC,qBAAqB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AqB,CAAC,WAAW,CAAC,CAAC,CAAC;AACzE,MAAM,MAAM,2BAA2B,GAAG,UAAU,CAAC,oBAAoB,CAAC,CAAC;AAC3E,MAAM,MAAM,4BAA4B,GAAG,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAE5E,MAAM,WAAW,kCAAkC;IACjD,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,YAAY,GAAG,WAAW,CAAC,CAAC;IACxE,SAAS,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE;AAED,MAAM,MAAM,4BAA4B,GAAG,CACzC,MAAM,EAAE,kCAAkC,KACvC,2BAA2B,CAAC;AAEjC,MAAM,WAAW,gCAAiC,SAAQ,wBAAwB;IAChF,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,IAAI,CAAC,qBAAqB,EAAE,YAAY,GAAG,WAAW,CAAC,CAAC;IACxE,WAAW,CAAC,EAAE,CACZ,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,4BAA4B,KAClC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,EAAE,4BAA4B,CAAC;CACvC;AAED,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,gCAAgC;;;;;;;;EAWnF"}
|
|
@@ -18,8 +18,6 @@ export declare function dodoBetterAuthWebhooks(options: DodoBetterAuthWebhookOpt
|
|
|
18
18
|
isAction: false;
|
|
19
19
|
};
|
|
20
20
|
cloneRequest: true;
|
|
21
|
-
} & {
|
|
22
|
-
use: any[];
|
|
23
21
|
}, import("@dodopayments/better-auth").WebhookResponse>;
|
|
24
22
|
};
|
|
25
23
|
/** Resolve the customer field maintained by `@dodopayments/better-auth`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"better-auth.d.ts","sourceRoot":"","sources":["../../../src/providers/dodo/better-auth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EACjC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,YAAY,EACV,4BAA4B,EAC5B,kCAAkC,EAClC,4BAA4B,EAC5B,2BAA2B,GAC5B,CAAC;AACF,MAAM,MAAM,kCAAkC,GAAG,WAAW,CAC1D,kCAAkC,CAAC,eAAe,CAAC,CACpD,CAAC;AAEF,MAAM,WAAW,4BAA6B,SAAQ,wBAAwB;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,kCAAkC,CAAC;IACnD,WAAW,CAAC,EAAE,CACZ,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,4BAA4B,KAClC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,4BAA4B,CAAC;CACxC;AAED,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,4BAA4B
|
|
1
|
+
{"version":3,"file":"better-auth.d.ts","sourceRoot":"","sources":["../../../src/providers/dodo/better-auth.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,0BAA0B,EAC3B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAEL,KAAK,4BAA4B,EACjC,KAAK,kCAAkC,EACvC,KAAK,4BAA4B,EACjC,KAAK,2BAA2B,EACjC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAEpE,YAAY,EACV,4BAA4B,EAC5B,kCAAkC,EAClC,4BAA4B,EAC5B,2BAA2B,GAC5B,CAAC;AACF,MAAM,MAAM,kCAAkC,GAAG,WAAW,CAC1D,kCAAkC,CAAC,eAAe,CAAC,CACpD,CAAC;AAEF,MAAM,WAAW,4BAA6B,SAAQ,wBAAwB;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,kCAAkC,CAAC;IACnD,WAAW,CAAC,EAAE,CACZ,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,4BAA4B,KAClC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,OAAO,CAAC,EAAE,4BAA4B,CAAC;CACxC;AAED,0EAA0E;AAC1E,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,4BAA4B;;;;;;;;EAe3E;AAED,4EAA4E;AAC5E,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,oBAAoB,GACzB,0BAA0B,GAAG,IAAI,CAInC"}
|
|
@@ -10,6 +10,7 @@ type DodoCheckoutSessionStatus = Awaited<ReturnType<DodoPayments["checkoutSessio
|
|
|
10
10
|
type DodoCheckoutPreview = Awaited<ReturnType<DodoPayments["checkoutSessions"]["preview"]>>;
|
|
11
11
|
type DodoPayment = Awaited<ReturnType<DodoPayments["payments"]["retrieve"]>>;
|
|
12
12
|
type DodoPlanChangePreview = Awaited<ReturnType<DodoPayments["subscriptions"]["previewChangePlan"]>>;
|
|
13
|
+
type DodoPlanChangeResult = Awaited<ReturnType<DodoPayments["subscriptions"]["changePlan"]>>;
|
|
13
14
|
type DodoPaymentMethodUpdate = Awaited<ReturnType<DodoPayments["subscriptions"]["updatePaymentMethod"]>>;
|
|
14
15
|
type DodoSubscription = Awaited<ReturnType<DodoPayments["subscriptions"]["update"]>>;
|
|
15
16
|
type DodoCustomer = Awaited<ReturnType<DodoPayments["customers"]["create"]>>;
|
|
@@ -54,7 +55,7 @@ export interface DodoClient {
|
|
|
54
55
|
};
|
|
55
56
|
subscriptions: {
|
|
56
57
|
cancelChangePlan(subscriptionId: Parameters<DodoPayments["subscriptions"]["cancelChangePlan"]>[0], options?: DodoMutationRequestOptions): Promise<void>;
|
|
57
|
-
changePlan(subscriptionId: Parameters<DodoPayments["subscriptions"]["changePlan"]>[0], body: Parameters<DodoPayments["subscriptions"]["changePlan"]>[1], options?: DodoMutationRequestOptions): Promise<
|
|
58
|
+
changePlan(subscriptionId: Parameters<DodoPayments["subscriptions"]["changePlan"]>[0], body: Parameters<DodoPayments["subscriptions"]["changePlan"]>[1], options?: DodoMutationRequestOptions): Promise<DodoPlanChangeResult>;
|
|
58
59
|
previewChangePlan(subscriptionId: Parameters<DodoPayments["subscriptions"]["previewChangePlan"]>[0], body: Parameters<DodoPayments["subscriptions"]["previewChangePlan"]>[1]): Promise<DodoPlanChangePreview>;
|
|
59
60
|
update(subscriptionId: Parameters<DodoPayments["subscriptions"]["update"]>[0], body: Parameters<DodoPayments["subscriptions"]["update"]>[1], options?: DodoMutationRequestOptions): Promise<DodoSubscription>;
|
|
60
61
|
updatePaymentMethod(subscriptionId: Parameters<DodoPayments["subscriptions"]["updatePaymentMethod"]>[0], body: Parameters<DodoPayments["subscriptions"]["updatePaymentMethod"]>[1]): Promise<DodoPaymentMethodUpdate>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client-contract.d.ts","sourceRoot":"","sources":["../../../src/providers/dodo/client-contract.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,YAAY,MAAM,cAAc,CAAC;AAE7C;;;;;GAKG;AACH,KAAK,mBAAmB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;AAC3F,KAAK,yBAAyB,GAAG,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC,kBAAkB,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;AACnG,KAAK,mBAAmB,GAA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