@aglyn/aglyn 1.0.0-beta.230 → 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.
Files changed (112) hide show
  1. package/package.json +11 -11
  2. package/src/lib/app-utils/crm.d.ts +14 -1
  3. package/src/lib/app-utils/crm.js +19 -2
  4. package/src/lib/app-utils/crm.js.map +1 -1
  5. package/src/lib/app-utils/docs-help.generated.d.ts +80 -2
  6. package/src/lib/app-utils/docs-help.generated.js +209 -1
  7. package/src/lib/app-utils/docs-help.generated.js.map +1 -1
  8. package/src/lib/app-utils/docs-index.generated.js +517 -20
  9. package/src/lib/app-utils/docs-index.generated.js.map +1 -1
  10. package/src/lib/app-utils/host-status.d.ts +85 -0
  11. package/src/lib/app-utils/host-status.js +115 -0
  12. package/src/lib/app-utils/host-status.js.map +1 -0
  13. package/src/lib/app-utils/lockdown.js +1 -1
  14. package/src/lib/app-utils/lockdown.js.map +1 -1
  15. package/src/lib/app-utils/media-filter.d.ts +136 -0
  16. package/src/lib/app-utils/media-filter.js +400 -0
  17. package/src/lib/app-utils/media-filter.js.map +1 -0
  18. package/src/lib/app-utils/mobile-push.d.ts +98 -0
  19. package/src/lib/app-utils/mobile-push.js +97 -0
  20. package/src/lib/app-utils/mobile-push.js.map +1 -0
  21. package/src/lib/app-utils/notification-push.d.ts +38 -0
  22. package/src/lib/app-utils/notification-push.js +54 -0
  23. package/src/lib/app-utils/notification-push.js.map +1 -0
  24. package/src/lib/app-utils/notifications.d.ts +7 -0
  25. package/src/lib/app-utils/notifications.js.map +1 -1
  26. package/src/lib/app-utils/organizations.js +5 -2
  27. package/src/lib/app-utils/organizations.js.map +1 -1
  28. package/src/lib/app-utils/plugin-host-events.generated.d.ts +1 -1
  29. package/src/lib/app-utils/plugin-host-events.generated.js +149 -0
  30. package/src/lib/app-utils/plugin-host-events.generated.js.map +1 -1
  31. package/src/lib/app-utils/plugin-release-flags.generated.d.ts +1 -1
  32. package/src/lib/app-utils/plugin-release-flags.generated.js +7 -0
  33. package/src/lib/app-utils/plugin-release-flags.generated.js.map +1 -1
  34. package/src/lib/app-utils/realm-host-surface.generated.js +3 -0
  35. package/src/lib/app-utils/realm-host-surface.generated.js.map +1 -1
  36. package/src/lib/app-utils/release-flags.js +6 -2
  37. package/src/lib/app-utils/release-flags.js.map +1 -1
  38. package/src/lib/app-utils/scope-tokens.d.ts +16 -1
  39. package/src/lib/app-utils/scope-tokens.js +15 -1
  40. package/src/lib/app-utils/scope-tokens.js.map +1 -1
  41. package/src/lib/app-utils/site-list-query.d.ts +47 -0
  42. package/src/lib/app-utils/site-list-query.js +142 -0
  43. package/src/lib/app-utils/site-list-query.js.map +1 -0
  44. package/src/lib/app-utils/site-wide-outbox.d.ts +95 -0
  45. package/src/lib/app-utils/site-wide-outbox.js +117 -0
  46. package/src/lib/app-utils/site-wide-outbox.js.map +1 -0
  47. package/src/lib/app-utils/transfer-launcher-context.d.ts +6 -0
  48. package/src/lib/app-utils/transfer-launcher-context.js.map +1 -1
  49. package/src/lib/app-utils/upload-inspection.js +7 -0
  50. package/src/lib/app-utils/upload-inspection.js.map +1 -1
  51. package/src/lib/app-utils/webhook-delivery.js +4 -1
  52. package/src/lib/app-utils/webhook-delivery.js.map +1 -1
  53. package/src/lib/foundation/definitions/org-billing.types.d.ts +8 -0
  54. package/src/lib/foundation/definitions/org-billing.types.js.map +1 -1
  55. package/src/lib/foundation/definitions/organization.types.d.ts +18 -7
  56. package/src/lib/foundation/definitions/organization.types.js.map +1 -1
  57. package/src/lib/foundation/definitions/write-deny-coverage.util.d.ts +4 -1
  58. package/src/lib/foundation/definitions/write-deny-coverage.util.js +12 -2
  59. package/src/lib/foundation/definitions/write-deny-coverage.util.js.map +1 -1
  60. package/src/lib/plugin-manager/enabled-plugins.js +4 -2
  61. package/src/lib/plugin-manager/enabled-plugins.js.map +1 -1
  62. package/src/lib/plugin-manager/feature-plugins.d.ts +88 -0
  63. package/src/lib/plugin-manager/feature-plugins.js +44 -0
  64. package/src/lib/plugin-manager/feature-plugins.js.map +1 -1
  65. package/src/lib/plugin-manager/first-party-plugins.generated.js +222 -2
  66. package/src/lib/plugin-manager/first-party-plugins.generated.js.map +1 -1
  67. package/src/lib/plugin-manager/plugin-checkout-extras.d.ts +168 -0
  68. package/src/lib/plugin-manager/plugin-checkout-extras.js +172 -0
  69. package/src/lib/plugin-manager/plugin-checkout-extras.js.map +1 -0
  70. package/src/lib/plugin-manager/plugin-contributions.d.ts +7 -0
  71. package/src/lib/plugin-manager/plugin-contributions.js +1 -1
  72. package/src/lib/plugin-manager/plugin-contributions.js.map +1 -1
  73. package/src/lib/plugin-manager/plugin-domain-events.d.ts +138 -0
  74. package/src/lib/plugin-manager/plugin-domain-events.js +148 -0
  75. package/src/lib/plugin-manager/plugin-domain-events.js.map +1 -0
  76. package/src/lib/plugin-manager/plugin-events.d.ts +30 -0
  77. package/src/lib/plugin-manager/plugin-events.js +4 -0
  78. package/src/lib/plugin-manager/plugin-events.js.map +1 -1
  79. package/src/lib/plugin-manager/plugin-fulfillment-providers.d.ts +101 -0
  80. package/src/lib/plugin-manager/plugin-fulfillment-providers.js +83 -0
  81. package/src/lib/plugin-manager/plugin-fulfillment-providers.js.map +1 -0
  82. package/src/lib/plugin-manager/plugin-permissions.js +21 -5
  83. package/src/lib/plugin-manager/plugin-permissions.js.map +1 -1
  84. package/src/lib/plugin-manager/plugin-person-records.d.ts +90 -0
  85. package/src/lib/plugin-manager/plugin-person-records.js +26 -0
  86. package/src/lib/plugin-manager/plugin-person-records.js.map +1 -1
  87. package/src/lib/plugin-manager/plugin-product-catalog.d.ts +204 -0
  88. package/src/lib/plugin-manager/plugin-product-catalog.js +43 -0
  89. package/src/lib/plugin-manager/plugin-product-catalog.js.map +1 -0
  90. package/src/lib/plugin-manager/plugin-shipment-records.d.ts +210 -0
  91. package/src/lib/plugin-manager/plugin-shipment-records.js +63 -0
  92. package/src/lib/plugin-manager/plugin-shipment-records.js.map +1 -0
  93. package/src/lib/plugin-manager/plugin-shipping-rates.d.ts +151 -0
  94. package/src/lib/plugin-manager/plugin-shipping-rates.js +62 -0
  95. package/src/lib/plugin-manager/plugin-shipping-rates.js.map +1 -0
  96. package/src/lib/plugin-manager/plugin-sms-messaging.d.ts +103 -0
  97. package/src/lib/plugin-manager/plugin-sms-messaging.js +39 -0
  98. package/src/lib/plugin-manager/plugin-sms-messaging.js.map +1 -0
  99. package/src/lib/plugin-manager/plugin-stock-levels.d.ts +81 -0
  100. package/src/lib/plugin-manager/plugin-stock-levels.js +32 -0
  101. package/src/lib/plugin-manager/plugin-stock-levels.js.map +1 -0
  102. package/src/lib/plugin-manager/plugin-tax-profile.d.ts +154 -0
  103. package/src/lib/plugin-manager/plugin-tax-profile.js +56 -0
  104. package/src/lib/plugin-manager/plugin-tax-profile.js.map +1 -1
  105. package/src/lib/plugin-manager/plugin-theme-font-catalog.d.ts +59 -0
  106. package/src/lib/plugin-manager/plugin-theme-font-catalog.js +40 -0
  107. package/src/lib/plugin-manager/plugin-theme-font-catalog.js.map +1 -0
  108. package/src/lib/plugin-manager/plugin-tracking-pages.d.ts +55 -0
  109. package/src/lib/plugin-manager/plugin-tracking-pages.js +76 -0
  110. package/src/lib/plugin-manager/plugin-tracking-pages.js.map +1 -0
  111. package/src/lib/plugin-manager/realm-host-aglyn.generated.js +3 -0
  112. package/src/lib/plugin-manager/realm-host-aglyn.generated.js.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/aglyn",
