@sealkeeper/schema 0.4.6 → 0.4.8

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 (90) hide show
  1. package/README.md +2 -2
  2. package/dist/api.d.ts +787 -35
  3. package/dist/api.js +357 -44
  4. package/dist/conformance.d.ts +4 -0
  5. package/dist/conformance.js +7 -0
  6. package/dist/credential.d.ts +196 -27
  7. package/dist/credential.js +128 -80
  8. package/dist/dimensions.d.ts +16 -3
  9. package/dist/dimensions.js +48 -2
  10. package/dist/events.d.ts +1 -0
  11. package/dist/events.js +13 -1
  12. package/dist/fingerprint-conformance.d.ts +17 -0
  13. package/dist/fingerprint-conformance.js +83 -0
  14. package/dist/fingerprint.d.ts +132 -0
  15. package/dist/fingerprint.js +166 -0
  16. package/dist/goal.d.ts +16 -1
  17. package/dist/goal.js +29 -6
  18. package/dist/handshake-conformance.d.ts +18 -0
  19. package/dist/handshake-conformance.js +276 -0
  20. package/dist/handshake.d.ts +66 -0
  21. package/dist/handshake.js +187 -0
  22. package/dist/hidden.d.ts +1 -0
  23. package/dist/hidden.js +5 -0
  24. package/dist/index.d.ts +4 -1
  25. package/dist/index.js +4 -1
  26. package/dist/moderation.js +1 -4
  27. package/dist/policy.d.ts +1 -1
  28. package/dist/policy.js +1 -1
  29. package/dist/seal-conformance.js +148 -4
  30. package/dist/seal-verify.d.ts +21 -0
  31. package/dist/seal-verify.js +63 -0
  32. package/dist/standing.d.ts +61 -0
  33. package/dist/standing.js +132 -4
  34. package/dist/task-templates.d.ts +46 -0
  35. package/dist/task-templates.js +501 -0
  36. package/dist/tasks.d.ts +43 -0
  37. package/dist/tasks.js +103 -0
  38. package/dist/template-conformance.d.ts +10 -0
  39. package/dist/template-conformance.js +298 -0
  40. package/dist/top-dimensions.d.ts +3 -3
  41. package/dist/top-dimensions.js +12 -6
  42. package/package.json +4 -8
  43. package/dist/db/agent-milestones.d.ts +0 -75
  44. package/dist/db/agent-milestones.js +0 -16
  45. package/dist/db/agent-renames.d.ts +0 -126
  46. package/dist/db/agent-renames.js +0 -20
  47. package/dist/db/agents.d.ts +0 -351
  48. package/dist/db/agents.js +0 -99
  49. package/dist/db/client.d.ts +0 -2561
  50. package/dist/db/client.js +0 -61
  51. package/dist/db/credentials.d.ts +0 -143
  52. package/dist/db/credentials.js +0 -16
  53. package/dist/db/deleted-operators.d.ts +0 -75
  54. package/dist/db/deleted-operators.js +0 -13
  55. package/dist/db/events.d.ts +0 -160
  56. package/dist/db/events.js +0 -41
  57. package/dist/db/feed-items.d.ts +0 -109
  58. package/dist/db/feed-items.js +0 -21
  59. package/dist/db/index.d.ts +0 -76
  60. package/dist/db/index.js +0 -28
  61. package/dist/db/migrate.d.ts +0 -1
  62. package/dist/db/migrate.js +0 -34
  63. package/dist/db/migrator.d.ts +0 -6
  64. package/dist/db/migrator.js +0 -36
  65. package/dist/db/operator-identities.d.ts +0 -211
  66. package/dist/db/operator-identities.js +0 -49
  67. package/dist/db/operator-level-grants.d.ts +0 -109
  68. package/dist/db/operator-level-grants.js +0 -30
  69. package/dist/db/operator-slugs.d.ts +0 -92
  70. package/dist/db/operator-slugs.js +0 -25
  71. package/dist/db/operators.d.ts +0 -228
  72. package/dist/db/operators.js +0 -39
  73. package/dist/db/quota-counters.d.ts +0 -109
  74. package/dist/db/quota-counters.js +0 -17
  75. package/dist/db/ratings.d.ts +0 -160
  76. package/dist/db/ratings.js +0 -27
  77. package/dist/db/scores.d.ts +0 -160
  78. package/dist/db/scores.js +0 -15
  79. package/dist/db/standing.d.ts +0 -264
  80. package/dist/db/standing.js +0 -34
  81. package/dist/db/task-claim-failures.d.ts +0 -143
  82. package/dist/db/task-claim-failures.js +0 -37
  83. package/dist/db/task-outcomes.d.ts +0 -145
  84. package/dist/db/task-outcomes.js +0 -25
  85. package/dist/db/tasks.d.ts +0 -381
  86. package/dist/db/tasks.js +0 -106
  87. package/dist/db/timestamps.d.ts +0 -4
  88. package/dist/db/timestamps.js +0 -24
  89. package/dist/db/url.d.ts +0 -12
  90. package/dist/db/url.js +0 -25
package/dist/db/url.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import type { Options } from 'postgres';
2
- /**
3
- * Turns DATABASE_URL into arguments for postgres.js.
4
- *
5
- * On Cloud Run the URL uses the Cloud SQL socket form with an empty host,
6
- * `postgres://user:pass@/db?host=/cloudsql/project:region:instance`.
7
- * postgres.js cannot parse an empty host and ignores `?host=`, so this moves
8
- * the socket directory into the `path` option. Other URLs pass through.
9
- *
10
- * Errors never include the URL, because it carries the password.
11
- */
12
- export declare function pgArgs(databaseUrl: string): [string, Options<never>];
package/dist/db/url.js DELETED
@@ -1,25 +0,0 @@
1
- /**
2
- * Turns DATABASE_URL into arguments for postgres.js.
3
- *
4
- * On Cloud Run the URL uses the Cloud SQL socket form with an empty host,
5
- * `postgres://user:pass@/db?host=/cloudsql/project:region:instance`.
6
- * postgres.js cannot parse an empty host and ignores `?host=`, so this moves
7
- * the socket directory into the `path` option. Other URLs pass through.
8
- *
9
- * Errors never include the URL, because it carries the password.
10
- */
11
- export function pgArgs(databaseUrl) {
12
- const withHost = databaseUrl.replace(/^(postgres(?:ql)?:\/\/[^/@]*@)\//, '$1localhost/');
13
- let u;
14
- try {
15
- u = new URL(withHost);
16
- }
17
- catch {
18
- throw new Error('DATABASE_URL is not a valid postgres URL');
19
- }
20
- const socketDir = u.searchParams.get('host');
21
- if (!socketDir)
22
- return [databaseUrl, {}];
23
- u.searchParams.delete('host');
24
- return [u.toString(), { path: `${socketDir}/.s.PGSQL.${u.port || 5432}` }];
25
- }