@wildo-ai/saas-specifications 1.1.14 → 1.1.16

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 (119) hide show
  1. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +2 -2
  2. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
  3. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +13 -8
  4. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
  5. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
  6. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +13 -7
  7. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
  8. package/dist/esm/_core/integration-plan/integration-execution-surface-refs.schemas.d.ts +32 -0
  9. package/dist/esm/_core/integration-plan/integration-execution-surface-refs.schemas.d.ts.map +1 -0
  10. package/dist/esm/_core/integration-plan/integration-execution-surface-refs.schemas.js +47 -0
  11. package/dist/esm/_core/integration-plan/integration-execution-surface-refs.schemas.js.map +1 -0
  12. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts +7 -0
  13. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.d.ts.map +1 -1
  14. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js +4 -1
  15. package/dist/esm/_core/integration-plan/integration-plan-generation.schemas.js.map +1 -1
  16. package/dist/esm/_core/integration-plan/integration-plan-validation.d.ts +114 -1
  17. package/dist/esm/_core/integration-plan/integration-plan-validation.d.ts.map +1 -1
  18. package/dist/esm/_core/integration-plan/integration-plan-validation.js +176 -0
  19. package/dist/esm/_core/integration-plan/integration-plan-validation.js.map +1 -1
  20. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -1
  21. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +17 -1
  22. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -1
  23. package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts +43 -5
  24. package/dist/esm/_core/integration-plan/integration-plan.schemas.d.ts.map +1 -1
  25. package/dist/esm/_core/integration-plan/integration-plan.schemas.js +75 -7
  26. package/dist/esm/_core/integration-plan/integration-plan.schemas.js.map +1 -1
  27. package/dist/esm/_core/provider-specification.schemas.d.ts +16 -1
  28. package/dist/esm/_core/provider-specification.schemas.d.ts.map +1 -1
  29. package/dist/esm/_core/provider-specification.schemas.js +21 -0
  30. package/dist/esm/_core/provider-specification.schemas.js.map +1 -1
  31. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +5 -4
  32. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  33. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +5 -4
  34. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  35. package/dist/esm/application-creation.exports.d.ts +1 -0
  36. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  37. package/dist/esm/application-creation.exports.js +1 -0
  38. package/dist/esm/application-creation.exports.js.map +1 -1
  39. package/dist/esm/assurance/assurance-authority-basis.definitions.d.ts +1 -1
  40. package/dist/esm/assurance/assurance-authority-basis.definitions.js +1 -1
  41. package/dist/esm/assurance/assurance-authority-basis.definitions.js.map +1 -1
  42. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.d.ts.map +1 -1
  43. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js +18 -8
  44. package/dist/esm/assurance/assurance-evidence-requirement-bodies.definitions.js.map +1 -1
  45. package/dist/esm/assurance/assurance-objective-catalog.definitions.d.ts.map +1 -1
  46. package/dist/esm/assurance/assurance-objective-catalog.definitions.js +9 -2
  47. package/dist/esm/assurance/assurance-objective-catalog.definitions.js.map +1 -1
  48. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.d.ts.map +1 -1
  49. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js +8 -4
  50. package/dist/esm/assurance/assurance-verification-requirement-bodies.definitions.js.map +1 -1
  51. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.d.ts +2 -2
  52. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.d.ts.map +1 -1
  53. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.js +29 -6
  54. package/dist/esm/engine/compliance/resources/signature-requests.resource.specification.js.map +1 -1
  55. package/dist/esm/engine/engine-resource-specifications.registry.d.ts.map +1 -1
  56. package/dist/esm/engine/engine-resource-specifications.registry.js +4 -0
  57. package/dist/esm/engine/engine-resource-specifications.registry.js.map +1 -1
  58. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.d.ts.map +1 -1
  59. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.js +4 -1
  60. package/dist/esm/engine/flows-actors/resources/actor-system-executions.resource.specification.js.map +1 -1
  61. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.d.ts.map +1 -1
  62. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.js +3 -0
  63. package/dist/esm/engine/flows-actors/resources/actor-tasks.resource.specification.js.map +1 -1
  64. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js +3 -3
  65. package/dist/esm/engine/flows-actors/resources/flow-actor-tasks.resource.specification.js.map +1 -1
  66. package/dist/esm/engine/flows-actors/resources/organization-chat-settings.resource.specification.js +1 -1
  67. package/dist/esm/engine/flows-actors/resources/organization-chat-settings.resource.specification.js.map +1 -1
  68. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.d.ts +3 -0
  69. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.d.ts.map +1 -0
  70. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.js +98 -0
  71. package/dist/esm/engine/flows-actors/resources/remote-agent-task-updates.resource.specification.js.map +1 -0
  72. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.d.ts +3 -0
  73. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.d.ts.map +1 -0
  74. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.js +132 -0
  75. package/dist/esm/engine/flows-actors/resources/remote-agent-tasks.resource.specification.js.map +1 -0
  76. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.d.ts +5 -0
  77. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.d.ts.map +1 -0
  78. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.js +79 -0
  79. package/dist/esm/engine/frontend-components/app/app-layout-agent-activity-settings.frontend-component.specification.js.map +1 -0
  80. package/dist/esm/engine/frontend-components/index.d.ts +1 -0
  81. package/dist/esm/engine/frontend-components/index.d.ts.map +1 -1
  82. package/dist/esm/engine/frontend-components/index.js +3 -0
  83. package/dist/esm/engine/frontend-components/index.js.map +1 -1
  84. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js +2 -2
  85. package/dist/esm/engine/infrastructure/resources/external-data-pipeline-states.resource.specification.js.map +1 -1
  86. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.d.ts +8 -0
  87. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.d.ts.map +1 -0
  88. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.js +65 -0
  89. package/dist/esm/engine/notifications/system-emails/delegated-work.system-emails.specification.js.map +1 -0
  90. package/dist/esm/engine/notifications/system-emails/index.d.ts +1 -0
  91. package/dist/esm/engine/notifications/system-emails/index.d.ts.map +1 -1
  92. package/dist/esm/engine/notifications/system-emails/index.js +3 -1
  93. package/dist/esm/engine/notifications/system-emails/index.js.map +1 -1
  94. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js +1 -1
  95. package/dist/esm/engine/organizations/resources/organization-units.resource.specification.js.map +1 -1
  96. package/dist/esm/engine/providers/_engine-provider-shared.d.ts +5 -0
  97. package/dist/esm/engine/providers/_engine-provider-shared.d.ts.map +1 -1
  98. package/dist/esm/engine/providers/_engine-provider-shared.js +5 -0
  99. package/dist/esm/engine/providers/_engine-provider-shared.js.map +1 -1
  100. package/dist/esm/engine/providers/dropbox.provider.specification.d.ts +14 -0
  101. package/dist/esm/engine/providers/dropbox.provider.specification.d.ts.map +1 -0
  102. package/dist/esm/engine/providers/dropbox.provider.specification.js +76 -0
  103. package/dist/esm/engine/providers/dropbox.provider.specification.js.map +1 -0
  104. package/dist/esm/engine/providers/index.d.ts +3 -1
  105. package/dist/esm/engine/providers/index.d.ts.map +1 -1
  106. package/dist/esm/engine/providers/index.js +5 -2
  107. package/dist/esm/engine/providers/index.js.map +1 -1
  108. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts +1 -0
  109. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.d.ts.map +1 -1
  110. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js +2 -0
  111. package/dist/esm/engine/users/resources/user-preferences-api-reference.examples.js.map +1 -1
  112. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts +1 -0
  113. package/dist/esm/engine/users/resources/user-preferences.resource.specification.d.ts.map +1 -1
  114. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts +1 -0
  115. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.d.ts.map +1 -1
  116. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js +1 -1
  117. package/dist/esm/engine/users/resources/user-self-preferences.resource.specification.js.map +1 -1
  118. package/dist/tsconfig.build.tsbuildinfo +1 -1
  119. package/package.json +8 -8
