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

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 (214) 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.js +1 -1
  23. package/build/comms/hostAPI.js +1 -1
  24. package/build/comms/models.d.ts +20 -2
  25. package/build/comms/models.d.ts.map +1 -1
  26. package/build/comms/signalChangeTypes.d.ts +27 -1
  27. package/build/comms/signalChangeTypes.d.ts.map +1 -1
  28. package/build/comms/signalChangeTypes.js +7 -0
  29. package/build/comms/signalTypes.d.ts +21 -3
  30. package/build/comms/signalTypes.d.ts.map +1 -1
  31. package/build/index.d.ts +8 -35
  32. package/build/index.d.ts.map +1 -1
  33. package/build/index.js +8 -3
  34. package/build/service-runtime.d.ts +9 -0
  35. package/build/service-runtime.d.ts.map +1 -0
  36. package/build/service-runtime.js +10 -0
  37. package/build/service-types-app.d.ts +2 -0
  38. package/build/service-types-app.d.ts.map +1 -0
  39. package/build/service-types-app.js +3 -0
  40. package/build/service-types.d.ts +37 -0
  41. package/build/service-types.d.ts.map +1 -0
  42. package/build/service-types.js +7 -0
  43. package/build/services/AiService.d.ts +18 -0
  44. package/build/services/AiService.d.ts.map +1 -0
  45. package/build/services/AiService.js +9 -0
  46. package/build/services/AppService/factory/accessRequests.d.ts +19 -0
  47. package/build/services/AppService/factory/accessRequests.d.ts.map +1 -0
  48. package/build/services/AppService/factory/accessRequests.js +17 -0
  49. package/build/services/AppService/factory/assignments.d.ts +57 -0
  50. package/build/services/AppService/factory/assignments.d.ts.map +1 -0
  51. package/build/services/AppService/factory/assignments.js +30 -0
  52. package/build/services/AppService/factory/channels.d.ts +35 -0
  53. package/build/services/AppService/factory/channels.d.ts.map +1 -0
  54. package/build/services/AppService/factory/channels.js +18 -0
  55. package/build/services/AppService/factory/formData.d.ts +14 -0
  56. package/build/services/AppService/factory/formData.d.ts.map +1 -0
  57. package/build/services/AppService/factory/formData.js +50 -0
  58. package/build/services/AppService/factory/media.d.ts +17 -0
  59. package/build/services/AppService/factory/media.d.ts.map +1 -0
  60. package/build/services/AppService/factory/media.js +10 -0
  61. package/build/services/AppService/factory/resourceAccess.d.ts +21 -0
  62. package/build/services/AppService/factory/resourceAccess.d.ts.map +1 -0
  63. package/build/services/AppService/factory/resourceAccess.js +37 -0
  64. package/build/services/AppService/factory/resourceCommerce.d.ts +52 -0
  65. package/build/services/AppService/factory/resourceCommerce.d.ts.map +1 -0
  66. package/build/services/AppService/factory/resourceCommerce.js +18 -0
  67. package/build/services/AppService/factory/resourceSnapshot.d.ts +62 -0
  68. package/build/services/AppService/factory/resourceSnapshot.d.ts.map +1 -0
  69. package/build/services/AppService/factory/resourceSnapshot.js +34 -0
  70. package/build/services/AppService/factory/resources.d.ts +153 -0
  71. package/build/services/AppService/factory/resources.d.ts.map +1 -0
  72. package/build/services/AppService/factory/resources.js +44 -0
  73. package/build/services/AppService/factory/subscriptions.d.ts +73 -0
  74. package/build/services/AppService/factory/subscriptions.d.ts.map +1 -0
  75. package/build/services/AppService/factory/subscriptions.js +39 -0
  76. package/build/services/AppService/index.d.ts +59 -0
  77. package/build/services/AppService/index.d.ts.map +1 -0
  78. package/build/services/AppService/index.js +76 -0
  79. package/build/services/AppService/types/accessRequests.d.ts +164 -0
  80. package/build/services/AppService/types/accessRequests.d.ts.map +1 -0
  81. package/build/services/AppService/types/app.d.ts +124 -0
  82. package/build/services/AppService/types/app.d.ts.map +1 -0
  83. package/build/services/AppService/types/app.js +6 -0
  84. package/build/services/AppService/types/appCategories.d.ts +16 -0
  85. package/build/services/AppService/types/appCategories.d.ts.map +1 -0
  86. package/build/services/AppService/types/appCategories.js +1 -0
  87. package/build/services/AppService/types/appChangelog.d.ts +31 -0
  88. package/build/services/AppService/types/appChangelog.d.ts.map +1 -0
  89. package/build/services/AppService/types/appChangelog.js +1 -0
  90. package/build/services/AppService/types/appConfigStatus.d.ts +68 -0
  91. package/build/services/AppService/types/appConfigStatus.d.ts.map +1 -0
  92. package/build/services/AppService/types/appConfigStatus.js +11 -0
  93. package/build/services/AppService/types/appList.d.ts +211 -0
  94. package/build/services/AppService/types/appList.d.ts.map +1 -0
  95. package/build/services/AppService/types/appList.js +1 -0
  96. package/build/services/AppService/types/appManifest.d.ts +100 -0
  97. package/build/services/AppService/types/appManifest.d.ts.map +1 -0
  98. package/build/services/AppService/types/appManifest.js +4 -0
  99. package/build/services/AppService/types/appMedia.d.ts +136 -0
  100. package/build/services/AppService/types/appMedia.d.ts.map +1 -0
  101. package/build/services/AppService/types/appMedia.js +1 -0
  102. package/build/services/AppService/types/appRequests.d.ts +126 -0
  103. package/build/services/AppService/types/appRequests.d.ts.map +1 -0
  104. package/build/services/AppService/types/appRequests.js +1 -0
  105. package/build/services/AppService/types/appScopes.d.ts +165 -0
  106. package/build/services/AppService/types/appScopes.d.ts.map +1 -0
  107. package/build/services/AppService/types/appScopes.js +1 -0
  108. package/build/services/AppService/types/channels.d.ts +45 -0
  109. package/build/services/AppService/types/channels.d.ts.map +1 -0
  110. package/build/services/AppService/types/channels.js +1 -0
  111. package/build/services/AppService/types/pricingTiers.d.ts +111 -0
  112. package/build/services/AppService/types/pricingTiers.d.ts.map +1 -0
  113. package/build/services/AppService/types/pricingTiers.js +1 -0
  114. package/build/services/AppService/types/publisherStats.d.ts +20 -0
  115. package/build/services/AppService/types/publisherStats.d.ts.map +1 -0
  116. package/build/services/AppService/types/publisherStats.js +1 -0
  117. package/build/services/AppService/types/releaseChannels.d.ts +127 -0
  118. package/build/services/AppService/types/releaseChannels.d.ts.map +1 -0
  119. package/build/services/AppService/types/releaseChannels.js +1 -0
  120. package/build/services/AppService/types/resourceEntitlements.d.ts +101 -0
  121. package/build/services/AppService/types/resourceEntitlements.d.ts.map +1 -0
  122. package/build/services/AppService/types/resourceEntitlements.js +1 -0
  123. package/build/services/AppService/types/resourceReleases.d.ts +143 -0
  124. package/build/services/AppService/types/resourceReleases.d.ts.map +1 -0
  125. package/build/services/AppService/types/resourceReleases.js +1 -0
  126. package/build/services/AppService/types/resourceRequests.d.ts +105 -0
  127. package/build/services/AppService/types/resourceRequests.d.ts.map +1 -0
  128. package/build/services/AppService/types/resourceRequests.js +1 -0
  129. package/build/services/AppService/types/seats.d.ts +220 -0
  130. package/build/services/AppService/types/seats.d.ts.map +1 -0
  131. package/build/services/AppService/types/seats.js +4 -0
  132. package/build/services/AppService/types/sellableResources.d.ts +189 -0
  133. package/build/services/AppService/types/sellableResources.d.ts.map +1 -0
  134. package/build/services/AppService/types/sellableResources.js +1 -0
  135. package/build/services/AppService/types/snapshotPayload.d.ts +146 -0
  136. package/build/services/AppService/types/snapshotPayload.d.ts.map +1 -0
  137. package/build/services/AppService/types/snapshotPayload.js +16 -0
  138. package/build/services/AppService/types/snapshotSources.d.ts +98 -0
  139. package/build/services/AppService/types/snapshotSources.d.ts.map +1 -0
  140. package/build/services/AppService/types/snapshotSources.js +7 -0
  141. package/build/services/AppService/types/subscriptions.d.ts +182 -0
  142. package/build/services/AppService/types/subscriptions.d.ts.map +1 -0
  143. package/build/services/AppService/types/subscriptions.js +1 -0
  144. package/build/services/AppService/types.d.ts +23 -0
  145. package/build/services/AppService/types.d.ts.map +1 -0
  146. package/build/services/AppService/types.js +25 -0
  147. package/build/services/DmsService.d.ts +13 -0
  148. package/build/services/DmsService.d.ts.map +1 -1
  149. package/build/services/DmsServiceImpl.d.ts.map +1 -1
  150. package/build/services/DmsServiceImpl.js +8 -0
  151. package/build/services/LicenseService.d.ts +1 -1
  152. package/build/services/LicenseService.d.ts.map +1 -1
  153. package/build/services/LicenseService.js +1 -1
  154. package/build/services/OAuthClientService.d.ts +20 -0
  155. package/build/services/OAuthClientService.d.ts.map +1 -0
  156. package/build/services/OAuthClientService.js +12 -0
  157. package/build/services/OAuthClientService.types.d.ts +37 -0
  158. package/build/services/OAuthClientService.types.d.ts.map +1 -0
  159. package/build/services/OAuthClientService.types.js +4 -0
  160. package/build/services/ProjectService.d.ts +1 -0
  161. package/build/services/ProjectService.d.ts.map +1 -1
  162. package/build/services/ReleaseService.d.ts +1 -0
  163. package/build/services/ReleaseService.d.ts.map +1 -1
  164. package/build/services/SecretService.d.ts +22 -0
  165. package/build/services/SecretService.d.ts.map +1 -0
  166. package/build/services/SecretService.js +21 -0
  167. package/build/services/SecretService.types.d.ts +147 -0
  168. package/build/services/SecretService.types.d.ts.map +1 -0
  169. package/build/services/SecretService.types.js +1 -0
  170. package/build/services/SecretSharing.types.d.ts +112 -0
  171. package/build/services/SecretSharing.types.d.ts.map +1 -0
  172. package/build/services/SecretSharing.types.js +1 -0
  173. package/build/services/TableService.js +7 -7
  174. package/build/services/TaskService.d.ts +3 -3
  175. package/build/services/TaskService.d.ts.map +1 -1
  176. package/build/services/TaskService.js +1 -1
  177. package/build/services/TaskService.types.d.ts +21 -4
  178. package/build/services/TaskService.types.d.ts.map +1 -1
  179. package/build/services/TaskServiceQueries.d.ts +2 -0
  180. package/build/services/TaskServiceQueries.d.ts.map +1 -1
  181. package/build/services/TaskServiceQueries.js +13 -2
  182. package/build/services/TaskTemplate.types.d.ts +74 -1
  183. package/build/services/TaskTemplate.types.d.ts.map +1 -1
  184. package/build/services/TokenService.d.ts +5 -1
  185. package/build/services/TokenService.d.ts.map +1 -1
  186. package/build/services/TokenService.js +1 -2
  187. package/build/services/UserService.d.ts +3 -0
  188. package/build/services/UserService.d.ts.map +1 -1
  189. package/build/services/UserService.js +4 -4
  190. package/build/services/Webhook/TriggerHistoryService.d.ts +1 -1
  191. package/build/services/Webhook/TriggerHistoryService.d.ts.map +1 -1
  192. package/build/services/Webhook/TriggerSecretService.d.ts +88 -0
  193. package/build/services/Webhook/TriggerSecretService.d.ts.map +1 -0
  194. package/build/services/Webhook/TriggerSecretService.js +9 -0
  195. package/build/services/Webhook/TriggerService.d.ts +28 -0
  196. package/build/services/Webhook/TriggerService.d.ts.map +1 -1
  197. package/build/services/Webhook/TriggerService.js +10 -0
  198. package/build/services/Websockets/StoreEvents.d.ts +44 -0
  199. package/build/services/Websockets/StoreEvents.d.ts.map +1 -0
  200. package/build/services/Websockets/StoreEvents.js +5 -0
  201. package/build/services/userPreferences.d.ts +37 -0
  202. package/build/services/userPreferences.d.ts.map +1 -0
  203. package/build/services/userPreferences.js +39 -0
  204. package/package.json +8 -7
  205. package/schemas/app-config.schema.json +85 -8
  206. package/build/services/AppManifest.d.ts +0 -39
  207. package/build/services/AppManifest.d.ts.map +0 -1
  208. package/build/services/AppService.d.ts +0 -57
  209. package/build/services/AppService.d.ts.map +0 -1
  210. package/build/services/AppService.js +0 -47
  211. package/build/services/AppService.types.d.ts +0 -173
  212. package/build/services/AppService.types.d.ts.map +0 -1
  213. /package/build/{services/AppManifest.js → ai/types.js} +0 -0
  214. /package/build/services/{AppService.types.js → AppService/types/accessRequests.js} +0 -0
