nomkit 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.txt +21 -0
- package/dist/_virtual/_rolldown/runtime.js +27 -0
- package/dist/adapters/index.d.ts +15 -0
- package/dist/adapters/index.js +6 -0
- package/dist/cli/commands/push.d.ts +6 -0
- package/dist/cli/commands/push.js +143 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.js +18 -0
- package/dist/cli/lib/collection_sync.d.ts +107 -0
- package/dist/cli/lib/collection_sync.js +158 -0
- package/dist/cli/lib/config_loader.d.ts +15 -0
- package/dist/cli/lib/config_loader.js +43 -0
- package/dist/cli/lib/hash.d.ts +22 -0
- package/dist/cli/lib/hash.js +63 -0
- package/dist/cli/lib/migrations.d.ts +6 -0
- package/dist/cli/lib/migrations.js +17 -0
- package/dist/client/index.d.ts +13 -0
- package/dist/client/index.js +34 -0
- package/dist/core/nomba_api/banks.d.ts +14 -0
- package/dist/core/nomba_api/banks.js +0 -0
- package/dist/core/nomba_api/charge-tokenized-card.d.ts +33 -0
- package/dist/core/nomba_api/charge-tokenized-card.js +0 -0
- package/dist/core/nomba_api/checkout.d.ts +44 -0
- package/dist/core/nomba_api/checkout.js +0 -0
- package/dist/core/nomba_api/get_checkout.d.ts +57 -0
- package/dist/core/nomba_api/get_checkout.js +0 -0
- package/dist/core/nomba_api/index.d.ts +313 -0
- package/dist/core/nomba_api/index.js +179 -0
- package/dist/core/nomba_api/lib/utils.d.ts +235 -0
- package/dist/core/nomba_api/lib/utils.js +313 -0
- package/dist/core/nomba_api/list-tokenized-cards.d.ts +24 -0
- package/dist/core/nomba_api/list-tokenized-cards.js +0 -0
- package/dist/core/nomba_api/token-manager/index.d.ts +51 -0
- package/dist/core/nomba_api/token-manager/index.js +109 -0
- package/dist/core/pg_db/index.d.ts +108 -0
- package/dist/core/pg_db/index.js +76 -0
- package/dist/core/pg_db/migrations/20260703085901_wealthy_blacklash/migration.sql +120 -0
- package/dist/core/pg_db/migrations/20260703085901_wealthy_blacklash/snapshot.json +1616 -0
- package/dist/core/pg_db/relations.d.ts +46 -0
- package/dist/core/pg_db/relations.js +83 -0
- package/dist/core/pg_db/schema.d.ts +1138 -0
- package/dist/core/pg_db/schema.js +124 -0
- package/dist/endpoints/customers/api.js +51 -0
- package/dist/endpoints/entitlements/api.js +42 -0
- package/dist/endpoints/routes.d.ts +15 -0
- package/dist/endpoints/routes.js +15 -0
- package/dist/endpoints/subscriptions/api.js +263 -0
- package/dist/endpoints/subscriptions/utils.js +105 -0
- package/dist/endpoints/webhooks/invoice/api.js +28 -0
- package/dist/endpoints/webhooks/nomba/api.js +76 -0
- package/dist/endpoints/webhooks/nomba/utils.js +36 -0
- package/dist/index.d.ts +204 -0
- package/dist/index.js +175 -0
- package/dist/lib/utils.d.ts +21 -0
- package/dist/lib/utils.js +41 -0
- package/dist/node_modules/.pnpm/@better-fetch_fetch@1.3.1/node_modules/@better-fetch/fetch/dist/index.js +475 -0
- package/dist/package.js +4 -0
- package/dist/queue/backends/pglite/backend.d.ts +43 -0
- package/dist/queue/backends/pglite/backend.js +33 -0
- package/dist/queue/backends/pglite/index.d.ts +4 -0
- package/dist/queue/backends/pglite/index.js +4 -0
- package/dist/queue/backends/pglite/migrations/schema.d.ts +4 -0
- package/dist/queue/backends/pglite/migrations/schema.js +37 -0
- package/dist/queue/backends/pglite/notification-channel.d.ts +17 -0
- package/dist/queue/backends/pglite/notification-channel.js +61 -0
- package/dist/queue/backends/pglite/repository.d.ts +38 -0
- package/dist/queue/backends/pglite/repository.js +299 -0
- package/dist/queue/backends/redis/index.d.ts +7 -0
- package/dist/queue/backends/redis/index.js +1 -0
- package/dist/queue/client/index.d.ts +12 -0
- package/dist/queue/client/index.js +31 -0
- package/dist/queue/endpoints/api.d.ts +53 -0
- package/dist/queue/endpoints/api.js +45 -0
- package/dist/queue/endpoints/routes.d.ts +32 -0
- package/dist/queue/endpoints/routes.js +5 -0
- package/dist/queue/init.d.ts +27 -0
- package/dist/queue/init.js +31 -0
- package/dist/queue/lib/billing.d.ts +25 -0
- package/dist/queue/lib/billing.js +87 -0
- package/dist/queue/lib/utils.d.ts +30 -0
- package/dist/queue/lib/utils.js +35 -0
- package/package.json +71 -0
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { schema_d_exports } from "./schema.js";
|
|
2
|
+
|
|
3
|
+
//#region core/pg_db/relations.d.ts
|
|
4
|
+
declare const relations: import("drizzle-orm").ExtractTablesWithRelations<{
|
|
5
|
+
products: {
|
|
6
|
+
features: import("drizzle-orm").Many<"productFeatures">;
|
|
7
|
+
subscriptions: import("drizzle-orm").Many<"subscriptions">;
|
|
8
|
+
};
|
|
9
|
+
productFeatures: {
|
|
10
|
+
product: import("drizzle-orm").One<"products", true>;
|
|
11
|
+
feature: import("drizzle-orm").One<"features", true>;
|
|
12
|
+
};
|
|
13
|
+
features: {
|
|
14
|
+
products: import("drizzle-orm").Many<"productFeatures">;
|
|
15
|
+
entitlements: import("drizzle-orm").Many<"entitlements">;
|
|
16
|
+
};
|
|
17
|
+
customers: {
|
|
18
|
+
paymentMethods: import("drizzle-orm").Many<"paymentMethods">;
|
|
19
|
+
subscriptions: import("drizzle-orm").Many<"subscriptions">;
|
|
20
|
+
entitlements: import("drizzle-orm").Many<"entitlements">;
|
|
21
|
+
invoices: import("drizzle-orm").Many<"invoices">;
|
|
22
|
+
};
|
|
23
|
+
paymentMethods: {
|
|
24
|
+
customer: import("drizzle-orm").One<"customers", true>;
|
|
25
|
+
subscriptions: import("drizzle-orm").Many<"subscriptions">;
|
|
26
|
+
};
|
|
27
|
+
subscriptions: {
|
|
28
|
+
customer: import("drizzle-orm").One<"customers", true>;
|
|
29
|
+
product: import("drizzle-orm").One<"products", true>;
|
|
30
|
+
paymentMethod: import("drizzle-orm").One<"paymentMethods", true>;
|
|
31
|
+
entitlements: import("drizzle-orm").Many<"entitlements">;
|
|
32
|
+
invoices: import("drizzle-orm").Many<"invoices">;
|
|
33
|
+
nextSubscription: import("drizzle-orm").One<"subscriptions", true>;
|
|
34
|
+
};
|
|
35
|
+
entitlements: {
|
|
36
|
+
subscription: import("drizzle-orm").One<"subscriptions", true>;
|
|
37
|
+
customer: import("drizzle-orm").One<"customers", true>;
|
|
38
|
+
feature: import("drizzle-orm").One<"features", true>;
|
|
39
|
+
};
|
|
40
|
+
invoices: {
|
|
41
|
+
customer: import("drizzle-orm").One<"customers", true>;
|
|
42
|
+
subscription: import("drizzle-orm").One<"subscriptions", true>;
|
|
43
|
+
};
|
|
44
|
+
}, import("drizzle-orm").ExtractTablesFromSchema<typeof schema_d_exports>>;
|
|
45
|
+
//#endregion
|
|
46
|
+
export { relations };
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { schema_exports } from "./schema.js";
|
|
2
|
+
import { defineRelations } from "drizzle-orm";
|
|
3
|
+
//#region core/pg_db/relations.ts
|
|
4
|
+
const relations = defineRelations(schema_exports, (r) => ({
|
|
5
|
+
products: {
|
|
6
|
+
features: r.many.productFeatures(),
|
|
7
|
+
subscriptions: r.many.subscriptions()
|
|
8
|
+
},
|
|
9
|
+
productFeatures: {
|
|
10
|
+
product: r.one.products({
|
|
11
|
+
from: [r.productFeatures.productId, r.productFeatures.productVersion],
|
|
12
|
+
to: [r.products.id, r.products.version]
|
|
13
|
+
}),
|
|
14
|
+
feature: r.one.features({
|
|
15
|
+
from: r.productFeatures.featureInternalId,
|
|
16
|
+
to: r.features.internalId
|
|
17
|
+
})
|
|
18
|
+
},
|
|
19
|
+
features: {
|
|
20
|
+
products: r.many.productFeatures(),
|
|
21
|
+
entitlements: r.many.entitlements()
|
|
22
|
+
},
|
|
23
|
+
customers: {
|
|
24
|
+
paymentMethods: r.many.paymentMethods(),
|
|
25
|
+
subscriptions: r.many.subscriptions(),
|
|
26
|
+
entitlements: r.many.entitlements(),
|
|
27
|
+
invoices: r.many.invoices()
|
|
28
|
+
},
|
|
29
|
+
paymentMethods: {
|
|
30
|
+
customer: r.one.customers({
|
|
31
|
+
from: r.paymentMethods.customerId,
|
|
32
|
+
to: r.customers.id
|
|
33
|
+
}),
|
|
34
|
+
subscriptions: r.many.subscriptions()
|
|
35
|
+
},
|
|
36
|
+
subscriptions: {
|
|
37
|
+
customer: r.one.customers({
|
|
38
|
+
from: r.subscriptions.customerId,
|
|
39
|
+
to: r.customers.id
|
|
40
|
+
}),
|
|
41
|
+
product: r.one.products({
|
|
42
|
+
from: r.subscriptions.productInternalId,
|
|
43
|
+
to: r.products.internalId
|
|
44
|
+
}),
|
|
45
|
+
paymentMethod: r.one.paymentMethods({
|
|
46
|
+
from: r.subscriptions.paymentMethodId,
|
|
47
|
+
to: r.paymentMethods.id,
|
|
48
|
+
optional: true
|
|
49
|
+
}),
|
|
50
|
+
entitlements: r.many.entitlements(),
|
|
51
|
+
invoices: r.many.invoices(),
|
|
52
|
+
nextSubscription: r.one.subscriptions({
|
|
53
|
+
from: r.subscriptions.nextSubscriptionId,
|
|
54
|
+
to: r.subscriptions.id
|
|
55
|
+
})
|
|
56
|
+
},
|
|
57
|
+
entitlements: {
|
|
58
|
+
subscription: r.one.subscriptions({
|
|
59
|
+
from: r.entitlements.subscriptionId,
|
|
60
|
+
to: r.subscriptions.id
|
|
61
|
+
}),
|
|
62
|
+
customer: r.one.customers({
|
|
63
|
+
from: r.entitlements.customerId,
|
|
64
|
+
to: r.customers.id
|
|
65
|
+
}),
|
|
66
|
+
feature: r.one.features({
|
|
67
|
+
from: r.entitlements.featureInternalId,
|
|
68
|
+
to: r.features.internalId
|
|
69
|
+
})
|
|
70
|
+
},
|
|
71
|
+
invoices: {
|
|
72
|
+
customer: r.one.customers({
|
|
73
|
+
from: r.invoices.customerId,
|
|
74
|
+
to: r.customers.id
|
|
75
|
+
}),
|
|
76
|
+
subscription: r.one.subscriptions({
|
|
77
|
+
from: r.invoices.subscriptionId,
|
|
78
|
+
to: r.subscriptions.id
|
|
79
|
+
})
|
|
80
|
+
}
|
|
81
|
+
}));
|
|
82
|
+
//#endregion
|
|
83
|
+
export { relations };
|