codeapp-js 0.3.0 → 1.0.1

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 (158) hide show
  1. package/AI/codeapp.agent.md +105 -0
  2. package/AI/skills/connections/SKILL.md +47 -0
  3. package/AI/skills/dataverse/SKILL.md +99 -0
  4. package/AI/skills/environment-variables/SKILL.md +89 -0
  5. package/AI/skills/frontend-design/SKILL.md +34 -0
  6. package/AI/skills/jira/SKILL.md +81 -0
  7. package/AI/skills/office365-groups/SKILL.md +61 -0
  8. package/AI/skills/office365-outlook/SKILL.md +52 -0
  9. package/AI/skills/office365-users/SKILL.md +78 -0
  10. package/AI/skills/sharepoint/SKILL.md +77 -0
  11. package/AI/skills/sql/SKILL.md +85 -0
  12. package/AI/skills/start/SKILL.md +46 -0
  13. package/AI/skills/teams/SKILL.md +55 -0
  14. package/{examples/combined demo/.power/schemas/office365groups/office365groups.Schema.json → codeApp/.power/schemas/office365groups/office365groups.Schema.json} +2203 -2203
  15. package/codeApp/dist/codeapp.js +95 -1792
  16. package/codeApp/dist/connectors/azureKeyvault.js +459 -0
  17. package/codeApp/dist/connectors/jira.js +1247 -0
  18. package/codeApp/dist/connectors/office365groups.js +642 -0
  19. package/codeApp/dist/connectors/office365users.js +513 -0
  20. package/codeApp/dist/connectors/outlook.js +1393 -0
  21. package/codeApp/dist/connectors/sharepoint.js +466 -0
  22. package/codeApp/dist/connectors/sql.js +149 -0
  23. package/codeApp/dist/connectors/teams.js +280 -0
  24. package/codeApp/dist/power-apps-data.js +16 -2
  25. package/examples/{kanban → apps/kanban}/dist/dataverse.js +94 -94
  26. package/examples/{kanban → apps/kanban}/dist/environmentVar.js +55 -55
  27. package/examples/{kanban → apps/kanban}/dist/index.css +605 -605
  28. package/examples/{kanban → apps/kanban}/dist/index.html +21 -21
  29. package/examples/{kanban → apps/kanban}/dist/index.js +860 -860
  30. package/examples/{kanban → apps/kanban}/dist/office365groups.js +97 -97
  31. package/examples/apps/kanban/dist/office365users.js +451 -0
  32. package/examples/{kanban → apps/kanban}/dist/outlook.js +162 -162
  33. package/examples/{planning Poker/dist/power-apps-data.js → apps/kanban/dist/power-apps-data.js} +2953 -2953
  34. package/examples/{kanban → apps/kanban}/dist/sharepoint.js +435 -339
  35. package/examples/{kanban → apps/kanban}/power.config.json +35 -35
  36. package/examples/{planning Poker → apps/planning Poker}/additional files/customizations (tables).xml +6428 -6428
  37. package/examples/{planning Poker → apps/planning Poker}/additional files/dataverse-tables.json +165 -165
  38. package/examples/{planning Poker → apps/planning Poker}/additional files/readme.md +122 -122
  39. package/examples/{planning Poker → apps/planning Poker}/dist/dataverse.js +78 -78
  40. package/examples/{planning Poker → apps/planning Poker}/dist/index.html +198 -198
  41. package/examples/{planning Poker → apps/planning Poker}/dist/index.js +954 -954
  42. package/examples/{todo/dist/power-apps-data.js → apps/planning Poker/dist/power-apps-data.js } +2953 -2953
  43. package/examples/{planning Poker → apps/planning Poker}/dist/styles.css +815 -815
  44. package/examples/{planning Poker → apps/planning Poker}/power.config.json +50 -50
  45. package/examples/{outlook Demo2 → apps/solution explorer}/dist/codeapp.js +9 -245
  46. package/examples/apps/solution explorer/dist/index.html +80 -0
  47. package/examples/apps/solution explorer/dist/index.js +735 -0
  48. package/examples/apps/solution explorer/dist/styles.css +571 -0
  49. package/examples/apps/solution explorer/power.config.json +151 -0
  50. package/examples/{todo → apps/todo}/dist/dataverse.js +64 -64
  51. package/examples/{todo → apps/todo}/dist/index.html +75 -75
  52. package/examples/{todo → apps/todo}/dist/index.js +8 -8
  53. package/examples/{kanban → apps/todo}/dist/power-apps-data.js +2953 -2953
  54. package/examples/{todo → apps/todo}/dist/renderer.js +375 -375
  55. package/examples/{todo → apps/todo}/dist/styles.css +691 -691
  56. package/examples/{todo → apps/todo}/power.config.json +34 -34
  57. package/examples/combined demo/.power/schemas/appschemas/dataSourcesInfo.ts +6275 -7830
  58. package/examples/combined demo/.power/schemas/jira/jira.Schema.json +6903 -0
  59. package/examples/combined demo/.power/schemas/keyvault/keyvault.Schema.json +1600 -0
  60. package/examples/combined demo/.power/schemas/teams/teams.Schema.json +11112 -0
  61. package/examples/combined demo/dist/codeapp.js +394 -1098
  62. package/examples/{outlook Demo2/OutlookDemo_1_0_0_1.zip → combined demo/dist/icon-512.png} +0 -0
  63. package/examples/combined demo/dist/index.html +29 -511
  64. package/examples/combined demo/dist/index.js +490 -470
  65. package/examples/combined demo/dist/office365users.js +513 -0
  66. package/examples/combined demo/dist/outlook.js +1393 -0
  67. package/examples/combined demo/dist/power-apps-data.js +3079 -3006
  68. package/examples/combined demo/dist/styles.css +483 -0
  69. package/examples/combined demo/power.config.json +33 -42
  70. package/examples/combined demo/src/generated/index.ts +12 -14
  71. package/examples/combined demo/src/generated/models/AzureKeyVaultModel.ts +107 -0
  72. package/examples/combined demo/src/generated/models/JiraModel.ts +501 -0
  73. package/examples/combined demo/src/generated/services/AzureKeyVaultService.ts +257 -0
  74. package/examples/combined demo/src/generated/services/JiraService.ts +1124 -0
  75. package/examples/dataverse Demo/dist/codeapp.js +394 -1085
  76. package/examples/dataverse Demo/dist/icon-512.png +0 -0
  77. package/examples/dataverse Demo/dist/index.html +146 -54
  78. package/examples/dataverse Demo/dist/index.js +693 -83
  79. package/examples/dataverse Demo/dist/power-apps-data.js +3079 -2911
  80. package/examples/dataverse Demo/dist/styles.css +528 -0
  81. package/examples/dataverse Demo/power.config.json +41 -35
  82. package/examples/dataverse Demo/readme.md +79 -79
  83. package/examples/groups Demo/dist/codeapp.js +394 -1085
  84. package/examples/groups Demo/dist/icon-512.png +0 -0
  85. package/examples/groups Demo/dist/index.html +21 -25
  86. package/examples/groups Demo/dist/index.js +304 -113
  87. package/examples/groups Demo/dist/office365groups.js +642 -0
  88. package/examples/groups Demo/dist/power-apps-data.js +3079 -2911
  89. package/examples/groups Demo/dist/styles.css +509 -0
  90. package/examples/groups Demo/power.config.json +25 -25
  91. package/examples/myProfile/dist/codeapp.js +398 -0
  92. package/examples/myProfile/dist/index.html +21 -184
  93. package/examples/myProfile/dist/index.js +324 -141
  94. package/examples/myProfile/dist/office365users.js +517 -169
  95. package/examples/myProfile/dist/power-apps-data.js +3080 -2953
  96. package/examples/myProfile/dist/styles.css +458 -0
  97. package/examples/myProfile/power.config.json +24 -23
  98. package/examples/outlook Demo/dist/codeapp.js +394 -1085
  99. package/examples/outlook Demo/dist/index.html +150 -35
  100. package/examples/outlook Demo/dist/index.js +516 -170
  101. package/examples/outlook Demo/dist/outlook.js +1393 -121
  102. package/examples/outlook Demo/dist/power-apps-data.js +3079 -2911
  103. package/examples/outlook Demo/dist/styles.css +408 -84
  104. package/examples/outlook Demo/power.config.json +24 -23
  105. package/examples/outlook Demo/readme.md +92 -82
  106. package/examples/sharePoint Demo/dist/codeapp.js +394 -1085
  107. package/examples/sharePoint Demo/dist/icon-512.png +0 -0
  108. package/examples/sharePoint Demo/dist/index.html +22 -255
  109. package/examples/sharePoint Demo/dist/index.js +899 -262
  110. package/examples/sharePoint Demo/dist/power-apps-data.js +3079 -2911
  111. package/{dev files → examples/sharePoint Demo/dist}/sharepoint.js +239 -112
  112. package/examples/sharePoint Demo/dist/styles.css +587 -0
  113. package/examples/sharePoint Demo/power.config.json +23 -22
  114. package/package.json +1 -1
  115. package/readme.md +465 -76
  116. package/.vscode/settings.json +0 -6
  117. package/dev files/customConnector.js +0 -98
  118. package/dev files/dataverse.js +0 -120
  119. package/dev files/environmentVar.js +0 -55
  120. package/dev files/office365groups.js +0 -65
  121. package/dev files/office365users.js +0 -169
  122. package/dev files/outlook.js +0 -330
  123. package/dev files/power-apps-data.js +0 -2952
  124. package/examples/combined demo/.power/schemas/office365/office365.Schema.json +0 -21098
  125. package/examples/combined demo/.power/schemas/office365users/office365users.Schema.json +0 -2094
  126. package/examples/kanban/agent/decision-log.md +0 -9
  127. package/examples/kanban/agent/mockup-01-editorial-glass.html +0 -159
  128. package/examples/kanban/agent/mockup-02-dark-rail.html +0 -147
  129. package/examples/kanban/agent/mockup-03-paper-grid.html +0 -114
  130. package/examples/kanban/agent/mockup-04-neon-minimal.html +0 -141
  131. package/examples/kanban/agent/mockup-05-mono-architect.html +0 -119
  132. package/examples/kanban/dist/office365users.js +0 -169
  133. package/examples/kanban/src/generated/index.ts +0 -14
  134. package/examples/kanban/src/generated/models/Office365GroupsModel.ts +0 -363
  135. package/examples/kanban/src/generated/models/Office365OutlookModel.ts +0 -2046
  136. package/examples/kanban/src/generated/models/Office365UsersModel.ts +0 -254
  137. package/examples/kanban/src/generated/services/Office365GroupsService.ts +0 -326
  138. package/examples/kanban/src/generated/services/Office365OutlookService.ts +0 -2476
  139. package/examples/kanban/src/generated/services/Office365UsersService.ts +0 -358
  140. package/examples/outlook Demo2/agent/decision-log.md +0 -7
  141. package/examples/outlook Demo2/dist/index.html +0 -98
  142. package/examples/outlook Demo2/dist/index.js +0 -272
  143. package/examples/outlook Demo2/dist/styles.css +0 -639
  144. package/examples/outlook Demo2/power.config.json +0 -23
  145. package/examples/planning Poker/.vscode/settings.json +0 -5
  146. package/examples/sharePoint Demo/agent/decision-log.md +0 -17
  147. /package/examples/{outlook Demo2 → apps/kanban}/src/generated/index.ts +0 -0
  148. /package/examples/{outlook Demo2 → apps/kanban}/src/generated/models/Office365GroupsModel.ts +0 -0
  149. /package/examples/{outlook Demo2 → apps/kanban}/src/generated/models/Office365OutlookModel.ts +0 -0
  150. /package/examples/{outlook Demo2 → apps/kanban}/src/generated/models/Office365UsersModel.ts +0 -0
  151. /package/examples/{outlook Demo2 → apps/kanban}/src/generated/services/Office365GroupsService.ts +0 -0
  152. /package/examples/{outlook Demo2 → apps/kanban}/src/generated/services/Office365OutlookService.ts +0 -0
  153. /package/examples/{outlook Demo2 → apps/kanban}/src/generated/services/Office365UsersService.ts +0 -0
  154. /package/examples/{planning Poker → apps/planning Poker}/additional files/AgilePoker_1_0_0_1.zip +0 -0
  155. /package/examples/{planning Poker → apps/planning Poker}/additional files/PokerTables_1_0_0_1.zip +0 -0
  156. /package/examples/{outlook Demo2 → apps/solution explorer}/dist/icon-512.png +0 -0
  157. /package/examples/{outlook Demo2 → apps/solution explorer}/dist/power-apps-data.js +0 -0
  158. /package/examples/{todo → apps/todo}/dist/icon192.png +0 -0
