pecunia-core 0.0.4 → 0.0.6
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/env/index.d.mts +1 -1
- package/dist/errors/index.d.mts +1 -1
- package/dist/{get-payment-tables-0FkEj3dw.mjs → get-payment-tables-CAAnHVns.mjs} +28 -28
- package/dist/hooks/index.d.mts +2 -2
- package/dist/index-BmnRSwr6.d.mts +6 -0
- package/dist/{index-B0qrjrbR.d.mts → index-r-9XcDEa.d.mts} +2 -2
- package/dist/index.d.mts +4 -4
- 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/index-CEwT7Oeu.d.mts +0 -6
- /package/dist/{index-CawQRXlV.d.mts → index-uCXA11o-.d.mts} +0 -0
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-r-9XcDEa.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-r-9XcDEa.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-r-9XcDEa.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-CAAnHVns.mjs";
|
|
3
3
|
import "../generate-id-D3ZvbbXn.mjs";
|
|
4
4
|
import z$1, { z } from "zod";
|
|
5
5
|
|
package/dist/env/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
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-
|
|
1
|
+
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";
|
|
2
2
|
export { ENV, EnvObject, InternalLogger, LogHandlerParams, LogLevel, Logger, TTY_COLORS, createLogger, env, getBooleanEnvVar, getColorDepth, getEnvVar, isDevelopment, isProduction, isTest, levels, logger, nodeENV, shouldPublishLog };
|
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-r-9XcDEa.mjs";
|
|
2
2
|
export { ApiError, PecuniaError, ValidationError, createProviderError };
|
|
@@ -227,7 +227,7 @@ const getPaymentTables = (options) => {
|
|
|
227
227
|
required: false,
|
|
228
228
|
fieldName: "paymentMethodId",
|
|
229
229
|
references: {
|
|
230
|
-
model: "
|
|
230
|
+
model: "payment_method",
|
|
231
231
|
field: "id",
|
|
232
232
|
onDelete: "set null"
|
|
233
233
|
},
|
|
@@ -263,7 +263,7 @@ const getPaymentTables = (options) => {
|
|
|
263
263
|
relations: {
|
|
264
264
|
paymentMethods: {
|
|
265
265
|
kind: "many",
|
|
266
|
-
model: "
|
|
266
|
+
model: "payment_method",
|
|
267
267
|
foreignKey: "customerId"
|
|
268
268
|
},
|
|
269
269
|
paymentIntents: {
|
|
@@ -283,12 +283,12 @@ const getPaymentTables = (options) => {
|
|
|
283
283
|
},
|
|
284
284
|
transactions: {
|
|
285
285
|
kind: "many",
|
|
286
|
-
model: "
|
|
286
|
+
model: "transaction",
|
|
287
287
|
foreignKey: "customerId"
|
|
288
288
|
},
|
|
289
289
|
defaultPaymentMethod: {
|
|
290
290
|
kind: "one",
|
|
291
|
-
model: "
|
|
291
|
+
model: "payment_method",
|
|
292
292
|
foreignKey: "paymentMethodId"
|
|
293
293
|
}
|
|
294
294
|
},
|
|
@@ -393,7 +393,7 @@ const getPaymentTables = (options) => {
|
|
|
393
393
|
}
|
|
394
394
|
},
|
|
395
395
|
payment_method: {
|
|
396
|
-
modelName: "
|
|
396
|
+
modelName: "payment_method",
|
|
397
397
|
order: 2,
|
|
398
398
|
fields: {
|
|
399
399
|
id: {
|
|
@@ -1005,7 +1005,7 @@ const getPaymentTables = (options) => {
|
|
|
1005
1005
|
fieldName: "payment_method_id",
|
|
1006
1006
|
required: false,
|
|
1007
1007
|
references: {
|
|
1008
|
-
model: "
|
|
1008
|
+
model: "payment_method",
|
|
1009
1009
|
field: "id",
|
|
1010
1010
|
onDelete: "set null"
|
|
1011
1011
|
},
|
|
@@ -1241,7 +1241,7 @@ const getPaymentTables = (options) => {
|
|
|
1241
1241
|
},
|
|
1242
1242
|
checkoutSession: {
|
|
1243
1243
|
kind: "one",
|
|
1244
|
-
model: "
|
|
1244
|
+
model: "checkout_session",
|
|
1245
1245
|
foreignKey: "id"
|
|
1246
1246
|
},
|
|
1247
1247
|
customer: {
|
|
@@ -1251,7 +1251,7 @@ const getPaymentTables = (options) => {
|
|
|
1251
1251
|
},
|
|
1252
1252
|
paymentMethod: {
|
|
1253
1253
|
kind: "one",
|
|
1254
|
-
model: "
|
|
1254
|
+
model: "payment_method",
|
|
1255
1255
|
foreignKey: "paymentMethodId"
|
|
1256
1256
|
}
|
|
1257
1257
|
}
|
|
@@ -1645,8 +1645,8 @@ const getPaymentTables = (options) => {
|
|
|
1645
1645
|
defaultValue: Currency.KES,
|
|
1646
1646
|
sortable: true,
|
|
1647
1647
|
validator: {
|
|
1648
|
-
input: z.
|
|
1649
|
-
output: z.
|
|
1648
|
+
input: z.enum(Currency).optional(),
|
|
1649
|
+
output: z.enum(Currency)
|
|
1650
1650
|
}
|
|
1651
1651
|
},
|
|
1652
1652
|
invoiceBillingPeriodStart: {
|
|
@@ -2104,7 +2104,7 @@ const getPaymentTables = (options) => {
|
|
|
2104
2104
|
}
|
|
2105
2105
|
},
|
|
2106
2106
|
webHookEndpoint: {
|
|
2107
|
-
modelName: "
|
|
2107
|
+
modelName: "webhook_endpoint",
|
|
2108
2108
|
order: 1,
|
|
2109
2109
|
fields: {
|
|
2110
2110
|
id: {
|
|
@@ -2244,7 +2244,7 @@ const getPaymentTables = (options) => {
|
|
|
2244
2244
|
fieldName: "endpoint_id",
|
|
2245
2245
|
required: true,
|
|
2246
2246
|
references: {
|
|
2247
|
-
model: "
|
|
2247
|
+
model: "webhook_endpoint",
|
|
2248
2248
|
field: "id",
|
|
2249
2249
|
onDelete: "cascade"
|
|
2250
2250
|
},
|
|
@@ -2259,7 +2259,7 @@ const getPaymentTables = (options) => {
|
|
|
2259
2259
|
fieldName: "event_id",
|
|
2260
2260
|
required: true,
|
|
2261
2261
|
references: {
|
|
2262
|
-
model: "
|
|
2262
|
+
model: "event",
|
|
2263
2263
|
field: "id",
|
|
2264
2264
|
onDelete: "cascade"
|
|
2265
2265
|
},
|
|
@@ -2423,7 +2423,7 @@ const getPaymentTables = (options) => {
|
|
|
2423
2423
|
relations: {
|
|
2424
2424
|
endpoint: {
|
|
2425
2425
|
kind: "one",
|
|
2426
|
-
model: "
|
|
2426
|
+
model: "webhook_endpoint",
|
|
2427
2427
|
foreignKey: "endpointId"
|
|
2428
2428
|
},
|
|
2429
2429
|
event: {
|
|
@@ -2624,13 +2624,13 @@ const getPaymentTables = (options) => {
|
|
|
2624
2624
|
},
|
|
2625
2625
|
sessionEvents: {
|
|
2626
2626
|
kind: "many",
|
|
2627
|
-
model: "
|
|
2627
|
+
model: "session_event",
|
|
2628
2628
|
foreignKey: "eventId"
|
|
2629
2629
|
}
|
|
2630
2630
|
}
|
|
2631
2631
|
},
|
|
2632
2632
|
sessionEvent: {
|
|
2633
|
-
modelName: "
|
|
2633
|
+
modelName: "session_event",
|
|
2634
2634
|
order: 1,
|
|
2635
2635
|
fields: {
|
|
2636
2636
|
id: {
|
|
@@ -2647,7 +2647,7 @@ const getPaymentTables = (options) => {
|
|
|
2647
2647
|
fieldName: "session_id",
|
|
2648
2648
|
required: true,
|
|
2649
2649
|
references: {
|
|
2650
|
-
model: "
|
|
2650
|
+
model: "checkout_session",
|
|
2651
2651
|
field: "id",
|
|
2652
2652
|
onDelete: "cascade"
|
|
2653
2653
|
},
|
|
@@ -2693,7 +2693,7 @@ const getPaymentTables = (options) => {
|
|
|
2693
2693
|
relations: {
|
|
2694
2694
|
session: {
|
|
2695
2695
|
kind: "one",
|
|
2696
|
-
model: "
|
|
2696
|
+
model: "checkout_session",
|
|
2697
2697
|
foreignKey: "sessionId"
|
|
2698
2698
|
},
|
|
2699
2699
|
event: {
|
|
@@ -2704,7 +2704,7 @@ const getPaymentTables = (options) => {
|
|
|
2704
2704
|
}
|
|
2705
2705
|
},
|
|
2706
2706
|
checkoutSession: {
|
|
2707
|
-
modelName: "
|
|
2707
|
+
modelName: "checkout_session",
|
|
2708
2708
|
order: 1,
|
|
2709
2709
|
fields: {
|
|
2710
2710
|
id: {
|
|
@@ -2785,7 +2785,7 @@ const getPaymentTables = (options) => {
|
|
|
2785
2785
|
fieldName: "payment_intent_id",
|
|
2786
2786
|
required: true,
|
|
2787
2787
|
references: {
|
|
2788
|
-
model: "
|
|
2788
|
+
model: "payment_intent",
|
|
2789
2789
|
field: "id",
|
|
2790
2790
|
onDelete: "cascade"
|
|
2791
2791
|
},
|
|
@@ -2870,7 +2870,7 @@ const getPaymentTables = (options) => {
|
|
|
2870
2870
|
relations: {
|
|
2871
2871
|
events: {
|
|
2872
2872
|
kind: "many",
|
|
2873
|
-
model: "
|
|
2873
|
+
model: "session_event",
|
|
2874
2874
|
foreignKey: "sessionId"
|
|
2875
2875
|
},
|
|
2876
2876
|
customer: {
|
|
@@ -3141,18 +3141,18 @@ const getPaymentTables = (options) => {
|
|
|
3141
3141
|
},
|
|
3142
3142
|
checkoutSession: {
|
|
3143
3143
|
kind: "one",
|
|
3144
|
-
model: "
|
|
3144
|
+
model: "checkout_session",
|
|
3145
3145
|
foreignKey: "id"
|
|
3146
3146
|
},
|
|
3147
3147
|
transaction: {
|
|
3148
3148
|
kind: "one",
|
|
3149
|
-
model: "
|
|
3149
|
+
model: "transaction",
|
|
3150
3150
|
foreignKey: "id"
|
|
3151
3151
|
}
|
|
3152
3152
|
}
|
|
3153
3153
|
},
|
|
3154
3154
|
transaction: {
|
|
3155
|
-
modelName: "
|
|
3155
|
+
modelName: "transaction",
|
|
3156
3156
|
order: 1,
|
|
3157
3157
|
fields: {
|
|
3158
3158
|
id: {
|
|
@@ -3356,18 +3356,18 @@ const getPaymentTables = (options) => {
|
|
|
3356
3356
|
},
|
|
3357
3357
|
reversedBy: {
|
|
3358
3358
|
kind: "one",
|
|
3359
|
-
model: "
|
|
3359
|
+
model: "transaction",
|
|
3360
3360
|
foreignKey: "reversedById"
|
|
3361
3361
|
},
|
|
3362
3362
|
reverses: {
|
|
3363
3363
|
kind: "many",
|
|
3364
|
-
model: "
|
|
3364
|
+
model: "transaction",
|
|
3365
3365
|
foreignKey: "reversedById"
|
|
3366
3366
|
}
|
|
3367
3367
|
}
|
|
3368
3368
|
},
|
|
3369
3369
|
scheduledTask: {
|
|
3370
|
-
modelName: "
|
|
3370
|
+
modelName: "scheduled_task",
|
|
3371
3371
|
order: 1,
|
|
3372
3372
|
fields: {
|
|
3373
3373
|
id: {
|
|
@@ -3545,7 +3545,7 @@ const getPaymentTables = (options) => {
|
|
|
3545
3545
|
}]
|
|
3546
3546
|
},
|
|
3547
3547
|
auditLog: {
|
|
3548
|
-
modelName: "
|
|
3548
|
+
modelName: "audit_log",
|
|
3549
3549
|
order: 1,
|
|
3550
3550
|
fields: {
|
|
3551
3551
|
id: {
|
package/dist/hooks/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { getAsyncLocalStorage };
|
|
1
|
+
import { n as getAsyncLocalStorage, t as AsyncLocalStorage } from "../index-BmnRSwr6.mjs";
|
|
2
|
+
export { AsyncLocalStorage, getAsyncLocalStorage };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AsyncLocalStorage as AsyncLocalStorage$1 } from "node:async_hooks";
|
|
2
|
+
|
|
3
|
+
//#region src/hooks/async_hooks/index.d.ts
|
|
4
|
+
declare function getAsyncLocalStorage(): Promise<typeof AsyncLocalStorage$1>;
|
|
5
|
+
//#endregion
|
|
6
|
+
export { getAsyncLocalStorage as n, AsyncLocalStorage$1 as t };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as AsyncLocalStorage$1 } from "./index-BmnRSwr6.mjs";
|
|
2
|
+
import { o as createLogger } from "./index-uCXA11o-.mjs";
|
|
2
3
|
import * as better_call0 from "better-call";
|
|
3
4
|
import { Endpoint, EndpointContext, EndpointOptions, InputContext, Middleware, Status, StrictEndpoint } from "better-call";
|
|
4
5
|
import z$1, { z } from "zod";
|
|
5
6
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6
7
|
import { Dialect, Kysely, Migration, MysqlPool, PostgresPool, SqliteDatabase } from "kysely";
|
|
7
|
-
import { AsyncLocalStorage as AsyncLocalStorage$1 } from "async_hooks";
|
|
8
8
|
import { Primitive } from "zod/v3";
|
|
9
9
|
|
|
10
10
|
//#region src/types/standard-schema-spec/index.d.ts
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
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-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
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-r-9XcDEa.mjs";
|
|
2
|
+
import { n as getAsyncLocalStorage, t as AsyncLocalStorage } from "./index-BmnRSwr6.mjs";
|
|
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";
|
|
5
|
-
export { AccountType, Actor, AdapterFactory, AdapterFactoryConfig, AdapterFactoryCreator, AdapterFactoryOptions, ApiError, AuditAction, Awaitable, BaseModelNames, BillingInterval, CheckoutSessionMode, CheckoutSessionStatus, CollectionMethod, Currency, CustomAdapter, Customer, DBAdapter, DBAdapterDebugLogOption, DBAdapterFactoryConfig, DBAdapterInstance, DBAdapterSchemaCreation, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive, DBTransactionAdapter, Discount, DiscountType, ENV, ERROR_REGISTRY, EnvObject, ErrorDefinition, ErrorDefinitionResponse, ErrorMap, ErrorResponse, ErrorType, GenericEndpointContext, HookEndpointContext, IndexableRegistry, InternalAdapter, InternalLogger, InvoiceStatus, KyselyDatabaseDialectType, LedgerEntryType, LiteralString, LiteralUnion, LogHandlerParams, LogLevel, Logger, ModelNames, PaymentIntentStatus, PaymentMiddleware, PaymentProviders, PecuniaContext, PecuniaDBSchema, PecuniaEndpoint, PecuniaError, PecuniaMiddleware, PecuniaOptions, PecuniaPlugin, Prettify, Price, PriceType, PricingModel, Primitive, Product, ProductType, ProrationBehavior, ProviderAdapter, ProviderErrorCode, ProviderId, RequestState, RequestStateWeakMap, RequiredWhere, ScheduleStatus, ScheduledTaskStatus, ScheduledTaskType, SenlyContext, StandardSchemaV1, Subscription, SubscriptionStatus, TTY_COLORS, TransactionStatus, TransactionType, UsageAction, UsageAggregation, ValidationError, WebHookDeliveryTrigger, WebHookEventStatus, Where, capitalizeFirstLetter, createAdapterFactory, createLogger, createPaymentEndpoint, createPecuniaEndpoint, createPecuniaMiddleware, createProviderError, customerSchema, deepmerge, defineRequestState, discountSchema, env, generateId, getAsyncLocalStorage, getBooleanEnvVar, getColorDepth, getCurrentAdapter, getCurrentAuthContext, getCurrentDBAdapterAsyncLocalStorage, getCurrentPaymentContextAsyncLocalStorage, getCurrentRequestState, getEnvVar, getPaymentTables, getRequestStateAsyncLocalStorage, hasRequestState, initGetDefaultFieldName, initGetDefaultModelName, initGetFieldAttributes, initGetFieldName, initGetIdField, initGetModelName, isDevelopment, isProduction, isTest, levels, logger, nodeENV, optionsMiddleware, priceSchema, productSchema, runWithAdapter, runWithEndpointContext, runWithRequestState, runWithTransaction, safeJSONParse, sharedCoreSchema, sharedDeletableSchema, shouldPublishLog, statusCodes, subscriptionSchema, useMiddleware, withApplyDefault };
|
|
5
|
+
export { AccountType, Actor, AdapterFactory, AdapterFactoryConfig, AdapterFactoryCreator, AdapterFactoryOptions, ApiError, AsyncLocalStorage, AuditAction, Awaitable, BaseModelNames, BillingInterval, CheckoutSessionMode, CheckoutSessionStatus, CollectionMethod, Currency, CustomAdapter, Customer, DBAdapter, DBAdapterDebugLogOption, DBAdapterFactoryConfig, DBAdapterInstance, DBAdapterSchemaCreation, DBFieldAttribute, DBFieldAttributeConfig, DBFieldType, DBPrimitive, DBTransactionAdapter, Discount, DiscountType, ENV, ERROR_REGISTRY, EnvObject, ErrorDefinition, ErrorDefinitionResponse, ErrorMap, ErrorResponse, ErrorType, GenericEndpointContext, HookEndpointContext, IndexableRegistry, InternalAdapter, InternalLogger, InvoiceStatus, KyselyDatabaseDialectType, LedgerEntryType, LiteralString, LiteralUnion, LogHandlerParams, LogLevel, Logger, ModelNames, PaymentIntentStatus, PaymentMiddleware, PaymentProviders, PecuniaContext, PecuniaDBSchema, PecuniaEndpoint, PecuniaError, PecuniaMiddleware, PecuniaOptions, PecuniaPlugin, Prettify, Price, PriceType, PricingModel, Primitive, Product, ProductType, ProrationBehavior, ProviderAdapter, ProviderErrorCode, ProviderId, RequestState, RequestStateWeakMap, RequiredWhere, ScheduleStatus, ScheduledTaskStatus, ScheduledTaskType, SenlyContext, StandardSchemaV1, Subscription, SubscriptionStatus, TTY_COLORS, TransactionStatus, TransactionType, UsageAction, UsageAggregation, ValidationError, WebHookDeliveryTrigger, WebHookEventStatus, Where, capitalizeFirstLetter, createAdapterFactory, createLogger, createPaymentEndpoint, createPecuniaEndpoint, createPecuniaMiddleware, createProviderError, customerSchema, deepmerge, defineRequestState, discountSchema, env, generateId, getAsyncLocalStorage, getBooleanEnvVar, getColorDepth, getCurrentAdapter, getCurrentAuthContext, getCurrentDBAdapterAsyncLocalStorage, getCurrentPaymentContextAsyncLocalStorage, getCurrentRequestState, getEnvVar, getPaymentTables, getRequestStateAsyncLocalStorage, hasRequestState, initGetDefaultFieldName, initGetDefaultModelName, initGetFieldAttributes, initGetFieldName, initGetIdField, initGetModelName, isDevelopment, isProduction, isTest, levels, logger, nodeENV, optionsMiddleware, priceSchema, productSchema, runWithAdapter, runWithEndpointContext, runWithRequestState, runWithTransaction, safeJSONParse, sharedCoreSchema, sharedDeletableSchema, shouldPublishLog, statusCodes, subscriptionSchema, useMiddleware, withApplyDefault };
|
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-CAAnHVns.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-r-9XcDEa.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-CAAnHVns.mjs";
|
|
6
6
|
import "../generate-id-D3ZvbbXn.mjs";
|
|
7
7
|
import "../env-ChlcfGdT.mjs";
|
|
8
8
|
import { n as safeJSONParse } from "../utils-BtfYqMRX.mjs";
|
package/package.json
CHANGED
|
File without changes
|