codeapp-js 1.0.2 → 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 (128) 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/keyvault/SKILL.md +139 -0
  5. package/AI/skills/office365-groups/SKILL.md +46 -25
  6. package/AI/skills/office365-outlook/SKILL.md +56 -25
  7. package/AI/skills/office365-users/SKILL.md +41 -36
  8. package/AI/skills/sharepoint/SKILL.md +174 -31
  9. package/AI/skills/start/SKILL.md +1 -0
  10. package/codeApp/dist/connectors/autoreview.js +1654 -0
  11. package/codeApp/dist/connectors/office365groups.js +2995 -432
  12. package/{examples/outlook Demo/.power/schemas/office365/office365.Schema.json → codeApp/dist/connectors/office365outlook.js} +7439 -16
  13. package/codeApp/dist/connectors/office365users.js +2990 -349
  14. package/codeApp/dist/connectors/sharepoint.js +529 -308
  15. package/examples/combined demo/dist/connectors/office365outlook.js +28521 -0
  16. package/examples/combined demo/dist/connectors/office365users.js +3154 -0
  17. package/examples/combined demo/dist/index.js +2 -6
  18. package/examples/combined demo/power.config.json +1 -1
  19. package/examples/groups Demo/{.power/schemas/office365groups/office365groups.Schema.json → dist/connectors/office365groups.js } +3205 -2204
  20. package/examples/groups Demo/dist/index.js +1 -5
  21. package/examples/groups Demo/power.config.json +1 -1
  22. package/examples/myProfile/dist/connectors/office365users.js +3154 -0
  23. package/examples/myProfile/dist/index.js +1 -5
  24. package/examples/myProfile/power.config.json +1 -1
  25. package/examples/outlook Demo/dist/connectors/office365outlook.js +28521 -0
  26. package/examples/outlook Demo/dist/index.js +2 -5
  27. package/examples/outlook Demo/power.config.json +1 -1
  28. package/examples/sharePoint Demo/dist/connectors/sharepoint.js +687 -0
  29. package/examples/sharePoint Demo/dist/index.js +86 -127
  30. package/examples/sharePoint Demo/power.config.json +1 -1
  31. package/package.json +1 -1
  32. package/codeApp/.power/schemas/appschemas/dataSourcesInfo.ts +0 -6275
  33. package/codeApp/.power/schemas/jira/jira.Schema.json +0 -6903
  34. package/codeApp/.power/schemas/keyvault/keyvault.Schema.json +0 -1600
  35. package/codeApp/.power/schemas/office365groups/office365groups.Schema.json +0 -2204
  36. package/codeApp/.power/schemas/teams/teams.Schema.json +0 -11112
  37. package/codeApp/dist/connectors/outlook.js +0 -1393
  38. package/codeApp/src/generated/models/AzureKeyVaultModel.ts +0 -107
  39. package/codeApp/src/generated/models/JiraModel.ts +0 -501
  40. package/codeApp/src/generated/models/Office365GroupsModel.ts +0 -363
  41. package/codeApp/src/generated/models/Office365OutlookModel.ts +0 -2046
  42. package/codeApp/src/generated/models/Office365UsersModel.ts +0 -254
  43. package/codeApp/src/generated/services/AzureKeyVaultService.ts +0 -257
  44. package/codeApp/src/generated/services/JiraService.ts +0 -1124
  45. package/codeApp/src/generated/services/Office365GroupsService.ts +0 -326
  46. package/codeApp/src/generated/services/Office365OutlookService.ts +0 -2476
  47. package/codeApp/src/generated/services/Office365UsersService.ts +0 -358
  48. package/examples/apps/kanban/dist/dataverse.js +0 -94
  49. package/examples/apps/kanban/dist/environmentVar.js +0 -55
  50. package/examples/apps/kanban/dist/index.css +0 -605
  51. package/examples/apps/kanban/dist/index.html +0 -21
  52. package/examples/apps/kanban/dist/index.js +0 -860
  53. package/examples/apps/kanban/dist/office365groups.js +0 -97
  54. package/examples/apps/kanban/dist/office365users.js +0 -451
  55. package/examples/apps/kanban/dist/outlook.js +0 -162
  56. package/examples/apps/kanban/dist/power-apps-data.js +0 -2953
  57. package/examples/apps/kanban/dist/sharepoint.js +0 -435
  58. package/examples/apps/kanban/power.config.json +0 -35
  59. package/examples/apps/kanban/src/generated/index.ts +0 -14
  60. package/examples/apps/kanban/src/generated/models/Office365GroupsModel.ts +0 -363
  61. package/examples/apps/kanban/src/generated/models/Office365OutlookModel.ts +0 -2046
  62. package/examples/apps/kanban/src/generated/models/Office365UsersModel.ts +0 -254
  63. package/examples/apps/kanban/src/generated/services/Office365GroupsService.ts +0 -326
  64. package/examples/apps/kanban/src/generated/services/Office365OutlookService.ts +0 -2476
  65. package/examples/apps/kanban/src/generated/services/Office365UsersService.ts +0 -358
  66. package/examples/apps/planning Poker/additional files/AgilePoker_1_0_0_1.zip +0 -0
  67. package/examples/apps/planning Poker/additional files/PokerTables_1_0_0_1.zip +0 -0
  68. package/examples/apps/planning Poker/additional files/customizations (tables).xml +0 -6429
  69. package/examples/apps/planning Poker/additional files/dataverse-tables.json +0 -165
  70. package/examples/apps/planning Poker/additional files/readme.md +0 -122
  71. package/examples/apps/planning Poker/dist/dataverse.js +0 -78
  72. package/examples/apps/planning Poker/dist/index.html +0 -198
  73. package/examples/apps/planning Poker/dist/index.js +0 -955
  74. package/examples/apps/planning Poker/dist/power-apps-data.js +0 -2953
  75. package/examples/apps/planning Poker/dist/styles.css +0 -815
  76. package/examples/apps/planning Poker/power.config.json +0 -50
  77. package/examples/apps/solution explorer/dist/codeapp.js +0 -1098
  78. package/examples/apps/solution explorer/dist/icon-512.png +0 -0
  79. package/examples/apps/solution explorer/dist/index.html +0 -80
  80. package/examples/apps/solution explorer/dist/index.js +0 -735
  81. package/examples/apps/solution explorer/dist/power-apps-data.js +0 -3007
  82. package/examples/apps/solution explorer/dist/styles.css +0 -571
  83. package/examples/apps/solution explorer/power.config.json +0 -151
  84. package/examples/apps/todo/dist/dataverse.js +0 -64
  85. package/examples/apps/todo/dist/icon192.png +0 -0
  86. package/examples/apps/todo/dist/index.html +0 -75
  87. package/examples/apps/todo/dist/index.js +0 -9
  88. package/examples/apps/todo/dist/power-apps-data.js +0 -2953
  89. package/examples/apps/todo/dist/renderer.js +0 -375
  90. package/examples/apps/todo/dist/styles.css +0 -691
  91. package/examples/apps/todo/power.config.json +0 -35
  92. package/examples/combined demo/.power/schemas/appschemas/dataSourcesInfo.ts +0 -6275
  93. package/examples/combined demo/.power/schemas/jira/jira.Schema.json +0 -6903
  94. package/examples/combined demo/.power/schemas/keyvault/keyvault.Schema.json +0 -1600
  95. package/examples/combined demo/.power/schemas/teams/teams.Schema.json +0 -11112
  96. package/examples/combined demo/dist/office365users.js +0 -513
  97. package/examples/combined demo/dist/outlook.js +0 -1393
  98. package/examples/combined demo/src/generated/index.ts +0 -12
  99. package/examples/combined demo/src/generated/models/AzureKeyVaultModel.ts +0 -107
  100. package/examples/combined demo/src/generated/models/JiraModel.ts +0 -501
  101. package/examples/combined demo/src/generated/models/Office365GroupsModel.ts +0 -363
  102. package/examples/combined demo/src/generated/models/Office365OutlookModel.ts +0 -2046
  103. package/examples/combined demo/src/generated/models/Office365UsersModel.ts +0 -254
  104. package/examples/combined demo/src/generated/services/AzureKeyVaultService.ts +0 -257
  105. package/examples/combined demo/src/generated/services/JiraService.ts +0 -1124
  106. package/examples/combined demo/src/generated/services/Office365GroupsService.ts +0 -326
  107. package/examples/combined demo/src/generated/services/Office365OutlookService.ts +0 -2476
  108. package/examples/combined demo/src/generated/services/Office365UsersService.ts +0 -358
  109. package/examples/groups Demo/.power/schemas/appschemas/dataSourcesInfo.ts +0 -613
  110. package/examples/groups Demo/dist/office365groups.js +0 -642
  111. package/examples/groups Demo/src/generated/index.ts +0 -10
  112. package/examples/groups Demo/src/generated/models/Office365GroupsModel.ts +0 -363
  113. package/examples/groups Demo/src/generated/services/Office365GroupsService.ts +0 -326
  114. package/examples/myProfile/dist/office365users.js +0 -517
  115. package/examples/outlook Demo/.power/schemas/appschemas/dataSourcesInfo.ts +0 -6512
  116. package/examples/outlook Demo/dist/outlook.js +0 -1393
  117. package/examples/outlook Demo/src/generated/index.ts +0 -10
  118. package/examples/outlook Demo/src/generated/models/Office365OutlookModel.ts +0 -2046
  119. package/examples/outlook Demo/src/generated/services/Office365OutlookService.ts +0 -2476
  120. package/examples/sharePoint Demo/dist/sharepoint.js +0 -466
  121. package/examples/sharePoint Demo/src/generated/index.ts +0 -14
  122. package/examples/sharePoint Demo/src/generated/models/Office365GroupsModel.ts +0 -363
  123. package/examples/sharePoint Demo/src/generated/models/Office365OutlookModel.ts +0 -2046
  124. package/examples/sharePoint Demo/src/generated/models/Office365UsersModel.ts +0 -254
  125. package/examples/sharePoint Demo/src/generated/services/Office365GroupsService.ts +0 -326
  126. package/examples/sharePoint Demo/src/generated/services/Office365OutlookService.ts +0 -2476
  127. package/examples/sharePoint Demo/src/generated/services/Office365UsersService.ts +0 -358
  128. 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)`
@@ -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.
@@ -5,37 +5,45 @@ description: "Use when: building or debugging Office 365 Users connector flows i
5
5
 
6
6
  # Office 365 Users Connector Guide
7
7
 
8
- > Agent limitation: do not use CLI commands directly from chat for Office 365 Users 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/office365users.js` as the repo source of truth.
9
10
 
