@aglyn/aglyn 1.0.0-beta.229 → 1.0.0-beta.231
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +11 -11
- package/src/lib/app-utils/analytics-events.d.ts +18 -0
- package/src/lib/app-utils/analytics-events.js +2 -0
- package/src/lib/app-utils/analytics-events.js.map +1 -1
- package/src/lib/app-utils/crm.d.ts +14 -1
- package/src/lib/app-utils/crm.js +19 -2
- package/src/lib/app-utils/crm.js.map +1 -1
- package/src/lib/app-utils/docs-help.generated.d.ts +111 -9
- package/src/lib/app-utils/docs-help.generated.js +272 -3
- package/src/lib/app-utils/docs-help.generated.js.map +1 -1
- package/src/lib/app-utils/docs-index.generated.js +810 -61
- package/src/lib/app-utils/docs-index.generated.js.map +1 -1
- package/src/lib/app-utils/host-status.d.ts +85 -0
- package/src/lib/app-utils/host-status.js +115 -0
- package/src/lib/app-utils/host-status.js.map +1 -0
- package/src/lib/app-utils/lockdown.js +1 -1
- package/src/lib/app-utils/lockdown.js.map +1 -1
- package/src/lib/app-utils/media-filter.d.ts +136 -0
- package/src/lib/app-utils/media-filter.js +400 -0
- package/src/lib/app-utils/media-filter.js.map +1 -0
- package/src/lib/app-utils/mobile-push.d.ts +98 -0
- package/src/lib/app-utils/mobile-push.js +97 -0
- package/src/lib/app-utils/mobile-push.js.map +1 -0
- package/src/lib/app-utils/notification-push.d.ts +38 -0
- package/src/lib/app-utils/notification-push.js +54 -0
- package/src/lib/app-utils/notification-push.js.map +1 -0
- package/src/lib/app-utils/notifications.d.ts +7 -0
- package/src/lib/app-utils/notifications.js.map +1 -1
- package/src/lib/app-utils/organizations.js +5 -2
- package/src/lib/app-utils/organizations.js.map +1 -1
- package/src/lib/app-utils/plan-entitlements.js +20 -0
- package/src/lib/app-utils/plan-entitlements.js.map +1 -1
- package/src/lib/app-utils/plugin-host-events.generated.d.ts +1 -1
- package/src/lib/app-utils/plugin-host-events.generated.js +164 -0
- package/src/lib/app-utils/plugin-host-events.generated.js.map +1 -1
- package/src/lib/app-utils/plugin-release-flags.generated.d.ts +1 -1
- package/src/lib/app-utils/plugin-release-flags.generated.js +7 -0
- package/src/lib/app-utils/plugin-release-flags.generated.js.map +1 -1
- package/src/lib/app-utils/realm-host-surface.generated.js +3 -0
- package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
- package/src/lib/app-utils/release-flags.js +6 -2
- package/src/lib/app-utils/release-flags.js.map +1 -1
- package/src/lib/app-utils/scope-tokens.d.ts +16 -1
- package/src/lib/app-utils/scope-tokens.js +15 -1
- package/src/lib/app-utils/scope-tokens.js.map +1 -1
- package/src/lib/app-utils/site-journey.d.ts +143 -0
- package/src/lib/app-utils/site-journey.js +282 -0
- package/src/lib/app-utils/site-journey.js.map +1 -0
- package/src/lib/app-utils/site-list-query.d.ts +47 -0
- package/src/lib/app-utils/site-list-query.js +142 -0
- package/src/lib/app-utils/site-list-query.js.map +1 -0
- package/src/lib/app-utils/site-wide-outbox.d.ts +95 -0
- package/src/lib/app-utils/site-wide-outbox.js +117 -0
- package/src/lib/app-utils/site-wide-outbox.js.map +1 -0
- package/src/lib/app-utils/transfer-launcher-context.d.ts +6 -0
- package/src/lib/app-utils/transfer-launcher-context.js.map +1 -1
- package/src/lib/app-utils/upload-inspection.js +7 -0
- package/src/lib/app-utils/upload-inspection.js.map +1 -1
- package/src/lib/app-utils/webhook-delivery.js +4 -1
- package/src/lib/app-utils/webhook-delivery.js.map +1 -1
- package/src/lib/foundation/definitions/org-billing.types.d.ts +24 -0
- package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
- package/src/lib/foundation/definitions/organization.types.d.ts +18 -7
- package/src/lib/foundation/definitions/organization.types.js.map +1 -1
- package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +4 -1
- package/src/lib/foundation/definitions/write-deny-coverage.util.js +12 -2
- package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -1
- package/src/lib/plugin-manager/enabled-plugins.js +4 -2
- package/src/lib/plugin-manager/enabled-plugins.js.map +1 -1
- package/src/lib/plugin-manager/feature-plugins.d.ts +173 -0
- package/src/lib/plugin-manager/feature-plugins.js +62 -1
- package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
- package/src/lib/plugin-manager/first-party-plugins.generated.js +251 -2
- package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
- package/src/lib/plugin-manager/plugin-ai-capabilities.d.ts +192 -0
- package/src/lib/plugin-manager/plugin-ai-capabilities.js +157 -0
- package/src/lib/plugin-manager/plugin-ai-capabilities.js.map +1 -0
- package/src/lib/plugin-manager/plugin-checkout-extras.d.ts +168 -0
- package/src/lib/plugin-manager/plugin-checkout-extras.js +172 -0
- package/src/lib/plugin-manager/plugin-checkout-extras.js.map +1 -0
- package/src/lib/plugin-manager/plugin-contributions.d.ts +7 -0
- package/src/lib/plugin-manager/plugin-contributions.js +1 -1
- package/src/lib/plugin-manager/plugin-contributions.js.map +1 -1
- package/src/lib/plugin-manager/plugin-domain-events.d.ts +138 -0
- package/src/lib/plugin-manager/plugin-domain-events.js +148 -0
- package/src/lib/plugin-manager/plugin-domain-events.js.map +1 -0
- package/src/lib/plugin-manager/plugin-events.d.ts +51 -0
- package/src/lib/plugin-manager/plugin-events.js +4 -0
- package/src/lib/plugin-manager/plugin-events.js.map +1 -1
- package/src/lib/plugin-manager/plugin-fulfillment-providers.d.ts +101 -0
- package/src/lib/plugin-manager/plugin-fulfillment-providers.js +83 -0
- package/src/lib/plugin-manager/plugin-fulfillment-providers.js.map +1 -0
- package/src/lib/plugin-manager/plugin-permissions.js +21 -5
- package/src/lib/plugin-manager/plugin-permissions.js.map +1 -1
- package/src/lib/plugin-manager/plugin-person-records.d.ts +90 -0
- package/src/lib/plugin-manager/plugin-person-records.js +26 -0
- package/src/lib/plugin-manager/plugin-person-records.js.map +1 -1
- package/src/lib/plugin-manager/plugin-product-catalog.d.ts +204 -0
- package/src/lib/plugin-manager/plugin-product-catalog.js +43 -0
- package/src/lib/plugin-manager/plugin-product-catalog.js.map +1 -0
- package/src/lib/plugin-manager/plugin-shipment-records.d.ts +210 -0
- package/src/lib/plugin-manager/plugin-shipment-records.js +63 -0
- package/src/lib/plugin-manager/plugin-shipment-records.js.map +1 -0
- package/src/lib/plugin-manager/plugin-shipping-rates.d.ts +151 -0
- package/src/lib/plugin-manager/plugin-shipping-rates.js +62 -0
- package/src/lib/plugin-manager/plugin-shipping-rates.js.map +1 -0
- package/src/lib/plugin-manager/plugin-sms-messaging.d.ts +103 -0
- package/src/lib/plugin-manager/plugin-sms-messaging.js +39 -0
- package/src/lib/plugin-manager/plugin-sms-messaging.js.map +1 -0
- package/src/lib/plugin-manager/plugin-stock-levels.d.ts +81 -0
- package/src/lib/plugin-manager/plugin-stock-levels.js +32 -0
- package/src/lib/plugin-manager/plugin-stock-levels.js.map +1 -0
- package/src/lib/plugin-manager/plugin-tax-profile.d.ts +154 -0
- package/src/lib/plugin-manager/plugin-tax-profile.js +56 -0
- package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -1
- package/src/lib/plugin-manager/plugin-theme-font-catalog.d.ts +59 -0
- package/src/lib/plugin-manager/plugin-theme-font-catalog.js +40 -0
- package/src/lib/plugin-manager/plugin-theme-font-catalog.js.map +1 -0
- package/src/lib/plugin-manager/plugin-tracking-pages.d.ts +55 -0
- package/src/lib/plugin-manager/plugin-tracking-pages.js +76 -0
- package/src/lib/plugin-manager/plugin-tracking-pages.js.map +1 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js +3 -0
- package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { HostEventDeclaration } from './host-events';
|
|
10
10
|
/** Every host event a plugin declares. */
|
|
11
|
-
export type PluginHostEventType = 'formSubmission' | 'memberSignUp' | 'memberSignIn' | 'memberSignOut' | 'lead' | 'booking' | 'taskCompleted' | 'contactCreated' | 'contactStageChanged' | 'dealStageChanged' | 'dealWon' | 'dealLost';
|
|
11
|
+
export type PluginHostEventType = 'formSubmission' | 'memberSignUp' | 'memberSignIn' | 'memberSignOut' | 'lead' | 'booking' | 'taskCompleted' | 'contactCreated' | 'contactStageChanged' | 'dealStageChanged' | 'dealWon' | 'dealLost' | 'orderPaid' | 'orderFulfilled' | 'orderDelivered' | 'orderRefunded' | 'orderCancelled' | 'returnRequested' | 'returnApproved' | 'returnDeclined' | 'returnReceived' | 'returnRefunded' | 'funnelLeft';
|
|
12
12
|
export declare const PLUGIN_HOST_EVENTS: readonly HostEventDeclaration[];
|
|
@@ -172,6 +172,170 @@
|
|
|
172
172
|
"companyId",
|
|
173
173
|
"lostReason"
|
|
174
174
|
]
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
"pluginId": "commerce",
|
|
178
|
+
"type": "orderPaid",
|
|
179
|
+
"order": 140,
|
|
180
|
+
"label": "Order paid",
|
|
181
|
+
"payloadKeys": [
|
|
182
|
+
"orderId",
|
|
183
|
+
"orderNumber",
|
|
184
|
+
"status",
|
|
185
|
+
"channel",
|
|
186
|
+
"email",
|
|
187
|
+
"name",
|
|
188
|
+
"totalCents",
|
|
189
|
+
"currency"
|
|
190
|
+
]
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
"pluginId": "commerce",
|
|
194
|
+
"type": "orderFulfilled",
|
|
195
|
+
"order": 141,
|
|
196
|
+
"label": "Order fulfilled",
|
|
197
|
+
"payloadKeys": [
|
|
198
|
+
"orderId",
|
|
199
|
+
"orderNumber",
|
|
200
|
+
"status",
|
|
201
|
+
"email",
|
|
202
|
+
"name",
|
|
203
|
+
"totalCents",
|
|
204
|
+
"fulfillmentId",
|
|
205
|
+
"carrier",
|
|
206
|
+
"trackingNumber",
|
|
207
|
+
"trackingUrl"
|
|
208
|
+
]
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"pluginId": "commerce",
|
|
212
|
+
"type": "orderDelivered",
|
|
213
|
+
"order": 142,
|
|
214
|
+
"label": "Order delivered",
|
|
215
|
+
"payloadKeys": [
|
|
216
|
+
"orderId",
|
|
217
|
+
"orderNumber",
|
|
218
|
+
"status",
|
|
219
|
+
"email",
|
|
220
|
+
"name",
|
|
221
|
+
"totalCents"
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"pluginId": "commerce",
|
|
226
|
+
"type": "orderRefunded",
|
|
227
|
+
"order": 143,
|
|
228
|
+
"label": "Order refunded",
|
|
229
|
+
"payloadKeys": [
|
|
230
|
+
"orderId",
|
|
231
|
+
"orderNumber",
|
|
232
|
+
"status",
|
|
233
|
+
"email",
|
|
234
|
+
"name",
|
|
235
|
+
"totalCents",
|
|
236
|
+
"refundCents",
|
|
237
|
+
"fullRefund"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"pluginId": "commerce",
|
|
242
|
+
"type": "orderCancelled",
|
|
243
|
+
"order": 144,
|
|
244
|
+
"label": "Order canceled",
|
|
245
|
+
"payloadKeys": [
|
|
246
|
+
"orderId",
|
|
247
|
+
"orderNumber",
|
|
248
|
+
"status",
|
|
249
|
+
"email",
|
|
250
|
+
"name",
|
|
251
|
+
"totalCents"
|
|
252
|
+
]
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"pluginId": "commerce",
|
|
256
|
+
"type": "returnRequested",
|
|
257
|
+
"order": 145,
|
|
258
|
+
"label": "Return requested",
|
|
259
|
+
"payloadKeys": [
|
|
260
|
+
"orderId",
|
|
261
|
+
"orderNumber",
|
|
262
|
+
"email",
|
|
263
|
+
"name",
|
|
264
|
+
"returnId",
|
|
265
|
+
"returnStatus"
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
{
|
|
269
|
+
"pluginId": "commerce",
|
|
270
|
+
"type": "returnApproved",
|
|
271
|
+
"order": 146,
|
|
272
|
+
"label": "Return approved",
|
|
273
|
+
"payloadKeys": [
|
|
274
|
+
"orderId",
|
|
275
|
+
"orderNumber",
|
|
276
|
+
"email",
|
|
277
|
+
"name",
|
|
278
|
+
"returnId",
|
|
279
|
+
"returnStatus"
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"pluginId": "commerce",
|
|
284
|
+
"type": "returnDeclined",
|
|
285
|
+
"order": 147,
|
|
286
|
+
"label": "Return declined",
|
|
287
|
+
"payloadKeys": [
|
|
288
|
+
"orderId",
|
|
289
|
+
"orderNumber",
|
|
290
|
+
"email",
|
|
291
|
+
"name",
|
|
292
|
+
"returnId",
|
|
293
|
+
"returnStatus"
|
|
294
|
+
]
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
"pluginId": "commerce",
|
|
298
|
+
"type": "returnReceived",
|
|
299
|
+
"order": 148,
|
|
300
|
+
"label": "Return received",
|
|
301
|
+
"payloadKeys": [
|
|
302
|
+
"orderId",
|
|
303
|
+
"orderNumber",
|
|
304
|
+
"email",
|
|
305
|
+
"name",
|
|
306
|
+
"returnId",
|
|
307
|
+
"returnStatus"
|
|
308
|
+
]
|
|
309
|
+
},
|
|
310
|
+
{
|
|
311
|
+
"pluginId": "commerce",
|
|
312
|
+
"type": "returnRefunded",
|
|
313
|
+
"order": 149,
|
|
314
|
+
"label": "Return refunded",
|
|
315
|
+
"payloadKeys": [
|
|
316
|
+
"orderId",
|
|
317
|
+
"orderNumber",
|
|
318
|
+
"email",
|
|
319
|
+
"name",
|
|
320
|
+
"returnId",
|
|
321
|
+
"returnStatus",
|
|
322
|
+
"returnRefundCents"
|
|
323
|
+
]
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
"pluginId": "funnels",
|
|
327
|
+
"type": "funnelLeft",
|
|
328
|
+
"order": 150,
|
|
329
|
+
"label": "Left a funnel",
|
|
330
|
+
"payloadKeys": [
|
|
331
|
+
"funnelId",
|
|
332
|
+
"funnelName",
|
|
333
|
+
"step",
|
|
334
|
+
"stepLabel",
|
|
335
|
+
"nextStepLabel",
|
|
336
|
+
"afterHours",
|
|
337
|
+
"email"
|
|
338
|
+
]
|
|
175
339
|
}
|
|
176
340
|
];
|
|
177
341
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/plugin-host-events.generated.ts"],"sourcesContent":["/**\n * GENERATED FILE — do not edit. Regenerate with:\n * node tools/scripts/generate-plugin-manifests.mjs\n *\n * The host events plugins declare (AGL-3080): each plugin's `hostEvents`\n * in plugins.config.json, in `order`. Core's `host-events.ts` folds them\n * in beside the platform's own.\n */\n\nimport type { HostEventDeclaration } from './host-events'\n\n/** Every host event a plugin declares. */\nexport type PluginHostEventType =\n | 'formSubmission'\n | 'memberSignUp'\n | 'memberSignIn'\n | 'memberSignOut'\n | 'lead'\n | 'booking'\n | 'taskCompleted'\n | 'contactCreated'\n | 'contactStageChanged'\n | 'dealStageChanged'\n | 'dealWon'\n | 'dealLost'\n\nexport const PLUGIN_HOST_EVENTS: readonly HostEventDeclaration[] = [\n {\n \"pluginId\": \"forms\",\n \"type\": \"formSubmission\",\n \"order\": 10,\n \"label\": \"Form submitted\",\n \"payloadKeys\": [\n \"formId\",\n \"formName\",\n \"path\",\n \"and every submitted field by name\"\n ],\n \"recipientActed\": true\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"memberSignUp\",\n \"order\": 30,\n \"label\": \"Member signed up\",\n \"payloadKeys\": [\n \"email\"\n ],\n \"recipientActed\": true\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"memberSignIn\",\n \"order\": 40,\n \"label\": \"Member signed in\",\n \"payloadKeys\": [\n \"email\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"memberSignOut\",\n \"order\": 50,\n \"label\": \"Member signed out\"\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"lead\",\n \"order\": 60,\n \"label\": \"New lead\",\n \"payloadKeys\": [\n \"leadId\",\n \"email\",\n \"name\",\n \"source\",\n \"hostId\",\n \"formId\",\n \"campaignIds\"\n ],\n \"recipientActed\": true\n },\n {\n \"pluginId\": \"bookings\",\n \"type\": \"booking\",\n \"order\": 70,\n \"label\": \"New booking\",\n \"payloadKeys\": [\n \"serviceName\",\n \"email\",\n \"startsAtMs\"\n ],\n \"recipientActed\": true\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"taskCompleted\",\n \"order\": 80,\n \"label\": \"CRM task completed\",\n \"payloadKeys\": [\n \"taskId\",\n \"title\",\n \"kind\",\n \"priority\",\n \"dueAtMs\",\n \"completedAtMs\",\n \"completedByUid\",\n \"assigneeUid\",\n \"createdByUid\",\n \"contactId\",\n \"companyId\",\n \"dealId\",\n \"taskHostId\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"contactCreated\",\n \"order\": 90,\n \"label\": \"Contact created\",\n \"payloadKeys\": [\n \"contactId\",\n \"email\",\n \"name\",\n \"source\",\n \"hostId\",\n \"lifecycleStage\",\n \"campaignIds\",\n \"formId\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"contactStageChanged\",\n \"order\": 100,\n \"label\": \"Contact changed stage\",\n \"payloadKeys\": [\n \"contactId\",\n \"email\",\n \"lifecycleStage\",\n \"previousStage\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"dealStageChanged\",\n \"order\": 110,\n \"label\": \"Deal moved\",\n \"payloadKeys\": [\n \"dealId\",\n \"title\",\n \"amountCents\",\n \"currency\",\n \"stageId\",\n \"previousStageId\",\n \"ownerUid\",\n \"contactId\",\n \"companyId\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"dealWon\",\n \"order\": 120,\n \"label\": \"Deal won\",\n \"payloadKeys\": [\n \"dealId\",\n \"title\",\n \"amountCents\",\n \"currency\",\n \"stageId\",\n \"previousStageId\",\n \"ownerUid\",\n \"contactId\",\n \"companyId\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"dealLost\",\n \"order\": 130,\n \"label\": \"Deal lost\",\n \"payloadKeys\": [\n \"dealId\",\n \"title\",\n \"amountCents\",\n \"currency\",\n \"stageId\",\n \"previousStageId\",\n \"ownerUid\",\n \"contactId\",\n \"companyId\",\n \"lostReason\"\n ]\n }\n]\n"],"names":["PLUGIN_HOST_EVENTS"],"mappings":"AAAA;;;;;;;CAOC,GAmBD,OAAO,MAAMA,qBAAsD;IACjE;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;SACD;QACD,kBAAkB;IACpB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;SACD;QACD,kBAAkB;IACpB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;IACX;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACD,kBAAkB;IACpB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;SACD;QACD,kBAAkB;IACpB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;CACD,CAAA"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/plugin-host-events.generated.ts"],"sourcesContent":["/**\n * GENERATED FILE — do not edit. Regenerate with:\n * node tools/scripts/generate-plugin-manifests.mjs\n *\n * The host events plugins declare (AGL-3080): each plugin's `hostEvents`\n * in plugins.config.json, in `order`. Core's `host-events.ts` folds them\n * in beside the platform's own.\n */\n\nimport type { HostEventDeclaration } from './host-events'\n\n/** Every host event a plugin declares. */\nexport type PluginHostEventType =\n | 'formSubmission'\n | 'memberSignUp'\n | 'memberSignIn'\n | 'memberSignOut'\n | 'lead'\n | 'booking'\n | 'taskCompleted'\n | 'contactCreated'\n | 'contactStageChanged'\n | 'dealStageChanged'\n | 'dealWon'\n | 'dealLost'\n | 'orderPaid'\n | 'orderFulfilled'\n | 'orderDelivered'\n | 'orderRefunded'\n | 'orderCancelled'\n | 'returnRequested'\n | 'returnApproved'\n | 'returnDeclined'\n | 'returnReceived'\n | 'returnRefunded'\n | 'funnelLeft'\n\nexport const PLUGIN_HOST_EVENTS: readonly HostEventDeclaration[] = [\n {\n \"pluginId\": \"forms\",\n \"type\": \"formSubmission\",\n \"order\": 10,\n \"label\": \"Form submitted\",\n \"payloadKeys\": [\n \"formId\",\n \"formName\",\n \"path\",\n \"and every submitted field by name\"\n ],\n \"recipientActed\": true\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"memberSignUp\",\n \"order\": 30,\n \"label\": \"Member signed up\",\n \"payloadKeys\": [\n \"email\"\n ],\n \"recipientActed\": true\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"memberSignIn\",\n \"order\": 40,\n \"label\": \"Member signed in\",\n \"payloadKeys\": [\n \"email\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"memberSignOut\",\n \"order\": 50,\n \"label\": \"Member signed out\"\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"lead\",\n \"order\": 60,\n \"label\": \"New lead\",\n \"payloadKeys\": [\n \"leadId\",\n \"email\",\n \"name\",\n \"source\",\n \"hostId\",\n \"formId\",\n \"campaignIds\"\n ],\n \"recipientActed\": true\n },\n {\n \"pluginId\": \"bookings\",\n \"type\": \"booking\",\n \"order\": 70,\n \"label\": \"New booking\",\n \"payloadKeys\": [\n \"serviceName\",\n \"email\",\n \"startsAtMs\"\n ],\n \"recipientActed\": true\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"taskCompleted\",\n \"order\": 80,\n \"label\": \"CRM task completed\",\n \"payloadKeys\": [\n \"taskId\",\n \"title\",\n \"kind\",\n \"priority\",\n \"dueAtMs\",\n \"completedAtMs\",\n \"completedByUid\",\n \"assigneeUid\",\n \"createdByUid\",\n \"contactId\",\n \"companyId\",\n \"dealId\",\n \"taskHostId\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"contactCreated\",\n \"order\": 90,\n \"label\": \"Contact created\",\n \"payloadKeys\": [\n \"contactId\",\n \"email\",\n \"name\",\n \"source\",\n \"hostId\",\n \"lifecycleStage\",\n \"campaignIds\",\n \"formId\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"contactStageChanged\",\n \"order\": 100,\n \"label\": \"Contact changed stage\",\n \"payloadKeys\": [\n \"contactId\",\n \"email\",\n \"lifecycleStage\",\n \"previousStage\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"dealStageChanged\",\n \"order\": 110,\n \"label\": \"Deal moved\",\n \"payloadKeys\": [\n \"dealId\",\n \"title\",\n \"amountCents\",\n \"currency\",\n \"stageId\",\n \"previousStageId\",\n \"ownerUid\",\n \"contactId\",\n \"companyId\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"dealWon\",\n \"order\": 120,\n \"label\": \"Deal won\",\n \"payloadKeys\": [\n \"dealId\",\n \"title\",\n \"amountCents\",\n \"currency\",\n \"stageId\",\n \"previousStageId\",\n \"ownerUid\",\n \"contactId\",\n \"companyId\"\n ]\n },\n {\n \"pluginId\": \"crm\",\n \"type\": \"dealLost\",\n \"order\": 130,\n \"label\": \"Deal lost\",\n \"payloadKeys\": [\n \"dealId\",\n \"title\",\n \"amountCents\",\n \"currency\",\n \"stageId\",\n \"previousStageId\",\n \"ownerUid\",\n \"contactId\",\n \"companyId\",\n \"lostReason\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"orderPaid\",\n \"order\": 140,\n \"label\": \"Order paid\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"status\",\n \"channel\",\n \"email\",\n \"name\",\n \"totalCents\",\n \"currency\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"orderFulfilled\",\n \"order\": 141,\n \"label\": \"Order fulfilled\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"status\",\n \"email\",\n \"name\",\n \"totalCents\",\n \"fulfillmentId\",\n \"carrier\",\n \"trackingNumber\",\n \"trackingUrl\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"orderDelivered\",\n \"order\": 142,\n \"label\": \"Order delivered\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"status\",\n \"email\",\n \"name\",\n \"totalCents\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"orderRefunded\",\n \"order\": 143,\n \"label\": \"Order refunded\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"status\",\n \"email\",\n \"name\",\n \"totalCents\",\n \"refundCents\",\n \"fullRefund\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"orderCancelled\",\n \"order\": 144,\n \"label\": \"Order canceled\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"status\",\n \"email\",\n \"name\",\n \"totalCents\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"returnRequested\",\n \"order\": 145,\n \"label\": \"Return requested\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"email\",\n \"name\",\n \"returnId\",\n \"returnStatus\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"returnApproved\",\n \"order\": 146,\n \"label\": \"Return approved\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"email\",\n \"name\",\n \"returnId\",\n \"returnStatus\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"returnDeclined\",\n \"order\": 147,\n \"label\": \"Return declined\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"email\",\n \"name\",\n \"returnId\",\n \"returnStatus\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"returnReceived\",\n \"order\": 148,\n \"label\": \"Return received\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"email\",\n \"name\",\n \"returnId\",\n \"returnStatus\"\n ]\n },\n {\n \"pluginId\": \"commerce\",\n \"type\": \"returnRefunded\",\n \"order\": 149,\n \"label\": \"Return refunded\",\n \"payloadKeys\": [\n \"orderId\",\n \"orderNumber\",\n \"email\",\n \"name\",\n \"returnId\",\n \"returnStatus\",\n \"returnRefundCents\"\n ]\n },\n {\n \"pluginId\": \"funnels\",\n \"type\": \"funnelLeft\",\n \"order\": 150,\n \"label\": \"Left a funnel\",\n \"payloadKeys\": [\n \"funnelId\",\n \"funnelName\",\n \"step\",\n \"stepLabel\",\n \"nextStepLabel\",\n \"afterHours\",\n \"email\"\n ]\n }\n]\n"],"names":["PLUGIN_HOST_EVENTS"],"mappings":"AAAA;;;;;;;CAOC,GA8BD,OAAO,MAAMA,qBAAsD;IACjE;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;SACD;QACD,kBAAkB;IACpB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;SACD;QACD,kBAAkB;IACpB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;IACX;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;SACD;QACD,kBAAkB;IACpB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;SACD;QACD,kBAAkB;IACpB;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;IACA;QACE,YAAY;QACZ,QAAQ;QACR,SAAS;QACT,SAAS;QACT,eAAe;YACb;YACA;YACA;YACA;YACA;YACA;YACA;SACD;IACH;CACD,CAAA"}
|
|
@@ -8,5 +8,5 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { PluginReleaseFlagDefinition } from './release-flags';
|
|
10
10
|
/** Every release flag a plugin declares. */
|
|
11
|
-
export type PluginReleaseFlagKey = 'release_member_accounts' | 'release_bookings' | 'release_commerce_v2' | 'release_marketplace' | 'release_crm' | 'release_outreach' | 'release_data_store' | 'release_email' | 'release_events' | 'release_inbox' | 'release_logic' | 'release_marketing' | 'release_redirects' | 'release_workflows';
|
|
11
|
+
export type PluginReleaseFlagKey = 'release_member_accounts' | 'release_bookings' | 'release_commerce_v2' | 'release_marketplace' | 'release_crm' | 'release_outreach' | 'release_data_store' | 'release_email' | 'release_events' | 'release_inbox' | 'release_logic' | 'release_marketing' | 'release_redirects' | 'release_workflows' | 'release_accounting';
|
|
12
12
|
export declare const PLUGIN_RELEASE_FLAGS: readonly PluginReleaseFlagDefinition[];
|
|
@@ -100,6 +100,13 @@
|
|
|
100
100
|
"description": "Workflows, actions, webhooks and their run history.",
|
|
101
101
|
"defaultEnabled": true,
|
|
102
102
|
"navTabId": "nav-tab-workflows"
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
"key": "release_accounting",
|
|
106
|
+
"label": "Accounting",
|
|
107
|
+
"description": "QuickBooks Online and Xero sync for commerce: sales receipts or a daily summary journal, refunds, platform fees and Stripe payouts, with a mapping page and a sync log (AGL-3614). OFF by default; needs the deployment's Intuit or Xero app credentials and the accounting token key on the console.",
|
|
108
|
+
"defaultEnabled": false,
|
|
109
|
+
"navTabId": "nav-tab-org-accounting"
|
|
103
110
|
}
|
|
104
111
|
];
|
|
105
112
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/plugin-release-flags.generated.ts"],"sourcesContent":["/**\n * GENERATED FILE — do not edit. Regenerate with:\n * node tools/scripts/generate-plugin-manifests.mjs\n *\n * The release flags plugins declare (AGL-3080): each catalog row's\n * `releaseFlagDefinition` in plugins.config.json, in catalog order. Core's\n * `release-flags.ts` folds them into `RELEASE_FLAGS`.\n */\n\nimport type { PluginReleaseFlagDefinition } from './release-flags'\n\n/** Every release flag a plugin declares. */\nexport type PluginReleaseFlagKey =\n | 'release_member_accounts'\n | 'release_bookings'\n | 'release_commerce_v2'\n | 'release_marketplace'\n | 'release_crm'\n | 'release_outreach'\n | 'release_data_store'\n | 'release_email'\n | 'release_events'\n | 'release_inbox'\n | 'release_logic'\n | 'release_marketing'\n | 'release_redirects'\n | 'release_workflows'\n\nexport const PLUGIN_RELEASE_FLAGS: readonly PluginReleaseFlagDefinition[] = [\n {\n \"key\": \"release_member_accounts\",\n \"label\": \"User Accounts\",\n \"description\": \"Visitor accounts on published sites: the /signin, /signup and /recover pages and the Members blocks (AGL-2486). Platform-wide kill switch only — whether a given SITE serves those pages is the per-site User Accounts toggle, which is off until a site opts in.\",\n \"defaultEnabled\": true\n },\n {\n \"key\": \"release_bookings\",\n \"label\": \"Bookings\",\n \"description\": \"Bookings & scheduling for host sites.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-bookings\"\n },\n {\n \"key\": \"release_commerce_v2\",\n \"label\": \"Commerce v2\",\n \"description\": \"Full ecommerce wave: catalog/variants, cart + checkout, digital goods, reservations, POS, and the repriced commerce tiers (AGL-276..331).\",\n \"defaultEnabled\": true\n },\n {\n \"key\": \"release_marketplace\",\n \"label\": \"Marketplace\",\n \"description\": \"Marketplace browsing, publishing and plugin installs.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-org-marketplace\"\n },\n {\n \"key\": \"release_crm\",\n \"label\": \"CRM\",\n \"description\": \"The CRM: contacts, leads, companies, deals, tasks, reports and fields.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-contacts\"\n },\n {\n \"key\": \"release_outreach\",\n \"label\": \"Sequences\",\n \"description\": \"One-to-one, multi-step email sequences sent from a rep’s own connected mailbox and logged in the CRM (AGL-2974). OFF by default and staff preview only. An organization also needs the `outreach` entitlement, which no plan carries, so a customer reaches it only through a per-org entitlement override.\",\n \"defaultEnabled\": false,\n \"navTabId\": \"nav-tab-org-outreach\"\n },\n {\n \"key\": \"release_data_store\",\n \"label\": \"Data store\",\n \"description\": \"Datasets, models and dynamic data bindings.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-data\"\n },\n {\n \"key\": \"release_email\",\n \"label\": \"Email\",\n \"description\": \"Designed emails, campaigns, and audience sending.\",\n \"defaultEnabled\": true\n },\n {\n \"key\": \"release_events\",\n \"label\": \"Events\",\n \"description\": \"Event calendar management (AGL-145 add-on surface).\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-events\"\n },\n {\n \"key\": \"release_inbox\",\n \"label\": \"Inbox\",\n \"description\": \"Form submissions, site members, and the lead inbox.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-inbox\"\n },\n {\n \"key\": \"release_logic\",\n \"label\": \"Logic\",\n \"description\": \"Variables, no-code functions, and reference health.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-logic\"\n },\n {\n \"key\": \"release_marketing\",\n \"label\": \"Marketing\",\n \"description\": \"Overlays, campaigns at-a-glance, and A/B experiments.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-marketing\"\n },\n {\n \"key\": \"release_redirects\",\n \"label\": \"Redirects\",\n \"description\": \"Redirect manager with usage analytics.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-redirects\"\n },\n {\n \"key\": \"release_workflows\",\n \"label\": \"Automation\",\n \"description\": \"Workflows, actions, webhooks and their run history.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-workflows\"\n }\n]\n"],"names":["PLUGIN_RELEASE_FLAGS"],"mappings":"AAAA;;;;;;;CAOC,
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/plugin-release-flags.generated.ts"],"sourcesContent":["/**\n * GENERATED FILE — do not edit. Regenerate with:\n * node tools/scripts/generate-plugin-manifests.mjs\n *\n * The release flags plugins declare (AGL-3080): each catalog row's\n * `releaseFlagDefinition` in plugins.config.json, in catalog order. Core's\n * `release-flags.ts` folds them into `RELEASE_FLAGS`.\n */\n\nimport type { PluginReleaseFlagDefinition } from './release-flags'\n\n/** Every release flag a plugin declares. */\nexport type PluginReleaseFlagKey =\n | 'release_member_accounts'\n | 'release_bookings'\n | 'release_commerce_v2'\n | 'release_marketplace'\n | 'release_crm'\n | 'release_outreach'\n | 'release_data_store'\n | 'release_email'\n | 'release_events'\n | 'release_inbox'\n | 'release_logic'\n | 'release_marketing'\n | 'release_redirects'\n | 'release_workflows'\n | 'release_accounting'\n\nexport const PLUGIN_RELEASE_FLAGS: readonly PluginReleaseFlagDefinition[] = [\n {\n \"key\": \"release_member_accounts\",\n \"label\": \"User Accounts\",\n \"description\": \"Visitor accounts on published sites: the /signin, /signup and /recover pages and the Members blocks (AGL-2486). Platform-wide kill switch only — whether a given SITE serves those pages is the per-site User Accounts toggle, which is off until a site opts in.\",\n \"defaultEnabled\": true\n },\n {\n \"key\": \"release_bookings\",\n \"label\": \"Bookings\",\n \"description\": \"Bookings & scheduling for host sites.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-bookings\"\n },\n {\n \"key\": \"release_commerce_v2\",\n \"label\": \"Commerce v2\",\n \"description\": \"Full ecommerce wave: catalog/variants, cart + checkout, digital goods, reservations, POS, and the repriced commerce tiers (AGL-276..331).\",\n \"defaultEnabled\": true\n },\n {\n \"key\": \"release_marketplace\",\n \"label\": \"Marketplace\",\n \"description\": \"Marketplace browsing, publishing and plugin installs.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-org-marketplace\"\n },\n {\n \"key\": \"release_crm\",\n \"label\": \"CRM\",\n \"description\": \"The CRM: contacts, leads, companies, deals, tasks, reports and fields.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-contacts\"\n },\n {\n \"key\": \"release_outreach\",\n \"label\": \"Sequences\",\n \"description\": \"One-to-one, multi-step email sequences sent from a rep’s own connected mailbox and logged in the CRM (AGL-2974). OFF by default and staff preview only. An organization also needs the `outreach` entitlement, which no plan carries, so a customer reaches it only through a per-org entitlement override.\",\n \"defaultEnabled\": false,\n \"navTabId\": \"nav-tab-org-outreach\"\n },\n {\n \"key\": \"release_data_store\",\n \"label\": \"Data store\",\n \"description\": \"Datasets, models and dynamic data bindings.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-data\"\n },\n {\n \"key\": \"release_email\",\n \"label\": \"Email\",\n \"description\": \"Designed emails, campaigns, and audience sending.\",\n \"defaultEnabled\": true\n },\n {\n \"key\": \"release_events\",\n \"label\": \"Events\",\n \"description\": \"Event calendar management (AGL-145 add-on surface).\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-events\"\n },\n {\n \"key\": \"release_inbox\",\n \"label\": \"Inbox\",\n \"description\": \"Form submissions, site members, and the lead inbox.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-inbox\"\n },\n {\n \"key\": \"release_logic\",\n \"label\": \"Logic\",\n \"description\": \"Variables, no-code functions, and reference health.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-logic\"\n },\n {\n \"key\": \"release_marketing\",\n \"label\": \"Marketing\",\n \"description\": \"Overlays, campaigns at-a-glance, and A/B experiments.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-marketing\"\n },\n {\n \"key\": \"release_redirects\",\n \"label\": \"Redirects\",\n \"description\": \"Redirect manager with usage analytics.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-redirects\"\n },\n {\n \"key\": \"release_workflows\",\n \"label\": \"Automation\",\n \"description\": \"Workflows, actions, webhooks and their run history.\",\n \"defaultEnabled\": true,\n \"navTabId\": \"nav-tab-workflows\"\n },\n {\n \"key\": \"release_accounting\",\n \"label\": \"Accounting\",\n \"description\": \"QuickBooks Online and Xero sync for commerce: sales receipts or a daily summary journal, refunds, platform fees and Stripe payouts, with a mapping page and a sync log (AGL-3614). OFF by default; needs the deployment's Intuit or Xero app credentials and the accounting token key on the console.\",\n \"defaultEnabled\": false,\n \"navTabId\": \"nav-tab-org-accounting\"\n }\n]\n"],"names":["PLUGIN_RELEASE_FLAGS"],"mappings":"AAAA;;;;;;;CAOC,GAsBD,OAAO,MAAMA,uBAA+D;IAC1E;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;IACpB;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;IACpB;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;IACpB;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;IACA;QACE,OAAO;QACP,SAAS;QACT,eAAe;QACf,kBAAkB;QAClB,YAAY;IACd;CACD,CAAA"}
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"listConsoleNavItems",
|
|
71
71
|
"listConsoleOrgNavItems",
|
|
72
72
|
"listConsoleProviders",
|
|
73
|
+
"listConsolePublicPages",
|
|
73
74
|
"listConsoleSearchSources",
|
|
74
75
|
"listConsoleStaffPages",
|
|
75
76
|
"listConsoleThemePresets",
|
|
@@ -77,12 +78,14 @@
|
|
|
77
78
|
"logger",
|
|
78
79
|
"nodesReferenceBinding",
|
|
79
80
|
"normalizeBindingTokens",
|
|
81
|
+
"normalizeConsolePublicPath",
|
|
80
82
|
"parseFunctionParameterOptions",
|
|
81
83
|
"plugins",
|
|
82
84
|
"registerConsoleExtension",
|
|
83
85
|
"resolveBindings",
|
|
84
86
|
"resolveConsoleOrgPluginPage",
|
|
85
87
|
"resolveConsolePluginPage",
|
|
88
|
+
"resolveConsolePublicPage",
|
|
86
89
|
"resolveConsoleStaffPage",
|
|
87
90
|
"resolveNodesBindings",
|
|
88
91
|
"rewriteBindingTokensDeep",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/realm-host-surface.generated.ts"],"sourcesContent":["/**\n * GENERATED FILE — do not edit. Regenerate with:\n * node tools/scripts/generate-realm-host-exports.mjs\n *\n * The names each realm host module holds (AGL-3392), for the bundle\n * verifier: a bundle reading any other name from the host is refused,\n * because it would read `undefined` on every site.\n */\n/* eslint-disable */\n\nexport const REALM_HOST_SURFACE_NAMES: Readonly<\n Record<'aglyn' | 'mui' | 'muiStyles', ReadonlySet<string>>\n> = {\n aglyn: new Set([\"Aglyn\",\"CATEGORY_REQUIRED_CAPABILITY\",\"COMPONENT_CATEGORY_ORDER\",\"CONSOLE_HOST_GATED_WIDGET_SLOTS\",\"CONSOLE_SEARCH_LOAD_POINT\",\"CONSOLE_STAFF_WIDGET_SLOTS\",\"CONSOLE_WIDGET_SLOTS\",\"ComponentCategory\",\"EnabledPluginsContext\",\"FEATURE_FLAG\",\"FUNCTION_BUILTIN_NAMES\",\"FUNCTION_MAX_OPERATIONS\",\"FUNCTION_TOKEN_PATTERN\",\"FieldComponentType\",\"FieldValidatorType\",\"HOST_VARIABLE_TYPE_LABELS\",\"LinealDirectiveFlag\",\"MISSING_BINDING_LABEL\",\"MUI_BUNDLE_ID\",\"NAME_TOKEN_PATTERN\",\"NodeIdentityContext\",\"NodeType\",\"PREVIEW_REFUSED_STATUS\",\"PREVIEW_WRITE_BLOCKED_EVENT\",\"REUSABLE_COMPONENT_CATEGORY\",\"REUSABLE_EMAIL_BLOCK_CATEGORY\",\"RICH_TEXT_COMMANDS\",\"ScreenLinkContext\",\"SiteContext\",\"THEME_PRESETS_LOAD_POINT\",\"VARIABLE_ID_TOKEN_PATTERN\",\"VARIABLE_NAME_PATTERN\",\"aglyn\",\"attachFunctionDefinitions\",\"bindingTokenNeedsDeep\",\"canvas\",\"components\",\"defineUiFeatureBundle\",\"displayBindingTokens\",\"editableBindingTokens\",\"emitter\",\"evaluateExpression\",\"evaluateHostFunction\",\"expressionIdentifiers\",\"expressionSyntaxError\",\"formatFunctionIdToken\",\"formatFunctionParameterOptions\",\"formatVariableIdToken\",\"formatVariableValue\",\"functionGlobals\",\"functionReferencedNames\",\"hasBindings\",\"isCategoryCapabilityEnabled\",\"isConsoleHostGatedWidgetSlot\",\"isConsoleStaffWidgetSlot\",\"isFromEnabledPlugin\",\"isPreviewRefusal\",\"isSwitchedOffForRenderedSite\",\"keyById\",\"listConsoleExtensions\",\"listConsoleNavItems\",\"listConsoleOrgNavItems\",\"listConsoleProviders\",\"listConsoleSearchSources\",\"listConsoleStaffPages\",\"listConsoleThemePresets\",\"listConsoleWidgets\",\"logger\",\"nodesReferenceBinding\",\"normalizeBindingTokens\",\"parseFunctionParameterOptions\",\"plugins\",\"registerConsoleExtension\",\"resolveBindings\",\"resolveConsoleOrgPluginPage\",\"resolveConsolePluginPage\",\"resolveConsoleStaffPage\",\"resolveNodesBindings\",\"rewriteBindingTokensDeep\",\"textReferencesBinding\",\"unregisterConsoleExtension\",\"useEnabledPlugins\",\"useNodeId\",\"useSite\",\"useSiteFetch\"]),\n mui: new Set([\"Alert\",\"Box\",\"Button\",\"Card\",\"CardContent\",\"Checkbox\",\"Chip\",\"CircularProgress\",\"Collapse\",\"Divider\",\"FormControl\",\"FormControlLabel\",\"FormHelperText\",\"IconButton\",\"InputAdornment\",\"InputLabel\",\"Link\",\"List\",\"ListItem\",\"ListItemText\",\"MenuItem\",\"Paper\",\"Radio\",\"RadioGroup\",\"Select\",\"Stack\",\"SvgIcon\",\"Switch\",\"Table\",\"TableBody\",\"TableCell\",\"TableHead\",\"TableRow\",\"TextField\",\"Tooltip\",\"Typography\",\"createSvgIcon\",\"useMediaQuery\"]),\n muiStyles: new Set([\"alpha\",\"css\",\"darken\",\"emphasize\",\"getContrastRatio\",\"keyframes\",\"lighten\",\"styled\",\"useColorScheme\",\"useTheme\"]),\n}\n"],"names":["REALM_HOST_SURFACE_NAMES","aglyn","Set","mui","muiStyles"],"mappings":"AAAA;;;;;;;CAOC,GACD,kBAAkB,GAElB,OAAO,MAAMA,2BAET;IACFC,OAAO,IAAIC,IAAI;QAAC;QAAQ;QAA+B;QAA2B;QAAkC;QAA4B;QAA6B;QAAuB;QAAoB;QAAwB;QAAe;QAAyB;QAA0B;QAAyB;QAAqB;QAAqB;QAA4B;QAAsB;QAAwB;QAAgB;QAAqB;QAAsB;QAAW;QAAyB;QAA8B;QAA8B;QAAgC;QAAqB;QAAoB;QAAc;QAA2B;QAA4B;QAAwB;QAAQ;QAA4B;QAAwB;QAAS;QAAa;QAAwB;QAAuB;QAAwB;QAAU;QAAqB;QAAuB;QAAwB;QAAwB;QAAwB;QAAiC;QAAwB;QAAsB;QAAkB;QAA0B;QAAc;QAA8B;QAA+B;QAA2B;QAAsB;QAAmB;QAA+B;QAAU;QAAwB;QAAsB;QAAyB;QAAuB;QAA2B;QAAwB;QAA0B;QAAqB;QAAS;QAAwB;QAAyB;QAAgC;QAAU;QAA2B;QAAkB;QAA8B;QAA2B;QAA0B;QAAuB;QAA2B;QAAwB;QAA6B;QAAoB;QAAY;QAAU;KAAe;
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/realm-host-surface.generated.ts"],"sourcesContent":["/**\n * GENERATED FILE — do not edit. Regenerate with:\n * node tools/scripts/generate-realm-host-exports.mjs\n *\n * The names each realm host module holds (AGL-3392), for the bundle\n * verifier: a bundle reading any other name from the host is refused,\n * because it would read `undefined` on every site.\n */\n/* eslint-disable */\n\nexport const REALM_HOST_SURFACE_NAMES: Readonly<\n Record<'aglyn' | 'mui' | 'muiStyles', ReadonlySet<string>>\n> = {\n aglyn: new Set([\"Aglyn\",\"CATEGORY_REQUIRED_CAPABILITY\",\"COMPONENT_CATEGORY_ORDER\",\"CONSOLE_HOST_GATED_WIDGET_SLOTS\",\"CONSOLE_SEARCH_LOAD_POINT\",\"CONSOLE_STAFF_WIDGET_SLOTS\",\"CONSOLE_WIDGET_SLOTS\",\"ComponentCategory\",\"EnabledPluginsContext\",\"FEATURE_FLAG\",\"FUNCTION_BUILTIN_NAMES\",\"FUNCTION_MAX_OPERATIONS\",\"FUNCTION_TOKEN_PATTERN\",\"FieldComponentType\",\"FieldValidatorType\",\"HOST_VARIABLE_TYPE_LABELS\",\"LinealDirectiveFlag\",\"MISSING_BINDING_LABEL\",\"MUI_BUNDLE_ID\",\"NAME_TOKEN_PATTERN\",\"NodeIdentityContext\",\"NodeType\",\"PREVIEW_REFUSED_STATUS\",\"PREVIEW_WRITE_BLOCKED_EVENT\",\"REUSABLE_COMPONENT_CATEGORY\",\"REUSABLE_EMAIL_BLOCK_CATEGORY\",\"RICH_TEXT_COMMANDS\",\"ScreenLinkContext\",\"SiteContext\",\"THEME_PRESETS_LOAD_POINT\",\"VARIABLE_ID_TOKEN_PATTERN\",\"VARIABLE_NAME_PATTERN\",\"aglyn\",\"attachFunctionDefinitions\",\"bindingTokenNeedsDeep\",\"canvas\",\"components\",\"defineUiFeatureBundle\",\"displayBindingTokens\",\"editableBindingTokens\",\"emitter\",\"evaluateExpression\",\"evaluateHostFunction\",\"expressionIdentifiers\",\"expressionSyntaxError\",\"formatFunctionIdToken\",\"formatFunctionParameterOptions\",\"formatVariableIdToken\",\"formatVariableValue\",\"functionGlobals\",\"functionReferencedNames\",\"hasBindings\",\"isCategoryCapabilityEnabled\",\"isConsoleHostGatedWidgetSlot\",\"isConsoleStaffWidgetSlot\",\"isFromEnabledPlugin\",\"isPreviewRefusal\",\"isSwitchedOffForRenderedSite\",\"keyById\",\"listConsoleExtensions\",\"listConsoleNavItems\",\"listConsoleOrgNavItems\",\"listConsoleProviders\",\"listConsolePublicPages\",\"listConsoleSearchSources\",\"listConsoleStaffPages\",\"listConsoleThemePresets\",\"listConsoleWidgets\",\"logger\",\"nodesReferenceBinding\",\"normalizeBindingTokens\",\"normalizeConsolePublicPath\",\"parseFunctionParameterOptions\",\"plugins\",\"registerConsoleExtension\",\"resolveBindings\",\"resolveConsoleOrgPluginPage\",\"resolveConsolePluginPage\",\"resolveConsolePublicPage\",\"resolveConsoleStaffPage\",\"resolveNodesBindings\",\"rewriteBindingTokensDeep\",\"textReferencesBinding\",\"unregisterConsoleExtension\",\"useEnabledPlugins\",\"useNodeId\",\"useSite\",\"useSiteFetch\"]),\n mui: new Set([\"Alert\",\"Box\",\"Button\",\"Card\",\"CardContent\",\"Checkbox\",\"Chip\",\"CircularProgress\",\"Collapse\",\"Divider\",\"FormControl\",\"FormControlLabel\",\"FormHelperText\",\"IconButton\",\"InputAdornment\",\"InputLabel\",\"Link\",\"List\",\"ListItem\",\"ListItemText\",\"MenuItem\",\"Paper\",\"Radio\",\"RadioGroup\",\"Select\",\"Stack\",\"SvgIcon\",\"Switch\",\"Table\",\"TableBody\",\"TableCell\",\"TableHead\",\"TableRow\",\"TextField\",\"Tooltip\",\"Typography\",\"createSvgIcon\",\"useMediaQuery\"]),\n muiStyles: new Set([\"alpha\",\"css\",\"darken\",\"emphasize\",\"getContrastRatio\",\"keyframes\",\"lighten\",\"styled\",\"useColorScheme\",\"useTheme\"]),\n}\n"],"names":["REALM_HOST_SURFACE_NAMES","aglyn","Set","mui","muiStyles"],"mappings":"AAAA;;;;;;;CAOC,GACD,kBAAkB,GAElB,OAAO,MAAMA,2BAET;IACFC,OAAO,IAAIC,IAAI;QAAC;QAAQ;QAA+B;QAA2B;QAAkC;QAA4B;QAA6B;QAAuB;QAAoB;QAAwB;QAAe;QAAyB;QAA0B;QAAyB;QAAqB;QAAqB;QAA4B;QAAsB;QAAwB;QAAgB;QAAqB;QAAsB;QAAW;QAAyB;QAA8B;QAA8B;QAAgC;QAAqB;QAAoB;QAAc;QAA2B;QAA4B;QAAwB;QAAQ;QAA4B;QAAwB;QAAS;QAAa;QAAwB;QAAuB;QAAwB;QAAU;QAAqB;QAAuB;QAAwB;QAAwB;QAAwB;QAAiC;QAAwB;QAAsB;QAAkB;QAA0B;QAAc;QAA8B;QAA+B;QAA2B;QAAsB;QAAmB;QAA+B;QAAU;QAAwB;QAAsB;QAAyB;QAAuB;QAAyB;QAA2B;QAAwB;QAA0B;QAAqB;QAAS;QAAwB;QAAyB;QAA6B;QAAgC;QAAU;QAA2B;QAAkB;QAA8B;QAA2B;QAA2B;QAA0B;QAAuB;QAA2B;QAAwB;QAA6B;QAAoB;QAAY;QAAU;KAAe;IAC/9DC,KAAK,IAAID,IAAI;QAAC;QAAQ;QAAM;QAAS;QAAO;QAAc;QAAW;QAAO;QAAmB;QAAW;QAAU;QAAc;QAAmB;QAAiB;QAAa;QAAiB;QAAa;QAAO;QAAO;QAAW;QAAe;QAAW;QAAQ;QAAQ;QAAa;QAAS;QAAQ;QAAU;QAAS;QAAQ;QAAY;QAAY;QAAY;QAAW;QAAY;QAAU;QAAa;QAAgB;KAAgB;IAC/bE,WAAW,IAAIF,IAAI;QAAC;QAAQ;QAAM;QAAS;QAAY;QAAmB;QAAY;QAAU;QAAS;QAAiB;KAAW;AACvI,EAAC"}
|
|
@@ -41,11 +41,15 @@ import { PLUGIN_RELEASE_FLAGS } from "./plugin-release-flags.generated.js";
|
|
|
41
41
|
description: 'Self-serve add-on purchases on the Billing page: seats, datasets, ' + 'extra sites, POS registers, Event Calendar (AGL-524..531).',
|
|
42
42
|
defaultEnabled: true
|
|
43
43
|
},
|
|
44
|
+
// Released to every workspace 2026-10-06 (AGL-3606). Storefront-only since
|
|
45
|
+
// the console's plan checkout stopped rendering Stripe Checkout at all. Still
|
|
46
|
+
// the surface's kill switch, globally or per org: off, both storefront
|
|
47
|
+
// checkout routes return the hosted redirect again.
|
|
44
48
|
{
|
|
45
49
|
key: 'release_native_checkout',
|
|
46
50
|
label: 'In-page checkout',
|
|
47
|
-
description: '
|
|
48
|
-
defaultEnabled:
|
|
51
|
+
description: 'Storefront shoppers pay on the merchant\u2019s own site: the Payment ' + 'Element, email, shipping address and method, and a live total with ' + 'tax open in place under the Buy or Checkout button, styled with the ' + 'site theme, instead of a redirect to checkout.stripe.com (AGL-1944). ' + 'Released to every workspace 2026-10-06 (AGL-3606). The webhook is ' + 'still the only thing that fulfils. Also gated on ' + 'NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY, so a deployment without one keeps ' + 'the redirect; turning this off returns every storefront to the redirect.',
|
|
52
|
+
defaultEnabled: true
|
|
49
53
|
},
|
|
50
54
|
// Released to every site 2026-09-16 (AGL-3041). Still the whole surface's
|
|
51
55
|
// kill switch, globally or for one org by override: off, the tenant slot
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/release-flags.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Release flags (AGL-227): platform-level \"is this feature launched\"\n * gating backed by Firebase Remote Config. A separate axis from plan\n * entitlements (`plan-entitlements.ts`) — entitlements ask whether the\n * tenant's PLAN includes a feature, release flags ask whether the feature\n * is released to the public at all (or partially, via percentage rollout).\n * Staff bypass release flags everywhere but see a flagged warning.\n */\n\n/** Remote Config parameter keys for release-gated features. */\nimport type { OrgPlan } from '../foundation'\nimport { PLAN_LABELS, SELF_SERVE_PLANS } from './plan-entitlements'\nimport { PLATFORM_BRAND_NAME } from './platform-brand'\nimport {\n PLUGIN_RELEASE_FLAGS,\n type PluginReleaseFlagKey,\n} from './plugin-release-flags.generated'\n\n/**\n * Every release flag: the ones plugins declare (compiled from\n * plugins.config.json, AGL-3080) and the platform's own below.\n */\nexport type ReleaseFlagKey =\n | PluginReleaseFlagKey\n | 'release_addon_store'\n | 'release_native_checkout'\n | 'release_edit_bar'\n | 'release_assist'\n | 'release_video_uploads'\n | 'release_video_delivery'\n | 'release_ai_generative'\n | 'release_crm_assist_whole_record'\n\nexport interface ReleaseFlagDefinition {\n key: ReleaseFlagKey\n label: string\n description: string\n /**\n * Fallback verdict when Remote Config is unreachable (offline, blocked,\n * first paint before activate). MUST match the seeded value in\n * cloud/firebase-remoteconfig.template.json so environments without a\n * published template behave like the template intends.\n */\n defaultEnabled: boolean\n /** Host dashboard tab id (host-nav-tabs.ts) this flag hides, if any. */\n navTabId?: string\n}\n\n/** A release flag a plugin declares, as the generator compiles it. */\nexport type PluginReleaseFlagDefinition = ReleaseFlagDefinition & {\n key: PluginReleaseFlagKey\n}\n\n/**\n * The platform's own release flags: features no plugin owns.\n *\n * Every first-party plugin is release-flagged too (AGL-422) — the flag feeds\n * the plugin LOADER (console, published sites, API dispatch), not just nav\n * visibility, so staff can kill-switch a whole plugin platform-wide from the\n * Feature Flags page. Those flags are the plugins' own: each is defined by\n * its catalog row's `releaseFlagDefinition` in plugins.config.json and\n * compiled into `PLUGIN_RELEASE_FLAGS`, so adding a plugin edits nothing\n * here.\n */\nconst PLATFORM_RELEASE_FLAGS: readonly ReleaseFlagDefinition[] = [\n {\n key: 'release_addon_store',\n label: 'Add-on store',\n description:\n 'Self-serve add-on purchases on the Billing page: seats, datasets, ' +\n 'extra sites, POS registers, Event Calendar (AGL-524..531).',\n defaultEnabled: true,\n },\n {\n key: 'release_native_checkout',\n label: 'In-page checkout',\n description:\n 'Pay without leaving the page, instead of a redirect to ' +\n 'checkout.stripe.com. TWO surfaces: the console plan checkout uses ' +\n 'embedded Checkout (AGL-1132), and a merchant storefront uses the ' +\n 'Payment Element on the merchant\\u2019s own domain (AGL-1944) \\u2014 ' +\n 'which is the half that costs conversions, since leaving the store ' +\n 'mid-purchase is where carts get abandoned. Both keep the webhook as ' +\n 'the only thing that fulfils. OFF by default: the redirect is the ' +\n 'proven path, and neither surface can be verified without putting a ' +\n 'real card through it. Also gated on a publishable key being set, ' +\n 'per surface \\u2014 so flipping this alone degrades to the redirect ' +\n 'rather than to a dead button.',\n defaultEnabled: false,\n },\n // Released to every site 2026-09-16 (AGL-3041). Still the whole surface's\n // kill switch, globally or for one org by override: off, the tenant slot\n // renders nothing, both token mints refuse, and `/api/edit-context` turns\n // away every token already issued.\n {\n key: 'release_edit_bar',\n label: 'Site admin bar',\n description:\n 'Admin bar on published sites: a signed-in editor jumps from a live ' +\n 'page straight into the Besigner to edit it. Released ' +\n '2026-09-16 (AGL-3041) for every site; turning it off hides the bar ' +\n 'and revokes every outstanding edit token at the verify site.',\n defaultEnabled: true,\n },\n {\n key: 'release_assist',\n label: `${PLATFORM_BRAND_NAME} Assist`,\n description:\n 'The in-console AI chat helper on every page (AGL-1860): docs-' +\n 'grounded answers with deep links, page-context guidance on Pro+. ' +\n 'OFF by default, and blocked on TWO published legal artifacts ' +\n '(AGL-1909), neither of which is a repo file — both are live besigner ' +\n 'pages, so publication is what satisfies them: (1) the privacy-policy ' +\n 'disclosure for stored Q&A, because the data loop records every ' +\n 'exchange org-scoped under orgs/{orgId}/assistExchanges; and (2) the ' +\n 'Anthropic row on /legal/subprocessors, which was deliberately ' +\n 'REMOVED on 2026-08-13 (subprocessorsV2a-20260813) on the premise ' +\n 'that no production key existed — so the page is not merely ' +\n 'incomplete without it, it is affirmatively wrong. NOTE the real ' +\n 'trigger is ANTHROPIC_API_KEY, not this flag: /api/ai/assist (the ' +\n 'besigner copy assistant, AGL-89/130/169) carries no release flag at ' +\n 'all and sends customer site content to Anthropic on the key plus a ' +\n 'Pro entitlement alone. Setting the key in production therefore makes ' +\n 'Anthropic a subprocessor whether or not this flag is ever flipped.',\n defaultEnabled: false,\n },\n // Ingress only, and with no staff preview on the server: a video a staff\n // session uploads into a customer's library serves on that customer's pages\n // like any other, so a grant goes to the org through its override.\n // `apps/console/utils/server/video-uploads.ts` holds the gate.\n {\n key: 'release_video_uploads',\n label: 'Video uploads',\n description:\n 'New video in the media library, on every upload path (AGL-2830). ' +\n 'Off: refused with 403 video_uploads_paused, as DAM video delivery is ' +\n 'not yet metered or bounded per org (AGL-2810, AGL-2812). Images, ' +\n 'documents and stored videos are unaffected.',\n defaultEnabled: false,\n },\n // Delivery, not ingress: this flag decides whether a video already in the\n // library is COPIED to the configured delivery provider and served from it\n // through a short-lived signed redirect (AGL-2824). Per org, with no staff\n // preview on the server — a copy is customer data at the provider, so a\n // grant goes to the org through its override. Off, or with no provider\n // configured, every video serves from this platform exactly as before.\n // `media-delivery.ts` in `tenant-data-admin` holds the gate.\n {\n key: 'release_video_delivery',\n label: 'Video delivery',\n description:\n 'Serves library video from a configured delivery provider through ' +\n 'short-lived signed redirects, and copies each video to it (AGL-2824). ' +\n 'OFF by default: video serves from this platform as before. Also ' +\n \"needs the provider's settings.\",\n defaultEnabled: false,\n },\n // The generative doors share one runtime with Assist (AGL-2903) but not\n // its flag: `release_assist` answers questions, this builds things, and\n // the two are sold, metered and disclosed separately. The server-side\n // gate lives in `aiGateLadder` (404 when off, staff preview).\n // Labeled for what it switches — the generative doors — and not with the\n // add-on's own name, which is sold and live whether or not the doors are\n // released: the docs name the add-on, and a flag wearing the same words\n // reads as documented when it is not.\n {\n key: 'release_ai_generative',\n label: `${PLATFORM_BRAND_NAME} AI generation`,\n description:\n 'Generative building and automation behind the AI add-on ' +\n '(AGL-2903): sections, pages and workflows written by a model from ' +\n 'a brief, on the shared Anthropic runtime. OFF by default and staff ' +\n 'preview only; every generative route answers 404 while it is off. ' +\n 'Turning it on sends customer briefs and site content to Anthropic ' +\n 'on the same ANTHROPIC_API_KEY and under the same subprocessor ' +\n 'disclosure as Assist (AGL-1909).',\n defaultEnabled: false,\n },\n // What CRM assistance hands the model provider, not whether it runs:\n // `release_ai_generative` opens the doors, this widens what a record sends\n // through them. Per org, with no staff preview — the data is the customer's,\n // and a staff session reading a customer's record must send what the\n // published pages promise. The CRM's record-facts readers hold the gate.\n {\n key: 'release_crm_assist_whole_record',\n label: 'CRM assistance: whole record',\n description:\n 'What AI assistance in the CRM (a record summary, next step or ' +\n 'email draft) sends the model provider (AGL-3520). OFF: the ' +\n 'disclosed fields, with addresses and numbers in typed text ' +\n 'replaced. ON: the whole record, contact details and custom fields ' +\n 'included. Turn on only after Privacy Policy section 2 and the ' +\n 'Subprocessors row are republished; see ' +\n 'docs/drafts/agl-3520-crm-assistance-whole-record-disclosure.md.',\n defaultEnabled: false,\n },\n]\n\n/**\n * The registry: one entry per gated feature, the plugins' first. Adding a\n * platform flag = add it above, seed it in the Remote Config template, and\n * (optionally) wrap the page in `<FeatureGate>` — the staff admin editor and\n * nav filtering pick it up from this list.\n */\nexport const RELEASE_FLAGS: readonly ReleaseFlagDefinition[] = [\n ...PLUGIN_RELEASE_FLAGS,\n ...PLATFORM_RELEASE_FLAGS,\n]\n\nexport const RELEASE_FLAG_KEYS = RELEASE_FLAGS.map(\n (definition) => definition.key,\n) as readonly ReleaseFlagKey[]\n\nexport function isReleaseFlagKey(value: string): value is ReleaseFlagKey {\n return (RELEASE_FLAG_KEYS as readonly string[]).includes(value)\n}\n\nexport function getReleaseFlagDefinition(\n key: ReleaseFlagKey,\n): ReleaseFlagDefinition {\n const definition = RELEASE_FLAGS.find((entry) => entry.key === key)\n if (!definition) throw new Error(`Unknown release flag: ${key}`)\n return definition\n}\n\n/**\n * The JSON payload stored in each Remote Config parameter. `enabled: true`\n * turns the feature on for everyone; `enabled: false` with a positive\n * `rolloutPercent` enables it for that percentage of subjects (stable\n * per-tenant bucketing, GrowthBook-style); `plans` narrows either of those\n * to a set of tiers (AGL-2486).\n */\nexport interface ReleaseFlagValue {\n enabled: boolean\n /** 0–100; only consulted while `enabled` is false. */\n rolloutPercent?: number\n /**\n * Plan/tier targeting (AGL-2486). The tiers this flag is being rolled out\n * to, or ABSENT for \"every tier\".\n *\n * ABSENT AND EMPTY BOTH MEAN EVERY TIER, and that is load-bearing: every\n * flag stored before this field existed parses to `undefined` here, and an\n * operator who unticks every box has plainly not asked for a flag that\n * reaches nobody. Reading an empty list as \"no tiers\" would dark-launch\n * nothing while the console still said the flag was on — the inverted\n * reading of this field is the whole hazard, so it is closed in the parser\n * rather than left to each call site.\n */\n plans?: OrgPlan[]\n /** Free-form staff note (\"waiting on AGL-199\", owner, etc.). */\n note?: string\n}\n\nconst clampPercent = (value: unknown): number => {\n const percent = typeof value === 'number' && Number.isFinite(value) ? value : 0\n return Math.min(100, Math.max(0, Math.round(percent)))\n}\n\n/**\n * Every plan a flag may target, cheapest first — `SELF_SERVE_PLANS` then\n * `enterprise`, the same ladder `planGrantingFeature` walks and the same\n * order the plan grid renders. Derived, never re-typed: pricing v3 inserted\n * `scale` mid-ladder and added `agency`, and a second hand-written tier list\n * here would have missed both.\n */\nexport const RELEASE_FLAG_PLAN_LADDER: readonly OrgPlan[] = [\n ...SELF_SERVE_PLANS,\n 'enterprise' as OrgPlan,\n]\n\nconst isOrgPlan = (value: unknown): value is OrgPlan =>\n typeof value === 'string' &&\n Object.prototype.hasOwnProperty.call(PLAN_LABELS, value)\n\n/**\n * The tiers on the ladder at or above `plan` — what the console's \"Pro and\n * above\" shortcut expands to before it is STORED as an explicit list.\n *\n * Deliberately a UI convenience and not a stored \"minimum plan\" mode: a\n * stored threshold would silently re-aim every live flag the day a tier is\n * inserted into the middle of the ladder (pricing v3 did exactly that with\n * `scale`). An explicit list means the audience of a published flag only\n * ever changes because a human changed it.\n */\nexport function releaseFlagPlansAtOrAbove(plan: OrgPlan): OrgPlan[] {\n const index = RELEASE_FLAG_PLAN_LADDER.indexOf(plan)\n return index < 0 ? [] : RELEASE_FLAG_PLAN_LADDER.slice(index)\n}\n\n/**\n * Sanitises whatever is stored at `plans`, in ladder order.\n *\n * Returns `undefined` — not `[]` — for \"no targeting declared\", so the\n * absence survives a round trip through the staff editor and cannot be\n * written back as a list that means something else. Unknown tier names are\n * dropped for the same reason `parseOrgReleaseFlagOverrides` drops unknown\n * keys: a renamed or retired tier must never gate anything. A list that\n * names ONLY unknown tiers collapses to `undefined` (every tier) rather than\n * to an empty list, because a typo must inherit, never silently target.\n */\nexport function parseReleaseFlagPlans(raw: unknown): OrgPlan[] | undefined {\n if (!Array.isArray(raw)) return undefined\n const named = new Set(raw.filter(isOrgPlan))\n if (named.size === 0) return undefined\n return RELEASE_FLAG_PLAN_LADDER.filter((plan) => named.has(plan))\n}\n\n/**\n * Parses a Remote Config parameter string into a `ReleaseFlagValue`.\n * Tolerant by design — the template is hand-editable in the Firebase\n * console, so plain \"true\"/\"false\" strings and malformed JSON must not\n * crash gating: anything unreadable falls back to the registry default.\n */\nexport function parseReleaseFlagValue(\n raw: string | null | undefined,\n fallbackEnabled: boolean,\n): ReleaseFlagValue {\n const text = raw?.trim()\n if (!text) return { enabled: fallbackEnabled }\n if (text === 'true') return { enabled: true }\n if (text === 'false') return { enabled: false }\n try {\n const parsed = JSON.parse(text)\n if (typeof parsed === 'boolean') return { enabled: parsed }\n if (parsed && typeof parsed === 'object') {\n const plans = parseReleaseFlagPlans(parsed.plans)\n return {\n enabled: parsed.enabled === true,\n rolloutPercent: clampPercent(parsed.rolloutPercent),\n // Spread, so a flag stored before AGL-2486 has NO `plans` key at all\n // rather than an explicit `undefined`. `JSON.stringify` drops both,\n // but the two are not the same to `'plans' in value`, which is what\n // the staff PUT uses to tell \"the operator cleared the targeting\"\n // apart from \"this client never sent the field\".\n ...(plans ? { plans } : {}),\n note: typeof parsed.note === 'string' ? parsed.note : undefined,\n }\n }\n } catch {\n // fall through to the registry default\n }\n return { enabled: fallbackEnabled }\n}\n\n/**\n * The longest parameter description Remote Config will publish (AGL-3048).\n *\n * One description past it refuses the WHOLE publish with\n * `DESCRIPTION_EXCEEDS_MAXIMUM_SIZE`, which the staff flags route answered as\n * a 500. Registry descriptions are written for the staff flags page, and\n * several run far past the limit, so what the page shows and what a\n * parameter carries cannot always be the same text.\n *\n * Counted in UTF-8 BYTES. Remote Config states the limit in characters\n * without saying how it counts them, and a UTF-8 byte count is never smaller\n * than the code-point or UTF-16 count, so text within 256 bytes is within the\n * limit on every reading. The cost is a few characters of headroom on text\n * with typographic punctuation.\n */\nexport const REMOTE_CONFIG_DESCRIPTION_MAX_BYTES = 256\n\nfunction utf8ByteLength(text: string): number {\n let bytes = 0\n for (const character of text) {\n const codePoint = character.codePointAt(0) ?? 0\n bytes +=\n codePoint < 0x80 ? 1 : codePoint < 0x800 ? 2 : codePoint < 0x10000 ? 3 : 4\n }\n return bytes\n}\n\n/** Whether Remote Config accepts `text` as a parameter description. */\nexport function fitsRemoteConfigDescription(text: string): boolean {\n return utf8ByteLength(text) <= REMOTE_CONFIG_DESCRIPTION_MAX_BYTES\n}\n\nconst DESCRIPTION_ELLIPSIS = '…'\n\n/**\n * `text` cut to a length Remote Config accepts, at a word boundary, with an\n * ellipsis marking the cut. Text that already fits comes back unchanged.\n *\n * The cut takes whole code points, so a multi-byte character is never split.\n * It backs up to the last space when it lands inside a word (only a single\n * word longer than the whole budget is cut hard), and punctuation left\n * dangling before the ellipsis is dropped.\n */\nexport function clampRemoteConfigDescription(text: string): string {\n if (fitsRemoteConfigDescription(text)) return text\n const budget =\n REMOTE_CONFIG_DESCRIPTION_MAX_BYTES - utf8ByteLength(DESCRIPTION_ELLIPSIS)\n let kept = ''\n let bytes = 0\n for (const character of text) {\n const size = utf8ByteLength(character)\n if (bytes + size > budget) break\n kept += character\n bytes += size\n }\n const next = text.charAt(kept.length)\n if (next && !/\\s/.test(next)) {\n const lastSpace = kept.search(/\\s\\S*$/)\n if (lastSpace > 0) kept = kept.slice(0, lastSpace)\n }\n return `${kept.replace(/[\\s.,;:(–—-]+$/, '')}${DESCRIPTION_ELLIPSIS}`\n}\n\n/**\n * The description to publish with a release flag's Remote Config parameter\n * (AGL-3048). Always one Remote Config accepts:\n *\n * 1. The registry description, when it fits, so the flags page and the\n * parameter say the same thing.\n * 2. Otherwise the LIVE parameter's description, when it has one that fits.\n * Remote Config has already accepted exactly that text, and someone chose\n * it for the Firebase console. The first 250 characters of a longer\n * paragraph would drop whatever the paragraph says last: for\n * `release_assist`, the `/legal/subprocessors` precondition that its\n * AGL-1909 suite wants in front of whoever reads the flag there. The full\n * registry text stays on the staff flags page either way.\n * 3. Otherwise, as on a first publish with nothing live to keep, the\n * registry description clamped at a word boundary.\n */\nexport function releaseFlagParameterDescription(\n registryDescription: string,\n liveDescription: string | null | undefined,\n): string {\n if (fitsRemoteConfigDescription(registryDescription)) {\n return registryDescription\n }\n if (\n typeof liveDescription === 'string' &&\n liveDescription.trim().length > 0 &&\n fitsRemoteConfigDescription(liveDescription)\n ) {\n return liveDescription\n }\n return clampRemoteConfigDescription(registryDescription)\n}\n\n/**\n * FNV-1a 32-bit hash → 0–99 bucket. Deterministic so a subject keeps the\n * same rollout verdict across sessions and surfaces, and seeded with the\n * flag key so a subject doesn't land in the same bucket for every flag.\n */\nexport function releaseFlagBucket(flagKey: string, subjectId: string): number {\n let hash = 0x811c9dc5\n const seed = `${flagKey}:${subjectId}`\n for (let index = 0; index < seed.length; index += 1) {\n hash ^= seed.charCodeAt(index)\n hash = Math.imul(hash, 0x01000193)\n }\n return (hash >>> 0) % 100\n}\n\n/**\n * The gating verdict for one subject.\n *\n * `subjectId` is the ORG ID, or nothing. A rollout is a cohort of\n * workspaces, so a whole workspace has to land on one side of the\n * percentage: every surface that asks about an org must ask with the same\n * string, or they answer differently about the same customer.\n *\n * This docstring used to sanction falling back to the uid, and the server\n * gates fell back to a hostId. Since a hostId, a uid and an orgId hash to\n * three different buckets, a mid-rollout flag could be on in the console\n * and off on the published site for one workspace — stable per subject, so\n * it never flickered, it just stayed wrong (AGL-1656).\n *\n * An empty subject only passes fully-enabled flags. That is the deliberate\n * cost: a request with no resolvable org never joins a partial rollout,\n * which is the conservative answer rather than a confidently wrong one.\n */\nexport function isReleaseFlagOn(\n flagKey: ReleaseFlagKey,\n value: ReleaseFlagValue,\n subjectId: string | null | undefined,\n /**\n * The subject org's plan, when the caller knows it (AGL-2486). Optional so\n * every pre-existing call site compiles and answers unchanged: a flag that\n * declares no tier targeting never reads this.\n */\n plan?: OrgPlan | null,\n): boolean {\n if (!releaseFlagTargetsPlan(value, plan)) return false\n if (value.enabled) return true\n const percent = clampPercent(value.rolloutPercent)\n if (percent <= 0 || !subjectId) return false\n if (percent >= 100) return true\n return releaseFlagBucket(flagKey, subjectId) < percent\n}\n\n/**\n * Does this flag's tier targeting admit `plan`? (AGL-2486)\n *\n * THE SEMANTICS, because an operator who cannot predict the audience will\n * not stage a rollout at all:\n *\n * - The tier list is a FILTER, applied before and independently of the\n * percentage. The percentage then picks a cohort WITHIN the admitted\n * tiers. \"Pro and above at 50%\" is therefore both \"half of the Pro+\n * workspaces\" and \"the global 50% cohort, restricted to Pro+\" — the two\n * readings name the same set, and they do so because\n * {@link releaseFlagBucket} hashes `flagKey:orgId` and NOTHING ELSE.\n * - Which is also why the bucket is stable. Adding, removing or reordering\n * tiers cannot reshuffle the bucket, so an org already inside a 50%\n * rollout keeps the feature when an unrelated tier joins the list. Had\n * the plan been mixed into the hash — the obvious way to write this — a\n * tier edit would have re-drawn the cohort under every customer already\n * in it, and a plan change would have re-rolled the dice for one.\n * - The filter binds the FULLY-ENABLED path too, not just the rollout.\n * \"On, Enterprise + Agency\" is how a launch to the top of the ladder is\n * expressed, and it is what was actually asked for. Untargeted flags are\n * unaffected: no list means every tier, so `enabled` still means everyone.\n * - An UNKNOWN plan fails a declared list. Same conservatism as a missing\n * subject on a percentage rollout: a caller that cannot say which\n * workspace it is asking about gets the safe answer rather than a\n * confidently wrong one. A per-org staff override still wins over all of\n * it — see {@link isReleaseFlagOnForOrg} — so a targeted flag can still be\n * handed to one org off-ladder.\n */\nexport function releaseFlagTargetsPlan(\n value: ReleaseFlagValue,\n plan: OrgPlan | null | undefined,\n): boolean {\n const plans = value.plans\n // `!plans` would be the idiom here, but `strictNullChecks` is off repo-wide\n // and an empty array is truthy — both \"absent\" and \"empty\" have to be named\n // for the every-tier reading to actually hold.\n if (plans == null || plans.length === 0) return true\n if (!plan) return false\n return plans.includes(plan)\n}\n\n/**\n * Per-org release-flag overrides (AGL-1635), stored on the org doc at\n * `releaseFlags`. A present key is a staff DECISION about one organization\n * and wins over both the Remote Config value and the rollout bucket; an\n * absent key inherits.\n *\n * A separate field from `entitlements.features` on purpose: those ask\n * whether the org's PLAN includes a feature, these ask whether a\n * not-yet-released feature is switched on for this one customer. Folding\n * them together would make \"granted by the deal\" and \"previewing an\n * unreleased build\" indistinguishable at the point a support question is\n * asked.\n *\n * Why the org doc and not a Remote Config condition: RC conditions are\n * template-global and would need one published condition per org, with a\n * template publish (a manual, separate deploy) for every grant.\n */\nexport type OrgReleaseFlagOverrides = Partial<Record<ReleaseFlagKey, boolean>>\n\n/**\n * Sanitises whatever is actually stored at `org.releaseFlags`.\n *\n * Tolerant for the same reason `parseReleaseFlagValue` is: this map is\n * hand-editable in the Firebase console and survives registry renames, so a\n * retired flag key or a non-boolean must be dropped rather than allowed to\n * gate anything. Unknown keys are discarded — a stale key can never grant a\n * flag that no longer exists, and a typo silently inherits instead of\n * silently forcing.\n */\nexport function parseOrgReleaseFlagOverrides(\n raw: unknown,\n): OrgReleaseFlagOverrides {\n if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return {}\n const overrides: OrgReleaseFlagOverrides = {}\n for (const [key, value] of Object.entries(raw as Record<string, unknown>)) {\n if (typeof value === 'boolean' && isReleaseFlagKey(key)) {\n overrides[key] = value\n }\n }\n return overrides\n}\n\n/**\n * The gating verdict with a per-org override applied on top of\n * `isReleaseFlagOn`.\n *\n * The override is checked FIRST and short-circuits, so a forced-off flag\n * stays off for an org even while the flag is globally enabled — the\n * per-org kill switch is half the point, not just the per-org grant. Every\n * release-flag gate resolves through here so the console, the tenant\n * runtime and the API dispatchers cannot disagree about one org.\n */\nexport function isReleaseFlagOnForOrg(\n flagKey: ReleaseFlagKey,\n value: ReleaseFlagValue,\n subjectId: string | null | undefined,\n overrides: OrgReleaseFlagOverrides | null | undefined,\n /**\n * The org's plan, for tier targeting (AGL-2486). Checked only AFTER the\n * override: a staff grant is a decision about one named customer and\n * outranks the tier filter exactly as it already outranks the rollout\n * bucket. That ordering is what lets a Free org preview a\n * Business-targeted flag without widening the flag for every Free org.\n *\n * REQUIRED, and `null` has to be typed out. It was optional for one\n * release and that cost a silent revenue bug: `report-usage` held the org\n * document, dropped the argument, and every `plans`-declaring flag read\n * OFF — so the contacts overage went uninvoiced for exactly the orgs\n * entitled to reach the feature, with nothing thrown and nothing logged.\n * An unknown tier still refuses, which is the correct conservatism; what\n * cannot be allowed is a caller MANUFACTURING an unknown out of a tier it\n * already has in hand. Spelling `null` makes that a statement rather than\n * an omission, and makes the next call site that forgets fail to compile\n * instead of failing to bill. `getOrgReleaseFlagTargeting` returns the\n * plan beside the overrides from ONE document read precisely so that\n * passing it costs nothing.\n */\n plan: OrgPlan | null,\n): boolean {\n const override = overrides?.[flagKey]\n if (typeof override === 'boolean') return override\n return isReleaseFlagOn(flagKey, value, subjectId, plan)\n}\n"],"names":["PLAN_LABELS","SELF_SERVE_PLANS","PLATFORM_BRAND_NAME","PLUGIN_RELEASE_FLAGS","PLATFORM_RELEASE_FLAGS","key","label","description","defaultEnabled","RELEASE_FLAGS","RELEASE_FLAG_KEYS","map","definition","isReleaseFlagKey","value","includes","getReleaseFlagDefinition","find","entry","Error","clampPercent","percent","Number","isFinite","Math","min","max","round","RELEASE_FLAG_PLAN_LADDER","isOrgPlan","Object","prototype","hasOwnProperty","call","releaseFlagPlansAtOrAbove","plan","index","indexOf","slice","parseReleaseFlagPlans","raw","Array","isArray","undefined","named","Set","filter","size","has","parseReleaseFlagValue","fallbackEnabled","text","trim","enabled","parsed","JSON","parse","plans","rolloutPercent","note","REMOTE_CONFIG_DESCRIPTION_MAX_BYTES","utf8ByteLength","bytes","character","codePoint","codePointAt","fitsRemoteConfigDescription","DESCRIPTION_ELLIPSIS","clampRemoteConfigDescription","budget","kept","next","charAt","length","test","lastSpace","search","replace","releaseFlagParameterDescription","registryDescription","liveDescription","releaseFlagBucket","flagKey","subjectId","hash","seed","charCodeAt","imul","isReleaseFlagOn","releaseFlagTargetsPlan","parseOrgReleaseFlagOverrides","overrides","entries","isReleaseFlagOnForOrg","override"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;CAOC,GAED,6DAA6D;AAE7D,SAASA,WAAW,EAAEC,gBAAgB,QAAQ,yBAAqB;AACnE,SAASC,mBAAmB,QAAQ,sBAAkB;AACtD,SACEC,oBAAoB,QAEf,sCAAkC;AAqCzC;;;;;;;;;;CAUC,GACD,MAAMC,yBAA2D;IAC/D;QACEC,KAAK;QACLC,OAAO;QACPC,aACE,uEACA;QACFC,gBAAgB;IAClB;IACA;QACEH,KAAK;QACLC,OAAO;QACPC,aACE,4DACA,uEACA,sEACA,yEACA,uEACA,yEACA,sEACA,wEACA,sEACA,wEACA;QACFC,gBAAgB;IAClB;IACA,0EAA0E;IAC1E,yEAAyE;IACzE,0EAA0E;IAC1E,mCAAmC;IACnC;QACEH,KAAK;QACLC,OAAO;QACPC,aACE,wEACA,0DACA,wEACA;QACFC,gBAAgB;IAClB;IACA;QACEH,KAAK;QACLC,OAAO,GAAGJ,oBAAoB,OAAO,CAAC;QACtCK,aACE,kEACA,sEACA,kEACA,0EACA,0EACA,oEACA,yEACA,mE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IACzB,4EAA4E;IAC5E,4EAA4E;IAC5E,+CAA+C;IAC/C,IAAIA,SAAS,QAAQA,MAAMgB,MAAM,KAAK,GAAG,OAAO;IAChD,IAAI,CAACtC,MAAM,OAAO;IAClB,OAAOsB,MAAM1C,QAAQ,CAACoB;AACxB;AAqBA;;;;;;;;;CASC,GACD,OAAO,SAASuD,6BACdlD,GAAY;IAEZ,IAAI,CAACA,OAAO,OAAOA,QAAQ,YAAYC,MAAMC,OAAO,CAACF,MAAM,OAAO,CAAC;IACnE,MAAMmD,YAAqC,CAAC;IAC5C,KAAK,MAAM,CAACtF,KAAKS,MAAM,IAAIgB,OAAO8D,OAAO,CAACpD,KAAiC;QACzE,IAAI,OAAO1B,UAAU,aAAaD,iBAAiBR,MAAM;YACvDsF,SAAS,CAACtF,IAAI,GAAGS;QACnB;IACF;IACA,OAAO6E;AACT;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASE,sBACdX,OAAuB,EACvBpE,KAAuB,EACvBqE,SAAoC,EACpCQ,SAAqD,EACrD;;;;;;;;;;;;;;;;;;;GAmBC,GACDxD,IAAoB;IAEpB,MAAM2D,WAAWH,6BAAAA,SAAW,CAACT,QAAQ;IACrC,IAAI,OAAOY,aAAa,WAAW,OAAOA;IAC1C,OAAON,gBAAgBN,SAASpE,OAAOqE,WAAWhD;AACpD"}
|
|
1
|
+
{"version":3,"sources":["../../../../../../libs/aglyn/src/lib/app-utils/release-flags.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/**\n * Release flags (AGL-227): platform-level \"is this feature launched\"\n * gating backed by Firebase Remote Config. A separate axis from plan\n * entitlements (`plan-entitlements.ts`) — entitlements ask whether the\n * tenant's PLAN includes a feature, release flags ask whether the feature\n * is released to the public at all (or partially, via percentage rollout).\n * Staff bypass release flags everywhere but see a flagged warning.\n */\n\n/** Remote Config parameter keys for release-gated features. */\nimport type { OrgPlan } from '../foundation'\nimport { PLAN_LABELS, SELF_SERVE_PLANS } from './plan-entitlements'\nimport { PLATFORM_BRAND_NAME } from './platform-brand'\nimport {\n PLUGIN_RELEASE_FLAGS,\n type PluginReleaseFlagKey,\n} from './plugin-release-flags.generated'\n\n/**\n * Every release flag: the ones plugins declare (compiled from\n * plugins.config.json, AGL-3080) and the platform's own below.\n */\nexport type ReleaseFlagKey =\n | PluginReleaseFlagKey\n | 'release_addon_store'\n | 'release_native_checkout'\n | 'release_edit_bar'\n | 'release_assist'\n | 'release_video_uploads'\n | 'release_video_delivery'\n | 'release_ai_generative'\n | 'release_crm_assist_whole_record'\n\nexport interface ReleaseFlagDefinition {\n key: ReleaseFlagKey\n label: string\n description: string\n /**\n * Fallback verdict when Remote Config is unreachable (offline, blocked,\n * first paint before activate). MUST match the seeded value in\n * cloud/firebase-remoteconfig.template.json so environments without a\n * published template behave like the template intends.\n */\n defaultEnabled: boolean\n /** Host dashboard tab id (host-nav-tabs.ts) this flag hides, if any. */\n navTabId?: string\n}\n\n/** A release flag a plugin declares, as the generator compiles it. */\nexport type PluginReleaseFlagDefinition = ReleaseFlagDefinition & {\n key: PluginReleaseFlagKey\n}\n\n/**\n * The platform's own release flags: features no plugin owns.\n *\n * Every first-party plugin is release-flagged too (AGL-422) — the flag feeds\n * the plugin LOADER (console, published sites, API dispatch), not just nav\n * visibility, so staff can kill-switch a whole plugin platform-wide from the\n * Feature Flags page. Those flags are the plugins' own: each is defined by\n * its catalog row's `releaseFlagDefinition` in plugins.config.json and\n * compiled into `PLUGIN_RELEASE_FLAGS`, so adding a plugin edits nothing\n * here.\n */\nconst PLATFORM_RELEASE_FLAGS: readonly ReleaseFlagDefinition[] = [\n {\n key: 'release_addon_store',\n label: 'Add-on store',\n description:\n 'Self-serve add-on purchases on the Billing page: seats, datasets, ' +\n 'extra sites, POS registers, Event Calendar (AGL-524..531).',\n defaultEnabled: true,\n },\n // Released to every workspace 2026-10-06 (AGL-3606). Storefront-only since\n // the console's plan checkout stopped rendering Stripe Checkout at all. Still\n // the surface's kill switch, globally or per org: off, both storefront\n // checkout routes return the hosted redirect again.\n {\n key: 'release_native_checkout',\n label: 'In-page checkout',\n description:\n 'Storefront shoppers pay on the merchant\\u2019s own site: the Payment ' +\n 'Element, email, shipping address and method, and a live total with ' +\n 'tax open in place under the Buy or Checkout button, styled with the ' +\n 'site theme, instead of a redirect to checkout.stripe.com (AGL-1944). ' +\n 'Released to every workspace 2026-10-06 (AGL-3606). The webhook is ' +\n 'still the only thing that fulfils. Also gated on ' +\n 'NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY, so a deployment without one keeps ' +\n 'the redirect; turning this off returns every storefront to the redirect.',\n defaultEnabled: true,\n },\n // Released to every site 2026-09-16 (AGL-3041). Still the whole surface's\n // kill switch, globally or for one org by override: off, the tenant slot\n // renders nothing, both token mints refuse, and `/api/edit-context` turns\n // away every token already issued.\n {\n key: 'release_edit_bar',\n label: 'Site admin bar',\n description:\n 'Admin bar on published sites: a signed-in editor jumps from a live ' +\n 'page straight into the Besigner to edit it. Released ' +\n '2026-09-16 (AGL-3041) for every site; turning it off hides the bar ' +\n 'and revokes every outstanding edit token at the verify site.',\n defaultEnabled: true,\n },\n {\n key: 'release_assist',\n label: `${PLATFORM_BRAND_NAME} Assist`,\n description:\n 'The in-console AI chat helper on every page (AGL-1860): docs-' +\n 'grounded answers with deep links, page-context guidance on Pro+. ' +\n 'OFF by default, and blocked on TWO published legal artifacts ' +\n '(AGL-1909), neither of which is a repo file — both are live besigner ' +\n 'pages, so publication is what satisfies them: (1) the privacy-policy ' +\n 'disclosure for stored Q&A, because the data loop records every ' +\n 'exchange org-scoped under orgs/{orgId}/assistExchanges; and (2) the ' +\n 'Anthropic row on /legal/subprocessors, which was deliberately ' +\n 'REMOVED on 2026-08-13 (subprocessorsV2a-20260813) on the premise ' +\n 'that no production key existed — so the page is not merely ' +\n 'incomplete without it, it is affirmatively wrong. NOTE the real ' +\n 'trigger is ANTHROPIC_API_KEY, not this flag: /api/ai/assist (the ' +\n 'besigner copy assistant, AGL-89/130/169) carries no release flag at ' +\n 'all and sends customer site content to Anthropic on the key plus a ' +\n 'Pro entitlement alone. Setting the key in production therefore makes ' +\n 'Anthropic a subprocessor whether or not this flag is ever flipped.',\n defaultEnabled: false,\n },\n // Ingress only, and with no staff preview on the server: a video a staff\n // session uploads into a customer's library serves on that customer's pages\n // like any other, so a grant goes to the org through its override.\n // `apps/console/utils/server/video-uploads.ts` holds the gate.\n {\n key: 'release_video_uploads',\n label: 'Video uploads',\n description:\n 'New video in the media library, on every upload path (AGL-2830). ' +\n 'Off: refused with 403 video_uploads_paused, as DAM video delivery is ' +\n 'not yet metered or bounded per org (AGL-2810, AGL-2812). Images, ' +\n 'documents and stored videos are unaffected.',\n defaultEnabled: false,\n },\n // Delivery, not ingress: this flag decides whether a video already in the\n // library is COPIED to the configured delivery provider and served from it\n // through a short-lived signed redirect (AGL-2824). Per org, with no staff\n // preview on the server — a copy is customer data at the provider, so a\n // grant goes to the org through its override. Off, or with no provider\n // configured, every video serves from this platform exactly as before.\n // `media-delivery.ts` in `tenant-data-admin` holds the gate.\n {\n key: 'release_video_delivery',\n label: 'Video delivery',\n description:\n 'Serves library video from a configured delivery provider through ' +\n 'short-lived signed redirects, and copies each video to it (AGL-2824). ' +\n 'OFF by default: video serves from this platform as before. Also ' +\n \"needs the provider's settings.\",\n defaultEnabled: false,\n },\n // The generative doors share one runtime with Assist (AGL-2903) but not\n // its flag: `release_assist` answers questions, this builds things, and\n // the two are sold, metered and disclosed separately. The server-side\n // gate lives in `aiGateLadder` (404 when off, staff preview).\n // Labeled for what it switches — the generative doors — and not with the\n // add-on's own name, which is sold and live whether or not the doors are\n // released: the docs name the add-on, and a flag wearing the same words\n // reads as documented when it is not.\n {\n key: 'release_ai_generative',\n label: `${PLATFORM_BRAND_NAME} AI generation`,\n description:\n 'Generative building and automation behind the AI add-on ' +\n '(AGL-2903): sections, pages and workflows written by a model from ' +\n 'a brief, on the shared Anthropic runtime. OFF by default and staff ' +\n 'preview only; every generative route answers 404 while it is off. ' +\n 'Turning it on sends customer briefs and site content to Anthropic ' +\n 'on the same ANTHROPIC_API_KEY and under the same subprocessor ' +\n 'disclosure as Assist (AGL-1909).',\n defaultEnabled: false,\n },\n // What CRM assistance hands the model provider, not whether it runs:\n // `release_ai_generative` opens the doors, this widens what a record sends\n // through them. Per org, with no staff preview — the data is the customer's,\n // and a staff session reading a customer's record must send what the\n // published pages promise. The CRM's record-facts readers hold the gate.\n {\n key: 'release_crm_assist_whole_record',\n label: 'CRM assistance: whole record',\n description:\n 'What AI assistance in the CRM (a record summary, next step or ' +\n 'email draft) sends the model provider (AGL-3520). OFF: the ' +\n 'disclosed fields, with addresses and numbers in typed text ' +\n 'replaced. ON: the whole record, contact details and custom fields ' +\n 'included. Turn on only after Privacy Policy section 2 and the ' +\n 'Subprocessors row are republished; see ' +\n 'docs/drafts/agl-3520-crm-assistance-whole-record-disclosure.md.',\n defaultEnabled: false,\n },\n]\n\n/**\n * The registry: one entry per gated feature, the plugins' first. Adding a\n * platform flag = add it above, seed it in the Remote Config template, and\n * (optionally) wrap the page in `<FeatureGate>` — the staff admin editor and\n * nav filtering pick it up from this list.\n */\nexport const RELEASE_FLAGS: readonly ReleaseFlagDefinition[] = [\n ...PLUGIN_RELEASE_FLAGS,\n ...PLATFORM_RELEASE_FLAGS,\n]\n\nexport const RELEASE_FLAG_KEYS = RELEASE_FLAGS.map(\n (definition) => definition.key,\n) as readonly ReleaseFlagKey[]\n\nexport function isReleaseFlagKey(value: string): value is ReleaseFlagKey {\n return (RELEASE_FLAG_KEYS as readonly string[]).includes(value)\n}\n\nexport function getReleaseFlagDefinition(\n key: ReleaseFlagKey,\n): ReleaseFlagDefinition {\n const definition = RELEASE_FLAGS.find((entry) => entry.key === key)\n if (!definition) throw new Error(`Unknown release flag: ${key}`)\n return definition\n}\n\n/**\n * The JSON payload stored in each Remote Config parameter. `enabled: true`\n * turns the feature on for everyone; `enabled: false` with a positive\n * `rolloutPercent` enables it for that percentage of subjects (stable\n * per-tenant bucketing, GrowthBook-style); `plans` narrows either of those\n * to a set of tiers (AGL-2486).\n */\nexport interface ReleaseFlagValue {\n enabled: boolean\n /** 0–100; only consulted while `enabled` is false. */\n rolloutPercent?: number\n /**\n * Plan/tier targeting (AGL-2486). The tiers this flag is being rolled out\n * to, or ABSENT for \"every tier\".\n *\n * ABSENT AND EMPTY BOTH MEAN EVERY TIER, and that is load-bearing: every\n * flag stored before this field existed parses to `undefined` here, and an\n * operator who unticks every box has plainly not asked for a flag that\n * reaches nobody. Reading an empty list as \"no tiers\" would dark-launch\n * nothing while the console still said the flag was on — the inverted\n * reading of this field is the whole hazard, so it is closed in the parser\n * rather than left to each call site.\n */\n plans?: OrgPlan[]\n /** Free-form staff note (\"waiting on AGL-199\", owner, etc.). */\n note?: string\n}\n\nconst clampPercent = (value: unknown): number => {\n const percent = typeof value === 'number' && Number.isFinite(value) ? value : 0\n return Math.min(100, Math.max(0, Math.round(percent)))\n}\n\n/**\n * Every plan a flag may target, cheapest first — `SELF_SERVE_PLANS` then\n * `enterprise`, the same ladder `planGrantingFeature` walks and the same\n * order the plan grid renders. Derived, never re-typed: pricing v3 inserted\n * `scale` mid-ladder and added `agency`, and a second hand-written tier list\n * here would have missed both.\n */\nexport const RELEASE_FLAG_PLAN_LADDER: readonly OrgPlan[] = [\n ...SELF_SERVE_PLANS,\n 'enterprise' as OrgPlan,\n]\n\nconst isOrgPlan = (value: unknown): value is OrgPlan =>\n typeof value === 'string' &&\n Object.prototype.hasOwnProperty.call(PLAN_LABELS, value)\n\n/**\n * The tiers on the ladder at or above `plan` — what the console's \"Pro and\n * above\" shortcut expands to before it is STORED as an explicit list.\n *\n * Deliberately a UI convenience and not a stored \"minimum plan\" mode: a\n * stored threshold would silently re-aim every live flag the day a tier is\n * inserted into the middle of the ladder (pricing v3 did exactly that with\n * `scale`). An explicit list means the audience of a published flag only\n * ever changes because a human changed it.\n */\nexport function releaseFlagPlansAtOrAbove(plan: OrgPlan): OrgPlan[] {\n const index = RELEASE_FLAG_PLAN_LADDER.indexOf(plan)\n return index < 0 ? [] : RELEASE_FLAG_PLAN_LADDER.slice(index)\n}\n\n/**\n * Sanitises whatever is stored at `plans`, in ladder order.\n *\n * Returns `undefined` — not `[]` — for \"no targeting declared\", so the\n * absence survives a round trip through the staff editor and cannot be\n * written back as a list that means something else. Unknown tier names are\n * dropped for the same reason `parseOrgReleaseFlagOverrides` drops unknown\n * keys: a renamed or retired tier must never gate anything. A list that\n * names ONLY unknown tiers collapses to `undefined` (every tier) rather than\n * to an empty list, because a typo must inherit, never silently target.\n */\nexport function parseReleaseFlagPlans(raw: unknown): OrgPlan[] | undefined {\n if (!Array.isArray(raw)) return undefined\n const named = new Set(raw.filter(isOrgPlan))\n if (named.size === 0) return undefined\n return RELEASE_FLAG_PLAN_LADDER.filter((plan) => named.has(plan))\n}\n\n/**\n * Parses a Remote Config parameter string into a `ReleaseFlagValue`.\n * Tolerant by design — the template is hand-editable in the Firebase\n * console, so plain \"true\"/\"false\" strings and malformed JSON must not\n * crash gating: anything unreadable falls back to the registry default.\n */\nexport function parseReleaseFlagValue(\n raw: string | null | undefined,\n fallbackEnabled: boolean,\n): ReleaseFlagValue {\n const text = raw?.trim()\n if (!text) return { enabled: fallbackEnabled }\n if (text === 'true') return { enabled: true }\n if (text === 'false') return { enabled: false }\n try {\n const parsed = JSON.parse(text)\n if (typeof parsed === 'boolean') return { enabled: parsed }\n if (parsed && typeof parsed === 'object') {\n const plans = parseReleaseFlagPlans(parsed.plans)\n return {\n enabled: parsed.enabled === true,\n rolloutPercent: clampPercent(parsed.rolloutPercent),\n // Spread, so a flag stored before AGL-2486 has NO `plans` key at all\n // rather than an explicit `undefined`. `JSON.stringify` drops both,\n // but the two are not the same to `'plans' in value`, which is what\n // the staff PUT uses to tell \"the operator cleared the targeting\"\n // apart from \"this client never sent the field\".\n ...(plans ? { plans } : {}),\n note: typeof parsed.note === 'string' ? parsed.note : undefined,\n }\n }\n } catch {\n // fall through to the registry default\n }\n return { enabled: fallbackEnabled }\n}\n\n/**\n * The longest parameter description Remote Config will publish (AGL-3048).\n *\n * One description past it refuses the WHOLE publish with\n * `DESCRIPTION_EXCEEDS_MAXIMUM_SIZE`, which the staff flags route answered as\n * a 500. Registry descriptions are written for the staff flags page, and\n * several run far past the limit, so what the page shows and what a\n * parameter carries cannot always be the same text.\n *\n * Counted in UTF-8 BYTES. Remote Config states the limit in characters\n * without saying how it counts them, and a UTF-8 byte count is never smaller\n * than the code-point or UTF-16 count, so text within 256 bytes is within the\n * limit on every reading. The cost is a few characters of headroom on text\n * with typographic punctuation.\n */\nexport const REMOTE_CONFIG_DESCRIPTION_MAX_BYTES = 256\n\nfunction utf8ByteLength(text: string): number {\n let bytes = 0\n for (const character of text) {\n const codePoint = character.codePointAt(0) ?? 0\n bytes +=\n codePoint < 0x80 ? 1 : codePoint < 0x800 ? 2 : codePoint < 0x10000 ? 3 : 4\n }\n return bytes\n}\n\n/** Whether Remote Config accepts `text` as a parameter description. */\nexport function fitsRemoteConfigDescription(text: string): boolean {\n return utf8ByteLength(text) <= REMOTE_CONFIG_DESCRIPTION_MAX_BYTES\n}\n\nconst DESCRIPTION_ELLIPSIS = '…'\n\n/**\n * `text` cut to a length Remote Config accepts, at a word boundary, with an\n * ellipsis marking the cut. Text that already fits comes back unchanged.\n *\n * The cut takes whole code points, so a multi-byte character is never split.\n * It backs up to the last space when it lands inside a word (only a single\n * word longer than the whole budget is cut hard), and punctuation left\n * dangling before the ellipsis is dropped.\n */\nexport function clampRemoteConfigDescription(text: string): string {\n if (fitsRemoteConfigDescription(text)) return text\n const budget =\n REMOTE_CONFIG_DESCRIPTION_MAX_BYTES - utf8ByteLength(DESCRIPTION_ELLIPSIS)\n let kept = ''\n let bytes = 0\n for (const character of text) {\n const size = utf8ByteLength(character)\n if (bytes + size > budget) break\n kept += character\n bytes += size\n }\n const next = text.charAt(kept.length)\n if (next && !/\\s/.test(next)) {\n const lastSpace = kept.search(/\\s\\S*$/)\n if (lastSpace > 0) kept = kept.slice(0, lastSpace)\n }\n return `${kept.replace(/[\\s.,;:(–—-]+$/, '')}${DESCRIPTION_ELLIPSIS}`\n}\n\n/**\n * The description to publish with a release flag's Remote Config parameter\n * (AGL-3048). Always one Remote Config accepts:\n *\n * 1. The registry description, when it fits, so the flags page and the\n * parameter say the same thing.\n * 2. Otherwise the LIVE parameter's description, when it has one that fits.\n * Remote Config has already accepted exactly that text, and someone chose\n * it for the Firebase console. The first 250 characters of a longer\n * paragraph would drop whatever the paragraph says last: for\n * `release_assist`, the `/legal/subprocessors` precondition that its\n * AGL-1909 suite wants in front of whoever reads the flag there. The full\n * registry text stays on the staff flags page either way.\n * 3. Otherwise, as on a first publish with nothing live to keep, the\n * registry description clamped at a word boundary.\n */\nexport function releaseFlagParameterDescription(\n registryDescription: string,\n liveDescription: string | null | undefined,\n): string {\n if (fitsRemoteConfigDescription(registryDescription)) {\n return registryDescription\n }\n if (\n typeof liveDescription === 'string' &&\n liveDescription.trim().length > 0 &&\n fitsRemoteConfigDescription(liveDescription)\n ) {\n return liveDescription\n }\n return clampRemoteConfigDescription(registryDescription)\n}\n\n/**\n * FNV-1a 32-bit hash → 0–99 bucket. Deterministic so a subject keeps the\n * same rollout verdict across sessions and surfaces, and seeded with the\n * flag key so a subject doesn't land in the same bucket for every flag.\n */\nexport function releaseFlagBucket(flagKey: string, subjectId: string): number {\n let hash = 0x811c9dc5\n const seed = `${flagKey}:${subjectId}`\n for (let index = 0; index < seed.length; index += 1) {\n hash ^= seed.charCodeAt(index)\n hash = Math.imul(hash, 0x01000193)\n }\n return (hash >>> 0) % 100\n}\n\n/**\n * The gating verdict for one subject.\n *\n * `subjectId` is the ORG ID, or nothing. A rollout is a cohort of\n * workspaces, so a whole workspace has to land on one side of the\n * percentage: every surface that asks about an org must ask with the same\n * string, or they answer differently about the same customer.\n *\n * This docstring used to sanction falling back to the uid, and the server\n * gates fell back to a hostId. Since a hostId, a uid and an orgId hash to\n * three different buckets, a mid-rollout flag could be on in the console\n * and off on the published site for one workspace — stable per subject, so\n * it never flickered, it just stayed wrong (AGL-1656).\n *\n * An empty subject only passes fully-enabled flags. That is the deliberate\n * cost: a request with no resolvable org never joins a partial rollout,\n * which is the conservative answer rather than a confidently wrong one.\n */\nexport function isReleaseFlagOn(\n flagKey: ReleaseFlagKey,\n value: ReleaseFlagValue,\n subjectId: string | null | undefined,\n /**\n * The subject org's plan, when the caller knows it (AGL-2486). Optional so\n * every pre-existing call site compiles and answers unchanged: a flag that\n * declares no tier targeting never reads this.\n */\n plan?: OrgPlan | null,\n): boolean {\n if (!releaseFlagTargetsPlan(value, plan)) return false\n if (value.enabled) return true\n const percent = clampPercent(value.rolloutPercent)\n if (percent <= 0 || !subjectId) return false\n if (percent >= 100) return true\n return releaseFlagBucket(flagKey, subjectId) < percent\n}\n\n/**\n * Does this flag's tier targeting admit `plan`? (AGL-2486)\n *\n * THE SEMANTICS, because an operator who cannot predict the audience will\n * not stage a rollout at all:\n *\n * - The tier list is a FILTER, applied before and independently of the\n * percentage. The percentage then picks a cohort WITHIN the admitted\n * tiers. \"Pro and above at 50%\" is therefore both \"half of the Pro+\n * workspaces\" and \"the global 50% cohort, restricted to Pro+\" — the two\n * readings name the same set, and they do so because\n * {@link releaseFlagBucket} hashes `flagKey:orgId` and NOTHING ELSE.\n * - Which is also why the bucket is stable. Adding, removing or reordering\n * tiers cannot reshuffle the bucket, so an org already inside a 50%\n * rollout keeps the feature when an unrelated tier joins the list. Had\n * the plan been mixed into the hash — the obvious way to write this — a\n * tier edit would have re-drawn the cohort under every customer already\n * in it, and a plan change would have re-rolled the dice for one.\n * - The filter binds the FULLY-ENABLED path too, not just the rollout.\n * \"On, Enterprise + Agency\" is how a launch to the top of the ladder is\n * expressed, and it is what was actually asked for. Untargeted flags are\n * unaffected: no list means every tier, so `enabled` still means everyone.\n * - An UNKNOWN plan fails a declared list. Same conservatism as a missing\n * subject on a percentage rollout: a caller that cannot say which\n * workspace it is asking about gets the safe answer rather than a\n * confidently wrong one. A per-org staff override still wins over all of\n * it — see {@link isReleaseFlagOnForOrg} — so a targeted flag can still be\n * handed to one org off-ladder.\n */\nexport function releaseFlagTargetsPlan(\n value: ReleaseFlagValue,\n plan: OrgPlan | null | undefined,\n): boolean {\n const plans = value.plans\n // `!plans` would be the idiom here, but `strictNullChecks` is off repo-wide\n // and an empty array is truthy — both \"absent\" and \"empty\" have to be named\n // for the every-tier reading to actually hold.\n if (plans == null || plans.length === 0) return true\n if (!plan) return false\n return plans.includes(plan)\n}\n\n/**\n * Per-org release-flag overrides (AGL-1635), stored on the org doc at\n * `releaseFlags`. A present key is a staff DECISION about one organization\n * and wins over both the Remote Config value and the rollout bucket; an\n * absent key inherits.\n *\n * A separate field from `entitlements.features` on purpose: those ask\n * whether the org's PLAN includes a feature, these ask whether a\n * not-yet-released feature is switched on for this one customer. Folding\n * them together would make \"granted by the deal\" and \"previewing an\n * unreleased build\" indistinguishable at the point a support question is\n * asked.\n *\n * Why the org doc and not a Remote Config condition: RC conditions are\n * template-global and would need one published condition per org, with a\n * template publish (a manual, separate deploy) for every grant.\n */\nexport type OrgReleaseFlagOverrides = Partial<Record<ReleaseFlagKey, boolean>>\n\n/**\n * Sanitises whatever is actually stored at `org.releaseFlags`.\n *\n * Tolerant for the same reason `parseReleaseFlagValue` is: this map is\n * hand-editable in the Firebase console and survives registry renames, so a\n * retired flag key or a non-boolean must be dropped rather than allowed to\n * gate anything. Unknown keys are discarded — a stale key can never grant a\n * flag that no longer exists, and a typo silently inherits instead of\n * silently forcing.\n */\nexport function parseOrgReleaseFlagOverrides(\n raw: unknown,\n): OrgReleaseFlagOverrides {\n if (!raw || typeof raw !== 'object' || Array.isArray(raw)) return {}\n const overrides: OrgReleaseFlagOverrides = {}\n for (const [key, value] of Object.entries(raw as Record<string, unknown>)) {\n if (typeof value === 'boolean' && isReleaseFlagKey(key)) {\n overrides[key] = value\n }\n }\n return overrides\n}\n\n/**\n * The gating verdict with a per-org override applied on top of\n * `isReleaseFlagOn`.\n *\n * The override is checked FIRST and short-circuits, so a forced-off flag\n * stays off for an org even while the flag is globally enabled — the\n * per-org kill switch is half the point, not just the per-org grant. Every\n * release-flag gate resolves through here so the console, the tenant\n * runtime and the API dispatchers cannot disagree about one org.\n */\nexport function isReleaseFlagOnForOrg(\n flagKey: ReleaseFlagKey,\n value: ReleaseFlagValue,\n subjectId: string | null | undefined,\n overrides: OrgReleaseFlagOverrides | null | undefined,\n /**\n * The org's plan, for tier targeting (AGL-2486). Checked only AFTER the\n * override: a staff grant is a decision about one named customer and\n * outranks the tier filter exactly as it already outranks the rollout\n * bucket. That ordering is what lets a Free org preview a\n * Business-targeted flag without widening the flag for every Free org.\n *\n * REQUIRED, and `null` has to be typed out. It was optional for one\n * release and that cost a silent revenue bug: `report-usage` held the org\n * document, dropped the argument, and every `plans`-declaring flag read\n * OFF — so the contacts overage went uninvoiced for exactly the orgs\n * entitled to reach the feature, with nothing thrown and nothing logged.\n * An unknown tier still refuses, which is the correct conservatism; what\n * cannot be allowed is a caller MANUFACTURING an unknown out of a tier it\n * already has in hand. Spelling `null` makes that a statement rather than\n * an omission, and makes the next call site that forgets fail to compile\n * instead of failing to bill. `getOrgReleaseFlagTargeting` returns the\n * plan beside the overrides from ONE document read precisely so that\n * passing it costs nothing.\n */\n plan: OrgPlan | null,\n): boolean {\n const override = overrides?.[flagKey]\n if (typeof override === 'boolean') return override\n return isReleaseFlagOn(flagKey, value, subjectId, plan)\n}\n"],"names":["PLAN_LABELS","SELF_SERVE_PLANS","PLATFORM_BRAND_NAME","PLUGIN_RELEASE_FLAGS","PLATFORM_RELEASE_FLAGS","key","label","description","defaultEnabled","RELEASE_FLAGS","RELEASE_FLAG_KEYS","map","definition","isReleaseFlagKey","value","includes","getReleaseFlagDefinition","find","entry","Error","clampPercent","percent","Number","isFinite","Math","min","max","round","RELEASE_FLAG_PLAN_LADDER","isOrgPlan","Object","prototype","hasOwnProperty","call","releaseFlagPlansAtOrAbove","plan","index","indexOf","slice","parseReleaseFlagPlans","raw","Array","isArray","undefined","named","Set","filter","size","has","parseReleaseFlagValue","fallbackEnabled","text","trim","enabled","parsed","JSON","parse","plans","rolloutPercent","note","REMOTE_CONFIG_DESCRIPTION_MAX_BYTES","utf8ByteLength","bytes","character","codePoint","codePointAt","fitsRemoteConfigDescription","DESCRIPTION_ELLIPSIS","clampRemoteConfigDescription","budget","kept","next","charAt","length","test","lastSpace","search","replace","releaseFlagParameterDescription","registryDescription","liveDescription","releaseFlagBucket","flagKey","subjectId","hash","seed","charCodeAt","imul","isReleaseFlagOn","releaseFlagTargetsPlan","parseOrgReleaseFlagOverrides","overrides","entries","isReleaseFlagOnForOrg","override"],"mappings":"AAAA;;;;;;;;;;;;;;;CAeC,GAED;;;;;;;CAOC,GAED,6DAA6D;AAE7D,SAASA,WAAW,EAAEC,gBAAgB,QAAQ,yBAAqB;AACnE,SAASC,mBAAmB,QAAQ,sBAAkB;AACtD,SACEC,oBAAoB,QAEf,sCAAkC;AAqCzC;;;;;;;;;;CAUC,GACD,MAAMC,yBAA2D;IAC/D;QACEC,KAAK;QACLC,OAAO;QACPC,aACE,uEACA;QACFC,gBAAgB;IAClB;IACA,2EAA2E;IAC3E,8EAA8E;IAC9E,uEAAuE;IACvE,oDAAoD;IACpD;QACEH,KAAK;QACLC,OAAO;QACPC,aACE,0EACA,wEACA,yEACA,0EACA,uEACA,sDACA,2EACA;QACFC,gBAAgB;IAClB;IACA,0EAA0E;IAC1E,yEAAyE;IACzE,0EAA0E;IAC1E,mCAAmC;IACnC;QACEH,KAAK;QACLC,OAAO;QACPC,aACE,w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C,aAAa9D;AACjD;AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4BC,GACD,OAAO,SAASoE,uBACd3E,KAAuB,EACvBqB,IAAgC;IAEhC,MAAMsB,QAAQ3C,MAAM2C,KAAK;IACzB,4EAA4E;IAC5E,4EAA4E;IAC5E,+CAA+C;IAC/C,IAAIA,SAAS,QAAQA,MAAMgB,MAAM,KAAK,GAAG,OAAO;IAChD,IAAI,CAACtC,MAAM,OAAO;IAClB,OAAOsB,MAAM1C,QAAQ,CAACoB;AACxB;AAqBA;;;;;;;;;CASC,GACD,OAAO,SAASuD,6BACdlD,GAAY;IAEZ,IAAI,CAACA,OAAO,OAAOA,QAAQ,YAAYC,MAAMC,OAAO,CAACF,MAAM,OAAO,CAAC;IACnE,MAAMmD,YAAqC,CAAC;IAC5C,KAAK,MAAM,CAACtF,KAAKS,MAAM,IAAIgB,OAAO8D,OAAO,CAACpD,KAAiC;QACzE,IAAI,OAAO1B,UAAU,aAAaD,iBAAiBR,MAAM;YACvDsF,SAAS,CAACtF,IAAI,GAAGS;QACnB;IACF;IACA,OAAO6E;AACT;AAEA;;;;;;;;;CASC,GACD,OAAO,SAASE,sBACdX,OAAuB,EACvBpE,KAAuB,EACvBqE,SAAoC,EACpCQ,SAAqD,EACrD;;;;;;;;;;;;;;;;;;;GAmBC,GACDxD,IAAoB;IAEpB,MAAM2D,WAAWH,6BAAAA,SAAW,CAACT,QAAQ;IACrC,IAAI,OAAOY,aAAa,WAAW,OAAOA;IAC1C,OAAON,gBAAgBN,SAASpE,OAAOqE,WAAWhD;AACpD"}
|
|
@@ -183,7 +183,9 @@ export declare function describeScope(visibleTo: readonly string[] | undefined |
|
|
|
183
183
|
/**
|
|
184
184
|
* The scope a newly created resource starts with (AGL-1048).
|
|
185
185
|
*
|
|
186
|
-
* Honours the org's `defaultResourceScope
|
|
186
|
+
* Honours the org's default — `defaultResourceScope` for a dataset,
|
|
187
|
+
* `defaultMediaScopeOf(org)` for media, passed in the same option — but
|
|
188
|
+
* only when a site is
|
|
187
189
|
* actually in context: created from the org Media or Data page there is no
|
|
188
190
|
* host to scope to, and inventing one would hide the resource from the
|
|
189
191
|
* page that just created it.
|
|
@@ -192,6 +194,19 @@ export declare function defaultScopeForNewResource(options: {
|
|
|
192
194
|
defaultResourceScope?: 'org' | 'host';
|
|
193
195
|
hostId?: string | null;
|
|
194
196
|
}): ScopeToken[];
|
|
197
|
+
/**
|
|
198
|
+
* The org's default sharing for new MEDIA — uploads and folders (AGL-3662).
|
|
199
|
+
*
|
|
200
|
+
* `defaultMediaScope` when the org has set it, otherwise
|
|
201
|
+
* `defaultResourceScope`: until the two were split one field decided both,
|
|
202
|
+
* so an org that chose "only the site they were created in" before the split
|
|
203
|
+
* keeps that choice for media until it sets media on its own. Datasets read
|
|
204
|
+
* `defaultResourceScope` directly.
|
|
205
|
+
*/
|
|
206
|
+
export declare function defaultMediaScopeOf(org: {
|
|
207
|
+
defaultMediaScope?: 'org' | 'host';
|
|
208
|
+
defaultResourceScope?: 'org' | 'host';
|
|
209
|
+
} | null | undefined): 'org' | 'host' | undefined;
|
|
195
210
|
/**
|
|
196
211
|
* The scope fields a document being CREATED in a scoped collection carries
|
|
197
212
|
* (AGL-1478), as a spreadable object.
|
|
@@ -232,7 +232,9 @@ export function isScopeToken(value) {
|
|
|
232
232
|
/**
|
|
233
233
|
* The scope a newly created resource starts with (AGL-1048).
|
|
234
234
|
*
|
|
235
|
-
* Honours the org's `defaultResourceScope
|
|
235
|
+
* Honours the org's default — `defaultResourceScope` for a dataset,
|
|
236
|
+
* `defaultMediaScopeOf(org)` for media, passed in the same option — but
|
|
237
|
+
* only when a site is
|
|
236
238
|
* actually in context: created from the org Media or Data page there is no
|
|
237
239
|
* host to scope to, and inventing one would hide the resource from the
|
|
238
240
|
* page that just created it.
|
|
@@ -243,6 +245,18 @@ export function isScopeToken(value) {
|
|
|
243
245
|
ORG_SCOPE_TOKEN
|
|
244
246
|
];
|
|
245
247
|
}
|
|
248
|
+
/**
|
|
249
|
+
* The org's default sharing for new MEDIA — uploads and folders (AGL-3662).
|
|
250
|
+
*
|
|
251
|
+
* `defaultMediaScope` when the org has set it, otherwise
|
|
252
|
+
* `defaultResourceScope`: until the two were split one field decided both,
|
|
253
|
+
* so an org that chose "only the site they were created in" before the split
|
|
254
|
+
* keeps that choice for media until it sets media on its own. Datasets read
|
|
255
|
+
* `defaultResourceScope` directly.
|
|
256
|
+
*/ export function defaultMediaScopeOf(org) {
|
|
257
|
+
var _ref;
|
|
258
|
+
return (_ref = org == null ? void 0 : org.defaultMediaScope) != null ? _ref : org == null ? void 0 : org.defaultResourceScope;
|
|
259
|
+
}
|
|
246
260
|
/**
|
|
247
261
|
* The scope fields a document being CREATED in a scoped collection carries
|
|
248
262
|
* (AGL-1478), as a spreadable object.
|