@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,38 @@
1
+ /** A role granted `resource.use`. */
2
+ export interface ResourceAssignedRole {
3
+ role_id: string;
4
+ name: string;
5
+ /** Live rbac_role_user membership count (deleted/expiry-filtered). */
6
+ member_count: number;
7
+ }
8
+ /** A user granted `resource.use` directly, rather than through a role. */
9
+ export interface ResourceAssignedUser {
10
+ user_id: string;
11
+ name: string;
12
+ }
13
+ /**
14
+ * A license admin role. These always have access whether or not anyone assigned
15
+ * them — surfaced so the screen can say so, rather than leaving an admin
16
+ * wondering why they can read something they are not listed on.
17
+ */
18
+ export interface ResourceAdminRole {
19
+ role_id: string;
20
+ name: string;
21
+ }
22
+ /** The whole access picture for one held resource. */
23
+ export interface ResourceAssignments {
24
+ assigned_roles: ResourceAssignedRole[];
25
+ assigned_users: ResourceAssignedUser[];
26
+ admin_roles: ResourceAdminRole[];
27
+ /** Roles that could still be assigned — already excludes admin and "everyone". */
28
+ available_roles: ResourceAssignedRole[];
29
+ /**
30
+ * Whether the resource is open to every member of the license.
31
+ *
32
+ * A plain boolean, not the app side's `{ channel_ids } | null`, for the same
33
+ * reason grants carry no channel. `false` is the state a freshly bought
34
+ * resource is in: closed, admins only, until someone grants.
35
+ */
36
+ everyone: boolean;
37
+ }
38
+ //# sourceMappingURL=resourceAssignments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceAssignments.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/resourceAssignments.ts"],"names":[],"mappings":"AAUA,qCAAqC;AACrC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAA;CACrB;AAED,0EAA0E;AAC1E,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb;AAED;;;;GAIG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;CACb;AAED,sDAAsD;AACtD,MAAM,WAAW,mBAAmB;IAClC,cAAc,EAAE,oBAAoB,EAAE,CAAA;IACtC,cAAc,EAAE,oBAAoB,EAAE,CAAA;IACtC,WAAW,EAAE,iBAAiB,EAAE,CAAA;IAChC,kFAAkF;IAClF,eAAe,EAAE,oBAAoB,EAAE,CAAA;IACvC;;;;;;OAMG;IACH,QAAQ,EAAE,OAAO,CAAA;CAClB"}
@@ -0,0 +1,10 @@
1
+ // Who inside the BUYING license may use a resource that license bought (AAD-954).
2
+ // Backend: app/Modules/Store/Services/Resource/ResourceAccessAssignmentService.php
3
+ //
4
+ // Shaped to match the app store's seat payload (`AssignedRole` / `AssignedUser`
5
+ // in `./seats`) so the manage-access screen can be the same experience — with
6
+ // one deliberate difference: **no `channel_ids` anywhere**. A resource
7
+ // entitlement pins one channel and one version for the whole license, so every
8
+ // user reads the same build; a per-user channel would be a control that does
9
+ // nothing. Do not add one.
10
+ export {};
@@ -0,0 +1,118 @@
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
+ * | `channel_not_accessible` | 403 | they DID buy it, but the track is restricted and their license is not listed — ask the publisher, never offer a purchase |
23
+ * | `not_granted` | 403 | the licence has it, this user does not — point at the licence admin |
24
+ * | `version_withdrawn` | 409 | the pinned build was pulled — offer the Update action |
25
+ * | `version_not_ready` | 409 | the payload has not finished preparing — poll |
26
+ * | `payload_backend_not_implemented` | 501 | no backend registered yet (the phase-1 default) |
27
+ *
28
+ * A 404 is separate and deliberate: an unknown resource AND a private listing
29
+ * this license has no relationship with both 404, so the API never confirms that
30
+ * another license's unpublished product exists.
31
+ */
32
+ export type ResourceAccessReason = 'not_entitled' | 'entitlement_revoked' | 'subscription_expired' | 'subscription_pending_approval'
33
+ /**
34
+ * AAD-949. Reachable ONLY by a license holding a live entitlement — the
35
+ * entitlement checks run first — so the remedy is "ask the publisher to add
36
+ * you to that track", never "buy this". Must not be collapsed into
37
+ * `not_entitled`: the two are answered by different people.
38
+ */
39
+ | 'channel_not_accessible'
40
+ /**
41
+ * AAD-954. The license bought it and may draw from the track, but THIS USER
42
+ * holds no grant. The only reason that is about a person rather than a
43
+ * license, and it is checked last — so the remedy is always "ask your
44
+ * license admin", never "buy this". Show the manage-access route to an
45
+ * admin and a "request access from your admin" message to anyone else.
46
+ */
47
+ | 'not_granted' | 'version_withdrawn' | 'version_not_ready' | 'payload_backend_not_implemented';
48
+ /** The body of a refused access-layer read. */
49
+ export interface ResourceAccessError {
50
+ message: string;
51
+ reason: ResourceAccessReason;
52
+ }
53
+ /**
54
+ * Release state, independent of commercial state. Present when the publisher
55
+ * pulled the build this license is pinned to. Recovery is `moveResourceToChannelVersion()`.
56
+ */
57
+ export interface ResourceAccessBlock {
58
+ blocked: true;
59
+ reason: 'version_withdrawn';
60
+ withdrawn_version_id: string | null;
61
+ /**
62
+ * The build that was pulled, and what the channel serves instead. Version
63
+ * STRINGS, not just ids, so the recovery banner can name both — this is what
64
+ * lets resources render the same withdrawn band as apps instead of a
65
+ * resource-only lookalike.
66
+ */
67
+ withdrawn_version: {
68
+ id: string;
69
+ version: string;
70
+ } | null;
71
+ update_to_version: {
72
+ id: string;
73
+ version: string;
74
+ } | null;
75
+ }
76
+ /**
77
+ * A license's claim on a resource.
78
+ *
79
+ * ⚠️ `is_live` and `access_block` are INDEPENDENT and both must be checked. A
80
+ * fully paid-up buyer whose build was pulled is `is_live: true` with an
81
+ * `access_block`; a lapsed buyer whose build is fine is the reverse. Treating
82
+ * either one alone as "can I read this" gets one of the two cases wrong.
83
+ */
84
+ export interface ResourceEntitlementSummary {
85
+ id: string;
86
+ license_id: string;
87
+ /**
88
+ * The version this license actually runs — the pin. This is the ONLY correct
89
+ * answer to "which version am I on?"; what a channel currently offers is a
90
+ * different question, and the two differ exactly when an update is available.
91
+ */
92
+ pinned_version: ResourceVersionSummary | null;
93
+ channel_id: string | null;
94
+ /** The channel this license draws from, named — so a row can say which. */
95
+ channel: {
96
+ id: string;
97
+ name: string;
98
+ } | null;
99
+ auto_update: boolean;
100
+ revoked_at: string | null;
101
+ /** Commercial standing: not revoked, and any backing subscription still live. */
102
+ is_live: boolean;
103
+ access_block: ResourceAccessBlock | null;
104
+ }
105
+ export interface ResourceEntitlement extends ResourceEntitlementSummary {
106
+ resource_id: string;
107
+ license: {
108
+ id: string;
109
+ name: string;
110
+ } | null;
111
+ subscription_id: string | null;
112
+ /** Lifetime call total. Not a time series — see `fetchResourceConsumers`. */
113
+ call_count: number;
114
+ last_called_at: string | null;
115
+ created_at: string;
116
+ updated_at: string;
117
+ }
118
+ //# 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;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,MAAM,oBAAoB,GAC1B,cAAc,GACd,qBAAqB,GACrB,sBAAsB,GACtB,+BAA+B;AACjC;;;;;GAKG;GACD,wBAAwB;AAC1B;;;;;;GAMG;GACD,aAAa,GACb,mBAAmB,GACnB,mBAAmB,GACnB,iCAAiC,CAAA;AAEvC,+CAA+C;AAC/C,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,oBAAoB,CAAA;CAC7B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,IAAI,CAAA;IACb,MAAM,EAAE,mBAAmB,CAAA;IAC3B,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAA;IACnC;;;;;OAKG;IACH,iBAAiB,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IACzD,iBAAiB,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CAC1D;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,MAAM,CAAA;IACV,UAAU,EAAE,MAAM,CAAA;IAClB;;;;OAIG;IACH,cAAc,EAAE,sBAAsB,GAAG,IAAI,CAAA;IAC7C,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,2EAA2E;IAC3E,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC5C,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,iFAAiF;IACjF,OAAO,EAAE,OAAO,CAAA;IAChB,YAAY,EAAE,mBAAmB,GAAG,IAAI,CAAA;CACzC;AAED,MAAM,WAAW,mBAAoB,SAAQ,0BAA0B;IACrE,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;IAC5C,eAAe,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,6EAA6E;IAC7E,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB"}
@@ -0,0 +1,230 @@
1
+ import type { ResourceVersionSource } from './snapshotFileSource';
2
+ import type { SnapshotPayloadConfig, SnapshotPayloadSchema } from './snapshotPayload';
3
+ import type { SnapshotErrorCode, SnapshotErrorContext } from './snapshotSources';
4
+ /**
5
+ * Release-side shapes for sellable resources (AAD-898): versions, channels, and
6
+ * the impact preview an unpublish is confirmed against.
7
+ *
8
+ * Split out of `sellableResources.ts` purely for file size; every type here is
9
+ * re-exported through the same barrel and the public surface is unchanged.
10
+ */
11
+ /**
12
+ * Whether a version's payload is ready to be served.
13
+ *
14
+ * **This is the asynchronous completion signal, and since AAD-939 it is genuinely
15
+ * asynchronous.** A `snapshot` version is created `pending` and a QUEUED JOB flips
16
+ * it to `ready` or `failed`. Poll `fetchResourceVersion()` until this leaves
17
+ * `pending`; on `failed`, show `payload_error`.
18
+ *
19
+ * Before AAD-939 every version came back `ready`, so code that ignored this field
20
+ * still worked by accident. It no longer does — a UI built against the create
21
+ * response silently shows nothing while the job runs, and its Publish button 422s.
22
+ */
23
+ export type ResourcePayloadState = 'pending' | 'ready' | 'failed';
24
+ /** The trimmed version shape embedded on channels and entitlements. */
25
+ export interface ResourceVersionSummary {
26
+ id: string;
27
+ version: string;
28
+ payload_state: ResourcePayloadState;
29
+ }
30
+ export interface ResourceVersion {
31
+ id: string;
32
+ resource_id: string;
33
+ version: string;
34
+ release_notes: string | null;
35
+ payload_state: ResourcePayloadState;
36
+ /**
37
+ * Publisher-facing failure reason when `payload_state` is `failed`.
38
+ *
39
+ * English-only. Use it as the FALLBACK and branch on `payload_error_code` — a
40
+ * prose string cannot be localised for the nl/de builds, and the numbers in it
41
+ * cannot be read reliably.
42
+ */
43
+ payload_error: string | null;
44
+ /** Machine-readable failure, for branching and translation (AAD-939). */
45
+ payload_error_code: SnapshotErrorCode | null;
46
+ /**
47
+ * The numbers behind the failure.
48
+ *
49
+ * This is the ONLY place they exist for a failed version: a version can fail
50
+ * without ever being previewed, because the source table grew between previewing
51
+ * and the job running — which is exactly the case the refuse-rather-than-truncate
52
+ * design exists for.
53
+ */
54
+ payload_error_context: SnapshotErrorContext | null;
55
+ /**
56
+ * The declared field names/types/nullability/ordering of the payload. Null until
57
+ * the materialisation job records it; AAD-942 builds structural diffs on top.
58
+ *
59
+ * Typed for snapshots because they are the only payload type that records one
60
+ * today. Narrow with `isSnapshotPayloadSchema()` rather than casting if you render
61
+ * `fields` — AAD-899 may store a different shape here.
62
+ */
63
+ payload_schema: SnapshotPayloadSchema | null;
64
+ /**
65
+ * What the publisher selected: source table, columns, filters, declarations
66
+ * (AAD-939).
67
+ *
68
+ * ⚠️ **PUBLISHER-ONLY, and ABSENT rather than null for anyone else.** It names the
69
+ * publisher's own dynamic table and its column ids, which a buyer is not entitled
70
+ * to — buyers get the data and the declared schema. Check presence, do not assume
71
+ * a null: the key is omitted entirely for a non-publisher.
72
+ */
73
+ payload_config?: SnapshotPayloadConfig | Record<string, unknown> | null;
74
+ /**
75
+ * Rows in the materialised dataset, flattened out of `payload_schema`.
76
+ *
77
+ * Null before materialisation, so "not known yet" and "zero rows" stay
78
+ * distinguishable — a dataset genuinely can be empty.
79
+ */
80
+ row_count: number | null;
81
+ /** Size in bytes of the canonical JSON representation. Null before materialisation. */
82
+ byte_size: number | null;
83
+ /**
84
+ * The channels this version is live on. A version can serve several.
85
+ *
86
+ * `published_at` is when this version became THAT channel's active version. Null
87
+ * if it was set outside the publish path.
88
+ */
89
+ serving_channels: Array<{
90
+ id: string;
91
+ name: string;
92
+ is_default: boolean;
93
+ published_at: string | null;
94
+ }>;
95
+ /**
96
+ * When this version FIRST went live anywhere, or null if it never has.
97
+ *
98
+ * **This is the field to label "published".** `created_at` is when the version was
99
+ * registered and `payload_schema.materialised_at` is when the artifact was built —
100
+ * for a version created and published days apart, neither is the publish date. A
101
+ * later rollback onto this version does not rewrite it; first means first.
102
+ */
103
+ first_published_at: string | null;
104
+ /**
105
+ * Where this version's rows came from, available from the moment it is declared.
106
+ *
107
+ * A linked TABLE carries a table reference; an uploaded FILE carries provenance
108
+ * instead — filename, format, size, digest and `verified: false`. The platform can
109
+ * inspect a table inside the publisher's own license and cannot inspect an
110
+ * uploaded file's origin at all, which is why the two say different things.
111
+ *
112
+ * Present even while `pending` or `failed`, when `payload_schema` is still null —
113
+ * the row that most needs to say where it came from is the one that failed.
114
+ *
115
+ * Discriminated on `type`, and ABSENT MEANS `'table'` (AAD-948), so read it as
116
+ * `source?.type ?? 'table'` — the optional chain matters, because the field itself
117
+ * is optional (below) and a non-publisher never receives it at all.
118
+ *
119
+ * ⚠️ **PUBLISHER-ONLY, and ABSENT rather than null for anyone else**, for the same
120
+ * reason as `payload_config`: it names the publisher's own table or file.
121
+ */
122
+ source?: ResourceVersionSource | null;
123
+ created_at: string;
124
+ updated_at: string;
125
+ }
126
+ /**
127
+ * Who may draw releases from a channel (AAD-949).
128
+ *
129
+ * - `'default'` — every ENTITLED license may use the channel; the member pivot is
130
+ * ignored even if rows exist
131
+ * - `'specific_licenses'` — only entitled licenses on the member pivot may use it
132
+ *
133
+ * ⚠️ **This narrows an entitlement; it never grants one.** The app store's
134
+ * identically-named mode does double duty — there, channel membership is itself a
135
+ * route into entitlement. On a resource it is not: entitlement always comes from a
136
+ * purchase, so adding a license to a channel gives it nothing it did not already
137
+ * have. A member with no entitlement is refused `not_entitled`.
138
+ */
139
+ export type ResourceChannelAccessMode = 'default' | 'specific_licenses';
140
+ /**
141
+ * Per-channel commercial bypass (AAD-949).
142
+ *
143
+ * - `'free'` — members of this channel are not blocked by a lapsed subscription
144
+ * - `null` — inherit the resource's access model (default)
145
+ *
146
+ * Only valid on a `specific_licenses` channel of a subscription resource; anything
147
+ * else is a 422 on `errors.access_override`. It relaxes the commercial gate for an
148
+ * entitlement that ALREADY exists and cannot create one.
149
+ */
150
+ export type ResourceChannelAccessOverride = 'free' | null;
151
+ /** A release channel. `active_version` is null when the channel serves nothing. */
152
+ export interface ResourceChannel {
153
+ id: string;
154
+ resource_id: string;
155
+ name: string;
156
+ description: string | null;
157
+ color: string | null;
158
+ sort_order: number;
159
+ is_default: boolean;
160
+ access_mode: ResourceChannelAccessMode;
161
+ access_override: ResourceChannelAccessOverride;
162
+ /**
163
+ * Whether the CURRENT license is on this channel's member pivot.
164
+ *
165
+ * Do not render this as "has access": it is one of two conditions, and the other
166
+ * (an entitlement) is not visible here. It is only meaningful when `access_mode`
167
+ * is `specific_licenses`.
168
+ */
169
+ is_member: boolean;
170
+ /**
171
+ * How many licenses are on the pivot. **Publisher-only — `null` for anyone
172
+ * else**, rather than 0, so "not shown to you" and "nobody is a member" stay
173
+ * distinguishable.
174
+ */
175
+ member_count: number | null;
176
+ active_version: ResourceVersionSummary | null;
177
+ /** Convenience mirror of `active_version !== null`. */
178
+ is_publishing: boolean;
179
+ created_at: string;
180
+ updated_at: string;
181
+ }
182
+ /**
183
+ * Partial update — omit a key to leave it alone, send `null` to clear a nullable
184
+ * one. `name` is NOT required, unlike on create.
185
+ *
186
+ * The backend refuses `is_default: false` on the current default (400): a resource
187
+ * must always have exactly one, so switch by promoting another channel.
188
+ */
189
+ export interface UpdateResourceChannelData {
190
+ name?: string;
191
+ description?: string | null;
192
+ color?: string | null;
193
+ access_mode?: ResourceChannelAccessMode;
194
+ access_override?: ResourceChannelAccessOverride;
195
+ sort_order?: number;
196
+ is_default?: boolean;
197
+ }
198
+ /**
199
+ * A license on a channel's member pivot. Enough to render a chip without a
200
+ * directory lookup — the same shape the app store's channel members endpoint
201
+ * returns, so the manage-access views can share components.
202
+ */
203
+ export interface ResourceChannelMember {
204
+ id: string;
205
+ name: string;
206
+ /** Always null: the V1 Company model was removed, so no display name exists. */
207
+ company: string | null;
208
+ /** Hex string. */
209
+ theme: string;
210
+ /** When the license was added to the channel. */
211
+ added_at: string | null;
212
+ }
213
+ /** Body for `retryResourceVersion()`. Everything is optional. */
214
+ export interface RetryResourceVersionData {
215
+ /**
216
+ * Replaces the stored selection. Omit to replay exactly what failed, which is
217
+ * right for a transient fault and useless for a failure caused by the selection.
218
+ */
219
+ payload_config?: SnapshotPayloadConfig | Record<string, unknown>;
220
+ }
221
+ /** Who an unpublish would cut off. */
222
+ export interface ResourceUnpublishImpact {
223
+ licenses: number;
224
+ holders: Array<{
225
+ license_id: string;
226
+ license_name: string | null;
227
+ version_id: string | null;
228
+ }>;
229
+ }
230
+ //# sourceMappingURL=resourceReleases.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceReleases.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/resourceReleases.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAA;AACjE,OAAO,KAAK,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AACrF,OAAO,KAAK,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAEhF;;;;;;GAMG;AAEH;;;;;;;;;;;GAWG;AACH,MAAM,MAA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gFAAgF;IAChF,OAAO,EAAE,MAAM,GAAG,IAAI,CAAA;IACtB,kBAAkB;IAClB,KAAK,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAA;CACxB;AAED,iEAAiE;AACjE,MAAM,WAAW,wBAAwB;IACvC;;;OAGG;IACH,cAAc,CAAC,EAAE,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACjE;AAED,sCAAsC;AACtC,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,KAAK,CAAC;QACb,UAAU,EAAE,MAAM,CAAA;QAClB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAA;QAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;KAC1B,CAAC,CAAA;CACH"}
@@ -0,0 +1,115 @@
1
+ import type { AppTrustLevel } from './app';
2
+ import type { ResourceChannelAccessMode, ResourceChannelAccessOverride } from './resourceReleases';
3
+ import type { ResourceCategory, ResourcePayloadType } from './sellableResources';
4
+ import type { SnapshotPayloadConfig } from './snapshotPayload';
5
+ /**
6
+ * Request-side shapes for sellable resources (AAD-898): list params and the
7
+ * bodies sent when creating or acquiring.
8
+ *
9
+ * Split out of `sellableResources.ts` purely for file size; every type here is
10
+ * re-exported through the same barrel and the public surface is unchanged.
11
+ */
12
+ /**
13
+ * Which slice of the catalogue to list.
14
+ *
15
+ * - `browse` — publicly browsable, published listings
16
+ * - `owned` — this license's own listings, INCLUDING unpublished ones (the
17
+ * publisher's recovery surface, so the release gate does not apply)
18
+ * - `my_access` — listings this license is entitled to
19
+ */
20
+ export type ResourceStoreMode = 'browse' | 'owned' | 'my_access';
21
+ /** Same sort vocabulary as `FetchAppsParams`, so a merged view can sort as one. */
22
+ export type ResourceSortOption = 'updated_at' | 'title_asc' | 'title_desc' | 'trust' | 'newest' | 'popular';
23
+ export interface FetchResourcesParams {
24
+ store_mode?: ResourceStoreMode;
25
+ search?: string;
26
+ category?: ResourceCategory;
27
+ payload_type?: ResourcePayloadType;
28
+ featured?: boolean;
29
+ /**
30
+ * Publisher license id. Mirrors `FetchAppsParams` so Discover's publisher
31
+ * filter narrows BOTH lists — without it a merged grid filtered to one
32
+ * publisher kept showing every resource.
33
+ */
34
+ publisher?: string;
35
+ /** Same vocabulary as apps, so the sidebar's trust filter applies to both. */
36
+ trust_level?: AppTrustLevel;
37
+ sort?: ResourceSortOption;
38
+ /**
39
+ * Optional cap, 1–50. The endpoint is otherwise UNPAGINATED, matching
40
+ * `/store/apps`. Do not introduce a default limit client-side — a featured
41
+ * rail derived by filtering an already-fetched response would silently drop
42
+ * entries past the cutoff.
43
+ */
44
+ limit?: number;
45
+ }
46
+ export interface CreateSellableResourceData {
47
+ title: string;
48
+ tagline?: string | null;
49
+ description?: string | null;
50
+ icon?: string | null;
51
+ color?: string | null;
52
+ /** Fixed at creation — it decides which backend serves reads. */
53
+ payload_type: ResourcePayloadType;
54
+ category: ResourceCategory;
55
+ availability?: 'always_available' | 'request_access' | 'private';
56
+ access_model?: 'free' | 'subscription';
57
+ access_level?: 'community' | 'enterprise';
58
+ }
59
+ /** `payload_type` is absent deliberately: it cannot change after creation. */
60
+ export interface UpdateSellableResourceData {
61
+ title?: string;
62
+ tagline?: string | null;
63
+ description?: string | null;
64
+ icon?: string | null;
65
+ color?: string | null;
66
+ category?: ResourceCategory;
67
+ availability?: 'always_available' | 'request_access' | 'private';
68
+ access_model?: 'free' | 'subscription';
69
+ access_level?: 'community' | 'enterprise';
70
+ }
71
+ export interface CreateResourceVersionData {
72
+ /** Semantic, e.g. `1.0.0`. The store never renumbers a release. */
73
+ version: string;
74
+ release_notes?: string | null;
75
+ /**
76
+ * Payload-type specific.
77
+ *
78
+ * For a `snapshot` resource this is REQUIRED and fully validated (AAD-939): the
79
+ * source table, the explicit column selection, and the personal-data declaration.
80
+ * Validate the selection with `previewResourceSnapshot()` first — it uses the same
81
+ * rules, so a selection that previews cleanly creates cleanly.
82
+ *
83
+ * For an `endpoint` resource it stays free-form until AAD-899 defines it.
84
+ */
85
+ payload_config?: SnapshotPayloadConfig | Record<string, unknown> | null;
86
+ }
87
+ export interface CreateResourceChannelData {
88
+ name: string;
89
+ description?: string | null;
90
+ color?: string | null;
91
+ /** Who may draw from the track. Defaults to `default` (AAD-949). */
92
+ access_mode?: ResourceChannelAccessMode;
93
+ /** Only valid on a `specific_licenses` channel of a subscription resource. */
94
+ access_override?: ResourceChannelAccessOverride;
95
+ sort_order?: number;
96
+ /**
97
+ * Marking this channel default demotes the previous default atomically. The
98
+ * first channel on a resource with no default is promoted automatically.
99
+ */
100
+ is_default?: boolean;
101
+ }
102
+ /**
103
+ * Buying a resource.
104
+ *
105
+ * Omit `pricing_tier_id` for a FREE resource — it is acquired directly and the
106
+ * response is a `ResourceEntitlementSummary`. For a subscription resource
107
+ * the tier is required and the response is a `Subscription` in
108
+ * `pending_approval`, which grants NO access until the publisher approves.
109
+ */
110
+ export interface AcquireResourceData {
111
+ pricing_tier_id?: string;
112
+ /** Optional buyer note to the publisher (PO number, billing contact, …). */
113
+ message?: string;
114
+ }
115
+ //# sourceMappingURL=resourceRequests.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resourceRequests.d.ts","sourceRoot":"","sources":["../../../../src/services/AppService/types/resourceRequests.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAC1C,OAAO,KAAK,EAAE,yBAAyB,EAAE,6BAA6B,EAAE,MAAM,oBAAoB,CAAA;AAClG,OAAO,KAAK,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAChF,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAA;AAE9D;;;;;;GAMG;AAEH;;;;;;;GAOG;AACH,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,OAAO,GAAG,WAAW,CAAA;AAEhE,m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