-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: pre-generate and commit prisma client
- Loading branch information
Showing
28 changed files
with
8,852 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./index" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
module.exports = { ...require('.') } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./default" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,218 @@ | ||
|
||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
|
||
const { | ||
PrismaClientKnownRequestError, | ||
PrismaClientUnknownRequestError, | ||
PrismaClientRustPanicError, | ||
PrismaClientInitializationError, | ||
PrismaClientValidationError, | ||
NotFoundError, | ||
getPrismaClient, | ||
sqltag, | ||
empty, | ||
join, | ||
raw, | ||
skip, | ||
Decimal, | ||
Debug, | ||
objectEnumValues, | ||
makeStrictEnum, | ||
Extensions, | ||
warnOnce, | ||
defineDmmfProperty, | ||
Public, | ||
getRuntime | ||
} = require('./runtime/edge.js') | ||
|
||
|
||
const Prisma = {} | ||
|
||
exports.Prisma = Prisma | ||
exports.$Enums = {} | ||
|
||
/** | ||
* Prisma Client JS version: 5.21.1 | ||
* Query Engine version: bf0e5e8a04cada8225617067eaa03d041e2bba36 | ||
*/ | ||
Prisma.prismaVersion = { | ||
client: "5.21.1", | ||
engine: "bf0e5e8a04cada8225617067eaa03d041e2bba36" | ||
} | ||
|
||
Prisma.PrismaClientKnownRequestError = PrismaClientKnownRequestError; | ||
Prisma.PrismaClientUnknownRequestError = PrismaClientUnknownRequestError | ||
Prisma.PrismaClientRustPanicError = PrismaClientRustPanicError | ||
Prisma.PrismaClientInitializationError = PrismaClientInitializationError | ||
Prisma.PrismaClientValidationError = PrismaClientValidationError | ||
Prisma.NotFoundError = NotFoundError | ||
Prisma.Decimal = Decimal | ||
|
||
/** | ||
* Re-export of sql-template-tag | ||
*/ | ||
Prisma.sql = sqltag | ||
Prisma.empty = empty | ||
Prisma.join = join | ||
Prisma.raw = raw | ||
Prisma.validator = Public.validator | ||
|
||
/** | ||
* Extensions | ||
*/ | ||
Prisma.getExtensionContext = Extensions.getExtensionContext | ||
Prisma.defineExtension = Extensions.defineExtension | ||
|
||
/** | ||
* Shorthand utilities for JSON filtering | ||
*/ | ||
Prisma.DbNull = objectEnumValues.instances.DbNull | ||
Prisma.JsonNull = objectEnumValues.instances.JsonNull | ||
Prisma.AnyNull = objectEnumValues.instances.AnyNull | ||
|
||
Prisma.NullTypes = { | ||
DbNull: objectEnumValues.classes.DbNull, | ||
JsonNull: objectEnumValues.classes.JsonNull, | ||
AnyNull: objectEnumValues.classes.AnyNull | ||
} | ||
|
||
|
||
|
||
|
||
|
||
/** | ||
* Enums | ||
*/ | ||
exports.Prisma.TransactionIsolationLevel = makeStrictEnum({ | ||
ReadUncommitted: 'ReadUncommitted', | ||
ReadCommitted: 'ReadCommitted', | ||
RepeatableRead: 'RepeatableRead', | ||
Serializable: 'Serializable' | ||
}); | ||
|
||
exports.Prisma.MpesaOnrampSwapScalarFieldEnum = { | ||
id: 'id', | ||
state: 'state', | ||
userId: 'userId', | ||
mpesaId: 'mpesaId', | ||
lightning: 'lightning', | ||
rate: 'rate', | ||
retryCount: 'retryCount', | ||
createdAt: 'createdAt', | ||
updatedAt: 'updatedAt' | ||
}; | ||
|
||
exports.Prisma.IntasendMpesaTransactionScalarFieldEnum = { | ||
id: 'id', | ||
state: 'state', | ||
apiRef: 'apiRef', | ||
value: 'value', | ||
charges: 'charges', | ||
netAmount: 'netAmount', | ||
currency: 'currency', | ||
account: 'account', | ||
retryCount: 'retryCount', | ||
createdAt: 'createdAt', | ||
updatedAt: 'updatedAt' | ||
}; | ||
|
||
exports.Prisma.SortOrder = { | ||
asc: 'asc', | ||
desc: 'desc' | ||
}; | ||
|
||
exports.Prisma.QueryMode = { | ||
default: 'default', | ||
insensitive: 'insensitive' | ||
}; | ||
exports.SwapTransactionState = exports.$Enums.SwapTransactionState = { | ||
PENDING: 'PENDING', | ||
PROCESSING: 'PROCESSING', | ||
FAILED: 'FAILED', | ||
COMPLETE: 'COMPLETE', | ||
RETRY: 'RETRY' | ||
}; | ||
|
||
exports.Prisma.ModelName = { | ||
MpesaOnrampSwap: 'MpesaOnrampSwap', | ||
IntasendMpesaTransaction: 'IntasendMpesaTransaction' | ||
}; | ||
/** | ||
* Create the Client | ||
*/ | ||
const config = { | ||
"generator": { | ||
"name": "client", | ||
"provider": { | ||
"fromEnvVar": null, | ||
"value": "prisma-client-js" | ||
}, | ||
"output": { | ||
"value": "/usr/src/app/apps/swap/prisma/client", | ||
"fromEnvVar": null | ||
}, | ||
"config": { | ||
"engineType": "library" | ||
}, | ||
"binaryTargets": [ | ||
{ | ||
"fromEnvVar": null, | ||
"value": "debian-openssl-1.1.x", | ||
"native": true | ||
}, | ||
{ | ||
"fromEnvVar": null, | ||
"value": "linux-musl-openssl-3.0.x" | ||
}, | ||
{ | ||
"fromEnvVar": null, | ||
"value": "debian-openssl-1.1.x" | ||
} | ||
], | ||
"previewFeatures": [], | ||
"sourceFilePath": "/usr/src/app/apps/swap/prisma/schema.prisma", | ||
"isCustomOutput": true | ||
}, | ||
"relativeEnvPaths": { | ||
"rootEnvPath": null | ||
}, | ||
"relativePath": "..", | ||
"clientVersion": "5.21.1", | ||
"engineVersion": "bf0e5e8a04cada8225617067eaa03d041e2bba36", | ||
"datasourceNames": [ | ||
"db" | ||
], | ||
"activeProvider": "postgresql", | ||
"postinstall": false, | ||
"inlineDatasources": { | ||
"db": { | ||
"url": { | ||
"fromEnvVar": "DATABASE_URL", | ||
"value": null | ||
} | ||
} | ||
}, | ||
"inlineSchema": "generator client {\n provider = \"prisma-client-js\"\n output = \"./client\"\n binaryTargets = [\"native\", \"linux-musl-openssl-3.0.x\", \"debian-openssl-1.1.x\"]\n}\n\ndatasource db {\n provider = \"postgresql\"\n url = env(\"DATABASE_URL\")\n}\n\nmodel MpesaOnrampSwap {\n /// Unique identifier for the swap\n id String @id @default(uuid())\n /// Tracks progress of the swap\n state SwapTransactionState\n /// References the user who made the transaction.\n userId String\n /// References the onramp Mpesa transaction ID.\n mpesaId String @unique\n /// Lightning invoice to pay.\n lightning String\n /// Fx Rate\n rate String\n /// Retry count tracker\n retryCount Int\n /// Timestamps\n createdAt DateTime @default(now())\n updatedAt DateTime @updatedAt\n}\n\nenum SwapTransactionState {\n PENDING\n PROCESSING\n FAILED\n COMPLETE\n RETRY\n}\n\nmodel IntasendMpesaTransaction {\n id String @id @default(uuid())\n state SwapTransactionState\n apiRef String\n value String\n charges String\n netAmount String\n currency String\n account String\n retryCount Int\n createdAt String\n updatedAt String\n}\n", | ||
"inlineSchemaHash": "5d0a756630ab4cb854d4906bebde4468586658974e57be5cac61985ff3dc9eb2", | ||
"copyEngine": true | ||
} | ||
config.dirname = '/' | ||
|
||
config.runtimeDataModel = JSON.parse("{\"models\":{\"MpesaOnrampSwap\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Unique identifier for the swap\"},{\"name\":\"state\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SwapTransactionState\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Tracks progress of the swap\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"References the user who made the transaction.\"},{\"name\":\"mpesaId\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":true,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"References the onramp Mpesa transaction ID.\"},{\"name\":\"lightning\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Lightning invoice to pay.\"},{\"name\":\"rate\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Fx Rate\"},{\"name\":\"retryCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Retry count tracker\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"DateTime\",\"default\":{\"name\":\"now\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false,\"documentation\":\"Timestamps\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"DateTime\",\"isGenerated\":false,\"isUpdatedAt\":true}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false},\"IntasendMpesaTransaction\":{\"dbName\":null,\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":true,\"isReadOnly\":false,\"hasDefaultValue\":true,\"type\":\"String\",\"default\":{\"name\":\"uuid(4)\",\"args\":[]},\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"state\",\"kind\":\"enum\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"SwapTransactionState\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"apiRef\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"value\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"charges\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"netAmount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"currency\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"account\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"retryCount\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"Int\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"isList\":false,\"isRequired\":true,\"isUnique\":false,\"isId\":false,\"isReadOnly\":false,\"hasDefaultValue\":false,\"type\":\"String\",\"isGenerated\":false,\"isUpdatedAt\":false}],\"primaryKey\":null,\"uniqueFields\":[],\"uniqueIndexes\":[],\"isGenerated\":false}},\"enums\":{\"SwapTransactionState\":{\"values\":[{\"name\":\"PENDING\",\"dbName\":null},{\"name\":\"PROCESSING\",\"dbName\":null},{\"name\":\"FAILED\",\"dbName\":null},{\"name\":\"COMPLETE\",\"dbName\":null},{\"name\":\"RETRY\",\"dbName\":null}],\"dbName\":null}},\"types\":{}}") | ||
defineDmmfProperty(exports.Prisma, config.runtimeDataModel) | ||
config.engineWasm = undefined | ||
|
||
config.injectableEdgeEnv = () => ({ | ||
parsed: { | ||
DATABASE_URL: typeof globalThis !== 'undefined' && globalThis['DATABASE_URL'] || typeof process !== 'undefined' && process.env && process.env.DATABASE_URL || undefined | ||
} | ||
}) | ||
|
||
if (typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) { | ||
Debug.enable(typeof globalThis !== 'undefined' && globalThis['DEBUG'] || typeof process !== 'undefined' && process.env && process.env.DEBUG || undefined) | ||
} | ||
|
||
const PrismaClient = getPrismaClient(config) | ||
exports.PrismaClient = PrismaClient | ||
Object.assign(exports, Prisma) | ||
|
Oops, something went wrong.