pecunia-core 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/index.d.mts +1 -1
- package/dist/context/index.d.mts +1 -1
- package/dist/db/index.d.mts +1 -1
- package/dist/db/index.mjs +1 -1
- package/dist/errors/index.d.mts +1 -1
- package/dist/{get-payment-tables-D4gd0O5X.mjs → get-payment-tables-BTtVmaat.mjs} +58 -10
- package/dist/{index-r-9XcDEa.d.mts → index-CRH0tJ5D.d.mts} +16 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/types/index.d.mts +1 -1
- package/dist/types/index.mjs +1 -1
- package/package.json +1 -1
package/dist/api/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useMiddleware, i as optionsMiddleware, n as createPaymentEndpoint, r as createPecuniaMiddleware, t as PaymentMiddleware } from "../index-
|
|
1
|
+
import { a as useMiddleware, i as optionsMiddleware, n as createPaymentEndpoint, r as createPecuniaMiddleware, t as PaymentMiddleware } from "../index-CRH0tJ5D.mjs";
|
|
2
2
|
export { PaymentMiddleware, createPaymentEndpoint, createPecuniaMiddleware, optionsMiddleware, useMiddleware };
|
package/dist/context/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { At as RequestState, Dt as getCurrentDBAdapterAsyncLocalStorage, Et as getCurrentAdapter, Ft as hasRequestState, It as runWithRequestState, Lt as getCurrentAuthContext, Mt as defineRequestState, Nt as getCurrentRequestState, Ot as runWithAdapter, Pt as getRequestStateAsyncLocalStorage, Rt as getCurrentPaymentContextAsyncLocalStorage, jt as RequestStateWeakMap, kt as runWithTransaction, zt as runWithEndpointContext } from "../index-
|
|
1
|
+
import { At as RequestState, Dt as getCurrentDBAdapterAsyncLocalStorage, Et as getCurrentAdapter, Ft as hasRequestState, It as runWithRequestState, Lt as getCurrentAuthContext, Mt as defineRequestState, Nt as getCurrentRequestState, Ot as runWithAdapter, Pt as getRequestStateAsyncLocalStorage, Rt as getCurrentPaymentContextAsyncLocalStorage, jt as RequestStateWeakMap, kt as runWithTransaction, zt as runWithEndpointContext } from "../index-CRH0tJ5D.mjs";
|
|
2
2
|
export { RequestState, RequestStateWeakMap, defineRequestState, getCurrentAdapter, getCurrentAuthContext, getCurrentDBAdapterAsyncLocalStorage, getCurrentPaymentContextAsyncLocalStorage, getCurrentRequestState, getRequestStateAsyncLocalStorage, hasRequestState, runWithAdapter, runWithEndpointContext, runWithRequestState, runWithTransaction };
|
package/dist/db/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $t as KyselyDatabaseDialectType, Ct as initGetFieldAttributes, St as initGetFieldName, Tt as initGetDefaultFieldName, _t as discountSchema, at as getPaymentTables, bt as initGetModelName, ct as Subscription, dt as sharedDeletableSchema, ft as Product, gt as Discount, ht as priceSchema, lt as subscriptionSchema, mt as Price, ot as deepmerge, pt as productSchema, st as withApplyDefault, ut as sharedCoreSchema, vt as Customer, wt as initGetDefaultModelName, xt as initGetIdField, yt as customerSchema } from "../index-
|
|
1
|
+
import { $t as KyselyDatabaseDialectType, Ct as initGetFieldAttributes, St as initGetFieldName, Tt as initGetDefaultFieldName, _t as discountSchema, at as getPaymentTables, bt as initGetModelName, ct as Subscription, dt as sharedDeletableSchema, ft as Product, gt as Discount, ht as priceSchema, lt as subscriptionSchema, mt as Price, ot as deepmerge, pt as productSchema, st as withApplyDefault, ut as sharedCoreSchema, vt as Customer, wt as initGetDefaultModelName, xt as initGetIdField, yt as customerSchema } from "../index-CRH0tJ5D.mjs";
|
|
2
2
|
export { Customer, Discount, KyselyDatabaseDialectType, Price, Product, Subscription, customerSchema, deepmerge, discountSchema, getPaymentTables, initGetDefaultFieldName, initGetDefaultModelName, initGetFieldAttributes, initGetFieldName, initGetIdField, initGetModelName, priceSchema, productSchema, sharedCoreSchema, sharedDeletableSchema, subscriptionSchema, withApplyDefault };
|
package/dist/db/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as UsageAggregation, E as SubscriptionStatus, S as ProrationBehavior, b as PricingModel, c as BillingInterval, d as CollectionMethod, f as Currency, p as DiscountType, x as ProductType, y as PriceType } from "../errors-vpD21Iku.mjs";
|
|
2
|
-
import { a as initGetFieldAttributes, c as initGetDefaultModelName, i as initGetModelName, n as deepmerge, o as initGetIdField, r as withApplyDefault, s as initGetDefaultFieldName, t as getPaymentTables } from "../get-payment-tables-
|
|
2
|
+
import { a as initGetFieldAttributes, c as initGetDefaultModelName, i as initGetModelName, n as deepmerge, o as initGetIdField, r as withApplyDefault, s as initGetDefaultFieldName, t as getPaymentTables } from "../get-payment-tables-BTtVmaat.mjs";
|
|
3
3
|
import "../generate-id-D3ZvbbXn.mjs";
|
|
4
4
|
import z$1, { z } from "zod";
|
|
5
5
|
|
package/dist/errors/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { it as createProviderError, nt as PecuniaError, rt as ValidationError, tt as ApiError } from "../index-
|
|
1
|
+
import { it as createProviderError, nt as PecuniaError, rt as ValidationError, tt as ApiError } from "../index-CRH0tJ5D.mjs";
|
|
2
2
|
export { ApiError, PecuniaError, ValidationError, createProviderError };
|
|
@@ -291,6 +291,22 @@ const getPaymentTables = (options) => {
|
|
|
291
291
|
foreignKey: "paymentMethodId"
|
|
292
292
|
}
|
|
293
293
|
},
|
|
294
|
+
invariants: [{
|
|
295
|
+
id: "customer_payment_method_ownership",
|
|
296
|
+
description: "customer.paymentMethodId (default payment method) must belong to the same customer: payment_method.customerId must equal customer.id when paymentMethodId is set",
|
|
297
|
+
appliesTo: [
|
|
298
|
+
"postgres",
|
|
299
|
+
"mongo",
|
|
300
|
+
"mysql",
|
|
301
|
+
"sqlite"
|
|
302
|
+
],
|
|
303
|
+
enforcement: {
|
|
304
|
+
postgres: "trigger",
|
|
305
|
+
mongo: "app",
|
|
306
|
+
mysql: "trigger",
|
|
307
|
+
sqlite: "trigger"
|
|
308
|
+
}
|
|
309
|
+
}],
|
|
294
310
|
order: 1
|
|
295
311
|
},
|
|
296
312
|
idempotency_key: {
|
|
@@ -360,13 +376,13 @@ const getPaymentTables = (options) => {
|
|
|
360
376
|
validator: { input: z.string().max(255).optional() }
|
|
361
377
|
},
|
|
362
378
|
expiresAt: {
|
|
363
|
-
type: "
|
|
379
|
+
type: "date",
|
|
364
380
|
fieldName: "expires_at",
|
|
365
381
|
required: false,
|
|
366
382
|
validator: { input: z.date().optional() }
|
|
367
383
|
},
|
|
368
384
|
createdAt: {
|
|
369
|
-
type: "
|
|
385
|
+
type: "date",
|
|
370
386
|
fieldName: "created_at",
|
|
371
387
|
required: true,
|
|
372
388
|
input: false,
|
|
@@ -1235,7 +1251,7 @@ const getPaymentTables = (options) => {
|
|
|
1235
1251
|
checkoutSession: {
|
|
1236
1252
|
kind: "one",
|
|
1237
1253
|
model: "checkout_session",
|
|
1238
|
-
foreignKey: "
|
|
1254
|
+
foreignKey: "subscriptionId"
|
|
1239
1255
|
},
|
|
1240
1256
|
customer: {
|
|
1241
1257
|
kind: "one",
|
|
@@ -2782,15 +2798,15 @@ const getPaymentTables = (options) => {
|
|
|
2782
2798
|
subscriptionId: {
|
|
2783
2799
|
type: "string",
|
|
2784
2800
|
fieldName: "subscription_id",
|
|
2785
|
-
required:
|
|
2801
|
+
required: false,
|
|
2786
2802
|
references: {
|
|
2787
2803
|
model: "subscription",
|
|
2788
2804
|
field: "id",
|
|
2789
2805
|
onDelete: "cascade"
|
|
2790
2806
|
},
|
|
2791
2807
|
validator: {
|
|
2792
|
-
input: z.uuid(),
|
|
2793
|
-
output: z.uuid()
|
|
2808
|
+
input: z.uuid().optional(),
|
|
2809
|
+
output: z.uuid().optional()
|
|
2794
2810
|
},
|
|
2795
2811
|
index: true
|
|
2796
2812
|
},
|
|
@@ -2872,7 +2888,23 @@ const getPaymentTables = (options) => {
|
|
|
2872
2888
|
model: "subscription",
|
|
2873
2889
|
foreignKey: "subscriptionId"
|
|
2874
2890
|
}
|
|
2875
|
-
}
|
|
2891
|
+
},
|
|
2892
|
+
invariants: [{
|
|
2893
|
+
id: "checkout_session_mode_subscription_id_consistency",
|
|
2894
|
+
description: "checkout_session.mode determines subscriptionId presence: PAYMENT => subscriptionId must be null/absent, SUBSCRIPTION => subscriptionId must be present",
|
|
2895
|
+
appliesTo: [
|
|
2896
|
+
"postgres",
|
|
2897
|
+
"mongo",
|
|
2898
|
+
"mysql",
|
|
2899
|
+
"sqlite"
|
|
2900
|
+
],
|
|
2901
|
+
enforcement: {
|
|
2902
|
+
postgres: "check",
|
|
2903
|
+
mongo: "validator",
|
|
2904
|
+
mysql: "check",
|
|
2905
|
+
sqlite: "check"
|
|
2906
|
+
}
|
|
2907
|
+
}]
|
|
2876
2908
|
},
|
|
2877
2909
|
paymentIntent: {
|
|
2878
2910
|
modelName: "payment_intent",
|
|
@@ -3125,12 +3157,12 @@ const getPaymentTables = (options) => {
|
|
|
3125
3157
|
checkoutSession: {
|
|
3126
3158
|
kind: "one",
|
|
3127
3159
|
model: "checkout_session",
|
|
3128
|
-
foreignKey: "
|
|
3160
|
+
foreignKey: "paymentIntentId"
|
|
3129
3161
|
},
|
|
3130
3162
|
transaction: {
|
|
3131
3163
|
kind: "one",
|
|
3132
3164
|
model: "transaction",
|
|
3133
|
-
foreignKey: "
|
|
3165
|
+
foreignKey: "paymentIntentId"
|
|
3134
3166
|
}
|
|
3135
3167
|
}
|
|
3136
3168
|
},
|
|
@@ -3346,7 +3378,23 @@ const getPaymentTables = (options) => {
|
|
|
3346
3378
|
model: "transaction",
|
|
3347
3379
|
foreignKey: "reversedById"
|
|
3348
3380
|
}
|
|
3349
|
-
}
|
|
3381
|
+
},
|
|
3382
|
+
invariants: [{
|
|
3383
|
+
id: "transaction_payment_intent_customer_consistency",
|
|
3384
|
+
description: "transaction.customerId must match the customerId of its paymentIntentId: payment_intent.customerId must equal transaction.customerId",
|
|
3385
|
+
appliesTo: [
|
|
3386
|
+
"postgres",
|
|
3387
|
+
"mongo",
|
|
3388
|
+
"mysql",
|
|
3389
|
+
"sqlite"
|
|
3390
|
+
],
|
|
3391
|
+
enforcement: {
|
|
3392
|
+
postgres: "trigger",
|
|
3393
|
+
mongo: "app",
|
|
3394
|
+
mysql: "trigger",
|
|
3395
|
+
sqlite: "trigger"
|
|
3396
|
+
}
|
|
3397
|
+
}]
|
|
3350
3398
|
},
|
|
3351
3399
|
scheduledTask: {
|
|
3352
3400
|
modelName: "scheduled_task",
|
|
@@ -230,6 +230,22 @@ type PecuniaDBSchema = Record<string, {
|
|
|
230
230
|
foreignKey: string;
|
|
231
231
|
};
|
|
232
232
|
};
|
|
233
|
+
/**
|
|
234
|
+
* Declarative invariants that must be enforced at the application level.
|
|
235
|
+
* These are cross-table or conditional rules that cannot be fully expressed
|
|
236
|
+
* in portable schema constraints (especially for MongoDB).
|
|
237
|
+
*/
|
|
238
|
+
invariants?: Array<{
|
|
239
|
+
id: string;
|
|
240
|
+
description: string;
|
|
241
|
+
appliesTo: Array<"postgres" | "mongo" | "mysql" | "sqlite">;
|
|
242
|
+
enforcement?: {
|
|
243
|
+
postgres?: "check" | "trigger";
|
|
244
|
+
mongo?: "validator" | "app";
|
|
245
|
+
mysql?: "check" | "trigger";
|
|
246
|
+
sqlite?: "check" | "trigger";
|
|
247
|
+
};
|
|
248
|
+
}>;
|
|
233
249
|
}>;
|
|
234
250
|
//#endregion
|
|
235
251
|
//#region src/db/constant/index.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as WebHookEventStatus, $t as KyselyDatabaseDialectType, A as CheckoutSessionStatus, At as RequestState, B as PricingModel, Bt as ErrorDefinition, C as AdapterFactoryOptions, Ct as initGetFieldAttributes, D as AuditAction, Dt as getCurrentDBAdapterAsyncLocalStorage, E as Actor, Et as getCurrentAdapter, F as InvoiceStatus, Ft as hasRequestState, G as ScheduledTaskStatus, Gt as IndexableRegistry, H as ProrationBehavior, Ht as ErrorMap, I as LedgerEntryType, It as runWithRequestState, J as TransactionStatus, Jt as HookEndpointContext, K as ScheduledTaskType, Kt as ProviderErrorCode, L as PaymentIntentStatus, Lt as getCurrentAuthContext, M as Currency, Mt as defineRequestState, N as DiscountType, Nt as getCurrentRequestState, O as BillingInterval, Ot as runWithAdapter, P as ERROR_REGISTRY, Pt as getRequestStateAsyncLocalStorage, Q as WebHookDeliveryTrigger, Qt as createPecuniaEndpoint, R as PaymentProviders, Rt as getCurrentPaymentContextAsyncLocalStorage, S as AdapterFactoryCreator, St as initGetFieldName, T as AccountType, Tt as initGetDefaultFieldName, U as ProviderId, Ut as ErrorResponse, V as ProductType, Vt as ErrorDefinitionResponse, W as ScheduleStatus, Wt as ErrorType, X as UsageAction, Xt as PecuniaEndpoint, Y as TransactionType, Yt as PecuniaPlugin, Z as UsageAggregation, Zt as PecuniaMiddleware, _ as ProviderAdapter, _t as discountSchema, a as useMiddleware, an as DBPrimitive, at as getPaymentTables, b as AdapterFactory, bt as initGetModelName, c as SenlyContext, cn as ModelNames, ct as Subscription, d as DBAdapterDebugLogOption, dn as Primitive, dt as sharedDeletableSchema, en as Awaitable, et as statusCodes, f as DBAdapterFactoryConfig, fn as StandardSchemaV1, ft as Product, g as InternalAdapter, gt as Discount, h as DBTransactionAdapter, ht as priceSchema, i as optionsMiddleware, in as DBFieldType, it as createProviderError, j as CollectionMethod, jt as RequestStateWeakMap, k as CheckoutSessionMode, kt as runWithTransaction, l as CustomAdapter, ln as PecuniaDBSchema, lt as subscriptionSchema, m as DBAdapterSchemaCreation, mt as Price, n as createPaymentEndpoint, nn as DBFieldAttribute, nt as PecuniaError, o as GenericEndpointContext, on as LiteralString, ot as deepmerge, p as DBAdapterInstance, pt as productSchema, q as SubscriptionStatus, qt as PecuniaOptions, r as createPecuniaMiddleware, rn as DBFieldAttributeConfig, rt as ValidationError, s as PecuniaContext, sn as LiteralUnion, st as withApplyDefault, t as PaymentMiddleware, tn as BaseModelNames, tt as ApiError, u as DBAdapter, un as Prettify, ut as sharedCoreSchema, v as RequiredWhere, vt as Customer, w as createAdapterFactory, wt as initGetDefaultModelName, x as AdapterFactoryConfig, xt as initGetIdField, y as Where, yt as customerSchema, z as PriceType, zt as runWithEndpointContext } from "./index-
|
|
1
|
+
import { $ as WebHookEventStatus, $t as KyselyDatabaseDialectType, A as CheckoutSessionStatus, At as RequestState, B as PricingModel, Bt as ErrorDefinition, C as AdapterFactoryOptions, Ct as initGetFieldAttributes, D as AuditAction, Dt as getCurrentDBAdapterAsyncLocalStorage, E as Actor, Et as getCurrentAdapter, F as InvoiceStatus, Ft as hasRequestState, G as ScheduledTaskStatus, Gt as IndexableRegistry, H as ProrationBehavior, Ht as ErrorMap, I as LedgerEntryType, It as runWithRequestState, J as TransactionStatus, Jt as HookEndpointContext, K as ScheduledTaskType, Kt as ProviderErrorCode, L as PaymentIntentStatus, Lt as getCurrentAuthContext, M as Currency, Mt as defineRequestState, N as DiscountType, Nt as getCurrentRequestState, O as BillingInterval, Ot as runWithAdapter, P as ERROR_REGISTRY, Pt as getRequestStateAsyncLocalStorage, Q as WebHookDeliveryTrigger, Qt as createPecuniaEndpoint, R as PaymentProviders, Rt as getCurrentPaymentContextAsyncLocalStorage, S as AdapterFactoryCreator, St as initGetFieldName, T as AccountType, Tt as initGetDefaultFieldName, U as ProviderId, Ut as ErrorResponse, V as ProductType, Vt as ErrorDefinitionResponse, W as ScheduleStatus, Wt as ErrorType, X as UsageAction, Xt as PecuniaEndpoint, Y as TransactionType, Yt as PecuniaPlugin, Z as UsageAggregation, Zt as PecuniaMiddleware, _ as ProviderAdapter, _t as discountSchema, a as useMiddleware, an as DBPrimitive, at as getPaymentTables, b as AdapterFactory, bt as initGetModelName, c as SenlyContext, cn as ModelNames, ct as Subscription, d as DBAdapterDebugLogOption, dn as Primitive, dt as sharedDeletableSchema, en as Awaitable, et as statusCodes, f as DBAdapterFactoryConfig, fn as StandardSchemaV1, ft as Product, g as InternalAdapter, gt as Discount, h as DBTransactionAdapter, ht as priceSchema, i as optionsMiddleware, in as DBFieldType, it as createProviderError, j as CollectionMethod, jt as RequestStateWeakMap, k as CheckoutSessionMode, kt as runWithTransaction, l as CustomAdapter, ln as PecuniaDBSchema, lt as subscriptionSchema, m as DBAdapterSchemaCreation, mt as Price, n as createPaymentEndpoint, nn as DBFieldAttribute, nt as PecuniaError, o as GenericEndpointContext, on as LiteralString, ot as deepmerge, p as DBAdapterInstance, pt as productSchema, q as SubscriptionStatus, qt as PecuniaOptions, r as createPecuniaMiddleware, rn as DBFieldAttributeConfig, rt as ValidationError, s as PecuniaContext, sn as LiteralUnion, st as withApplyDefault, t as PaymentMiddleware, tn as BaseModelNames, tt as ApiError, u as DBAdapter, un as Prettify, ut as sharedCoreSchema, v as RequiredWhere, vt as Customer, w as createAdapterFactory, wt as initGetDefaultModelName, x as AdapterFactoryConfig, xt as initGetIdField, y as Where, yt as customerSchema, z as PriceType, zt as runWithEndpointContext } from "./index-CRH0tJ5D.mjs";
|
|
2
2
|
import { n as getAsyncLocalStorage, t as AsyncLocalStorage } from "./index-BmnRSwr6.mjs";
|
|
3
3
|
import { _ as isTest, a as TTY_COLORS, c as logger, d as EnvObject, f as env, g as isProduction, h as isDevelopment, i as Logger, l as shouldPublishLog, m as getEnvVar, n as LogHandlerParams, o as createLogger, p as getBooleanEnvVar, r as LogLevel, s as levels, t as InternalLogger, u as ENV, v as nodeENV, y as getColorDepth } from "./index-uCXA11o-.mjs";
|
|
4
4
|
import { n as safeJSONParse, r as generateId, t as capitalizeFirstLetter } from "./index-DYRZgwpi.mjs";
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { a as defineRequestState, c as hasRequestState, d as getCurrentPaymentCo
|
|
|
2
2
|
import { t as getAsyncLocalStorage } from "./async_hooks-D8vqDJIk.mjs";
|
|
3
3
|
import { i as useMiddleware, n as createPecuniaMiddleware, r as optionsMiddleware, t as createPaymentEndpoint } from "./api-BlJV5ZQo.mjs";
|
|
4
4
|
import { A as UsageAggregation, C as ScheduleStatus, D as TransactionStatus, E as SubscriptionStatus, M as WebHookEventStatus, N as statusCodes, O as TransactionType, P as ErrorType, S as ProrationBehavior, T as ScheduledTaskType, _ as PaymentIntentStatus, a as AccountType, b as PricingModel, c as BillingInterval, d as CollectionMethod, f as Currency, g as LedgerEntryType, h as InvoiceStatus, i as createProviderError, j as WebHookDeliveryTrigger, k as UsageAction, l as CheckoutSessionMode, m as ERROR_REGISTRY, n as PecuniaError, o as Actor, p as DiscountType, r as ValidationError, s as AuditAction, t as ApiError, u as CheckoutSessionStatus, v as PaymentProviders, w as ScheduledTaskStatus, x as ProductType, y as PriceType } from "./errors-vpD21Iku.mjs";
|
|
5
|
-
import { a as initGetFieldAttributes, c as initGetDefaultModelName, i as initGetModelName, n as deepmerge, o as initGetIdField, r as withApplyDefault, s as initGetDefaultFieldName, t as getPaymentTables } from "./get-payment-tables-
|
|
5
|
+
import { a as initGetFieldAttributes, c as initGetDefaultModelName, i as initGetModelName, n as deepmerge, o as initGetIdField, r as withApplyDefault, s as initGetDefaultFieldName, t as getPaymentTables } from "./get-payment-tables-BTtVmaat.mjs";
|
|
6
6
|
import { t as generateId } from "./generate-id-D3ZvbbXn.mjs";
|
|
7
7
|
import { customerSchema, discountSchema, initGetFieldName, priceSchema, productSchema, sharedCoreSchema, sharedDeletableSchema, subscriptionSchema } from "./db/index.mjs";
|
|
8
8
|
import { a as shouldPublishLog, c as env, d as isDevelopment, f as isProduction, i as logger, l as getBooleanEnvVar, m as nodeENV, n as createLogger, o as getColorDepth, p as isTest, r as levels, s as ENV, t as TTY_COLORS, u as getEnvVar } from "./env-ChlcfGdT.mjs";
|
package/dist/types/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Bt as ErrorDefinition, C as AdapterFactoryOptions, Gt as IndexableRegistry, Ht as ErrorMap, Jt as HookEndpointContext, Kt as ProviderErrorCode, Qt as createPecuniaEndpoint, S as AdapterFactoryCreator, Ut as ErrorResponse, Vt as ErrorDefinitionResponse, Wt as ErrorType, Xt as PecuniaEndpoint, Yt as PecuniaPlugin, Zt as PecuniaMiddleware, _ as ProviderAdapter, an as DBPrimitive, b as AdapterFactory, c as SenlyContext, cn as ModelNames, d as DBAdapterDebugLogOption, dn as Primitive, en as Awaitable, f as DBAdapterFactoryConfig, fn as StandardSchemaV1, g as InternalAdapter, h as DBTransactionAdapter, in as DBFieldType, l as CustomAdapter, ln as PecuniaDBSchema, m as DBAdapterSchemaCreation, nn as DBFieldAttribute, o as GenericEndpointContext, on as LiteralString, p as DBAdapterInstance, qt as PecuniaOptions, rn as DBFieldAttributeConfig, s as PecuniaContext, sn as LiteralUnion, tn as BaseModelNames, u as DBAdapter, un as Prettify, v as RequiredWhere, w as createAdapterFactory, x as AdapterFactoryConfig, y as Where } from "../index-
|
|
1
|
+
import { Bt as ErrorDefinition, C as AdapterFactoryOptions, Gt as IndexableRegistry, Ht as ErrorMap, Jt as HookEndpointContext, Kt as ProviderErrorCode, Qt as createPecuniaEndpoint, S as AdapterFactoryCreator, Ut as ErrorResponse, Vt as ErrorDefinitionResponse, Wt as ErrorType, Xt as PecuniaEndpoint, Yt as PecuniaPlugin, Zt as PecuniaMiddleware, _ as ProviderAdapter, an as DBPrimitive, b as AdapterFactory, c as SenlyContext, cn as ModelNames, d as DBAdapterDebugLogOption, dn as Primitive, en as Awaitable, f as DBAdapterFactoryConfig, fn as StandardSchemaV1, g as InternalAdapter, h as DBTransactionAdapter, in as DBFieldType, l as CustomAdapter, ln as PecuniaDBSchema, m as DBAdapterSchemaCreation, nn as DBFieldAttribute, o as GenericEndpointContext, on as LiteralString, p as DBAdapterInstance, qt as PecuniaOptions, rn as DBFieldAttributeConfig, s as PecuniaContext, sn as LiteralUnion, tn as BaseModelNames, u as DBAdapter, un as Prettify, v as RequiredWhere, w as createAdapterFactory, x as AdapterFactoryConfig, y as Where } from "../index-CRH0tJ5D.mjs";
|
|
2
2
|
export { AdapterFactory, AdapterFactoryConfig, AdapterFactoryCreator, AdapterFactoryOptions, Awaitable, BaseModelNames, CustomAdapter, DBAdapter, DBAdapterDebugLogOption, DBAdapterFactoryConfig, DBAdapterInstance, DBAdapterSchemaCreation, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive, DBTransactionAdapter, ErrorDefinition, ErrorDefinitionResponse, ErrorMap, ErrorResponse, ErrorType, GenericEndpointContext, HookEndpointContext, IndexableRegistry, InternalAdapter, LiteralString, LiteralUnion, ModelNames, PecuniaContext, PecuniaDBSchema, PecuniaEndpoint, PecuniaMiddleware, PecuniaOptions, PecuniaPlugin, Prettify, Primitive, ProviderAdapter, ProviderErrorCode, RequiredWhere, SenlyContext, StandardSchemaV1, Where, createAdapterFactory, createPecuniaEndpoint };
|
package/dist/types/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { f as runWithEndpointContext } from "../context-COLduJme.mjs";
|
|
|
2
2
|
import "../async_hooks-D8vqDJIk.mjs";
|
|
3
3
|
import { i as useMiddleware } from "../api-BlJV5ZQo.mjs";
|
|
4
4
|
import { P as ErrorType, n as PecuniaError } from "../errors-vpD21Iku.mjs";
|
|
5
|
-
import { a as initGetFieldAttributes, c as initGetDefaultModelName, i as initGetModelName, o as initGetIdField, r as withApplyDefault, s as initGetDefaultFieldName, t as getPaymentTables } from "../get-payment-tables-
|
|
5
|
+
import { a as initGetFieldAttributes, c as initGetDefaultModelName, i as initGetModelName, o as initGetIdField, r as withApplyDefault, s as initGetDefaultFieldName, t as getPaymentTables } from "../get-payment-tables-BTtVmaat.mjs";
|
|
6
6
|
import "../generate-id-D3ZvbbXn.mjs";
|
|
7
7
|
import "../env-ChlcfGdT.mjs";
|
|
8
8
|
import { n as safeJSONParse } from "../utils-BtfYqMRX.mjs";
|