@@ -0,0 +1,76 @@
1
+ import { CodeDeclarationKind, CodeSymbolKind } from '@wildo-ai/zod-decorators';
2
+ import { ProviderComplianceFact, ProviderDeploymentModel, ProviderOriginKind, ProviderProcessingRegionReachKind, ProviderTier } from '@wildo-ai/saas-models';
3
+ import { providerSpecificationFromDefinition } from '../../_core/index.js';
4
+ import { ENGINE_FRONTEND_PROVIDERS_PACKAGE, ENGINE_PROVIDER_OWNER_REF } from './_engine-provider-shared.js';
5
+ /** The places Dropbox stores a team's files, in Dropbox's own words (#2294), as the frontend module declares them. */
6
+ const DROPBOX_PROCESSING_REGIONS = ['United States', 'Australia', 'European Union', 'Japan', 'United Kingdom'];
7
+ /**
8
+ * Engine provider specification for `dropbox` (#3995 item 5): the frontend-only Dropbox Chooser, and the first engine
9
+ * provider specification with no backend facet. The FACTS mirror the application-tier frontend module
10
+ * (`DropboxFrontendAppProvider`), and the CLI's provider-specification reconciliation (#328) reads them back from it.
11
+ *
12
+ * Without this specification the `provider_registry` brief (#3992) could not list it, so a planner wanting a Dropbox
13
+ * picker saw nothing and could record it as a need no provider fills, which is a fork of a provider the engine ships.
14
+ *
15
+ * Attach-only, by the module's own decision (2026-09-18): the Chooser hands the browser a credential-free direct link,
16
+ * the framework ingests the file into the field's storage, and nothing is stored in Dropbox. The module declares no
17
+ * secret: the Chooser's app key is public configuration (`publicConfigSchema.appKey`).
18
+ */
19
+ export const dropboxProviderSpecification = providerSpecificationFromDefinition({ ref: 'dropbox' }, () => ({
20
+ purpose: 'Let a person pick a file from their Dropbox in a file field, through the Dropbox Chooser, and attach it to the record.',
21
+ businessRole: 'MAIN frontend picker behind the engine\'s file fields: the Chooser returns a direct link the browser can read for four hours, and the framework copies the file into the field\'s own storage. Files are attached, never kept in Dropbox.',
22
+ useWhen: 'Use when people keep the documents they attach in Dropbox and should pick them from there rather than download and upload them.',
23
+ avoidWhen: 'Avoid when the application must keep files in the person\'s cloud storage or read them back later through their grant: that governed path is `google-drive`. Dropbox here only attaches a copy.',
24
+ businessConstraints: [
25
+ 'The application registers its own Dropbox app and supplies its app key as public frontend configuration; there is no secret to store.',
26
+ 'Dropbox serves the file the person picks; the copy the framework ingests is the application\'s from then on.',
27
+ ],
28
+ packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE,
29
+ tier: ProviderTier.MAIN,
30
+ vendor: 'dropbox',
31
+ origin: { kind: ProviderOriginKind.ENGINE },
32
+ facets: ['frontend-app'],
33
+ protocols: ['FRONTEND_SDK'],
34
+ providerCapabilities: ['FRONTEND_FILE_PICKER'],
35
+ // A browser file picker binds no engine slot (`engineSlotsBoundByCapabilities`): the file field is the engine's own.
36
+ engineCapabilities: [],
37
+ complianceProfile: {
38
+ deploymentModels: [ProviderDeploymentModel.VENDOR_HOSTED],
39
+ processingRegions: DROPBOX_PROCESSING_REGIONS,
40
+ // Restated from the module (#3513): every region is ACCOUNT RESIDENCY, attested; no call selects it.
41
+ processingRegionReach: Object.fromEntries(DROPBOX_PROCESSING_REGIONS.map((region) => [region, { kind: ProviderProcessingRegionReachKind.ACCOUNT_RESIDENCY }])),
42
+ vendorLegalEntityName: 'Dropbox, Inc.',
43
+ storageRegionTerritories: {
44
+ 'United States': ['us'], Australia: ['au', 'us'], 'European Union': ['eu', 'us'], Japan: ['jp', 'us'], 'United Kingdom': ['gb', 'us'],
45
+ },
46
+ storageRegionConditions: Object.fromEntries(['Australia', 'European Union', 'Japan', 'United Kingdom'].map((region) => [
47
+ region,
48
+ 'Holds only for an eligible team whose request for this storage location Dropbox has approved.',
49
+ ])),
50
+ evidence: [
51
+ { facts: [ProviderComplianceFact.STORAGE_REGION_TERRITORIES], source: 'https://help.dropbox.com/security/physical-location-data-storage', verifiedAt: '2026-11-16' },
52
+ { facts: [ProviderComplianceFact.PROCESSING_REGIONS, ProviderComplianceFact.PROCESSING_REGION_REACH], source: 'https://help.dropbox.com/security/physical-location-data-storage', verifiedAt: '2026-11-10' },
53
+ ],
54
+ },
55
+ secretsContract: [],
56
+ codeHandling: {
57
+ definitionOwner: ENGINE_PROVIDER_OWNER_REF,
58
+ /*
59
+ * The module is reached through the application-tier registry, which `@wildo-ai/external-connectors-public/app`
60
+ * exports; the module's own const is not a public export, so the locator names the registry entry instead.
61
+ */
62
+ definitionCollectionEntry: {
63
+ collectionSymbol: {
64
+ packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE,
65
+ // The package has no root export: the application-tier registry is on its `./app` subpath.
66
+ importPath: 'app',
67
+ exportName: 'EngineFrontendAppProviderRegistry',
68
+ symbolKind: CodeSymbolKind.CONFIG,
69
+ declarationKind: CodeDeclarationKind.CONST_OBJECT,
70
+ },
71
+ identifierField: 'metadata.ref',
72
+ identifierValue: 'dropbox',
73
+ },
74
+ },
75
+ }));
76
+ //# sourceMappingURL=dropbox.provider.specification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropbox.provider.specification.js","sourceRoot":"","sources":["../../../../src/engine/providers/dropbox.provider.specification.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/E,OAAO,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,iCAAiC,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAC7J,OAAO,EAAE,mCAAmC,EAAE,MAAM,6BAA6B,CAAC;AAClF,OAAO,EAAE,iCAAiC,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AAEzG,sHAAsH;AACtH,MAAM,0BAA0B,GAAG,CAAC,eAAe,EAAE,WAAW,EAAE,gBAAgB,EAAE,OAAO,EAAE,gBAAgB,CAAC,CAAC;AAE/G;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,mCAAmC,CAC7E,EAAE,GAAG,EAAE,SAAS,EAAE,EAClB,GAAG,EAAE,CAAC,CAAC;IACL,OAAO,EAAE,wHAAwH;IACjI,YAAY,EAAE,2OAA2O;IACzP,OAAO,EAAE,iIAAiI;IAC1I,SAAS,EAAE,iMAAiM;IAC5M,mBAAmB,EAAE;QACnB,uIAAuI;QACvI,8GAA8G;KAC/G;IACD,WAAW,EAAE,iCAAiC;IAC9C,IAAI,EAAE,YAAY,CAAC,IAAI;IACvB,MAAM,EAAE,SAAS;IACjB,MAAM,EAAE,EAAE,IAAI,EAAE,kBAAkB,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AE;SAC7M;KACF;IACD,eAAe,EAAE,EAAE;IACnB,YAAY,EAAE;QACZ,eAAe,EAAE,yBAAyB;QAC1C;;;WAGG;QACH,yBAAyB,EAAE;YACzB,gBAAgB,EAAE;gBAChB,WAAW,EAAE,iCAAiC;gBAC9C,2FAA2F;gBAC3F,UAAU,EAAE,KAAK;gBACjB,UAAU,EAAE,mCAAmC;gBAC/C,UAAU,EAAE,cAAc,CAAC,MAAM;gBACjC,eAAe,EAAE,mBAAmB,CAAC,YAAY;aAClD;YACD,eAAe,EAAE,cAAc;YAC/B,eAAe,EAAE,SAAS;SAC3B;KACF;CACF,CAAC,CACH,CAAC","sourcesContent":["import { CodeDeclarationKind, CodeSymbolKind } from '@wildo-ai/zod-decorators';\nimport { ProviderComplianceFact, ProviderDeploymentModel, ProviderOriginKind, ProviderProcessingRegionReachKind, ProviderTier } from '@wildo-ai/saas-models';\nimport { providerSpecificationFromDefinition } from '~wildo-specifications/_core';\nimport { ENGINE_FRONTEND_PROVIDERS_PACKAGE, ENGINE_PROVIDER_OWNER_REF } from './_engine-provider-shared';\n\n/** The places Dropbox stores a team's files, in Dropbox's own words (#2294), as the frontend module declares them. */\nconst DROPBOX_PROCESSING_REGIONS = ['United States', 'Australia', 'European Union', 'Japan', 'United Kingdom'];\n\n/**\n * Engine provider specification for `dropbox` (#3995 item 5): the frontend-only Dropbox Chooser, and the first engine\n * provider specification with no backend facet. The FACTS mirror the application-tier frontend module\n * (`DropboxFrontendAppProvider`), and the CLI's provider-specification reconciliation (#328) reads them back from it.\n *\n * Without this specification the `provider_registry` brief (#3992) could not list it, so a planner wanting a Dropbox\n * picker saw nothing and could record it as a need no provider fills, which is a fork of a provider the engine ships.\n *\n * Attach-only, by the module's own decision (2026-09-18): the Chooser hands the browser a credential-free direct link,\n * the framework ingests the file into the field's storage, and nothing is stored in Dropbox. The module declares no\n * secret: the Chooser's app key is public configuration (`publicConfigSchema.appKey`).\n */\nexport const dropboxProviderSpecification = providerSpecificationFromDefinition(\n { ref: 'dropbox' },\n () => ({\n purpose: 'Let a person pick a file from their Dropbox in a file field, through the Dropbox Chooser, and attach it to the record.',\n businessRole: 'MAIN frontend picker behind the engine\\'s file fields: the Chooser returns a direct link the browser can read for four hours, and the framework copies the file into the field\\'s own storage. Files are attached, never kept in Dropbox.',\n useWhen: 'Use when people keep the documents they attach in Dropbox and should pick them from there rather than download and upload them.',\n avoidWhen: 'Avoid when the application must keep files in the person\\'s cloud storage or read them back later through their grant: that governed path is `google-drive`. Dropbox here only attaches a copy.',\n businessConstraints: [\n 'The application registers its own Dropbox app and supplies its app key as public frontend configuration; there is no secret to store.',\n 'Dropbox serves the file the person picks; the copy the framework ingests is the application\\'s from then on.',\n ],\n packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE,\n tier: ProviderTier.MAIN,\n vendor: 'dropbox',\n origin: { kind: ProviderOriginKind.ENGINE },\n facets: ['frontend-app'],\n protocols: ['FRONTEND_SDK'],\n providerCapabilities: ['FRONTEND_FILE_PICKER'],\n // A browser file picker binds no engine slot (`engineSlotsBoundByCapabilities`): the file field is the engine's own.\n engineCapabilities: [],\n complianceProfile: {\n deploymentModels: [ProviderDeploymentModel.VENDOR_HOSTED],\n processingRegions: DROPBOX_PROCESSING_REGIONS,\n // Restated from the module (#3513): every region is ACCOUNT RESIDENCY, attested; no call selects it.\n processingRegionReach: Object.fromEntries(DROPBOX_PROCESSING_REGIONS.map((region) => [region, { kind: ProviderProcessingRegionReachKind.ACCOUNT_RESIDENCY }])),\n vendorLegalEntityName: 'Dropbox, Inc.',\n storageRegionTerritories: {\n 'United States': ['us'], Australia: ['au', 'us'], 'European Union': ['eu', 'us'], Japan: ['jp', 'us'], 'United Kingdom': ['gb', 'us'],\n },\n storageRegionConditions: Object.fromEntries(['Australia', 'European Union', 'Japan', 'United Kingdom'].map((region) => [\n region,\n 'Holds only for an eligible team whose request for this storage location Dropbox has approved.',\n ])),\n evidence: [\n { facts: [ProviderComplianceFact.STORAGE_REGION_TERRITORIES], source: 'https://help.dropbox.com/security/physical-location-data-storage', verifiedAt: '2026-11-16' },\n { facts: [ProviderComplianceFact.PROCESSING_REGIONS, ProviderComplianceFact.PROCESSING_REGION_REACH], source: 'https://help.dropbox.com/security/physical-location-data-storage', verifiedAt: '2026-11-10' },\n ],\n },\n secretsContract: [],\n codeHandling: {\n definitionOwner: ENGINE_PROVIDER_OWNER_REF,\n /*\n * The module is reached through the application-tier registry, which `@wildo-ai/external-connectors-public/app`\n * exports; the module's own const is not a public export, so the locator names the registry entry instead.\n */\n definitionCollectionEntry: {\n collectionSymbol: {\n packageName: ENGINE_FRONTEND_PROVIDERS_PACKAGE,\n // The package has no root export: the application-tier registry is on its `./app` subpath.\n importPath: 'app',\n exportName: 'EngineFrontendAppProviderRegistry',\n symbolKind: CodeSymbolKind.CONFIG,\n declarationKind: CodeDeclarationKind.CONST_OBJECT,\n },\n identifierField: 'metadata.ref',\n identifierValue: 'dropbox',\n },\n },\n }),\n);\n"]}
@@ -17,9 +17,11 @@ export * from './recaptcha.provider.specification';
17
17
  export * from './google-places.provider.specification';