10
- ## Core Rule
11
-
12
- The wrapper in `dev files/office365users.js` is the repo-local source of truth.
13
-
14
- - It uses `office365users` as the connector data-source name.
15
- - It includes inline metadata for the supported operations.
16
- - It preserves older naming compatibility, but the main search operation used by the wrapper is `SearchUserV2`.
17
11
 
18
12
  ## power.config.json
19
13
 
20
- Expose `office365users` in the connection reference `dataSources` array.
14
+ Always read the current `power.config.json` before editing it.
15
+
16
+ Ensure `"id": "/providers/Microsoft.PowerApps/apis/shared_office365users"` exists.
21
17
 
22
18
  ```json
23
- {
24
- "connectionReferences": {
25
- "usersConnection": {
19
+ "connectionReferences": {
20
+ "office365users": {
26
21
  "id": "/providers/Microsoft.PowerApps/apis/shared_office365users",
27
22
  "displayName": "Office 365 Users",
28
- "dataSources": ["office365users"],
23
+ "dataSources": [
24
+ "office365users"
25
+ ],
26
+ "authenticationType": null,
27
+ "sharedConnectionId": null,
29
28
  "dataSets": {}
30
29
  }
31
- }
32
30
  }
33
31
  ```
34
32
 
35
- ## Public Helper Surface
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 exported helper layer instead of wiring raw connector operations directly in app code.
36
41
 
