@pipeline-builder/pipeline-data 6.1.1 → 6.2.1

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 (43) hide show
  1. package/lib/api/org-data-ownership.d.ts +12 -0
  2. package/lib/api/org-data-ownership.js +27 -9
  3. package/lib/api/public-directory.d.ts +18 -1
  4. package/lib/api/public-directory.js +24 -23
  5. package/lib/api/reporting/compliance-trend.d.ts +43 -0
  6. package/lib/api/reporting/compliance-trend.js +102 -0
  7. package/lib/api/reporting/delivery.d.ts +174 -0
  8. package/lib/api/reporting/delivery.js +299 -0
  9. package/lib/api/reporting/dora-scoring.d.ts +12 -23
  10. package/lib/api/reporting/dora-scoring.js +42 -15
  11. package/lib/api/reporting/dora.d.ts +11 -7
  12. package/lib/api/reporting/dora.js +340 -173
  13. package/lib/api/reporting/flaky-stages.d.ts +18 -0
  14. package/lib/api/reporting/flaky-stages.js +137 -0
  15. package/lib/api/reporting/flow.d.ts +121 -0
  16. package/lib/api/reporting/flow.js +312 -0
  17. package/lib/api/reporting/insights.d.ts +89 -0
  18. package/lib/api/reporting/insights.js +97 -0
  19. package/lib/api/reporting/security.d.ts +162 -0
  20. package/lib/api/reporting/security.js +280 -0
  21. package/lib/api/reporting/stakeholder/compose.d.ts +11 -2
  22. package/lib/api/reporting/stakeholder/compose.js +112 -3
  23. package/lib/api/reporting/stakeholder/sections.d.ts +28 -0
  24. package/lib/api/reporting/stakeholder/sections.js +43 -1
  25. package/lib/api/reporting/stakeholder/store.d.ts +24 -2
  26. package/lib/api/reporting/stakeholder/store.js +44 -10
  27. package/lib/api/reporting/team-benchmark.d.ts +133 -0
  28. package/lib/api/reporting/team-benchmark.js +155 -0
  29. package/lib/api/reporting/types.d.ts +122 -17
  30. package/lib/api/reporting/types.js +1 -1
  31. package/lib/api/reporting-service.d.ts +21 -2
  32. package/lib/api/reporting-service.js +117 -13
  33. package/lib/database/drizzle-schema.d.ts +612 -0
  34. package/lib/database/drizzle-schema.js +6 -2
  35. package/lib/database/index.d.ts +1 -1
  36. package/lib/database/index.js +2 -2
  37. package/lib/database/schema/pipeline.d.ts +3 -2
  38. package/lib/database/schema/pipeline.js +4 -3
  39. package/lib/database/schema/runner.d.ts +737 -9
  40. package/lib/database/schema/runner.js +125 -11
  41. package/lib/index.d.ts +7 -1
  42. package/lib/index.js +19 -2
  43. package/package.json +2 -2
@@ -84,6 +84,12 @@ export interface MintedShareLink {
84
84
  export interface ResolvedShareLink {
85
85
  link: ReportShareLink;
86
86
  run: ReportRun;
87
+ /**
88
+ * The owner of the run's definition: the identity the route re-checks the
89
+ * account's `stakeholder_reports` entitlement against (the same one the scheduler
90
+ * authorizes runs as), since a public read has no caller of its own.
91
+ */
92
+ ownerId: string;
87
93
  }
88
94
  export declare class StakeholderReportStore {
89
95
  createDefinition(input: CreateDefinitionInput): Promise<ReportDefinition>;
@@ -191,6 +197,15 @@ export declare class StakeholderReportStore {
191
197
  revokeShareLink(orgId: string, id: string, revokedBy: string): Promise<ReportShareLink>;
192
198
  /** Revoke every live link to any run of a definition. Used on delete. */
193
199
  revokeLinksForDefinition(orgId: string, definitionId: string, revokedBy: string): Promise<number>;
200
+ /**
201
+ * Revoke every live share link in the org. The `externalSharing` turn-off leg:
202
+ * an admin who switches public links off means the ones already handed out too.
203
+ *
204
+ * Only links not already revoked are touched, so an earlier revoke keeps its own
205
+ * actor and instant. Turning sharing back on does NOT undo this — there is no
206
+ * un-revoke, so a link that died with the switch stays dead.
207
+ */
208
+ revokeAllShareLinks(orgId: string, revokedBy: string, now?: Date): Promise<number>;
194
209
  /**
195
210
  * Resolve a share token to its link and run, for the UNAUTHENTICATED public
196
211
  * route.
@@ -206,9 +221,16 @@ export declare class StakeholderReportStore {
206
221
  * caller can widen — there is no other predicate to influence.
207
222
  * - Expired and revoked links resolve to null here, so the caller cannot
208
223
  * accidentally serve one by forgetting a check.
224
+ * - The org's `externalSharing` policy is re-read HERE, at read time, not only
225
+ * when the link was minted: an admin who turns sharing off has turned off the
226
+ * links already out there, even before (or without) the turn-off revoke.
227
+ *
228
+ * The caller still owes one check this store cannot make: whether the account
229
+ * still holds the `stakeholder_reports` entitlement (platform's answer, keyed by
230
+ * the returned `ownerId`).
209
231
  *
210
- * Returns null for every failure — unknown, revoked, expired, or pointing at a
211
- * run that is no longer published — so the route answers one indistinguishable
232
+ * Returns null for every failure — unknown, revoked, expired, sharing turned off,
233
+ * or pointing at a run that is no longer published — so the route answers one indistinguishable
212
234
  * 404 and a holder of a dead link learns nothing about which of those it was.
213
235
  */
214
236
  resolveShareLink(token: string, now?: Date): Promise<ResolvedShareLink | null>;