codeapp-js 1.0.1 → 1.1.0

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 (130) hide show
  1. package/AI/skills/autoreview/SKILL.md +69 -0
  2. package/AI/skills/connections/SKILL.md +4 -4
  3. package/AI/skills/dataverse/SKILL.md +4 -2
  4. package/AI/skills/frontend-design/SKILL.md +32 -20
  5. package/AI/skills/keyvault/SKILL.md +139 -0
  6. package/AI/skills/office365-groups/SKILL.md +46 -25
  7. package/AI/skills/office365-outlook/SKILL.md +56 -25
  8. package/AI/skills/office365-users/SKILL.md +41 -36
  9. package/AI/skills/sharepoint/SKILL.md +174 -31
  10. package/AI/skills/start/SKILL.md +38 -30
  11. package/codeApp/dist/connectors/autoreview.js +1654 -0
  12. package/codeApp/dist/connectors/office365groups.js +2995 -432
  13. package/{examples/outlook Demo/.power/schemas/office365/office365.Schema.json → codeApp/dist/connectors/office365outlook.js} +7439 -16
  14. package/codeApp/dist/connectors/office365users.js +2990 -349
  15. package/codeApp/dist/connectors/sharepoint.js +529 -308
  16. package/examples/combined demo/dist/connectors/office365outlook.js +28521 -0
  17. package/examples/combined demo/dist/connectors/office365users.js +3154 -0
  18. package/examples/combined demo/dist/index.js +2 -6
  19. package/examples/combined demo/power.config.json +1 -1
  20. package/examples/groups Demo/{.power/schemas/office365groups/office365groups.Schema.json → dist/connectors/office365groups.js } +3205 -2204
  21. package/examples/groups Demo/dist/index.js +1 -5
  22. package/examples/groups Demo/power.config.json +1 -1
  23. package/examples/myProfile/dist/connectors/office365users.js +3154 -0
  24. package/examples/myProfile/dist/index.js +1 -5
  25. package/examples/myProfile/power.config.json +1 -1
  26. package/examples/outlook Demo/dist/connectors/office365outlook.js +28521 -0
  27. package/examples/outlook Demo/dist/index.js +2 -5
  28. package/examples/outlook Demo/power.config.json +1 -1
  29. package/examples/sharePoint Demo/dist/connectors/sharepoint.js +687 -0
  30. package/examples/sharePoint Demo/dist/index.js +86 -127
  31. package/examples/sharePoint Demo/power.config.json +1 -1
  32. package/package.json +1 -1
  33. package/codeApp/.power/schemas/appschemas/dataSourcesInfo.ts +0 -6275
  34. package/codeApp/.power/schemas/jira/jira.Schema.json +0 -6903
  35. package/codeApp/.power/schemas/keyvault/keyvault.Schema.json +0 -1600
  36. package/codeApp/.power/schemas/office365groups/office365groups.Schema.json +0 -2204
  37. package/codeApp/.power/schemas/teams/teams.Schema.json +0 -11112
  38. package/codeApp/dist/connectors/outlook.js +0 -1393
  39. package/codeApp/src/generated/index.ts +0 -12
  40. package/codeApp/src/generated/models/AzureKeyVaultModel.ts +0 -107
  41. package/codeApp/src/generated/models/JiraModel.ts +0 -501
  42. package/codeApp/src/generated/models/Office365GroupsModel.ts +0 -363
  43. package/codeApp/src/generated/models/Office365OutlookModel.ts +0 -2046
  44. package/codeApp/src/generated/models/Office365UsersModel.ts +0 -254
  45. package/codeApp/src/generated/services/AzureKeyVaultService.ts +0 -257
  46. package/codeApp/src/generated/services/JiraService.ts +0 -1124
  47. package/codeApp/src/generated/services/Office365GroupsService.ts +0 -326
  48. package/codeApp/src/generated/services/Office365OutlookService.ts +0 -2476
  49. package/codeApp/src/generated/services/Office365UsersService.ts +0 -358
  50. package/examples/apps/kanban/dist/dataverse.js +0 -94
  51. package/examples/apps/kanban/dist/environmentVar.js +0 -55
  52. package/examples/apps/kanban/dist/index.css +0 -605
  53. package/examples/apps/kanban/dist/index.html +0 -21
  54. package/examples/apps/kanban/dist/index.js +0 -860
  55. package/examples/apps/kanban/dist/office365groups.js +0 -97
  56. package/examples/apps/kanban/dist/office365users.js +0 -451
  57. package/examples/apps/kanban/dist/outlook.js +0 -162
  58. package/examples/apps/kanban/dist/power-apps-data.js +0 -2953
  59. package/examples/apps/kanban/dist/sharepoint.js +0 -435
  60. package/examples/apps/kanban/power.config.json +0 -35
  61. package/examples/apps/kanban/src/generated/index.ts +0 -14
  62. package/examples/apps/kanban/src/generated/models/Office365GroupsModel.ts +0 -363
  63. package/examples/apps/kanban/src/generated/models/Office365OutlookModel.ts +0 -2046
  64. package/examples/apps/kanban/src/generated/models/Office365UsersModel.ts +0 -254
  65. package/examples/apps/kanban/src/generated/services/Office365GroupsService.ts +0 -326
  66. package/examples/apps/kanban/src/generated/services/Office365OutlookService.ts +0 -2476
  67. package/examples/apps/kanban/src/generated/services/Office365UsersService.ts +0 -358
  68. package/examples/apps/planning Poker/additional files/AgilePoker_1_0_0_1.zip +0 -0
  69. package/examples/apps/planning Poker/additional files/PokerTables_1_0_0_1.zip +0 -0
  70. package/examples/apps/planning Poker/additional files/customizations (tables).xml +0 -6429
  71. package/examples/apps/planning Poker/additional files/dataverse-tables.json +0 -165
  72. package/examples/apps/planning Poker/additional files/readme.md +0 -122
  73. package/examples/apps/planning Poker/dist/dataverse.js +0 -78
  74. package/examples/apps/planning Poker/dist/index.html +0 -198
  75. package/examples/apps/planning Poker/dist/index.js +0 -955
  76. package/examples/apps/planning Poker/dist/power-apps-data.js +0 -2953
  77. package/examples/apps/planning Poker/dist/styles.css +0 -815
  78. package/examples/apps/planning Poker/power.config.json +0 -50
  79. package/examples/apps/solution explorer/dist/codeapp.js +0 -1098
  80. package/examples/apps/solution explorer/dist/icon-512.png +0 -0
  81. package/examples/apps/solution explorer/dist/index.html +0 -80
  82. package/examples/apps/solution explorer/dist/index.js +0 -735
  83. package/examples/apps/solution explorer/dist/power-apps-data.js +0 -3007
  84. package/examples/apps/solution explorer/dist/styles.css +0 -571
  85. package/examples/apps/solution explorer/power.config.json +0 -151
  86. package/examples/apps/todo/dist/dataverse.js +0 -64
  87. package/examples/apps/todo/dist/icon192.png +0 -0
  88. package/examples/apps/todo/dist/index.html +0 -75
  89. package/examples/apps/todo/dist/index.js +0 -9
  90. package/examples/apps/todo/dist/power-apps-data.js +0 -2953
  91. package/examples/apps/todo/dist/renderer.js +0 -375
  92. package/examples/apps/todo/dist/styles.css +0 -691
  93. package/examples/apps/todo/power.config.json +0 -35
  94. package/examples/combined demo/.power/schemas/appschemas/dataSourcesInfo.ts +0 -6275
  95. package/examples/combined demo/.power/schemas/jira/jira.Schema.json +0 -6903
  96. package/examples/combined demo/.power/schemas/keyvault/keyvault.Schema.json +0 -1600
  97. package/examples/combined demo/.power/schemas/teams/teams.Schema.json +0 -11112
  98. package/examples/combined demo/dist/office365users.js +0 -513
  99. package/examples/combined demo/dist/outlook.js +0 -1393
  100. package/examples/combined demo/src/generated/index.ts +0 -12
  101. package/examples/combined demo/src/generated/models/AzureKeyVaultModel.ts +0 -107
  102. package/examples/combined demo/src/generated/models/JiraModel.ts +0 -501
  103. package/examples/combined demo/src/generated/models/Office365GroupsModel.ts +0 -363
  104. package/examples/combined demo/src/generated/models/Office365OutlookModel.ts +0 -2046
  105. package/examples/combined demo/src/generated/models/Office365UsersModel.ts +0 -254
  106. package/examples/combined demo/src/generated/services/AzureKeyVaultService.ts +0 -257
  107. package/examples/combined demo/src/generated/services/JiraService.ts +0 -1124
  108. package/examples/combined demo/src/generated/services/Office365GroupsService.ts +0 -326
  109. package/examples/combined demo/src/generated/services/Office365OutlookService.ts +0 -2476
  110. package/examples/combined demo/src/generated/services/Office365UsersService.ts +0 -358
  111. package/examples/groups Demo/.power/schemas/appschemas/dataSourcesInfo.ts +0 -613
  112. package/examples/groups Demo/dist/office365groups.js +0 -642
  113. package/examples/groups Demo/src/generated/index.ts +0 -10
  114. package/examples/groups Demo/src/generated/models/Office365GroupsModel.ts +0 -363
  115. package/examples/groups Demo/src/generated/services/Office365GroupsService.ts +0 -326
  116. package/examples/myProfile/dist/office365users.js +0 -517
  117. package/examples/outlook Demo/.power/schemas/appschemas/dataSourcesInfo.ts +0 -6512
  118. package/examples/outlook Demo/dist/outlook.js +0 -1393
  119. package/examples/outlook Demo/src/generated/index.ts +0 -10
  120. package/examples/outlook Demo/src/generated/models/Office365OutlookModel.ts +0 -2046
  121. package/examples/outlook Demo/src/generated/services/Office365OutlookService.ts +0 -2476
  122. package/examples/sharePoint Demo/dist/sharepoint.js +0 -466
  123. package/examples/sharePoint Demo/src/generated/index.ts +0 -14
  124. package/examples/sharePoint Demo/src/generated/models/Office365GroupsModel.ts +0 -363
  125. package/examples/sharePoint Demo/src/generated/models/Office365OutlookModel.ts +0 -2046
  126. package/examples/sharePoint Demo/src/generated/models/Office365UsersModel.ts +0 -254
  127. package/examples/sharePoint Demo/src/generated/services/Office365GroupsService.ts +0 -326
  128. package/examples/sharePoint Demo/src/generated/services/Office365OutlookService.ts +0 -2476
  129. package/examples/sharePoint Demo/src/generated/services/Office365UsersService.ts +0 -358
  130. package/readme.md +0 -590