18
18
  export * from './google-drive.provider.specification';
19
19
  export * from './microsoft-onedrive.provider.specification';
20
+ export * from './dropbox.provider.specification';
20
21
  export * from './_engine-provider-shared';
21
22
  /**
22
- * Engine-shipped {@link ProviderSpecification} map — the MAIN tier of the D10 table (#328).
23
+ * Engine-shipped {@link ProviderSpecification} map — the MAIN tier of the D10 table (#328): every MAIN backend module, and
24
+ * every MAIN browser module with no backend facet (`dropbox`, #3995 item 5).
23
25
  * EXTENSION and CATALOGUE engine providers are described when they are extracted into their
24
26
  * own packages (#339); a generated package ships its own entry (S7).
25
27
  */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/engine/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,qBAAqB,EAAE,MAAM,6BAA6B,CAAC;AAoBxG,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC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4B,EAAE,qBAoB1C,CAAC"}
@@ -17,6 +17,7 @@ import { recaptchaProviderSpecification } from './recaptcha.provider.specificati
17
17
  import { googlePlacesProviderSpecification } from './google-places.provider.specification.js';
18
18
  import { googleDriveProviderSpecification } from './google-drive.provider.specification.js';
19
19
  import { microsoftOneDriveProviderSpecification } from './microsoft-onedrive.provider.specification.js';
20
+ import { dropboxProviderSpecification } from './dropbox.provider.specification.js';
20
21
  export * from './resend.provider.specification.js';
21
22
  export * from './email-preview.provider.specification.js';
22
23
  export * from './stripe.provider.specification.js';
@@ -35,11 +36,13 @@ export * from './recaptcha.provider.specification.js';
35
36
  export * from './google-places.provider.specification.js';
36
37
  export * from './google-drive.provider.specification.js';
37
38
  export * from './microsoft-onedrive.provider.specification.js';
39
+ export * from './dropbox.provider.specification.js';
38
40
  export * from './_engine-provider-shared.js';
39
41
  /**
40
- * Engine-shipped {@link ProviderSpecification} map — the MAIN tier of the D10 table (#328).
42
+ * Engine-shipped {@link ProviderSpecification} map — the MAIN tier of the D10 table (#328): every MAIN backend module, and
43
+ * every MAIN browser module with no backend facet (`dropbox`, #3995 item 5).
41
44
  * EXTENSION and CATALOGUE engine providers are described when they are extracted into their
42
45
  * own packages (#339); a generated package ships its own entry (S7).
43
46
  */