@@ -0,0 +1,165 @@
1
+ import type { AppVersionSummary } from './appMedia';
2
+ /** A project the current viewer can switch a running app into. */
3
+ export interface AppScopeProject {
4
+ id: string;
5
+ name: string;
6
+ number: string | number | null;
7
+ /** The viewer holds `app.use` at project scope here — dim/disable when false. */
8
+ usable: boolean;
9
+ }
10
+ /**
11
+ * The scopes a running app can switch between for the current viewer — the OS
12
+ * context switcher's data source (`GET /store/apps/{app}/projects`). Projects
13
+ * are those the viewer can enter where the app is activated; `license.usable`
14
+ * gates switching to license level.
15
+ */
16
+ export interface AppRunnableContexts {
17
+ license: {
18
+ usable: boolean;
19
+ };
20
+ projects: AppScopeProject[];
21
+ }
22
+ /**
23
+ * The contexts an app can be enabled in and used at (`apps.supported_scopes`).
24
+ * A single scope is a classic license-only / project-only app; both makes the
25
+ * app multi-scope — usable at license level AND, independently, per project.
26
+ */
27
+ export type AppScope = 'license' | 'project';
28
+ /**
29
+ * License-scope install state. `can_install` is release-gated and detail-only
30
+ * (`App`); the list omits it (N+1).
31
+ *
32
+ * `installed` means ONE thing on every surface: a physical, non-soft-deleted
33
+ * license-scoped `ResourceApp` link exists. It is the same on `my_access`
34
+ * (+`include_available`), on `browse`, and on the app detail — safe to
35
+ * cross-read.
36
+ *
37
+ * ⚠️ This reverses the pre-AAD-713 contract. There used to be an "implicit
38
+ * install", where an always-available system app read `installed: true` with
39
+ * `resource_app_id: null` on `my_access` rows. v3 is install-mandatory — those
40
+ * apps are now really installed (via the backfill), so `installed: true` always
41
+ * comes with a non-null `resource_app_id`. Any code still guarding against a
42
+ * null link to reject an implicit install is defending a state that no longer
43
+ * occurs.
44
+ */
45
+ export interface AppOnLicense {
46
+ /** A physical license-scoped install link exists. */
47
+ installed: boolean;
48
+ /**
49
+ * Per-user right to USE the app at LICENSE scope (detail only). Drives the OS
50
+ * context switcher's "switch to license level" gate — disable it when false.
51
+ * Independent of project-scope access.
52
+ */
53
+ can_use?: boolean;
54
+ /** Can install at the license — the store action (paid apps route to buy-request). Detail only. */
55
+ can_install?: boolean;
56
+ /** Can remove the app from the license. */
57
+ can_uninstall: boolean;
58
+ /** The license-level ResourceApp link id; null when not installed — or implicitly installed (`my_access`). */
59
+ resource_app_id: string | null;
60
+ /** Per-install auto-update flag for the license link. */
61
+ auto_update: boolean;
62
+ /** When the license installed the app (ISO 8601), or null. */
63
+ installed_at: string | null;
64
+ /**
65
+ * Is THIS install behind? (AAD-906) Independent of the project install — a
66
+ * license install goes stale on its own and is updatable on its own. Prefer
67
+ * this over the flat `update_available` for any per-install affordance.
68
+ */
69
+ update_available: boolean;
70
+ /** The version this install would move to; null when current. */
71
+ update_available_version_id: string | null;
72
+ /**
73
+ * The version this scope actually RUNS. Always populated when the scope has
74
+ * an install, whether or not an update exists — null only when there is no
75
+ * install.
76
+ *
77
+ * This is the ONLY correct source for "which version am I on?". Do not infer
78
+ * it from:
79
+ * - `latest_version` — a catalogue fact (newest version any channel serves),
80
+ * not yours;
81
+ * - `channels[].active_version` — what a channel OFFERS, not what you run;
82
+ * - `versions[0]` — array order;
83
+ * - `update_from_version` — describes an UPDATE, so it is null exactly when
84
+ * the install is current.
85
+ * All four are wrong the moment an install lags its channel (auto-update off,
86
+ * or a rollback). Present on `ListApp` too, so launcher/OS-bar surfaces need
87
+ * no detail fetch.
88
+ */
89
+ installed_version?: AppVersionSummary | null;
90
+ /** Currently installed version — pair with `update_to_version` for the banner. */
91
+ update_from_version?: AppVersionSummary | null;
92
+ /** The version this install would move to. Null when no update. */
93
+ update_to_version?: AppVersionSummary | null;
94
+ /** The release channel this install advances from; null when unpinned. */
95
+ channel_id: string | null;
96
+ }
97
+ /**
98
+ * Project-scope activation state; non-null only for apps that support project
99
+ * scope with a project selected.
100
+ *
101
+ * App-detail action button (AAD-887) — a license install is NOT a project
102
+ * activation. Key the Install / Activate / Open decision off these fields
103
+ * (all already present on `App` and `ListApp`):
104
+ *
105
+ * - not installed (`on_license.installed === false`) → **Install**
106
+ * - project-only app installed at license but not activated here
107
+ * (`on_license.installed && in_project && !in_project.activated
108
+ * && !can_open`) → **Activate**
109
+ * (enable via `in_project.can_activate`)
110
+ * - openable now (`can_open === true`) → **Open**
111
+ *
112
+ * A multi-scope (license+project) app installed at the license reads
113
+ * `can_open === true` (openable via license scope) even while
114
+ * `in_project.activated === false` — there, "Open" is correct and a project
115
+ * "Activate" is an *additional*, independent affordance keyed off
116
+ * `in_project.activated` / `in_project.can_activate`. `in_project` is `null` for
117
+ * license-only apps or when there is no project context, so "Activate" only ever
118
+ * applies to a project-scope app viewed inside a project. Projects to activate
119
+ * into come from `GET /store/apps/{app}/projects` (`AppRunnableContexts`).
120
+ */
121
+ export interface AppInProject {
122
+ /** A version is activated in the current project. */
123
+ activated: boolean;
124
+ /**
125
+ * Per-user right to USE the app in the CURRENT project (detail only). Drives
126
+ * per-project dimming in the OS context switcher — a project the viewer holds
127
+ * no `app.use` grant on reads false. Independent of license-scope access.
128
+ */
129
+ can_use?: boolean;
130
+ /**
131
+ * Per-user right to activate a version in the current project (project admin
132
+ * — license admins cascade — AND configurable at the license's access level
133
+ * AND not yet activated AND a reachable released version). On detail AND list
134
+ * payloads (`my_access`).
135
+ */
136
+ can_activate?: boolean;
137
+ /** Can remove the activated version from the current project. */
138
+ can_deactivate: boolean;
139
+ /** The project-level ResourceApp link id, or null when not activated. */
140
+ resource_app_id: string | null;
141
+ /** Per-install auto-update flag for the project link. */
142
+ auto_update: boolean;
143
+ /**
144
+ * Is THIS activation behind? (AAD-906) Independent of the license install —
145
+ * the two carry their own version and channel pin, so one can be current
146
+ * while the other is stale.
147
+ */
148
+ update_available: boolean;
149
+ /** The version this activation would move to; null when current. */
150
+ update_available_version_id: string | null;
151
+ /**
152
+ * The version this project actually RUNS. Always populated when the project
153
+ * has an activation, whether or not an update exists. Same contract and same
154
+ * name as {@link AppOnLicense.installed_version} — one field, one meaning,
155
+ * whichever scope you are reading.
156
+ */
157
+ installed_version?: AppVersionSummary | null;
158
+ /** Currently activated version — pair with `update_to_version` for the banner. */
159
+ update_from_version?: AppVersionSummary | null;
160
+ /** The version this activation would move to. Null when no update. */
161
+ update_to_version?: AppVersionSummary | null;
162
+ /** The release channel this activation advances from; null when unpinned. */
163
+ channel_id: string | null;
164
+ }
165
+ //# sourceMappingURL=appScopes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appScopes.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/appScopes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAOnD,kEAAkE;AAClE,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;IAC9B,iFAAiF;IACjF,MAAM,EAAE,OAAO,CAAA;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE;QAAE,MAAM,EAAE,OAAO,CAAA;KAAE,CAAA;IAC5B,QAAQ,EAAE,eAAe,EAAE,CAAA;CAC5B;AAED;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,CAAA;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,YAAY;IAC3B,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,mGAAmG;IACnG,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,2CAA2C;IAC3C,aAAa,EAAE,OAAO,CAAA;IACtB,8GAA8G;IAC9G,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,yDAAyD;IACzD,WAAW,EAAE,OAAO,CAAA;IACpB,8DAA8D;IAC9D,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B;;;;OAIG;IACH,gBAAgB,EAAE,OAAO,CAAA;IACzB,iEAAiE;IACjE,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1C;;;;;;;;;;;;;;;;OAgBG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC5C,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC9C,mEAAmE;IACnE,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC5C,0EAA0E;IAC1E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,WAAW,YAAY;IAC3B,qDAAqD;IACrD,SAAS,EAAE,OAAO,CAAA;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,iEAAiE;IACjE,cAAc,EAAE,OAAO,CAAA;IACvB,yEAAyE;IACzE,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,yDAAyD;IACzD,WAAW,EAAE,OAAO,CAAA;IACpB;;;;OAIG;IACH,gBAAgB,EAAE,OAAO,CAAA;IACzB,oEAAoE;IACpE,2BAA2B,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1C;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC5C,kFAAkF;IAClF,mBAAmB,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC9C,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,iBAAiB,GAAG,IAAI,CAAA;IAC5C,6EAA6E;IAC7E,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,45 @@
1
+ import type { AppVersion } from './appMedia';
2
+ /**
3
+ * A release channel the current viewer can install from (single-app detail,
4
+ * `App.channels`). Drives the channel picker (e.g. Production vs Beta):
5
+ * `requires_subscription` is resolved for this viewer, `is_member` reflects
6
+ * specific-licenses access, and `active_version` is the installable build. Pass
7
+ * the chosen channel's `id` as `channel_id` to install so it is pinned to it.
8
+ */
9
+ export interface AppChannel {
10
+ id: string;
11
+ name: string;
12
+ color?: string | null;
13
+ is_default: boolean;
14
+ access_override: 'free' | null;
15
+ requires_subscription: boolean;
16
+ /** License-level availability (channel access_mode / membership). */
17
+ is_member: boolean;
18
+ /** Per-user open eligibility = is_member AND the user's grant channel scope. */
19
+ has_access: boolean;
20
+ /** The install's pinned/primary channel — the default the user lands on. */
21
+ is_primary: boolean;
22
+ /** Matches the user's remembered channel choice (see preferred_channel_id). */
23
+ is_preferred: boolean;
24
+ active_version: AppVersion | null;
25
+ }
26
+ /**
27
+ * A release channel the current user can open, as surfaced on the list/dashboard
28
+ * `ListApp` (scoped to channels with `has_access` — inaccessible ones are omitted
29
+ * server-side). Lets the FE render the split "Open" button + channel switcher on
30
+ * first load without fetching the full app. `>1 entry` ⇒ show the switcher.
31
+ */
32
+ export interface AccessibleChannel {
33
+ id: string;
34
+ name: string;
35
+ color: string | null;
36
+ /** The install's pinned/primary channel — the default to open. */
37
+ is_primary: boolean;
38
+ /** Matches the user's remembered channel choice (App.preferred_channel_id). */
39
+ is_preferred: boolean;
40
+ active_version: {
41
+ id: string;
42
+ version: string;
43
+ } | null;
44
+ }
45
+ //# sourceMappingURL=channels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"channels.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/channels.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AAE5C;;;;;;GAMG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,UAAU,EAAE,OAAO,CAAA;IACnB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,qBAAqB,EAAE,OAAO,CAAA;IAC9B,qEAAqE;IACrE,SAAS,EAAE,OAAO,CAAA;IAClB,gFAAgF;IAChF,UAAU,EAAE,OAAO,CAAA;IACnB,4EAA4E;IAC5E,UAAU,EAAE,OAAO,CAAA;IACnB,+EAA+E;IAC/E,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE,UAAU,GAAG,IAAI,CAAA;CAClC;AAED;;;;;GAKG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,kEAAkE;IAClE,UAAU,EAAE,OAAO,CAAA;IACnB,+EAA+E;IAC/E,YAAY,EAAE,OAAO,CAAA;IACrB,cAAc,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CACvD"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,111 @@
1
+ export type BillingPeriod = 'monthly' | 'quarterly' | 'yearly' | 'one_time';
2
+ /**
3
+ * How a tier is billed. Drives which price fields apply:
4
+ * - `free` — no charge
5
+ * - `flat` — single `price_amount` per license
6
+ * - `seat` — `seat_unit_price` per assigned seat, with optional min/max seats
7
+ */
8
+ export type PricingModel = 'free' | 'flat' | 'seat';
9
+ /** Tier amount field — accepts number, string (legacy BE), or null. */
10
+ export type PricingAmount = number | string | null;
11
+ /** A single feature line. Plain strings preferred; objects kept for legacy tiers. */
12
+ export type PricingFeature = string | Record<string, unknown>;
13
+ export interface PricingTier {
14
+ id: string;
15
+ subject_type: string;
16
+ subject_id: string;
17
+ name: string;
18
+ /** Descriptive line shown under the price on the storefront card. */
19
+ description: string | null;
20
+ price_description: string | null;
21
+ /** Pricing model driving the price fields. */
22
+ pricing_model?: PricingModel;
23
+ /** Numeric amount per billing period. Zero for the free tier. */
24
+ price_amount?: number | null;
25
+ /** ISO-4217 code. Defaults to EUR on BE when amount is set. */
26
+ price_currency?: string | null;
27
+ /**
28
+ * Per-seat unit price added on top of `price_amount`. Required when
29
+ * `seat_based` is true; null on flat-rate tiers.
30
+ */
31
+ seat_unit_price?: PricingAmount;
32
+ billing_period: BillingPeriod;
33
+ trial_days: number;
34
+ seat_based: boolean;
35
+ /** Minimum seats per license for seat-based tiers. */
36
+ min_seats?: number | null;
37
+ max_seats: number | null;
38
+ grace_period_days: number;
39
+ features: PricingFeature[] | null;
40
+ /** Highlights the tier (badge + accent border) on the storefront. */
41
+ recommended?: boolean;
42
+ is_active: boolean;
43
+ sort_order: number;
44
+ created_at: string;
45
+ updated_at: string;
46
+ subscription_count?: number;
47
+ }
48
+ /**
49
+ * The lowest-priced active tier, as embedded on `ListApp.cheapest_tier`.
50
+ *
51
+ * A deliberate SUBSET of {@link PricingTier} — the storefront card needs a price
52
+ * line, not the full tier. It does NOT carry `subject_type`, `subject_id`,
53
+ * `description`, `pricing_model`, `seat_unit_price`, `trial_days`, `min_seats`,
54
+ * `grace_period_days`, `features`, `recommended`, `is_active`, `sort_order` or
55
+ * the timestamps; the full tier list comes from the pricing-tier endpoints.
56
+ * Typing this as `PricingTier` reads `undefined` at runtime.
57
+ *
58
+ * Render `price_description` — the publisher-authored line ("€9 per seat /
59
+ * month"). `price_amount` is for branching (free vs paid), not display.
60
+ */
61
+ export interface CheapestTierSummary {
62
+ id: string;
63
+ name: string;
64
+ /** Publisher-authored price line. Null when the publisher set none. */
65
+ price_description: string | null;
66
+ /** Numeric amount; null/0 on a free tier. */
67
+ price_amount: number | null;
68
+ /** ISO-4217 code, or null. */
69
+ price_currency: string | null;
70
+ billing_period: BillingPeriod | null;
71
+ seat_based: boolean;
72
+ max_seats: number | null;
73
+ }
74
+ export interface CreatePricingTierData {
75
+ name: string;
76
+ description?: string | null;
77
+ price_description?: string | null;
78
+ pricing_model?: PricingModel;
79
+ price_amount?: number | null;
80
+ price_currency?: string | null;
81
+ seat_unit_price?: number | null;
82
+ billing_period: BillingPeriod;
83
+ trial_days?: number;
84
+ seat_based?: boolean;
85
+ min_seats?: number | null;
86
+ max_seats?: number | null;
87
+ grace_period_days?: number;
88
+ features?: PricingFeature[] | null;
89
+ recommended?: boolean;
90
+ sort_order?: number;
91
+ }
92
+ export interface UpdatePricingTierData {
93
+ name?: string;
94
+ description?: string | null;
95
+ price_description?: string | null;
96
+ pricing_model?: PricingModel;
97
+ price_amount?: number | null;
98
+ price_currency?: string | null;
99
+ seat_unit_price?: number | null;
100
+ billing_period?: BillingPeriod;
101
+ trial_days?: number;
102
+ seat_based?: boolean;
103
+ min_seats?: number | null;
104
+ max_seats?: number | null;
105
+ grace_period_days?: number;
106
+ features?: PricingFeature[] | null;
107
+ recommended?: boolean;
108
+ sort_order?: number;
109
+ is_active?: boolean;
110
+ }
111
+ //# sourceMappingURL=pricingTiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pricingTiers.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/pricingTiers.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,UAAU,CAAA;AAE3E;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAA;AAEnD,uEAAuE;AACvE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,IAAI,CAAA;AAElD,qFAAqF;AACrF,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE7D,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,YAAY,EAAE,MAAM,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,qEAAqE;IACrE,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,8CAA8C;IAC9C,aAAa,CAAC,EAAE,YAAY,CAAA;IAC5B,iEAAiE;IACjE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,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S,CAAC,EAAE,OAAO,CAAA;CACpB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,20 @@
1
+ export interface PublisherStatsAccessRequests {
2
+ pending: number;
3
+ approved: number;
4
+ denied: number;
5
+ expired: number;
6
+ }
7
+ export interface PublisherStatsApp {
8
+ app_id: string;
9
+ app_title: string;
10
+ app_icon_url: string | null;
11
+ install_count_total: number;
12
+ install_count_last_7d: number;
13
+ install_count_prev_7d: number;
14
+ /** null when prev_7d = 0 — render as "no baseline", semantically distinct from 0 */
15
+ install_trend_pct: number | null;
16
+ access_requests: PublisherStatsAccessRequests;
17
+ active_channels_count: number;
18
+ last_updated_at: string;
19
+ }
20
+ //# sourceMappingURL=publisherStats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"publisherStats.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/publisherStats.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,MAAM,CAAA;CAChB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAA;IACd,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,mBAAmB,EAAE,MAAM,CAAA;IAC3B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,qBAAqB,EAAE,MAAM,CAAA;IAC7B,oFAAoF;IACpF,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,eAAe,EAAE,4BAA4B,CAAA;IAC7C,qBAAqB,EAAE,MAAM,CAAA;IAC7B,eAAe,EAAE,MAAM,CAAA;CACxB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,127 @@
1
+ import type { AppVersion } from './appMedia';
2
+ /**
3
+ * Per-channel access override (subscription bypass).
4
+ * - `'free'` — members of this channel skip the subscription/seat gate
5
+ * (other access controls still apply)
6
+ * - `null` — inherit the app's access model (default)
7
+ *
8
+ * Distinct from `ChannelAccessMode`, which governs WHO can access the channel.
9
+ */
10
+ export type ReleaseChannelAccessOverride = 'free' | null;
11
+ /**
12
+ * Mutually-exclusive access mode for a release channel.
13
+ * - `'default'` — anyone with general app access can use the channel; the
14
+ * member pivot is ignored
15
+ * - `'specific_licenses'` — gated by the license-member pivot (the only mode
16
+ * whose membership grants entitlement)
17
+ *
18
+ * The former `'role'` mode (and per-channel RBAC roles) were removed.
19
+ */
20
+ export type ChannelAccessMode = 'default' | 'specific_licenses';
21
+ export interface ReleaseChannel {
22
+ id: string;
23
+ name: string;
24
+ description: string | null;
25
+ color: string | null;
26
+ member_count: number | null;
27
+ active_version: AppVersion | null;
28
+ is_member: boolean;
29
+ access_override: ReleaseChannelAccessOverride;
30
+ access_mode: ChannelAccessMode;
31
+ sort_order: number;
32
+ /**
33
+ * Exactly one channel per app is the default. The default channel is
34
+ * auto-created on app creation and cannot be deleted; marking another
35
+ * channel default atomically demotes the previous one.
36
+ */
37
+ is_default: boolean;
38
+ created_at?: string;
39
+ updated_at?: string;
40
+ }
41
+ export interface CreateReleaseChannelData {
42
+ name: string;
43
+ description?: string;
44
+ color?: string | null;
45
+ access_override?: ReleaseChannelAccessOverride;
46
+ access_mode?: ChannelAccessMode;
47
+ sort_order?: number;
48
+ /** Marking this channel default atomically demotes the previous default. */
49
+ is_default?: boolean;
50
+ }
51
+ export interface UpdateReleaseChannelData {
52
+ name?: string;
53
+ /**
54
+ * `undefined` leaves the description unchanged; pass `null` to clear it.
55
+ */
56
+ description?: string | null;
57
+ /**
58
+ * `undefined` leaves the color unchanged; pass `null` to clear it.
59
+ */
60
+ color?: string | null;
61
+ sort_order?: number;
62
+ access_override?: ReleaseChannelAccessOverride;
63
+ access_mode?: ChannelAccessMode;
64
+ /**
65
+ * Set `true` to promote this channel to default (demotes the previous
66
+ * default). The backend rejects unsetting the current default.
67
+ */
68
+ is_default?: boolean;
69
+ }
70
+ /**
71
+ * Compact license identity returned by the channel members endpoints —
72
+ * enough to render a chip without a directory lookup.
73
+ */
74
+ /**
75
+ * A consumer that would lose access if a channel were unreleased.
76
+ * `type` distinguishes a license-level install from a project activation.
77
+ */
78
+ export interface ChannelUnpublishHolder {
79
+ id: string;
80
+ name: string;
81
+ type: 'license' | 'project';
82
+ /**
83
+ * The license's tier, or null for project holders. Together with `created_at`
84
+ * this disambiguates holders whose NAMES collide — license names are not
85
+ * unique (auto-provisioned licenses are named after an email), so two
86
+ * distinct tenants can both read `someone@example.com_license`. Key rows on
87
+ * `id`, never on `name`, and never collapse same-named rows: each is a real
88
+ * tenant that will lose access.
89
+ */
90
+ license_type?: string | null;
91
+ created_at?: string | null;
92
+ }
93
+ /**
94
+ * Blast radius of unreleasing a channel — drives the publisher's confirm
95
+ * dialog (AAD-892). Unreleasing revokes access for everyone who installed from
96
+ * the channel, so this should be shown before the destructive action.
97
+ *
98
+ * The publisher's own license is excluded: they never lose access to their own
99
+ * app. Counts are de-duplicated per holder.
100
+ */
101
+ export interface ChannelUnpublishImpact {
102
+ licenses: number;
103
+ projects: number;
104
+ holders: ChannelUnpublishHolder[];
105
+ }
106
+ /**
107
+ * Result of unreleasing a channel. `withdrawn.installs` is how many installs
108
+ * actually lost access — show it in the success toast ("12 installs revoked").
109
+ */
110
+ export interface UnpublishChannelResponse {
111
+ message: string;
112
+ data: ReleaseChannel;
113
+ withdrawn: {
114
+ installs: number;
115
+ };
116
+ }
117
+ export interface ReleaseChannelMember {
118
+ id: string;
119
+ name: string;
120
+ /** Hex string */
121
+ theme: string;
122
+ /** Company name of the member license, or null. */
123
+ company: string | null;
124
+ /** When the license was added to the channel (members list only). */
125
+ added_at?: string | null;
126
+ }
127
+ //# sourceMappingURL=releaseChannels.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"releaseChannels.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/releaseChannels.ts"],"names":[],"m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EAAE,MAAM,CAAA;IACnB,eAAe,CAAC,EAAE,4BAA4B,CAAA;IAC9C,WAAW,CAAC,EAAE,iBAAiB,CAAA;IAC/B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED;;;GAGG;AACH;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,SAAS,GAAG,SAAS,CAAA;IAC3B;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC3B;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,sBAAsB,EAAE,CAAA;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,cAAc,CAAA;IACpB,SAAS,EAAE;QACT,QAAQ,EAAE,MAAM,CAAA;KACjB,CAAA;CACF;AAED,MAAM,WAAW,oBAAoB;IACnC,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,iBAAiB;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,101 @@
1
+ import type { ResourceVersionSummary } from './resourceReleases';
2
+ /**
3
+ * Entitlement-side shapes for sellable resources (AAD-898): a license's claim,
4
+ * and the reasons the access layer refuses a read.
5
+ *
6
+ * Split out of `sellableResources.ts` purely for file size; every type here is
7
+ * re-exported through the same barrel and the public surface is unchanged.
8
+ */
9
+ /**
10
+ * Why an access-layer read was refused — the discriminator to branch on.
11
+ *
12
+ * The HTTP status is NOT sufficient: three distinct states share 403, and they
13
+ * call for three different things from the user (buy it / contact the publisher
14
+ * / renew). Always read `reason`.
15
+ *
16
+ * | reason | status | what it means |
17
+ * | --- | --- | --- |
18
+ * | `not_entitled` | 403 | this license has never held it — offer a purchase |
19
+ * | `entitlement_revoked` | 403 | the publisher revoked it — contact them |
20
+ * | `subscription_expired` | 403 | the subscription lapsed — renew |
21
+ * | `subscription_pending_approval` | 403 | awaiting the publisher's approval — wait, do NOT render as expired |
22
+ * | `version_withdrawn` | 409 | the pinned build was pulled — offer the Update action |
23
+ * | `version_not_ready` | 409 | the payload has not finished preparing — poll |
24
+ * | `payload_backend_not_implemented` | 501 | no backend registered yet (the phase-1 default) |
25
+ *
26
+ * A 404 is separate and deliberate: an unknown resource AND a private listing
27
+ * this license has no relationship with both 404, so the API never confirms that
28
+ * another license's unpublished product exists.
29
+ */
30
+ export type ResourceAccessReason = 'not_entitled' | 'entitlement_revoked' | 'subscription_expired' | 'subscription_pending_approval' | 'version_withdrawn' | 'version_not_ready' | 'payload_backend_not_implemented';
31
+ /** The body of a refused access-layer read. */
32
+ export interface ResourceAccessError {
33
+ message: string;
34
+ reason: ResourceAccessReason;
35
+ }
36
+ /**
37
+ * Release state, independent of commercial state. Present when the publisher
38
+ * pulled the build this license is pinned to. Recovery is `moveResourceToChannelVersion()`.
39
+ */
40
+ export interface ResourceAccessBlock {
41
+ blocked: true;
42
+ reason: 'version_withdrawn';
43
+ withdrawn_version_id: string | null;
44
+ /**
45
+ * The build that was pulled, and what the channel serves instead. Version
46
+ * STRINGS, not just ids, so the recovery banner can name both — this is what
47
+ * lets resources render the same withdrawn band as apps instead of a
48
+ * resource-only lookalike.
49
+ */
50
+ withdrawn_version: {
51
+ id: string;
52
+ version: string;
53
+ } | null;
54
+ update_to_version: {
55
+ id: string;
56
+ version: string;
57
+ } | null;
58
+ }
59
+ /**
60
+ * A license's claim on a resource.
61
+ *
62
+ * ⚠️ `is_live` and `access_block` are INDEPENDENT and both must be checked. A
63
+ * fully paid-up buyer whose build was pulled is `is_live: true` with an
64
+ * `access_block`; a lapsed buyer whose build is fine is the reverse. Treating
65
+ * either one alone as "can I read this" gets one of the two cases wrong.
66
+ */
67
+ export interface ResourceEntitlementSummary {
68
+ id: string;
69
+ license_id: string;
70
+ /**
71
+ * The version this license actually runs — the pin. This is the ONLY correct
72
+ * answer to "which version am I on?"; what a channel currently offers is a
73
+ * different question, and the two differ exactly when an update is available.
74
+ */
75
+ pinned_version: ResourceVersionSummary | null;
76
+ channel_id: string | null;
77
+ /** The channel this license draws from, named — so a row can say which. */
78
+ channel: {
79
+ id: string;
80
+ name: string;
81
+ } | null;
82
+ auto_update: boolean;
83
+ revoked_at: string | null;
84
+ /** Commercial standing: not revoked, and any backing subscription still live. */
85
+ is_live: boolean;
86
+ access_block: ResourceAccessBlock | null;
87
+ }
88
+ export interface ResourceEntitlement extends ResourceEntitlementSummary {
89
+ resource_id: string;
90
+ license: {
91
+ id: string;
92
+ name: string;
93
+ } | null;
94
+ subscription_id: string | null;
95
+ /** Lifetime call total. Not a time series — see `fetchResourceConsumers`. */
96
+ call_count: number;
97
+ last_called_at: string | null;
98
+ created_at: string;
99
+ updated_at: string;
100
+ }
101
+ //# sourceMappingURL=resourceEntitlements.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceEntitlements.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/resourceEntitlements.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAEhE;;;;;;GAMG;AAEH;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,oBAAoB,GAC1B,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,+BAA+B,GAC/B,mBAAmB,GACnB,mBAAmB,GACnB,iCAAiC,CAAA;AAEvC,+CAA+C;AAC/C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