37
- The wrapper exports:
42
+ ## Action Helper Surface
38
43
 
44
+ - `callUsersOperation(operationName, parameters)`
45
+ - `openUsersHttpRequest(options)`
46
+ - `updateMyProfile(profile)`
39
47
  - `getMyProfile(options)`
40
48
  - `getUserProfile(userId, options)`
41
49
  - `getManager(userId, options)`
@@ -43,36 +51,33 @@ The wrapper exports:
43
51
  - `getMyTrendingDocuments(options)`
44
52
  - `getTrendingDocuments(userId, options)`
45
53
  - `getRelevantPeople(userId)`
46
- - `updateMyProfile(profile)`
47
54
  - `updateMyPhoto(bodyOrOptions, contentType)`
48
55
  - `getUserPhotoMetadata(userId)`
49
56
  - `getUserPhoto(userId)`
50
57
  - `searchForUsers(options)`
51
- - `openUsersHttpRequest(options)`
52
- - `callUsersOperation(operationName, parameters)`
53
58
 
54
- ## Important Wrapper Behavior
59
+ ## Latest Action Defaults
55
60
 
56
- - `select` can be an array or a comma-separated string.
57
- - `getDirectReports(...)` supports `top` and select options.
58
- - `searchForUsers(...)` uses `searchTerm`, `top`, `isSearchTermRequired`, and `skipToken`.
59
- - `searchForUsers(...)` accepts `nextLink` and legacy `skip` as compatibility inputs that the wrapper converts into `skipToken`.
60
- - `UserPhoto_V2` returns `image/jpeg`.
61
+ - Profile helpers default to the V2 profile and manager actions.
62
+ - `getDirectReports(...)` defaults to `DirectReports_V2`.
63
+ - `getUserPhoto(...)` uses `UserPhoto_V2`.
64
+ - `searchForUsers(...)` uses `SearchUserV2`.
65
+ - `searchForUsers(...)` accepts `nextLink` and `skip` aliases and converts them into `skipToken`.
61
66
 
