@voyant-travel/apps 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/LICENSE +201 -0
  2. package/dist/contracts.d.ts +8 -87
  3. package/dist/contracts.js +0 -50
  4. package/dist/index.d.ts +1 -5
  5. package/dist/index.js +1 -5
  6. package/dist/installation-reconciliation.d.ts +1 -1
  7. package/dist/installation-reconciliation.js +1 -5
  8. package/dist/installation-service.d.ts +14 -25
  9. package/dist/installation-service.js +7 -22
  10. package/dist/routes.d.ts +1 -8
  11. package/dist/routes.js +1 -67
  12. package/dist/schema.d.ts +4 -536
  13. package/dist/schema.js +1 -52
  14. package/dist/service.d.ts +18 -18
  15. package/migrations/meta/_journal.json +0 -7
  16. package/package.json +78 -116
  17. package/dist/access-boundary.d.ts +0 -29
  18. package/dist/access-boundary.js +0 -33
  19. package/dist/app-api-contracts.d.ts +0 -51
  20. package/dist/app-api-contracts.js +0 -50
  21. package/dist/app-api-routes.d.ts +0 -26
  22. package/dist/app-api-routes.js +0 -133
  23. package/dist/app-api-service.d.ts +0 -1263
  24. package/dist/app-api-service.js +0 -231
  25. package/dist/app-api-service.test.d.ts +0 -1
  26. package/dist/app-api-service.test.js +0 -105
  27. package/dist/consent.d.ts +0 -15
  28. package/dist/consent.js +0 -50
  29. package/dist/consent.test.d.ts +0 -1
  30. package/dist/consent.test.js +0 -80
  31. package/dist/oauth-crypto.d.ts +0 -8
  32. package/dist/oauth-crypto.js +0 -23
  33. package/dist/oauth-crypto.test.d.ts +0 -1
  34. package/dist/oauth-crypto.test.js +0 -11
  35. package/dist/oauth-service.d.ts +0 -65
  36. package/dist/oauth-service.js +0 -381
  37. package/dist/oauth-service.test.d.ts +0 -1
  38. package/dist/oauth-service.test.js +0 -8
  39. package/migrations/20260717143000_app_oauth_authorization.sql +0 -47
package/dist/routes.js CHANGED
@@ -1,8 +1,7 @@
1
1
  import { parseJsonBody, parseQuery, RequestValidationError } from "@voyant-travel/hono";
2
2
  import { Hono } from "hono";
3
3
  import { z } from "zod";
4
- import { appCredentialRevocationSchema, appListQuerySchema, appOAuthAuthorizeQuerySchema, appOAuthTokenSchema, appWebhookReplaySchema, createCustomAppRegistrationSchema, releaseManifestFetchSchema, releaseManifestUploadSchema, } from "./contracts.js";
5
- import { createAppOAuthService } from "./oauth-service.js";
4
+ import { appListQuerySchema, appWebhookReplaySchema, createCustomAppRegistrationSchema, releaseManifestFetchSchema, releaseManifestUploadSchema, } from "./contracts.js";
6
5
  import { createAppsService } from "./service.js";
7
6
  import { listAppWebhookHealth, replayAppWebhookDelivery } from "./webhook-delivery.js";
8
7
  const appIdParamSchema = z.object({ appId: z.string().min(1) });
