@vrplatform/kysely 1.3.45-4998 → 1.3.45-5
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/camel-case/index.js +1 -1
- package/build/main/camel-case/index.js.map +1 -1
- package/build/main/control-plane/index.d.ts +216 -17
- package/build/main/control-plane/index.js +61 -0
- package/build/main/control-plane/index.js.map +1 -1
- package/build/main/domain.d.ts +4 -0
- package/build/main/domain.js +3 -0
- package/build/main/domain.js.map +1 -0
- package/build/main/index.d.ts +6 -11
- package/build/main/index.js +127 -57
- package/build/main/index.js.map +1 -1
- package/build/main/isomorphic.d.ts +5 -5
- package/build/main/isomorphic.js +2 -8
- package/build/main/isomorphic.js.map +1 -1
- package/build/main/local/digest.d.ts +3 -3
- package/build/main/local/digest.js.map +1 -1
- package/build/main/local/generate.js +9 -8
- package/build/main/local/generate.js.map +1 -1
- package/build/main/local/index.d.ts +5 -1
- package/build/main/local/index.js +214 -4
- package/build/main/local/index.js.map +1 -1
- package/build/main/local/prune-pulled-schema.js +4 -1
- package/build/main/local/prune-pulled-schema.js.map +1 -1
- package/build/main/migration.d.ts +7 -0
- package/build/main/migration.js +11 -0
- package/build/main/migration.js.map +1 -0
- package/build/main/query/listing/status.d.ts +0 -10
- package/build/main/query/listing/status.js +2 -14
- package/build/main/query/listing/status.js.map +1 -1
- package/build/main/query/tenant/status.d.ts +5 -8
- package/build/main/query/tenant/status.js +18 -21
- package/build/main/query/tenant/status.js.map +1 -1
- package/build/main/regional.d.ts +6 -1
- package/build/main/regional.js +13 -9
- package/build/main/regional.js.map +1 -1
- package/build/main/test/index.d.ts +3 -14
- package/build/main/test/index.js +0 -23
- package/build/main/test/index.js.map +1 -1
- package/build/main/transaction.d.ts +3 -3
- package/build/main/transaction.js.map +1 -1
- package/build/main/v1.generated.d.ts +501 -134
- package/build/main/v1.generated.js.map +1 -1
- package/build/migrations-v2/0000000000000-baseline.ts +5 -0
- package/build/migrations-v2/0000000000001-public-audit-events-v2.ts +137 -0
- package/build/migrations-v2/0000000000002-audit-recovery-watermarks.ts +30 -0
- package/build/migrations-v2/0000000000003-audit-effect-recovery-watermark.ts +13 -0
- package/build/migrations-v2/0000000000004-audit-event-projected-at.ts +15 -0
- package/build/migrations-v2/0000000000005-audit-recovery-indexes.ts +63 -0
- package/build/migrations-v2/0000000000006-audit-action-public-event-projected-at.ts +22 -0
- package/build/migrations-v2/0000000000007-audit-action-public-event-projected-at-backfill.ts +35 -0
- package/build/migrations-v2/0000000000008-global-user-attribution.ts +33 -0
- package/build/migrations-v2/0000000000008-team-issue-rule-state.ts +52 -0
- package/build/migrations-v2/0000000000009-reservation-issue-projections.ts +45 -0
- package/build/migrations-v2/0000000000010-bank-rule-application-bank-record-delete-cascade.ts +26 -0
- package/build/migrations-v2/0000000000011-guest-balance-journal-entry-lookup-index.ts +25 -0
- package/build/migrations-v2/0000000000012-trial-free-analytics-billing-status.ts +72 -0
- package/build/migrations-v2/0000000000013-ui-permission-bundles.ts +45 -0
- package/build/migrations-v2/0000000000014-ui-permission-bundle-top-up.ts +32 -0
- package/build/migrations-v2/0000000000016-managed-team-access.ts +34 -0
- package/build/migrations-v2/0000000000017-drop-trial-until.ts +42 -0
- package/build/migrations-v2/0000000000018-accounting-integrity-monitoring.ts +276 -0
- package/build/migrations-v2/0000000000019-accounting-integrity-run-shards.ts +26 -0
- package/build/migrations-v2/0000000000020-accounting-integrity-case-classification.ts +52 -0
- package/build/migrations-v2/0000000000021-payment-line-classification-monitor-indexes.ts +31 -0
- package/build/migrations-v2/0000000000022-accounting-integrity-controlled-repairs.ts +281 -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/module/camel-case/index.js +1 -1
- package/build/module/camel-case/index.js.map +1 -1
- package/build/module/control-plane/index.d.ts +216 -17
- package/build/module/control-plane/index.js +49 -1
- package/build/module/control-plane/index.js.map +1 -1
- package/build/module/domain.d.ts +4 -0
- package/build/module/domain.js +2 -0
- package/build/module/domain.js.map +1 -0
- package/build/module/index.d.ts +6 -11
- package/build/module/index.js +129 -55
- package/build/module/index.js.map +1 -1
- package/build/module/isomorphic.d.ts +5 -5
- package/build/module/isomorphic.js +1 -6
- package/build/module/isomorphic.js.map +1 -1
- package/build/module/local/digest.d.ts +3 -3
- package/build/module/local/digest.js.map +1 -1
- package/build/module/local/generate.js +9 -8
- package/build/module/local/generate.js.map +1 -1
- package/build/module/local/index.d.ts +5 -1
- package/build/module/local/index.js +215 -5
- package/build/module/local/index.js.map +1 -1
- package/build/module/local/prune-pulled-schema.js +4 -1
- package/build/module/local/prune-pulled-schema.js.map +1 -1
- package/build/module/migration.d.ts +7 -0
- package/build/module/migration.js +8 -0
- package/build/module/migration.js.map +1 -0
- package/build/module/query/listing/status.d.ts +0 -10
- package/build/module/query/listing/status.js +2 -12
- package/build/module/query/listing/status.js.map +1 -1
- package/build/module/query/tenant/status.d.ts +5 -8
- package/build/module/query/tenant/status.js +18 -21
- package/build/module/query/tenant/status.js.map +1 -1
- package/build/module/regional.d.ts +6 -1
- package/build/module/regional.js +13 -9
- package/build/module/regional.js.map +1 -1
- package/build/module/test/index.d.ts +3 -14
- package/build/module/test/index.js +1 -23
- package/build/module/test/index.js.map +1 -1
- package/build/module/transaction.d.ts +3 -3
- package/build/module/transaction.js.map +1 -1
- package/build/module/v1.generated.d.ts +501 -134
- package/build/module/v1.generated.js.map +1 -1
- package/package.json +3 -3
- package/build/migrations/0000000000001-init.ts +0 -5
- package/build/migrations/0000000000009-drop-store-schema.ts +0 -14
- package/build/migrations/0000000000010-bank-rules.ts +0 -190
- package/build/migrations/0000000000011-bank-rule-line-adjustments.ts +0 -65
- package/build/migrations/0000000000012-bank-rule-conditions.ts +0 -45
- package/build/migrations/0000000000013-bank-rule-name-unique.ts +0 -15
- package/build/migrations/0000000000014-bank-rule-drop-legacy-conditions.ts +0 -41
- package/build/migrations/0000000000015-booking-channel-logo-dev-provider.ts +0 -70
- package/build/migrations/0000000000016-owner-statement-draft-status.ts +0 -22
- package/build/migrations/0000000000017-tenant-migration-markers.ts +0 -18
- package/build/migrations/0000000000018-security-deposits-payable-category.ts +0 -63
- package/build/migrations/0000000000019-tenant-app-settings.ts +0 -76
- package/build/migrations/0000000000020-operating-opening-trial-balance.ts +0 -36
- package/build/migrations/0000000000021-audit-foreign-key-indexes.ts +0 -77
- package/build/migrations/0000000000022-opening-trial-balance-combined-columns.ts +0 -30
- package/build/migrations/0000000000023-journal-entry-currency-mismatch-reason.ts +0 -14
- package/build/migrations/0000000000024-listing-parent.ts +0 -37
- package/build/migrations/0000000000025-journal-entry-parent-listing.ts +0 -26
- package/build/migrations/0000000000026-booking-channel-logo-slots.ts +0 -89
- package/build/migrations/0000000000027-list-browse-performance-indexes.ts +0 -52
- package/build/migrations/0000000000028-flow-setting-status-jsonb.ts +0 -20
- package/build/migrations/0000000000029-tenant-slug.ts +0 -328
- package/build/migrations/0000000000030-pms-accounting-windows.ts +0 -50
- package/build/migrations/0000000000031-owner-statement-projection-listing-revision.ts +0 -20
- package/build/migrations/0000000000032-flow-event-listening.ts +0 -28
- package/build/migrations/0000000000033-opening-trial-balance-transaction.ts +0 -272
- package/build/migrations/0000000000034-historic-general-ledger.ts +0 -24
- package/build/migrations/0000000000035-tenant-regional-placement.ts +0 -37
- package/build/migrations/0000000000036-control-plane-projection-events.ts +0 -43
- package/build/migrations/0000000000037-tenant-guide-onboarding.ts +0 -21
- package/build/migrations/0000000000038-tracking-event-analytics-sink.ts +0 -31
- package/build/migrations/0000000000039-crunchy-region.ts +0 -86
- package/build/migrations/0000000000040-hostaway-region.ts +0 -72
- package/build/migrations/0000000000041-audit-tenant-fk.ts +0 -66
- package/build/migrations/0000000000042-ramp-staging-connect-params.ts +0 -35
- package/build/migrations/0000000000043-gl-pms-accounting-window-guard.ts +0 -125
- package/build/migrations/0000000000044-tenant-cross-region-fks.ts +0 -45
- package/build/migrations/0000000000045-cloudflare-region-env.ts +0 -100
- package/build/migrations/0000000000046-control-plane-outbox-alias.ts +0 -46
- package/build/migrations/0000000000047-ramp-contact-last-4-digits.ts +0 -16
- package/build/migrations/0000000000047-tenant-status-backfill.ts +0 -40
- package/build/migrations/0000000000048-tenant-status-constraint.ts +0 -24
- package/build/migrations/0000000000049-health-tenant-issues.ts +0 -69
- package/build/migrations/0000000000050-partner-webhooks.ts +0 -135
- package/build/migrations/0000000000051-health-webhook-runtime-grants.ts +0 -42
- package/build/migrations/0000000000052-feature-approval-team-enablement.ts +0 -13
- package/build/migrations/0000000000053-health-webhook-enums.ts +0 -296
- package/build/migrations/0000000000054-user-secondary-emails-jsonb.ts +0 -25
- package/build/migrations/0000000000055-outbound-webhooks-v1.ts +0 -221
- package/build/migrations/0000000000056-connection-webhook-version.ts +0 -18
- package/build/migrations/0000000000057-sync-webhook-version.ts +0 -18
- package/build/migrations/0000000000058-reservation-webhook-version.ts +0 -18
- package/build/migrations/0000000000059-listing-webhook-version.ts +0 -18
- package/build/migrations/0000000000060-owner-statement-webhook-version.ts +0 -19
- package/build/migrations/0000000000061-transaction-webhook-version.ts +0 -18
- package/build/migrations/0000000000062-plaid-connect-session.ts +0 -102
- package/build/migrations/0000000000063-pgcrypto.ts +0 -27
- package/build/migrations/0000000000064-partner-api-foundation.ts +0 -36
- package/build/migrations/0000000000065-canonical-jsonb-shapes.ts +0 -231
- package/build/migrations/0000000000066-source-delete-fk-indexes.ts +0 -20
- package/build/migrations/0000000000067-remove-opening-trial-balance-account-columns.ts +0 -34
- package/build/migrations/0000000000068-bank-record-account-delete-cascade.ts +0 -26
- package/build/migrations/0000000000069-account-connections.ts +0 -204
- package/build/migrations/0000000000070-provider-payment-projection-indexes.ts +0 -53
- package/build/migrations/0000000000071-tenant-app-settings-shape.ts +0 -39
- package/build/migrations/0000000000072-tenant-app-settings-shape-validation.ts +0 -11
package/build/.data.tar
CHANGED
|
Binary file
|
|
@@ -37,7 +37,7 @@ class CustomCasePlugin extends kysely_1.CamelCasePlugin {
|
|
|
37
37
|
}
|
|
38
38
|
if (!alias.name.includes('_'))
|
|
39
39
|
continue;
|
|
40
|
-
throw new error_1.KyselyError(
|
|
40
|
+
throw new error_1.KyselyError('Alias contains underscore', { name: alias.name });
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
43
|
mapRow(row) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["camel-case/index.ts"],"names":[],"mappings":";;;AAAA,mCAMgB;AAChB,oCAAuC;AAEvC,MAAa,gBAAiB,SAAQ,wBAAe;IACnD,kDAAkD;IAClD;QACE,KAAK,CAAC;YACJ,wBAAwB,EAAE,IAAI;SAC/B,CAAC,CAAC;IACL,CAAC;IAED,eAAe,CAAC,IAAI;QAClB,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,cAAc,CAAC,IAAI;QACjB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,WAAW,CAAC,IAAqB;QAC/B,IAAI,CAAC,IAAI,EAAE,UAAU;YAAE,OAAO;QAE9B,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;YACtC,MAAM,SAAS,GAAG,CAAC,CAAC,SAAsB,CAAC;YAC3C,IAAI,CAAC,SAAS,CAAC,KAAK;gBAAE,SAAS;YAC/B,MAAM,KAAK,GAAG,SAAS,CAAC,KAAuB,CAAC;YAEhD,0CAA0C;YAC1C,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACtC,MAAM,OAAO,GAAG,SAAS,CAAC,IAAe,CAAC;gBAC1C,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;oBACzC,IAAI,CAAC,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;wBACjC,MAAM,eAAe,GAAG,CAAoB,CAAC;wBAC7C,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;oBACpC,CAAC;gBACH,CAAC;YACH,CAAC;YAED,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAAE,SAAS;YAExC,MAAM,IAAI,mBAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["camel-case/index.ts"],"names":[],"mappings":";;;AAAA,mCAMgB;AAChB,oCAAuC;AAEvC,MAAa,gBAAiB,SAAQ,wBAAe;IACnD,kDAAkD;IAClD;QACE,KAAK,CAAC;YACJ,wBAAwB,EAAE,IAAI;SAC/B,CAAC,CAAC;IACL,CAAC;IAED,eAAe,CAAC,IAAI;QAClB,OAAO,KAAK,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,cAAc,CAAC,IAAI;QACjB,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5B,OAAO,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,WAAW,CAAC,IAAqB;QAC/B,IAAI,CAAC,IAAI,EAAE,UAAU;YAAE,OAAO;QAE9B,KAAK,MAAM,CAAC,IAAI,IAAI,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;YACtC,MAAM,SAAS,GAAG,CAAC,CAAC,SAAsB,CAAC;YAC3C,IAAI,CAAC,SAAS,CAAC,KAAK;gBAAE,SAAS;YAC/B,MAAM,KAAK,GAAG,SAAS,CAAC,KAAuB,CAAC;YAEhD,0CAA0C;YAC1C,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,KAAK,SAAS,EAAE,CAAC;gBACtC,MAAM,OAAO,GAAG,SAAS,CAAC,IAAe,CAAC;gBAC1C,KAAK,MAAM,CAAC,IAAI,OAAO,CAAC,UAAU,IAAI,EAAE,EAAE,CAAC;oBACzC,IAAI,CAAC,CAAC,IAAI,KAAK,iBAAiB,EAAE,CAAC;wBACjC,MAAM,eAAe,GAAG,CAAoB,CAAC;wBAC7C,IAAI,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC;oBACpC,CAAC;gBACH,CAAC;YACH,CAAC;YAED,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;gBAAE,SAAS;YAExC,MAAM,IAAI,mBAAW,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;QAC3E,CAAC;IACH,CAAC;IAES,MAAM,CAAC,GAAG;QAClB,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,CAAC,GAAG;YAAE,OAAO,GAAG,CAAC;QAEhD,MAAM,MAAM,GAAwB,EAAE,CAAC;QACvC,8GAA8G;QAC9G,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;YACnC,IAAI,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC;YACrB,MAAM,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACpC,iEAAiE;YACjE,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;gBACzB,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC;YAC7C,CAAC;YACD,MAAM,CAAC,MAAM,CAAC,GAAG,KAAK,CAAC;QACzB,CAAC;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;CACF;AA1DD,4CA0DC","sourcesContent":["import {\n type AliasNode,\n CamelCasePlugin,\n type IdentifierNode,\n type RawNode,\n type SelectQueryNode,\n} from 'kysely';\nimport { KyselyError } from '../error';\n\nexport class CustomCasePlugin extends CamelCasePlugin {\n // _excludedColumns: Record<string, boolean> = {};\n constructor() {\n super({\n maintainNestedObjectKeys: true,\n });\n }\n\n transformResult(args) {\n return super.transformResult(args);\n }\n\n transformQuery(args) {\n this.verifyAlias(args.node);\n return super.transformQuery(args);\n }\n\n verifyAlias(node: SelectQueryNode) {\n if (!node?.selections) return;\n\n for (const x of node.selections ?? []) {\n const selection = x.selection as AliasNode;\n if (!selection.alias) continue;\n const alias = selection.alias as IdentifierNode;\n\n // alias can be a raw node (jsonArrayFrom)\n if (selection.node.kind === 'RawNode') {\n const rawNode = selection.node as RawNode;\n for (const x of rawNode.parameters ?? []) {\n if (x.kind === 'SelectQueryNode') {\n const selectQueryNode = x as SelectQueryNode;\n this.verifyAlias(selectQueryNode);\n }\n }\n }\n\n if (!alias.name.includes('_')) continue;\n\n throw new KyselyError('Alias contains underscore', { name: alias.name });\n }\n }\n\n protected mapRow(row) {\n if (typeof row !== 'object' || !row) return row;\n\n const newRow: Record<string, any> = {};\n // we camel case on first layer, and nested ONLY if in an array (jsonArrayFrom), NOT if it's an object (jsonb)\n for (const key of Object.keys(row)) {\n let value = row[key];\n const newKey = super.camelCase(key);\n // array CAN be non object, so we need to check the first element\n if (Array.isArray(value)) {\n value = value.map((it) => this.mapRow(it));\n }\n newRow[newKey] = value;\n }\n return newRow;\n }\n}\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type ColumnType, type Kysely } from 'kysely';
|
|
2
2
|
export type Generated<T> = T extends ColumnType<infer S, infer I, infer U> ? ColumnType<S, I | undefined, U> : ColumnType<T, T | undefined, T>;
|
|
3
3
|
export type Json = JsonValue;
|
|
4
4
|
export type JsonArray = JsonValue[];
|
|
@@ -7,6 +7,7 @@ export type JsonObject = {
|
|
|
7
7
|
};
|
|
8
8
|
export type JsonPrimitive = boolean | number | string | null;
|
|
9
9
|
export type JsonValue = JsonArray | JsonObject | JsonPrimitive;
|
|
10
|
+
export type Int8 = ColumnType<string, number | string | bigint, number | string | bigint>;
|
|
10
11
|
export type Timestamp = ColumnType<Date | string, Date | string, Date | string>;
|
|
11
12
|
export interface ControlPlaneApp {
|
|
12
13
|
authentication: Generated<Json>;
|
|
@@ -21,6 +22,56 @@ export interface ControlPlaneApp {
|
|
|
21
22
|
type: string;
|
|
22
23
|
version: Generated<number>;
|
|
23
24
|
}
|
|
25
|
+
export interface ControlPlaneAccountingIntegrityEvaluation {
|
|
26
|
+
caseCount: Generated<Int8>;
|
|
27
|
+
completedAt: Timestamp | null;
|
|
28
|
+
completedRunCount: Generated<number>;
|
|
29
|
+
createdAt: Generated<Timestamp>;
|
|
30
|
+
environment: string;
|
|
31
|
+
error: Json | null;
|
|
32
|
+
expectedRunCount: number;
|
|
33
|
+
failedRunCount: Generated<number>;
|
|
34
|
+
findingRowCount: Generated<Int8>;
|
|
35
|
+
gitRevision: string;
|
|
36
|
+
id: string;
|
|
37
|
+
results: Generated<Json>;
|
|
38
|
+
rowsScanned: Generated<Int8>;
|
|
39
|
+
skippedRunCount: Generated<number>;
|
|
40
|
+
source: string;
|
|
41
|
+
startedAt: Timestamp;
|
|
42
|
+
status: string;
|
|
43
|
+
updatedAt: Generated<Timestamp>;
|
|
44
|
+
}
|
|
45
|
+
export interface ControlPlaneAccountingIntegrityDefinitionDraft {
|
|
46
|
+
artifact: Json;
|
|
47
|
+
artifactHash: string;
|
|
48
|
+
code: string;
|
|
49
|
+
createdAt: Generated<Timestamp>;
|
|
50
|
+
id: Generated<string>;
|
|
51
|
+
ownerId: string;
|
|
52
|
+
previewResult: Json | null;
|
|
53
|
+
rationale: string;
|
|
54
|
+
revision: Generated<number>;
|
|
55
|
+
status: string;
|
|
56
|
+
templateId: string;
|
|
57
|
+
templateVersion: number;
|
|
58
|
+
title: string;
|
|
59
|
+
updatedAt: Generated<Timestamp>;
|
|
60
|
+
validationResult: Json | null;
|
|
61
|
+
}
|
|
62
|
+
export interface ControlPlaneAccountingIntegrityDefinitionVersion {
|
|
63
|
+
artifact: Json;
|
|
64
|
+
artifactHash: string;
|
|
65
|
+
code: string;
|
|
66
|
+
draftId: string;
|
|
67
|
+
id: Generated<string>;
|
|
68
|
+
publishedAt: Generated<Timestamp>;
|
|
69
|
+
publishedBy: string;
|
|
70
|
+
rollout: string;
|
|
71
|
+
templateId: string;
|
|
72
|
+
templateVersion: number;
|
|
73
|
+
version: number;
|
|
74
|
+
}
|
|
24
75
|
export interface ControlPlaneBookingChannel {
|
|
25
76
|
channelRef: string | null;
|
|
26
77
|
color: string | null;
|
|
@@ -36,6 +87,20 @@ export interface ControlPlaneBookingChannel {
|
|
|
36
87
|
uniqueRef: string;
|
|
37
88
|
updatedAt: Generated<Timestamp>;
|
|
38
89
|
}
|
|
90
|
+
export interface ControlPlaneBookingChannelIconCandidate {
|
|
91
|
+
bookingChannelId: string;
|
|
92
|
+
cloudflareImageId: string | null;
|
|
93
|
+
color: string | null;
|
|
94
|
+
comment: string | null;
|
|
95
|
+
createdAt: Generated<Timestamp>;
|
|
96
|
+
externalIcon: string | null;
|
|
97
|
+
height: number | null;
|
|
98
|
+
id: Generated<string>;
|
|
99
|
+
provider: Generated<string>;
|
|
100
|
+
source: string | null;
|
|
101
|
+
updatedAt: Generated<Timestamp>;
|
|
102
|
+
width: number | null;
|
|
103
|
+
}
|
|
39
104
|
export interface ControlPlaneCurrency {
|
|
40
105
|
name: string;
|
|
41
106
|
}
|
|
@@ -84,6 +149,100 @@ export interface ControlPlaneFeatureApproval {
|
|
|
84
149
|
updatedAt: Generated<Timestamp>;
|
|
85
150
|
userId: string;
|
|
86
151
|
}
|
|
152
|
+
export interface ControlPlaneFlow {
|
|
153
|
+
appId: string;
|
|
154
|
+
createdAt: Generated<Timestamp>;
|
|
155
|
+
description: string | null;
|
|
156
|
+
eventListening: Generated<Json>;
|
|
157
|
+
id: Generated<string>;
|
|
158
|
+
isPublic: Generated<boolean>;
|
|
159
|
+
leftType: string | null;
|
|
160
|
+
mappingSchema: Generated<Json>;
|
|
161
|
+
revision: Generated<number>;
|
|
162
|
+
rightType: string | null;
|
|
163
|
+
runSchema: Generated<Json>;
|
|
164
|
+
settingSchema: Generated<Json>;
|
|
165
|
+
title: string;
|
|
166
|
+
type: 'pull' | 'push' | null;
|
|
167
|
+
uniqueRef: string;
|
|
168
|
+
updatedAt: Generated<Timestamp>;
|
|
169
|
+
useGlobalMapping: Generated<boolean>;
|
|
170
|
+
}
|
|
171
|
+
export interface ControlPlaneIssueMessageOverwrite {
|
|
172
|
+
createdAt: Generated<Timestamp>;
|
|
173
|
+
id: Generated<string>;
|
|
174
|
+
message: string;
|
|
175
|
+
pattern: string;
|
|
176
|
+
updatedAt: Generated<Timestamp>;
|
|
177
|
+
}
|
|
178
|
+
export interface ControlPlaneLineClassification {
|
|
179
|
+
appConflict: Generated<boolean>;
|
|
180
|
+
appId: string | null;
|
|
181
|
+
createdAt: Generated<Timestamp>;
|
|
182
|
+
firstSeenAt: Timestamp;
|
|
183
|
+
id: Generated<string>;
|
|
184
|
+
kind: string;
|
|
185
|
+
lastSeenAt: Timestamp;
|
|
186
|
+
name: string;
|
|
187
|
+
updatedAt: Generated<Timestamp>;
|
|
188
|
+
}
|
|
189
|
+
export interface ControlPlaneLineClassificationTeamUsage {
|
|
190
|
+
classificationId: string;
|
|
191
|
+
createdAt: Generated<Timestamp>;
|
|
192
|
+
dataRegion: string;
|
|
193
|
+
firstSeenAt: Timestamp;
|
|
194
|
+
lastSeenAt: Timestamp;
|
|
195
|
+
mappingStatus: string | null;
|
|
196
|
+
revision: number;
|
|
197
|
+
tenantId: string;
|
|
198
|
+
updatedAt: Generated<Timestamp>;
|
|
199
|
+
}
|
|
200
|
+
export interface ControlPlaneReservationLineDefault {
|
|
201
|
+
accountKey: string | null;
|
|
202
|
+
bookingChannel: string | null;
|
|
203
|
+
bookingChannelKey: Generated<string>;
|
|
204
|
+
classificationId: string;
|
|
205
|
+
createdAt: Generated<Timestamp>;
|
|
206
|
+
id: Generated<string>;
|
|
207
|
+
partnerTenantId: string | null;
|
|
208
|
+
revenueRecognition: string | null;
|
|
209
|
+
revision: Generated<number>;
|
|
210
|
+
updatedAt: Generated<Timestamp>;
|
|
211
|
+
}
|
|
212
|
+
export interface ControlPlaneRolloutMonitorSnapshot {
|
|
213
|
+
monitorName: string;
|
|
214
|
+
result: Json;
|
|
215
|
+
snapshotDate: Timestamp;
|
|
216
|
+
}
|
|
217
|
+
export interface ControlPlaneTransactionLineMapping {
|
|
218
|
+
accountAssignmentType: string | null;
|
|
219
|
+
createdAt: Generated<Timestamp>;
|
|
220
|
+
deletedAt: Timestamp | null;
|
|
221
|
+
id: Generated<string>;
|
|
222
|
+
lineType: string;
|
|
223
|
+
revision: Generated<number>;
|
|
224
|
+
updatedAt: Generated<Timestamp>;
|
|
225
|
+
}
|
|
226
|
+
export interface ControlPlaneGeneralLedgerDefaultSet {
|
|
227
|
+
createdAt: Generated<Timestamp>;
|
|
228
|
+
id: Generated<string>;
|
|
229
|
+
partnerTenantId: string | null;
|
|
230
|
+
publishedVersion: number | null;
|
|
231
|
+
sourceDataRegion: string;
|
|
232
|
+
sourceDigest: string | null;
|
|
233
|
+
sourceTenantId: string;
|
|
234
|
+
templateKey: string;
|
|
235
|
+
updatedAt: Generated<Timestamp>;
|
|
236
|
+
}
|
|
237
|
+
export interface ControlPlaneGeneralLedgerDefaultVersion {
|
|
238
|
+
dataJson: Json;
|
|
239
|
+
defaultSetId: string;
|
|
240
|
+
id: Generated<string>;
|
|
241
|
+
publishedAt: Generated<Timestamp>;
|
|
242
|
+
sourceDigest: string;
|
|
243
|
+
sourceTenantId: string;
|
|
244
|
+
version: number;
|
|
245
|
+
}
|
|
87
246
|
export interface ControlPlaneOutbox {
|
|
88
247
|
aggregateId: string;
|
|
89
248
|
aggregateType: string;
|
|
@@ -97,15 +256,22 @@ export interface ControlPlaneOutbox {
|
|
|
97
256
|
payload: Generated<Json>;
|
|
98
257
|
publishedAt: Timestamp | null;
|
|
99
258
|
}
|
|
259
|
+
export interface ControlPlanePartnerManagedTeamAssignment {
|
|
260
|
+
createdAt: Generated<Timestamp>;
|
|
261
|
+
managedTeamId: string;
|
|
262
|
+
partnerTenantId: string;
|
|
263
|
+
userId: string;
|
|
264
|
+
}
|
|
100
265
|
export interface ControlPlaneTenant {
|
|
101
|
-
billingCustomerId: string | null;
|
|
102
266
|
billingPartnerId: string | null;
|
|
103
267
|
billingPlan: string | null;
|
|
104
268
|
createdAt: Generated<Timestamp>;
|
|
105
269
|
dataRegion: Generated<string>;
|
|
106
270
|
id: Generated<string>;
|
|
271
|
+
migrationStatus: Generated<string>;
|
|
107
272
|
name: string;
|
|
108
273
|
partnerId: string | null;
|
|
274
|
+
partnerDeniedPermissions: Generated<string[]>;
|
|
109
275
|
slug: string;
|
|
110
276
|
status: Generated<string | null>;
|
|
111
277
|
storageRealm: Generated<string>;
|
|
@@ -113,10 +279,27 @@ export interface ControlPlaneTenant {
|
|
|
113
279
|
uniqueRef: string | null;
|
|
114
280
|
updatedAt: Generated<Timestamp | null>;
|
|
115
281
|
}
|
|
282
|
+
export interface ControlPlaneTenantRegionMigration {
|
|
283
|
+
actor: string;
|
|
284
|
+
completedAt: Timestamp | null;
|
|
285
|
+
error: Json | null;
|
|
286
|
+
id: string;
|
|
287
|
+
reason: string;
|
|
288
|
+
sourceManifest: Json | null;
|
|
289
|
+
sourceRegion: string;
|
|
290
|
+
startedAt: Generated<Timestamp>;
|
|
291
|
+
status: Generated<string>;
|
|
292
|
+
targetManifest: Json | null;
|
|
293
|
+
targetRegion: string;
|
|
294
|
+
tenantId: string;
|
|
295
|
+
updatedAt: Generated<Timestamp>;
|
|
296
|
+
}
|
|
116
297
|
export interface ControlPlaneTenantUser {
|
|
117
298
|
createdAt: Generated<Timestamp | null>;
|
|
118
299
|
id: Generated<string>;
|
|
119
300
|
lastInvitedAt: Timestamp | null;
|
|
301
|
+
managedTeamAccess: Generated<'all' | 'assigned'>;
|
|
302
|
+
permissionBundles: Generated<string[]>;
|
|
120
303
|
role: Generated<string | null>;
|
|
121
304
|
status: Generated<string | null>;
|
|
122
305
|
tenantId: string;
|
|
@@ -139,6 +322,7 @@ export interface ControlPlaneUser {
|
|
|
139
322
|
email: string | null;
|
|
140
323
|
firstName: string | null;
|
|
141
324
|
id: Generated<string>;
|
|
325
|
+
internalOperationGrants: Generated<string[]>;
|
|
142
326
|
isAdmin: Generated<boolean>;
|
|
143
327
|
lastName: string | null;
|
|
144
328
|
lastSeen: Timestamp | null;
|
|
@@ -152,18 +336,33 @@ export interface ControlPlaneUser {
|
|
|
152
336
|
updatedAt: Generated<Timestamp | null>;
|
|
153
337
|
}
|
|
154
338
|
export interface ControlPlaneDB {
|
|
155
|
-
'
|
|
156
|
-
'
|
|
157
|
-
'
|
|
158
|
-
'
|
|
159
|
-
'
|
|
160
|
-
'
|
|
161
|
-
'
|
|
162
|
-
'
|
|
163
|
-
'
|
|
164
|
-
'
|
|
165
|
-
'
|
|
166
|
-
'
|
|
167
|
-
'
|
|
168
|
-
|
|
169
|
-
|
|
339
|
+
'controlPlane.accountingIntegrityDefinitionDraft': ControlPlaneAccountingIntegrityDefinitionDraft;
|
|
340
|
+
'controlPlane.accountingIntegrityDefinitionVersion': ControlPlaneAccountingIntegrityDefinitionVersion;
|
|
341
|
+
'controlPlane.accountingIntegrityEvaluation': ControlPlaneAccountingIntegrityEvaluation;
|
|
342
|
+
'controlPlane.app': ControlPlaneApp;
|
|
343
|
+
'controlPlane.bookingChannel': ControlPlaneBookingChannel;
|
|
344
|
+
'controlPlane.bookingChannelIconCandidate': ControlPlaneBookingChannelIconCandidate;
|
|
345
|
+
'controlPlane.connectionRoute': ControlPlaneConnectionRoute;
|
|
346
|
+
'controlPlane.controlPlaneOutbox': ControlPlaneOutbox;
|
|
347
|
+
'controlPlane.currency': ControlPlaneCurrency;
|
|
348
|
+
'controlPlane.events': ControlPlaneEvent;
|
|
349
|
+
'controlPlane.feature': ControlPlaneFeature;
|
|
350
|
+
'controlPlane.featureApproval': ControlPlaneFeatureApproval;
|
|
351
|
+
'controlPlane.featureEnabledTeam': ControlPlaneFeatureEnabledTeam;
|
|
352
|
+
'controlPlane.generalLedgerDefaultSet': ControlPlaneGeneralLedgerDefaultSet;
|
|
353
|
+
'controlPlane.generalLedgerDefaultVersion': ControlPlaneGeneralLedgerDefaultVersion;
|
|
354
|
+
'controlPlane.lineClassification': ControlPlaneLineClassification;
|
|
355
|
+
'controlPlane.lineClassificationTeamUsage': ControlPlaneLineClassificationTeamUsage;
|
|
356
|
+
'controlPlane.partnerManagedTeamAssignment': ControlPlanePartnerManagedTeamAssignment;
|
|
357
|
+
'controlPlane.reservationLineDefault': ControlPlaneReservationLineDefault;
|
|
358
|
+
'controlPlane.rolloutMonitorSnapshot': ControlPlaneRolloutMonitorSnapshot;
|
|
359
|
+
'controlPlane.tenant': ControlPlaneTenant;
|
|
360
|
+
'controlPlane.tenantRegionMigration': ControlPlaneTenantRegionMigration;
|
|
361
|
+
'controlPlane.tenantUser': ControlPlaneTenantUser;
|
|
362
|
+
'controlPlane.token': ControlPlaneToken;
|
|
363
|
+
'controlPlane.transactionLineMapping': ControlPlaneTransactionLineMapping;
|
|
364
|
+
'controlPlane.user': ControlPlaneUser;
|
|
365
|
+
'controlPlaneCore.flow': ControlPlaneFlow;
|
|
366
|
+
'controlPlaneCore.issueMessageOverwrite': ControlPlaneIssueMessageOverwrite;
|
|
367
|
+
}
|
|
368
|
+
export declare function withControlPlaneSchema(kysely: Kysely<ControlPlaneDB>, schema: string, issueMessageOverwriteSchema?: string): Kysely<ControlPlaneDB>;
|
|
@@ -1,3 +1,64 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
3
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
4
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
5
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
6
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
7
|
+
};
|
|
8
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
11
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
12
|
+
};
|
|
13
|
+
var _ControlPlaneSchemaPlugin_transformer;
|
|
2
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.withControlPlaneSchema = withControlPlaneSchema;
|
|
16
|
+
const kysely_1 = require("kysely");
|
|
17
|
+
class ControlPlaneSchemaTransformer extends kysely_1.OperationNodeTransformer {
|
|
18
|
+
constructor(schema, issueMessageOverwriteSchema) {
|
|
19
|
+
super();
|
|
20
|
+
this.schema = schema;
|
|
21
|
+
this.issueMessageOverwriteSchema = issueMessageOverwriteSchema;
|
|
22
|
+
}
|
|
23
|
+
transformSchemableIdentifier(node, queryId) {
|
|
24
|
+
const transformed = super.transformSchemableIdentifier(node, queryId);
|
|
25
|
+
if (transformed.schema?.name === 'controlPlane' ||
|
|
26
|
+
transformed.schema?.name === 'control_plane') {
|
|
27
|
+
return { ...transformed, schema: kysely_1.IdentifierNode.create(this.schema) };
|
|
28
|
+
}
|
|
29
|
+
if (transformed.schema?.name === 'controlPlaneCore' ||
|
|
30
|
+
transformed.schema?.name === 'control_plane_core') {
|
|
31
|
+
return {
|
|
32
|
+
...transformed,
|
|
33
|
+
schema: kysely_1.IdentifierNode.create(this.issueMessageOverwriteSchema),
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
return transformed;
|
|
37
|
+
}
|
|
38
|
+
transformFunction(node, queryId) {
|
|
39
|
+
const transformed = super.transformFunction(node, queryId);
|
|
40
|
+
return node.func.startsWith('controlPlane.')
|
|
41
|
+
? {
|
|
42
|
+
...transformed,
|
|
43
|
+
func: `${this.schema}.${transformed.func.slice('controlPlane.'.length)}`,
|
|
44
|
+
}
|
|
45
|
+
: transformed;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
class ControlPlaneSchemaPlugin {
|
|
49
|
+
constructor(schema, issueMessageOverwriteSchema) {
|
|
50
|
+
_ControlPlaneSchemaPlugin_transformer.set(this, void 0);
|
|
51
|
+
__classPrivateFieldSet(this, _ControlPlaneSchemaPlugin_transformer, new ControlPlaneSchemaTransformer(schema, issueMessageOverwriteSchema), "f");
|
|
52
|
+
}
|
|
53
|
+
transformQuery(args) {
|
|
54
|
+
return __classPrivateFieldGet(this, _ControlPlaneSchemaPlugin_transformer, "f").transformNode(args.node, args.queryId);
|
|
55
|
+
}
|
|
56
|
+
async transformResult(args) {
|
|
57
|
+
return args.result;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
_ControlPlaneSchemaPlugin_transformer = new WeakMap();
|
|
61
|
+
function withControlPlaneSchema(kysely, schema, issueMessageOverwriteSchema = 'core') {
|
|
62
|
+
return kysely.withPlugin(new ControlPlaneSchemaPlugin(schema, issueMessageOverwriteSchema));
|
|
63
|
+
}
|
|
3
64
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["control-plane/index.ts"],"names":[],"mappings":"","sourcesContent":["import type { ColumnType, Kysely as K } from 'kysely';\n\nexport type Generated<T> =\n T extends ColumnType<infer S, infer I, infer U>\n ? ColumnType<S, I | undefined, U>\n : ColumnType<T, T | undefined, T>;\n\nexport type Json = JsonValue;\n\nexport type JsonArray = JsonValue[];\n\nexport type JsonObject = {\n [x: string]: JsonValue | undefined;\n};\n\nexport type JsonPrimitive = boolean | number | string | null;\n\nexport type JsonValue = JsonArray | JsonObject | JsonPrimitive;\n\nexport type Timestamp = ColumnType<Date | string, Date | string, Date | string>;\n\nexport interface ControlPlaneApp {\n authentication: Generated<Json>;\n category: string | null;\n color: string | null;\n createdAt: Generated<Timestamp>;\n icon: string | null;\n iconRound: string | null;\n id: Generated<string>;\n info: Json | null;\n name: string;\n type: string;\n version: Generated<number>;\n}\n\nexport interface ControlPlaneBookingChannel {\n channelRef: string | null;\n color: string | null;\n createdAt: Generated<Timestamp>;\n icon: string | null;\n iconProvider: string | null;\n id: Generated<string>;\n lastGenerateRun: Timestamp | null;\n logo: string | null;\n logoProvider: string | null;\n selectedBookingChannelIconCandidateId: string | null;\n selectedBookingChannelLogoCandidateId: string | null;\n uniqueRef: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneCurrency {\n name: string;\n}\n\nexport interface ControlPlaneEvent {\n createdAt: Generated<Timestamp>;\n id: Generated<string>;\n name: string;\n packageName: string;\n props: Json;\n tenantId: string | null;\n timestamp: Generated<Timestamp>;\n trackedAt: Generated<Timestamp | null>;\n userId: string | null;\n}\n\nexport interface ControlPlaneConnectionRoute {\n connectionId: string;\n createdAt: Generated<Timestamp>;\n tenantId: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneFeature {\n createdAt: Generated<Timestamp>;\n description: string | null;\n id: Generated<string>;\n issueUrl: string | null;\n requiredApprovals: Generated<Json | null>;\n status: Generated<string | null>;\n tenantId: string | null;\n title: string;\n updatedAt: Generated<Timestamp>;\n url: string | null;\n}\n\nexport interface ControlPlaneFeatureEnabledTeam {\n createdAt: Generated<Timestamp>;\n featureId: string;\n id: Generated<string>;\n status: Generated<string | null>;\n tenantId: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneFeatureApproval {\n createdAt: Generated<Timestamp>;\n featureId: string;\n id: Generated<string>;\n status: Generated<string | null>;\n updatedAt: Generated<Timestamp>;\n userId: string;\n}\n\nexport interface ControlPlaneOutbox {\n aggregateId: string;\n aggregateType: string;\n attempts: Generated<number>;\n createdAt: Generated<Timestamp>;\n dataRegion: string | null;\n eventType: string;\n eventVersion: number;\n id: Generated<string>;\n lastError: string | null;\n payload: Generated<Json>;\n publishedAt: Timestamp | null;\n}\n\nexport interface ControlPlaneTenant {\n billingCustomerId: string | null;\n billingPartnerId: string | null;\n billingPlan: string | null;\n createdAt: Generated<Timestamp>;\n dataRegion: Generated<string>;\n id: Generated<string>;\n name: string;\n partnerId: string | null;\n slug: string;\n status: Generated<string | null>;\n storageRealm: Generated<string>;\n type: Generated<string | null>;\n uniqueRef: string | null;\n updatedAt: Generated<Timestamp | null>;\n}\n\nexport interface ControlPlaneTenantUser {\n createdAt: Generated<Timestamp | null>;\n id: Generated<string>;\n lastInvitedAt: Timestamp | null;\n role: Generated<string | null>;\n status: Generated<string | null>;\n tenantId: string;\n updatedAt: Generated<Timestamp | null>;\n userId: string;\n}\n\nexport interface ControlPlaneToken {\n createdAt: Generated<Timestamp>;\n expiresAt: Timestamp | null;\n id: Generated<string>;\n nanoId: Generated<string>;\n payload: Generated<Json>;\n tenantId: string | null;\n type: string | null;\n userId: string | null;\n}\n\nexport interface ControlPlaneUser {\n clerkId: string | null;\n createdAt: Generated<Timestamp | null>;\n email: string | null;\n firstName: string | null;\n id: Generated<string>;\n isAdmin: Generated<boolean>;\n lastName: string | null;\n lastSeen: Timestamp | null;\n name: string | null;\n partnerId: string | null;\n phone: string | null;\n secondaryEmails: Generated<Json>;\n status: Generated<string | null>;\n sub: string | null;\n type: Generated<string | null>;\n updatedAt: Generated<Timestamp | null>;\n}\n\nexport interface ControlPlaneDB {\n 'public.app': ControlPlaneApp;\n 'public.bookingChannel': ControlPlaneBookingChannel;\n 'public.connectionRoute': ControlPlaneConnectionRoute;\n 'public.currency': ControlPlaneCurrency;\n 'public.events': ControlPlaneEvent;\n 'public.feature': ControlPlaneFeature;\n 'public.featureApproval': ControlPlaneFeatureApproval;\n 'public.featureEnabledTeam': ControlPlaneFeatureEnabledTeam;\n 'public.controlPlaneOutbox': ControlPlaneOutbox;\n 'public.tenant': ControlPlaneTenant;\n 'public.tenantUser': ControlPlaneTenantUser;\n 'public.token': ControlPlaneToken;\n 'public.user': ControlPlaneUser;\n}\n\nexport type ControlPlaneKysely = K<ControlPlaneDB>;\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"src/","sources":["control-plane/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AA4eA,wDAQC;AApfD,mCAcgB;AA4ZhB,MAAM,6BAA8B,SAAQ,iCAAwB;IAClE,YACW,MAAc,EACd,2BAAmC;QAE5C,KAAK,EAAE,CAAC;QAHC,WAAM,GAAN,MAAM,CAAQ;QACd,gCAA2B,GAA3B,2BAA2B,CAAQ;IAG9C,CAAC;IAEkB,4BAA4B,CAC7C,IAA6B,EAC7B,OAAgB;QAEhB,MAAM,WAAW,GAAG,KAAK,CAAC,4BAA4B,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACtE,IACE,WAAW,CAAC,MAAM,EAAE,IAAI,KAAK,cAAc;YAC3C,WAAW,CAAC,MAAM,EAAE,IAAI,KAAK,eAAe,EAC5C,CAAC;YACD,OAAO,EAAE,GAAG,WAAW,EAAE,MAAM,EAAE,uBAAc,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACxE,CAAC;QACD,IACE,WAAW,CAAC,MAAM,EAAE,IAAI,KAAK,kBAAkB;YAC/C,WAAW,CAAC,MAAM,EAAE,IAAI,KAAK,oBAAoB,EACjD,CAAC;YACD,OAAO;gBACL,GAAG,WAAW;gBACd,MAAM,EAAE,uBAAc,CAAC,MAAM,CAAC,IAAI,CAAC,2BAA2B,CAAC;aAChE,CAAC;QACJ,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEkB,iBAAiB,CAClC,IAAkB,EAClB,OAAgB;QAEhB,MAAM,WAAW,GAAG,KAAK,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC3D,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,eAAe,CAAC;YAC1C,CAAC,CAAC;gBACE,GAAG,WAAW;gBACd,IAAI,EAAE,GAAG,IAAI,CAAC,MAAM,IAAI,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,eAAe,CAAC,MAAM,CAAC,EAAE;aACzE;YACH,CAAC,CAAC,WAAW,CAAC;IAClB,CAAC;CACF;AAED,MAAM,wBAAwB;IAG5B,YAAY,MAAc,EAAE,2BAAmC;QAFtD,wDAA4C;QAGnD,uBAAA,IAAI,yCAAgB,IAAI,6BAA6B,CACnD,MAAM,EACN,2BAA2B,CAC5B,MAAA,CAAC;IACJ,CAAC;IAED,cAAc,CAAC,IAA8B;QAC3C,OAAO,uBAAA,IAAI,6CAAa,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IAClE,CAAC;IAED,KAAK,CAAC,eAAe,CACnB,IAA+B;QAE/B,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF;;AAED,SAAgB,sBAAsB,CACpC,MAA8B,EAC9B,MAAc,EACd,2BAA2B,GAAG,MAAM;IAEpC,OAAO,MAAM,CAAC,UAAU,CACtB,IAAI,wBAAwB,CAAC,MAAM,EAAE,2BAA2B,CAAC,CAClE,CAAC;AACJ,CAAC","sourcesContent":["import {\n type ColumnType,\n type FunctionNode,\n IdentifierNode,\n type Kysely,\n type KyselyPlugin,\n OperationNodeTransformer,\n type PluginTransformQueryArgs,\n type PluginTransformResultArgs,\n type QueryId,\n type QueryResult,\n type RootOperationNode,\n type SchemableIdentifierNode,\n type UnknownRow,\n} from 'kysely';\n\nexport type Generated<T> =\n T extends ColumnType<infer S, infer I, infer U>\n ? ColumnType<S, I | undefined, U>\n : ColumnType<T, T | undefined, T>;\n\nexport type Json = JsonValue;\n\nexport type JsonArray = JsonValue[];\n\nexport type JsonObject = {\n [x: string]: JsonValue | undefined;\n};\n\nexport type JsonPrimitive = boolean | number | string | null;\n\nexport type JsonValue = JsonArray | JsonObject | JsonPrimitive;\n\nexport type Int8 = ColumnType<\n string,\n number | string | bigint,\n number | string | bigint\n>;\n\nexport type Timestamp = ColumnType<Date | string, Date | string, Date | string>;\n\nexport interface ControlPlaneApp {\n authentication: Generated<Json>;\n category: string | null;\n color: string | null;\n createdAt: Generated<Timestamp>;\n icon: string | null;\n iconRound: string | null;\n id: Generated<string>;\n info: Json | null;\n name: string;\n type: string;\n version: Generated<number>;\n}\n\nexport interface ControlPlaneAccountingIntegrityEvaluation {\n caseCount: Generated<Int8>;\n completedAt: Timestamp | null;\n completedRunCount: Generated<number>;\n createdAt: Generated<Timestamp>;\n environment: string;\n error: Json | null;\n expectedRunCount: number;\n failedRunCount: Generated<number>;\n findingRowCount: Generated<Int8>;\n gitRevision: string;\n id: string;\n results: Generated<Json>;\n rowsScanned: Generated<Int8>;\n skippedRunCount: Generated<number>;\n source: string;\n startedAt: Timestamp;\n status: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneAccountingIntegrityDefinitionDraft {\n artifact: Json;\n artifactHash: string;\n code: string;\n createdAt: Generated<Timestamp>;\n id: Generated<string>;\n ownerId: string;\n previewResult: Json | null;\n rationale: string;\n revision: Generated<number>;\n status: string;\n templateId: string;\n templateVersion: number;\n title: string;\n updatedAt: Generated<Timestamp>;\n validationResult: Json | null;\n}\n\nexport interface ControlPlaneAccountingIntegrityDefinitionVersion {\n artifact: Json;\n artifactHash: string;\n code: string;\n draftId: string;\n id: Generated<string>;\n publishedAt: Generated<Timestamp>;\n publishedBy: string;\n rollout: string;\n templateId: string;\n templateVersion: number;\n version: number;\n}\n\nexport interface ControlPlaneBookingChannel {\n channelRef: string | null;\n color: string | null;\n createdAt: Generated<Timestamp>;\n icon: string | null;\n iconProvider: string | null;\n id: Generated<string>;\n lastGenerateRun: Timestamp | null;\n logo: string | null;\n logoProvider: string | null;\n selectedBookingChannelIconCandidateId: string | null;\n selectedBookingChannelLogoCandidateId: string | null;\n uniqueRef: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneBookingChannelIconCandidate {\n bookingChannelId: string;\n cloudflareImageId: string | null;\n color: string | null;\n comment: string | null;\n createdAt: Generated<Timestamp>;\n externalIcon: string | null;\n height: number | null;\n id: Generated<string>;\n provider: Generated<string>;\n source: string | null;\n updatedAt: Generated<Timestamp>;\n width: number | null;\n}\n\nexport interface ControlPlaneCurrency {\n name: string;\n}\n\nexport interface ControlPlaneEvent {\n createdAt: Generated<Timestamp>;\n id: Generated<string>;\n name: string;\n packageName: string;\n props: Json;\n tenantId: string | null;\n timestamp: Generated<Timestamp>;\n trackedAt: Generated<Timestamp | null>;\n userId: string | null;\n}\n\nexport interface ControlPlaneConnectionRoute {\n connectionId: string;\n createdAt: Generated<Timestamp>;\n tenantId: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneFeature {\n createdAt: Generated<Timestamp>;\n description: string | null;\n id: Generated<string>;\n issueUrl: string | null;\n requiredApprovals: Generated<Json | null>;\n status: Generated<string | null>;\n tenantId: string | null;\n title: string;\n updatedAt: Generated<Timestamp>;\n url: string | null;\n}\n\nexport interface ControlPlaneFeatureEnabledTeam {\n createdAt: Generated<Timestamp>;\n featureId: string;\n id: Generated<string>;\n status: Generated<string | null>;\n tenantId: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneFeatureApproval {\n createdAt: Generated<Timestamp>;\n featureId: string;\n id: Generated<string>;\n status: Generated<string | null>;\n updatedAt: Generated<Timestamp>;\n userId: string;\n}\n\nexport interface ControlPlaneFlow {\n appId: string;\n createdAt: Generated<Timestamp>;\n description: string | null;\n eventListening: Generated<Json>;\n id: Generated<string>;\n isPublic: Generated<boolean>;\n leftType: string | null;\n mappingSchema: Generated<Json>;\n revision: Generated<number>;\n rightType: string | null;\n runSchema: Generated<Json>;\n settingSchema: Generated<Json>;\n title: string;\n type: 'pull' | 'push' | null;\n uniqueRef: string;\n updatedAt: Generated<Timestamp>;\n useGlobalMapping: Generated<boolean>;\n}\n\nexport interface ControlPlaneIssueMessageOverwrite {\n createdAt: Generated<Timestamp>;\n id: Generated<string>;\n message: string;\n pattern: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneLineClassification {\n appConflict: Generated<boolean>;\n appId: string | null;\n createdAt: Generated<Timestamp>;\n firstSeenAt: Timestamp;\n id: Generated<string>;\n kind: string;\n lastSeenAt: Timestamp;\n name: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneLineClassificationTeamUsage {\n classificationId: string;\n createdAt: Generated<Timestamp>;\n dataRegion: string;\n firstSeenAt: Timestamp;\n lastSeenAt: Timestamp;\n mappingStatus: string | null;\n revision: number;\n tenantId: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneReservationLineDefault {\n accountKey: string | null;\n bookingChannel: string | null;\n bookingChannelKey: Generated<string>;\n classificationId: string;\n createdAt: Generated<Timestamp>;\n id: Generated<string>;\n partnerTenantId: string | null;\n revenueRecognition: string | null;\n revision: Generated<number>;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneRolloutMonitorSnapshot {\n monitorName: string;\n result: Json;\n snapshotDate: Timestamp;\n}\n\nexport interface ControlPlaneTransactionLineMapping {\n accountAssignmentType: string | null;\n createdAt: Generated<Timestamp>;\n deletedAt: Timestamp | null;\n id: Generated<string>;\n lineType: string;\n revision: Generated<number>;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneGeneralLedgerDefaultSet {\n createdAt: Generated<Timestamp>;\n id: Generated<string>;\n partnerTenantId: string | null;\n publishedVersion: number | null;\n sourceDataRegion: string;\n sourceDigest: string | null;\n sourceTenantId: string;\n templateKey: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneGeneralLedgerDefaultVersion {\n dataJson: Json;\n defaultSetId: string;\n id: Generated<string>;\n publishedAt: Generated<Timestamp>;\n sourceDigest: string;\n sourceTenantId: string;\n version: number;\n}\n\nexport interface ControlPlaneOutbox {\n aggregateId: string;\n aggregateType: string;\n attempts: Generated<number>;\n createdAt: Generated<Timestamp>;\n dataRegion: string | null;\n eventType: string;\n eventVersion: number;\n id: Generated<string>;\n lastError: string | null;\n payload: Generated<Json>;\n publishedAt: Timestamp | null;\n}\n\nexport interface ControlPlanePartnerManagedTeamAssignment {\n createdAt: Generated<Timestamp>;\n managedTeamId: string;\n partnerTenantId: string;\n userId: string;\n}\n\nexport interface ControlPlaneTenant {\n billingPartnerId: string | null;\n billingPlan: string | null;\n createdAt: Generated<Timestamp>;\n dataRegion: Generated<string>;\n id: Generated<string>;\n migrationStatus: Generated<string>;\n name: string;\n partnerId: string | null;\n partnerDeniedPermissions: Generated<string[]>;\n slug: string;\n status: Generated<string | null>;\n storageRealm: Generated<string>;\n type: Generated<string | null>;\n uniqueRef: string | null;\n updatedAt: Generated<Timestamp | null>;\n}\n\nexport interface ControlPlaneTenantRegionMigration {\n actor: string;\n completedAt: Timestamp | null;\n error: Json | null;\n id: string;\n reason: string;\n sourceManifest: Json | null;\n sourceRegion: string;\n startedAt: Generated<Timestamp>;\n status: Generated<string>;\n targetManifest: Json | null;\n targetRegion: string;\n tenantId: string;\n updatedAt: Generated<Timestamp>;\n}\n\nexport interface ControlPlaneTenantUser {\n createdAt: Generated<Timestamp | null>;\n id: Generated<string>;\n lastInvitedAt: Timestamp | null;\n managedTeamAccess: Generated<'all' | 'assigned'>;\n permissionBundles: Generated<string[]>;\n role: Generated<string | null>;\n status: Generated<string | null>;\n tenantId: string;\n updatedAt: Generated<Timestamp | null>;\n userId: string;\n}\n\nexport interface ControlPlaneToken {\n createdAt: Generated<Timestamp>;\n expiresAt: Timestamp | null;\n id: Generated<string>;\n nanoId: Generated<string>;\n payload: Generated<Json>;\n tenantId: string | null;\n type: string | null;\n userId: string | null;\n}\n\nexport interface ControlPlaneUser {\n clerkId: string | null;\n createdAt: Generated<Timestamp | null>;\n email: string | null;\n firstName: string | null;\n id: Generated<string>;\n internalOperationGrants: Generated<string[]>;\n isAdmin: Generated<boolean>;\n lastName: string | null;\n lastSeen: Timestamp | null;\n name: string | null;\n partnerId: string | null;\n phone: string | null;\n secondaryEmails: Generated<Json>;\n status: Generated<string | null>;\n sub: string | null;\n type: Generated<string | null>;\n updatedAt: Generated<Timestamp | null>;\n}\n\nexport interface ControlPlaneDB {\n 'controlPlane.accountingIntegrityDefinitionDraft': ControlPlaneAccountingIntegrityDefinitionDraft;\n 'controlPlane.accountingIntegrityDefinitionVersion': ControlPlaneAccountingIntegrityDefinitionVersion;\n 'controlPlane.accountingIntegrityEvaluation': ControlPlaneAccountingIntegrityEvaluation;\n 'controlPlane.app': ControlPlaneApp;\n 'controlPlane.bookingChannel': ControlPlaneBookingChannel;\n 'controlPlane.bookingChannelIconCandidate': ControlPlaneBookingChannelIconCandidate;\n 'controlPlane.connectionRoute': ControlPlaneConnectionRoute;\n 'controlPlane.controlPlaneOutbox': ControlPlaneOutbox;\n 'controlPlane.currency': ControlPlaneCurrency;\n 'controlPlane.events': ControlPlaneEvent;\n 'controlPlane.feature': ControlPlaneFeature;\n 'controlPlane.featureApproval': ControlPlaneFeatureApproval;\n 'controlPlane.featureEnabledTeam': ControlPlaneFeatureEnabledTeam;\n 'controlPlane.generalLedgerDefaultSet': ControlPlaneGeneralLedgerDefaultSet;\n 'controlPlane.generalLedgerDefaultVersion': ControlPlaneGeneralLedgerDefaultVersion;\n 'controlPlane.lineClassification': ControlPlaneLineClassification;\n 'controlPlane.lineClassificationTeamUsage': ControlPlaneLineClassificationTeamUsage;\n 'controlPlane.partnerManagedTeamAssignment': ControlPlanePartnerManagedTeamAssignment;\n 'controlPlane.reservationLineDefault': ControlPlaneReservationLineDefault;\n 'controlPlane.rolloutMonitorSnapshot': ControlPlaneRolloutMonitorSnapshot;\n 'controlPlane.tenant': ControlPlaneTenant;\n 'controlPlane.tenantRegionMigration': ControlPlaneTenantRegionMigration;\n 'controlPlane.tenantUser': ControlPlaneTenantUser;\n 'controlPlane.token': ControlPlaneToken;\n 'controlPlane.transactionLineMapping': ControlPlaneTransactionLineMapping;\n 'controlPlane.user': ControlPlaneUser;\n 'controlPlaneCore.flow': ControlPlaneFlow;\n 'controlPlaneCore.issueMessageOverwrite': ControlPlaneIssueMessageOverwrite;\n}\n\nclass ControlPlaneSchemaTransformer extends OperationNodeTransformer {\n constructor(\n readonly schema: string,\n readonly issueMessageOverwriteSchema: string\n ) {\n super();\n }\n\n protected override transformSchemableIdentifier(\n node: SchemableIdentifierNode,\n queryId: QueryId\n ): SchemableIdentifierNode {\n const transformed = super.transformSchemableIdentifier(node, queryId);\n if (\n transformed.schema?.name === 'controlPlane' ||\n transformed.schema?.name === 'control_plane'\n ) {\n return { ...transformed, schema: IdentifierNode.create(this.schema) };\n }\n if (\n transformed.schema?.name === 'controlPlaneCore' ||\n transformed.schema?.name === 'control_plane_core'\n ) {\n return {\n ...transformed,\n schema: IdentifierNode.create(this.issueMessageOverwriteSchema),\n };\n }\n return transformed;\n }\n\n protected override transformFunction(\n node: FunctionNode,\n queryId: QueryId\n ): FunctionNode {\n const transformed = super.transformFunction(node, queryId);\n return node.func.startsWith('controlPlane.')\n ? {\n ...transformed,\n func: `${this.schema}.${transformed.func.slice('controlPlane.'.length)}`,\n }\n : transformed;\n }\n}\n\nclass ControlPlaneSchemaPlugin implements KyselyPlugin {\n readonly #transformer: ControlPlaneSchemaTransformer;\n\n constructor(schema: string, issueMessageOverwriteSchema: string) {\n this.#transformer = new ControlPlaneSchemaTransformer(\n schema,\n issueMessageOverwriteSchema\n );\n }\n\n transformQuery(args: PluginTransformQueryArgs): RootOperationNode {\n return this.#transformer.transformNode(args.node, args.queryId);\n }\n\n async transformResult(\n args: PluginTransformResultArgs\n ): Promise<QueryResult<UnknownRow>> {\n return args.result;\n }\n}\n\nexport function withControlPlaneSchema(\n kysely: Kysely<ControlPlaneDB>,\n schema: string,\n issueMessageOverwriteSchema = 'core'\n) {\n return kysely.withPlugin(\n new ControlPlaneSchemaPlugin(schema, issueMessageOverwriteSchema)\n );\n}\n"]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Values seeded in public.currency for database and API contracts. */
|
|
2
|
+
export type CurrencyCode = 'aed' | 'afn' | 'all' | 'amd' | 'ang' | 'aoa' | 'ars' | 'aud' | 'awg' | 'azn' | 'bam' | 'bbd' | 'bdt' | 'bgn' | 'bhd' | 'bif' | 'bmd' | 'bnd' | 'bob' | 'bov' | 'brl' | 'bsd' | 'btn' | 'bwp' | 'byn' | 'byr' | 'bzd' | 'cad' | 'cdf' | 'che' | 'chf' | 'chw' | 'clf' | 'clp' | 'cny' | 'cop' | 'cou' | 'crc' | 'cuc' | 'cup' | 'cve' | 'czk' | 'djf' | 'dkk' | 'dop' | 'dzd' | 'egp' | 'ern' | 'etb' | 'eur' | 'fjd' | 'fkp' | 'gbp' | 'gel' | 'ghs' | 'gip' | 'gmd' | 'gnf' | 'gtq' | 'gyd' | 'hkd' | 'hnl' | 'hrk' | 'htg' | 'huf' | 'idr' | 'ils' | 'inr' | 'iqd' | 'irr' | 'isk' | 'jmd' | 'jod' | 'jpy' | 'kes' | 'kgs' | 'khr' | 'kmf' | 'kpw' | 'krw' | 'kwd' | 'kyd' | 'kzt' | 'lak' | 'lbp' | 'lkr' | 'lrd' | 'lsl' | 'ltl' | 'lvl' | 'lyd' | 'mad' | 'mdl' | 'mga' | 'mkd' | 'mmk' | 'mnt' | 'mop' | 'mro' | 'mur' | 'mvr' | 'mwk' | 'mxn' | 'mxv' | 'myr' | 'mzn' | 'nad' | 'ngn' | 'nio' | 'nok' | 'npr' | 'nzd' | 'omr' | 'pab' | 'pen' | 'pgk' | 'php' | 'pkr' | 'pln' | 'pyg' | 'qar' | 'ron' | 'rsd' | 'rub' | 'rwf' | 'sar' | 'sbd' | 'scr' | 'sdg' | 'sek' | 'sgd' | 'shp' | 'sll' | 'sos' | 'srd' | 'ssp' | 'std' | 'syp' | 'szl' | 'thb' | 'tjs' | 'tmt' | 'tnd' | 'top' | 'try' | 'ttd' | 'twd' | 'tzs' | 'uah' | 'ugx' | 'usd' | 'usn' | 'uss' | 'uyi' | 'uyu' | 'uzs' | 'vef' | 'vnd' | 'vuv' | 'wst' | 'xaf' | 'xag' | 'xau' | 'xba' | 'xbb' | 'xbc' | 'xbd' | 'xcd' | 'xdr' | 'xfu' | 'xof' | 'xpd' | 'xpf' | 'xpt' | 'xts' | 'xxx' | 'yer' | 'zar' | 'zmw' | 'zwl';
|
|
3
|
+
/** Values seeded in public.listing_ownership_period_business_model. */
|
|
4
|
+
export type ListingOwnershipPeriodBusinessModel = 'co_host' | 'co_host_airbnb' | 'managed';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"domain.js","sourceRoot":"src/","sources":["domain.ts"],"names":[],"mappings":"","sourcesContent":["/** Values seeded in public.currency for database and API contracts. */\nexport type CurrencyCode =\n | 'aed'\n | 'afn'\n | 'all'\n | 'amd'\n | 'ang'\n | 'aoa'\n | 'ars'\n | 'aud'\n | 'awg'\n | 'azn'\n | 'bam'\n | 'bbd'\n | 'bdt'\n | 'bgn'\n | 'bhd'\n | 'bif'\n | 'bmd'\n | 'bnd'\n | 'bob'\n | 'bov'\n | 'brl'\n | 'bsd'\n | 'btn'\n | 'bwp'\n | 'byn'\n | 'byr'\n | 'bzd'\n | 'cad'\n | 'cdf'\n | 'che'\n | 'chf'\n | 'chw'\n | 'clf'\n | 'clp'\n | 'cny'\n | 'cop'\n | 'cou'\n | 'crc'\n | 'cuc'\n | 'cup'\n | 'cve'\n | 'czk'\n | 'djf'\n | 'dkk'\n | 'dop'\n | 'dzd'\n | 'egp'\n | 'ern'\n | 'etb'\n | 'eur'\n | 'fjd'\n | 'fkp'\n | 'gbp'\n | 'gel'\n | 'ghs'\n | 'gip'\n | 'gmd'\n | 'gnf'\n | 'gtq'\n | 'gyd'\n | 'hkd'\n | 'hnl'\n | 'hrk'\n | 'htg'\n | 'huf'\n | 'idr'\n | 'ils'\n | 'inr'\n | 'iqd'\n | 'irr'\n | 'isk'\n | 'jmd'\n | 'jod'\n | 'jpy'\n | 'kes'\n | 'kgs'\n | 'khr'\n | 'kmf'\n | 'kpw'\n | 'krw'\n | 'kwd'\n | 'kyd'\n | 'kzt'\n | 'lak'\n | 'lbp'\n | 'lkr'\n | 'lrd'\n | 'lsl'\n | 'ltl'\n | 'lvl'\n | 'lyd'\n | 'mad'\n | 'mdl'\n | 'mga'\n | 'mkd'\n | 'mmk'\n | 'mnt'\n | 'mop'\n | 'mro'\n | 'mur'\n | 'mvr'\n | 'mwk'\n | 'mxn'\n | 'mxv'\n | 'myr'\n | 'mzn'\n | 'nad'\n | 'ngn'\n | 'nio'\n | 'nok'\n | 'npr'\n | 'nzd'\n | 'omr'\n | 'pab'\n | 'pen'\n | 'pgk'\n | 'php'\n | 'pkr'\n | 'pln'\n | 'pyg'\n | 'qar'\n | 'ron'\n | 'rsd'\n | 'rub'\n | 'rwf'\n | 'sar'\n | 'sbd'\n | 'scr'\n | 'sdg'\n | 'sek'\n | 'sgd'\n | 'shp'\n | 'sll'\n | 'sos'\n | 'srd'\n | 'ssp'\n | 'std'\n | 'syp'\n | 'szl'\n | 'thb'\n | 'tjs'\n | 'tmt'\n | 'tnd'\n | 'top'\n | 'try'\n | 'ttd'\n | 'twd'\n | 'tzs'\n | 'uah'\n | 'ugx'\n | 'usd'\n | 'usn'\n | 'uss'\n | 'uyi'\n | 'uyu'\n | 'uzs'\n | 'vef'\n | 'vnd'\n | 'vuv'\n | 'wst'\n | 'xaf'\n | 'xag'\n | 'xau'\n | 'xba'\n | 'xbb'\n | 'xbc'\n | 'xbd'\n | 'xcd'\n | 'xdr'\n | 'xfu'\n | 'xof'\n | 'xpd'\n | 'xpf'\n | 'xpt'\n | 'xts'\n | 'xxx'\n | 'yer'\n | 'zar'\n | 'zmw'\n | 'zwl';\n\n/** Values seeded in public.listing_ownership_period_business_model. */\nexport type ListingOwnershipPeriodBusinessModel =\n | 'co_host'\n | 'co_host_airbnb'\n | 'managed';\n"]}
|
package/build/main/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Kysely as K, LogConfig } from 'kysely';
|
|
1
|
+
import type { Kysely as K, LogConfig, Transaction as T } from 'kysely';
|
|
2
2
|
import postgres, { type Sql } from 'postgres';
|
|
3
|
-
import type
|
|
3
|
+
import { type ControlPlaneDB } from './control-plane';
|
|
4
4
|
export type { Insertable, LogEvent } from 'kysely';
|
|
5
5
|
export * from './error';
|
|
6
6
|
export * from './isomorphic';
|
|
@@ -10,6 +10,7 @@ export * from './regional';
|
|
|
10
10
|
export * from './transaction';
|
|
11
11
|
import type { DB } from './v1.generated';
|
|
12
12
|
type KyselyOpts = {
|
|
13
|
+
hyperdrive?: true;
|
|
13
14
|
repositoryName?: string;
|
|
14
15
|
log?: true | LogConfig;
|
|
15
16
|
};
|
|
@@ -17,18 +18,12 @@ type PgOpt = {
|
|
|
17
18
|
forceDisableSSL?: boolean;
|
|
18
19
|
probe?: true;
|
|
19
20
|
retries?: false | number;
|
|
20
|
-
}
|
|
21
|
+
} & Pick<KyselyOpts, 'hyperdrive'>;
|
|
21
22
|
export type Kysely = K<DB>;
|
|
22
|
-
export type
|
|
23
|
+
export type ControlPlaneKysely = K<ControlPlaneDB>;
|
|
24
|
+
export type ControlPlaneTransaction = T<ControlPlaneDB>;
|
|
23
25
|
export declare function useKysely<Database = DB>(postgres: Sql, options?: KyselyOpts): K<Database>;
|
|
24
26
|
export declare function useAsyncPostgres(connectionString: string, opt?: PgOpt): Promise<postgres.Sql<{}>>;
|
|
25
27
|
export declare function useAsyncKysely(connectionString: string, opt?: PgOpt & KyselyOpts): Promise<K<DB>>;
|
|
26
28
|
export declare function useAsyncControlPlaneKysely(connectionString: string, opt?: PgOpt & KyselyOpts): Promise<K<ControlPlaneDB>>;
|
|
27
|
-
/**
|
|
28
|
-
* @deprecated This method is deprecated in favor of the useAsyncKysely method.
|
|
29
|
-
*/
|
|
30
|
-
export declare function usePostgres(connectionString?: string, opt?: Pick<PgOpt, 'forceDisableSSL'>): postgres.Sql<{}>;
|
|
31
29
|
export declare function forceCloseAllPostgres(timeoutMs?: number): Promise<void>;
|
|
32
|
-
export declare class DatabaseError extends Error {
|
|
33
|
-
constructor(message: string, cause: any);
|
|
34
|
-
}
|