@vrplatform/kysely 1.3.45-stage.6299 → 1.3.45-stage.63
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/build/.data.tar +0 -0
- package/build/main/control-plane/index.d.ts +260 -0
- package/build/main/control-plane/index.js.map +1 -1
- package/build/main/index.d.ts +2 -2
- package/build/main/index.js +100 -20
- package/build/main/index.js.map +1 -1
- package/build/main/local/generate.js +1 -0
- package/build/main/local/generate.js.map +1 -1
- package/build/main/local/index.js +12 -0
- package/build/main/local/index.js.map +1 -1
- package/build/main/test/index.d.ts +0 -3
- package/build/main/test/index.js +0 -9
- package/build/main/test/index.js.map +1 -1
- package/build/main/v1.generated.d.ts +242 -0
- package/build/main/v1.generated.js.map +1 -1
- package/build/migrations-v2/0000000000015-durable-flow-events.ts +163 -0
- package/build/migrations-v2/0000000000016-billing-listing-facts.ts +539 -0
- package/build/migrations-v2/0000000000017-webhook-secret-reencryption-failures.ts +18 -0
- package/build/migrations-v2/0000000000018-durable-flow-event-sensitive-input.ts +28 -0
- package/build/migrations-v2/0000000000019-asynchronous-operations.ts +736 -0
- package/build/migrations-v2/0000000000023-line-classification-usage.ts +325 -0
- package/build/migrations-v2/0000000000024-tenant-region-migration.ts +108 -0
- package/build/migrations-v2/0000000000025-partner-ach-denial-default.ts +30 -0
- package/build/migrations-v2/0000000000026-line-classification-usage-capture.ts +399 -0
- package/build/migrations-v2/0000000000027-payout-replacement-chain.ts +27 -0
- package/build/migrations-v2/0000000000028-accounting-integrity-operator-workflow.ts +108 -0
- package/build/migrations-v2/0000000000029-accounting-integrity-definition-artifacts.ts +40 -0
- package/build/migrations-v2/0000000000030-accounting-integrity-review-metadata-compatibility.ts +49 -0
- package/build/migrations-v2/0000000000031-ui-permission-role-simplification.ts +70 -0
- package/build/migrations-v2/0000000000032-tenant-delete-ownership-cascades.ts +44 -0
- package/build/module/control-plane/index.d.ts +260 -0
- package/build/module/control-plane/index.js.map +1 -1
- package/build/module/index.d.ts +2 -2
- package/build/module/index.js +102 -21
- package/build/module/index.js.map +1 -1
- package/build/module/local/generate.js +1 -0
- package/build/module/local/generate.js.map +1 -1
- package/build/module/local/index.js +12 -0
- package/build/module/local/index.js.map +1 -1
- package/build/module/test/index.d.ts +0 -3
- package/build/module/test/index.js +0 -9
- package/build/module/test/index.js.map +1 -1
- package/build/module/v1.generated.d.ts +242 -0
- package/build/module/v1.generated.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.js","sourceRoot":"src/","sources":["local/generate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+HA,8CA6BC;AA5JD,qCAAyC;AACzC,+CAA0C;AAC1C,gDAAkC;AAClC,yCAAiC;AACjC,iDAA8C;AAC9C,mCAAsE;AACtE,oEAAqC;AACrC,iEAAsD;AACtD,4CAAiD;AACjD,wCAAuC;AAGvC,KAAK,UAAU,uBAAuB,CAAC,IAAY;IACjD,MAAM,OAAO,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,qBAAqB,CAAC,CAAC;IACvD,MAAM,OAAO,GAAG,MAAM,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/C,MAAM,IAAI,GAAG,OAAO;SACjB,OAAO,CACN,yEAAyE,EACzE,kFAAkF,CACnF;SACA,OAAO,CACN,2CAA2C,EAC3C,uDAAuD,CACxD;SACA,OAAO,CAAC,mBAAmB,EAAE,8BAA8B,CAAC,CAAC;IAEhE,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACrB,MAAM,GAAG,CAAC,KAAK,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;IACjC,CAAC;AACH,CAAC;AAED,KAAK,UAAU,OAAO,CAAC,IAAY,EAAE,MAAc;IACjD,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,CAAC;IACrC,MAAM,IAAI,GAAG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;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;IACD,OAAO,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;AAC5B,CAAC;AAEM,KAAK,UAAU,iBAAiB,CAAC,IAAY,EAAE,QAAgB;IACpE,IAAI,WAAW,GAAG,KAAK,CAAC;IACxB,gCAAgC;IAEhC,MAAM,IAAI,GAAG,MAAM,YAAY,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAEhD,MAAM,MAAM,GAAG,IAAI,eAAM,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC;IACjD,UAAU;IACV,MAAM,MAAM,CAAC,GAAG,CAAA,UAAU,CAAC;IAC3B,MAAM,OAAO,GAAG,IAAI,qCAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAA,mBAAS,EAAC,OAAO,EAAE;QAChC,cAAc,EAAE,cAAc;QAC9B,GAAG,EAAE,SAAS;KACf,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,OAAO,GAAG,KAAK,IAAI,EAAE;QAC1B,IAAI,WAAW;YAAE,OAAO;QACxB,WAAW,GAAG,IAAI,CAAC;QACnB,yCAAyC;QACzC,MAAM,eAAe,EAAE,CAAC;QACxB,cAAc;QACd,0EAA0E;QAC1E,IAAI;IACN,CAAC,CAAC;IAEF,iFAAiF;IAEjF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { promises as fs } from 'node:fs';\nimport { exists } from 'node:fs/promises';\nimport * as path from 'node:path';\nimport { join } from 'node:path';\nimport { PGlite } from '@electric-sql/pglite';\nimport { FileMigrationProvider, type Kysely, Migrator } from 'kysely';\nimport codegen from 'kysely-codegen';\nimport { PGliteDialect } from 'kysely-pglite-dialect';\nimport { appMigrationEpoch } from '../migration';\nimport { getKysely } from '../plugins';\nimport type { DB } from '../v1.generated';\n\nasync function normalizeGeneratedTypes(root: string) {\n const outFile = path.join(root, 'src/v1.generated.ts');\n const current = await Bun.file(outFile).text();\n const next = current\n .replace(\n 'export type Timestamp = ColumnType<Date, Date | string, Date | string>;',\n 'export type Timestamp = ColumnType<Date | string, Date | string, Date | string>;'\n )\n .replace(\n ' managedTeamAccess: Generated<string>;\\n',\n ' managedTeamAccess: Generated<\"all\" | \"assigned\">;\\n'\n )\n .replace(' slug: string;\\n', ' slug: Generated<string>;\\n');\n\n if (next !== current) {\n await Bun.write(outFile, next);\n }\n}\n\nasync function migrate(root: string, client: PGlite) {\n console.log('migrating pglite ....');\n const glob = new Bun.Glob('initial/*.sql');\n for await (const migration of glob.scan(root)) {\n const raw = await Bun.file(join(root, migration)).text();\n // `pg_dump` (v17+) prepends `\\restrict`/`\\unrestrict` psql meta commands\n // which PostgreSQL-compatible parsers (like PGlite) cannot execute.\n const sanitized = raw.replace(/^\\s*\\\\(?:un)?restrict.*$/gim, '');\n await client.exec(sanitized);\n }\n}\n\nasync function migrateKysely(root: string, kysely: Kysely<DB>) {\n console.log('init migrating kysely ....');\n const migrator = new Migrator({\n db: kysely,\n migrationTableSchema: appMigrationEpoch.tableSchema,\n migrationTableName: appMigrationEpoch.tableName,\n migrationLockTableName: appMigrationEpoch.lockTableName,\n provider: new FileMigrationProvider({\n fs,\n path,\n // This needs to be an absolute path.\n migrationFolder: path.join(root, appMigrationEpoch.folder),\n }),\n });\n\n console.log('migrating kysely ....');\n const { error, results } = await migrator.migrateToLatest().catch(() => {\n console.error('failed to migrate');\n process.exit(1);\n });\n\n for (const it of results ?? []) {\n if (it.status === 'Success') {\n console.log(`migration \"${it.migrationName}\" was executed successfully`);\n } else if (it.status === 'Error') {\n console.error(`failed to execute migration \"${it.migrationName}\"`);\n }\n }\n\n if (error) {\n console.error('failed to migrate');\n console.error(error);\n process.exit(1);\n }\n}\n\nasync function generateDump(root: string, dumpPath: string) {\n const dataExists = await exists(dumpPath).catch(() => false);\n if (!dataExists) {\n console.log('Creating initial dump');\n const main = new PGlite();\n await migrate(root, main).catch(async (err) => {\n console.error('failed to migrate initial dump');\n await Bun.write(\n '../logs/migrate-initial-dump.json',\n JSON.stringify(err as any, null, 2)\n );\n process.exit(1);\n });\n const dialect = new PGliteDialect(main);\n const kysely = getKysely(dialect, {\n repositoryName: 'localTesting',\n log: undefined,\n });\n await migrateKysely(root, kysely).catch(() => {\n console.error('failed to migrate kysely');\n process.exit(1);\n });\n await codegen\n .generate({\n db: kysely,\n outFile: path.join(root, 'src/v1.generated.ts'),\n defaultSchemas: ['xxx'],\n camelCase: true,\n dialect: codegen.getDialect('postgres'),\n })\n .catch(() => {\n console.error('failed to generate kysely');\n process.exit(1);\n });\n await normalizeGeneratedTypes(root);\n const content = await main.dumpDataDir('none').catch(() => {\n console.error('failed to dump data');\n process.exit(1);\n });\n await Bun.write(dumpPath, content).catch(() => {\n console.error('failed to write dump');\n process.exit(1);\n });\n return content;\n }\n return Bun.file(dumpPath);\n}\n\nexport async function createLocalKysely(root: string, dumpPath: string) {\n let isDestroyed = false;\n //const now = performance.now();\n\n const dump = await generateDump(root, dumpPath);\n\n const pglite = new PGlite({ loadDataDir: dump });\n // warm up\n await pglite.sql`SELECT 1`;\n const dialect = new PGliteDialect(pglite);\n const kysely = getKysely(dialect, {\n repositoryName: 'localTesting',\n log: undefined,\n });\n\n const originalDestroy = kysely.destroy.bind(kysely);\n kysely.destroy = async () => {\n if (isDestroyed) return;\n isDestroyed = true;\n // const destroyTime = performance.now();\n await originalDestroy();\n //console.log(\n // `Database destroyed: ${Math.round(performance.now() - destroyTime)}ms`\n //);\n };\n\n // console.log(`Database initialized: ${Math.round(performance.now() - now)}ms`);\n\n return kysely;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"generate.js","sourceRoot":"src/","sources":["local/generate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgIA,8CA6BC;AA7JD,qCAAyC;AACzC,+CAA0C;AAC1C,g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CAAa,CAAC,MAAM,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAA,mBAAS,EAAC,OAAO,EAAE;QAChC,cAAc,EAAE,cAAc;QAC9B,GAAG,EAAE,SAAS;KACf,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,OAAO,GAAG,KAAK,IAAI,EAAE;QAC1B,IAAI,WAAW;YAAE,OAAO;QACxB,WAAW,GAAG,IAAI,CAAC;QACnB,yCAAyC;QACzC,MAAM,eAAe,EAAE,CAAC;QACxB,cAAc;QACd,0EAA0E;QAC1E,IAAI;IACN,CAAC,CAAC;IAEF,iFAAiF;IAEjF,OAAO,MAAM,CAAC;AAChB,CAAC","sourcesContent":["import { promises as fs } from 'node:fs';\nimport { exists } from 'node:fs/promises';\nimport * as path from 'node:path';\nimport { join } from 'node:path';\nimport { PGlite } from '@electric-sql/pglite';\nimport { FileMigrationProvider, type Kysely, Migrator } from 'kysely';\nimport codegen from 'kysely-codegen';\nimport { PGliteDialect } from 'kysely-pglite-dialect';\nimport { appMigrationEpoch } from '../migration';\nimport { getKysely } from '../plugins';\nimport type { DB } from '../v1.generated';\n\nasync function normalizeGeneratedTypes(root: string) {\n const outFile = path.join(root, 'src/v1.generated.ts');\n const current = await Bun.file(outFile).text();\n const next = current\n .replace(\n 'export type Timestamp = ColumnType<Date, Date | string, Date | string>;',\n 'export type Timestamp = ColumnType<Date | string, Date | string, Date | string>;'\n )\n .replace(\n ' managedTeamAccess: Generated<string>;\\n',\n ' managedTeamAccess: Generated<\"all\" | \"assigned\">;\\n'\n )\n .replace(' slug: string;\\n', ' slug: Generated<string>;\\n');\n\n if (next !== current) {\n await Bun.write(outFile, next);\n }\n}\n\nasync function migrate(root: string, client: PGlite) {\n console.log('migrating pglite ....');\n const glob = new Bun.Glob('initial/*.sql');\n for await (const migration of glob.scan(root)) {\n const raw = await Bun.file(join(root, migration)).text();\n // `pg_dump` (v17+) prepends `\\restrict`/`\\unrestrict` psql meta commands\n // which PostgreSQL-compatible parsers (like PGlite) cannot execute.\n const sanitized = raw.replace(/^\\s*\\\\(?:un)?restrict.*$/gim, '');\n await client.exec(sanitized);\n }\n}\n\nasync function migrateKysely(root: string, kysely: Kysely<DB>) {\n console.log('init migrating kysely ....');\n const migrator = new Migrator({\n allowUnorderedMigrations: true,\n db: kysely,\n migrationTableSchema: appMigrationEpoch.tableSchema,\n migrationTableName: appMigrationEpoch.tableName,\n migrationLockTableName: appMigrationEpoch.lockTableName,\n provider: new FileMigrationProvider({\n fs,\n path,\n // This needs to be an absolute path.\n migrationFolder: path.join(root, appMigrationEpoch.folder),\n }),\n });\n\n console.log('migrating kysely ....');\n const { error, results } = await migrator.migrateToLatest().catch(() => {\n console.error('failed to migrate');\n process.exit(1);\n });\n\n for (const it of results ?? []) {\n if (it.status === 'Success') {\n console.log(`migration \"${it.migrationName}\" was executed successfully`);\n } else if (it.status === 'Error') {\n console.error(`failed to execute migration \"${it.migrationName}\"`);\n }\n }\n\n if (error) {\n console.error('failed to migrate');\n console.error(error);\n process.exit(1);\n }\n}\n\nasync function generateDump(root: string, dumpPath: string) {\n const dataExists = await exists(dumpPath).catch(() => false);\n if (!dataExists) {\n console.log('Creating initial dump');\n const main = new PGlite();\n await migrate(root, main).catch(async (err) => {\n console.error('failed to migrate initial dump');\n await Bun.write(\n '../logs/migrate-initial-dump.json',\n JSON.stringify(err as any, null, 2)\n );\n process.exit(1);\n });\n const dialect = new PGliteDialect(main);\n const kysely = getKysely(dialect, {\n repositoryName: 'localTesting',\n log: undefined,\n });\n await migrateKysely(root, kysely).catch(() => {\n console.error('failed to migrate kysely');\n process.exit(1);\n });\n await codegen\n .generate({\n db: kysely,\n outFile: path.join(root, 'src/v1.generated.ts'),\n defaultSchemas: ['xxx'],\n camelCase: true,\n dialect: codegen.getDialect('postgres'),\n })\n .catch(() => {\n console.error('failed to generate kysely');\n process.exit(1);\n });\n await normalizeGeneratedTypes(root);\n const content = await main.dumpDataDir('none').catch(() => {\n console.error('failed to dump data');\n process.exit(1);\n });\n await Bun.write(dumpPath, content).catch(() => {\n console.error('failed to write dump');\n process.exit(1);\n });\n return content;\n }\n return Bun.file(dumpPath);\n}\n\nexport async function createLocalKysely(root: string, dumpPath: string) {\n let isDestroyed = false;\n //const now = performance.now();\n\n const dump = await generateDump(root, dumpPath);\n\n const pglite = new PGlite({ loadDataDir: dump });\n // warm up\n await pglite.sql`SELECT 1`;\n const dialect = new PGliteDialect(pglite);\n const kysely = getKysely(dialect, {\n repositoryName: 'localTesting',\n log: undefined,\n });\n\n const originalDestroy = kysely.destroy.bind(kysely);\n kysely.destroy = async () => {\n if (isDestroyed) return;\n isDestroyed = true;\n // const destroyTime = performance.now();\n await originalDestroy();\n //console.log(\n // `Database destroyed: ${Math.round(performance.now() - destroyTime)}ms`\n //);\n };\n\n // console.log(`Database initialized: ${Math.round(performance.now() - now)}ms`);\n\n return kysely;\n}\n"]}
|
|
@@ -48,6 +48,7 @@ exports.root = path.join(__dirname, '../..');
|
|
|
48
48
|
exports.dumpPath = path.join(exports.root, '.data.tar');
|
|
49
49
|
async function migrateToLatest(kysely) {
|
|
50
50
|
const migrator = new kysely_1.Migrator({
|
|
51
|
+
allowUnorderedMigrations: true,
|
|
51
52
|
db: kysely,
|
|
52
53
|
migrationTableSchema: migration_1.appMigrationEpoch.tableSchema,
|
|
53
54
|
migrationTableName: migration_1.appMigrationEpoch.tableName,
|
|
@@ -100,6 +101,7 @@ async function useLocalKysely(args = {}) {
|
|
|
100
101
|
if (controlPlaneMigrationError) {
|
|
101
102
|
throw controlPlaneMigrationError;
|
|
102
103
|
}
|
|
104
|
+
await (0, kysely_1.sql) `alter table core.flow set schema public`.execute(controlPlaneBootstrapKysely);
|
|
103
105
|
await (0, kysely_1.sql) `alter table core.issue_message_overwrite set schema public`.execute(controlPlaneBootstrapKysely);
|
|
104
106
|
await (0, kysely_1.sql) `drop schema core`.execute(controlPlaneBootstrapKysely);
|
|
105
107
|
await (0, kysely_1.sql) `alter schema public rename to control_plane`.execute(controlPlaneBootstrapKysely);
|
|
@@ -119,6 +121,16 @@ async function useLocalKysely(args = {}) {
|
|
|
119
121
|
'control_plane.build_unique_tenant_slug(text,uuid)'::regprocedure
|
|
120
122
|
) into definition;
|
|
121
123
|
execute replace(definition, 'public.', 'control_plane.');
|
|
124
|
+
|
|
125
|
+
select pg_get_functiondef(
|
|
126
|
+
'control_plane.refresh_operation_state(uuid)'::regprocedure
|
|
127
|
+
) into definition;
|
|
128
|
+
execute replace(definition, 'public.', 'control_plane.');
|
|
129
|
+
|
|
130
|
+
select pg_get_functiondef(
|
|
131
|
+
'control_plane.refresh_destructive_job_operation()'::regprocedure
|
|
132
|
+
) into definition;
|
|
133
|
+
execute replace(definition, 'public.', 'control_plane.');
|
|
122
134
|
end;
|
|
123
135
|
$$;
|
|
124
136
|
`.execute(controlPlaneBootstrapKysely);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["local/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,wCAkQC;AA/SD,qCAAyC;AACzC,gDAAkC;AAClC,iDAA8C;AAC9C,mCAA8E;AAC9E,iEAAsD;AACtD,oDAA+E;AAE/E,4CAAiD;AACjD,wCAAuC;AAEvC,qCAA8E;AAEjE,QAAA,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACrC,QAAA,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,YAAI,EAAE,WAAW,CAAC,CAAC;AAWrD,KAAK,UAAU,eAAe,CAC5B,MAAyC;IAEzC,MAAM,QAAQ,GAAG,IAAI,iBAAQ,CAAC;QAC5B,EAAE,EAAE,MAAM;QACV,oBAAoB,EAAE,6BAAiB,CAAC,WAAW;QACnD,kBAAkB,EAAE,6BAAiB,CAAC,SAAS;Q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I;IACN,CAAC,CAAC;IAEF,iFAAiF;IAEjF,OAAO,MAAqB,CAAC;AAC/B,CAAC","sourcesContent":["import { promises as fs } from 'node:fs';\nimport * as path from 'node:path';\nimport { PGlite } from '@electric-sql/pglite';\nimport { FileMigrationProvider, type LogConfig, Migrator, sql } from 'kysely';\nimport { PGliteDialect } from 'kysely-pglite-dialect';\nimport { type ControlPlaneDB, withControlPlaneSchema } from '../control-plane';\nimport type { ControlPlaneKysely } from '../index';\nimport { appMigrationEpoch } from '../migration';\nimport { getKysely } from '../plugins';\nimport type { DB } from '../v1.generated';\nimport { ensureDigestFunction, ensureGenRandomBytesFunction } from './digest';\n\nexport const root = path.join(__dirname, '../..');\nexport const dumpPath = path.join(root, '.data.tar');\n\nexport type UseLocalKyselyOptions = {\n repositoryName?: string;\n log?: true | LogConfig;\n};\n\nexport type LocalKysely = import('kysely').Kysely<DB> & {\n controlPlaneKysely: ControlPlaneKysely;\n};\n\nasync function migrateToLatest<Database>(\n kysely: import('kysely').Kysely<Database>\n) {\n const migrator = new Migrator({\n db: kysely,\n migrationTableSchema: appMigrationEpoch.tableSchema,\n migrationTableName: appMigrationEpoch.tableName,\n migrationLockTableName: appMigrationEpoch.lockTableName,\n provider: new FileMigrationProvider({\n fs,\n path,\n migrationFolder: path.join(root, appMigrationEpoch.folder),\n }),\n });\n\n const { error } = await migrator.migrateToLatest();\n if (error) {\n throw error;\n }\n}\n\nexport async function useLocalKysely(\n args: UseLocalKyselyOptions = {}\n): Promise<LocalKysely> {\n let isDestroyed = false;\n // const now = performance.now();\n\n const dump = Bun.file(dumpPath);\n\n const pglite = new PGlite({\n loadDataDir: dump,\n });\n const dialect = new PGliteDialect(pglite);\n const kysely = getKysely<DB>(dialect, {\n repositoryName: args?.repositoryName ?? 'localTesting',\n log: args?.log,\n });\n await ensureDigestFunction(kysely);\n await ensureGenRandomBytesFunction(kysely);\n await migrateToLatest(kysely);\n\n await sql`alter schema public rename to regional_public`.execute(kysely);\n await sql`alter schema core rename to regional_core`.execute(kysely);\n await sql`create schema public`.execute(kysely);\n await sql`create schema core`.execute(kysely);\n\n const controlPlaneBootstrapKysely = getKysely<ControlPlaneDB>(dialect, {\n repositoryName: `${args.repositoryName ?? 'localTesting'}/control-plane-bootstrap`,\n });\n const controlPlaneMigrator = new Migrator({\n db: controlPlaneBootstrapKysely,\n migrationTableSchema: 'public',\n migrationTableName: 'control_plane_kysely_migration',\n migrationLockTableName: 'control_plane_kysely_migration_lock',\n provider: new FileMigrationProvider({\n fs,\n path,\n migrationFolder: path.join(root, 'control-plane-migrations'),\n }),\n });\n const { error: controlPlaneMigrationError } =\n await controlPlaneMigrator.migrateToLatest();\n if (controlPlaneMigrationError) {\n throw controlPlaneMigrationError;\n }\n\n await sql`alter table core.issue_message_overwrite set schema public`.execute(\n controlPlaneBootstrapKysely\n );\n await sql`drop schema core`.execute(controlPlaneBootstrapKysely);\n await sql`alter schema public rename to control_plane`.execute(\n controlPlaneBootstrapKysely\n );\n await sql`alter schema regional_public rename to public`.execute(\n controlPlaneBootstrapKysely\n );\n await sql`alter schema regional_core rename to core`.execute(\n controlPlaneBootstrapKysely\n );\n await sql`\n do $$\n declare\n definition text;\n begin\n select pg_get_functiondef(\n 'control_plane.normalize_tenant_slug(text)'::regprocedure\n ) into definition;\n execute replace(definition, 'public.', 'control_plane.');\n\n select pg_get_functiondef(\n 'control_plane.build_unique_tenant_slug(text,uuid)'::regprocedure\n ) into definition;\n execute replace(definition, 'public.', 'control_plane.');\n end;\n $$;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.app (\n authentication,\n category,\n color,\n created_at,\n icon,\n icon_round,\n id,\n info,\n name,\n type,\n version\n )\n select\n authentication,\n category,\n color,\n created_at,\n icon,\n icon_round,\n id,\n info,\n name,\n type,\n version\n from public.app\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.currency (name)\n select name\n from public.currency\n on conflict (name) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.booking_channel (\n channel_ref,\n color,\n created_at,\n icon,\n icon_provider,\n id,\n last_generate_run,\n logo,\n logo_provider,\n selected_booking_channel_icon_candidate_id,\n selected_booking_channel_logo_candidate_id,\n unique_ref,\n updated_at\n )\n select\n channel_ref,\n color,\n created_at,\n icon,\n icon_provider,\n id,\n last_generate_run,\n logo,\n logo_provider,\n selected_booking_channel_icon_candidate_id,\n selected_booking_channel_logo_candidate_id,\n unique_ref,\n updated_at\n from public.booking_channel\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.booking_channel_icon_candidate (\n booking_channel_id,\n cloudflare_image_id,\n color,\n comment,\n created_at,\n external_icon,\n height,\n id,\n provider,\n source,\n updated_at,\n width\n )\n select\n booking_channel_id,\n cloudflare_image_id,\n color,\n comment,\n created_at,\n external_icon,\n height,\n id,\n provider,\n source,\n updated_at,\n width\n from public.booking_channel_icon_candidate\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.tenant (\n billing_partner_id,\n billing_plan,\n created_at,\n data_region,\n id,\n name,\n partner_id,\n slug,\n status,\n storage_realm,\n type,\n unique_ref,\n updated_at\n )\n select\n billing_partner_id,\n billing_plan,\n created_at,\n data_region,\n id,\n name,\n partner_id,\n slug,\n status,\n storage_realm,\n type,\n unique_ref,\n updated_at\n from public.tenant\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.token (\n created_at,\n expires_at,\n id,\n nano_id,\n payload,\n tenant_id,\n type,\n user_id\n )\n select\n created_at,\n expires_at,\n id,\n nano_id,\n payload,\n tenant_id,\n type,\n user_id\n from public.token\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n\n const controlPlaneKysely = withControlPlaneSchema(\n getKysely<ControlPlaneDB>(dialect, {\n repositoryName: `${args.repositoryName ?? 'localTesting'}/control-plane`,\n log: args.log,\n }),\n 'control_plane',\n 'control_plane'\n );\n controlPlaneKysely.destroy = async () => {};\n Object.defineProperty(kysely, 'controlPlaneKysely', {\n value: controlPlaneKysely,\n });\n\n const originalDestroy = kysely.destroy.bind(kysely);\n kysely.destroy = async () => {\n if (isDestroyed) return;\n isDestroyed = true;\n //const destroyTime = performance.now();\n await originalDestroy();\n //console.log(\n // `Database destroyed: ${Math.round(performance.now() - destroyTime)}ms`\n //);\n };\n\n // console.log(`Database initialized: ${Math.round(performance.now() - now)}ms`);\n\n return kysely as LocalKysely;\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["local/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,wCA+QC;AA7TD,qCAAyC;AACzC,gDAAkC;AAClC,iDAA8C;AAC9C,mCAA8E;AAC9E,iEAAsD;AACtD,oDAA+E;AAE/E,4CAAiD;AACjD,wCAAuC;AAEvC,qCAA8E;AAEjE,QAAA,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;AACrC,QAAA,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,YAAI,EAAE,WAAW,CAAC,CAAC;AAWrD,KAAK,UAAU,eAAe,CAC5B,MAAyC;IAEzC,MAAM,QAAQ,GAAG,IAAI,iBAAQ,CAAC;QAC5B,wBAAwB,EAAE,IAAI;QAC9B,EAAE,EAAE,MAAM;QACV,oBAAoB,EAAE,6BAAiB,CAAC,WAAW;QACnD,kBAAkB,EAAE,6BAAiB,CAAC,SAAS;QAC/C,sBAAsB,EAAE,6BAAiB,CAAC,aAAa;QACvD,QAAQ,EAAE,IAAI,8BAAqB,CAAC;YAClC,EAAE,EAAF,kBAAE;YACF,IAAI;YACJ,eAAe,EAAE,IAAI,CAAC,IAAI,CAAC,YAAI,EAAE,6BAAiB,CAAC,MAAM,CAAC;SAC3D,CAAC;KACH,CAAC,CAAC;IAEH,MAAM,EAAE,KAAK,E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;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCR,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACvC,MAAM,IAAA,YAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BR,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACvC,MAAM,IAAA,YAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCR,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACvC,MAAM,IAAA,YAAG,EAAA;;;;;;;;;;;;;;;;;;;;;;GAsBR,CAAC,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAEvC,MAAM,kBAAkB,GAAG,IAAA,sCAAsB,EAC/C,IAAA,mBAAS,EAAiB,OAAO,EAAE;QACjC,cAAc,EAAE,GAAG,IAAI,CAAC,cAAc,IAAI,cAAc,gBAAgB;QACxE,GAAG,EAAE,IAAI,CAAC,GAAG;KACd,CAAC,EACF,eAAe,EACf,eAAe,CAChB,CAAC;IACF,kBAAkB,CAAC,OAAO,GAAG,KAAK,IAAI,EAAE,GAAE,CAAC,CAAC;IAC5C,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,oBAAoB,EAAE;QAClD,KAAK,EAAE,kBAAkB;KAC1B,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACpD,MAAM,CAAC,OAAO,GAAG,KAAK,IAAI,EAAE;QAC1B,IAAI,WAAW;YAAE,OAAO;QACxB,WAAW,GAAG,IAAI,CAAC;QACnB,wCAAwC;QACxC,MAAM,eAAe,EAAE,CAAC;QACxB,cAAc;QACd,0EAA0E;QAC1E,IAAI;IACN,CAAC,CAAC;IAEF,iFAAiF;IAEjF,OAAO,MAAqB,CAAC;AAC/B,CAAC","sourcesContent":["import { promises as fs } from 'node:fs';\nimport * as path from 'node:path';\nimport { PGlite } from '@electric-sql/pglite';\nimport { FileMigrationProvider, type LogConfig, Migrator, sql } from 'kysely';\nimport { PGliteDialect } from 'kysely-pglite-dialect';\nimport { type ControlPlaneDB, withControlPlaneSchema } from '../control-plane';\nimport type { ControlPlaneKysely } from '../index';\nimport { appMigrationEpoch } from '../migration';\nimport { getKysely } from '../plugins';\nimport type { DB } from '../v1.generated';\nimport { ensureDigestFunction, ensureGenRandomBytesFunction } from './digest';\n\nexport const root = path.join(__dirname, '../..');\nexport const dumpPath = path.join(root, '.data.tar');\n\nexport type UseLocalKyselyOptions = {\n repositoryName?: string;\n log?: true | LogConfig;\n};\n\nexport type LocalKysely = import('kysely').Kysely<DB> & {\n controlPlaneKysely: ControlPlaneKysely;\n};\n\nasync function migrateToLatest<Database>(\n kysely: import('kysely').Kysely<Database>\n) {\n const migrator = new Migrator({\n allowUnorderedMigrations: true,\n db: kysely,\n migrationTableSchema: appMigrationEpoch.tableSchema,\n migrationTableName: appMigrationEpoch.tableName,\n migrationLockTableName: appMigrationEpoch.lockTableName,\n provider: new FileMigrationProvider({\n fs,\n path,\n migrationFolder: path.join(root, appMigrationEpoch.folder),\n }),\n });\n\n const { error } = await migrator.migrateToLatest();\n if (error) {\n throw error;\n }\n}\n\nexport async function useLocalKysely(\n args: UseLocalKyselyOptions = {}\n): Promise<LocalKysely> {\n let isDestroyed = false;\n // const now = performance.now();\n\n const dump = Bun.file(dumpPath);\n\n const pglite = new PGlite({\n loadDataDir: dump,\n });\n const dialect = new PGliteDialect(pglite);\n const kysely = getKysely<DB>(dialect, {\n repositoryName: args?.repositoryName ?? 'localTesting',\n log: args?.log,\n });\n await ensureDigestFunction(kysely);\n await ensureGenRandomBytesFunction(kysely);\n await migrateToLatest(kysely);\n\n await sql`alter schema public rename to regional_public`.execute(kysely);\n await sql`alter schema core rename to regional_core`.execute(kysely);\n await sql`create schema public`.execute(kysely);\n await sql`create schema core`.execute(kysely);\n\n const controlPlaneBootstrapKysely = getKysely<ControlPlaneDB>(dialect, {\n repositoryName: `${args.repositoryName ?? 'localTesting'}/control-plane-bootstrap`,\n });\n const controlPlaneMigrator = new Migrator({\n db: controlPlaneBootstrapKysely,\n migrationTableSchema: 'public',\n migrationTableName: 'control_plane_kysely_migration',\n migrationLockTableName: 'control_plane_kysely_migration_lock',\n provider: new FileMigrationProvider({\n fs,\n path,\n migrationFolder: path.join(root, 'control-plane-migrations'),\n }),\n });\n const { error: controlPlaneMigrationError } =\n await controlPlaneMigrator.migrateToLatest();\n if (controlPlaneMigrationError) {\n throw controlPlaneMigrationError;\n }\n\n await sql`alter table core.flow set schema public`.execute(\n controlPlaneBootstrapKysely\n );\n await sql`alter table core.issue_message_overwrite set schema public`.execute(\n controlPlaneBootstrapKysely\n );\n await sql`drop schema core`.execute(controlPlaneBootstrapKysely);\n await sql`alter schema public rename to control_plane`.execute(\n controlPlaneBootstrapKysely\n );\n await sql`alter schema regional_public rename to public`.execute(\n controlPlaneBootstrapKysely\n );\n await sql`alter schema regional_core rename to core`.execute(\n controlPlaneBootstrapKysely\n );\n await sql`\n do $$\n declare\n definition text;\n begin\n select pg_get_functiondef(\n 'control_plane.normalize_tenant_slug(text)'::regprocedure\n ) into definition;\n execute replace(definition, 'public.', 'control_plane.');\n\n select pg_get_functiondef(\n 'control_plane.build_unique_tenant_slug(text,uuid)'::regprocedure\n ) into definition;\n execute replace(definition, 'public.', 'control_plane.');\n\n select pg_get_functiondef(\n 'control_plane.refresh_operation_state(uuid)'::regprocedure\n ) into definition;\n execute replace(definition, 'public.', 'control_plane.');\n\n select pg_get_functiondef(\n 'control_plane.refresh_destructive_job_operation()'::regprocedure\n ) into definition;\n execute replace(definition, 'public.', 'control_plane.');\n end;\n $$;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.app (\n authentication,\n category,\n color,\n created_at,\n icon,\n icon_round,\n id,\n info,\n name,\n type,\n version\n )\n select\n authentication,\n category,\n color,\n created_at,\n icon,\n icon_round,\n id,\n info,\n name,\n type,\n version\n from public.app\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.currency (name)\n select name\n from public.currency\n on conflict (name) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.booking_channel (\n channel_ref,\n color,\n created_at,\n icon,\n icon_provider,\n id,\n last_generate_run,\n logo,\n logo_provider,\n selected_booking_channel_icon_candidate_id,\n selected_booking_channel_logo_candidate_id,\n unique_ref,\n updated_at\n )\n select\n channel_ref,\n color,\n created_at,\n icon,\n icon_provider,\n id,\n last_generate_run,\n logo,\n logo_provider,\n selected_booking_channel_icon_candidate_id,\n selected_booking_channel_logo_candidate_id,\n unique_ref,\n updated_at\n from public.booking_channel\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.booking_channel_icon_candidate (\n booking_channel_id,\n cloudflare_image_id,\n color,\n comment,\n created_at,\n external_icon,\n height,\n id,\n provider,\n source,\n updated_at,\n width\n )\n select\n booking_channel_id,\n cloudflare_image_id,\n color,\n comment,\n created_at,\n external_icon,\n height,\n id,\n provider,\n source,\n updated_at,\n width\n from public.booking_channel_icon_candidate\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.tenant (\n billing_partner_id,\n billing_plan,\n created_at,\n data_region,\n id,\n name,\n partner_id,\n slug,\n status,\n storage_realm,\n type,\n unique_ref,\n updated_at\n )\n select\n billing_partner_id,\n billing_plan,\n created_at,\n data_region,\n id,\n name,\n partner_id,\n slug,\n status,\n storage_realm,\n type,\n unique_ref,\n updated_at\n from public.tenant\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n await sql`\n insert into control_plane.token (\n created_at,\n expires_at,\n id,\n nano_id,\n payload,\n tenant_id,\n type,\n user_id\n )\n select\n created_at,\n expires_at,\n id,\n nano_id,\n payload,\n tenant_id,\n type,\n user_id\n from public.token\n on conflict (id) do nothing;\n `.execute(controlPlaneBootstrapKysely);\n\n const controlPlaneKysely = withControlPlaneSchema(\n getKysely<ControlPlaneDB>(dialect, {\n repositoryName: `${args.repositoryName ?? 'localTesting'}/control-plane`,\n log: args.log,\n }),\n 'control_plane',\n 'control_plane'\n );\n controlPlaneKysely.destroy = async () => {};\n Object.defineProperty(kysely, 'controlPlaneKysely', {\n value: controlPlaneKysely,\n });\n\n const originalDestroy = kysely.destroy.bind(kysely);\n kysely.destroy = async () => {\n if (isDestroyed) return;\n isDestroyed = true;\n //const destroyTime = performance.now();\n await originalDestroy();\n //console.log(\n // `Database destroyed: ${Math.round(performance.now() - destroyTime)}ms`\n //);\n };\n\n // console.log(`Database initialized: ${Math.round(performance.now() - now)}ms`);\n\n return kysely as LocalKysely;\n}\n"]}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
import { type LocalKysely, type UseLocalKyselyOptions } from '../local';
|
|
2
|
-
declare global {
|
|
3
|
-
var __vrplatform_testSharedKysely: Promise<LocalKysely> | LocalKysely | undefined;
|
|
4
|
-
}
|
|
5
2
|
export declare function useTestAutoCleanupKysely(args?: UseLocalKyselyOptions): Promise<LocalKysely>;
|
|
6
3
|
type ReturnType = LocalKysely & {
|
|
7
4
|
[Symbol.dispose]: () => Promise<void>;
|
package/build/main/test/index.js
CHANGED
|
@@ -5,15 +5,6 @@ exports.useLocalKyselyResource = useLocalKyselyResource;
|
|
|
5
5
|
const bun_test_1 = require("bun:test");
|
|
6
6
|
const local_1 = require("../local");
|
|
7
7
|
async function useTestAutoCleanupKysely(args) {
|
|
8
|
-
if (process.env.VR_TEST_SHARED_KYSELY === '1') {
|
|
9
|
-
const existing = globalThis.__vrplatform_testSharedKysely;
|
|
10
|
-
if (!existing) {
|
|
11
|
-
const created = (0, local_1.useLocalKysely)(args);
|
|
12
|
-
globalThis.__vrplatform_testSharedKysely = created;
|
|
13
|
-
return created;
|
|
14
|
-
}
|
|
15
|
-
return await existing;
|
|
16
|
-
}
|
|
17
8
|
const kysely = await (0, local_1.useLocalKysely)(args);
|
|
18
9
|
(0, bun_test_1.afterAll)(async () => {
|
|
19
10
|
await kysely.destroy();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["test/index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["test/index.ts"],"names":[],"mappings":";;AAOA,4DAQC;AAMD,wDAyBC;AA9CD,uCAAoC;AACpC,oCAIkB;AAEX,KAAK,UAAU,wBAAwB,CAAC,IAA4B;IACzE,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAc,EAAC,IAAI,CAAC,CAAC;IAE1C,IAAA,mBAAQ,EAAC,KAAK,IAAI,EAAE;QAClB,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;IACzB,CAAC,CAAC,CAAC;IAEH,OAAO,MAAM,CAAC;AAChB,CAAC;AAMM,KAAK,UAAU,sBAAsB,CAC1C,IAA4B;IAE5B,MAAM,MAAM,GAAG,MAAM,IAAA,sBAAc,EAAC,IAAI,CAAC,CAAC;IAE1C,OAAO,IAAI,KAAK,CACd,EAAE,EACF;QACE,GAAG,CAAC,OAAO,EAAE,IAAI;YACf,8CAA8C;YAC9C,IAAI,IAAI,KAAK,MAAM,CAAC,YAAY,EAAE,CAAC;gBACjC,OAAO,KAAK,IAAI,EAAE;oBAChB,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;gBACzB,CAAC,CAAC;YACJ,CAAC;YACD,IAAI,IAAI,KAAK,QAAQ,EAAE,CAAC;gBACtB,OAAO,MAAM,CAAC;YAChB,CAAC;YACD,IAAI,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,UAAU,EAAE,CAAC;gBACvC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;YACnC,CAAC;YACD,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC;QACtB,CAAC;KACF,CACY,CAAC;AAClB,CAAC","sourcesContent":["import { afterAll } from 'bun:test';\nimport {\n type LocalKysely,\n type UseLocalKyselyOptions,\n useLocalKysely,\n} from '../local';\n\nexport async function useTestAutoCleanupKysely(args?: UseLocalKyselyOptions) {\n const kysely = await useLocalKysely(args);\n\n afterAll(async () => {\n await kysely.destroy();\n });\n\n return kysely;\n}\n\ntype ReturnType = LocalKysely & {\n [Symbol.dispose]: () => Promise<void>;\n};\n\nexport async function useLocalKyselyResource(\n args?: UseLocalKyselyOptions\n): Promise<ReturnType> {\n const kysely = await useLocalKysely(args);\n\n return new Proxy(\n {},\n {\n get(_target, prop) {\n // somehow not working if using Symbol.dispose\n if (prop === Symbol.asyncDispose) {\n return async () => {\n await kysely.destroy();\n };\n }\n if (prop === 'kysely') {\n return kysely;\n }\n if (typeof kysely[prop] === 'function') {\n return kysely[prop].bind(kysely);\n }\n return kysely[prop];\n },\n }\n ) as ReturnType;\n}\n"]}
|
|
@@ -15,6 +15,9 @@ export type AuditJournalDeltaOperation = "delete" | "insert" | "update";
|
|
|
15
15
|
export type AuditPublicEventAccountingStatus = "blocked" | "changed" | "failed" | "mixed" | "not_applicable" | "pending" | "unchanged";
|
|
16
16
|
export type AuditPublicEventOperation = "archive" | "create" | "delete" | "execute" | "recalculate" | "restore" | "update";
|
|
17
17
|
export type AuditSourceType = "api" | "automation" | "integration" | "portal" | "sync" | "system";
|
|
18
|
+
export type BillingListingFactSourceType = "baseline_backfill" | "daily_reconciliation" | "legacy_tracking_import" | "listing_delete" | "listing_insert" | "listing_update" | "ownership_delete" | "ownership_insert" | "ownership_update" | "tenant_delete" | "tenant_insert" | "tenant_update";
|
|
19
|
+
export type CoreFlowEventOperationAction = "abandon" | "replay";
|
|
20
|
+
export type CoreFlowEventStatus = "canceled" | "dead" | "pending" | "processing" | "succeeded";
|
|
18
21
|
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S, I | undefined, U> : ColumnType<T, T | undefined, T>;
|
|
19
22
|
export type HealthAccountingIntegrityActionability = "automatically_repairable" | "blocked" | "code_fix_required" | "manual_repair" | "unknown";
|
|
20
23
|
export type HealthAccountingIntegrityCaseStatus = "open" | "resolved";
|
|
@@ -410,6 +413,7 @@ export interface AccountingTransaction {
|
|
|
410
413
|
matchStatus: Generated<string | null>;
|
|
411
414
|
paidAt: Timestamp | null;
|
|
412
415
|
paidStatus: Generated<string | null>;
|
|
416
|
+
recreatedFromTransactionId: string | null;
|
|
413
417
|
recurringFeeId: string | null;
|
|
414
418
|
recurringPattern: Json | null;
|
|
415
419
|
recurringTemplateId: string | null;
|
|
@@ -642,9 +646,42 @@ export interface AuditPublicEventProjectionState {
|
|
|
642
646
|
retainedFrom: Timestamp | null;
|
|
643
647
|
singleton: Generated<boolean>;
|
|
644
648
|
}
|
|
649
|
+
export interface BillingListingFact {
|
|
650
|
+
activeListings: number;
|
|
651
|
+
billingPartnerId: string | null;
|
|
652
|
+
dataRegion: string;
|
|
653
|
+
effectiveAt: Timestamp;
|
|
654
|
+
id: Generated<string>;
|
|
655
|
+
reconciliation: Generated<boolean>;
|
|
656
|
+
recordedAt: Generated<Timestamp>;
|
|
657
|
+
sourceId: string;
|
|
658
|
+
sourceRevision: Int8 | null;
|
|
659
|
+
sourceType: BillingListingFactSourceType;
|
|
660
|
+
tenantId: string;
|
|
661
|
+
tenantName: string;
|
|
662
|
+
}
|
|
663
|
+
export interface BillingListingFactReadiness {
|
|
664
|
+
availableFrom: Timestamp | null;
|
|
665
|
+
legacyGapCount: number | null;
|
|
666
|
+
legacyImportedRows: number | null;
|
|
667
|
+
parityConfirmed: Generated<boolean>;
|
|
668
|
+
readyAt: Timestamp | null;
|
|
669
|
+
singleton: Generated<boolean>;
|
|
670
|
+
verifiedMonth: Timestamp | null;
|
|
671
|
+
}
|
|
645
672
|
export interface CoreActiveStatus {
|
|
646
673
|
name: string;
|
|
647
674
|
}
|
|
675
|
+
export interface CoreAsyncOperationResult {
|
|
676
|
+
createdAt: Generated<Timestamp>;
|
|
677
|
+
errorMessage: string | null;
|
|
678
|
+
operationId: string;
|
|
679
|
+
result: Json | null;
|
|
680
|
+
status: Generated<string>;
|
|
681
|
+
tenantId: string;
|
|
682
|
+
type: string;
|
|
683
|
+
updatedAt: Generated<Timestamp>;
|
|
684
|
+
}
|
|
648
685
|
export interface CoreChange {
|
|
649
686
|
automationId: string | null;
|
|
650
687
|
changeData: Json | null;
|
|
@@ -696,6 +733,32 @@ export interface CoreChangeSyncType {
|
|
|
696
733
|
export interface CoreChangeType {
|
|
697
734
|
name: string;
|
|
698
735
|
}
|
|
736
|
+
export interface CoreCsvOperationResult {
|
|
737
|
+
connectionId: string;
|
|
738
|
+
createdAt: Generated<Timestamp>;
|
|
739
|
+
errorMessage: string | null;
|
|
740
|
+
kind: string;
|
|
741
|
+
result: Json | null;
|
|
742
|
+
status: Generated<string>;
|
|
743
|
+
syncId: string;
|
|
744
|
+
tenantId: string;
|
|
745
|
+
updatedAt: Generated<Timestamp>;
|
|
746
|
+
}
|
|
747
|
+
export interface CoreExportJob {
|
|
748
|
+
createdAt: Generated<Timestamp>;
|
|
749
|
+
errorMessage: string | null;
|
|
750
|
+
fileId: string;
|
|
751
|
+
filename: string;
|
|
752
|
+
finishedAt: Timestamp | null;
|
|
753
|
+
format: string;
|
|
754
|
+
id: string;
|
|
755
|
+
payload: Json;
|
|
756
|
+
startedAt: Timestamp | null;
|
|
757
|
+
status: Generated<string>;
|
|
758
|
+
taskId: string;
|
|
759
|
+
tenantId: string;
|
|
760
|
+
updatedAt: Generated<Timestamp>;
|
|
761
|
+
}
|
|
699
762
|
export interface CoreFlow {
|
|
700
763
|
appId: string;
|
|
701
764
|
description: string | null;
|
|
@@ -712,6 +775,64 @@ export interface CoreFlow {
|
|
|
712
775
|
uniqueRef: string;
|
|
713
776
|
useGlobalMapping: Generated<boolean>;
|
|
714
777
|
}
|
|
778
|
+
export interface CoreFlowEvent {
|
|
779
|
+
attempts: Generated<number>;
|
|
780
|
+
availableAt: Generated<Timestamp>;
|
|
781
|
+
claimedAt: Timestamp | null;
|
|
782
|
+
claimedBy: string | null;
|
|
783
|
+
completedAt: Timestamp | null;
|
|
784
|
+
createdAt: Generated<Timestamp>;
|
|
785
|
+
data: Generated<Json>;
|
|
786
|
+
entityId: string;
|
|
787
|
+
entityType: string;
|
|
788
|
+
eventType: string;
|
|
789
|
+
id: Generated<string>;
|
|
790
|
+
lastErrorCode: string | null;
|
|
791
|
+
lastErrorDetails: Json | null;
|
|
792
|
+
maxAttempts: Generated<number>;
|
|
793
|
+
requiresSensitiveInput: Generated<boolean>;
|
|
794
|
+
status: Generated<CoreFlowEventStatus>;
|
|
795
|
+
syncId: string | null;
|
|
796
|
+
targetConnectionId: string | null;
|
|
797
|
+
targetFlowId: string | null;
|
|
798
|
+
tenantId: string;
|
|
799
|
+
updatedAt: Generated<Timestamp>;
|
|
800
|
+
}
|
|
801
|
+
export interface CoreFlowEventDelivery {
|
|
802
|
+
attempts: Generated<number>;
|
|
803
|
+
availableAt: Generated<Timestamp>;
|
|
804
|
+
claimedAt: Timestamp | null;
|
|
805
|
+
claimedBy: string | null;
|
|
806
|
+
completedAt: Timestamp | null;
|
|
807
|
+
connectionId: string;
|
|
808
|
+
createdAt: Generated<Timestamp>;
|
|
809
|
+
eventId: string;
|
|
810
|
+
flowId: string;
|
|
811
|
+
id: Generated<string>;
|
|
812
|
+
lastErrorCode: string | null;
|
|
813
|
+
lastErrorDetails: Json | null;
|
|
814
|
+
maxAttempts: Generated<number>;
|
|
815
|
+
status: Generated<CoreFlowEventStatus>;
|
|
816
|
+
tenantId: string;
|
|
817
|
+
triggerRunId: string | null;
|
|
818
|
+
updatedAt: Generated<Timestamp>;
|
|
819
|
+
}
|
|
820
|
+
export interface CoreFlowEventOperation {
|
|
821
|
+
action: CoreFlowEventOperationAction;
|
|
822
|
+
actor: string;
|
|
823
|
+
createdAt: Generated<Timestamp>;
|
|
824
|
+
eventId: string;
|
|
825
|
+
id: Generated<string>;
|
|
826
|
+
previousStatus: CoreFlowEventStatus;
|
|
827
|
+
reasonCode: string;
|
|
828
|
+
}
|
|
829
|
+
export interface CoreFlowEventSecret {
|
|
830
|
+
createdAt: Generated<Timestamp>;
|
|
831
|
+
encryptedPayload: string;
|
|
832
|
+
encryptionKeyId: string;
|
|
833
|
+
eventId: string;
|
|
834
|
+
expiresAt: Timestamp;
|
|
835
|
+
}
|
|
715
836
|
export interface CoreFlowMapping {
|
|
716
837
|
accountId: string | null;
|
|
717
838
|
bookingChannelId: string | null;
|
|
@@ -750,6 +871,49 @@ export interface CoreIssueMessageOverwrite {
|
|
|
750
871
|
pattern: string;
|
|
751
872
|
updatedAt: Generated<Timestamp | null>;
|
|
752
873
|
}
|
|
874
|
+
export interface CoreOperation {
|
|
875
|
+
createdAt: Generated<Timestamp>;
|
|
876
|
+
failureCode: string | null;
|
|
877
|
+
failureMessage: string | null;
|
|
878
|
+
finishedAt: Timestamp | null;
|
|
879
|
+
id: Generated<string>;
|
|
880
|
+
initiatedByUserId: string | null;
|
|
881
|
+
retainUntil: Timestamp | null;
|
|
882
|
+
sourceVersion: Generated<Int8>;
|
|
883
|
+
startedAt: Timestamp | null;
|
|
884
|
+
status: Generated<string>;
|
|
885
|
+
tenantId: string;
|
|
886
|
+
type: string;
|
|
887
|
+
updatedAt: Generated<Timestamp>;
|
|
888
|
+
}
|
|
889
|
+
export interface CoreOperationProjectionOutbox {
|
|
890
|
+
attempts: Generated<number>;
|
|
891
|
+
availableAt: Generated<Timestamp>;
|
|
892
|
+
createdAt: Generated<Timestamp>;
|
|
893
|
+
id: Generated<string>;
|
|
894
|
+
lastError: string | null;
|
|
895
|
+
operationId: string;
|
|
896
|
+
publishedAt: Timestamp | null;
|
|
897
|
+
sourceVersion: Int8;
|
|
898
|
+
}
|
|
899
|
+
export interface CoreOperationResource {
|
|
900
|
+
createdAt: Generated<Timestamp>;
|
|
901
|
+
isPrimary: Generated<boolean>;
|
|
902
|
+
operationId: string;
|
|
903
|
+
resourceId: string;
|
|
904
|
+
resourceType: string;
|
|
905
|
+
role: string;
|
|
906
|
+
}
|
|
907
|
+
export interface CoreOperationSource {
|
|
908
|
+
finishedAt: Timestamp | null;
|
|
909
|
+
operationId: string;
|
|
910
|
+
required: Generated<boolean>;
|
|
911
|
+
sourceId: string;
|
|
912
|
+
sourceType: string;
|
|
913
|
+
sourceVersion: Generated<Int8>;
|
|
914
|
+
startedAt: Timestamp | null;
|
|
915
|
+
status: Generated<string>;
|
|
916
|
+
}
|
|
753
917
|
export interface CoreSync {
|
|
754
918
|
automationId: string | null;
|
|
755
919
|
connectionId: string | null;
|
|
@@ -895,6 +1059,8 @@ export interface HdbCatalogHdbVersion {
|
|
|
895
1059
|
export interface HealthAccountingIntegrityCase {
|
|
896
1060
|
actionability: HealthAccountingIntegrityActionability;
|
|
897
1061
|
actual: Json;
|
|
1062
|
+
assignedAt: Timestamp | null;
|
|
1063
|
+
assignedTo: string | null;
|
|
898
1064
|
caseKey: string;
|
|
899
1065
|
code: string;
|
|
900
1066
|
confidence: HealthAccountingIntegrityConfidence;
|
|
@@ -917,6 +1083,9 @@ export interface HealthAccountingIntegrityCase {
|
|
|
917
1083
|
repair: Json;
|
|
918
1084
|
resolutionClassification: HealthAccountingIntegrityResolutionClassification;
|
|
919
1085
|
resolvedAt: Timestamp | null;
|
|
1086
|
+
reviewedAt: Timestamp | null;
|
|
1087
|
+
reviewedBy: string | null;
|
|
1088
|
+
reviewRationale: string | null;
|
|
920
1089
|
reviewStatus: Generated<HealthAccountingIntegrityReviewStatus>;
|
|
921
1090
|
rootCause: string;
|
|
922
1091
|
runId: string;
|
|
@@ -948,6 +1117,22 @@ export interface HealthAccountingIntegrityDelivery {
|
|
|
948
1117
|
status: Generated<HealthAccountingIntegrityDeliveryStatus>;
|
|
949
1118
|
updatedAt: Generated<Timestamp>;
|
|
950
1119
|
}
|
|
1120
|
+
export interface HealthAccountingIntegrityOperatorEvent {
|
|
1121
|
+
actorId: string;
|
|
1122
|
+
caseId: string | null;
|
|
1123
|
+
caseVersion: Int8 | null;
|
|
1124
|
+
client: string;
|
|
1125
|
+
createdAt: Generated<Timestamp>;
|
|
1126
|
+
id: Generated<string>;
|
|
1127
|
+
idempotencyKey: string;
|
|
1128
|
+
payload: Json;
|
|
1129
|
+
planId: string | null;
|
|
1130
|
+
rationale: string | null;
|
|
1131
|
+
requestId: string;
|
|
1132
|
+
stageId: string | null;
|
|
1133
|
+
targetId: string | null;
|
|
1134
|
+
type: string;
|
|
1135
|
+
}
|
|
951
1136
|
export interface HealthAccountingIntegrityRepairPlan {
|
|
952
1137
|
canceledAt: Timestamp | null;
|
|
953
1138
|
code: string;
|
|
@@ -1027,7 +1212,11 @@ export interface HealthAccountingIntegrityRun {
|
|
|
1027
1212
|
completedAt: Timestamp | null;
|
|
1028
1213
|
createdAt: Generated<Timestamp>;
|
|
1029
1214
|
dataRegion: string;
|
|
1215
|
+
definitionArtifactHash: string | null;
|
|
1216
|
+
definitionTemplateId: string | null;
|
|
1217
|
+
definitionTemplateVersion: number | null;
|
|
1030
1218
|
definitionVersion: number;
|
|
1219
|
+
definitionVersionId: string | null;
|
|
1031
1220
|
environment: string;
|
|
1032
1221
|
error: Json | null;
|
|
1033
1222
|
evaluationId: string;
|
|
@@ -1035,6 +1224,7 @@ export interface HealthAccountingIntegrityRun {
|
|
|
1035
1224
|
gitRevision: string;
|
|
1036
1225
|
id: Generated<string>;
|
|
1037
1226
|
openedCaseCount: Generated<Int8>;
|
|
1227
|
+
operatorDefinitionVersion: number | null;
|
|
1038
1228
|
reopenedCaseCount: Generated<Int8>;
|
|
1039
1229
|
resolvedCaseCount: Generated<Int8>;
|
|
1040
1230
|
resolvesCases: Generated<boolean>;
|
|
@@ -1399,6 +1589,36 @@ export interface PublicLatestDuplicateEmails {
|
|
|
1399
1589
|
name: string | null;
|
|
1400
1590
|
status: string | null;
|
|
1401
1591
|
}
|
|
1592
|
+
export interface PublicLineClassificationUsage {
|
|
1593
|
+
appId: string | null;
|
|
1594
|
+
createdAt: Generated<Timestamp>;
|
|
1595
|
+
firstSeenAt: Generated<Timestamp>;
|
|
1596
|
+
kind: string;
|
|
1597
|
+
lastError: string | null;
|
|
1598
|
+
lastSeenAt: Generated<Timestamp>;
|
|
1599
|
+
mappingStatus: string | null;
|
|
1600
|
+
name: string;
|
|
1601
|
+
reportAttempts: Generated<number>;
|
|
1602
|
+
reportedRevision: Generated<number>;
|
|
1603
|
+
revision: Generated<number>;
|
|
1604
|
+
tenantId: string;
|
|
1605
|
+
updatedAt: Generated<Timestamp>;
|
|
1606
|
+
}
|
|
1607
|
+
export interface PublicLineClassificationUsageBackfill {
|
|
1608
|
+
completedAt: Timestamp | null;
|
|
1609
|
+
cursorId: string | null;
|
|
1610
|
+
source: string;
|
|
1611
|
+
updatedAt: Generated<Timestamp>;
|
|
1612
|
+
}
|
|
1613
|
+
export interface PublicLineClassificationUsageCapture {
|
|
1614
|
+
createdAt: Generated<Timestamp>;
|
|
1615
|
+
firstSeenAt: Timestamp | null;
|
|
1616
|
+
id: Generated<string>;
|
|
1617
|
+
kind: string;
|
|
1618
|
+
lastSeenAt: Timestamp | null;
|
|
1619
|
+
name: string;
|
|
1620
|
+
tenantId: string;
|
|
1621
|
+
}
|
|
1402
1622
|
export interface PublicListing {
|
|
1403
1623
|
address: string | null;
|
|
1404
1624
|
addressCity: string | null;
|
|
@@ -2029,7 +2249,10 @@ export interface PublicTenant {
|
|
|
2029
2249
|
isTest: Generated<boolean | null>;
|
|
2030
2250
|
logo: string | null;
|
|
2031
2251
|
longTermStayNights: number | null;
|
|
2252
|
+
migratedAt: Timestamp | null;
|
|
2032
2253
|
migratedFromTenantId: string | null;
|
|
2254
|
+
migratedToRegion: string | null;
|
|
2255
|
+
migrationStatus: Generated<string>;
|
|
2033
2256
|
name: string;
|
|
2034
2257
|
ownerPortalShowDraftStatements: boolean | null;
|
|
2035
2258
|
partnerDeniedPermissions: Generated<string[]>;
|
|
@@ -2305,6 +2528,8 @@ export interface WebhookSubscriptionSecret {
|
|
|
2305
2528
|
encryptionKeyId: string;
|
|
2306
2529
|
expiresAt: Timestamp | null;
|
|
2307
2530
|
id: Generated<string>;
|
|
2531
|
+
reencryptionFailedAt: Timestamp | null;
|
|
2532
|
+
reencryptionFailureCode: string | null;
|
|
2308
2533
|
revokedAt: Timestamp | null;
|
|
2309
2534
|
subscriptionId: string;
|
|
2310
2535
|
}
|
|
@@ -2359,7 +2584,10 @@ export interface DB {
|
|
|
2359
2584
|
"audit.publicEvent": AuditPublicEvent;
|
|
2360
2585
|
"audit.publicEventEntryChange": AuditPublicEventEntryChange;
|
|
2361
2586
|
"audit.publicEventProjectionState": AuditPublicEventProjectionState;
|
|
2587
|
+
"billing.listingFact": BillingListingFact;
|
|
2588
|
+
"billing.listingFactReadiness": BillingListingFactReadiness;
|
|
2362
2589
|
"core.activeStatus": CoreActiveStatus;
|
|
2590
|
+
"core.asyncOperationResult": CoreAsyncOperationResult;
|
|
2363
2591
|
"core.change": CoreChange;
|
|
2364
2592
|
"core.changeEntityType": CoreChangeEntityType;
|
|
2365
2593
|
"core.changeLink": CoreChangeLink;
|
|
@@ -2367,10 +2595,20 @@ export interface DB {
|
|
|
2367
2595
|
"core.changeStatus": CoreChangeStatus;
|
|
2368
2596
|
"core.changeSyncType": CoreChangeSyncType;
|
|
2369
2597
|
"core.changeType": CoreChangeType;
|
|
2598
|
+
"core.csvOperationResult": CoreCsvOperationResult;
|
|
2599
|
+
"core.exportJob": CoreExportJob;
|
|
2370
2600
|
"core.flow": CoreFlow;
|
|
2601
|
+
"core.flowEvent": CoreFlowEvent;
|
|
2602
|
+
"core.flowEventDelivery": CoreFlowEventDelivery;
|
|
2603
|
+
"core.flowEventOperation": CoreFlowEventOperation;
|
|
2604
|
+
"core.flowEventSecret": CoreFlowEventSecret;
|
|
2371
2605
|
"core.flowMapping": CoreFlowMapping;
|
|
2372
2606
|
"core.flowSetting": CoreFlowSetting;
|
|
2373
2607
|
"core.issueMessageOverwrite": CoreIssueMessageOverwrite;
|
|
2608
|
+
"core.operation": CoreOperation;
|
|
2609
|
+
"core.operationProjectionOutbox": CoreOperationProjectionOutbox;
|
|
2610
|
+
"core.operationResource": CoreOperationResource;
|
|
2611
|
+
"core.operationSource": CoreOperationSource;
|
|
2374
2612
|
"core.sync": CoreSync;
|
|
2375
2613
|
"core.syncStatus": CoreSyncStatus;
|
|
2376
2614
|
"core.syncSubtask": CoreSyncSubtask;
|
|
@@ -2389,6 +2627,7 @@ export interface DB {
|
|
|
2389
2627
|
"hdbCatalog.hdbVersion": HdbCatalogHdbVersion;
|
|
2390
2628
|
"health.accountingIntegrityCase": HealthAccountingIntegrityCase;
|
|
2391
2629
|
"health.accountingIntegrityDelivery": HealthAccountingIntegrityDelivery;
|
|
2630
|
+
"health.accountingIntegrityOperatorEvent": HealthAccountingIntegrityOperatorEvent;
|
|
2392
2631
|
"health.accountingIntegrityRepairPlan": HealthAccountingIntegrityRepairPlan;
|
|
2393
2632
|
"health.accountingIntegrityRepairStage": HealthAccountingIntegrityRepairStage;
|
|
2394
2633
|
"health.accountingIntegrityRepairTarget": HealthAccountingIntegrityRepairTarget;
|
|
@@ -2426,6 +2665,9 @@ export interface DB {
|
|
|
2426
2665
|
"public.fileStorageSourceLink": PublicFileStorageSourceLink;
|
|
2427
2666
|
"public.fileStorageTag": PublicFileStorageTag;
|
|
2428
2667
|
"public.latestDuplicateEmails": PublicLatestDuplicateEmails;
|
|
2668
|
+
"public.lineClassificationUsage": PublicLineClassificationUsage;
|
|
2669
|
+
"public.lineClassificationUsageBackfill": PublicLineClassificationUsageBackfill;
|
|
2670
|
+
"public.lineClassificationUsageCapture": PublicLineClassificationUsageCapture;
|
|
2429
2671
|
"public.listing": PublicListing;
|
|
2430
2672
|
"public.listingCollection": PublicListingCollection;
|
|
2431
2673
|
"public.listingConnection": PublicListingConnection;
|