44
- export const engineProviderSpecifications = buildProviderSpecificationMap(resendProviderSpecification, emailPreviewProviderSpecification, stripeProviderSpecification, twilioProviderSpecification, anthropicProviderSpecification, openaiProviderSpecification, opencodeProviderSpecification, googleProviderSpecification, mistralProviderSpecification, grokProviderSpecification, perplexityProviderSpecification, appleProviderSpecification, githubProviderSpecification, microsoftProviderSpecification, recaptchaProviderSpecification, googlePlacesProviderSpecification, googleDriveProviderSpecification, microsoftOneDriveProviderSpecification);
47
+ export const engineProviderSpecifications = buildProviderSpecificationMap(resendProviderSpecification, emailPreviewProviderSpecification, stripeProviderSpecification, twilioProviderSpecification, anthropicProviderSpecification, openaiProviderSpecification, opencodeProviderSpecification, googleProviderSpecification, mistralProviderSpecification, grokProviderSpecification, perplexityProviderSpecification, appleProviderSpecification, githubProviderSpecification, microsoftProviderSpecification, recaptchaProviderSpecification, googlePlacesProviderSpecification, googleDriveProviderSpecification, microsoftOneDriveProviderSpecification, dropboxProviderSpecification);
45
48
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/engine/providers/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAA8B,MAAM,6BAA6B,CAAC;AACxG,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,+BAA+B,EAAE,MAAM,qCAAqC,CAAC;AACtF,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,8BAA8B,EAAE,MAAM,oCAAoC,CAAC;AACpF,OAAO,EAAE,iCAAiC,EAAE,MAAM,wCAAwC,CAAC;AAC3F,OAAO,EAAE,gCAAgC,EAAE,MAAM,uCAAuC,CAAC;AACzF,OAAO,EAAE,sCAAsC,EAAE,MAAM,6CAA6C,CAAC;AAErG,cAAc,iCAAiC,CAAC;AAChD,cAAc,wCAAwC,CAAC;AACvD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,2BAA2B,CAAC;AAE1C;;;;GAIG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAA0B,6BAA6B,CAC9F,2BAA2B,EAC3B,iCAAiC,EACjC,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,EAC/B,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,gCAAgC,EAChC,sCAAsC,CACvC,CAAC","sourcesContent":["import { buildProviderSpecificationMap, type ProviderSpecification } from '~wildo-specifications/_core';\nimport { resendProviderSpecification } from './resend.provider.specification';\nimport { emailPreviewProviderSpecification } from './email-preview.provider.specification';\nimport { stripeProviderSpecification } from './stripe.provider.specification';\nimport { twilioProviderSpecification } from './twilio.provider.specification';\nimport { anthropicProviderSpecification } from './anthropic.provider.specification';\nimport { openaiProviderSpecification } from './openai.provider.specification';\nimport { opencodeProviderSpecification } from './opencode.provider.specification';\nimport { googleProviderSpecification } from './google.provider.specification';\nimport { mistralProviderSpecification } from './mistral.provider.specification';\nimport { grokProviderSpecification } from './grok.provider.specification';\nimport { perplexityProviderSpecification } from './perplexity.provider.specification';\nimport { appleProviderSpecification } from './apple.provider.specification';\nimport { githubProviderSpecification } from './github.provider.specification';\nimport { microsoftProviderSpecification } from './microsoft.provider.specification';\nimport { recaptchaProviderSpecification } from './recaptcha.provider.specification';\nimport { googlePlacesProviderSpecification } from './google-places.provider.specification';\nimport { googleDriveProviderSpecification } from './google-drive.provider.specification';\nimport { microsoftOneDriveProviderSpecification } from './microsoft-onedrive.provider.specification';\n\nexport * from './resend.provider.specification';\nexport * from './email-preview.provider.specification';\nexport * from './stripe.provider.specification';\nexport * from './twilio.provider.specification';\nexport * from './anthropic.provider.specification';\nexport * from './openai.provider.specification';\nexport * from './opencode.provider.specification';\nexport * from './google.provider.specification';\nexport * from './mistral.provider.specification';\nexport * from './grok.provider.specification';\nexport * from './perplexity.provider.specification';\nexport * from './apple.provider.specification';\nexport * from './github.provider.specification';\nexport * from './microsoft.provider.specification';\nexport * from './recaptcha.provider.specification';\nexport * from './google-places.provider.specification';\nexport * from './google-drive.provider.specification';\nexport * from './microsoft-onedrive.provider.specification';\nexport * from './_engine-provider-shared';\n\n/**\n * Engine-shipped {@link ProviderSpecification} map — the MAIN tier of the D10 table (#328).\n * EXTENSION and CATALOGUE engine providers are described when they are extracted into their\n * own packages (#339); a generated package ships its own entry (S7).\n */\nexport const engineProviderSpecifications: ProviderSpecification = buildProviderSpecificationMap(\n resendProviderSpecification,\n emailPreviewProviderSpecification,\n stripeProviderSpecification,\n twilioProviderSpecification,\n anthropicProviderSpecification,\n openaiProviderSpecification,\n opencodeProviderSpecification,\n googleProviderSpecification,\n mistralProviderSpecification,\n grokProviderSpecification,\n perplexityProviderSpecification,\n appleProviderSpecification,\n githubProviderSpecification,\n microsoftProviderSpecification,\n recaptchaProviderSpecification,\n googlePlacesProviderSpecification,\n googleDriveProviderSpecification,\n microsoftOneDriveProviderSpecification,\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C;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,iCAAiC,CAAC;AAChD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qCAAqC,CAAC;AACpD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,iCAAiC,CAAC;AAChD,cAAc,oCAAoC,CAAC;AACnD,cAAc,oCAAoC,CAAC;AACnD,cAAc,wCAAwC,CAAC;AACvD,cAAc,uCAAuC,CAAC;AACtD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,kCAAkC,CAAC;AACjD,cAAc,2BAA2B,CAAC;AAE1C;;;;;GAKG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAA0B,6BAA6B,CAC9F,2BAA2B,EAC3B,iCAAiC,EACjC,2BAA2B,EAC3B,2BAA2B,EAC3B,8BAA8B,EAC9B,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACzB,+BAA+B,EAC/B,0BAA0B,EAC1B,2BAA2B,EAC3B,8BAA8B,EAC9B,8BAA8B,EAC9B,iCAAiC,EACjC,gCAAgC,EAChC,sCAAsC,EACtC,4BAA4B,CAC7B,CAAC","sourcesContent":["import { buildProviderSpecificationMap, type ProviderSpecification } from '~wildo-specifications/_core';\nimport { resendProviderSpecification } from './resend.provider.specification';\nimport { emailPreviewProviderSpecification } from './email-preview.provider.specification';\nimport { stripeProviderSpecification } from './stripe.provider.specification';\nimport { twilioProviderSpecification } from './twilio.provider.specification';\nimport { anthropicProviderSpecification } from './anthropic.provider.specification';\nimport { openaiProviderSpecification } from './openai.provider.specification';\nimport { opencodeProviderSpecification } from './opencode.provider.specification';\nimport { googleProviderSpecification } from './google.provider.specification';\nimport { mistralProviderSpecification } from './mistral.provider.specification';\nimport { grokProviderSpecification } from './grok.provider.specification';\nimport { perplexityProviderSpecification } from './perplexity.provider.specification';\nimport { appleProviderSpecification } from './apple.provider.specification';\nimport { githubProviderSpecification } from './github.provider.specification';\nimport { microsoftProviderSpecification } from './microsoft.provider.specification';\nimport { recaptchaProviderSpecification } from './recaptcha.provider.specification';\nimport { googlePlacesProviderSpecification } from './google-places.provider.specification';\nimport { googleDriveProviderSpecification } from './google-drive.provider.specification';\nimport { microsoftOneDriveProviderSpecification } from './microsoft-onedrive.provider.specification';\nimport { dropboxProviderSpecification } from './dropbox.provider.specification';\n\nexport * from './resend.provider.specification';\nexport * from './email-preview.provider.specification';\nexport * from './stripe.provider.specification';\nexport * from './twilio.provider.specification';\nexport * from './anthropic.provider.specification';\nexport * from './openai.provider.specification';\nexport * from './opencode.provider.specification';\nexport * from './google.provider.specification';\nexport * from './mistral.provider.specification';\nexport * from './grok.provider.specification';\nexport * from './perplexity.provider.specification';\nexport * from './apple.provider.specification';\nexport * from './github.provider.specification';\nexport * from './microsoft.provider.specification';\nexport * from './recaptcha.provider.specification';\nexport * from './google-places.provider.specification';\nexport * from './google-drive.provider.specification';\nexport * from './microsoft-onedrive.provider.specification';\nexport * from './dropbox.provider.specification';\nexport * from './_engine-provider-shared';\n\n/**\n * Engine-shipped {@link ProviderSpecification} map — the MAIN tier of the D10 table (#328): every MAIN backend module, and\n * every MAIN browser module with no backend facet (`dropbox`, #3995 item 5).\n * EXTENSION and CATALOGUE engine providers are described when they are extracted into their\n * own packages (#339); a generated package ships its own entry (S7).\n */\nexport const engineProviderSpecifications: ProviderSpecification = buildProviderSpecificationMap(\n resendProviderSpecification,\n emailPreviewProviderSpecification,\n stripeProviderSpecification,\n twilioProviderSpecification,\n anthropicProviderSpecification,\n openaiProviderSpecification,\n opencodeProviderSpecification,\n googleProviderSpecification,\n mistralProviderSpecification,\n grokProviderSpecification,\n perplexityProviderSpecification,\n appleProviderSpecification,\n githubProviderSpecification,\n microsoftProviderSpecification,\n recaptchaProviderSpecification,\n googlePlacesProviderSpecification,\n googleDriveProviderSpecification,\n microsoftOneDriveProviderSpecification,\n dropboxProviderSpecification,\n);\n"]}
@@ -19,6 +19,7 @@ export declare const userPreferencesApiReferenceExample: {
19
19
  };
20
20
  privacy: {
21
21
  consentedPurposes: string[];
22
+ offeredPurposes: string[];
22
23
  consentDecidedAt: string;
23
24
  };
24
25
  ui: {
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences-api-reference.examples.d.ts","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-preferences-api-reference.examples.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AACpE,eAAO,MAAM,2BAA2B,kCAAkC,CAAC;AAE3E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6B9C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;CAElD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;CAMrD,CAAC"}
1
+ {"version":3,"file":"user-preferences-api-reference.examples.d.ts","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-preferences-api-reference.examples.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,eAAO,MAAM,gCAAgC,sBAAsB,CAAC;AACpE,eAAO,MAAM,2BAA2B,kCAAkC,CAAC;AAE3E,eAAO,MAAM,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+B9C,CAAC;AAEF,eAAO,MAAM,sCAAsC;;CAElD,CAAC;AAEF,eAAO,MAAM,yCAAyC;;;;;;;;;;;;;;;;;CAMrD,CAAC"}
@@ -21,6 +21,8 @@ export const userPreferencesApiReferenceExample = {
21
21
  },
22
22
  privacy: {
23
23
  consentedPurposes: ['analytics'],
24
+ // What the deciding surface showed (#3929): a purpose not here was never asked.
25
+ offeredPurposes: ['analytics'],
24
26
  consentDecidedAt: '2026-09-01T09:00:00.000Z',
25
27
  },
26
28
  ui: {
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences-api-reference.examples.js","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-preferences-api-reference.examples.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;AACpE,MAAM,CAAC,MAAM,2BAA2B,GAAG,+BAA+B,CAAC;AAE3E,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,EAAE,2BAA2B;IAChC,MAAM,EAAE,gCAAgC;IACxC,aAAa,EAAE;QACb,KAAK,EAAE,IAAI;QACX,6EAA6E;QAC7E,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,IAAI;QACX,2FAA2F;QAC3F,cAAc,EAAE,EAAE;KACnB;IACD,OAAO,EAAE;QACP,iBAAiB,EAAE,CAAC,WAAW,CAAC;QAChC,gBAAgB,EAAE,0BAA0B;KAC7C;IACD,EAAE,EAAE;QACF,KAAK,EAAE,MAAM;KACd;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,cAAc;QACxB,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,IAAI;KACb;IACD,mBAAmB,EAAE;QACnB,eAAe,EAAE,IAAI;QACrB,iBAAiB,EAAE,CAAC,IAAI,CAAC;QACzB,sBAAsB,EAAE,KAAK;KAC9B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,MAAM,EAAE,gCAAgC;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,GAAG,EAAE,kCAAkC,CAAC,GAAG;IAC3C,MAAM,EAAE,kCAAkC,CAAC,MAAM;IACjD,EAAE,EAAE,kCAAkC,CAAC,EAAE;IACzC,QAAQ,EAAE,kCAAkC,CAAC,QAAQ;IACrD,mBAAmB,EAAE,kCAAkC,CAAC,mBAAmB;CAC5E,CAAC","sourcesContent":["/**\n * Canonical wire examples for the two API doors onto the shared user-preferences rows.\n *\n * `USER_SELF_PREFERENCES` owns subject-facing read/update/reset operations and\n * `USER_PREFERENCES` owns administrator-addressed read/update operations. Both resolve to the\n * same persistence collection and the same `UserPreferencesSchema`, so duplicating payloads in\n * their specifications would let the published contracts drift while the runtime data does not.\n */\n\nexport const USER_PREFERENCES_EXAMPLE_USER_ID = 'user_01HX2EXAMPLE';\nexport const USER_PREFERENCES_EXAMPLE_ID = 'user_preferences_01HX2EXAMPLE';\n\nexport const userPreferencesApiReferenceExample = {\n _id: USER_PREFERENCES_EXAMPLE_ID,\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n notifications: {\n email: true,\n // Consent to notification texts (#1875): off unless the person turned it on.\n sms: false,\n inApp: true,\n // Per-kind choices (#2318): empty for a person who has turned no kind of notification off.\n byResourceType: {},\n },\n privacy: {\n consentedPurposes: ['analytics'],\n consentDecidedAt: '2026-09-01T09:00:00.000Z',\n },\n ui: {\n theme: 'AUTO',\n },\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n languagePreferences: {\n primaryLanguage: 'fr',\n fallbackLanguages: ['en'],\n useOrganizationDefault: false,\n },\n};\n\nexport const userPreferencesApiReferencePathExample = {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n};\n\nexport const userPreferencesApiReferenceSummaryExample = {\n _id: userPreferencesApiReferenceExample._id,\n userId: userPreferencesApiReferenceExample.userId,\n ui: userPreferencesApiReferenceExample.ui,\n regional: userPreferencesApiReferenceExample.regional,\n languagePreferences: userPreferencesApiReferenceExample.languagePreferences,\n};\n"]}
1
+ {"version":3,"file":"user-preferences-api-reference.examples.js","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-preferences-api-reference.examples.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,MAAM,CAAC,MAAM,gCAAgC,GAAG,mBAAmB,CAAC;AACpE,MAAM,CAAC,MAAM,2BAA2B,GAAG,+BAA+B,CAAC;AAE3E,MAAM,CAAC,MAAM,kCAAkC,GAAG;IAChD,GAAG,EAAE,2BAA2B;IAChC,MAAM,EAAE,gCAAgC;IACxC,aAAa,EAAE;QACb,KAAK,EAAE,IAAI;QACX,6EAA6E;QAC7E,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,IAAI;QACX,2FAA2F;QAC3F,cAAc,EAAE,EAAE;KACnB;IACD,OAAO,EAAE;QACP,iBAAiB,EAAE,CAAC,WAAW,CAAC;QAChC,gFAAgF;QAChF,eAAe,EAAE,CAAC,WAAW,CAAC;QAC9B,gBAAgB,EAAE,0BAA0B;KAC7C;IACD,EAAE,EAAE;QACF,KAAK,EAAE,MAAM;KACd;IACD,QAAQ,EAAE;QACR,QAAQ,EAAE,cAAc;QACxB,UAAU,EAAE,YAAY;QACxB,UAAU,EAAE,KAAK;QACjB,MAAM,EAAE,IAAI;KACb;IACD,mBAAmB,EAAE;QACnB,eAAe,EAAE,IAAI;QACrB,iBAAiB,EAAE,CAAC,IAAI,CAAC;QACzB,sBAAsB,EAAE,KAAK;KAC9B;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,sCAAsC,GAAG;IACpD,MAAM,EAAE,gCAAgC;CACzC,CAAC;AAEF,MAAM,CAAC,MAAM,yCAAyC,GAAG;IACvD,GAAG,EAAE,kCAAkC,CAAC,GAAG;IAC3C,MAAM,EAAE,kCAAkC,CAAC,MAAM;IACjD,EAAE,EAAE,kCAAkC,CAAC,EAAE;IACzC,QAAQ,EAAE,kCAAkC,CAAC,QAAQ;IACrD,mBAAmB,EAAE,kCAAkC,CAAC,mBAAmB;CAC5E,CAAC","sourcesContent":["/**\n * Canonical wire examples for the two API doors onto the shared user-preferences rows.\n *\n * `USER_SELF_PREFERENCES` owns subject-facing read/update/reset operations and\n * `USER_PREFERENCES` owns administrator-addressed read/update operations. Both resolve to the\n * same persistence collection and the same `UserPreferencesSchema`, so duplicating payloads in\n * their specifications would let the published contracts drift while the runtime data does not.\n */\n\nexport const USER_PREFERENCES_EXAMPLE_USER_ID = 'user_01HX2EXAMPLE';\nexport const USER_PREFERENCES_EXAMPLE_ID = 'user_preferences_01HX2EXAMPLE';\n\nexport const userPreferencesApiReferenceExample = {\n _id: USER_PREFERENCES_EXAMPLE_ID,\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n notifications: {\n email: true,\n // Consent to notification texts (#1875): off unless the person turned it on.\n sms: false,\n inApp: true,\n // Per-kind choices (#2318): empty for a person who has turned no kind of notification off.\n byResourceType: {},\n },\n privacy: {\n consentedPurposes: ['analytics'],\n // What the deciding surface showed (#3929): a purpose not here was never asked.\n offeredPurposes: ['analytics'],\n consentDecidedAt: '2026-09-01T09:00:00.000Z',\n },\n ui: {\n theme: 'AUTO',\n },\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n languagePreferences: {\n primaryLanguage: 'fr',\n fallbackLanguages: ['en'],\n useOrganizationDefault: false,\n },\n};\n\nexport const userPreferencesApiReferencePathExample = {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n};\n\nexport const userPreferencesApiReferenceSummaryExample = {\n _id: userPreferencesApiReferenceExample._id,\n userId: userPreferencesApiReferenceExample.userId,\n ui: userPreferencesApiReferenceExample.ui,\n regional: userPreferencesApiReferenceExample.regional,\n languagePreferences: userPreferencesApiReferenceExample.languagePreferences,\n};\n"]}
@@ -17,6 +17,7 @@ export declare const userPreferencesResourceSpecification: import("../../../_cor
17
17
  }, import("zod/v4/core").$strip>>;
18
18
  privacy: import("zod").ZodDefault<import("zod").ZodObject<{
19
19
  consentedPurposes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").ConsentPurpose>>>;
20
+ offeredPurposes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").ConsentPurpose>>>;
20
21
  consentDecidedAt: import("zod").ZodOptional<import("zod").ZodDate>;
21
22
  }, import("zod/v4/core").$strip>>;
22
23
  ui: import("zod").ZodDefault<import("zod").ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"user-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AA8B/B,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAuNhD,CAAC"}
1
+ {"version":3,"file":"user-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI5B,MAAM,uBAAuB,CAAC;AA8B/B,eAAO,MAAM,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCAuNhD,CAAC"}
@@ -17,6 +17,7 @@ export declare const userSelfPreferencesResourceSpecification: import("../../../
17
17
  }, import("zod/v4/core").$strip>>;
18
18
  privacy: import("zod").ZodDefault<import("zod").ZodObject<{
19
19
  consentedPurposes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").ConsentPurpose>>>;
20
+ offeredPurposes: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodEnum<typeof import("@wildo-ai/saas-models").ConsentPurpose>>>;
20
21
  consentDecidedAt: import("zod").ZodOptional<import("zod").ZodDate>;
21
22
  }, import("zod/v4/core").$strip>>;
22
23
  ui: import("zod").ZodDefault<import("zod").ZodObject<{
@@ -1 +1 @@
1
- {"version":3,"file":"user-self-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-self-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,8BAA8B,EAE/B,MAAM,uBAAuB,CAAC;AA8B/B,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA+QpD,CAAC"}
1
+ {"version":3,"file":"user-self-preferences.resource.specification.d.ts","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-self-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAUH,OAAO,EACL,qBAAqB,IAAI,EAAE,EAI3B,8BAA8B,EAE/B,MAAM,uBAAuB,CAAC;AA8B/B,eAAO,MAAM,wCAAwC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iCA+QpD,CAAC"}
@@ -145,7 +145,7 @@ export const userSelfPreferencesResourceSpecification = resourceSpecificationFro
145
145
  },
146
146
  },
147
147
  [Op.UPDATE]: {
148
- purpose: 'Change any subset of the preference groups in one save. The `userId` path value must identify the authenticated caller. Also published as an MCP tool to an agent acting on the user’s behalf, never to a machine identity — see the read operation; the write always targets the consenting user’s own preferences. Successful updates emit an audit event even below the automatic risk floor; marked privacy decision fields carry before/after values. A write to `privacy.consentedPurposes` is a consent decision: the server stamps `privacy.consentDecidedAt` with its own clock when the set changes or the caller claims a new decision, and ignores a caller-supplied instant.',
148
+ purpose: 'Change any subset of the preference groups in one save. The `userId` path value must identify the authenticated caller. Also published as an MCP tool to an agent acting on the user’s behalf, never to a machine identity — see the read operation; the write always targets the consenting user’s own preferences. Successful updates emit an audit event even below the automatic risk floor; marked privacy decision fields carry before/after values. A write to `privacy.consentedPurposes` is a consent decision: the server stamps `privacy.consentDecidedAt` with its own clock when the set changes or the caller claims a new decision, and ignores a caller-supplied instant. On such a decision `privacy.offeredPurposes` grows by the purposes the caller says its surface showed and every purpose granted before or after; a write that is not a decision leaves it as stored. The consent prompt asks only for the purposes the application asks that are not among them.',
149
149
  outcome: 'The user edits their own preferences and every changed group is saved at once; an agent acting for the user can change their preferences over MCP.',
150
150
  responseStatuses: [
151
151
  { code: HttpResponseStatusCode.OK_200, meaning: 'The supplied preference sub-objects were merged and the new state is returned.' },
@@ -1 +1 @@
1
- {"version":3,"file":"user-self-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-self-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qCAAqC,IAAI,2CAA2C,EAAE,MAAM,8BAA8B,CAAC;AACpI,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,uBAAuB,GACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,qBAAqB,IAAI,EAAE,EAC3B,oBAAoB,EACpB,mBAAmB,EACnB,qBAAqB,EACrB,8BAA8B,EAC9B,8DAA8D,IAAI,0BAA0B,GAC7F,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,qBAAqB,EACrB,8CAA8C,GAC/C,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,sCAAsC,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EACL,gCAAgC,EAChC,kCAAkC,EAClC,sCAAsC,EACtC,yCAAyC,GAC1C,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAO3E,MAAM,qCAAqC,GAAG,2CAI7C,CAAC;AAEF,MAAM,KAAK,GAAG,CAAC,CAAS,EAAE,EAAE,CAAC,sCAAsC,CAAC,CAAC,CAAC,CAAC;AAEvE,MAAM,CAAC,MAAM,wCAAwC,GAAG,8CAA8C,CACpG,6BAA6B,CAAC,qCAAqC,CAAC,EACpE,qBAAqB,CACnB,0BAA0B,EAC1B,qBAAqB,EACrB,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CAAC,CAAC;IACpB,OAAO,EAAE,kHAAkH;IAC3H,YAAY,EAAE,iHAAiH;IAC/H,aAAa,EACX,6JAA6J;IAC/J,QAAQ,EAAE,aAAa,CAAC,QAAQ;IAChC,SAAS,EAAE,uBAAuB,CAAC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OAAO,EAAE,6DAA6D;gBACtE,SAAS,EAAE,sCAAsC;gBACjD,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,0BAA0B,EAAE;iBAC/C;aACF;YACD,QAAQ,EAAE;gBACR,OAAO,EAAE,kHAAkH;gBAC3H,SAAS,EAAE,4DAA4D;gBACvE,SAAS,EAAE;oBACT,KAAK,EAAE,EAAE,OAAO,EAAE,6BAA6B,EAAE;iBAClD;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,iDAAiD,EAAE,SAAS,EAAE,yBAAyB,EAAE;QAC/G,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,mOAAmO,EAAE,SAAS,EAAE,oEAAoE,EAAE;QAC9U,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,0IAA0I,EAAE,SAAS,EAAE,8CAA8C,EAAE;KACvQ;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userSelfPreferences` — Wildo SaaS engine specification (mixed).\n * Runtime: `user-self-preferences.shared.resources-config.schemas.ts`, schema `UserPreferencesSchema`.\n */\n\nimport { userSelfPreferencesResourceUIBehavior as userSelfPreferencesResourceUIBehaviorSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n UserPreferenceGroup,\n UserPreferencesSchema,\n UserSelfPreferences_Operations,\n userSelfPreferencesResourceConfiguration_InitializationFactory as userSelfPreferencesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport { selfServiceFrontEndSuccessNotification } from './self-service-user-notifications.shared';\nimport {\n USER_PREFERENCES_EXAMPLE_USER_ID,\n userPreferencesApiReferenceExample,\n userPreferencesApiReferencePathExample,\n userPreferencesApiReferenceSummaryExample,\n} from './user-preferences-api-reference.examples';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof userSelfPreferencesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userSelfPreferencesResourceUIBehavior = userSelfPreferencesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nexport const userSelfPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userSelfPreferencesResourceUIBehavior),\n resourceSpecification(\n userSelfPreferencesFactory,\n UserPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the signed-in user’s notification, privacy, UI, regional, and language preferences as a single document.',\n businessRole: 'Self-scoped preference store — same shape as org-admin `USER_PREFERENCES` but only `APP_USER` may call it here.',\n lifecycleRole:\n 'Seeded with product defaults when the user account is created, then updated by the signed-in user through the generic update or selective reset operations.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserPreferencesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userSelfPreferencesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_SELF_PREFERENCES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserSelfPreferences_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userSelfPreferencesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Primary key for the preferences document.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` record that owns this self-preference document — immutable after create.',\n whyItMatters: 'Scopes every self-serve read/write to the signed-in identity through the user-self access strategy, so a caller can only ever load or mutate their own preferences.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n notifications: schemaShape.notifications.objectSpec({\n meaning: 'The person\\u2019s choices about notifications on their own affairs: `email` for notification emails and `inApp` for the pop-ups and notification centre, then `byResourceType`, a channel turned off for one kind of notification, keyed by the resource it is about (their to-dos, their profile). The two switches are the master: a kind cannot reopen a channel switched off. A kind with no entry follows the switches. `sms` is different in kind: it is the person\\u2019s CONSENT to receive notification texts on the phone verified on their account, off by default, offered only on their own pane with a verified phone, and nothing overrides it (#1875). There is no push switch because the application sends no push notifications.',\n whyItMatters: 'A person who wants email about their tasks and not about their profile can say so without losing either channel. Role-addressed notices and security notices marked always-delivered are not governed: the person did not choose to receive them as a person.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n privacy: schemaShape.privacy.objectSpec({\n meaning: 'The person’s own privacy decisions: the optional purposes they granted (a set, each independent), when they last decided, and how much the application may collect. Writing `consentedPurposes` is a consent decision whose instant the server stamps; it is what the service consent gate and the consent prompt record.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n ui: schemaShape.ui.objectSpec({\n meaning: 'UI theme selection (light/dark/system) and related presentation defaults.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n regional: schemaShape.regional.objectSpec({\n meaning: 'Timezone, locale, and date/time presentation formats — every field OPTIONAL, because an absent one is not a gap but an inheritance. Formatting resolves member, then the organization\\u2019s own regional settings, then the framework floor, one field at a time, so a member who sets only a timezone still follows the tenant on date format. Omitting a field is therefore how a member says \\u201cwhatever my organization uses\\u201d, and sending a value is how they override it.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({\n meaning: 'The language the person reads in (`primaryLanguage`), the languages to use in order when that one is not offered (`fallbackLanguages`, used by the interface and by the emails sent to them), and whether to follow the organization\\u2019s language instead.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.READ]: {\n // Seeded with the user, so a first read never 404s. That is why the caller never has to\n // create preferences, and it is the only part of the mechanism a reader needs.\n purpose: 'Return the signed-in user’s own preferences, ready for a settings screen to bind to. The `userId` path value must identify the authenticated caller; it is not an administrator-addressable user selector. Also published as an MCP tool to an agent acting on the user’s behalf — never to a machine identity, which carries no user and is therefore never offered this operation; the read always resolves the consenting user’s own preferences.',\n outcome: 'Client forms can bind to every subsection in one fetch; an agent acting for the user can read their preferences (locale/timezone/theme/notifications) over MCP.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The signed-in user’s own preferences document is returned with every subsection.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Load my notification, privacy and regional choices',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Load my preferences with their owning user context',\n request: userPreferencesApiReferencePathExample,\n response: {\n ...userPreferencesApiReferenceExample,\n user: { _id: USER_PREFERENCES_EXAMPLE_USER_ID },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Load the compact locale and appearance summary',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.UPDATE]: {\n purpose: 'Change any subset of the preference groups in one save. The `userId` path value must identify the authenticated caller. Also published as an MCP tool to an agent acting on the user’s behalf, never to a machine identity — see the read operation; the write always targets the consenting user’s own preferences. Successful updates emit an audit event even below the automatic risk floor; marked privacy decision fields carry before/after values. A write to `privacy.consentedPurposes` is a consent decision: the server stamps `privacy.consentDecidedAt` with its own clock when the set changes or the caller claims a new decision, and ignores a caller-supplied instant.',\n outcome: 'The user edits their own preferences and every changed group is saved at once; an agent acting for the user can change their preferences over MCP.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The supplied preference sub-objects were merged and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'One of the edited preference sub-objects fails schema validation.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Use French formats in the Europe/Paris timezone',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n languagePreferences: {\n primaryLanguage: 'fr',\n fallbackLanguages: ['en'],\n useOrganizationDefault: false,\n },\n },\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS after generic UPDATE on self preferences.') },\n },\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS]: {\n operationId: UserSelfPreferences_Operations.RESET_TO_DEFAULTS,\n purpose: 'Return the named preference blocks to product defaults. The request carries `groups` — one or more members of the closed `UserPreferenceGroup` vocabulary, whose values are the persisted block names — and a \"reset everything\" is expressed by naming every block, not by a separate flag.',\n outcome: 'Each named block is replaced by its schema defaults; a block the request does not name is left exactly as it was. Resetting `privacy` withdraws every granted purpose (the empty set), clears the decision instant so a consent surface asks again, and restores the default collection level. Governed notice, contract, and consent interactions are separate immutable release-bound records, are not members of this resource, and are never modified by a preferences reset.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named preference blocks were reset to product defaults and the refreshed preferences are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: '`groups` is absent or empty, or names a block outside the vocabulary. A request naming nothing is rejected rather than answered with an empty write.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Restore notification and regional defaults without changing privacy or language',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n groups: [UserPreferenceGroup.NOTIFICATIONS, UserPreferenceGroup.REGIONAL],\n },\n response: {\n ...userPreferencesApiReferenceExample,\n // Resetting notifications also clears every per-kind choice, so each kind follows the\n // two switches again.\n notifications: {\n email: true,\n sms: false,\n inApp: true,\n byResourceType: {},\n },\n // Resetting the regional group clears it to EMPTY rather than writing four values,\n // and that is what \"default\" means here: every regional field is optional, so an\n // absent one is inherited from the organization's own regional record and only then\n // from the framework floor. Writing `UTC`/`en` back would be the opposite — it would\n // record a fresh explicit choice that the tenant can never override again.\n regional: {},\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS after reset operation completes.') },\n },\n },\n businessConstraints: [\n 'A preferences row is created eagerly from schema defaults when the user account is created. There is no public self-service CREATE operation; a missing row is a provisioning failure, not a normal client lifecycle state.',\n 'The `userId` URL segment identifies the authenticated user-self scope. Supplying another user id never turns this API into an administrative preferences API.',\n 'UPDATE accepts selected preference blocks, but a supplied block is validated as that block’s complete object. Send all fields of each block you change.',\n 'RESET_TO_DEFAULTS is selective: only groups named in the request are replaced. It does not alter separate governed-document interaction records.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Mirror the preset’s four settings sections: notifications, privacy, regional, and language. UI theme is intentionally NOT a section here — `ui.theme` is shown and edited only on the dedicated Appearance Settings-Hub panel (`AppPage_AppearanceSettings`); the editable duplicate was removed from this page (mirrors the preset’s omission note). Do not re-add an `appearance` section unless the preset reintroduces the ref. Each section is a titled card with NO description, on read and on edit: the titles name their contents, and a description under them only restated the title.',\n displayPurpose: 'End-user Settings Hub → Preferences pane, edited in place: four titled cards of label-left / value-right rows. An unset value reads \"No value\" rather than disappearing, because on this pane \"not chosen yet\" is the information. Nested `ObjectScope` names in the preset must stay aligned with these section keys.',\n summaryPurpose: 'A card of two bare values that need no label: the time zone and the primary interface language. The theme and the formatting locale are left out rather than labelled — a bare theme value names nothing, and the locale usually repeats the language word.',\n sections: {\n notifications: {\n purpose: 'The two notification channels a person can switch off for their own affairs, email and in-app, then a table with one row per kind of notification they can silence (each resource that declares one, derived from the application\\u2019s declared notifications) and one switch per channel that kind uses. A kind\\u2019s switch saves in place; a column is locked off while its channel switch is off.',\n whenToUse: 'Notification center onboarding and digest controls.',\n textSlots: {\n title: { purpose: 'Label the notifications section card.' },\n },\n },\n privacy: {\n purpose: 'Consent and data-processing toggles that affect compliance posture.',\n whenToUse: 'GDPR/CCPA style self-service privacy center.',\n textSlots: {\n title: { purpose: 'Label the privacy block.' },\n },\n },\n regional: {\n purpose: 'Timezone and format preferences for scheduling and numbers.',\n whenToUse: 'First-day setup or travel scenarios.',\n textSlots: {\n title: { purpose: 'Label regional settings.' },\n },\n },\n language: {\n purpose: 'The primary language, the fallbacks used when it is not offered, and following the organization\\u2019s language.',\n whenToUse: 'Internationalized products and accessibility requirements.',\n textSlots: {\n title: { purpose: 'Label language preferences.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Load self preferences for any settings surface.', whenToUse: 'Initial settings fetch.' },\n [Op.UPDATE]: { purpose: 'Edit your own preferences. The view is named after what is being edited, like the admin and organization preference edits (\"Update preferences\"); the save button is the form\\'s own. Every group changed is sent in one request.', whenToUse: 'The user changes settings in one or several groups and saves once.' },\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS]: { purpose: 'Danger-zone reset: the form is a multi-select over the preference blocks, and being CRITICAL it gates its submit behind type-to-confirm.', whenToUse: '“Restore defaults” CTA in advanced settings.' },\n },\n }),\n);\n"]}
1
+ {"version":3,"file":"user-self-preferences.resource.specification.js","sourceRoot":"","sources":["../../../../../src/engine/users/resources/user-self-preferences.resource.specification.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,qCAAqC,IAAI,2CAA2C,EAAE,MAAM,8BAA8B,CAAC;AACpI,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AAEpE,OAAO,EACL,mB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6BAA6B,EAAE;iBAClD;aACF;SACF;KACF;IACD,KAAK,EAAE;QACL,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,OAAO,EAAE,iDAAiD,EAAE,SAAS,EAAE,yBAAyB,EAAE;QAC/G,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,OAAO,EAAE,mOAAmO,EAAE,SAAS,EAAE,oEAAoE,EAAE;QAC9U,CAAC,8BAA8B,CAAC,iBAAiB,CAAC,EAAE,EAAE,OAAO,EAAE,0IAA0I,EAAE,SAAS,EAAE,8CAA8C,EAAE;KACvQ;CACF,CAAC,CACH,CAAC","sourcesContent":["/**\n * Resource: `userSelfPreferences` — Wildo SaaS engine specification (mixed).\n * Runtime: `user-self-preferences.shared.resources-config.schemas.ts`, schema `UserPreferencesSchema`.\n */\n\nimport { userSelfPreferencesResourceUIBehavior as userSelfPreferencesResourceUIBehaviorSource } from '@wildo-ai/presets-components';\nimport { LabelAudience } from '@wildo-ai/presets-components-models';\nimport type { ResourceUIBehaviorConfig } from '@wildo-ai/saas-frontend-lib/companion';\nimport {\n CodeDeclarationKind,\n CodeSymbolKind,\n FieldSemanticImportance,\n} from '@wildo-ai/zod-decorators';\nimport {\n CoreResourceOperation as Op,\n ResourcePrimaryScope,\n UserPreferenceGroup,\n UserPreferencesSchema,\n UserSelfPreferences_Operations,\n userSelfPreferencesResourceConfiguration_InitializationFactory as userSelfPreferencesFactory,\n} from '@wildo-ai/saas-models';\nimport {\n HttpResponseStatusCode,\n resourceFrontendConfiguration,\n resourceSpecification,\n resourceSpecificationFromFrontendConfiguration,\n} from '~wildo-specifications/_core';\n\nimport { selfServiceFrontEndSuccessNotification } from './self-service-user-notifications.shared';\nimport {\n USER_PREFERENCES_EXAMPLE_USER_ID,\n userPreferencesApiReferenceExample,\n userPreferencesApiReferencePathExample,\n userPreferencesApiReferenceSummaryExample,\n} from './user-preferences-api-reference.examples';\nimport { EngineResourceSubDomain } from '../../engine-resource-sub-domain';\n\ntype Cfg = ReturnType<typeof userSelfPreferencesFactory>;\ntype Custom = NonNullable<Cfg['customOperation']>;\ntype Core = Cfg['coreOperations'][number];\ntype Main = Cfg['mainSchema'];\n\nconst userSelfPreferencesResourceUIBehavior = userSelfPreferencesResourceUIBehaviorSource as ResourceUIBehaviorConfig<\n Custom,\n Core,\n Main\n>;\n\nconst toast = (s: string) => selfServiceFrontEndSuccessNotification(s);\n\nexport const userSelfPreferencesResourceSpecification = resourceSpecificationFromFrontendConfiguration(\n resourceFrontendConfiguration(userSelfPreferencesResourceUIBehavior),\n resourceSpecification(\n userSelfPreferencesFactory,\n UserPreferencesSchema,\n ({ schemaShape }) => ({\n purpose: 'Persist the signed-in user’s notification, privacy, UI, regional, and language preferences as a single document.',\n businessRole: 'Self-scoped preference store — same shape as org-admin `USER_PREFERENCES` but only `APP_USER` may call it here.',\n lifecycleRole:\n 'Seeded with product defaults when the user account is created, then updated by the signed-in user through the generic update or selective reset operations.',\n audience: LabelAudience.END_USER,\n subDomain: EngineResourceSubDomain.USERS,\n codeHandling: {\n mainSchema: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserPreferencesSchema',\n symbolKind: CodeSymbolKind.SCHEMA,\n declarationKind: CodeDeclarationKind.ZOD_SCHEMA,\n },\n resourceFactory: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'userSelfPreferencesResourceConfiguration_InitializationFactory',\n symbolKind: CodeSymbolKind.FACTORY,\n declarationKind: CodeDeclarationKind.FUNCTION,\n },\n resourceType: {\n enumDeclaration: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceType',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n memberName: 'USER_SELF_PREFERENCES',\n },\n operationVocabulary: {\n coreEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'CoreResourceOperation',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n customEnum: {\n packageName: '@wildo-ai/saas-models',\n exportName: 'UserSelfPreferences_Operations',\n symbolKind: CodeSymbolKind.ENUM,\n declarationKind: CodeDeclarationKind.TYPESCRIPT_ENUM,\n },\n },\n frontendConfigurationSources: [\n {\n packageName: '@wildo-ai/presets-components',\n exportName: 'userSelfPreferencesResourceUIBehavior',\n symbolKind: CodeSymbolKind.UI_BEHAVIOR,\n },\n ],\n },\n\n fields: {\n _id: schemaShape._id.stringSpec({\n meaning: 'Primary key for the preferences document.',\n semanticRole: 'identifier',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n userId: schemaShape.userId.foreignKeySpec({\n meaning: 'Foreign key to the `users` record that owns this self-preference document — immutable after create.',\n whyItMatters: 'Scopes every self-serve read/write to the signed-in identity through the user-self access strategy, so a caller can only ever load or mutate their own preferences.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n notifications: schemaShape.notifications.objectSpec({\n meaning: 'The person\\u2019s choices about notifications on their own affairs: `email` for notification emails and `inApp` for the pop-ups and notification centre, then `byResourceType`, a channel turned off for one kind of notification, keyed by the resource it is about (their to-dos, their profile). The two switches are the master: a kind cannot reopen a channel switched off. A kind with no entry follows the switches. `sms` is different in kind: it is the person\\u2019s CONSENT to receive notification texts on the phone verified on their account, off by default, offered only on their own pane with a verified phone, and nothing overrides it (#1875). There is no push switch because the application sends no push notifications.',\n whyItMatters: 'A person who wants email about their tasks and not about their profile can say so without losing either channel. Role-addressed notices and security notices marked always-delivered are not governed: the person did not choose to receive them as a person.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n privacy: schemaShape.privacy.objectSpec({\n meaning: 'The person’s own privacy decisions: the optional purposes they granted (a set, each independent), when they last decided, and how much the application may collect. Writing `consentedPurposes` is a consent decision whose instant the server stamps; it is what the service consent gate and the consent prompt record.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n ui: schemaShape.ui.objectSpec({\n meaning: 'UI theme selection (light/dark/system) and related presentation defaults.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n regional: schemaShape.regional.objectSpec({\n meaning: 'Timezone, locale, and date/time presentation formats — every field OPTIONAL, because an absent one is not a gap but an inheritance. Formatting resolves member, then the organization\\u2019s own regional settings, then the framework floor, one field at a time, so a member who sets only a timezone still follows the tenant on date format. Omitting a field is therefore how a member says \\u201cwhatever my organization uses\\u201d, and sending a value is how they override it.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n languagePreferences: schemaShape.languagePreferences.objectSpec({\n meaning: 'The language the person reads in (`primaryLanguage`), the languages to use in order when that one is not offered (`fallbackLanguages`, used by the interface and by the emails sent to them), and whether to follow the organization\\u2019s language instead.',\n importance: FieldSemanticImportance.PRIMARY,\n }),\n },\n\n operations: {\n [Op.READ]: {\n // Seeded with the user, so a first read never 404s. That is why the caller never has to\n // create preferences, and it is the only part of the mechanism a reader needs.\n purpose: 'Return the signed-in user’s own preferences, ready for a settings screen to bind to. The `userId` path value must identify the authenticated caller; it is not an administrator-addressable user selector. Also published as an MCP tool to an agent acting on the user’s behalf — never to a machine identity, which carries no user and is therefore never offered this operation; the read always resolves the consenting user’s own preferences.',\n outcome: 'Client forms can bind to every subsection in one fetch; an agent acting for the user can read their preferences (locale/timezone/theme/notifications) over MCP.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The signed-in user’s own preferences document is returned with every subsection.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Load my notification, privacy and regional choices',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n variants: {\n context: {\n examples: [\n {\n title: 'Load my preferences with their owning user context',\n request: userPreferencesApiReferencePathExample,\n response: {\n ...userPreferencesApiReferenceExample,\n user: { _id: USER_PREFERENCES_EXAMPLE_USER_ID },\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n summary: {\n examples: [\n {\n title: 'Load the compact locale and appearance summary',\n request: userPreferencesApiReferencePathExample,\n response: userPreferencesApiReferenceSummaryExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n },\n },\n },\n [Op.UPDATE]: {\n purpose: 'Change any subset of the preference groups in one save. The `userId` path value must identify the authenticated caller. Also published as an MCP tool to an agent acting on the user’s behalf, never to a machine identity — see the read operation; the write always targets the consenting user’s own preferences. Successful updates emit an audit event even below the automatic risk floor; marked privacy decision fields carry before/after values. A write to `privacy.consentedPurposes` is a consent decision: the server stamps `privacy.consentDecidedAt` with its own clock when the set changes or the caller claims a new decision, and ignores a caller-supplied instant. On such a decision `privacy.offeredPurposes` grows by the purposes the caller says its surface showed and every purpose granted before or after; a write that is not a decision leaves it as stored. The consent prompt asks only for the purposes the application asks that are not among them.',\n outcome: 'The user edits their own preferences and every changed group is saved at once; an agent acting for the user can change their preferences over MCP.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The supplied preference sub-objects were merged and the new state is returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: 'One of the edited preference sub-objects fails schema validation.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Use French formats in the Europe/Paris timezone',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n regional: {\n timezone: 'Europe/Paris',\n dateFormat: 'DD/MM/YYYY',\n timeFormat: '24h',\n locale: 'fr',\n },\n languagePreferences: {\n primaryLanguage: 'fr',\n fallbackLanguages: ['en'],\n useOrganizationDefault: false,\n },\n },\n response: userPreferencesApiReferenceExample,\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS after generic UPDATE on self preferences.') },\n },\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS]: {\n operationId: UserSelfPreferences_Operations.RESET_TO_DEFAULTS,\n purpose: 'Return the named preference blocks to product defaults. The request carries `groups` — one or more members of the closed `UserPreferenceGroup` vocabulary, whose values are the persisted block names — and a \"reset everything\" is expressed by naming every block, not by a separate flag.',\n outcome: 'Each named block is replaced by its schema defaults; a block the request does not name is left exactly as it was. Resetting `privacy` withdraws every granted purpose (the empty set), clears the decision instant so a consent surface asks again, and restores the default collection level. Governed notice, contract, and consent interactions are separate immutable release-bound records, are not members of this resource, and are never modified by a preferences reset.',\n responseStatuses: [\n { code: HttpResponseStatusCode.OK_200, meaning: 'The named preference blocks were reset to product defaults and the refreshed preferences are returned.' },\n ],\n errorScenarios: [\n { code: HttpResponseStatusCode.UNAUTHORIZED_401, when: 'The request carries no valid authenticated session.' },\n { code: HttpResponseStatusCode.FORBIDDEN_403, when: 'The `userId` path value does not identify the authenticated caller.' },\n { code: HttpResponseStatusCode.BAD_REQUEST_400, when: '`groups` is absent or empty, or names a block outside the vocabulary. A request naming nothing is rejected rather than answered with an empty write.' },\n { code: HttpResponseStatusCode.NOT_FOUND_404, when: 'No preferences row exists for the authenticated user because account provisioning did not complete successfully.' },\n ],\n idempotent: true,\n examples: [\n {\n title: 'Restore notification and regional defaults without changing privacy or language',\n request: {\n userId: USER_PREFERENCES_EXAMPLE_USER_ID,\n groups: [UserPreferenceGroup.NOTIFICATIONS, UserPreferenceGroup.REGIONAL],\n },\n response: {\n ...userPreferencesApiReferenceExample,\n // Resetting notifications also clears every per-kind choice, so each kind follows the\n // two switches again.\n notifications: {\n email: true,\n sms: false,\n inApp: true,\n byResourceType: {},\n },\n // Resetting the regional group clears it to EMPTY rather than writing four values,\n // and that is what \"default\" means here: every regional field is optional, so an\n // absent one is inherited from the organization's own regional record and only then\n // from the framework floor. Writing `UTC`/`en` back would be the opposite — it would\n // record a fresh explicit choice that the tenant can never override again.\n regional: {},\n },\n forStatus: HttpResponseStatusCode.OK_200,\n },\n ],\n communications: { notification: toast('FRONT_END_SUCCESS after reset operation completes.') },\n },\n },\n businessConstraints: [\n 'A preferences row is created eagerly from schema defaults when the user account is created. There is no public self-service CREATE operation; a missing row is a provisioning failure, not a normal client lifecycle state.',\n 'The `userId` URL segment identifies the authenticated user-self scope. Supplying another user id never turns this API into an administrative preferences API.',\n 'UPDATE accepts selected preference blocks, but a supplied block is validated as that block’s complete object. Send all fields of each block you change.',\n 'RESET_TO_DEFAULTS is selective: only groups named in the request are replaced. It does not alter separate governed-document interaction records.',\n ],\n }),\n { resourcePrimaryScope: ResourcePrimaryScope.USER_SELF },\n ),\n () => ({\n layout: {\n purpose: 'Mirror the preset’s four settings sections: notifications, privacy, regional, and language. UI theme is intentionally NOT a section here — `ui.theme` is shown and edited only on the dedicated Appearance Settings-Hub panel (`AppPage_AppearanceSettings`); the editable duplicate was removed from this page (mirrors the preset’s omission note). Do not re-add an `appearance` section unless the preset reintroduces the ref. Each section is a titled card with NO description, on read and on edit: the titles name their contents, and a description under them only restated the title.',\n displayPurpose: 'End-user Settings Hub → Preferences pane, edited in place: four titled cards of label-left / value-right rows. An unset value reads \"No value\" rather than disappearing, because on this pane \"not chosen yet\" is the information. Nested `ObjectScope` names in the preset must stay aligned with these section keys.',\n summaryPurpose: 'A card of two bare values that need no label: the time zone and the primary interface language. The theme and the formatting locale are left out rather than labelled — a bare theme value names nothing, and the locale usually repeats the language word.',\n sections: {\n notifications: {\n purpose: 'The two notification channels a person can switch off for their own affairs, email and in-app, then a table with one row per kind of notification they can silence (each resource that declares one, derived from the application\\u2019s declared notifications) and one switch per channel that kind uses. A kind\\u2019s switch saves in place; a column is locked off while its channel switch is off.',\n whenToUse: 'Notification center onboarding and digest controls.',\n textSlots: {\n title: { purpose: 'Label the notifications section card.' },\n },\n },\n privacy: {\n purpose: 'Consent and data-processing toggles that affect compliance posture.',\n whenToUse: 'GDPR/CCPA style self-service privacy center.',\n textSlots: {\n title: { purpose: 'Label the privacy block.' },\n },\n },\n regional: {\n purpose: 'Timezone and format preferences for scheduling and numbers.',\n whenToUse: 'First-day setup or travel scenarios.',\n textSlots: {\n title: { purpose: 'Label regional settings.' },\n },\n },\n language: {\n purpose: 'The primary language, the fallbacks used when it is not offered, and following the organization\\u2019s language.',\n whenToUse: 'Internationalized products and accessibility requirements.',\n textSlots: {\n title: { purpose: 'Label language preferences.' },\n },\n },\n },\n },\n views: {\n [Op.READ]: { purpose: 'Load self preferences for any settings surface.', whenToUse: 'Initial settings fetch.' },\n [Op.UPDATE]: { purpose: 'Edit your own preferences. The view is named after what is being edited, like the admin and organization preference edits (\"Update preferences\"); the save button is the form\\'s own. Every group changed is sent in one request.', whenToUse: 'The user changes settings in one or several groups and saves once.' },\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS]: { purpose: 'Danger-zone reset: the form is a multi-select over the preference blocks, and being CRITICAL it gates its submit behind type-to-confirm.', whenToUse: '“Restore defaults” CTA in advanced settings.' },\n },\n }),\n);\n"]}