@antcde/connect-ts 0.4.26 → 0.4.27-rc.10

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 (265) hide show
  1. package/README.md +67 -3
  2. package/build/AntConnect.d.ts +8 -0
  3. package/build/AntConnect.d.ts.map +1 -1
  4. package/build/AntConnect.js +8 -0
  5. package/build/AntHttpClient.d.ts +0 -5
  6. package/build/AntHttpClient.d.ts.map +1 -1
  7. package/build/AntHttpClient.js +0 -5
  8. package/build/ai/index.d.ts +5 -0
  9. package/build/ai/index.d.ts.map +1 -0
  10. package/build/ai/index.js +3 -0
  11. package/build/ai/mutationDescriptors.d.ts +3 -0
  12. package/build/ai/mutationDescriptors.d.ts.map +1 -0
  13. package/build/ai/mutationDescriptors.js +207 -0
  14. package/build/ai/mutationTargets.d.ts +21 -0
  15. package/build/ai/mutationTargets.d.ts.map +1 -0
  16. package/build/ai/mutationTargets.js +72 -0
  17. package/build/ai/queryDescriptors.d.ts +3 -0
  18. package/build/ai/queryDescriptors.d.ts.map +1 -0
  19. package/build/ai/queryDescriptors.js +174 -0
  20. package/build/ai/types.d.ts +35 -0
  21. package/build/ai/types.d.ts.map +1 -0
  22. package/build/comms/client.d.ts.map +1 -1
  23. package/build/comms/client.js +39 -41
  24. package/build/comms/connection.d.ts +32 -0
  25. package/build/comms/connection.d.ts.map +1 -0
  26. package/build/comms/connection.js +159 -0
  27. package/build/comms/handshake.d.ts +16 -0
  28. package/build/comms/handshake.d.ts.map +1 -0
  29. package/build/comms/handshake.js +73 -0
  30. package/build/comms/host.d.ts.map +1 -1
  31. package/build/comms/host.js +22 -26
  32. package/build/comms/hostAPI.js +1 -1
  33. package/build/comms/hostSlot.d.ts +23 -0
  34. package/build/comms/hostSlot.d.ts.map +1 -0
  35. package/build/comms/hostSlot.js +55 -0
  36. package/build/comms/models.d.ts +31 -2
  37. package/build/comms/models.d.ts.map +1 -1
  38. package/build/comms/signalChangeTypes.d.ts +27 -1
  39. package/build/comms/signalChangeTypes.d.ts.map +1 -1
  40. package/build/comms/signalChangeTypes.js +7 -0
  41. package/build/comms/signalTypes.d.ts +21 -3
  42. package/build/comms/signalTypes.d.ts.map +1 -1
  43. package/build/comms/transport.d.ts +18 -2
  44. package/build/comms/transport.d.ts.map +1 -1
  45. package/build/comms/transport.js +25 -10
  46. package/build/index.d.ts +8 -35
  47. package/build/index.d.ts.map +1 -1
  48. package/build/index.js +8 -3
  49. package/build/service-runtime.d.ts +9 -0
  50. package/build/service-runtime.d.ts.map +1 -0
  51. package/build/service-runtime.js +10 -0
  52. package/build/service-types-app.d.ts +2 -0
  53. package/build/service-types-app.d.ts.map +1 -0
  54. package/build/service-types-app.js +3 -0
  55. package/build/service-types.d.ts +37 -0
  56. package/build/service-types.d.ts.map +1 -0
  57. package/build/service-types.js +7 -0
  58. package/build/services/AiService.d.ts +18 -0
  59. package/build/services/AiService.d.ts.map +1 -0
  60. package/build/services/AiService.js +9 -0
  61. package/build/services/AppService/factory/accessRequests.d.ts +19 -0
  62. package/build/services/AppService/factory/accessRequests.d.ts.map +1 -0
  63. package/build/services/AppService/factory/accessRequests.js +17 -0
  64. package/build/services/AppService/factory/assignments.d.ts +57 -0
  65. package/build/services/AppService/factory/assignments.d.ts.map +1 -0
  66. package/build/services/AppService/factory/assignments.js +30 -0
  67. package/build/services/AppService/factory/categories.d.ts +30 -0
  68. package/build/services/AppService/factory/categories.d.ts.map +1 -0
  69. package/build/services/AppService/factory/categories.js +11 -0
  70. package/build/services/AppService/factory/channels.d.ts +35 -0
  71. package/build/services/AppService/factory/channels.d.ts.map +1 -0
  72. package/build/services/AppService/factory/channels.js +18 -0
  73. package/build/services/AppService/factory/formData.d.ts +14 -0
  74. package/build/services/AppService/factory/formData.d.ts.map +1 -0
  75. package/build/services/AppService/factory/formData.js +50 -0
  76. package/build/services/AppService/factory/media.d.ts +17 -0
  77. package/build/services/AppService/factory/media.d.ts.map +1 -0
  78. package/build/services/AppService/factory/media.js +10 -0
  79. package/build/services/AppService/factory/resourceAccess.d.ts +21 -0
  80. package/build/services/AppService/factory/resourceAccess.d.ts.map +1 -0
  81. package/build/services/AppService/factory/resourceAccess.js +49 -0
  82. package/build/services/AppService/factory/resourceAssignments.d.ts +66 -0
  83. package/build/services/AppService/factory/resourceAssignments.d.ts.map +1 -0
  84. package/build/services/AppService/factory/resourceAssignments.js +12 -0
  85. package/build/services/AppService/factory/resourceChannels.d.ts +89 -0
  86. package/build/services/AppService/factory/resourceChannels.d.ts.map +1 -0
  87. package/build/services/AppService/factory/resourceChannels.js +19 -0
  88. package/build/services/AppService/factory/resourceCommerce.d.ts +52 -0
  89. package/build/services/AppService/factory/resourceCommerce.d.ts.map +1 -0
  90. package/build/services/AppService/factory/resourceCommerce.js +18 -0
  91. package/build/services/AppService/factory/resourceSnapshot.d.ts +75 -0
  92. package/build/services/AppService/factory/resourceSnapshot.d.ts.map +1 -0
  93. package/build/services/AppService/factory/resourceSnapshot.js +55 -0
  94. package/build/services/AppService/factory/resourceUploads.d.ts +37 -0
  95. package/build/services/AppService/factory/resourceUploads.d.ts.map +1 -0
  96. package/build/services/AppService/factory/resourceUploads.js +8 -0
  97. package/build/services/AppService/factory/resources.d.ts +167 -0
  98. package/build/services/AppService/factory/resources.d.ts.map +1 -0
  99. package/build/services/AppService/factory/resources.js +45 -0
  100. package/build/services/AppService/factory/subscriptions.d.ts +73 -0
  101. package/build/services/AppService/factory/subscriptions.d.ts.map +1 -0
  102. package/build/services/AppService/factory/subscriptions.js +39 -0
  103. package/build/services/AppService/factory/taxonomy.d.ts +25 -0
  104. package/build/services/AppService/factory/taxonomy.d.ts.map +1 -0
  105. package/build/services/AppService/factory/taxonomy.js +5 -0
  106. package/build/services/AppService/index.d.ts +58 -0
  107. package/build/services/AppService/index.d.ts.map +1 -0
  108. package/build/services/AppService/index.js +74 -0
  109. package/build/services/AppService/types/accessRequests.d.ts +164 -0
  110. package/build/services/AppService/types/accessRequests.d.ts.map +1 -0
  111. package/build/services/AppService/types/app.d.ts +124 -0
  112. package/build/services/AppService/types/app.d.ts.map +1 -0
  113. package/build/services/AppService/types/app.js +6 -0
  114. package/build/services/AppService/types/appCategories.d.ts +44 -0
  115. package/build/services/AppService/types/appCategories.d.ts.map +1 -0
  116. package/build/services/AppService/types/appCategories.js +1 -0
  117. package/build/services/AppService/types/appChangelog.d.ts +31 -0
  118. package/build/services/AppService/types/appChangelog.d.ts.map +1 -0
  119. package/build/services/AppService/types/appChangelog.js +1 -0
  120. package/build/services/AppService/types/appConfigStatus.d.ts +68 -0
  121. package/build/services/AppService/types/appConfigStatus.d.ts.map +1 -0
  122. package/build/services/AppService/types/appConfigStatus.js +11 -0
  123. package/build/services/AppService/types/appList.d.ts +211 -0
  124. package/build/services/AppService/types/appList.d.ts.map +1 -0
  125. package/build/services/AppService/types/appList.js +1 -0
  126. package/build/services/AppService/types/appManifest.d.ts +100 -0
  127. package/build/services/AppService/types/appManifest.d.ts.map +1 -0
  128. package/build/services/AppService/types/appManifest.js +4 -0
  129. package/build/services/AppService/types/appMedia.d.ts +136 -0
  130. package/build/services/AppService/types/appMedia.d.ts.map +1 -0
  131. package/build/services/AppService/types/appMedia.js +1 -0
  132. package/build/services/AppService/types/appRequests.d.ts +126 -0
  133. package/build/services/AppService/types/appRequests.d.ts.map +1 -0
  134. package/build/services/AppService/types/appRequests.js +1 -0
  135. package/build/services/AppService/types/appScopes.d.ts +165 -0
  136. package/build/services/AppService/types/appScopes.d.ts.map +1 -0
  137. package/build/services/AppService/types/appScopes.js +1 -0
  138. package/build/services/AppService/types/channels.d.ts +45 -0
  139. package/build/services/AppService/types/channels.d.ts.map +1 -0
  140. package/build/services/AppService/types/channels.js +1 -0
  141. package/build/services/AppService/types/pricingTiers.d.ts +111 -0
  142. package/build/services/AppService/types/pricingTiers.d.ts.map +1 -0
  143. package/build/services/AppService/types/pricingTiers.js +1 -0
  144. package/build/services/AppService/types/publisherStats.d.ts +20 -0
  145. package/build/services/AppService/types/publisherStats.d.ts.map +1 -0
  146. package/build/services/AppService/types/publisherStats.js +1 -0
  147. package/build/services/AppService/types/releaseChannels.d.ts +127 -0
  148. package/build/services/AppService/types/releaseChannels.d.ts.map +1 -0
  149. package/build/services/AppService/types/releaseChannels.js +1 -0
  150. package/build/services/AppService/types/resourceAssignments.d.ts +38 -0
  151. package/build/services/AppService/types/resourceAssignments.d.ts.map +1 -0
  152. package/build/services/AppService/types/resourceAssignments.js +10 -0
  153. package/build/services/AppService/types/resourceEntitlements.d.ts +118 -0
  154. package/build/services/AppService/types/resourceEntitlements.d.ts.map +1 -0
  155. package/build/services/AppService/types/resourceEntitlements.js +1 -0
  156. package/build/services/AppService/types/resourceReleases.d.ts +230 -0
  157. package/build/services/AppService/types/resourceReleases.d.ts.map +1 -0
  158. package/build/services/AppService/types/resourceReleases.js +1 -0
  159. package/build/services/AppService/types/resourceRequests.d.ts +115 -0
  160. package/build/services/AppService/types/resourceRequests.d.ts.map +1 -0
  161. package/build/services/AppService/types/resourceRequests.js +1 -0
  162. package/build/services/AppService/types/seats.d.ts +220 -0
  163. package/build/services/AppService/types/seats.d.ts.map +1 -0
  164. package/build/services/AppService/types/seats.js +4 -0
  165. package/build/services/AppService/types/sellableResources.d.ts +231 -0
  166. package/build/services/AppService/types/sellableResources.d.ts.map +1 -0
  167. package/build/services/AppService/types/sellableResources.js +1 -0
  168. package/build/services/AppService/types/snapshotFileSource.d.ts +110 -0
  169. package/build/services/AppService/types/snapshotFileSource.d.ts.map +1 -0
  170. package/build/services/AppService/types/snapshotFileSource.js +8 -0
  171. package/build/services/AppService/types/snapshotPayload.d.ts +166 -0
  172. package/build/services/AppService/types/snapshotPayload.d.ts.map +1 -0
  173. package/build/services/AppService/types/snapshotPayload.js +19 -0
  174. package/build/services/AppService/types/snapshotSources.d.ts +116 -0
  175. package/build/services/AppService/types/snapshotSources.d.ts.map +1 -0
  176. package/build/services/AppService/types/snapshotSources.js +7 -0
  177. package/build/services/AppService/types/snapshotUploads.d.ts +109 -0
  178. package/build/services/AppService/types/snapshotUploads.d.ts.map +1 -0
  179. package/build/services/AppService/types/snapshotUploads.js +20 -0
  180. package/build/services/AppService/types/subscriptions.d.ts +182 -0
  181. package/build/services/AppService/types/subscriptions.d.ts.map +1 -0
  182. package/build/services/AppService/types/subscriptions.js +1 -0
  183. package/build/services/AppService/types/taxonomy.d.ts +76 -0
  184. package/build/services/AppService/types/taxonomy.d.ts.map +1 -0
  185. package/build/services/AppService/types/taxonomy.js +1 -0
  186. package/build/services/AppService/types.d.ts +27 -0
  187. package/build/services/AppService/types.d.ts.map +1 -0
  188. package/build/services/AppService/types.js +29 -0
  189. package/build/services/DmsService.d.ts +6 -151
  190. package/build/services/DmsService.d.ts.map +1 -1
  191. package/build/services/DmsService.types.d.ts +169 -0
  192. package/build/services/DmsService.types.d.ts.map +1 -0
  193. package/build/services/DmsService.types.js +1 -0
  194. package/build/services/DmsServiceImpl.d.ts.map +1 -1
  195. package/build/services/DmsServiceImpl.js +8 -0
  196. package/build/services/LicenseService.d.ts +1 -1
  197. package/build/services/LicenseService.d.ts.map +1 -1
  198. package/build/services/LicenseService.js +1 -1
  199. package/build/services/OAuthClientService.d.ts +20 -0
  200. package/build/services/OAuthClientService.d.ts.map +1 -0
  201. package/build/services/OAuthClientService.js +12 -0
  202. package/build/services/OAuthClientService.types.d.ts +37 -0
  203. package/build/services/OAuthClientService.types.d.ts.map +1 -0
  204. package/build/services/OAuthClientService.types.js +4 -0
  205. package/build/services/ProjectService.d.ts +21 -0
  206. package/build/services/ProjectService.d.ts.map +1 -1
  207. package/build/services/ProjectService.js +1 -0
  208. package/build/services/ReleaseService.d.ts +1 -0
  209. package/build/services/ReleaseService.d.ts.map +1 -1
  210. package/build/services/SecretService.d.ts +22 -0
  211. package/build/services/SecretService.d.ts.map +1 -0
  212. package/build/services/SecretService.js +21 -0
  213. package/build/services/SecretService.types.d.ts +147 -0
  214. package/build/services/SecretService.types.d.ts.map +1 -0
  215. package/build/services/SecretService.types.js +1 -0
  216. package/build/services/SecretSharing.types.d.ts +112 -0
  217. package/build/services/SecretSharing.types.d.ts.map +1 -0
  218. package/build/services/SecretSharing.types.js +1 -0
  219. package/build/services/TableService.js +7 -7
  220. package/build/services/TaskService.d.ts +3 -3
  221. package/build/services/TaskService.d.ts.map +1 -1
  222. package/build/services/TaskService.js +1 -1
  223. package/build/services/TaskService.requests.d.ts +61 -0
  224. package/build/services/TaskService.requests.d.ts.map +1 -0
  225. package/build/services/TaskService.requests.js +1 -0
  226. package/build/services/TaskService.types.d.ts +21 -53
  227. package/build/services/TaskService.types.d.ts.map +1 -1
  228. package/build/services/TaskServiceQueries.d.ts +2 -0
  229. package/build/services/TaskServiceQueries.d.ts.map +1 -1
  230. package/build/services/TaskServiceQueries.js +13 -2
  231. package/build/services/TaskTemplate.types.d.ts +74 -1
  232. package/build/services/TaskTemplate.types.d.ts.map +1 -1
  233. package/build/services/TokenService.d.ts +5 -1
  234. package/build/services/TokenService.d.ts.map +1 -1
  235. package/build/services/TokenService.js +1 -2
  236. package/build/services/UserService.d.ts +3 -0
  237. package/build/services/UserService.d.ts.map +1 -1
  238. package/build/services/UserService.js +4 -4
  239. package/build/services/Webhook/EventService.d.ts +7 -0
  240. package/build/services/Webhook/EventService.d.ts.map +1 -1
  241. package/build/services/Webhook/TriggerHistoryService.d.ts +1 -1
  242. package/build/services/Webhook/TriggerHistoryService.d.ts.map +1 -1
  243. package/build/services/Webhook/TriggerSecretService.d.ts +88 -0
  244. package/build/services/Webhook/TriggerSecretService.d.ts.map +1 -0
  245. package/build/services/Webhook/TriggerSecretService.js +9 -0
  246. package/build/services/Webhook/TriggerService.d.ts +108 -0
  247. package/build/services/Webhook/TriggerService.d.ts.map +1 -1
  248. package/build/services/Webhook/TriggerService.js +25 -0
  249. package/build/services/Websockets/StoreEvents.d.ts +44 -0
  250. package/build/services/Websockets/StoreEvents.d.ts.map +1 -0
  251. package/build/services/Websockets/StoreEvents.js +5 -0
  252. package/build/services/userPreferences.d.ts +47 -0
  253. package/build/services/userPreferences.d.ts.map +1 -0
  254. package/build/services/userPreferences.js +42 -0
  255. package/package.json +8 -7
  256. package/schemas/app-config.schema.json +85 -8
  257. package/build/services/AppManifest.d.ts +0 -39
  258. package/build/services/AppManifest.d.ts.map +0 -1
  259. package/build/services/AppService.d.ts +0 -57
  260. package/build/services/AppService.d.ts.map +0 -1
  261. package/build/services/AppService.js +0 -47
  262. package/build/services/AppService.types.d.ts +0 -173
  263. package/build/services/AppService.types.d.ts.map +0 -1
  264. /package/build/{services/AppManifest.js → ai/types.js} +0 -0
  265. /package/build/services/{AppService.types.js → AppService/types/accessRequests.js} +0 -0