@@ -0,0 +1,69 @@
1
+ ---
2
+ name: autoreview
3
+ description: "Use when: reviewing Power Automate flows with the AutoReview connector, including metadata, JSON review output, file-based review output, diagrams, or the raw AutoReview HTTP endpoint."
4
+ ---
5
+
6
+ # AutoReview Connector Guide
7
+
8
+ Do not use CLI PAC commands to get connecctor models or services,
9
+ use `codeApp/dist/connectors/autoreview.js` as the repo source of truth.
10
+
11
+
12
+ ## power.config.json
13
+
14
+ Always read the current `power.config.json` before editing it.
15
+
16
+ Ensure `"id": "/providers/Microsoft.PowerApps/apis/shared_autoreview"` exists.
17
+
18
+ ```json
19
+ "connectionReferences": {
20
+ "autoreview": {
21
+ "id": "/providers/Microsoft.PowerApps/apis/shared_autoreview",
22
+ "displayName": "AutoReview",
23
+ "dataSources": [
24
+ "autoreview"
25
+ ],
26
+ "dataSets": {},
27
+ "authenticationType": null,
28
+ "sharedConnectionId": null
29
+ }
30
+ }
31
+ ```
32
+
33
+ Rules for editing `power.config.json`:
34
+
35
+ - Preserve existing keys such as `sharedConnectionId`, `authenticationType`, and other working connection metadata.
36
+ - If the app uses Dataverse environment variables, also load the environment-variables skill.
37
+
38
+ ## Core Rule
39
+
40
+ Prefer the latest exported actions and avoid older superseded variants.
41
+
42
+ ## Action Surface
43
+
44
+ - `GET_info()`
45
+ - `POST_http(path, body)`
46
+ - `POST_json(flowProperties, configs)`
47
+ - `POST_file_V2(flowProperties, configs)`
48
+ - `POST_diagram(flowProperties, configs)`
49
+
50
+ ## When To Use Each Action
51
+
52
+ - `GET_info()` returns connector metadata, version details, and service information.
53
+ - `POST_http(...)` is the raw escape hatch for AutoReview endpoints.
54
+ - `POST_json(...)` returns structured JSON review output for a flow.
55
+ - `POST_file_V2(...)` returns generated review/report files using the newer file action.
56
+ - `POST_diagram(...)` returns a rendered flow diagram artifact.
57
+
58
+ ## Practical Guidance
59
+
60
+ - Prefer `POST_json(...)` when the app needs machine-readable review output.
61
+ - Prefer `POST_file_V2(...)` instead of the older file action.
62
+ - Use `POST_diagram(...)` when the user explicitly wants a visual flow representation.
63
+ - Only fall back to `POST_http(...)` when there is no dedicated action for the output you need.
64
+
65
+ ## Debugging
66
+
67
+ - If review output looks incomplete, confirm the flow properties payload includes the definition, owner, environment, and flow ID fields the connector expects.
68
+ - If you need a file artifact, use `POST_file_V2(...)`, not the legacy file action.
69
+ - Treat `POST_http(...)` as an escape hatch, not the default integration path.
@@ -5,7 +5,7 @@ description: "Use when: wiring connector-backed Power Apps Code Apps, validating
5
5
 
