@appweaver/data 0.0.0-stage → 2.0.1
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 +21 -0
- package/README.md +61 -2
- package/config.d.ts +6 -0
- package/config.js +22 -0
- package/database/create-client.d.ts +11 -0
- package/database/create-client.js +145 -0
- package/database/database-config.d.ts +14 -0
- package/database/database-config.js +40 -0
- package/database/database-error.d.ts +49 -0
- package/database/database-error.js +216 -0
- package/database/index.d.ts +3 -0
- package/database/index.js +19 -0
- package/database/prisma-database.d.ts +33 -0
- package/database/prisma-database.js +178 -0
- package/database/run-transaction.d.ts +21 -0
- package/database/run-transaction.js +15 -0
- package/export/export-config.d.ts +7 -0
- package/export/export-config.js +17 -0
- package/export/export-service.d.ts +22 -0
- package/export/export-service.js +188 -0
- package/export/index.d.ts +1 -0
- package/export/index.js +17 -0
- package/factory/create-model.d.ts +11 -0
- package/factory/create-model.js +479 -0
- package/factory/create-policy.d.ts +12 -0
- package/factory/create-policy.js +20 -0
- package/factory/create-service.d.ts +14 -0
- package/factory/create-service.js +116 -0
- package/index.d.ts +22 -0
- package/index.js +38 -0
- package/internal.d.ts +2 -0
- package/internal.js +6 -0
- package/module.d.ts +3 -0
- package/module.js +81 -0
- package/package.json +67 -3
- package/prisma/client/browser.d.ts +39 -0
- package/prisma/client/browser.js +56 -0
- package/prisma/client/client.d.ts +58 -0
- package/prisma/client/client.js +70 -0
- package/prisma/client/commonInputTypes.d.ts +345 -0
- package/prisma/client/commonInputTypes.js +11 -0
- package/prisma/client/enums.d.ts +1 -0
- package/prisma/client/enums.js +11 -0
- package/prisma/client/internal/class.d.ts +198 -0
- package/prisma/client/internal/class.js +85 -0
- package/prisma/client/internal/prismaNamespace.d.ts +1125 -0
- package/prisma/client/internal/prismaNamespace.js +204 -0
- package/prisma/client/internal/prismaNamespaceBrowser.d.ts +137 -0
- package/prisma/client/internal/prismaNamespaceBrowser.js +175 -0
- package/prisma/client/models/ApiKey.d.ts +1167 -0
- package/prisma/client/models/ApiKey.js +2 -0
- package/prisma/client/models/ConnectedAccount.d.ts +1094 -0
- package/prisma/client/models/ConnectedAccount.js +2 -0
- package/prisma/client/models/File.d.ts +1291 -0
- package/prisma/client/models/File.js +2 -0
- package/prisma/client/models/OneTimeToken.d.ts +1055 -0
- package/prisma/client/models/OneTimeToken.js +2 -0
- package/prisma/client/models/Permission.d.ts +1209 -0
- package/prisma/client/models/Permission.js +2 -0
- package/prisma/client/models/Role.d.ts +1209 -0
- package/prisma/client/models/Role.js +2 -0
- package/prisma/client/models/Seeder.d.ts +1023 -0
- package/prisma/client/models/Seeder.js +2 -0
- package/prisma/client/models.d.ts +8 -0
- package/prisma/client/models.js +2 -0
- package/resource/load-data-resources.d.ts +13 -0
- package/resource/load-data-resources.js +37 -0
- package/resource/model-schema.d.ts +34 -0
- package/resource/model-schema.js +54 -0
- package/resource/resource-config.d.ts +16 -0
- package/resource/resource-config.js +62 -0
- package/resource/resource-loader.d.ts +25 -0
- package/resource/resource-loader.js +138 -0
- package/resource/resource-service.d.ts +462 -0
- package/resource/resource-service.js +1042 -0
- package/resource/schemas/index.d.ts +3 -0
- package/resource/schemas/index.js +19 -0
- package/resource/schemas/resource-aggregate-schema.d.ts +53 -0
- package/resource/schemas/resource-aggregate-schema.js +130 -0
- package/resource/schemas/resource-filter-schema.d.ts +39 -0
- package/resource/schemas/resource-filter-schema.js +153 -0
- package/resource/schemas/resource-sort-schema.d.ts +38 -0
- package/resource/schemas/resource-sort-schema.js +113 -0
- package/resource/utils/aggregate-util.d.ts +113 -0
- package/resource/utils/aggregate-util.js +322 -0
- package/resource/utils/cursor-util.d.ts +60 -0
- package/resource/utils/cursor-util.js +116 -0
- package/resource/utils/date-util.d.ts +22 -0
- package/resource/utils/date-util.js +112 -0
- package/resource/utils/delete-util.d.ts +131 -0
- package/resource/utils/delete-util.js +385 -0
- package/resource/utils/filter-util.d.ts +24 -0
- package/resource/utils/filter-util.js +289 -0
- package/resource/utils/prune-util.d.ts +11 -0
- package/resource/utils/prune-util.js +56 -0
- package/resource/utils/relation-util.d.ts +75 -0
- package/resource/utils/relation-util.js +400 -0
- package/resource/utils/sort-util.d.ts +31 -0
- package/resource/utils/sort-util.js +235 -0
- package/resource/utils/text-search-util.d.ts +14 -0
- package/resource/utils/text-search-util.js +39 -0
- package/resources.d.ts +10 -0
- package/resources.js +26 -0
- package/security/auth-config.d.ts +23 -0
- package/security/auth-config.js +43 -0
- package/security/create-auth-resources.d.ts +28 -0
- package/security/create-auth-resources.js +163 -0
- package/security/helper.d.ts +109 -0
- package/security/helper.js +298 -0
- package/security/resources/api-key/model.d.ts +2 -0
- package/security/resources/api-key/model.js +67 -0
- package/security/resources/api-key/policy.d.ts +2 -0
- package/security/resources/api-key/policy.js +27 -0
- package/security/resources/api-key/service.d.ts +3 -0
- package/security/resources/api-key/service.js +34 -0
- package/security/resources/connected-account/model.d.ts +2 -0
- package/security/resources/connected-account/model.js +57 -0
- package/security/resources/connected-account/service.d.ts +2 -0
- package/security/resources/connected-account/service.js +7 -0
- package/security/resources/one-time-token/model.d.ts +2 -0
- package/security/resources/one-time-token/model.js +36 -0
- package/security/resources/permission/model.d.ts +2 -0
- package/security/resources/permission/model.js +16 -0
- package/security/resources/role/model.d.ts +2 -0
- package/security/resources/role/model.js +22 -0
- package/security/store/database-security-store.d.ts +5 -0
- package/security/store/database-security-store.js +54 -0
- package/seeder/create-seeder.d.ts +29 -0
- package/seeder/create-seeder.js +28 -0
- package/seeder/index.d.ts +2 -0
- package/seeder/index.js +18 -0
- package/seeder/resources/seeder/model.d.ts +2 -0
- package/seeder/resources/seeder/model.js +38 -0
- package/seeder/seeder.d.ts +29 -0
- package/seeder/seeder.js +197 -0
- package/storage/file-service.d.ts +133 -0
- package/storage/file-service.js +586 -0
- package/storage/image-config.d.ts +3 -0
- package/storage/image-config.js +11 -0
- package/storage/resources/file/model.d.ts +2 -0
- package/storage/resources/file/model.js +80 -0
- package/types/auth.d.ts +23 -0
- package/types/auth.js +2 -0
- package/types/generated.d.ts +366 -0
- package/types/generated.js +3 -0
- package/types/storage.d.ts +35 -0
- package/types/storage.js +2 -0
- package/utils/export-util.d.ts +8 -0
- package/utils/export-util.js +26 -0
- package/utils/file-util.d.ts +106 -0
- package/utils/file-util.js +254 -0
- package/utils/model-util.d.ts +36 -0
- package/utils/model-util.js +154 -0
- package/utils/policy-util.d.ts +18 -0
- package/utils/policy-util.js +28 -0
- package/utils/virtual-util.d.ts +11 -0
- package/utils/virtual-util.js +53 -0
package/index.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./config"), exports);
|
|
18
|
+
__exportStar(require("./database"), exports);
|
|
19
|
+
__exportStar(require("./export/export-service"), exports);
|
|
20
|
+
__exportStar(require("./factory/create-model"), exports);
|
|
21
|
+
__exportStar(require("./factory/create-policy"), exports);
|
|
22
|
+
__exportStar(require("./factory/create-service"), exports);
|
|
23
|
+
__exportStar(require("./resource/model-schema"), exports);
|
|
24
|
+
__exportStar(require("./resource/resource-loader"), exports);
|
|
25
|
+
__exportStar(require("./resource/resource-service"), exports);
|
|
26
|
+
__exportStar(require("./resource/schemas"), exports);
|
|
27
|
+
__exportStar(require("./security/create-auth-resources"), exports);
|
|
28
|
+
__exportStar(require("./security/helper"), exports);
|
|
29
|
+
__exportStar(require("./seeder"), exports);
|
|
30
|
+
__exportStar(require("./storage/file-service"), exports);
|
|
31
|
+
__exportStar(require("./types/auth"), exports);
|
|
32
|
+
__exportStar(require("./types/generated"), exports);
|
|
33
|
+
__exportStar(require("./types/storage"), exports);
|
|
34
|
+
__exportStar(require("./utils/export-util"), exports);
|
|
35
|
+
__exportStar(require("./utils/file-util"), exports);
|
|
36
|
+
__exportStar(require("./utils/model-util"), exports);
|
|
37
|
+
__exportStar(require("./utils/policy-util"), exports);
|
|
38
|
+
__exportStar(require("./utils/virtual-util"), exports);
|
package/internal.d.ts
ADDED
package/internal.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.pruneUnusedModels = void 0;
|
|
4
|
+
/** The internals of data the CLI builds on, which can change in a minor release. */
|
|
5
|
+
var prune_util_1 = require("./resource/utils/prune-util");
|
|
6
|
+
Object.defineProperty(exports, "pruneUnusedModels", { enumerable: true, get: function () { return prune_util_1.pruneUnusedModels; } });
|
package/module.d.ts
ADDED
package/module.js
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const common_1 = require("@appweaver/common");
|
|
37
|
+
const database_config_1 = require("./database/database-config");
|
|
38
|
+
const export_config_1 = require("./export/export-config");
|
|
39
|
+
const resource_config_1 = require("./resource/resource-config");
|
|
40
|
+
const auth_config_1 = require("./security/auth-config");
|
|
41
|
+
const image_config_1 = require("./storage/image-config");
|
|
42
|
+
/** The database, the resources and the auth data model, built on Prisma. */
|
|
43
|
+
exports.default = (0, common_1.defineModule)({
|
|
44
|
+
name: '@appweaver/data',
|
|
45
|
+
config: [
|
|
46
|
+
database_config_1.databaseConfig,
|
|
47
|
+
resource_config_1.resourceConfig,
|
|
48
|
+
export_config_1.exportConfig,
|
|
49
|
+
image_config_1.imageConfig,
|
|
50
|
+
auth_config_1.passwordConfig,
|
|
51
|
+
auth_config_1.apiKeyConfig,
|
|
52
|
+
auth_config_1.connectedAccountConfig,
|
|
53
|
+
auth_config_1.systemConfig
|
|
54
|
+
],
|
|
55
|
+
contracts: [
|
|
56
|
+
{ contract: common_1.Database, provider: () => database_config_1.databaseConfig.PROVIDER },
|
|
57
|
+
{ contract: common_1.ImageProcessor, provider: () => image_config_1.imageConfig.PROVIDER }
|
|
58
|
+
],
|
|
59
|
+
providers: [
|
|
60
|
+
{
|
|
61
|
+
contract: common_1.Database,
|
|
62
|
+
name: 'prisma',
|
|
63
|
+
load: () => Promise.resolve().then(() => __importStar(require('./database/prisma-database')))
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
contract: common_1.SecurityStore,
|
|
67
|
+
name: 'database',
|
|
68
|
+
load: () => Promise.resolve().then(() => __importStar(require('./security/store/database-security-store'))),
|
|
69
|
+
auto: 'fallback'
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
services: [
|
|
73
|
+
{
|
|
74
|
+
load: () => Promise.resolve().then(() => __importStar(require('./storage/file-service'))),
|
|
75
|
+
requires: [common_1.Database, common_1.Storage]
|
|
76
|
+
},
|
|
77
|
+
{ load: () => Promise.resolve().then(() => __importStar(require('./export/export-service'))), requires: [common_1.Database] }
|
|
78
|
+
],
|
|
79
|
+
setup: async (context) => (await Promise.resolve().then(() => __importStar(require('./resource/load-data-resources')))).loadDataResources(context),
|
|
80
|
+
resources: () => Promise.resolve().then(() => __importStar(require('./resources')))
|
|
81
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,70 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@appweaver/data",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "2.0.1",
|
|
4
|
+
"description": "Appweaver - the backend framework for AI-first development (@data)",
|
|
5
|
+
"author": "Luka Matosevic",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"main": "./index.js",
|
|
8
|
+
"types": "./index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./index.d.ts",
|
|
12
|
+
"default": "./index.js"
|
|
13
|
+
},
|
|
14
|
+
"./config": {
|
|
15
|
+
"types": "./config.d.ts",
|
|
16
|
+
"default": "./config.js"
|
|
17
|
+
},
|
|
18
|
+
"./internal": {
|
|
19
|
+
"types": "./internal.d.ts",
|
|
20
|
+
"default": "./internal.js"
|
|
21
|
+
},
|
|
22
|
+
"./package.json": "./package.json"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"appweaver",
|
|
26
|
+
"appweaver-module"
|
|
27
|
+
],
|
|
28
|
+
"repository": {
|
|
29
|
+
"type": "git",
|
|
30
|
+
"url": "https://github.com/lmatosevic/appweaver.git",
|
|
31
|
+
"directory": "packages/data"
|
|
32
|
+
},
|
|
33
|
+
"maintainers": [
|
|
34
|
+
{
|
|
35
|
+
"name": "Luka Matosevic",
|
|
36
|
+
"email": "lukamatosevic5@gmail.com",
|
|
37
|
+
"web": "https://lukamatosevic.com"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"publishConfig": {
|
|
41
|
+
"access": "public"
|
|
42
|
+
},
|
|
43
|
+
"engines": {
|
|
44
|
+
"node": ">= 24.7"
|
|
45
|
+
},
|
|
46
|
+
"appweaver": {
|
|
47
|
+
"module": "./module.js"
|
|
48
|
+
},
|
|
49
|
+
"dependencies": {
|
|
50
|
+
"@sinclair/typebox": "0.34.49",
|
|
51
|
+
"csv-stringify": "6.8.0"
|
|
52
|
+
},
|
|
53
|
+
"peerDependencies": {
|
|
54
|
+
"@appweaver/common": "^2.0.1",
|
|
55
|
+
"@appweaver/core": "^2.0.1",
|
|
56
|
+
"@prisma/client": "^7.9.0"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@appweaver/common": "^1.12.2",
|
|
60
|
+
"@appweaver/core": "^1.12.2",
|
|
61
|
+
"@prisma/adapter-better-sqlite3": "7.9.1",
|
|
62
|
+
"@prisma/client": "7.9.1",
|
|
63
|
+
"prisma": "7.9.1",
|
|
64
|
+
"rimraf": "6.1.3"
|
|
65
|
+
},
|
|
66
|
+
"scripts": {
|
|
67
|
+
"generate": "weaver generate --no-registry --no-prune --no-config-schema --model-pattern ./**/model.ts --types-path ./types/generated.ts --schema-path ./prisma/schema.prisma --client-path ./prisma/client",
|
|
68
|
+
"db:recreate": "rimraf dev.db && rimraf prisma/migrations && weaver migration new init"
|
|
69
|
+
}
|
|
6
70
|
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as Prisma from './internal/prismaNamespaceBrowser';
|
|
2
|
+
export { Prisma };
|
|
3
|
+
export * as $Enums from './enums';
|
|
4
|
+
export * from './enums';
|
|
5
|
+
/**
|
|
6
|
+
* Model ApiKey
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
export type ApiKey = Prisma.ApiKeyModel;
|
|
10
|
+
/**
|
|
11
|
+
* Model ConnectedAccount
|
|
12
|
+
*
|
|
13
|
+
*/
|
|
14
|
+
export type ConnectedAccount = Prisma.ConnectedAccountModel;
|
|
15
|
+
/**
|
|
16
|
+
* Model OneTimeToken
|
|
17
|
+
*
|
|
18
|
+
*/
|
|
19
|
+
export type OneTimeToken = Prisma.OneTimeTokenModel;
|
|
20
|
+
/**
|
|
21
|
+
* Model Permission
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
export type Permission = Prisma.PermissionModel;
|
|
25
|
+
/**
|
|
26
|
+
* Model Role
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export type Role = Prisma.RoleModel;
|
|
30
|
+
/**
|
|
31
|
+
* Model Seeder
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export type Seeder = Prisma.SeederModel;
|
|
35
|
+
/**
|
|
36
|
+
* Model File
|
|
37
|
+
*
|
|
38
|
+
*/
|
|
39
|
+
export type File = Prisma.FileModel;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// biome-ignore-all lint: generated file
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
/*
|
|
7
|
+
* This file should be your main import to use Prisma-related types and utilities in a browser.
|
|
8
|
+
* Use it to get access to models, enums, and input types.
|
|
9
|
+
*
|
|
10
|
+
* This file does not contain a `PrismaClient` class, nor several other helpers that are intended as server-side only.
|
|
11
|
+
* See `client.ts` for the standard, server-side entry point.
|
|
12
|
+
*
|
|
13
|
+
* 🟢 You can import this file directly.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
49
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
50
|
+
};
|
|
51
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
+
exports.$Enums = exports.Prisma = void 0;
|
|
53
|
+
const Prisma = __importStar(require("./internal/prismaNamespaceBrowser"));
|
|
54
|
+
exports.Prisma = Prisma;
|
|
55
|
+
exports.$Enums = __importStar(require("./enums"));
|
|
56
|
+
__exportStar(require("./enums"), exports);
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import * as runtime from "@prisma/client/runtime/client";
|
|
2
|
+
import * as $Class from "./internal/class";
|
|
3
|
+
import * as Prisma from "./internal/prismaNamespace";
|
|
4
|
+
export * as $Enums from './enums';
|
|
5
|
+
export * from "./enums";
|
|
6
|
+
/**
|
|
7
|
+
* ## Prisma Client
|
|
8
|
+
*
|
|
9
|
+
* Type-safe database client for TypeScript
|
|
10
|
+
* @example
|
|
11
|
+
* ```
|
|
12
|
+
* const prisma = new PrismaClient({
|
|
13
|
+
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
14
|
+
* })
|
|
15
|
+
* // Fetch zero or more ApiKeys
|
|
16
|
+
* const apiKeys = await prisma.apiKey.findMany()
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* Read more in our [docs](https://pris.ly/d/client).
|
|
20
|
+
*/
|
|
21
|
+
export declare const PrismaClient: $Class.PrismaClientConstructor;
|
|
22
|
+
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>;
|
|
23
|
+
export { Prisma };
|
|
24
|
+
/**
|
|
25
|
+
* Model ApiKey
|
|
26
|
+
*
|
|
27
|
+
*/
|
|
28
|
+
export type ApiKey = Prisma.ApiKeyModel;
|
|
29
|
+
/**
|
|
30
|
+
* Model ConnectedAccount
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
export type ConnectedAccount = Prisma.ConnectedAccountModel;
|
|
34
|
+
/**
|
|
35
|
+
* Model OneTimeToken
|
|
36
|
+
*
|
|
37
|
+
*/
|
|
38
|
+
export type OneTimeToken = Prisma.OneTimeTokenModel;
|
|
39
|
+
/**
|
|
40
|
+
* Model Permission
|
|
41
|
+
*
|
|
42
|
+
*/
|
|
43
|
+
export type Permission = Prisma.PermissionModel;
|
|
44
|
+
/**
|
|
45
|
+
* Model Role
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
export type Role = Prisma.RoleModel;
|
|
49
|
+
/**
|
|
50
|
+
* Model Seeder
|
|
51
|
+
*
|
|
52
|
+
*/
|
|
53
|
+
export type Seeder = Prisma.SeederModel;
|
|
54
|
+
/**
|
|
55
|
+
* Model File
|
|
56
|
+
*
|
|
57
|
+
*/
|
|
58
|
+
export type File = Prisma.FileModel;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// biome-ignore-all lint: generated file
|
|
5
|
+
// @ts-nocheck
|
|
6
|
+
/*
|
|
7
|
+
* This file should be your main import to use Prisma. Through it you get access to all the models, enums, and input types.
|
|
8
|
+
* If you're looking for something you can import in the client-side of your application, please refer to the `browser.ts` file instead.
|
|
9
|
+
*
|
|
10
|
+
* 🟢 You can import this file directly.
|
|
11
|
+
*/
|
|
12
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
15
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
16
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
17
|
+
}
|
|
18
|
+
Object.defineProperty(o, k2, desc);
|
|
19
|
+
}) : (function(o, m, k, k2) {
|
|
20
|
+
if (k2 === undefined) k2 = k;
|
|
21
|
+
o[k2] = m[k];
|
|
22
|
+
}));
|
|
23
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
24
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
25
|
+
}) : function(o, v) {
|
|
26
|
+
o["default"] = v;
|
|
27
|
+
});
|
|
28
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
29
|
+
var ownKeys = function(o) {
|
|
30
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
31
|
+
var ar = [];
|
|
32
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
33
|
+
return ar;
|
|
34
|
+
};
|
|
35
|
+
return ownKeys(o);
|
|
36
|
+
};
|
|
37
|
+
return function (mod) {
|
|
38
|
+
if (mod && mod.__esModule) return mod;
|
|
39
|
+
var result = {};
|
|
40
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
41
|
+
__setModuleDefault(result, mod);
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
})();
|
|
45
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
46
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
47
|
+
};
|
|
48
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
+
exports.Prisma = exports.PrismaClient = exports.$Enums = void 0;
|
|
50
|
+
const $Class = __importStar(require("./internal/class"));
|
|
51
|
+
const Prisma = __importStar(require("./internal/prismaNamespace"));
|
|
52
|
+
exports.Prisma = Prisma;
|
|
53
|
+
exports.$Enums = __importStar(require("./enums"));
|
|
54
|
+
__exportStar(require("./enums"), exports);
|
|
55
|
+
/**
|
|
56
|
+
* ## Prisma Client
|
|
57
|
+
*
|
|
58
|
+
* Type-safe database client for TypeScript
|
|
59
|
+
* @example
|
|
60
|
+
* ```
|
|
61
|
+
* const prisma = new PrismaClient({
|
|
62
|
+
* adapter: new PrismaPg({ connectionString: process.env.DATABASE_URL })
|
|
63
|
+
* })
|
|
64
|
+
* // Fetch zero or more ApiKeys
|
|
65
|
+
* const apiKeys = await prisma.apiKey.findMany()
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* Read more in our [docs](https://pris.ly/d/client).
|
|
69
|
+
*/
|
|
70
|
+
exports.PrismaClient = $Class.getPrismaClientClass();
|