@fabrika/iam-contract 0.6.0 → 0.7.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 (2) hide show
  1. package/package.json +3 -3
  2. package/src/index.ts +8 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fabrika/iam-contract",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,7 +24,7 @@
24
24
  "typecheck": "tsc --noEmit"
25
25
  },
26
26
  "dependencies": {
27
- "@fabrika/app": "0.6.0",
28
- "@fabrika/auth-core": "0.6.0"
27
+ "@fabrika/app": "0.7.0",
28
+ "@fabrika/auth-core": "0.7.0"
29
29
  }
30
30
  }
package/src/index.ts CHANGED
@@ -22,6 +22,7 @@ import type {
22
22
  PrincipalAffiliation,
23
23
  PrincipalType,
24
24
  RoleDef,
25
+ WorkloadKind,
25
26
  } from '@fabrika/auth-core'
26
27
 
27
28
  // ── Common wrappers ───────────────────────────────────────────────────────────
@@ -487,7 +488,7 @@ export interface ListAuthLogInput {
487
488
  type RpcProcedure<TInput, TOutput> = RpcProcedureContract<TInput, TOutput>
488
489
 
489
490
  /** Browser-safe typed contract for the IAM administration API. */
490
- // ── Workload keys (Control's reconcile of jobs and webhooks) ──────────────────
491
+ // ── Workload keys (Control's reconcile of jobs, webhooks and public procedures) ──────────────────
491
492
 
492
493
  /**
493
494
  * Issue a fresh key for one workload of an application (ADR-0022 "Principal kinds"). The key resolves to the actions
@@ -496,8 +497,11 @@ type RpcProcedure<TInput, TOutput> = RpcProcedureContract<TInput, TOutput>
496
497
  export interface IssueWorkloadKeyRequest {
497
498
  /** The IAM application id `<app>@<env>`. */
498
499
  app: string
499
- /** `app` is the connector of the application named `name`, which consumes an export of `app`. */
500
- kind: 'job' | 'webhook' | 'app'
500
+ /**
501
+ * `public` is a public procedure, named by its endpoint id; `app` is the connector of the application named `name`,
502
+ * which consumes an export of `app`.
503
+ */
504
+ kind: WorkloadKind
501
505
  name: string
502
506
  /** Absolute expiry (unix seconds), after now and at most 30 days ahead. */
503
507
  expiresAt: number
@@ -522,7 +526,7 @@ export interface IssueWorkloadKeyResponse {
522
526
  */
523
527
  export interface RevokeWorkloadKeysRequest {
524
528
  app: string
525
- kind: 'job' | 'webhook' | 'app'
529
+ kind: WorkloadKind
526
530
  name: string
527
531
  }
528
532