codeapp-js 0.3.0 → 1.0.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.
- package/AI/codeapp.agent.md +105 -0
- package/AI/skills/connections/SKILL.md +47 -0
- package/AI/skills/dataverse/SKILL.md +99 -0
- package/AI/skills/environment-variables/SKILL.md +89 -0
- package/AI/skills/frontend-design/SKILL.md +34 -0
- package/AI/skills/jira/SKILL.md +81 -0
- package/AI/skills/office365-groups/SKILL.md +61 -0
- package/AI/skills/office365-outlook/SKILL.md +52 -0
- package/AI/skills/office365-users/SKILL.md +78 -0
- package/AI/skills/sharepoint/SKILL.md +77 -0
- package/AI/skills/sql/SKILL.md +85 -0
- package/AI/skills/start/SKILL.md +46 -0
- package/AI/skills/teams/SKILL.md +55 -0
- package/{examples/combined demo/.power/schemas/office365groups/office365groups.Schema.json → codeApp/.power/schemas/office365groups/office365groups.Schema.json} +2203 -2203
- package/codeApp/dist/codeapp.js +95 -1792
- package/codeApp/dist/connectors/azureKeyvault.js +459 -0
- package/codeApp/dist/connectors/jira.js +1247 -0
- package/codeApp/dist/connectors/office365groups.js +642 -0
- package/codeApp/dist/connectors/office365users.js +513 -0
- package/codeApp/dist/connectors/outlook.js +1393 -0
- package/{dev files/sharepoint.js → codeApp/dist/connectors/sharepoint.js} +239 -112
- package/codeApp/dist/connectors/sql.js +149 -0
- package/codeApp/dist/connectors/teams.js +280 -0
- package/codeApp/dist/power-apps-data.js +16 -2
- package/examples/{kanban → apps/kanban}/dist/dataverse.js +94 -94
- package/examples/{kanban → apps/kanban}/dist/environmentVar.js +55 -55
- package/examples/{kanban → apps/kanban}/dist/index.css +605 -605
- package/examples/{kanban → apps/kanban}/dist/index.html +21 -21
- package/examples/{kanban → apps/kanban}/dist/index.js +860 -860
- package/examples/{kanban → apps/kanban}/dist/office365groups.js +97 -97
- package/examples/apps/kanban/dist/office365users.js +451 -0
- package/examples/{kanban → apps/kanban}/dist/outlook.js +162 -162
- package/examples/{planning Poker/dist/power-apps-data.js → apps/kanban/dist/power-apps-data.js} +2953 -2953
- package/examples/{kanban → apps/kanban}/dist/sharepoint.js +435 -339
- package/examples/{kanban → apps/kanban}/power.config.json +35 -35
- package/examples/{planning Poker → apps/planning Poker}/additional files/customizations (tables).xml +6428 -6428
- package/examples/{planning Poker → apps/planning Poker}/additional files/dataverse-tables.json +165 -165
- package/examples/{planning Poker → apps/planning Poker}/additional files/readme.md +122 -122
- package/examples/{planning Poker → apps/planning Poker}/dist/dataverse.js +78 -78
- package/examples/{planning Poker → apps/planning Poker}/dist/index.html +198 -198
- package/examples/{planning Poker → apps/planning Poker}/dist/index.js +954 -954
- package/examples/{todo/dist/power-apps-data.js → apps/planning Poker/dist/power-apps-data.js } +2953 -2953
- package/examples/{planning Poker → apps/planning Poker}/dist/styles.css +815 -815
- package/examples/{planning Poker → apps/planning Poker}/power.config.json +50 -50
- package/examples/{outlook Demo2 → apps/solution explorer}/dist/codeapp.js +9 -245
- package/examples/apps/solution explorer/dist/index.html +80 -0
- package/examples/apps/solution explorer/dist/index.js +735 -0
- package/examples/apps/solution explorer/dist/styles.css +571 -0
- package/examples/apps/solution explorer/power.config.json +151 -0
- package/examples/{todo → apps/todo}/dist/dataverse.js +64 -64
- package/examples/{todo → apps/todo}/dist/index.html +75 -75
- package/examples/{todo → apps/todo}/dist/index.js +8 -8
- package/examples/{kanban → apps/todo}/dist/power-apps-data.js +2953 -2953
- package/examples/{todo → apps/todo}/dist/renderer.js +375 -375
- package/examples/{todo → apps/todo}/dist/styles.css +691 -691
- package/examples/{todo → apps/todo}/power.config.json +34 -34
- package/examples/combined demo/.power/schemas/appschemas/dataSourcesInfo.ts +6275 -7830
- package/examples/combined demo/.power/schemas/jira/jira.Schema.json +6903 -0
- package/examples/combined demo/.power/schemas/keyvault/keyvault.Schema.json +1600 -0
- package/examples/combined demo/.power/schemas/teams/teams.Schema.json +11112 -0
- package/examples/combined demo/dist/codeapp.js +394 -1098
- package/examples/{outlook Demo2/OutlookDemo_1_0_0_1.zip → combined demo/dist/icon-512.png} +0 -0
- package/examples/combined demo/dist/index.html +29 -511
- package/examples/combined demo/dist/index.js +490 -470
- package/examples/combined demo/dist/office365users.js +513 -0
- package/examples/combined demo/dist/outlook.js +1393 -0
- package/examples/combined demo/dist/power-apps-data.js +3079 -3006
- package/examples/combined demo/dist/styles.css +483 -0
- package/examples/combined demo/power.config.json +33 -42
- package/examples/combined demo/src/generated/index.ts +12 -14
- package/examples/combined demo/src/generated/models/AzureKeyVaultModel.ts +107 -0
- package/examples/combined demo/src/generated/models/JiraModel.ts +501 -0
- package/examples/combined demo/src/generated/services/AzureKeyVaultService.ts +257 -0
- package/examples/combined demo/src/generated/services/JiraService.ts +1124 -0
- package/examples/dataverse Demo/dist/codeapp.js +394 -1085
- package/examples/dataverse Demo/dist/icon-512.png +0 -0
- package/examples/dataverse Demo/dist/index.html +146 -54
- package/examples/dataverse Demo/dist/index.js +693 -83
- package/examples/dataverse Demo/dist/power-apps-data.js +3079 -2911
- package/examples/dataverse Demo/dist/styles.css +528 -0
- package/examples/dataverse Demo/power.config.json +41 -35
- package/examples/dataverse Demo/readme.md +79 -79
- package/examples/groups Demo/dist/codeapp.js +394 -1085
- package/examples/groups Demo/dist/icon-512.png +0 -0
- package/examples/groups Demo/dist/index.html +21 -25
- package/examples/groups Demo/dist/index.js +304 -113
- package/examples/groups Demo/dist/office365groups.js +642 -0
- package/examples/groups Demo/dist/power-apps-data.js +3079 -2911
- package/examples/groups Demo/dist/styles.css +509 -0
- package/examples/groups Demo/power.config.json +25 -25
- package/examples/myProfile/dist/codeapp.js +398 -0
- package/examples/myProfile/dist/index.html +21 -184
- package/examples/myProfile/dist/index.js +324 -141
- package/examples/myProfile/dist/office365users.js +517 -169
- package/examples/myProfile/dist/power-apps-data.js +3080 -2953
- package/examples/myProfile/dist/styles.css +458 -0
- package/examples/myProfile/power.config.json +24 -23
- package/examples/outlook Demo/dist/codeapp.js +394 -1085
- package/examples/outlook Demo/dist/index.html +150 -35
- package/examples/outlook Demo/dist/index.js +516 -170
- package/examples/outlook Demo/dist/outlook.js +1393 -121
- package/examples/outlook Demo/dist/power-apps-data.js +3079 -2911
- package/examples/outlook Demo/dist/styles.css +408 -84
- package/examples/outlook Demo/power.config.json +24 -23
- package/examples/outlook Demo/readme.md +92 -82
- package/examples/sharePoint Demo/dist/codeapp.js +394 -1085
- package/examples/sharePoint Demo/dist/icon-512.png +0 -0
- package/examples/sharePoint Demo/dist/index.html +22 -255
- package/examples/sharePoint Demo/dist/index.js +899 -262
- package/examples/sharePoint Demo/dist/power-apps-data.js +3079 -2911
- package/examples/sharePoint Demo/dist/sharepoint.js +466 -0
- package/examples/sharePoint Demo/dist/styles.css +587 -0
- package/examples/sharePoint Demo/power.config.json +23 -22
- package/package.json +1 -1
- package/readme.md +465 -76
- package/.vscode/settings.json +0 -6
- package/dev files/customConnector.js +0 -98
- package/dev files/dataverse.js +0 -120
- package/dev files/environmentVar.js +0 -55
- package/dev files/office365groups.js +0 -65
- package/dev files/office365users.js +0 -169
- package/dev files/outlook.js +0 -330
- package/dev files/power-apps-data.js +0 -2952
- package/examples/combined demo/.power/schemas/office365/office365.Schema.json +0 -21098
- package/examples/combined demo/.power/schemas/office365users/office365users.Schema.json +0 -2094
- package/examples/kanban/agent/decision-log.md +0 -9
- package/examples/kanban/agent/mockup-01-editorial-glass.html +0 -159
- package/examples/kanban/agent/mockup-02-dark-rail.html +0 -147
- package/examples/kanban/agent/mockup-03-paper-grid.html +0 -114
- package/examples/kanban/agent/mockup-04-neon-minimal.html +0 -141
- package/examples/kanban/agent/mockup-05-mono-architect.html +0 -119
- package/examples/kanban/dist/office365users.js +0 -169
- package/examples/kanban/src/generated/index.ts +0 -14
- package/examples/kanban/src/generated/models/Office365GroupsModel.ts +0 -363
- package/examples/kanban/src/generated/models/Office365OutlookModel.ts +0 -2046
- package/examples/kanban/src/generated/models/Office365UsersModel.ts +0 -254
- package/examples/kanban/src/generated/services/Office365GroupsService.ts +0 -326
- package/examples/kanban/src/generated/services/Office365OutlookService.ts +0 -2476
- package/examples/kanban/src/generated/services/Office365UsersService.ts +0 -358
- package/examples/outlook Demo2/agent/decision-log.md +0 -7
- package/examples/outlook Demo2/dist/index.html +0 -98
- package/examples/outlook Demo2/dist/index.js +0 -272
- package/examples/outlook Demo2/dist/styles.css +0 -639
- package/examples/outlook Demo2/power.config.json +0 -23
- package/examples/planning Poker/.vscode/settings.json +0 -5
- package/examples/sharePoint Demo/agent/decision-log.md +0 -17
- /package/examples/{outlook Demo2 → apps/kanban}/src/generated/index.ts +0 -0
- /package/examples/{outlook Demo2 → apps/kanban}/src/generated/models/Office365GroupsModel.ts +0 -0
- /package/examples/{outlook Demo2 → apps/kanban}/src/generated/models/Office365OutlookModel.ts +0 -0
- /package/examples/{outlook Demo2 → apps/kanban}/src/generated/models/Office365UsersModel.ts +0 -0
- /package/examples/{outlook Demo2 → apps/kanban}/src/generated/services/Office365GroupsService.ts +0 -0
- /package/examples/{outlook Demo2 → apps/kanban}/src/generated/services/Office365OutlookService.ts +0 -0
- /package/examples/{outlook Demo2 → apps/kanban}/src/generated/services/Office365UsersService.ts +0 -0
- /package/examples/{planning Poker → apps/planning Poker}/additional files/AgilePoker_1_0_0_1.zip +0 -0
- /package/examples/{planning Poker → apps/planning Poker}/additional files/PokerTables_1_0_0_1.zip +0 -0
- /package/examples/{outlook Demo2 → apps/solution explorer}/dist/icon-512.png +0 -0
- /package/examples/{outlook Demo2 → apps/solution explorer}/dist/power-apps-data.js +0 -0
- /package/examples/{todo → apps/todo}/dist/icon192.png +0 -0
|
@@ -1,358 +0,0 @@
|
|
|
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 { ClientPhotoMetadata } from '../models/Office365UsersModel';
|
|
7
|
-
import type { EntityListResponse_IReadOnlyList_User } from '../models/Office365UsersModel';
|
|
8
|
-
import type { GraphTrending } from '../models/Office365UsersModel';
|
|
9
|
-
import type { GraphUserUpdateable_V1 } from '../models/Office365UsersModel';
|
|
10
|
-
import type { GraphUser_V1 } from '../models/Office365UsersModel';
|
|
11
|
-
import type { IOperationResult } from '@microsoft/power-apps/data';
|
|
12
|
-
import type { LinklessEntityListResponse_List_Person } from '../models/Office365UsersModel';
|
|
13
|
-
import type { ObjectWithoutType } from '../models/Office365UsersModel';
|
|
14
|
-
import type { User } from '../models/Office365UsersModel';
|
|
15
|
-
import { dataSourcesInfo } from '../../../.power/schemas/appschemas/dataSourcesInfo';
|
|
16
|
-
import { getClient } from '@microsoft/power-apps/data';
|
|
17
|
-
|
|
18
|
-
export class Office365UsersService {
|
|
19
|
-
private static readonly dataSourceName = 'office365users';
|
|
20
|
-
|
|
21
|
-
private static readonly client = getClient(dataSourcesInfo);
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Update my profile
|
|
25
|
-
* Updates the profile of the current user
|
|
26
|
-
*/
|
|
27
|
-
public static async UpdateMyProfile(body?: GraphUserUpdateable_V1): Promise<IOperationResult<void>> {
|
|
28
|
-
const params: { body?: GraphUserUpdateable_V1 } = { body };
|
|
29
|
-
const result = await Office365UsersService.client.executeAsync<{ body?: GraphUserUpdateable_V1 }, void>(
|
|
30
|
-
{
|
|
31
|
-
connectorOperation: {
|
|
32
|
-
tableName: Office365UsersService.dataSourceName,
|
|
33
|
-
operationName: 'UpdateMyProfile',
|
|
34
|
-
parameters: params
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
return result;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
/**
|
|
41
|
-
* Get my profile (V2)
|
|
42
|
-
* Retrieves the profile of the current user. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties
|
|
43
|
-
*/
|
|
44
|
-
public static async MyProfile_V2($select?: string): Promise<IOperationResult<GraphUser_V1>> {
|
|
45
|
-
const params: { $select?: string } = { $select };
|
|
46
|
-
const result = await Office365UsersService.client.executeAsync<{ $select?: string }, GraphUser_V1>(
|
|
47
|
-
{
|
|
48
|
-
connectorOperation: {
|
|
49
|
-
tableName: Office365UsersService.dataSourceName,
|
|
50
|
-
operationName: 'MyProfile_V2',
|
|
51
|
-
parameters: params
|
|
52
|
-
},
|
|
53
|
-
});
|
|
54
|
-
return result;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Update my profile photo
|
|
59
|
-
* Updates the profile photo of the current user. The size of the photo must be less than 4 MB.
|
|
60
|
-
*/
|
|
61
|
-
public static async UpdateMyPhoto(body: string, Content_Type: string): Promise<IOperationResult<void>> {
|
|
62
|
-
const params: { body: string, Content_Type: string } = { body, Content_Type };
|
|
63
|
-
const result = await Office365UsersService.client.executeAsync<{ body: string, Content_Type: string }, void>(
|
|
64
|
-
{
|
|
65
|
-
connectorOperation: {
|
|
66
|
-
tableName: Office365UsersService.dataSourceName,
|
|
67
|
-
operationName: 'UpdateMyPhoto',
|
|
68
|
-
parameters: params
|
|
69
|
-
},
|
|
70
|
-
});
|
|
71
|
-
return result;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
* Get my trending documents
|
|
76
|
-
* Retrieves the trending documents for the signed in user
|
|
77
|
-
*/
|
|
78
|
-
public static async MyTrendingDocuments($filter?: string, extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean): Promise<IOperationResult<{ value: GraphTrending[] }>> {
|
|
79
|
-
const params: { $filter?: string, extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean } = { $filter, extractSensitivityLabel, fetchSensitivityLabelMetadata };
|
|
80
|
-
const result = await Office365UsersService.client.executeAsync<{ $filter?: string, extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean }, { value: GraphTrending[] }>(
|
|
81
|
-
{
|
|
82
|
-
connectorOperation: {
|
|
83
|
-
tableName: Office365UsersService.dataSourceName,
|
|
84
|
-
operationName: 'MyTrendingDocuments',
|
|
85
|
-
parameters: params
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
return result;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
/**
|
|
92
|
-
* Get relevant people
|
|
93
|
-
* Get relevant people.
|
|
94
|
-
*/
|
|
95
|
-
public static async RelevantPeople(userId: string): Promise<IOperationResult<LinklessEntityListResponse_List_Person>> {
|
|
96
|
-
const params: { userId: string } = { userId };
|
|
97
|
-
const result = await Office365UsersService.client.executeAsync<{ userId: string }, LinklessEntityListResponse_List_Person>(
|
|
98
|
-
{
|
|
99
|
-
connectorOperation: {
|
|
100
|
-
tableName: Office365UsersService.dataSourceName,
|
|
101
|
-
operationName: 'RelevantPeople',
|
|
102
|
-
parameters: params
|
|
103
|
-
},
|
|
104
|
-
});
|
|
105
|
-
return result;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
/**
|
|
109
|
-
* Get my profile (V1)
|
|
110
|
-
* Retrieves the profile of the current user.
|
|
111
|
-
*/
|
|
112
|
-
public static async MyProfile(): Promise<IOperationResult<User>> {
|
|
113
|
-
const result = await Office365UsersService.client.executeAsync<void, User>(
|
|
114
|
-
{
|
|
115
|
-
connectorOperation: {
|
|
116
|
-
tableName: Office365UsersService.dataSourceName,
|
|
117
|
-
operationName: 'MyProfile',
|
|
118
|
-
},
|
|
119
|
-
});
|
|
120
|
-
return result;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Get user profile (V1)
|
|
125
|
-
* Retrieves the profile of a specific user.
|
|
126
|
-
*/
|
|
127
|
-
public static async UserProfile(userId: string): Promise<IOperationResult<User>> {
|
|
128
|
-
const params: { userId: string } = { userId };
|
|
129
|
-
const result = await Office365UsersService.client.executeAsync<{ userId: string }, User>(
|
|
130
|
-
{
|
|
131
|
-
connectorOperation: {
|
|
132
|
-
tableName: Office365UsersService.dataSourceName,
|
|
133
|
-
operationName: 'UserProfile',
|
|
134
|
-
parameters: params
|
|
135
|
-
},
|
|
136
|
-
});
|
|
137
|
-
return result;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Get user photo metadata
|
|
142
|
-
* Get user photo metadata.
|
|
143
|
-
*/
|
|
144
|
-
public static async UserPhotoMetadata(userId: string): Promise<IOperationResult<ClientPhotoMetadata>> {
|
|
145
|
-
const params: { userId: string } = { userId };
|
|
146
|
-
const result = await Office365UsersService.client.executeAsync<{ userId: string }, ClientPhotoMetadata>(
|
|
147
|
-
{
|
|
148
|
-
connectorOperation: {
|
|
149
|
-
tableName: Office365UsersService.dataSourceName,
|
|
150
|
-
operationName: 'UserPhotoMetadata',
|
|
151
|
-
parameters: params
|
|
152
|
-
},
|
|
153
|
-
});
|
|
154
|
-
return result;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
/**
|
|
158
|
-
* Get user photo (V1)
|
|
159
|
-
* Retrieves the photo of the specified user if they have one.
|
|
160
|
-
*/
|
|
161
|
-
public static async UserPhoto(userId: string): Promise<IOperationResult<string>> {
|
|
162
|
-
const params: { userId: string } = { userId };
|
|
163
|
-
const result = await Office365UsersService.client.executeAsync<{ userId: string }, string>(
|
|
164
|
-
{
|
|
165
|
-
connectorOperation: {
|
|
166
|
-
tableName: Office365UsersService.dataSourceName,
|
|
167
|
-
operationName: 'UserPhoto',
|
|
168
|
-
parameters: params
|
|
169
|
-
},
|
|
170
|
-
});
|
|
171
|
-
return result;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
/**
|
|
175
|
-
* Get manager (V1)
|
|
176
|
-
* Retrieves the profile of the specified user's manager.
|
|
177
|
-
*/
|
|
178
|
-
public static async Manager(userId: string): Promise<IOperationResult<User>> {
|
|
179
|
-
const params: { userId: string } = { userId };
|
|
180
|
-
const result = await Office365UsersService.client.executeAsync<{ userId: string }, User>(
|
|
181
|
-
{
|
|
182
|
-
connectorOperation: {
|
|
183
|
-
tableName: Office365UsersService.dataSourceName,
|
|
184
|
-
operationName: 'Manager',
|
|
185
|
-
parameters: params
|
|
186
|
-
},
|
|
187
|
-
});
|
|
188
|
-
return result;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/**
|
|
192
|
-
* Get direct reports (V1)
|
|
193
|
-
* Retrieves the user profiles of the specified user's direct reports.
|
|
194
|
-
*/
|
|
195
|
-
public static async DirectReports(userId: string): Promise<IOperationResult<User[]>> {
|
|
196
|
-
const params: { userId: string } = { userId };
|
|
197
|
-
const result = await Office365UsersService.client.executeAsync<{ userId: string }, User[]>(
|
|
198
|
-
{
|
|
199
|
-
connectorOperation: {
|
|
200
|
-
tableName: Office365UsersService.dataSourceName,
|
|
201
|
-
operationName: 'DirectReports',
|
|
202
|
-
parameters: params
|
|
203
|
-
},
|
|
204
|
-
});
|
|
205
|
-
return result;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
/**
|
|
209
|
-
* Search for users
|
|
210
|
-
* Retrieves the user profiles that match the search term.
|
|
211
|
-
*/
|
|
212
|
-
public static async SearchUser(searchTerm?: string, top?: number): Promise<IOperationResult<User[]>> {
|
|
213
|
-
const params: { searchTerm?: string, top?: number } = { searchTerm, top };
|
|
214
|
-
const result = await Office365UsersService.client.executeAsync<{ searchTerm?: string, top?: number }, User[]>(
|
|
215
|
-
{
|
|
216
|
-
connectorOperation: {
|
|
217
|
-
tableName: Office365UsersService.dataSourceName,
|
|
218
|
-
operationName: 'SearchUser',
|
|
219
|
-
parameters: params
|
|
220
|
-
},
|
|
221
|
-
});
|
|
222
|
-
return result;
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
/**
|
|
226
|
-
* Search for users (V2)
|
|
227
|
-
* Retrieves the user profiles that match the search term (V2).
|
|
228
|
-
*/
|
|
229
|
-
public static async SearchUserV2(searchTerm?: string, top?: number, isSearchTermRequired?: boolean, skipToken?: string): Promise<IOperationResult<EntityListResponse_IReadOnlyList_User>> {
|
|
230
|
-
const params: { searchTerm?: string, top?: number, isSearchTermRequired?: boolean, skipToken?: string } = { searchTerm, top, isSearchTermRequired, skipToken };
|
|
231
|
-
const result = await Office365UsersService.client.executeAsync<{ searchTerm?: string, top?: number, isSearchTermRequired?: boolean, skipToken?: string }, EntityListResponse_IReadOnlyList_User>(
|
|
232
|
-
{
|
|
233
|
-
connectorOperation: {
|
|
234
|
-
tableName: Office365UsersService.dataSourceName,
|
|
235
|
-
operationName: 'SearchUserV2',
|
|
236
|
-
parameters: params
|
|
237
|
-
},
|
|
238
|
-
});
|
|
239
|
-
return result;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
/**
|
|
243
|
-
* Tests the connection
|
|
244
|
-
* Tests the connection.
|
|
245
|
-
*/
|
|
246
|
-
public static async TestConnection(): Promise<IOperationResult<void>> {
|
|
247
|
-
const result = await Office365UsersService.client.executeAsync<void, void>(
|
|
248
|
-
{
|
|
249
|
-
connectorOperation: {
|
|
250
|
-
tableName: Office365UsersService.dataSourceName,
|
|
251
|
-
operationName: 'TestConnection',
|
|
252
|
-
},
|
|
253
|
-
});
|
|
254
|
-
return result;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Get user profile (V2)
|
|
259
|
-
* Retrieves the profile of a specific user. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties
|
|
260
|
-
*/
|
|
261
|
-
public static async UserProfile_V2(id: string, $select?: string): Promise<IOperationResult<GraphUser_V1>> {
|
|
262
|
-
const params: { id: string, $select?: string } = { id, $select };
|
|
263
|
-
const result = await Office365UsersService.client.executeAsync<{ id: string, $select?: string }, GraphUser_V1>(
|
|
264
|
-
{
|
|
265
|
-
connectorOperation: {
|
|
266
|
-
tableName: Office365UsersService.dataSourceName,
|
|
267
|
-
operationName: 'UserProfile_V2',
|
|
268
|
-
parameters: params
|
|
269
|
-
},
|
|
270
|
-
});
|
|
271
|
-
return result;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
/**
|
|
275
|
-
* Get manager (V2)
|
|
276
|
-
* Retrieves the profile of the specified user's manager. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties
|
|
277
|
-
*/
|
|
278
|
-
public static async Manager_V2(id: string, $select?: string): Promise<IOperationResult<GraphUser_V1>> {
|
|
279
|
-
const params: { id: string, $select?: string } = { id, $select };
|
|
280
|
-
const result = await Office365UsersService.client.executeAsync<{ id: string, $select?: string }, GraphUser_V1>(
|
|
281
|
-
{
|
|
282
|
-
connectorOperation: {
|
|
283
|
-
tableName: Office365UsersService.dataSourceName,
|
|
284
|
-
operationName: 'Manager_V2',
|
|
285
|
-
parameters: params
|
|
286
|
-
},
|
|
287
|
-
});
|
|
288
|
-
return result;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/**
|
|
292
|
-
* Get direct reports (V2)
|
|
293
|
-
* Retrieves the user profiles of the specified user's direct reports. Learn more about available fields to select: https://developer.microsoft.com/en-us/graph/docs/api-reference/v1.0/resources/user#properties
|
|
294
|
-
*/
|
|
295
|
-
public static async DirectReports_V2(id: string, $select?: string, $top?: number): Promise<IOperationResult<{ value: GraphUser_V1[] }>> {
|
|
296
|
-
const params: { id: string, $select?: string, $top?: number } = { id, $select, $top };
|
|
297
|
-
const result = await Office365UsersService.client.executeAsync<{ id: string, $select?: string, $top?: number }, { value: GraphUser_V1[] }>(
|
|
298
|
-
{
|
|
299
|
-
connectorOperation: {
|
|
300
|
-
tableName: Office365UsersService.dataSourceName,
|
|
301
|
-
operationName: 'DirectReports_V2',
|
|
302
|
-
parameters: params
|
|
303
|
-
},
|
|
304
|
-
});
|
|
305
|
-
return result;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
/**
|
|
309
|
-
* Get user photo (V2)
|
|
310
|
-
* Retrieves the photo of the specified user if they have one
|
|
311
|
-
*/
|
|
312
|
-
public static async UserPhoto_V2(id: string): Promise<IOperationResult<string>> {
|
|
313
|
-
const params: { id: string } = { id };
|
|
314
|
-
const result = await Office365UsersService.client.executeAsync<{ id: string }, string>(
|
|
315
|
-
{
|
|
316
|
-
connectorOperation: {
|
|
317
|
-
tableName: Office365UsersService.dataSourceName,
|
|
318
|
-
operationName: 'UserPhoto_V2',
|
|
319
|
-
parameters: params
|
|
320
|
-
},
|
|
321
|
-
});
|
|
322
|
-
return result;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
/**
|
|
326
|
-
* Get trending documents
|
|
327
|
-
* Retrieves the trending documents for a user
|
|
328
|
-
*/
|
|
329
|
-
public static async TrendingDocuments(id: string, $filter?: string, extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean): Promise<IOperationResult<{ value: GraphTrending[] }>> {
|
|
330
|
-
const params: { id: string, $filter?: string, extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean } = { id, $filter, extractSensitivityLabel, fetchSensitivityLabelMetadata };
|
|
331
|
-
const result = await Office365UsersService.client.executeAsync<{ id: string, $filter?: string, extractSensitivityLabel?: boolean, fetchSensitivityLabelMetadata?: boolean }, { value: GraphTrending[] }>(
|
|
332
|
-
{
|
|
333
|
-
connectorOperation: {
|
|
334
|
-
tableName: Office365UsersService.dataSourceName,
|
|
335
|
-
operationName: 'TrendingDocuments',
|
|
336
|
-
parameters: params
|
|
337
|
-
},
|
|
338
|
-
});
|
|
339
|
-
return result;
|
|
340
|
-
}
|
|
341
|
-
|
|
342
|
-
/**
|
|
343
|
-
* Send an HTTP request
|
|
344
|
-
* Construct a Microsoft Graph REST API request to invoke. These segments are supported: 1st segement: /me, /users/<userId> 2nd segment: messages, mailFolders, events, calendar, calendars, outlook, inferenceClassification. Learn more: https://docs.microsoft.com/en-us/graph/use-the-api.
|
|
345
|
-
*/
|
|
346
|
-
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>> {
|
|
347
|
-
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 };
|
|
348
|
-
const result = await Office365UsersService.client.executeAsync<{ Uri: string, Method: string, Body?: string, ContentType?: string, CustomHeader1?: string, CustomHeader2?: string, CustomHeader3?: string, CustomHeader4?: string, CustomHeader5?: string }, ObjectWithoutType>(
|
|
349
|
-
{
|
|
350
|
-
connectorOperation: {
|
|
351
|
-
tableName: Office365UsersService.dataSourceName,
|
|
352
|
-
operationName: 'HttpRequest',
|
|
353
|
-
parameters: params
|
|
354
|
-
},
|
|
355
|
-
});
|
|
356
|
-
return result;
|
|
357
|
-
}
|
|
358
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
- Outlook inbox + send email app built with shared_office365 connector
|
|
3
|
-
- Single shared client pattern per connections skill; DATA_SOURCE = 'office365'
|
|
4
|
-
- power.config.json updated with office365 connectionReference
|
|
5
|
-
- Operations used: GetEmailsV3 (list inbox), SendEmailV2 (send email)
|
|
6
|
-
- CSS in separate dist/styles.css; editorial warm-tone design with Playfair Display + DM Sans
|
|
7
|
-
- User still needs to: click Sync Connections button, then Deploy to push to environment
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
<!DOCTYPE html>
|
|
3
|
-
<html lang="en">
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="UTF-8" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>Outlook Mail</title>
|
|
8
|
-
<link rel="stylesheet" href="styles.css" />
|
|
9
|
-
<script type="module" src="power-apps-data.js"></script>
|
|
10
|
-
<script type="module" src="codeapp.js"></script>
|
|
11
|
-
<script type="module" src="index.js"></script>
|
|
12
|
-
</head>
|
|
13
|
-
<body>
|
|
14
|
-
<div id="root">
|
|
15
|
-
<!-- Header -->
|
|
16
|
-
<header class="app-header">
|
|
17
|
-
<div class="app-header__brand">
|
|
18
|
-
<div class="app-header__icon">M</div>
|
|
19
|
-
<h1 class="app-header__title">Mail</h1>
|
|
20
|
-
</div>
|
|
21
|
-
<div class="app-header__actions">
|
|
22
|
-
<button class="btn btn--secondary" id="btnRefresh" title="Refresh inbox">
|
|
23
|
-
↻ Refresh
|
|
24
|
-
</button>
|
|
25
|
-
<button class="btn btn--primary" id="btnCompose" title="Compose new email">
|
|
26
|
-
✎ Compose
|
|
27
|
-
</button>
|
|
28
|
-
</div>
|
|
29
|
-
</header>
|
|
30
|
-
|
|
31
|
-
<!-- Body -->
|
|
32
|
-
<div class="app-body" id="appBody">
|
|
33
|
-
<!-- Inbox List -->
|
|
34
|
-
<aside class="inbox-panel">
|
|
35
|
-
<div class="inbox-panel__header">
|
|
36
|
-
<span class="inbox-panel__title">Inbox</span>
|
|
37
|
-
<span class="inbox-panel__count" id="emailCount">—</span>
|
|
38
|
-
</div>
|
|
39
|
-
<div class="inbox-panel__list" id="emailList">
|
|
40
|
-
<!-- Skeleton loader -->
|
|
41
|
-
<div class="loading-skeleton" id="loadingSkeleton">
|
|
42
|
-
<div class="skeleton-item"><div class="skeleton-circle"></div><div class="skeleton-lines"><div class="skeleton-line skeleton-line--short"></div><div class="skeleton-line skeleton-line--medium"></div><div class="skeleton-line"></div></div></div>
|
|
43
|
-
<div class="skeleton-item"><div class="skeleton-circle"></div><div class="skeleton-lines"><div class="skeleton-line skeleton-line--short"></div><div class="skeleton-line skeleton-line--medium"></div><div class="skeleton-line"></div></div></div>
|
|
44
|
-
<div class="skeleton-item"><div class="skeleton-circle"></div><div class="skeleton-lines"><div class="skeleton-line skeleton-line--short"></div><div class="skeleton-line skeleton-line--medium"></div><div class="skeleton-line"></div></div></div>
|
|
45
|
-
<div class="skeleton-item"><div class="skeleton-circle"></div><div class="skeleton-lines"><div class="skeleton-line skeleton-line--short"></div><div class="skeleton-line skeleton-line--medium"></div><div class="skeleton-line"></div></div></div>
|
|
46
|
-
<div class="skeleton-item"><div class="skeleton-circle"></div><div class="skeleton-lines"><div class="skeleton-line skeleton-line--short"></div><div class="skeleton-line skeleton-line--medium"></div><div class="skeleton-line"></div></div></div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
</aside>
|
|
50
|
-
|
|
51
|
-
<!-- Detail Panel -->
|
|
52
|
-
<main class="detail-panel" id="detailPanel">
|
|
53
|
-
<div class="detail-panel__empty" id="detailEmpty">
|
|
54
|
-
<div class="detail-panel__empty-icon">✉</div>
|
|
55
|
-
<div class="detail-panel__empty-text">Select an email to read</div>
|
|
56
|
-
</div>
|
|
57
|
-
<div class="detail-panel__content" id="detailContent" style="display:none;"></div>
|
|
58
|
-
</main>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<!-- Status Bar -->
|
|
62
|
-
<div class="status-bar" id="statusBar">
|
|
63
|
-
<div class="status-bar__dot"></div>
|
|
64
|
-
<span id="statusText">Ready</span>
|
|
65
|
-
</div>
|
|
66
|
-
|
|
67
|
-
<!-- Compose Modal -->
|
|
68
|
-
<div class="modal-overlay" id="composeOverlay">
|
|
69
|
-
<div class="compose-modal">
|
|
70
|
-
<div class="compose-modal__header">
|
|
71
|
-
<h2 class="compose-modal__title">New Message</h2>
|
|
72
|
-
<button class="compose-modal__close" id="btnCloseCompose">✕</button>
|
|
73
|
-
</div>
|
|
74
|
-
<div class="compose-modal__body">
|
|
75
|
-
<div class="form-group">
|
|
76
|
-
<label class="form-group__label" for="composeTo">To</label>
|
|
77
|
-
<input class="form-group__input" type="email" id="composeTo" placeholder="recipient@example.com" />
|
|
78
|
-
</div>
|
|
79
|
-
<div class="form-group">
|
|
80
|
-
<label class="form-group__label" for="composeSubject">Subject</label>
|
|
81
|
-
<input class="form-group__input" type="text" id="composeSubject" placeholder="What is this about?" />
|
|
82
|
-
</div>
|
|
83
|
-
<div class="form-group">
|
|
84
|
-
<label class="form-group__label" for="composeBody">Message</label>
|
|
85
|
-
<textarea class="form-group__input form-group__input--textarea" id="composeBody" placeholder="Write your message…"></textarea>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
<div class="compose-modal__footer">
|
|
89
|
-
<button class="btn btn--ghost" id="btnDiscardCompose">Discard</button>
|
|
90
|
-
<button class="btn btn--primary" id="btnSendEmail">
|
|
91
|
-
Send ➤
|
|
92
|
-
</button>
|
|
93
|
-
</div>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
</div>
|
|
97
|
-
</body>
|
|
98
|
-
</html>
|