@@ -1,50 +1,50 @@
1
- {
2
- "appDisplayName": "Planning Poker",
3
- "description": "An agile planning poker app for sprint estimation sessions with team collaboration.",
4
- "environmentId": "<ENVIRONMENT ID>",
5
- "buildPath": "./dist",
6
- "buildEntryPoint": "index.html",
7
- "logoPath": "default",
8
- "localAppUrl": "http://localhost:3000",
9
- "region": "prod",
10
- "connectionReferences": {
11
- "dataverse": {
12
- "id": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps",
13
- "displayName": "Microsoft Dataverse",
14
- "dataSources": [
15
- "commondataserviceforapps"
16
- ],
17
- "authenticationType": null,
18
- "sharedConnectionId": null,
19
- "dataSets": {}
20
- }
21
- },
22
- "databaseReferences": {
23
- "default.cds": {
24
- "databaseDetails": null,
25
- "dataSources": {
26
- "wd_pokersessions": {
27
- "entitySetName": "wd_pokersessions",
28
- "logicalName": "wd_pokersession",
29
- "isHidden": false
30
- },
31
- "wd_pokerparticipants": {
32
- "entitySetName": "wd_pokerparticipants",
33
- "logicalName": "wd_pokerparticipant",
34
- "isHidden": false
35
- },
36
- "wd_pokerrounds": {
37
- "entitySetName": "wd_pokerrounds",
38
- "logicalName": "wd_pokerround",
39
- "isHidden": false
40
- },
41
- "wd_pokervotes": {
42
- "entitySetName": "wd_pokervotes",
43
- "logicalName": "wd_pokervote",
44
- "isHidden": false
45
- }
46
- },
47
- "actions": null
48
- }
49
- }
50
- }
1
+ {
2
+ "appDisplayName": "Planning Poker",
3
+ "description": "An agile planning poker app for sprint estimation sessions with team collaboration.",
4
+ "environmentId": "<ENVIRONMENT ID>",
5
+ "buildPath": "./dist",
6
+ "buildEntryPoint": "index.html",
7
+ "logoPath": "default",
8
+ "localAppUrl": "http://localhost:3000",
9
+ "region": "prod",
10
+ "connectionReferences": {
11
+ "dataverse": {
12
+ "id": "/providers/Microsoft.PowerApps/apis/shared_commondataserviceforapps",
13
+ "displayName": "Microsoft Dataverse",
14
+ "dataSources": [
15
+ "commondataserviceforapps"
16
+ ],
17
+ "authenticationType": null,
18
+ "sharedConnectionId": null,
19
+ "dataSets": {}
20
+ }
21
+ },
22
+ "databaseReferences": {
23
+ "default.cds": {
24
+ "databaseDetails": null,
25
+ "dataSources": {
26
+ "wd_pokersessions": {
27
+ "entitySetName": "wd_pokersessions",
28
+ "logicalName": "wd_pokersession",
29
+ "isHidden": false
30
+ },
31
+ "wd_pokerparticipants": {
32
+ "entitySetName": "wd_pokerparticipants",
33
+ "logicalName": "wd_pokerparticipant",
34
+ "isHidden": false
35
+ },
36
+ "wd_pokerrounds": {
37
+ "entitySetName": "wd_pokerrounds",
38
+ "logicalName": "wd_pokerround",
39
+ "isHidden": false
40
+ },
41
+ "wd_pokervotes": {
42
+ "entitySetName": "wd_pokervotes",
43
+ "logicalName": "wd_pokervote",
44
+ "isHidden": false
45
+ }
46
+ },
47
+ "actions": null
48
+ }
49
+ }
50
+ }
@@ -1,4 +1,4 @@
1
- import { getClient, getContext, callActionAsync } from "./power-apps-data.js";
1
+ import { getClient, callActionAsync } from "./power-apps-data.js";
2
2
 