6
6
  # Connections Guide
7
7
 
8
- Use this skill for the shared rules that apply across the handwritten connector helpers in `dev files/`.
8
+ Use this skill for the shared rules that apply across the handwritten connector helpers in `dev files/connectors/`.
9
9
 
10
10
  ## Core Rules
11
11
 
@@ -13,7 +13,7 @@ All authentication is handled by the Power Apps runtime and the connector client
13
13
 
14
14
  Do:
15
15
  - Keep connector calls inside the wrapper helper for that connector.
16
- - Reuse the repo's helper patterns such as `unwrapResult` and the candidate data-source retry logic in `codeapp-helper.js`.
16
+ - Reuse the repo's helper patterns such as `unwrapResult` and the candidate data-source retry logic in `codeapp.js`.
17
17
  - Treat the helper file as the repo-local source of truth for public function names, default versions, and parameter mapping.
18
18
  - Validate `power.config.json` `dataSources` names against the wrapper before changing them.
19
19
 
@@ -25,7 +25,7 @@ Don't:
25
25
 
26
26
  ## Wrapper Patterns
27
27
 
28
- - `codeapp-helper.js` exposes `execConnectorOpWithCandidates(...)` for wrappers that must retry multiple `dataSources` names.
28
+ - `codeapp.js` exposes `execConnectorOpWithCandidates(...)` for wrappers that must retry multiple `dataSources` names.
29
29
  - Some wrappers use exact inline `apis` metadata (`outlook.js`, `office365users.js`, `Teams.js`, `Jira.js`, `AzureKeyvault.js`).
30
30
  - Some wrappers intentionally rely on runtime-resolved connector operations and focus on stable public helper names (`office365groups.js`).
31
31
  - Prefer the existing wrapper over rebuilding a connector client from scratch unless the wrapper is missing the operation entirely.
@@ -34,7 +34,7 @@ Don't:
34
34
 
35
35
  The raw HTTP helper signatures are not interchangeable.
36
36
 
37
- - Outlook, Office 365 Users, and Office 365 Groups map friendly inputs to connector fields like `Uri`, `Method`, `Body`, `ContentType`, and `CustomHeader1..5`.
37
+ - Office 365 Outlook, Office 365 Users, and Office 365 Groups map friendly inputs to connector fields like `Uri`, `Method`, `Body`, `ContentType`, and `CustomHeader1..5`.
38
38
  - SharePoint and Teams currently pass `method`, `uri`, `headers`, and `body` directly.
39
39
 
40
40
  Check the specific wrapper before copying a raw-request pattern between connectors.
@@ -9,7 +9,7 @@ description: "Use when: building or debugging Dataverse CRUD in a Power Apps Cod
9
9
 
10
10
  ## power.config.json
11
11
 
12
- For the helper in `dev files/codeapp-helper.js`, Dataverse CRUD depends on `databaseReferences.default.cds.dataSources`.
12
+ For the helper in `dev files/codeapp.js`, Dataverse CRUD depends on `databaseReferences.default.cds.dataSources`.
13
13
 