3
- "version": "1.0.0-beta.230",
3
+ "version": "1.0.0-beta.231",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -37,16 +37,16 @@
37
37
  "./package.json": "./package.json"
38
38
  },
39
39
  "dependencies": {
40
- "@aglyn/shared-data-enums": "1.0.0-beta.230",
41
- "@aglyn/shared-data-mdi": "1.0.0-beta.230",
42
- "@aglyn/shared-data-types": "1.0.0-beta.230",
43
- "@aglyn/shared-util-email": "1.0.0-beta.230",
44
- "@aglyn/shared-util-first-touch": "1.0.0-beta.230",
45
- "@aglyn/shared-util-http": "1.0.0-beta.230",
46
- "@aglyn/shared-util-logger": "1.0.0-beta.230",
47
- "@aglyn/shared-util-timestamp": "1.0.0-beta.230",
48
- "@aglyn/shared-util-tools": "1.0.0-beta.230",
49
- "@aglyn/shared-util-vendor": "1.0.0-beta.230",
40
+ "@aglyn/shared-data-enums": "1.0.0-beta.231",
41
+ "@aglyn/shared-data-mdi": "1.0.0-beta.231",
42
+ "@aglyn/shared-data-types": "1.0.0-beta.231",
43
+ "@aglyn/shared-util-email": "1.0.0-beta.231",
44
+ "@aglyn/shared-util-first-touch": "1.0.0-beta.231",
45
+ "@aglyn/shared-util-http": "1.0.0-beta.231",
46
+ "@aglyn/shared-util-logger": "1.0.0-beta.231",
47
+ "@aglyn/shared-util-timestamp": "1.0.0-beta.231",
48
+ "@aglyn/shared-util-tools": "1.0.0-beta.231",
49
+ "@aglyn/shared-util-vendor": "1.0.0-beta.231",
50
50
  "@data-driven-forms/react-form-renderer": "^4.2.0",
51
51
  "@msgpack/msgpack": "^3.1.3",
52
52
  "@types/unist": "^3.0.3",
@@ -1404,6 +1404,19 @@ export declare function planContactCompanyLink(state: ContactCompanyLinkState, c
1404
1404
  export declare const ORG_CRM_SETTINGS_FIELD = "crm";
1405
1405
  /** The dotted path an `update()` writes the auto-create switch by. */
1406
1406
  export declare const CRM_AUTO_CREATE_COMPANIES_PATH = "crm.autoCreateCompanies";
1407
+ /** Where the CRM's default sharing for new records is stored (AGL-3662). */
1408
+ export declare const CRM_DEFAULT_RECORD_SCOPE_PATH = "crm.defaultRecordScope";
1409
+ /**
1410
+ * The org's default sharing for new CRM records (AGL-3662): `'org'` shares a
1411
+ * new contact, company, deal or task with every site, `'host'` keeps it to
1412
+ * the site it came in on and the sites that present as one sender with it.
1413
+ *
1414
+ * `crm.defaultRecordScope` when the org has set it. Before AGL-3662 the CRM
1415
+ * read the org's dataset default, `defaultResourceScope`, so an org that set
1416
+ * that to All sites keeps CRM records org-wide until it chooses separately.
1417
+ * Neither set reads `undefined`, which every caller treats as `'host'`.
1418
+ */
1419
+ export declare function crmDefaultScopeOf(orgDocument: Record<string, unknown> | null | undefined): 'org' | 'host' | undefined;
1407
1420
  /**
1408
1421
  * Whether a capture from a work email domain no visible company carries
1409
1422
  * should CREATE the company. Off unless the org document says `true`: a
@@ -1538,7 +1551,7 @@ export declare function newAssignmentRuleId(existing: readonly string[]): string
1538
1551
  * The contact create path's own expression (`upsertHostContact`), lifted
1539
1552
  * here so that a company, a deal or a task created from a site's console
1540
1553
  * lands in exactly the scope a contact captured on that site would: the
1541
- * whole org when the org has chosen `defaultResourceScope: 'org'`, and
1554
+ * whole org when the org's CRM default (`crmDefaultScopeOf`) is `'org'`, and
1542
1555
  * otherwise the sites that present as one sender — which, undeclared, is
1543
1556
  * this site alone. That is the agency's isolation, arrived at with nothing
1544
1557
  * configured, and the reason this is a function rather than a convention
@@ -1585,6 +1585,23 @@ const blank = (value)=>value === null || typeof value === 'string' && value.trim
1585
1585
  * client-writable in `ORG_CLIENT_WRITABLE_FIELDS` with its reason.
1586
1586
  *=========================================*/ /** The org-document key the CRM's settings live under. */ export const ORG_CRM_SETTINGS_FIELD = 'crm';
1587
1587
  /** The dotted path an `update()` writes the auto-create switch by. */ export const CRM_AUTO_CREATE_COMPANIES_PATH = `${ORG_CRM_SETTINGS_FIELD}.autoCreateCompanies`;
1588
+ /** Where the CRM's default sharing for new records is stored (AGL-3662). */ export const CRM_DEFAULT_RECORD_SCOPE_PATH = `${ORG_CRM_SETTINGS_FIELD}.defaultRecordScope`;
1589
+ /**
1590
+ * The org's default sharing for new CRM records (AGL-3662): `'org'` shares a
1591
+ * new contact, company, deal or task with every site, `'host'` keeps it to
1592
+ * the site it came in on and the sites that present as one sender with it.
1593
+ *
1594
+ * `crm.defaultRecordScope` when the org has set it. Before AGL-3662 the CRM
1595
+ * read the org's dataset default, `defaultResourceScope`, so an org that set
1596
+ * that to All sites keeps CRM records org-wide until it chooses separately.
1597
+ * Neither set reads `undefined`, which every caller treats as `'host'`.
1598
+ */ export function crmDefaultScopeOf(orgDocument) {
1599
+ const settings = (orgDocument != null ? orgDocument : {})[ORG_CRM_SETTINGS_FIELD];
1600
+ const own = settings && typeof settings === 'object' && !Array.isArray(settings) ? settings['defaultRecordScope'] : undefined;
1601
+ if (own === 'org' || own === 'host') return own;
1602
+ const legacy = (orgDocument != null ? orgDocument : {})['defaultResourceScope'];
1603
+ return legacy === 'org' || legacy === 'host' ? legacy : undefined;
1604
+ }
1588
1605
  /**
1589
1606
  * Whether a capture from a work email domain no visible company carries
1590
1607
  * should CREATE the company. Off unless the org document says `true`: a
@@ -1815,7 +1832,7 @@ export function readCrmAssignmentSettings(orgDocument) {
1815
1832
  * The contact create path's own expression (`upsertHostContact`), lifted
1816
1833
  * here so that a company, a deal or a task created from a site's console
1817
1834
  * lands in exactly the scope a contact captured on that site would: the
1818
- * whole org when the org has chosen `defaultResourceScope: 'org'`, and
1835
+ * whole org when the org's CRM default (`crmDefaultScopeOf`) is `'org'`, and
1819
1836
  * otherwise the sites that present as one sender — which, undeclared, is
1820
1837
  * this site alone. That is the agency's isolation, arrived at with nothing
1821
1838
  * configured, and the reason this is a function rather than a convention
@@ -1826,7 +1843,7 @@ export function readCrmAssignmentSettings(orgDocument) {
1826
1843
  * a record outside their own tokens, so a creator that bypassed this could
1827
1844
  * only make its record invisible to itself, never wider.
1828
1845
  */ export function crmScopeTokens(org, group) {
1829
- return (org != null ? org : {})['defaultResourceScope'] === 'org' ? [
1846
+ return crmDefaultScopeOf(org) === 'org' ? [
1830
1847
  ORG_SCOPE_TOKEN
1831
1848
  ] : consentGroupScope(group);
1832
1849
  }