@@ -0,0 +1,220 @@
1
+ /** Sentinel channel id meaning "all channels" (the channel-agnostic grant). */
2
+ export declare const CHANNEL_ALL = "*";
3
+ /** Result of setting a project's seat bundle for an app. */
4
+ export interface SeatAllocation {
5
+ app_id: string;
6
+ project_id: string;
7
+ /** The project's seat budget; `null` means no cap (cleared / non-seat). */
8
+ seats_allocated: number | null;
9
+ }
10
+ /** Result of assigning / unassigning a role or user to a project install. */
11
+ export interface AppAssignment {
12
+ app_id: string;
13
+ project_id: string;
14
+ role_id?: string;
15
+ user_id?: string;
16
+ assigned: boolean;
17
+ /** Channels granted (echoes the request; `[CHANNEL_ALL]` for all channels). */
18
+ channel_ids: string[];
19
+ }
20
+ /** Result of a license-scope assignment (covers all projects / license-based apps). */
21
+ export interface LicenseAssignment {
22
+ app_id: string;
23
+ license_id: string;
24
+ role_id?: string;
25
+ user_id?: string;
26
+ assigned: boolean;
27
+ channel_ids: string[];
28
+ }
29
+ /** A role granted app.use, with the channels it may open (`[CHANNEL_ALL]` = all). */
30
+ export interface AssignedRole {
31
+ role_id: string;
32
+ name: string | null;
33
+ channel_ids: string[];
34
+ /** Live rbac_role_user membership count (deleted/expiry-filtered). */
35
+ member_count: number;
36
+ }
37
+ /** A user pinned directly, with the channels they may open. */
38
+ export interface AssignedUser {
39
+ user_id: string;
40
+ name: string | null;
41
+ email: string | null;
42
+ channel_ids: string[];
43
+ }
44
+ /** An implicit admin role (always has access, all channels). */
45
+ export interface AdminRole {
46
+ role_id: string;
47
+ name: string | null;
48
+ /** Live rbac_role_user membership count (deleted/expiry-filtered). */
49
+ member_count: number;
50
+ }
51
+ /** The "everyone" grant on a scope — all members get access on these channels. */
52
+ export interface EveryoneGrant {
53
+ /** Channels everyone may open (`[CHANNEL_ALL]` = all). */
54
+ channel_ids: string[];
55
+ }
56
+ /** One occupant of a seat scope, with FIFO rank and whether they currently hold a seat. */
57
+ export interface SeatOccupant {
58
+ user_id: string;
59
+ /** FIFO position in the scope. `null` for license-covered occupants (no bundle rank). */
60
+ rank: number | null;
61
+ has_seat: boolean;
62
+ /** Resolved display name / email (no separate directory lookup needed). `null` if the user is gone. */
63
+ name: string | null;
64
+ email: string | null;
65
+ /** ISO-8601 claim time (role-membership / grant / admin time). */
66
+ claimed_at: string | null;
67
+ /** How the seat is held. */
68
+ source: 'admin' | 'role' | 'direct';
69
+ /** The granting role id when `source === 'role'`, else `null`. */
70
+ role_id: string | null;
71
+ /** Admin auto-seat — mandatory & unremovable (lock icon). */
72
+ is_admin: boolean;
73
+ /** Channels this occupant may open (`[CHANNEL_ALL]` = all, e.g. admins). */
74
+ channels: string[];
75
+ /**
76
+ * (Project occupancy only) the occupant is covered by a license-wide seat, so
77
+ * they consume a license seat, not a bundle seat. Absent on license_seats rows.
78
+ */
79
+ license_covered?: boolean;
80
+ }
81
+ /** A project's seat bundle with its occupants. */
82
+ export interface ProjectSeatBundle {
83
+ project_id: string;
84
+ /** The project's seat budget; `null` for a project that has no bundle yet (offer to allocate). */
85
+ seats_allocated: number | null;
86
+ /** Occupants currently holding a seat (≤ seats_allocated). */
87
+ seats_used: number;
88
+ /** Occupants over the budget, blocked at access time. */
89
+ blocked: number;
90
+ /** RBAC role ids currently assigned (granted app.use) on this install. */
91
+ assigned_role_ids: string[];
92
+ /** User ids directly assigned (pinned) on this install. */
93
+ assigned_user_ids: string[];
94
+ /** Assigned roles with names + their channel scope (for channel chips). */
95
+ assigned_roles: AssignedRole[];
96
+ /** Pinned users with names + their channel scope. */
97
+ assigned_users: AssignedUser[];
98
+ /** Implicit admin role ids for this project (always-on access). */
99
+ admin_role_ids: string[];
100
+ /** Implicit admin roles with names — render as locked "always · all channels". */
101
+ admin_roles: AdminRole[];
102
+ /** Admins of this project (for the "Admin: {name}" allocation row). */
103
+ project_admins: AdminContact[];
104
+ /** Non-seat "everyone" grant for this project — null = off (specific only). */
105
+ everyone: EveryoneGrant | null;
106
+ occupants: SeatOccupant[];
107
+ }
108
+ /** An escalation contact the FE can render and `mailto:` directly. */
109
+ export interface AdminContact {
110
+ user_id: string;
111
+ name: string;
112
+ email: string;
113
+ }
114
+ /**
115
+ * Why the current user can't use a seat-based app.
116
+ * Drives the storefront "no seat available — contact X" UX.
117
+ */
118
+ export interface SeatLimitAccessBlock {
119
+ blocked: true;
120
+ reason: 'seat_limit_exceeded';
121
+ scope_type: 'licenses' | 'projects' | null;
122
+ scope_id: string | null;
123
+ rank: number | null;
124
+ seats_allocated: number | null;
125
+ seats_required: number;
126
+ seats_purchased: number;
127
+ /** Buy at least this many more seats to clear everyone. */
128
+ seats_to_purchase: number;
129
+ escalation: {
130
+ /** Project admins (when the block is project-scoped) — name + email for "contact X" / mailto. */
131
+ project_admins: AdminContact[];
132
+ license_admins: AdminContact[];
133
+ };
134
+ }
135
+ /** A version the viewer still holds, identified for the withdrawn-build UI. */
136
+ export interface AccessBlockVersion {
137
+ id: string;
138
+ version: string;
139
+ }
140
+ /**
141
+ * The publisher pulled this install's build from the release channel it was
142
+ * installed from (AAD-892), so the app can no longer be opened.
143
+ *
144
+ * The install itself is intact — seats, permissions and project activations
145
+ * survive — so moving to `update_to_version` restores access in one step.
146
+ * `update_to_version` is null while the channel still serves nothing: render
147
+ * "withdrawn, no replacement yet" rather than an Update CTA.
148
+ *
149
+ * The app stays listed (installed / my_access) precisely so this can be shown;
150
+ * `can_open` is false and `on_license.installed` deliberately stays true, so do
151
+ * NOT fall back to an Install CTA.
152
+ */
153
+ export interface VersionWithdrawnAccessBlock {
154
+ blocked: true;
155
+ reason: 'version_withdrawn';
156
+ scope_type: 'licenses' | 'projects' | null;
157
+ scope_id: string | null;
158
+ /** ISO-8601 instant the build was pulled. */
159
+ withdrawn_at: string | null;
160
+ withdrawn_version: AccessBlockVersion | null;
161
+ update_to_version: AccessBlockVersion | null;
162
+ }
163
+ /**
164
+ * Why the current user can't use an app (null unless blocked).
165
+ *
166
+ * BREAKING (AAD-892): this was a single seat-shaped interface and is now a
167
+ * union discriminated on `reason`. Narrow on `reason` before touching
168
+ * seat fields — `block.reason === 'seat_limit_exceeded'`.
169
+ */
170
+ export type AccessBlock = SeatLimitAccessBlock | VersionWithdrawnAccessBlock;
171
+ /** Current grantees of a delegated app permission (app.manage / app.assign). */
172
+ export interface AppDelegates {
173
+ role_ids: string[];
174
+ user_ids: string[];
175
+ /** Roles with display names (so the FE need not resolve ids). */
176
+ roles: AdminRole[];
177
+ /** Users with display names + email. */
178
+ users: AdminContact[];
179
+ }
180
+ /** One project's seat view — the project-admin assignment screen data source. */
181
+ export interface ProjectSeatView {
182
+ seat_based: boolean;
183
+ seats_purchased?: number;
184
+ seats_to_purchase?: number;
185
+ project?: ProjectSeatBundle;
186
+ }
187
+ /** Aggregate seat picture for an app (license admin allocation overview). */
188
+ export interface AppSeatPicture {
189
+ seat_based: boolean;
190
+ seats_purchased?: number;
191
+ /** Σ of project bundles (reserved against the pool). */
192
+ seats_allocated_total?: number;
193
+ /** Distinct occupants who want access across all scopes. */
194
+ seats_required?: number;
195
+ /** max(0, seats_required − seats_purchased) — the "buy N more" figure. */
196
+ seats_to_purchase?: number;
197
+ /** RBAC role ids assigned app.use at LICENSE scope (mirrors a bundle's assigned_role_ids). */
198
+ license_assigned_role_ids?: string[];
199
+ /** User ids pinned directly at LICENSE scope. */
200
+ license_assigned_user_ids?: string[];
201
+ /** License-scope assigned roles with names + channel scope. */
202
+ license_assigned_roles?: AssignedRole[];
203
+ /** License-scope pinned users with names + channel scope. */
204
+ license_assigned_users?: AssignedUser[];
205
+ /** Non-seat "everyone" grant at license scope — null = off (specific only). */
206
+ license_everyone?: EveryoneGrant | null;
207
+ /** Implicit license admin role ids (always-on access). */
208
+ license_admin_role_ids?: string[];
209
+ /** Implicit license admin roles with names. */
210
+ license_admin_roles?: AdminRole[];
211
+ /** License-level seat holders (admins + direct grants), cover all projects. */
212
+ license_seats?: SeatOccupant[];
213
+ /**
214
+ * Per-project bundles. For project-based apps this includes EVERY license
215
+ * project (unallocated ones have `seats_allocated: null`). Empty for
216
+ * license-based apps (project scope is irrelevant).
217
+ */
218
+ projects?: ProjectSeatBundle[];
219
+ }
220
+ //# sourceMappingURL=seats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"seats.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/seats.ts"],"names":[],"mappings":"AAGA,+EAA+E;AAC/E,eAAO,MAAM,WAAW,MAAM,CAAA;AAE9B,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,2EAA2E;IAC3E,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAED,6EAA6E;AAC7E,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,OAAO,CAAA;IACjB,+EAA+E;IAC/E,WAAW,EAAE,MAAM,EAAE,CAAA;CACtB;AAED,uFAAuF;AACvF,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,EA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MAAM,CAAA;IACxB,wDAAwD;IACxD,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,0EAA0E;IAC1E,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,8FAA8F;IAC9F,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAA;IACpC,iDAAiD;IACjD,yBAAyB,CAAC,EAAE,MAAM,EAAE,CAAA;IACpC,+DAA+D;IAC/D,sBAAsB,CAAC,EAAE,YAAY,EAAE,CAAA;IACvC,6DAA6D;IAC7D,sBAAsB,CAAC,EAAE,YAAY,EAAE,CAAA;IACvC,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IACvC,0DAA0D;IAC1D,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAA;IACjC,+CAA+C;IAC/C,mBAAmB,CAAC,EAAE,SAAS,EAAE,CAAA;IACjC,+EAA+E;IAC/E,aAAa,CAAC,EAAE,YAAY,EAAE,CAAA;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,iBAAiB,EAAE,CAAA;CAC/B"}
@@ -0,0 +1,4 @@
1
+ // Store v3 seat allocation & assignment (license→project→role) + channel scope.
2
+ // See ant-backend docs/app-access-v3/DESIGN.md.
3
+ /** Sentinel channel id meaning "all channels" (the channel-agnostic grant). */
4
+ export const CHANNEL_ALL = '*';
@@ -0,0 +1,231 @@
1
+ import type { AppLicense } from './app';
2
+ import type { AppTierSummary } from './appList';
3
+ import type { PricingTier } from './pricingTiers';
4
+ import type { ResourceAccessReason, ResourceEntitlementSummary } from './resourceEntitlements';
5
+ import type { ResourceChannel, ResourceVersion } from './resourceReleases';
6
+ import type { SnapshotUploadFormat } from './snapshotUploads';
7
+ import type { Subscription } from './subscriptions';
8
+ /**
9
+ * Sellable resources — the Store's second sellable thing alongside apps
10
+ * (AAD-898). Access to a dataset, a live feed, a processing API, a calculation
11
+ * service, a relay to an external system.
12
+ *
13
+ * The whole surface sits behind ONE backend feature flag, default off. Read it
14
+ * from {@link StoreCapabilities} via `fetchStoreCapabilities()` BEFORE rendering
15
+ * anything: with the flag off every `/store/resources` route returns 404 by
16
+ * design, so probing them is not a substitute — and the acceptance criterion is
17
+ * that the store UI is indistinguishable from today when the flag is off.
18
+ *
19
+ * Resources are a SIBLING of apps, not a variant of them. They share commerce
20
+ * (`PricingTier`, `Subscription` — both already polymorphic) and share no
21
+ * install/seat machinery: an entitlement is LICENSE-LEVEL. There are no seats,
22
+ * no per-user grants and no project activation.
23
+ *
24
+ * The rest of the surface lives in sibling files, all re-exported through the
25
+ * same barrel: `resourceReleases` (versions, channels), `resourceEntitlements`
26
+ * (claims, refusal reasons) and `resourceRequests` (list params, request bodies).
27
+ */
28
+ /**
29
+ * What backs a resource when an entitled caller reads it.
30
+ *
31
+ * - `snapshot` — a materialised dataset (AAD-939)
32
+ * - `endpoint` — live dispatch to the publisher's trigger (AAD-899)
33
+ */
34
+ export type ResourcePayloadType = 'snapshot' | 'endpoint';
35
+ /** Discover subcategory, under the "Services" kind (AAD-935 item 1). */
36
+ export type ResourceCategory = 'data' | 'service';
37
+ /** Which optional Store surfaces this deployment has switched on. */
38
+ export interface StoreCapabilities {
39
+ /**
40
+ * The sellable-resource surface. When false, render exactly as before: no
41
+ * Services category, no resource rows, no filter options, no dead tabs.
42
+ */
43
+ resources_enabled: boolean;
44
+ /**
45
+ * Whether THIS license may publish a DATA listing (AAD-939).
46
+ *
47
+ * A per-license grant sitting UNDER `resources_enabled`, off by default: v1 is
48
+ * first-party publishers only, granted by an operator, and it stays off in
49
+ * production until the legal position resolves. Always false when
50
+ * `resources_enabled` is false.
51
+ *
52
+ * **Hide the create-a-dataset action when this is false.** Creating a `data`
53
+ * listing without the grant is a 403, and discovering that after the publisher has
54
+ * filled in a form is not "disabled means disabled in the UI". Creating a
55
+ * `service` listing is unaffected.
56
+ */
57
+ resources_can_publish_data: boolean;
58
+ /**
59
+ * Which dynamic-table column types a dataset can publish (AAD-939).
60
+ *
61
+ * **Grey out unpublishable columns against THIS, never a hardcoded list.** A
62
+ * client-side copy that drifted from the server's would offer a column that then
63
+ * 422s at create, and the failure would land on the publisher rather than on
64
+ * whoever changed the list. Values match `SnapshotFieldType`.
65
+ */
66
+ resources_snapshot_field_types: string[];
67
+ /**
68
+ * Whether the per-license data-publishing grant is globally waived on this
69
+ * deployment (AAD-939) — development and staging only.
70
+ *
71
+ * `resources_can_publish_data` alone cannot say WHY this license may publish: a
72
+ * real grant and an open gate look identical. This distinguishes them, which is
73
+ * what lets a dev/staging build show "publishing gate is open" rather than
74
+ * implying every license has been individually approved.
75
+ *
76
+ * Diagnostic, not behavioural — branch on `resources_can_publish_data`. Reported
77
+ * raw, so it is visible even while `resources_enabled` is false: a bypass sitting
78
+ * armed behind a disabled surface is still worth surfacing.
79
+ */
80
+ resources_data_publishing_gate_bypassed: boolean;
81
+ /** Which file formats a dataset may be uploaded in (AAD-948). Served so a client picker cannot drift. */
82
+ resources_snapshot_upload_formats: SnapshotUploadFormat[];
83
+ /**
84
+ * The EFFECTIVE upload ceiling in bytes — the configured one capped by what PHP will
85
+ * accept (AAD-948).
86
+ *
87
+ * Check a file against THIS before uploading. Publishing the configured value
88
+ * instead would have a client accept a file the server then rejects with a bare 413
89
+ * that names nothing.
90
+ *
91
+ * **Null means the deployment cannot currently accept uploads** because a ceiling is
92
+ * misconfigured. That is an operator fault, not a publisher one — say so rather than
93
+ * telling them their file is too big.
94
+ */
95
+ resources_snapshot_max_upload_bytes: number | null;
96
+ }
97
+ /**
98
+ * A storefront row.
99
+ *
100
+ * Field names deliberately match `ListApp` for every shared card concept, so a
101
+ * Discover view can merge apps and resources into one array without translating
102
+ * anything.
103
+ *
104
+ * ⚠️ **Do not build client-side pagination over a merged list.** Two
105
+ * independently paginated lists cannot be merged into one correctly ordered
106
+ * page. Both `/store/apps` and `/store/resources` are currently UNPAGINATED, so
107
+ * a plain concatenation is correct today; when a unified server-side endpoint
108
+ * arrives it will replace the merge wholesale. Keep the merge behind a single
109
+ * composable so that swap is one file.
110
+ *
111
+ * There is no `kind` field — adding one would change the app payload while the
112
+ * flag is off. Stamp it client-side at merge time.
113
+ */
114
+ export interface SellableResourceListItem {
115
+ id: string;
116
+ title: string;
117
+ tagline: string | null;
118
+ icon: string | null;
119
+ image: string | null;
120
+ color: string | null;
121
+ payload_type: ResourcePayloadType;
122
+ category: ResourceCategory;
123
+ availability: 'always_available' | 'request_access' | 'private';
124
+ access_model: 'free' | 'subscription';
125
+ access_level: 'community' | 'enterprise';
126
+ trust_level: 'standard' | 'verified' | 'certified';
127
+ is_featured: boolean;
128
+ /**
129
+ * The publisher. Same `AppLicense` shape apps use, `theme` included, so a
130
+ * merged Discover grid renders the publisher swatch in the publisher's own
131
+ * colour on both card kinds rather than greying out one of them.
132
+ */
133
+ license: AppLicense | null;
134
+ /**
135
+ * Free/paid spread across active tiers — the SAME summary apps carry, from the
136
+ * shared presenter rather than a lookalike, so one card footer renders both.
137
+ * Null when the resource is not subscription-model.
138
+ */
139
+ tier_summary?: AppTierSummary | null;
140
+ /**
141
+ * Distinct non-revoked entitlements. The neutral popularity scalar: apps emit
142
+ * the same field name with the same meaning (distinct external installs), so a
143
+ * merged list can rank both kinds on it.
144
+ */
145
+ consumer_count?: number;
146
+ /** Whether the VIEWING license holds a non-revoked entitlement. */
147
+ has_access: boolean;
148
+ entitlement: ResourceEntitlementSummary | null;
149
+ /** Whether any channel currently serves a version. */
150
+ is_published: boolean;
151
+ created_at: string;
152
+ updated_at: string;
153
+ }
154
+ /** The full listing — the contract a buyer sees before purchasing. */
155
+ export interface SellableResource extends SellableResourceListItem {
156
+ description: string | null;
157
+ channels: ResourceChannel[];
158
+ /**
159
+ * The versions THIS viewer may see — not the whole catalogue.
160
+ *
161
+ * A publisher gets everything they have registered. Everyone else gets exactly
162
+ * two kinds, because they are the two a buyer surface resolves out of this list
163
+ * and both need the full version (`entitlement.pinned_version` and
164
+ * `channel.active_version` are summaries, without the declared schema or counts):
165
+ *
166
+ * 1. what each channel currently SERVES — the offer, and the Move target, and
167
+ * 2. the version this viewer is PINNED to — which stays here after it has been
168
+ * superseded and is no longer any channel's active version.
169
+ *
170
+ * That second one matters: publishing moves nobody, so a buyer routinely sits on
171
+ * a version no channel serves, and dropping it would blank the "what I have" side
172
+ * of their before/after comparison the moment the publisher released anything.
173
+ *
174
+ * Unreleased drafts and retired builds belong to the publisher alone — the raw
175
+ * list endpoint (`fetchResourceVersions`) is publisher-only for that reason.
176
+ * Still resolve "which version am I on?" from `entitlement.pinned_version`.
177
+ */
178
+ versions: ResourceVersion[];
179
+ pricing_tiers: PricingTier[];
180
+ }
181
+ /** An entry in the buyer's "My Access" list. */
182
+ export interface ResourceAccessEntry extends ResourceEntitlementSummary {
183
+ resource: {
184
+ id: string;
185
+ title: string;
186
+ tagline: string | null;
187
+ icon: string | null;
188
+ color: string | null;
189
+ payload_type: ResourcePayloadType;
190
+ category: ResourceCategory;
191
+ };
192
+ /** Whether this license's channel serves a version newer than the pin. */
193
+ update_available: boolean;
194
+ }
195
+ /**
196
+ * An entry in the LICENSE-scoped access list (AAD-940), used to pick a resource
197
+ * for a trigger to consume.
198
+ *
199
+ * Not the same list as `fetchMyResourceAccess()`, and the differences matter:
200
+ *
201
+ * - It is **user-blind**. A trigger runs with no person behind it, so the
202
+ * per-user grant that filters "My Access" does not apply. A row here may well
203
+ * be one the signed-in user personally cannot read.
204
+ * - It **hides nothing**. Revoked, lapsed, withdrawn and not-ready entitlements
205
+ * are all present, each carrying why. Do not filter them out client-side —
206
+ * showing "you have no resources" when the licence owns three, all lapsed, is
207
+ * precisely the failure this endpoint exists to prevent. Render the reason.
208
+ *
209
+ * Render every row; use `consumable` to decide whether it is selectable and
210
+ * `access_reason` to say why it is not.
211
+ */
212
+ export interface LicenseResourceAccessEntry extends ResourceAccessEntry {
213
+ /**
214
+ * Why this resource cannot be consumed right now, or null when it can.
215
+ * Same vocabulary the dispatch refusal uses, so one mapping serves both.
216
+ */
217
+ access_reason: ResourceAccessReason | null;
218
+ /** Convenience for `access_reason === null`. */
219
+ consumable: boolean;
220
+ }
221
+ /** A row of the publisher's consumption view. Lifetime totals, not a time series. */
222
+ export interface ResourceConsumer {
223
+ license_id: string;
224
+ license_name: string | null;
225
+ call_count: number;
226
+ last_called_at: string | null;
227
+ is_revoked: boolean;
228
+ }
229
+ /** Re-exported for convenience: a resource purchase yields a normal Subscription. */
230
+ export type ResourceSubscription = Subscription;
231
+ //# sourceMappingURL=sellableResources.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sellableResources.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/sellableResources.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AACvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC/C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,KAAK,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAA;AAC9F,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAC7D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAA;AAEnD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,UAAU,CAAA;AAEzD,wEAAwE;AACxE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,SAAS,CAAA;AAEjD,qEAAqE;AACrE,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,iBAAiB,EAAE,OAAO,CAAA;IAC1B;;;;;;;;;;;;OAYG;IACH,0BAA0B,EAAE,OAAO,CAAA;IACnC;;;;;;;OAOG;IACH,8BAA8B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,MAAM,GAAG,IAAI,CAAA;IAC1B,QAAQ,EAAE,eAAe,EAAE,CAAA;IAC3B;;;;;;;;;;;;;;;;;;;OAmBG;IACH,QAAQ,EAAE,eAAe,EAAE,CAAA;IAC3B,aAAa,EAAE,WAAW,EAAE,CAAA;CAC7B;AAED,gDAAgD;AAChD,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACrE,QAAQ,EAAE;QACR,EAAE,EAAE,MAAM,CAAA;QACV,KAAK,EAAE,MAAM,CAAA;QACb,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;QACtB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;QACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;QACpB,YAAY,EAAE,mBAAmB,CAAA;QACjC,QAAQ,EAAE,gBAAgB,CAAA;KAC3B,CAAA;IACD,0EAA0E;IAC1E,gBAAgB,EAAE,OAAO,CAAA;CAC1B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,0BAA2B,SAAQ,mBAAmB;IACrE;;;OAGG;IACH,aAAa,EAAE,oBAAoB,GAAG,IAAI,CAAA;IAC1C,gDAAgD;IAChD,UAAU,EAAE,OAAO,CAAA;CACpB;AAED,qFAAqF;AACrF,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,MAAM,CAAA;IAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,UAAU,EAAE,OAAO,CAAA;CACpB;AAED,qFAAqF;AACrF,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAA"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * File-sourced snapshot shapes (AAD-948).
3
+ *
4
+ * Split out of `snapshotPayload.ts` to keep that file under the 250-line limit. These
5
+ * are the halves of the source and column unions that describe an UPLOADED file; the
6
+ * table halves and the unions themselves stay next to the rest of the payload types.
7
+ */
8
+ import type { SnapshotFieldType } from './snapshotPayload';
9
+ import type { SnapshotUploadFormat } from './snapshotUploads';
10
+ /**
11
+ * Which uploaded file a snapshot reads from (AAD-948).
12
+ *
13
+ * Only `type` and `upload_id` are sent. The provenance fields are stamped by the
14
+ * server from the upload row and echoed back on the stored config — a publisher who
15
+ * could state their own digest would be authoring the record that exists precisely
16
+ * because nobody can verify their claims about a file.
17
+ */
18
+ export interface SnapshotFileSourceSelection {
19
+ type: 'file';
20
+ upload_id: string;
21
+ /** Server-stamped. Present on a stored config, never sent. */
22
+ original_filename?: string;
23
+ format?: SnapshotUploadFormat;
24
+ byte_size?: number;
25
+ sha256?: string;
26
+ }
27
+ /**
28
+ * One published column from an uploaded FILE (AAD-948).
29
+ *
30
+ * Selection is by header NAME, because a file has no column ids to point at — which
31
+ * is the whole reason `source_column_id` has to be minted rather than read.
32
+ */
33
+ export interface SnapshotFileColumnSelection {
34
+ /** The header exactly as it appears in the uploaded file. */
35
+ source_key: string;
36
+ /** The buyer-facing key. Required for a file source; there is no name to fall back to. */
37
+ key: string;
38
+ /** Display only. Renaming it breaks nothing and is not a schema change. */
39
+ label?: string | null;
40
+ /**
41
+ * The publisher's DECLARATION of the column's type.
42
+ *
43
+ * Required, and there is no default. A file states no types, so a missing answer
44
+ * is a question nobody asked rather than a value the server may assume. Take the
45
+ * server's `proposed_type` from the upload response as the starting point — it is
46
+ * a proposal, and overriding it is the point.
47
+ *
48
+ * Materialisation validates every value against this and REFUSES on mismatch
49
+ * rather than coercing: a silent cast turns "N/A" into 0 and ships wrong totals.
50
+ */
51
+ type: SnapshotFieldType;
52
+ required?: boolean;
53
+ /**
54
+ * Carried forward from a previous version's schema, or omitted to have one minted.
55
+ *
56
+ * ⚠️ An IDENTITY TOKEN, never a foreign key. For a table source it happens to be a
57
+ * `columns.id`; for a file it points at nothing; and a listing that switched from a
58
+ * table keeps the old table's id on any column that kept its key. Its only contract
59
+ * is "the same value means the same column".
60
+ */
61
+ column_id?: string | null;
62
+ /**
63
+ * Declares a RENAME: this column was published under that key last version.
64
+ *
65
+ * Without it a rename is indistinguishable from a removal plus an addition, and
66
+ * AAD-942 must classify that as breaking. Offer it whenever a publisher changes a
67
+ * key on a re-publish.
68
+ */
69
+ previous_key?: string | null;
70
+ }
71
+ /**
72
+ * Provenance for a version built from an uploaded file (AAD-948).
73
+ *
74
+ * It OUTLIVES THE BYTES: a successful version releases its staged upload, so this is
75
+ * the only remaining answer to "what exactly did we publish?".
76
+ *
77
+ * `verified` is always false and is stated rather than implied. A table source is a
78
+ * live source inside the publisher's own license that the platform can inspect; an
79
+ * uploaded file is opaque bytes from an origin nobody can check. AAD-943's
80
+ * attestation work needs those told apart.
81
+ */
82
+ export interface SnapshotFileSchemaSource {
83
+ type: 'file';
84
+ upload_id: string;
85
+ original_filename: string;
86
+ format: SnapshotUploadFormat;
87
+ byte_size: number;
88
+ sha256: string;
89
+ uploaded_at: string | null;
90
+ uploaded_by: string | null;
91
+ verified: false;
92
+ }
93
+ /** Where a version's rows came from. Absent `type` means a linked table. */
94
+ export type ResourceVersionSource = ResourceVersionTableSource | ResourceVersionFileSource;
95
+ export interface ResourceVersionTableSource {
96
+ type?: 'table';
97
+ table_id: string;
98
+ table_name: string | null;
99
+ }
100
+ export interface ResourceVersionFileSource {
101
+ type: 'file';
102
+ upload_id: string;
103
+ original_filename: string | null;
104
+ format: string | null;
105
+ byte_size: number | null;
106
+ sha256: string | null;
107
+ /** Always false. An uploaded file's origin is not something this platform can check. */
108
+ verified: false;
109
+ }
110
+ //# sourceMappingURL=snapshotFileSource.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshotFileSource.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/snapshotFileSource.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAC1D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAE7D;;;;;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EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,MAAM,WAAW,yBAAyB;IACxC,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,wFAAwF;IACxF,QAAQ,EAAE,KAAK,CAAA;CAChB"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * File-sourced snapshot shapes (AAD-948).
3
+ *
4
+ * Split out of `snapshotPayload.ts` to keep that file under the 250-line limit. These
5
+ * are the halves of the source and column unions that describe an UPLOADED file; the
6
+ * table halves and the unions themselves stay next to the rest of the payload types.
7
+ */
8
+ export {};