@@ -10,7 +9,6 @@ const installationIdParamSchema = z.object({ installationId: z.string().min(1) }
10
9
  export function createAppsAdminRoutes(options = {}) {
11
10
  const routes = new Hono();
12
11
  const service = createAppsService(options);
13
- const oauth = options.oauth ? createAppOAuthService(options.oauth) : null;
14
12
  routes.get("/", async (c) => {
15
13
  const query = parseQuery(c, appListQuerySchema);
16
14
  return c.json(await service.list(c.get("db"), query), 200);
@@ -20,64 +18,6 @@ export function createAppsAdminRoutes(options = {}) {
20
18
  const app = await service.createCustomApp(c.get("db"), body);
21
19
  return c.json({ data: app }, 201);
22
20
  });
23
- routes.get("/oauth/authorize", async (c) => {
24
- if (!oauth)
25
- return c.json({ error: "App OAuth is not configured" }, 501);
26
- const query = parseQuery(c, appOAuthAuthorizeQuerySchema);
27
- const result = await oauth.authorize(c.get("db"), {
28
- appId: query.client_id,
29
- releaseId: query.release_id,
30
- redirectUri: query.redirect_uri,
31
- state: query.state,
32
- codeChallenge: query.code_challenge,
33
- codeChallengeMethod: query.code_challenge_method,
34
- actorId: query.actor_id,
35
- operatorGrantedScopes: splitScopes(query.operator_scopes),
36
- grantedOptionalScopes: splitScopes(query.optional_scopes),
37
- });
38
- const redirectUrl = new URL(result.redirectUri);
39
- redirectUrl.searchParams.set("code", result.code);
40
- redirectUrl.searchParams.set("state", result.state);
41
- return c.redirect(redirectUrl.toString(), 302);
42
- });
43
- routes.post("/oauth/token", async (c) => {
44
- if (!oauth)
45
- return c.json({ error: "App OAuth is not configured" }, 501);
46
- const body = await parseJsonBody(c, appOAuthTokenSchema);
47
- const token = body.grant_type === "authorization_code"
48
- ? await oauth.token(c.get("db"), {
49
- grantType: "authorization_code",
50
- code: body.code,
51
- redirectUri: body.redirect_uri,
52
- codeVerifier: body.code_verifier,
53
- clientId: body.client_id,
54
- clientSecret: body.client_secret,
55
- })
56
- : body.grant_type === "refresh_token"
57
- ? await oauth.token(c.get("db"), {
58
- grantType: "refresh_token",
59
- refreshToken: body.refresh_token,
60
- clientId: body.client_id,
61
- clientSecret: body.client_secret,
62
- })
63
- : await oauth.token(c.get("db"), {
64
- grantType: "urn:voyant:params:oauth:grant-type:actor-token-exchange",
65
- installationId: body.installation_id,
66
- viewerId: body.viewer_id,
67
- viewerScopes: body.viewer_scopes,
68
- contextualScopes: body.contextual_scopes,
69
- clientId: body.client_id,
70
- clientSecret: body.client_secret,
71
- });
72
- return c.json(token, 200);
73
- });
74
- routes.post("/oauth/revoke-installation", async (c) => {
75
- if (!oauth)
76
- return c.json({ error: "App OAuth is not configured" }, 501);
77
- const body = await parseJsonBody(c, appCredentialRevocationSchema);
78
- const result = await oauth.revokeInstallationCredentials(c.get("db"), body.installationId, body.actorId);
79
- return c.json(result, 200);
80
- });
81
21
  routes.get("/:appId", async (c) => {
82
22
  const { appId } = parseParams(c.req.param());
83
23
  const app = await service.get(c.get("db"), appId);
@@ -111,12 +51,6 @@ export function createAppsAdminRoutes(options = {}) {
111
51
  });
112
52
  return routes;
113
53
  }
114
- function splitScopes(value) {
115
- return value
116
- .split(/[,\s]+/)
117
- .map((scope) => scope.trim())
118
- .filter(Boolean);
119
- }
120
54
  function parseParams(input) {
121
55
  const parsed = appIdParamSchema.safeParse(input);
122
56
  if (!parsed.success)
package/dist/schema.d.ts CHANGED
@@ -7,10 +7,9 @@ export declare const appInstallationStatusEnum: import("drizzle-orm/pg-core").Pg
7
7
  export declare const appInstallationUpdatePolicyEnum: import("drizzle-orm/pg-core").PgEnum<["manual", "compatible", "patch", "pinned"]>;
8
8
  export declare const appGrantStatusEnum: import("drizzle-orm/pg-core").PgEnum<["requested", "granted", "optional", "revoked"]>;
9
9
  export declare const appAccessCredentialStatusEnum: import("drizzle-orm/pg-core").PgEnum<["active", "inactive", "revoked"]>;
10
- export declare const appAccessTokenModeEnum: import("drizzle-orm/pg-core").PgEnum<["offline", "online"]>;
11
10
  export declare const appInstallationRegistrationStatusEnum: import("drizzle-orm/pg-core").PgEnum<["active", "inactive"]>;
12
11
  export declare const appWebhookSubscriptionStatusEnum: import("drizzle-orm/pg-core").PgEnum<["active", "inactive", "failed"]>;
13
- export declare const appAuditEventKindEnum: import("drizzle-orm/pg-core").PgEnum<["lifecycle", "grant", "consent", "credential", "token", "reconciliation", "purge"]>;
12
+ export declare const appAuditEventKindEnum: import("drizzle-orm/pg-core").PgEnum<["lifecycle", "grant", "credential", "reconciliation", "purge"]>;
14
13
  export declare const apps: import("drizzle-orm/pg-core").PgTableWithColumns<{
15
14
  name: "apps";
16
15
  schema: undefined;
@@ -1063,23 +1062,6 @@ export declare const appInstallations: import("drizzle-orm/pg-core").PgTableWith
1063
1062
  identity: undefined;
1064
1063
  generated: undefined;
1065
1064
  }, {}, {}>;
1066
- credentialGeneration: import("drizzle-orm/pg-core").PgColumn<{
1067
- name: "credential_generation";
1068
- tableName: "app_installations";
1069
- dataType: "number";
1070
- columnType: "PgInteger";
1071
- data: number;
1072
- driverParam: string | number;
1073
- notNull: true;
1074
- hasDefault: true;
1075
- isPrimaryKey: false;
1076
- isAutoincrement: false;
1077
- hasRuntimeDefault: false;
1078
- enumValues: undefined;
1079
- baseColumn: never;
1080
- identity: undefined;
1081
- generated: undefined;
1082
- }, {}, {}>;
1083
1065
  updatePolicy: import("drizzle-orm/pg-core").PgColumn<{
1084
1066
  name: "update_policy";
1085
1067
  tableName: "app_installations";
@@ -1381,7 +1363,7 @@ export declare const appGrants: import("drizzle-orm/pg-core").PgTableWithColumns
1381
1363
  tableName: "app_grants";
1382
1364
  dataType: "string";
1383
1365
  columnType: "PgEnumColumn";
1384
- data: "optional" | "revoked" | "requested" | "granted";
1366
+ data: "optional" | "requested" | "revoked" | "granted";
1385
1367
  driverParam: string;
1386
1368
  notNull: true;
1387
1369
  hasDefault: false;
@@ -1519,23 +1501,6 @@ export declare const appAccessCredentials: import("drizzle-orm/pg-core").PgTable
1519
1501
  identity: undefined;
1520
1502
  generated: undefined;
1521
1503
  }, {}, {}>;
1522
- tokenMode: import("drizzle-orm/pg-core").PgColumn<{
1523
- name: "token_mode";
1524
- tableName: "app_access_credentials";
1525
- dataType: "string";
1526
- columnType: "PgEnumColumn";
1527
- data: "offline" | "online";
1528
- driverParam: string;
1529
- notNull: true;
1530
- hasDefault: true;
1531
- isPrimaryKey: false;
1532
- isAutoincrement: false;
1533
- hasRuntimeDefault: false;
1534
- enumValues: ["offline", "online"];
1535
- baseColumn: never;
1536
- identity: undefined;
1537
- generated: undefined;
1538
- }, {}, {}>;
1539
1504
  credentialHash: import("drizzle-orm/pg-core").PgColumn<{
1540
1505
  name: "credential_hash";
1541
1506
  tableName: "app_access_credentials";
@@ -1589,40 +1554,6 @@ export declare const appAccessCredentials: import("drizzle-orm/pg-core").PgTable
1589
1554
  identity: undefined;
1590
1555
  generated: undefined;
1591
1556
  }, {}, {}>;
1592
- actorId: import("drizzle-orm/pg-core").PgColumn<{
1593
- name: "actor_id";
1594
- tableName: "app_access_credentials";
1595
- dataType: "string";
1596
- columnType: "PgText";
1597
- data: string;
1598
- driverParam: string;
1599
- notNull: false;
1600
- hasDefault: false;
1601
- isPrimaryKey: false;
1602
- isAutoincrement: false;
1603
- hasRuntimeDefault: false;
1604
- enumValues: [string, ...string[]];
1605
- baseColumn: never;
1606
- identity: undefined;
1607
- generated: undefined;
1608
- }, {}, {}>;
1609
- viewerId: import("drizzle-orm/pg-core").PgColumn<{
1610
- name: "viewer_id";
1611
- tableName: "app_access_credentials";
1612
- dataType: "string";
1613
- columnType: "PgText";
1614
- data: string;
1615
- driverParam: string;
1616
- notNull: false;
1617
- hasDefault: false;
1618
- isPrimaryKey: false;
1619
- isAutoincrement: false;
1620
- hasRuntimeDefault: false;
1621
- enumValues: [string, ...string[]];
1622
- baseColumn: never;
1623
- identity: undefined;
1624
- generated: undefined;
1625
- }, {}, {}>;
1626
1557
  createdAt: import("drizzle-orm/pg-core").PgColumn<{
1627
1558
  name: "created_at";
1628
1559
  tableName: "app_access_credentials";
@@ -1677,468 +1608,6 @@ export declare const appAccessCredentials: import("drizzle-orm/pg-core").PgTable
1677
1608
  };
1678
1609
  dialect: "pg";
1679
1610
  }>;
1680
- export declare const appOAuthAuthorizationCodes: import("drizzle-orm/pg-core").PgTableWithColumns<{
1681
- name: "app_oauth_authorization_codes";
1682
- schema: undefined;
1683
- columns: {
1684
- id: import("drizzle-orm/pg-core").PgColumn<{
1685
- name: string;
1686
- tableName: "app_oauth_authorization_codes";
1687
- dataType: "string";
1688
- columnType: "PgText";
1689
- data: string;
1690
- driverParam: string;
1691
- notNull: true;
1692
- hasDefault: true;
1693
- isPrimaryKey: true;
1694
- isAutoincrement: false;
1695
- hasRuntimeDefault: true;
1696
- enumValues: [string, ...string[]];
1697
- baseColumn: never;
1698
- identity: undefined;
1699
- generated: undefined;
1700
- }, {}, {}>;
1701
- appId: import("drizzle-orm/pg-core").PgColumn<{
1702
- name: "app_id";
1703
- tableName: "app_oauth_authorization_codes";
1704
- dataType: "string";
1705
- columnType: "PgText";
1706
- data: string;
1707
- driverParam: string;
1708
- notNull: true;
1709
- hasDefault: false;
1710
- isPrimaryKey: false;
1711
- isAutoincrement: false;
1712
- hasRuntimeDefault: false;
1713
- enumValues: [string, ...string[]];
1714
- baseColumn: never;
1715
- identity: undefined;
1716
- generated: undefined;
1717
- }, {}, {}>;
1718
- installationId: import("drizzle-orm/pg-core").PgColumn<{
1719
- name: "installation_id";
1720
- tableName: "app_oauth_authorization_codes";
1721
- dataType: "string";
1722
- columnType: "PgText";
1723
- data: string;
1724
- driverParam: string;
1725
- notNull: true;
1726
- hasDefault: false;
1727
- isPrimaryKey: false;
1728
- isAutoincrement: false;
1729
- hasRuntimeDefault: false;
1730
- enumValues: [string, ...string[]];
1731
- baseColumn: never;
1732
- identity: undefined;
1733
- generated: undefined;
1734
- }, {}, {}>;
1735
- releaseId: import("drizzle-orm/pg-core").PgColumn<{
1736
- name: "release_id";
1737
- tableName: "app_oauth_authorization_codes";
1738
- dataType: "string";
1739
- columnType: "PgText";
1740
- data: string;
1741
- driverParam: string;
1742
- notNull: true;
1743
- hasDefault: false;
1744
- isPrimaryKey: false;
1745
- isAutoincrement: false;
1746
- hasRuntimeDefault: false;
1747
- enumValues: [string, ...string[]];
1748
- baseColumn: never;
1749
- identity: undefined;
1750
- generated: undefined;
1751
- }, {}, {}>;
1752
- deploymentId: import("drizzle-orm/pg-core").PgColumn<{
1753
- name: "deployment_id";
1754
- tableName: "app_oauth_authorization_codes";
1755
- dataType: "string";
1756
- columnType: "PgText";
1757
- data: string;
1758
- driverParam: string;
1759
- notNull: true;
1760
- hasDefault: false;
1761
- isPrimaryKey: false;
1762
- isAutoincrement: false;
1763
- hasRuntimeDefault: false;
1764
- enumValues: [string, ...string[]];
1765
- baseColumn: never;
1766
- identity: undefined;
1767
- generated: undefined;
1768
- }, {}, {}>;
1769
- codeHash: import("drizzle-orm/pg-core").PgColumn<{
1770
- name: "code_hash";
1771
- tableName: "app_oauth_authorization_codes";
1772
- dataType: "string";
1773
- columnType: "PgText";
1774
- data: string;
1775
- driverParam: string;
1776
- notNull: true;
1777
- hasDefault: false;
1778
- isPrimaryKey: false;
1779
- isAutoincrement: false;
1780
- hasRuntimeDefault: false;
1781
- enumValues: [string, ...string[]];
1782
- baseColumn: never;
1783
- identity: undefined;
1784
- generated: undefined;
1785
- }, {}, {}>;
1786
- stateHash: import("drizzle-orm/pg-core").PgColumn<{
1787
- name: "state_hash";
1788
- tableName: "app_oauth_authorization_codes";
1789
- dataType: "string";
1790
- columnType: "PgText";
1791
- data: string;
1792
- driverParam: string;
1793
- notNull: true;
1794
- hasDefault: false;
1795
- isPrimaryKey: false;
1796
- isAutoincrement: false;
1797
- hasRuntimeDefault: false;
1798
- enumValues: [string, ...string[]];
1799
- baseColumn: never;
1800
- identity: undefined;
1801
- generated: undefined;
1802
- }, {}, {}>;
1803
- redirectUri: import("drizzle-orm/pg-core").PgColumn<{
1804
- name: "redirect_uri";
1805
- tableName: "app_oauth_authorization_codes";
1806
- dataType: "string";
1807
- columnType: "PgText";
1808
- data: string;
1809
- driverParam: string;
1810
- notNull: true;
1811
- hasDefault: false;
1812
- isPrimaryKey: false;
1813
- isAutoincrement: false;
1814
- hasRuntimeDefault: false;
1815
- enumValues: [string, ...string[]];
1816
- baseColumn: never;
1817
- identity: undefined;
1818
- generated: undefined;
1819
- }, {}, {}>;
1820
- codeChallenge: import("drizzle-orm/pg-core").PgColumn<{
1821
- name: "code_challenge";
1822
- tableName: "app_oauth_authorization_codes";
1823
- dataType: "string";
1824
- columnType: "PgText";
1825
- data: string;
1826
- driverParam: string;
1827
- notNull: true;
1828
- hasDefault: false;
1829
- isPrimaryKey: false;
1830
- isAutoincrement: false;
1831
- hasRuntimeDefault: false;
1832
- enumValues: [string, ...string[]];
1833
- baseColumn: never;
1834
- identity: undefined;
1835
- generated: undefined;
1836
- }, {}, {}>;
1837
- codeChallengeMethod: import("drizzle-orm/pg-core").PgColumn<{
1838
- name: "code_challenge_method";
1839
- tableName: "app_oauth_authorization_codes";
1840
- dataType: "string";
1841
- columnType: "PgText";
1842
- data: string;
1843
- driverParam: string;
1844
- notNull: true;
1845
- hasDefault: false;
1846
- isPrimaryKey: false;
1847
- isAutoincrement: false;
1848
- hasRuntimeDefault: false;
1849
- enumValues: [string, ...string[]];
1850
- baseColumn: never;
1851
- identity: undefined;
1852
- generated: undefined;
1853
- }, {}, {}>;
1854
- requestedScopes: import("drizzle-orm/pg-core").PgColumn<{
1855
- name: "requested_scopes";
1856
- tableName: "app_oauth_authorization_codes";
1857
- dataType: "json";
1858
- columnType: "PgJsonb";
1859
- data: string[];
1860
- driverParam: unknown;
1861
- notNull: true;
1862
- hasDefault: false;
1863
- isPrimaryKey: false;
1864
- isAutoincrement: false;
1865
- hasRuntimeDefault: false;
1866
- enumValues: undefined;
1867
- baseColumn: never;
1868
- identity: undefined;
1869
- generated: undefined;
1870
- }, {}, {
1871
- $type: string[];
1872
- }>;
1873
- grantedScopes: import("drizzle-orm/pg-core").PgColumn<{
1874
- name: "granted_scopes";
1875
- tableName: "app_oauth_authorization_codes";
1876
- dataType: "json";
1877
- columnType: "PgJsonb";
1878
- data: string[];
1879
- driverParam: unknown;
1880
- notNull: true;
1881
- hasDefault: false;
1882
- isPrimaryKey: false;
1883
- isAutoincrement: false;
1884
- hasRuntimeDefault: false;
1885
- enumValues: undefined;
1886
- baseColumn: never;
1887
- identity: undefined;
1888
- generated: undefined;
1889
- }, {}, {
1890
- $type: string[];
1891
- }>;
1892
- deniedOptionalScopes: import("drizzle-orm/pg-core").PgColumn<{
1893
- name: "denied_optional_scopes";
1894
- tableName: "app_oauth_authorization_codes";
1895
- dataType: "json";
1896
- columnType: "PgJsonb";
1897
- data: string[];
1898
- driverParam: unknown;
1899
- notNull: true;
1900
- hasDefault: false;
1901
- isPrimaryKey: false;
1902
- isAutoincrement: false;
1903
- hasRuntimeDefault: false;
1904
- enumValues: undefined;
1905
- baseColumn: never;
1906
- identity: undefined;
1907
- generated: undefined;
1908
- }, {}, {
1909
- $type: string[];
1910
- }>;
1911
- actorId: import("drizzle-orm/pg-core").PgColumn<{
1912
- name: "actor_id";
1913
- tableName: "app_oauth_authorization_codes";
1914
- dataType: "string";
1915
- columnType: "PgText";
1916
- data: string;
1917
- driverParam: string;
1918
- notNull: true;
1919
- hasDefault: false;
1920
- isPrimaryKey: false;
1921
- isAutoincrement: false;
1922
- hasRuntimeDefault: false;
1923
- enumValues: [string, ...string[]];
1924
- baseColumn: never;
1925
- identity: undefined;
1926
- generated: undefined;
1927
- }, {}, {}>;
1928
- expiresAt: import("drizzle-orm/pg-core").PgColumn<{
1929
- name: "expires_at";
1930
- tableName: "app_oauth_authorization_codes";
1931
- dataType: "date";
1932
- columnType: "PgTimestamp";
1933
- data: Date;
1934
- driverParam: string;
1935
- notNull: true;
1936
- hasDefault: false;
1937
- isPrimaryKey: false;
1938
- isAutoincrement: false;
1939
- hasRuntimeDefault: false;
1940
- enumValues: undefined;
1941
- baseColumn: never;
1942
- identity: undefined;
1943
- generated: undefined;
1944
- }, {}, {}>;
1945
- consumedAt: import("drizzle-orm/pg-core").PgColumn<{
1946
- name: "consumed_at";
1947
- tableName: "app_oauth_authorization_codes";
1948
- dataType: "date";
1949
- columnType: "PgTimestamp";
1950
- data: Date;
1951
- driverParam: string;
1952
- notNull: false;
1953
- hasDefault: false;
1954
- isPrimaryKey: false;
1955
- isAutoincrement: false;
1956
- hasRuntimeDefault: false;
1957
- enumValues: undefined;
1958
- baseColumn: never;
1959
- identity: undefined;
1960
- generated: undefined;
1961
- }, {}, {}>;
1962
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
1963
- name: "created_at";
1964
- tableName: "app_oauth_authorization_codes";
1965
- dataType: "date";
1966
- columnType: "PgTimestamp";
1967
- data: Date;
1968
- driverParam: string;
1969
- notNull: true;
1970
- hasDefault: true;
1971
- isPrimaryKey: false;
1972
- isAutoincrement: false;
1973
- hasRuntimeDefault: false;
1974
- enumValues: undefined;
1975
- baseColumn: never;
1976
- identity: undefined;
1977
- generated: undefined;
1978
- }, {}, {}>;
1979
- };
1980
- dialect: "pg";
1981
- }>;
1982
- export declare const appOAuthRefreshTokens: import("drizzle-orm/pg-core").PgTableWithColumns<{
1983
- name: "app_oauth_refresh_tokens";
1984
- schema: undefined;
1985
- columns: {
1986
- id: import("drizzle-orm/pg-core").PgColumn<{
1987
- name: string;
1988
- tableName: "app_oauth_refresh_tokens";
1989
- dataType: "string";
1990
- columnType: "PgText";
1991
- data: string;
1992
- driverParam: string;
1993
- notNull: true;
1994
- hasDefault: true;
1995
- isPrimaryKey: true;
1996
- isAutoincrement: false;
1997
- hasRuntimeDefault: true;
1998
- enumValues: [string, ...string[]];
1999
- baseColumn: never;
2000
- identity: undefined;
2001
- generated: undefined;
2002
- }, {}, {}>;
2003
- installationId: import("drizzle-orm/pg-core").PgColumn<{
2004
- name: "installation_id";
2005
- tableName: "app_oauth_refresh_tokens";
2006
- dataType: "string";
2007
- columnType: "PgText";
2008
- data: string;
2009
- driverParam: string;
2010
- notNull: true;
2011
- hasDefault: false;
2012
- isPrimaryKey: false;
2013
- isAutoincrement: false;
2014
- hasRuntimeDefault: false;
2015
- enumValues: [string, ...string[]];
2016
- baseColumn: never;
2017
- identity: undefined;
2018
- generated: undefined;
2019
- }, {}, {}>;
2020
- tokenHash: import("drizzle-orm/pg-core").PgColumn<{
2021
- name: "token_hash";
2022
- tableName: "app_oauth_refresh_tokens";
2023
- dataType: "string";
2024
- columnType: "PgText";
2025
- data: string;
2026
- driverParam: string;
2027
- notNull: true;
2028
- hasDefault: false;
2029
- isPrimaryKey: false;
2030
- isAutoincrement: false;
2031
- hasRuntimeDefault: false;
2032
- enumValues: [string, ...string[]];
2033
- baseColumn: never;
2034
- identity: undefined;
2035
- generated: undefined;
2036
- }, {}, {}>;
2037
- generation: import("drizzle-orm/pg-core").PgColumn<{
2038
- name: "generation";
2039
- tableName: "app_oauth_refresh_tokens";
2040
- dataType: "number";
2041
- columnType: "PgInteger";
2042
- data: number;
2043
- driverParam: string | number;
2044
- notNull: true;
2045
- hasDefault: false;
2046
- isPrimaryKey: false;
2047
- isAutoincrement: false;
2048
- hasRuntimeDefault: false;
2049
- enumValues: undefined;
2050
- baseColumn: never;
2051
- identity: undefined;
2052
- generated: undefined;
2053
- }, {}, {}>;
2054
- status: import("drizzle-orm/pg-core").PgColumn<{
2055
- name: "status";
2056
- tableName: "app_oauth_refresh_tokens";
2057
- dataType: "string";
2058
- columnType: "PgEnumColumn";
2059
- data: "active" | "revoked" | "inactive";
2060
- driverParam: string;
2061
- notNull: true;
2062
- hasDefault: true;
2063
- isPrimaryKey: false;
2064
- isAutoincrement: false;
2065
- hasRuntimeDefault: false;
2066
- enumValues: ["active", "inactive", "revoked"];
2067
- baseColumn: never;
2068
- identity: undefined;
2069
- generated: undefined;
2070
- }, {}, {}>;
2071
- rotatedFromId: import("drizzle-orm/pg-core").PgColumn<{
2072
- name: "rotated_from_id";
2073
- tableName: "app_oauth_refresh_tokens";
2074
- dataType: "string";
2075
- columnType: "PgText";
2076
- data: string;
2077
- driverParam: string;
2078
- notNull: false;
2079
- hasDefault: false;
2080
- isPrimaryKey: false;
2081
- isAutoincrement: false;
2082
- hasRuntimeDefault: false;
2083
- enumValues: [string, ...string[]];
2084
- baseColumn: never;
2085
- identity: undefined;
2086
- generated: undefined;
2087
- }, {}, {}>;
2088
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
2089
- name: "created_at";
2090
- tableName: "app_oauth_refresh_tokens";
2091
- dataType: "date";
2092
- columnType: "PgTimestamp";
2093
- data: Date;
2094
- driverParam: string;
2095
- notNull: true;
2096
- hasDefault: true;
2097
- isPrimaryKey: false;
2098
- isAutoincrement: false;
2099
- hasRuntimeDefault: false;
2100
- enumValues: undefined;
2101
- baseColumn: never;
2102
- identity: undefined;
2103
- generated: undefined;
2104
- }, {}, {}>;
2105
- expiresAt: import("drizzle-orm/pg-core").PgColumn<{
2106
- name: "expires_at";
2107
- tableName: "app_oauth_refresh_tokens";
2108
- dataType: "date";
2109
- columnType: "PgTimestamp";
2110
- data: Date;
2111
- driverParam: string;
2112
- notNull: false;
2113
- hasDefault: false;
2114
- isPrimaryKey: false;
2115
- isAutoincrement: false;
2116
- hasRuntimeDefault: false;
2117
- enumValues: undefined;
2118
- baseColumn: never;
2119
- identity: undefined;
2120
- generated: undefined;
2121
- }, {}, {}>;
2122
- revokedAt: import("drizzle-orm/pg-core").PgColumn<{
2123
- name: "revoked_at";
2124
- tableName: "app_oauth_refresh_tokens";
2125
- dataType: "date";
2126
- columnType: "PgTimestamp";
2127
- data: Date;
2128
- driverParam: string;
2129
- notNull: false;
2130
- hasDefault: false;
2131
- isPrimaryKey: false;
2132
- isAutoincrement: false;
2133
- hasRuntimeDefault: false;
2134
- enumValues: undefined;
2135
- baseColumn: never;
2136
- identity: undefined;
2137
- generated: undefined;
2138
- }, {}, {}>;
2139
- };
2140
- dialect: "pg";
2141
- }>;
2142
1611
  export declare const appInstallationSettings: import("drizzle-orm/pg-core").PgTableWithColumns<{
2143
1612
  name: "app_installation_settings";
2144
1613
  schema: undefined;
@@ -2860,14 +2329,14 @@ export declare const appAuditEvents: import("drizzle-orm/pg-core").PgTableWithCo
2860
2329
  tableName: "app_audit_events";
2861
2330
  dataType: "string";
2862
2331
  columnType: "PgEnumColumn";
2863
- data: "lifecycle" | "grant" | "consent" | "credential" | "token" | "reconciliation" | "purge";
2332
+ data: "lifecycle" | "grant" | "credential" | "reconciliation" | "purge";
2864
2333
  driverParam: string;
2865
2334
  notNull: true;
2866
2335
  hasDefault: false;
2867
2336
  isPrimaryKey: false;
2868
2337
  isAutoincrement: false;
2869
2338
  hasRuntimeDefault: false;
2870
- enumValues: ["lifecycle", "grant", "consent", "credential", "token", "reconciliation", "purge"];
2339
+ enumValues: ["lifecycle", "grant", "credential", "reconciliation", "purge"];
2871
2340
  baseColumn: never;
2872
2341
  identity: undefined;
2873
2342
  generated: undefined;
@@ -2934,4 +2403,3 @@ export type AppRelease = typeof appReleases.$inferSelect;
2934
2403
  export type NewAppRelease = typeof appReleases.$inferInsert;
2935
2404
  export type AppInstallation = typeof appInstallations.$inferSelect;
2936
2405
  export type NewAppInstallation = typeof appInstallations.$inferInsert;
2937
- export type AppAccessCredential = typeof appAccessCredentials.$inferSelect;