@kindgi/types 0.1.2 → 0.1.3

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/dist/filter.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { Brand } from './ids.js';
1
+ import type { Brand, OrgId, ProjectId } from './ids.js';
2
2
  import type { Timestamp } from './temporal.js';
3
3
  /**
4
4
  * Opaque pagination cursor. Producers return a `Cursor`; consumers pass
@@ -58,4 +58,18 @@ export interface Page<T> {
58
58
  readonly nextCursor?: Cursor;
59
59
  readonly truncated?: boolean;
60
60
  }
61
+ /**
62
+ * A list's content scope: one project's records, or those of every
63
+ * project in an org. Absent: the whole tenant. Lists of content (runs,
64
+ * approvals, conversations, provenance) take it; on the wire it is
65
+ * `?scopeKind=project|org&scopeId=…`. It narrows a list, it isn't an
66
+ * authorization boundary.
67
+ */
68
+ export type ListScope = {
69
+ readonly kind: 'project';
70
+ readonly projectId: ProjectId;
71
+ } | {
72
+ readonly kind: 'org';
73
+ readonly orgId: OrgId;
74
+ };
61
75
  //# sourceMappingURL=filter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../src/filter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C;;;;;GAKG;AACH,MAAM,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;AAE7C;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,MAAM,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IACrD;;;;OAIG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,OAAO,EAAE,CAAC;IAC/C;;;OAGG;IACH,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC;IAC3B;;;OAGG;IACH,QAAQ,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QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GACjB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAA;CAAE,GAC3D;IAAE,QAAQ,CAAC,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kindgi/types",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Foundational TypeScript types shared across Kindgi. Branded IDs, timestamps, hashes, refs, Result, list filter / page shapes. Zero runtime dependencies; the only runtime export is the makeEnvName validator.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
package/src/filter.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  // SPDX-License-Identifier: Apache-2.0
2
2
  // Copyright (C) 2026 Kindgi Inc.
3
3
 
4
- import type { Brand } from './ids.js';
4
+ import type { Brand, OrgId, ProjectId } from './ids.js';
5
5
  import type { Timestamp } from './temporal.js';
6
6
 
7
7
  /**
@@ -64,3 +64,14 @@ export interface Page<T> {
64
64
  readonly nextCursor?: Cursor;
65
65
  readonly truncated?: boolean;
66
66
  }
67
+
68
+ /**
69
+ * A list's content scope: one project's records, or those of every
70
+ * project in an org. Absent: the whole tenant. Lists of content (runs,
71
+ * approvals, conversations, provenance) take it; on the wire it is
72
+ * `?scopeKind=project|org&scopeId=…`. It narrows a list, it isn't an
73
+ * authorization boundary.
74
+ */
75
+ export type ListScope =
76
+ | { readonly kind: 'project'; readonly projectId: ProjectId }
77
+ | { readonly kind: 'org'; readonly orgId: OrgId };