14
14
  ```json
15
15
  {
@@ -30,6 +30,8 @@ For the helper in `dev files/codeapp-helper.js`, Dataverse CRUD depends on `data
30
30
  - `entitySetName` is the plural OData collection name.
31
31
  - `logicalName` is the singular logical name.
32
32
  - Every Dataverse table used by the app must be present here.
33
+ - Schemas are often stored in the `agent` folder, if they are not check `.power\schemas` folder. If required and missing use `pac code add-data-source -a dataverse -t <tableName>` to generate the schema in `.power\schemas` folder.
34
+ - if schema found copy it to `agent` folder and edit the `.power/schemas/` folder.
33
35
  - Do not add unbound actions like `WhoAmI` or `GrantAccess` to `dataSources`.
34
36
 
35
37
  The helper does not require a separate Dataverse `connectionReferences` entry for CRUD or `callUnboundAction`.
@@ -57,7 +59,7 @@ Use `registerTable(tableName, primaryKey)` only when you need to add a table at
57
59
 
58
60
  ## CRUD Surface
59
61
 
60
- `codeapp-helper.js` exports:
62
+ `codeapp.js` exports:
61
63
 
62
64
  - `createItem(tableName, primaryKey, record)`
63
65
  - `getItem(tableName, primaryKey, id, select)`
@@ -1,34 +1,46 @@
1
1
  ---
2
2
  name: frontend-design
3
- description: "Use when: designing or restyling pages, components, mockups, dashboards, or app UIs in this repo. Favor distinctive frontend work over generic defaults."
3
+ description: Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
4
4
  ---
5
5
 
6
- # Frontend Design Guide
6
+ # Frontend Design Skill
7
7
 
8
- Use this skill to keep UI work intentional, distinctive, and production-grade.
8
+ This skill guides creation of distinctive, production-grade frontend interfaces that avoid generic "AI slop" aesthetics. Implement real working code with exceptional attention to aesthetic details and creative choices.
9
+
10
+ The user provides frontend requirements: a component, page, application, or interface to build. They may include context about the purpose, audience, or technical constraints.
9
11
 
10
12
  ## Design Thinking
11
13
 
12
- Before coding:
14
+ Before coding, understand the context and commit to a BOLD aesthetic direction:
15
+
16
+ - **Purpose:** What problem does this interface solve? Who uses it?
17
+ - **Tone:** Pick an extreme: modern minimal, maximalist chaos, Microsoft's Fluent design language, organic/natural, luxury/refined, playful/toy-like, editorial/magazine, brutalist/raw, art deco/geometric, soft/pastel, industrial/utilitarian, etc. There are so many flavors to choose from. Use these for inspiration but design one that is true to the aesthetic direction.
18
+ - **Constraints:** Technical requirements (framework, performance, accessibility).
19
+ - For CAP code apps, treat workspace configuration and loaded skills as the source of truth for technical constraints. If `power.config.json` or the agent prompt already fixes the stack, connector, or app name, do not ask the user to restate them.
20
+ - **Differentiation:** What makes this UNFORGETTABLE? What's the one thing someone will remember?
21
+
22
+ **CRITICAL:** Choose a clear conceptual direction and execute it with precision. Bold maximalism and refined minimalism both work - the key is intentionality, not intensity.
23
+
24
+ Then implement working code in the project's required stack. Default to plain HTML/CSS/JS when the workspace instructions or agent prompt do not explicitly require a framework. Do not ask the user to choose React, Vue, or another framework unless the project requirements are genuinely ambiguous.
25
+
26
+ - Production-grade and functional
27
+ - Visually striking and memorable
28
+ - Cohesive with a clear aesthetic point-of-view
29
+ - Meticulously refined in every detail
13
30
 
14
- - Understand the purpose, audience, and constraints.
15
- - Commit to a clear aesthetic direction instead of blending safe defaults.
16
- - Treat the existing workspace configuration and loaded skills as the source of truth for stack and app constraints.
17
- - Default to plain HTML, CSS, and JS when the repo does not require a framework.
31
+ ## Frontend Aesthetics Guidelines
18
32
 
19
- ## Aesthetic Rules
33
+ Focus on:
20
34
 
21
- - Choose fonts with character. Avoid default system-looking results.
22
- - Use a deliberate palette with clear hierarchy and CSS variables.
23
- - Build atmosphere with gradients, textures, overlays, or shape systems instead of flat backgrounds.
24
- - Use motion for a few strong moments rather than generic micro-animations everywhere.
25
- - Make layouts feel designed, not template-generated.
35
+ - **Typography:** Choose fonts that are beautiful, unique, and interesting. Avoid generic fonts like Arial and Inter; opt instead for distinctive choices that elevate the frontend's aesthetics; unexpected, characterful font choices. Pair a distinctive display font with a refined body font.
36
+ - **Color & Theme:** Commit to a cohesive aesthetic. Use CSS variables for consistency. Dominant colors with sharp accents outperform timid, evenly-distributed palettes.
37
+ - **Motion:** Use animations for effects and micro-interactions. Prioritize CSS-only solutions for HTML. Only use framework-specific animation libraries when the project already uses that framework. Focus on high-impact moments: one well-orchestrated page load with staggered reveals (animation-delay) creates more delight than scattered micro-interactions. Use scroll-triggering and hover states that surprise.
38
+ - **Spatial Composition:** Unexpected layouts. Asymmetry. Overlap. Diagonal flow. Grid-breaking elements. Generous negative space OR controlled density.
39
+ - **Backgrounds & Visual Details:** Create atmosphere and depth rather than defaulting to solid colors. Add contextual effects and textures that match the overall aesthetic. Apply creative forms like gradient meshes, noise textures, geometric patterns, layered transparencies, dramatic shadows, decorative borders, custom cursors, and grain overlays.
40
+ NEVER use generic AI-generated aesthetics like overused font families (Inter, Roboto, Arial, system fonts), cliched color schemes (particularly purple gradients on white backgrounds), predictable layouts and component patterns, and cookie-cutter design that lacks context-specific character.
26
41
 
