@company-semantics/contracts 0.55.0 → 0.57.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@company-semantics/contracts",
3
- "version": "0.55.0",
3
+ "version": "0.57.0",
4
4
  "private": false,
5
5
  "repository": {
6
6
  "type": "git",
@@ -0,0 +1 @@
1
+ export type { OrgPlanStatus, OrgBillingInfo } from './types';
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Organization Billing Types (v1)
3
+ *
4
+ * Read-only billing DTO types for the org billing surface.
5
+ * v1 constraint: billingOwnerUserId MUST equal org.ownerUserId.
6
+ *
7
+ * @see PRD-00121 for design rationale
8
+ */
9
+
10
+ /**
11
+ * Organization plan status.
12
+ */
13
+ export type OrgPlanStatus = 'active' | 'trialing' | 'past_due' | 'canceled';
14
+
15
+ /**
16
+ * Read-only billing information for an organization.
17
+ *
18
+ * @invariant billingOwnerUserId === org.ownerUserId in v1 (no separate billing owner)
19
+ * @invariant This DTO is read-only — no mutations in v1
20
+ */
21
+ export interface OrgBillingInfo {
22
+ planName: string;
23
+ planStatus: OrgPlanStatus;
24
+ billingCadence: string;
25
+ seatCount: number;
26
+ seatLimit: number;
27
+ /**
28
+ * Must equal org.ownerUserId in v1.
29
+ * No separate billing owner concept yet.
30
+ */
31
+ billingOwnerUserId: string;
32
+ }
package/src/index.ts CHANGED
@@ -362,3 +362,7 @@ export type {
362
362
  // @see PRD-00013 for contracts integration
363
363
  export type { RateLimitConfig, RateLimitResult } from './rate-limit/index'
364
364
  export { RateLimitTier } from './rate-limit/index'
365
+
366
+ // Billing domain types (v1 — read-only)
367
+ // @see PRD-00121 for design rationale
368
+ export type { OrgPlanStatus, OrgBillingInfo } from './billing/index'
package/src/org/types.ts CHANGED
@@ -57,7 +57,7 @@ export interface OwnershipTransferStatus {
57
57
  * Display role for workspace members.
58
58
  * Presentation-layer simplification of the internal RBAC roles.
59
59
  */
60
- export type WorkspaceRole = 'owner' | 'admin' | 'member';
60
+ export type WorkspaceRole = 'owner' | 'admin' | 'member' | 'auditor';
61
61
 
62
62
  /**
63
63
  * RBAC → UI role mapping (presentation only).
@@ -66,6 +66,7 @@ export type WorkspaceRole = 'owner' | 'admin' | 'member';
66
66
  export const ROLE_DISPLAY_MAP = {
67
67
  org_owner: 'owner',
68
68
  org_admin: 'admin',
69
+ org_auditor: 'auditor',
69
70
  // All other roles → 'member'
70
71
  } as const satisfies Partial<Record<string, WorkspaceRole>>;
71
72
 
@@ -77,6 +78,8 @@ export interface WorkspaceOverview {
77
78
  id: string;
78
79
  name: string;
79
80
  type: OrgType;
81
+ /** Square logo URL for the workspace. Null if no logo has been set. */
82
+ logoUrl: string | null;
80
83
  owner: {
81
84
  id: string;
82
85
  name: string;