codeapp-js 0.2.1 → 0.3.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 (100) hide show
  1. package/codeApp/.power/schemas/appschemas/dataSourcesInfo.ts +6275 -0
  2. package/codeApp/.power/schemas/jira/jira.Schema.json +6903 -0
  3. package/codeApp/.power/schemas/keyvault/keyvault.Schema.json +1600 -0
  4. package/codeApp/.power/schemas/teams/teams.Schema.json +11112 -0
  5. package/codeApp/dist/codeapp.js +992 -4
  6. package/codeApp/dist/power-apps-data.js +145 -31
  7. package/codeApp/src/generated/index.ts +12 -0
  8. package/codeApp/src/generated/models/AzureKeyVaultModel.ts +107 -0
  9. package/codeApp/src/generated/models/JiraModel.ts +501 -0
  10. package/codeApp/src/generated/models/Office365GroupsModel.ts +363 -0
  11. package/codeApp/src/generated/models/Office365OutlookModel.ts +2046 -0
  12. package/codeApp/src/generated/models/Office365UsersModel.ts +254 -0
  13. package/codeApp/src/generated/services/AzureKeyVaultService.ts +257 -0
  14. package/codeApp/src/generated/services/JiraService.ts +1124 -0
  15. package/codeApp/src/generated/services/Office365GroupsService.ts +326 -0
  16. package/codeApp/src/generated/services/Office365OutlookService.ts +2476 -0
  17. package/codeApp/src/generated/services/Office365UsersService.ts +358 -0
  18. package/dev files/outlook.js +218 -9
  19. package/examples/combined demo/dist/codeapp.js +1098 -1098
  20. package/examples/combined demo/dist/index.js +470 -470
  21. package/examples/combined demo/dist/power-apps-data.js +3006 -3006
  22. package/examples/combined demo/power.config.json +42 -42
  23. package/examples/dataverse Demo/dist/codeapp.js +1085 -1085
  24. package/examples/dataverse Demo/dist/index.html +54 -54
  25. package/examples/dataverse Demo/dist/index.js +82 -82
  26. package/examples/dataverse Demo/dist/power-apps-data.js +2911 -2911
  27. package/examples/dataverse Demo/power.config.json +34 -34
  28. package/examples/dataverse Demo/readme.md +79 -79
  29. package/examples/groups Demo/dist/codeapp.js +1085 -1085
  30. package/examples/groups Demo/dist/index.js +113 -113
  31. package/examples/groups Demo/dist/power-apps-data.js +2911 -2911
  32. package/examples/kanban/dist/dataverse.js +94 -94
  33. package/examples/kanban/dist/environmentVar.js +55 -55
  34. package/examples/kanban/dist/office365groups.js +97 -97
  35. package/examples/kanban/dist/office365users.js +169 -169
  36. package/examples/kanban/dist/outlook.js +162 -162
  37. package/examples/kanban/dist/power-apps-data.js +2953 -2953
  38. package/examples/kanban/dist/sharepoint.js +339 -339
  39. package/examples/myProfile/dist/index.html +184 -184
  40. package/examples/myProfile/dist/index.js +141 -141
  41. package/examples/myProfile/dist/office365users.js +169 -169
  42. package/examples/myProfile/dist/power-apps-data.js +2953 -2953
  43. package/examples/myProfile/power.config.json +22 -22
  44. package/examples/myProfile/readme.md +79 -79
  45. package/examples/outlook Demo/dist/codeapp.js +1085 -1085
  46. package/examples/outlook Demo/dist/index.html +35 -35
  47. package/examples/outlook Demo/dist/index.js +170 -170
  48. package/examples/outlook Demo/dist/outlook.js +121 -121
  49. package/examples/outlook Demo/dist/power-apps-data.js +2911 -2911
  50. package/examples/outlook Demo/dist/styles.css +84 -84
  51. package/examples/outlook Demo/readme.md +82 -82
  52. package/examples/outlook Demo2/OutlookDemo_1_0_0_1.zip +0 -0
  53. package/examples/outlook Demo2/agent/decision-log.md +7 -0
  54. package/examples/{solution explorer → outlook Demo2}/dist/codeapp.js +245 -9
  55. package/examples/outlook Demo2/dist/index.html +98 -0
  56. package/examples/outlook Demo2/dist/index.js +272 -0
  57. package/examples/outlook Demo2/dist/styles.css +639 -0
  58. package/examples/outlook Demo2/power.config.json +23 -0
  59. package/examples/outlook Demo2/src/generated/index.ts +14 -0
  60. package/examples/outlook Demo2/src/generated/models/Office365GroupsModel.ts +363 -0
  61. package/examples/outlook Demo2/src/generated/models/Office365OutlookModel.ts +2046 -0
  62. package/examples/outlook Demo2/src/generated/models/Office365UsersModel.ts +254 -0
  63. package/examples/outlook Demo2/src/generated/services/Office365GroupsService.ts +326 -0
  64. package/examples/outlook Demo2/src/generated/services/Office365OutlookService.ts +2476 -0
  65. package/examples/outlook Demo2/src/generated/services/Office365UsersService.ts +358 -0
  66. package/examples/planning Poker/.vscode/settings.json +4 -4
  67. package/examples/planning Poker/additional files/customizations (tables).xml +6428 -6428
  68. package/examples/planning Poker/additional files/dataverse-tables.json +165 -165
  69. package/examples/planning Poker/additional files/readme.md +122 -122
  70. package/examples/planning Poker/dist/dataverse.js +78 -78
  71. package/examples/planning Poker/dist/index.html +198 -198
  72. package/examples/planning Poker/dist/index.js +954 -954
  73. package/examples/planning Poker/dist/power-apps-data.js +2953 -2953
  74. package/examples/planning Poker/dist/styles.css +815 -815
  75. package/examples/sharePoint Demo/agent/decision-log.md +5 -5
  76. package/examples/sharePoint Demo/dist/codeapp.js +1085 -1085
  77. package/examples/sharePoint Demo/dist/index.js +262 -262
  78. package/examples/sharePoint Demo/dist/power-apps-data.js +2911 -2911
  79. package/examples/sharePoint Demo/power.config.json +22 -22
  80. package/examples/todo/dist/dataverse.js +64 -64
  81. package/examples/todo/dist/index.html +75 -75
  82. package/examples/todo/dist/index.js +8 -8
  83. package/examples/todo/dist/power-apps-data.js +2953 -2953
  84. package/examples/todo/dist/renderer.js +375 -375
  85. package/examples/todo/dist/styles.css +691 -691
  86. package/examples/todo/power.config.json +34 -34
  87. package/package.json +1 -1
  88. package/readme.md +33 -4
  89. package/examples/solution explorer/agent/decision-log.md +0 -27
  90. package/examples/solution explorer/agent/mockup-01-swiss-grid.html +0 -452
  91. package/examples/solution explorer/agent/mockup-02-dark-glass.html +0 -496
  92. package/examples/solution explorer/agent/mockup-03-paper-console.html +0 -510
  93. package/examples/solution explorer/agent/mockup-04-neon-noir.html +0 -546
  94. package/examples/solution explorer/agent/mockup-05-zen-garden.html +0 -534
  95. package/examples/solution explorer/dist/index.html +0 -80
  96. package/examples/solution explorer/dist/index.js +0 -735
  97. package/examples/solution explorer/dist/styles.css +0 -571
  98. package/examples/solution explorer/power.config.json +0 -151
  99. /package/examples/{solution explorer → outlook Demo2}/dist/icon-512.png +0 -0
  100. /package/examples/{solution explorer → outlook Demo2}/dist/power-apps-data.js +0 -0