27
- ## Avoid
42
+ Interpret creatively and make unexpected choices that feel genuinely designed for the context. No design should be the same. Vary between light and dark themes, different fonts, different aesthetics. NEVER converge on common choices (Space Grotesk, for example) across generations.
28
43
 
29
- - Generic AI-looking typography and spacing.
30
- - Purple-on-white gradient defaults.
31
- - Cookie-cutter cards and dashboards with no point of view.
32
- - Asking the user to pick a framework when the repo already implies one.
44
+ IMPORTANT: Match implementation complexity to the aesthetic vision. Maximalist designs need elaborate code with extensive animations and effects. Minimalist or refined designs need restraint, precision, and careful attention to spacing, typography, and subtle details. Elegance comes from executing the vision well.
33
45
 
34
- Push for work that feels specific to the app instead of interchangeable.
46
+ Remember: LLMs are capable of extraordinary creative work. Don't hold back, show what can truly be created when thinking outside the box and committing fully to a distinctive vision.
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: keyvault
3
+ description: "Use when: building or debugging Azure Key Vault connector flows in a Power Apps Code App, including keys, secrets, metadata, or encryptData and decryptData helpers."
4
+ ---
5
+
6
+ # Azure Key Vault Connector Guide
7
+
8
+ > Agent limitation: do not use CLI commands directly from chat for Key Vault connector setup. Use the built-in Auth, Sync Connections, and Deploy buttons instead.
9
+
10
+ ## Core Rule
11
+
12
+ The wrapper in `codeApp/dist/connectors/azureKeyvault.js` is the repo-local source of truth for public helper names, supported operations, and parameter normalization.
13
+
14
+ - It retries the data-source names `keyvault`, `KeyVault`, `azurekeyvault`, `azureKeyVault`, and `AzureKeyVault`.
15
+ - It includes inline metadata for the key, secret, metadata, and encrypt/decrypt actions it supports.
16
+ - Vault selection is handled by the Power Apps connector connection, not by passing a vault name into each helper call.
17
+
18
+ ## First Questions To Ask
19
+
20
+ Ask only what is needed to choose the right helper and confirm the right connection:
21
+
22
+ 1. Does the app need keys, secrets, or both?
23
+ 2. Does it need metadata only, the secret value itself, or encryption/decryption operations?
24
+ 3. Is a specific key version or secret version required?
25
+ 4. Does `power.config.json` already contain a Key Vault connection reference?
26
+ 5. Is the existing Key Vault connection already pointing at the correct vault?
27
+
28
+ ## power.config.json
29
+
30
+ Prefer a Key Vault connection reference whose `dataSources` array contains `keyvault`.
31
+
32
+ ```json
33
+ {
34
+ "connectionReferences": {
35
+ "keyvaultConnection": {
36
+ "id": "/providers/Microsoft.PowerApps/apis/shared_keyvault",
37
+ "displayName": "Azure Key Vault",
38
+ "dataSources": ["keyvault"],
39
+ "dataSets": {}
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ Rules for editing `power.config.json`:
46
+
47
+ - Preserve existing keys such as `sharedConnectionId`, `authenticationType`, and working connection metadata.
48
+ - Prefer `keyvault` as the exposed data-source name even though the wrapper retries additional casing variants.
49
+ - The connection-reference object key can vary by environment, but the wrapper-facing data source should stay aligned.
50
+ - No Dataverse tables are required for Key Vault-only apps.
51
+ - Do not invent custom top-level config keys for vault auth or tokens.
52
+
53
+ ## Public Helper Surface
54
+
55
+ The wrapper exports:
56
+
57
+ - `callKeyVaultOperation(operationName, parameters)`
58
+ - `listKeys(oOptions)`
59
+ - `listKeyVersions(keyName)`
60
+ - `getKeyMetadata(keyName)`
61
+ - `getKeyVersionMetadata(keyName, keyVersion)`
62
+ - `encryptData(keyName, inputOrOptions)`
63
+ - `encryptDataWithVersion(keyName, keyVersion, inputOrOptions)`
64
+ - `decryptData(keyName, inputOrOptions)`
65
+ - `decryptDataWithVersion(keyName, keyVersion, inputOrOptions)`
66
+ - `getSecret(secretName)`
67
+ - `listSecrets(oOptions)`
68
+ - `listSecretVersions(secretName)`
69
+ - `getSecretMetadata(secretName)`
70
+ - `getSecretVersionMetadata(secretName, secretVersion)`
71
+ - `getSecretVersion(secretName, secretVersion)`
72
+
73
+ ## Supported Connector Actions
74
+
75
+ The wrapper currently maps to these connector actions:
76
+
77
+ - `ListKeys`
78
+ - `ListKeyVersions`
79
+ - `GetKeyMetadata`
80
+ - `GetKeyVersionMetadata`
81
+ - `EncryptData`
82
+ - `EncryptDataWithVersion`
83
+ - `DecryptData`
84
+ - `DecryptDataWithVersion`
85
+ - `GetSecret`
86
+ - `ListSecrets`
87
+ - `ListSecretVersions`
88
+ - `GetSecretMetadata`
89
+ - `GetSecretVersionMetadata`
90
+ - `GetSecretVersion`
91
+
92
+ ## Important Wrapper Behavior
93
+
94
+ - `encryptData(...)` and `decryptData(...)` automatically switch to the versioned connector action when `keyVersion` is supplied in the options object.
95
+ - Encryption and decryption helpers accept either positional arguments or an options object.
96
+ - `operationInput` is normalized from shapes like `operationInput`, `input`, or `body`.
97
+ - For encryption, the wrapper looks for payload values such as `rawData`, `data`, `raw`, `plainText`, `plaintext`, or `value`.
98
+ - For decryption, the wrapper looks for payload values such as `encryptedData`, `cipherText`, `ciphertext`, `data`, or `value`.
99
+ - The default algorithm is `RSA-OAEP-256` when none is supplied.
100
+ - Key and secret helpers accept object forms such as `{ keyName, version }` or `{ secretName, secretVersion }`.
101
+ - The wrapper accepts `apiVersion`-shaped arguments on some secret helpers for compatibility, but the current implementation does not pass `apiVersion` through to the connector call.
102
+
103
+ ## Usage Rules
104
+
105
+ - Use `listKeys(...)` and `listSecrets(...)` for discovery.
106
+ - Use metadata helpers when the app only needs properties, status, or version information.
107
+ - Use `getSecret(...)` or `getSecretVersion(...)` only when the app actually needs the secret value.
108
+ - Prefer `encryptData(...)` and `decryptData(...)` over raw calls when the wrapper already supports the operation.
109
+ - If the app requires an exact key version, pass `keyVersion` explicitly or call the version-specific helper.
110
+ - Do not add manual auth headers or direct Key Vault REST calls when the connector helper already exists.
111
+
112
+ ## Raw Calls
113
+
114
+ Use `callKeyVaultOperation(operationName, parameters)` only when a dedicated helper does not already exist.
115
+
116
+ Do not invent:
117
+
118
+ - connector action names
119
+ - `operationInput` field names
120
+ - raw Key Vault REST paths
121
+ - manual `api-version` query handling in app code
122
+ - manual auth headers or token acquisition
123
+
124
+ ## Debugging
125
+
126
+ - If the failure mentions a missing connection reference, confirm `power.config.json` exposes a Key Vault connection and prefer `dataSources: ["keyvault"]`.
127
+ - If the app hits the wrong vault, the underlying Power Apps connection is likely pointing at a different vault. The wrapper does not choose vaults per request.
128
+ - If encryption or decryption fails with input-shape errors, verify the payload resolves to `operationInput` with `rawData` or `encryptedData` after normalization.
129
+ - If a version-specific operation is expected but the unversioned action runs, confirm `keyVersion` was actually supplied.
130
+ - If changing `apiVersion` appears to do nothing, that is expected with the current wrapper because it does not send `apiVersion` through to the connector.
131
+ - If a raw call fails but a dedicated helper exists, switch back to the helper before debugging deeper connector behavior.
132
+
133
+ ## Summary Rules
134
+
135
+ - Treat `codeApp/dist/connectors/azureKeyvault.js` as the public API contract.
136
+ - Prefer `keyvault` as the configured data-source name.
137
+ - Use dedicated helpers for keys, secrets, and crypto before raw operations.
138
+ - Remember that vault selection lives in the connector connection, not in helper parameters.
139
+ - Do not rely on `apiVersion` arguments to change connector behavior unless the wrapper is updated.
@@ -5,57 +5,78 @@ description: "Use when: building or debugging Office 365 Groups connector flows
5
5
 
6
6
  # Office 365 Groups Connector Guide
7
7
 
8
- > Agent limitation: do not use CLI commands directly from chat for Office 365 Groups setup. Use the built-in Sync Connections and Deploy buttons instead.
8
+ Do not use CLI PAC commands to get connecctor models or services,
9
+ use `codeApp/dist/connectors/office365groups.js` as the repo source of truth.
9
10
 
10
- ## Core Rule
11
+ ## power.config.json
11
12
 
12
- The wrapper in `dev files/office365groups.js` is the repo-local source of truth.
13
+ Always read the current `power.config.json` before editing it.
13
14
 
14
- - It retries both `office365groups` and `Office365Groups`.
15
- - It keeps the public helper surface stable even though the raw connector operations are runtime-resolved.
16
- - Do not replace it with made-up placeholder paths copied from generic examples.
15
+ Ensure `"id": "/providers/Microsoft.PowerApps/apis/shared_office365"` exists.
17
16
 
18
- ## power.config.json
17
+ ```json
18
+ "connectionReferences": {
19
+ "office365groups": {
20
+ "id": "/providers/Microsoft.PowerApps/apis/shared_office365groups",
21
+ "displayName": "Office 365 Groups",
22
+ "dataSources": [
23
+ "office365groups"
24
+ ],
25
+ "authenticationType": null,
26
+ "sharedConnectionId": null,
27
+ "dataSets": {}
28
+ }
29
+ }
30
+ ```
31
+
32
+ Rules for editing `power.config.json`:
19
33
 
20
- Prefer a connection reference whose `dataSources` array includes `office365groups`.
34
+ - Preserve existing keys such as `sharedConnectionId`, `authenticationType`, and other working connection metadata.
35
+ - If the app uses Dataverse environment variables, also load the environment-variables skill.
21
36
 
22
- Older apps may still use `Office365Groups`; the wrapper retries both.
37
+ ## Core Rule
23
38
 
24
- ## Public Helper Surface
39
+ Prefer the exported helper layer instead of wiring raw connector operations directly in app code.
25
40
 
26
- The wrapper exports:
41
+ ## Action Helper Surface
27
42
 
43
+ - `callGroupsOperation(operationName, parameters)`
44
+ - `openGroupsHttpRequest(options)`
28
45
  - `listMyGroups(options)`
29
46
  - `listOwnedGroups(options)`
30
47
  - `listGroups(options)`
31
48
  - `listGroupMembers(groupId, options)`
32
- - `onGroupMembershipChange(groupId, options)`
33
49
  - `addMemberToGroup(userUpn, groupId)`
34
50
  - `removeMemberFromGroup(userUpn, groupId)`
35
51
  - `createGroupEvent(groupId, options)`
36
52
  - `updateGroupEvent(eventId, options, groupId)`
37
53
  - `deleteGroupEvent(eventId, groupId)`
38
- - `onNewGroupEvent(groupId)`
39
54
  - `listDeletedGroups()`
40
55
  - `restoreDeletedGroup(groupId)`
41
56
  - `listDeletedGroupsByOwner(userId)`
42
- - `openGroupsHttpRequest(options)`
43
57
 
44
- ## Important Wrapper Behavior
58
+ ## Latest Action Defaults
59
+
60
+ - `listMyGroups({ version: 1|2|3 })` routes to `ListOwnedGroups`, `ListOwnedGroups_V2`, or `ListOwnedGroups_V3`.
61
+ - `listGroups(...)` supports `$filter`, `$top`, `skipToken`, `nextLink`, and `skip` aliases.
62
+ - `createGroupEvent(...)` defaults to `CreateCalendarEventV2`.
63
+ - `deleteGroupEvent(...)` uses `CalendarDeleteItem_V2`.
64
+ - `openGroupsHttpRequest(...)` can target `HttpRequest` or `HttpRequestV2` through `version`, `useV2`, or `operationName`.
45
65
 
46
- - `listMyGroups({ version: 1|2|3 })` switches between `ListOwnedGroups`, `ListOwnedGroups_V2`, and `ListOwnedGroups_V3`.
47
- - `listGroups(...)` supports `$filter`, `$top`, `skipToken`, `nextLink`, and compatibility aliases like `skip`.
48
- - Event helpers accept flexible options objects and normalize event payloads for the connector.
49
- - `openGroupsHttpRequest(...)` maps friendly inputs to connector fields like `Uri`, `Method`, `Body`, `ContentType`, and `CustomHeader1..5`.
50
- - `openGroupsHttpRequest(...)` can target `HttpRequest` or `HttpRequestV2` with `version` or `useV2`.
66
+ ## HTTP Escape Hatch
51
67
 
52
- ## Raw Calls
68
+ `openGroupsHttpRequest(...)` maps friendly inputs to connector fields:
53
69
 
54
- Use `callGroupsOperation(operationName, parameters)` only when a high-level helper does not exist.
70
+ - `uri` -> `Uri`
71
+ - `method` -> `Method`
72
+ - `body` -> `Body`
73
+ - `contentType` -> `ContentType`
74
+ - `customHeaders[0..4]` -> `CustomHeader1..5`
55
75
 
56
- Do not bypass the wrapper with direct Graph calls for operations already covered by the connector.
76
+ Use this only when no helper exists for the action you need.
57
77
 
58
78
  ## Debugging
59
79
 
60
- - If the failure is `Connection reference not found`, confirm the app exposes either `office365groups` or `Office365Groups` in `power.config.json`.
61
- - If an HTTP request fails, verify the wrapper is sending connector-style fields rather than raw fetch-style headers.
80
+ - Keep helper names stable and widen alias support instead of adding another parallel wrapper.
81
+ - If group pagination fails, pass `skipToken` or `nextLink`, not a raw `$skip` query.
82
+ - If HTTP requests fail, verify you are sending connector-style fields through `openGroupsHttpRequest(...)`.
@@ -5,48 +5,79 @@ description: "Use when: building or debugging Outlook connector flows in a Power
5
5
 
6
6
  # Office 365 Outlook Connector Guide
7
7
 
8
- > Agent limitation: do not use CLI commands directly from chat for Outlook setup. Use the built-in Sync Connections and Deploy buttons instead.
8
+ Do not use CLI PAC commands to get connecctor models or services,
9
+ use `codeApp/dist/connectors/office365outlook.js` as the repo source of truth.
9
10
 
10
- ## Core Rule
11
11
 
12
- The wrapper in `dev files/outlook.js` is the repo-local source of truth, and `dev files/outlook-helper-reference.md` documents its accepted aliases.
12
+ ## power.config.json
13
+
14
+ Always read the current `power.config.json` before editing it.
15
+
16
+ Ensure `"id": "/providers/Microsoft.PowerApps/apis/shared_office365"` exists.
17
+
18
+ ```json
19
+ "connectionReferences": {
20
+ "office365outlook": {
21
+ "id": "/providers/Microsoft.PowerApps/apis/shared_office365",
22
+ "displayName": "Office 365 Outlook",
23
+ "dataSources": [
24
+ "office365"
25
+ ],
26
+ "authenticationType": null,
27
+ "sharedConnectionId": null,
28
+ "dataSets": {}
29
+ }
30
+ }
31
+ ```
13
32
 
14
- - It retries `office365outlook`, `Office365Outlook`, and `office365`.
15
- - It includes inline metadata for the operations the wrapper exposes.
16
- - Many helpers choose the operation version automatically.
33
+ Rules for editing `power.config.json`:
34
+
35
+ - Preserve existing keys such as `sharedConnectionId`, `authenticationType`, and other working connection metadata.
36
+ - If the app uses Dataverse environment variables, also load the environment-variables skill.
37
+
38
+ ## Core Rule
17
39
 
18
- Prefer `office365` in `power.config.json`, while keeping the wrapper's candidate names intact.
40
+ Prefer the exported helper layer instead of hard-coding raw operation names in app code.
19
41
 
20
- ## Public Helper Surface
42
+ The helper layer defaults to the latest action versions where the connector exposes them.
21
43
 
22
- The wrapper exports helpers for:
44
+ ## Action Helper Surface
23
45
 
24
- - Mail: `sendEmail`, `listEmails`, `getEmail`, `forwardEmail`, `replyToEmail`, `moveEmail`, `deleteEmail`, `draftEmail`, `updateDraftEmail`, `sendDraftEmail`, `markEmailAsRead`, `updateEmailFlag`, `getEmailAttachment`, `assignOutlookCategory`, `assignOutlookCategoryBulk`
46
+ - Mail: `sendEmail`, `listEmails`, `getEmail`, `forwardEmail`, `replyToEmail`, `moveEmail`, `deleteEmail`, `draftEmail`, `updateDraftEmail`, `sendDraftEmail`, `markEmailAsRead`, `updateEmailFlag`, `getEmailAttachment`
47
+ - Categories: `listOutlookCategories`, `assignOutlookCategory`, `assignOutlookCategoryBulk`
25
48
  - Shared mailbox: `sendFromSharedMailbox`
26
- - Calendar: `createEvent`, `listEvents`, `editEvent`, `deleteEvent`, `listCalendars`, `getEvent`, `getCalendarView`, `respondToEventInvite`, `findMeetingTimes`, `listRoomLists`, `listRooms`, `listRoomsInRoomList`, `setAutomaticReplies`, `getMailTips`
49
+ - Calendar: `createEvent`, `listEvents`, `editEvent`, `deleteEvent`, `listCalendars`, `getEvent`, `getCalendarView`, `respondToEventInvite`, `findMeetingTimes`, `setAutomaticReplies`, `getMailTips`, `listRoomLists`, `listRooms`, `listRoomsInRoomList`
27
50
  - Contacts: `listContactFolders`, `listContacts`, `getContact`, `createContact`, `updateContact`, `deleteContact`
28
51
  - Advanced: `callOutlookOperation`, `callOutlookHttpRequest`, `manageOutlookEmails`, `manageOutlookMeetings`, `manageOutlookContacts`
29
52
 
30
- ## Important Wrapper Defaults
53
+ ## Latest Action Defaults
31
54
 
32
- - `sendEmail(...)` uses `SendEmailV2` unless `isHtml === false`, in which case it uses the legacy plain-text action.
33
- - `listEmails(...)` defaults to version 3, folder `Inbox`, and `top: 10`.
34
- - `replyToEmail(...)` uses `ReplyToV3` unless `isHtml === false`.
35
- - `getEmail(...)` defaults to the V2 action.
55
+ - `sendEmail(...)` defaults to `SendEmailV2` and only falls back to plain-text `SendEmail` when `isHtml === false`.
56
+ - `listEmails(...)` defaults to `GetEmailsV3`, folder `Inbox`, and `top: 10`.
57
+ - `getEmail(...)` defaults to `GetEmailV2`.
58
+ - `replyToEmail(...)` defaults to `ReplyToV3` and only falls back to `ReplyToV2` for plain-text replies.
59
+ - `moveEmail(...)` uses `MoveV2`.
36
60
  - `createEvent(...)`, `listEvents(...)`, and `editEvent(...)` use the V4 calendar actions.
37
- - `markEmailAsRead(...)` uses the V3 action unless the caller explicitly requests the older legacy pattern.
61
+ - `deleteEvent(...)` uses `CalendarDeleteItem_V2`.
62
+ - `findMeetingTimes(...)` uses `FindMeetingTimes_V2`.
63
+ - `setAutomaticReplies(...)` defaults to `SetAutomaticRepliesSetting_V2`.
64
+ - `getMailTips(...)` defaults to `GetMailTips_V2` when a request body is supplied.
65
+ - Contact helpers use the V2 contact actions.
38
66
 
39
- ## Raw HTTP Calls
67
+ ## HTTP Escape Hatch
40
68
 
41
- `callOutlookHttpRequest(...)` expects the connector-style field mapping used by the wrapper.
69
+ `callOutlookHttpRequest(...)` maps friendly inputs to connector fields:
42
70
 
43
- - Pass `uri`, `method`, `body`, `contentType`, and `customHeaders`.
44
- - The wrapper maps them to `Uri`, `Method`, `Body`, `ContentType`, and `CustomHeader1..5`.
71
+ - `uri` -> `Uri`
72
+ - `method` -> `Method`
73
+ - `body` -> `Body`
74
+ - `contentType` -> `ContentType`
75
+ - `customHeaders[0..4]` -> `CustomHeader1..5`
45
76
 
46
- Do not reuse the SharePoint or Teams raw HTTP pattern here.
77
+ Use this only when no helper exists for the action you need.
47
78
 
48
79
  ## Debugging
49
80
 
50
- - If the failure mentions `Connection reference not found`, verify `power.config.json` exposes one of the wrapper's candidate data-source names.
51
- - If a versioned mail or calendar call behaves unexpectedly, check the wrapper default before changing the raw operation name.
52
- - For alias-heavy helpers, consult `dev files/outlook-helper-reference.md` before adding new parameter mapping logic.
81
+ - If a mail helper behaves differently than expected, check its default version before changing the raw connector action.
82
+ - If HTTP calls fail, verify you are passing connector-style fields through `callOutlookHttpRequest(...)`, not fetch-style options.
83
+ - Keep helper names stable and widen alias support instead of introducing another parallel wrapper.