3
3
  // ── Initialize SDK & Client ────────────────────────────────────
4
4
  let oSharedClient = null;
@@ -68,7 +68,6 @@ function _dbgWrap(sName, aArgs, fnBody) {
68
68
  _dbgRenderEntry(oEntry, false);
69
69
  return oResult;
70
70
  }
71
-
72
71
  function _dbgClone(oVal) {
73
72
  try { return JSON.parse(JSON.stringify(oVal)); }
74
73
  catch (oErr) { return String(oVal); }
@@ -309,9 +308,6 @@ export async function deleteItem(tableName, primaryKey, id) {
309
308
  }
310
309
 
311
310
  // ── Unbound Action ─────────────────────────────────────────────
312
- // Calls an unbound Dataverse action by POSTing to the action endpoint.
313
- // Do NOT add action names to power.config.json dataSources — they are
314
- // not entities and will cause deploy errors.
315
311
  export async function callUnboundAction(tableName, primaryKey, actionName, params) {
316
312
  return _dbgWrap('callUnboundAction', [tableName, primaryKey, actionName, params], async function() {
317
313
  var oAllSources = Object.assign({}, oInitialDataSources, oDataSources);
@@ -323,11 +319,10 @@ export async function callUnboundAction(tableName, primaryKey, actionName, param
323
319
  // ── WhoAmI ─────────────────────────────────────────────────────
324
320
  export async function whoAmI() {
325
321
  return _dbgWrap('whoAmI', [], async function() {
326
- var oCtx = await getContext();
327
- var sId = oCtx.UserId || oCtx.userId || oCtx.systemuserid;
328
- if (sId) return sId;
329
- if (oCtx.userSettings && oCtx.userSettings.userId) return oCtx.userSettings.userId;
330
- return oCtx;
322
+ var oAllSources = Object.assign({}, oInitialDataSources, oDataSources);
323
+ var result = await callActionAsync(oAllSources, 'WhoAmI', {});
324
+ var data = unwrapResult(result);
325
+ return data.UserId || data.userid || data.systemuserid || data;
331
326
  });
332
327
  }
333
328
 
@@ -718,7 +713,6 @@ export async function getFileMetadata(sSiteUrl, sFileId) {
718
713
  // ── Data source name (must match connectionReferences in power.config.json) ──
719
714
  const DATA_SOURCE_CANDIDATES = ["office365outlook", "Office365Outlook", "office365"];
720
715
  const OUTLOOK_APIS = {
721
- // ── Email operations ──
722
716
  GetEmailsV3: {
723
717
  path: "/{connectionId}/v3/Mail",
724
718
  method: "GET",
@@ -740,100 +734,6 @@ const OUTLOOK_APIS = {
740
734
  { name: "top", in: "query", required: false },
741
735
  ],
742
736
  },
743
- SendEmailV2: {
744
- path: "/{connectionId}/v2/Mail",
745
- method: "POST",
746
- parameters: [
747
- { name: "connectionId", in: "path", required: true },
748
- { name: "emailMessage", in: "body", required: true },
749
- ],
750
- },
751
- ForwardEmail: {
752
- path: "/{connectionId}/codeless/api/v2.0/me/messages/{message_id}/forward",
753
- method: "POST",
754
- parameters: [
755
- { name: "connectionId", in: "path", required: true },
756
- { name: "message_id", in: "path", required: true },
757
- { name: "body", in: "body", required: true },
758
- ],
759
- },
760
- ReplyToV3: {
761
- path: "/{connectionId}/v3/Mail/ReplyTo/{messageId}",
762
- method: "POST",
763
- parameters: [
764
- { name: "connectionId", in: "path", required: true },
765
- { name: "messageId", in: "path", required: true },
766
- { name: "replyParameters", in: "body", required: true },
767
- { name: "mailboxAddress", in: "query", required: false },
768
- ],
769
- },
770
- MoveV2: {
771
- path: "/{connectionId}/v2/Mail/Move/{messageId}",
772
- method: "POST",
773
- parameters: [
774
- { name: "connectionId", in: "path", required: true },
775
- { name: "messageId", in: "path", required: true },
776
- { name: "folderPath", in: "query", required: true },
777
- { name: "mailboxAddress", in: "query", required: false },
778
- ],
779
- },
780
- DeleteEmail: {
781
- path: "/{connectionId}/Mail/{messageId}",
782
- method: "DELETE",
783
- parameters: [
784
- { name: "connectionId", in: "path", required: true },
785
- { name: "messageId", in: "path", required: true },
786
- ],
787
- },
788
- SharedMailboxSendEmailV2: {
789
- path: "/{connectionId}/v2/SharedMailbox/Mail",
790
- method: "POST",
791
- parameters: [
792
- { name: "connectionId", in: "path", required: true },
793
- { name: "emailMessage", in: "body", required: true },
794
- ],
795
- },
796
- // ── Calendar operations ──
797
- V4CalendarGetItems: {
798
- path: "/{connectionId}/datasets/calendars/v4/tables/{table}/items",
799
- method: "GET",
800
- parameters: [
801
- { name: "connectionId", in: "path", required: true },
802
- { name: "table", in: "path", required: true },
803
- { name: "$filter", in: "query", required: false },
804
- { name: "$orderby", in: "query", required: false },
805
- { name: "$top", in: "query", required: false },
806
- { name: "$skip", in: "query", required: false },
807
- ],
808
- },
809
- V4CalendarPostItem: {
810
- path: "/{connectionId}/datasets/calendars/v4/tables/{table}/items",
811
- method: "POST",
812
- parameters: [
813
- { name: "connectionId", in: "path", required: true },
814
- { name: "table", in: "path", required: true },
815
- { name: "item", in: "body", required: true },
816
- ],
817
- },
818
- V4CalendarPatchItem: {
819
- path: "/{connectionId}/datasets/calendars/v4/tables/{table}/items/{id}",
820
- method: "PATCH",
821
- parameters: [
822
- { name: "connectionId", in: "path", required: true },
823
- { name: "table", in: "path", required: true },
824
- { name: "id", in: "path", required: true },
825
- { name: "item", in: "body", required: true },
826
- ],
827
- },
828
- CalendarDeleteItem: {
829
- path: "/{connectionId}/datasets/calendars/tables/{table}/items/{id}",
830
- method: "DELETE",
831
- parameters: [
832
- { name: "connectionId", in: "path", required: true },
833
- { name: "table", in: "path", required: true },
834
- { name: "id", in: "path", required: true },
835
- ],
836
- },
837
737
  };
838
738
 
839
739
  // ── Initialize SDK client for the Office 365 Outlook connector ──
@@ -918,152 +818,16 @@ async function execOutlookOp(operationName, parameters) {
918
818
  throw new Error("No Outlook connection reference matched. Tried: " + aErrors.join(" || "));
919
819
  }
920
820
 
921
- // ── Generic: call any Outlook connector operation ──────────────
922
- export async function callOutlookOperation(sOperationName, oParameters) {
923
- return _dbgWrap('callOutlookOperation', [sOperationName, oParameters], async function() {
924
- return execOutlookOp(sOperationName, oParameters);
925
- });
926
- }
927
-
928
- // ── Send Email ─────────────────────────────────────────────────
929
- export async function sendEmail({ to, cc, bcc, subject, body, isHtml, importance, attachments } = {}) {
930
- return _dbgWrap('sendEmail', [{ to, cc, bcc, subject, body, isHtml, importance, attachments }], async function() {
931
- var oMessage = {
932
- To: to,
933
- Subject: subject,
934
- Body: body,
935
- };
936
- if (cc) oMessage.Cc = cc;
937
- if (bcc) oMessage.Bcc = bcc;
938
- if (importance) oMessage.Importance = importance;
939
- if (attachments) oMessage.Attachments = attachments;
940
- if (isHtml === false) oMessage.IsHtml = false;
941
-
942
- return execOutlookOp("SendEmailV2", { emailMessage: oMessage });
943
- });
944
- }
945
-
946
- // ── Forward Email ──────────────────────────────────────────────
947
- export async function forwardEmail(sMessageId, { to, comment } = {}) {
948
- return _dbgWrap('forwardEmail', [sMessageId, { to, comment }], async function() {
949
- return execOutlookOp("ForwardEmail", {
950
- message_id: sMessageId,
951
- body: { ToRecipients: to, Comment: comment },
952
- });
953
- });
954
- }
955
-
956
- // ── Reply to Email ─────────────────────────────────────────────
957
- export async function replyToEmail(sMessageId, { comment, replyAll } = {}) {
958
- return _dbgWrap('replyToEmail', [sMessageId, { comment, replyAll }], async function() {
959
- return execOutlookOp("ReplyToV3", {
960
- messageId: sMessageId,
961
- replyParameters: { Body: comment, ReplyAll: replyAll === true },
962
- });
963
- });
964
- }
965
-
966
821
  // ── List Emails ────────────────────────────────────────────────
967
822
  export async function listEmails({ folderId = "Inbox", fetchOnlyUnread, searchQuery, top, skip } = {}) {
968
823
  return _dbgWrap('listEmails', [{ folderId, fetchOnlyUnread, searchQuery, top, skip }], async function() {
824
+ void skip;
825
+
969
826
  return execOutlookOp("GetEmailsV3", {
970
827
  folderPath: folderId,
971
- fetchOnlyUnread: fetchOnlyUnread,
972
- searchQuery: searchQuery,
828
+ fetchOnlyUnread,
829
+ searchQuery,
973
830
  top: top != null ? top : 10,
974
- skip: skip,
975
- });
976
- });
977
- }
978
-
979
- // ── Send from Shared Mailbox ───────────────────────────────────
980
- export async function sendFromSharedMailbox(sSharedMailbox, { to, cc, bcc, subject, body, importance, attachments } = {}) {
981
- return _dbgWrap('sendFromSharedMailbox', [sSharedMailbox, { to, cc, bcc, subject, body, importance, attachments }], async function() {
982
- var oMessage = {
983
- MailboxAddress: sSharedMailbox,
984
- To: to,
985
- Subject: subject,
986
- Body: body,
987
- };
988
- if (cc) oMessage.Cc = cc;
989
- if (bcc) oMessage.Bcc = bcc;
990
- if (importance) oMessage.Importance = importance;
991
- if (attachments) oMessage.Attachments = attachments;
992
-
993
- return execOutlookOp("SharedMailboxSendEmailV2", { emailMessage: oMessage });
994
- });
995
- }
996
-
997
- // ── Move Email ─────────────────────────────────────────────────
998
- export async function moveEmail(sMessageId, sDestinationFolderId) {
999
- return _dbgWrap('moveEmail', [sMessageId, sDestinationFolderId], async function() {
1000
- return execOutlookOp("MoveV2", {
1001
- messageId: sMessageId,
1002
- folderPath: sDestinationFolderId,
1003
- });
1004
- });
1005
- }
1006
-
1007
- // ── Delete Email ───────────────────────────────────────────────
1008
- export async function deleteEmail(sMessageId) {
1009
- return _dbgWrap('deleteEmail', [sMessageId], async function() {
1010
- return execOutlookOp("DeleteEmail", { messageId: sMessageId });
1011
- });
1012
- }
1013
-
1014
- // ── Create Event ───────────────────────────────────────────────
1015
- export async function createEvent({ subject, start, end, attendees, body, location, importance, isAllDay, timeZone, calendarId } = {}) {
1016
- return _dbgWrap('createEvent', [{ subject, start, end, attendees, body, location, importance, isAllDay, timeZone, calendarId }], async function() {
1017
- var sAttendees = Array.isArray(attendees) ? attendees.join(";") : attendees;
1018
- var oItem = {
1019
- subject: subject,
1020
- start: start,
1021
- end: end,
1022
- timeZone: timeZone || "",
1023
- };
1024
- if (sAttendees) oItem.requiredAttendees = sAttendees;
1025
- if (body) oItem.body = body;
1026
- if (location) oItem.location = location;
1027
- if (importance) oItem.importance = importance;
1028
- if (isAllDay) oItem.isAllDay = true;
1029
-
1030
- return execOutlookOp("V4CalendarPostItem", {
1031
- table: calendarId || "Calendar",
1032
- item: oItem,
1033
- });
1034
- });
1035
- }
1036
-
1037
- // ── List Events ────────────────────────────────────────────────
1038
- export async function listEvents({ calendarId = "Calendar", filter, orderBy, top, skip } = {}) {
1039
- return _dbgWrap('listEvents', [{ calendarId, filter, orderBy, top, skip }], async function() {
1040
- return execOutlookOp("V4CalendarGetItems", {
1041
- table: calendarId,
1042
- $filter: filter,
1043
- $orderby: orderBy,
1044
- $top: top,
1045
- $skip: skip,
1046
- });
1047
- });
1048
- }
1049
-
1050
- // ── Edit Event ─────────────────────────────────────────────────
1051
- export async function editEvent(sEventId, oChangedFields, sCalendarId) {
1052
- return _dbgWrap('editEvent', [sEventId, oChangedFields, sCalendarId], async function() {
1053
- return execOutlookOp("V4CalendarPatchItem", {
1054
- table: sCalendarId || "Calendar",
1055
- id: sEventId,
1056
- item: oChangedFields,
1057
- });
1058
- });
1059
- }
1060
-
1061
- // ── Delete Event ───────────────────────────────────────────────
1062
- export async function deleteEvent(sEventId, sCalendarId) {
1063
- return _dbgWrap('deleteEvent', [sEventId, sCalendarId], async function() {
1064
- return execOutlookOp("CalendarDeleteItem", {
1065
- table: sCalendarId || "Calendar",
1066
- id: sEventId,
1067
831
  });
1068
832
  });
1069
833
  }
@@ -0,0 +1,80 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
+ <link rel="icon" type="image/png" href="./icon-512.png" />
7
+ <title>Solution Explorer</title>
8
+ <link rel="stylesheet" href="styles.css" />
9
+ <script type="importmap">
10
+ {
11
+ "imports": {
12
+ "@microsoft/power-apps/data": "./power-apps-data.js"
13
+ }
14
+ }
15
+ </script>
16
+ </head>
17
+ <body>
18
+ <div id="root">
19
+ <div class="topbar">
20
+ <h1>Solution Explorer</h1>
21
+ <span class="env-badge" id="envBadge"></span>
22
+ </div>
23
+
24
+ <div class="shell">
25
+ <div class="sol-panel">
26
+ <div class="sol-header">
27
+ Solutions <span class="sol-count" id="solCount">0</span>
28
+ </div>
29
+ <div class="sol-search">
30
+ <input type="text" placeholder="Filter solutions…" id="searchInput" />
31
+ <select id="managedFilter">
32
+ <option value="all">All</option>
33
+ <option value="unmanaged">Unmanaged</option>
34
+ <option value="managed">Managed</option>
35
+ </select>
36
+ </div>
37
+ <div id="solList">
38
+ <div class="loading-msg">Loading solutions…</div>
39
+ </div>
40
+ </div>
41
+
42
+ <div class="detail-panel" id="detailPanel">
43
+ <div class="detail-empty">&larr; Select a solution</div>
44
+ </div>
45
+ </div>
46
+ </div>
47
+ <!-- Share Component Modal -->
48
+ <div class="share-backdrop" id="shareBackdrop">
49
+ <div class="share-modal">
50
+ <div class="share-modal-header">
51
+ <h3 id="shareModalTitle">Share Component</h3>
52
+ <button class="share-close-btn" id="shareCloseBtn">&times;</button>
53
+ </div>
54
+ <div class="share-tabs">
55
+ <button class="share-tab active" data-tab="user">User</button>
56
+ <button class="share-tab" data-tab="team">Team</button>
57
+ </div>
58
+ <div class="share-body">
59
+ <div class="share-search-row">
60
+ <input type="text" class="share-search-input" id="shareSearchInput" placeholder="Search users…" />
61
+ </div>
62
+ <div class="share-results" id="shareResults">
63
+ <div class="share-empty-msg">Type to search</div>
64
+ </div>
65
+ <div class="share-selected-section" id="shareSelectedSection" style="display:none;">
66
+ <div class="share-selected-label">Sharing with:</div>
67
+ <div class="share-selected-list" id="shareSelectedList"></div>
68
+ </div>
69
+ </div>
70
+ <div class="share-footer">
71
+ <button class="share-cancel-btn" id="shareCancelBtn">Cancel</button>
72
+ <button class="share-confirm-btn" id="shareConfirmBtn" disabled>Share</button>
73
+ </div>
74
+ </div>
75
+ </div>
76
+
77
+
78
+ <script type="module" src="index.js"></script>
79
+ </body>
80
+ </html>