@@ -0,0 +1,326 @@
1
+ /*!
2
+ * Copyright (C) Microsoft Corporation. All rights reserved.
3
+ * This file is autogenerated. Do not edit this file directly.
4
+ */
5
+
6
+ import type { CreateCalendarEvent_Response } from '../models/Office365GroupsModel';
7
+ import type { IOperationResult } from '@microsoft/power-apps/data';
8
+ import type { ListGroupMembers_Response } from '../models/Office365GroupsModel';
9
+ import type { ListGroups_Response } from '../models/Office365GroupsModel';
10
+ import type { ListOwnedGroups_Response } from '../models/Office365GroupsModel';
11
+ import type { ListOwnedGroups_V2_Response } from '../models/Office365GroupsModel';
12
+ import type { ObjectWithoutType } from '../models/Office365GroupsModel';
13
+ import type { OnGroupMemberAddedOrRemoved_Response } from '../models/Office365GroupsModel';
14
+ import type { OnNewEvent_Response } from '../models/Office365GroupsModel';
15
+ import type { UpdateCalendarEvent_HTMLRequest } from '../models/Office365GroupsModel';
16
+ import type { UpdateCalendarEvent_Request } from '../models/Office365GroupsModel';
17
+ import { dataSourcesInfo } from '../../../.power/schemas/appschemas/dataSourcesInfo';
18
+ import { getClient } from '@microsoft/power-apps/data';
19
+
20
+ export class Office365GroupsService {
21
+ private static readonly dataSourceName = 'office365groups';
22
+
23
+ private static readonly client = getClient(dataSourcesInfo);
24
+
25
+ /**
26
+ * List group members
27
+ * This operation returns a list of all members in the given group and their details such as name, title, email, etc. You can query up to 1000 items using Top parameter. In case you need to retrieve more than 1000 values please turn on Settings->Pagination feature and provide Threshold limit.
28
+ */
29
+ public static async ListGroupMembers(groupId: string, $top?: number): Promise<IOperationResult<ListGroupMembers_Response>> {
30
+ const params: { groupId: string, $top?: number } = { groupId, $top };
31
+ const result = await Office365GroupsService.client.executeAsync<{ groupId: string, $top?: number }, ListGroupMembers_Response>(
32
+ {
33
+ connectorOperation: {
34
+ tableName: Office365GroupsService.dataSourceName,
35
+ operationName: 'ListGroupMembers',
36
+ parameters: params
37
+ },
38
+ });
39
+ return result;
40
+ }
41
+
42
+ /**
43
+ * When a group member is added or removed
44
+ * This operation triggers when a member is added to or removed from the given group.
45
+ */
46
+ public static async OnGroupMembershipChange(groupId: string, $select?: string): Promise<IOperationResult<OnGroupMemberAddedOrRemoved_Response>> {
47
+ const params: { groupId: string, $select?: string } = { groupId, $select };
48
+ const result = await Office365GroupsService.client.executeAsync<{ groupId: string, $select?: string }, OnGroupMemberAddedOrRemoved_Response>(
49
+ {
50
+ connectorOperation: {
51
+ tableName: Office365GroupsService.dataSourceName,
52
+ operationName: 'OnGroupMembershipChange',
53
+ parameters: params
54
+ },
55
+ });
56
+ return result;
57
+ }
58
+
59
+ /**
60
+ * Add member to group
61
+ * This operation is used to add a member to an O365 group, using a UPN.
62
+ */
63
+ public static async AddMemberToGroup(userUpn: string, groupId: string): Promise<IOperationResult<void>> {
64
+ const params: { userUpn: string, groupId: string } = { userUpn, groupId };
65
+ const result = await Office365GroupsService.client.executeAsync<{ userUpn: string, groupId: string }, void>(
66
+ {
67
+ connectorOperation: {
68
+ tableName: Office365GroupsService.dataSourceName,
69
+ operationName: 'AddMemberToGroup',
70
+ parameters: params
71
+ },
72
+ });
73
+ return result;
74
+ }
75
+
76
+ /**
77
+ * List my owned groups
78
+ * This operation returns a list of all groups that you own.
79
+ */
80
+ public static async ListOwnedGroups(): Promise<IOperationResult<ListOwnedGroups_Response>> {
81
+ const result = await Office365GroupsService.client.executeAsync<void, ListOwnedGroups_Response>(
82
+ {
83
+ connectorOperation: {
84
+ tableName: Office365GroupsService.dataSourceName,
85
+ operationName: 'ListOwnedGroups',
86
+ },
87
+ });
88
+ return result;
89
+ }
90
+
91
+ /**
92
+ * List my owned groups (V2)
93
+ * This operation returns a list of all groups that you own.
94
+ */
95
+ public static async ListOwnedGroups_V2(extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean): Promise<IOperationResult<ListOwnedGroups_V2_Response>> {
96
+ const params: { extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean } = { extractSensitivityLabel, fetchSensitivityLabelMetadata };
97
+ const result = await Office365GroupsService.client.executeAsync<{ extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean }, ListOwnedGroups_V2_Response>(
98
+ {
99
+ connectorOperation: {
100
+ tableName: Office365GroupsService.dataSourceName,
101
+ operationName: 'ListOwnedGroups_V2',
102
+ parameters: params
103
+ },
104
+ });
105
+ return result;
106
+ }
107
+
108
+ /**
109
+ * List groups that I own and belong to
110
+ * This operation returns a list of all groups that you own and belong to.
111
+ */
112
+ public static async ListOwnedGroups_V3(extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean): Promise<IOperationResult<ListOwnedGroups_Response>> {
113
+ const params: { extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean } = { extractSensitivityLabel, fetchSensitivityLabelMetadata };
114
+ const result = await Office365GroupsService.client.executeAsync<{ extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean }, ListOwnedGroups_Response>(
115
+ {
116
+ connectorOperation: {
117
+ tableName: Office365GroupsService.dataSourceName,
118
+ operationName: 'ListOwnedGroups_V3',
119
+ parameters: params
120
+ },
121
+ });
122
+ return result;
123
+ }
124
+
125
+ /**
126
+ * List groups
127
+ * This operation returns a list of all groups in the organization.
128
+ */
129
+ public static async ListGroups(extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean, $filter?: string, $top?: number, $skiptoken?: string): Promise<IOperationResult<ListGroups_Response>> {
130
+ const params: { extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean, $filter?: string, $top?: number, $skiptoken?: string } = { extractSensitivityLabel, fetchSensitivityLabelMetadata, $filter, $top, $skiptoken };
131
+ const result = await Office365GroupsService.client.executeAsync<{ extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean, $filter?: string, $top?: number, $skiptoken?: string }, ListGroups_Response>(
132
+ {
133
+ connectorOperation: {
134
+ tableName: Office365GroupsService.dataSourceName,
135
+ operationName: 'ListGroups',
136
+ parameters: params
137
+ },
138
+ });
139
+ return result;
140
+ }
141
+
142
+ /**
143
+ * Create a group event
144
+ * This operation is used to create a new event in a group calendar.
145
+ */
146
+ public static async CreateCalendarEvent(body: UpdateCalendarEvent_Request, groupId: string): Promise<IOperationResult<void>> {
147
+ const params: { body: UpdateCalendarEvent_Request, groupId: string } = { body, groupId };
148
+ const result = await Office365GroupsService.client.executeAsync<{ body: UpdateCalendarEvent_Request, groupId: string }, void>(
149
+ {
150
+ connectorOperation: {
151
+ tableName: Office365GroupsService.dataSourceName,
152
+ operationName: 'CreateCalendarEvent',
153
+ parameters: params
154
+ },
155
+ });
156
+ return result;
157
+ }
158
+
159
+ /**
160
+ * Create a group event (V2)
161
+ * This operation is used to create a new event in a group calendar.
162
+ */
163
+ public static async CreateCalendarEventV2(body: UpdateCalendarEvent_HTMLRequest, groupId: string): Promise<IOperationResult<void>> {
164
+ const params: { body: UpdateCalendarEvent_HTMLRequest, groupId: string } = { body, groupId };
165
+ const result = await Office365GroupsService.client.executeAsync<{ body: UpdateCalendarEvent_HTMLRequest, groupId: string }, void>(
166
+ {
167
+ connectorOperation: {
168
+ tableName: Office365GroupsService.dataSourceName,
169
+ operationName: 'CreateCalendarEventV2',
170
+ parameters: params
171
+ },
172
+ });
173
+ return result;
174
+ }
175
+
176
+ /**
177
+ * Delete event (V2)
178
+ * This operation deletes an event in a calendar.
179
+ */
180
+ public static async CalendarDeleteItem_V2(event: string, groupId: string): Promise<IOperationResult<void>> {
181
+ const params: { event: string, groupId: string } = { event, groupId };
182
+ const result = await Office365GroupsService.client.executeAsync<{ event: string, groupId: string }, void>(
183
+ {
184
+ connectorOperation: {
185
+ tableName: Office365GroupsService.dataSourceName,
186
+ operationName: 'CalendarDeleteItem_V2',
187
+ parameters: params
188
+ },
189
+ });
190
+ return result;
191
+ }
192
+
193
+ /**
194
+ * Update a group event
195
+ * This operation is used to update a new event in a group calendar.
196
+ */
197
+ public static async UpdateCalendarEvent(event: string, body: UpdateCalendarEvent_HTMLRequest, groupId: string): Promise<IOperationResult<CreateCalendarEvent_Response>> {
198
+ const params: { event: string, body: UpdateCalendarEvent_HTMLRequest, groupId: string } = { event, body, groupId };
199
+ const result = await Office365GroupsService.client.executeAsync<{ event: string, body: UpdateCalendarEvent_HTMLRequest, groupId: string }, CreateCalendarEvent_Response>(
200
+ {
201
+ connectorOperation: {
202
+ tableName: Office365GroupsService.dataSourceName,
203
+ operationName: 'UpdateCalendarEvent',
204
+ parameters: params
205
+ },
206
+ });
207
+ return result;
208
+ }
209
+
210
+ /**
211
+ * Remove member from group
212
+ * This operation is used to remove a member from an O365 group, using a UPN.
213
+ */
214
+ public static async RemoveMemberFromGroup(userUpn: string, groupId: string): Promise<IOperationResult<void>> {
215
+ const params: { userUpn: string, groupId: string } = { userUpn, groupId };
216
+ const result = await Office365GroupsService.client.executeAsync<{ userUpn: string, groupId: string }, void>(
217
+ {
218
+ connectorOperation: {
219
+ tableName: Office365GroupsService.dataSourceName,
220
+ operationName: 'RemoveMemberFromGroup',
221
+ parameters: params
222
+ },
223
+ });
224
+ return result;
225
+ }
226
+
227
+ /**
228
+ * When there is a new event
229
+ * This operation triggers when a new event is added to a group calendar.
230
+ */
231
+ public static async OnNewEvent(groupId: string): Promise<IOperationResult<OnNewEvent_Response>> {
232
+ const params: { groupId: string } = { groupId };
233
+ const result = await Office365GroupsService.client.executeAsync<{ groupId: string }, OnNewEvent_Response>(
234
+ {
235
+ connectorOperation: {
236
+ tableName: Office365GroupsService.dataSourceName,
237
+ operationName: 'OnNewEvent',
238
+ parameters: params
239
+ },
240
+ });
241
+ return result;
242
+ }
243
+
244
+ /**
245
+ * Send an HTTP request V2
246
+ * Construct a Microsoft Graph REST API request to invoke. There is one segment that is supported: /groups. Learn more: https://docs.microsoft.com/en-us/graph/use-the-api.
247
+ */
248
+ public static async HttpRequestV2(Uri: string, Method: string, Body?: string, ContentType?: string, CustomHeader1?: string, CustomHeader2?: string, CustomHeader3?: string, CustomHeader4?: string, CustomHeader5?: string): Promise<IOperationResult<ObjectWithoutType>> {
249
+ const params: { Uri: string, Method: string, Body?: string, ContentType?: string, CustomHeader1?: string, CustomHeader2?: string, CustomHeader3?: string, CustomHeader4?: string, CustomHeader5?: string } = { Uri, Method, Body, ContentType, CustomHeader1, CustomHeader2, CustomHeader3, CustomHeader4, CustomHeader5 };
250
+ const result = await Office365GroupsService.client.executeAsync<{ Uri: string, Method: string, Body?: string, ContentType?: string, CustomHeader1?: string, CustomHeader2?: string, CustomHeader3?: string, CustomHeader4?: string, CustomHeader5?: string }, ObjectWithoutType>(
251
+ {
252
+ connectorOperation: {
253
+ tableName: Office365GroupsService.dataSourceName,
254
+ operationName: 'HttpRequestV2',
255
+ parameters: params
256
+ },
257
+ });
258
+ return result;
259
+ }
260
+
261
+ /**
262
+ * Send an HTTP request
263
+ * Construct a Microsoft Graph REST API request to invoke. Learn more: https://docs.microsoft.com/en-us/graph/use-the-api
264
+ */
265
+ public static async HttpRequest(Uri: string, Method: string, Body?: string, ContentType?: string, CustomHeader1?: string, CustomHeader2?: string, CustomHeader3?: string, CustomHeader4?: string, CustomHeader5?: string): Promise<IOperationResult<ObjectWithoutType>> {
266
+ const params: { Uri: string, Method: string, Body?: string, ContentType?: string, CustomHeader1?: string, CustomHeader2?: string, CustomHeader3?: string, CustomHeader4?: string, CustomHeader5?: string } = { Uri, Method, Body, ContentType, CustomHeader1, CustomHeader2, CustomHeader3, CustomHeader4, CustomHeader5 };
267
+ const result = await Office365GroupsService.client.executeAsync<{ Uri: string, Method: string, Body?: string, ContentType?: string, CustomHeader1?: string, CustomHeader2?: string, CustomHeader3?: string, CustomHeader4?: string, CustomHeader5?: string }, ObjectWithoutType>(
268
+ {
269
+ connectorOperation: {
270
+ tableName: Office365GroupsService.dataSourceName,
271
+ operationName: 'HttpRequest',
272
+ parameters: params
273
+ },
274
+ });
275
+ return result;
276
+ }
277
+
278
+ /**
279
+ * List deleted groups
280
+ * Lists deleted groups that can be restored.
281
+ */
282
+ public static async ListDeletedGroups(): Promise<IOperationResult<ListGroups_Response>> {
283
+ const result = await Office365GroupsService.client.executeAsync<void, ListGroups_Response>(
284
+ {
285
+ connectorOperation: {
286
+ tableName: Office365GroupsService.dataSourceName,
287
+ operationName: 'ListDeletedGroups',
288
+ },
289
+ });
290
+ return result;
291
+ }
292
+
293
+ /**
294
+ * Restore a deleted group
295
+ * Restore a recently deleted group
296
+ */
297
+ public static async RestoreDeletedGroup(groupId: string): Promise<IOperationResult<void>> {
298
+ const params: { groupId: string } = { groupId };
299
+ const result = await Office365GroupsService.client.executeAsync<{ groupId: string }, void>(
300
+ {
301
+ connectorOperation: {
302
+ tableName: Office365GroupsService.dataSourceName,
303
+ operationName: 'RestoreDeletedGroup',
304
+ parameters: params
305
+ },
306
+ });
307
+ return result;
308
+ }
309
+
310
+ /**
311
+ * List deleted groups by owner
312
+ * List deleted groups that can be restored by owner
313
+ */
314
+ public static async ListDeletedGroupsByOwner(userId: string): Promise<IOperationResult<ListGroups_Response>> {
315
+ const params: { userId: string } = { userId };
316
+ const result = await Office365GroupsService.client.executeAsync<{ userId: string }, ListGroups_Response>(
317
+ {
318
+ connectorOperation: {
319
+ tableName: Office365GroupsService.dataSourceName,
320
+ operationName: 'ListDeletedGroupsByOwner',
321
+ parameters: params
322
+ },
323
+ });
324
+ return result;
325
+ }
326
+ }