62
- ## Raw HTTP Calls
67
+ ## HTTP Escape Hatch
63
68
 
64
- `openUsersHttpRequest(...)` does not use the simple `headers` object shape directly.
69
+ `openUsersHttpRequest(...)` maps friendly inputs to connector fields:
65
70
 
66
- The wrapper maps friendly inputs into connector fields:
71
+ - `uri` -> `Uri`
72
+ - `method` -> `Method`
73
+ - `body` -> `Body`
74
+ - `contentType` -> `ContentType`
75
+ - `customHeaders[0..4]` -> `CustomHeader1..5`
67
76
 
68
- - `Uri`
69
- - `Method`
70
- - `Body`
71
- - `ContentType`
72
- - `CustomHeader1..5`
77
+ Use this only when no helper exists for the action you need.
73
78
 
74
79
  ## Debugging
75
80
 
76
- - If search pagination is broken, verify the code is passing `skipToken` or `nextLink`, not `$skip`.
77
- - If HTTP requests fail, check whether the wrapper is being fed connector-style fields through `openUsersHttpRequest(...)` rather than raw fetch options.
78
- - Keep the existing helper names stable and widen input support instead of replacing them.
81
+ - If search pagination fails, pass `skipToken` or `nextLink`, not `$skip`.
82
+ - If HTTP requests fail, verify you are sending connector-style fields through `openUsersHttpRequest(...)`.
83
+ - Keep helper names stable and widen alias support instead of introducing another wrapper.