codeapp-js 0.2.2 → 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/codeApp/.power/schemas/appschemas/dataSourcesInfo.ts +6275 -0
- package/codeApp/.power/schemas/jira/jira.Schema.json +6903 -0
- package/codeApp/.power/schemas/keyvault/keyvault.Schema.json +1600 -0
- package/{examples/combined demo/.power/schemas/office365groups/office365groups.Schema.json → codeApp/.power/schemas/office365groups/office365groups.Schema.json} +2203 -2203
- package/codeApp/.power/schemas/teams/teams.Schema.json +11112 -0
- package/codeApp/dist/codeapp.js +103 -1043
- 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/{examples/kanban/dist → codeApp/dist/connectors}/sharepoint.js +466 -339
- package/codeApp/dist/connectors/sql.js +149 -0
- package/codeApp/dist/connectors/teams.js +280 -0
- package/codeApp/dist/index.js +1 -1
- package/codeApp/dist/power-apps-data.js +725 -176
- package/codeApp/src/generated/index.ts +12 -0
- package/codeApp/src/generated/models/AzureKeyVaultModel.ts +107 -0
- package/codeApp/src/generated/models/JiraModel.ts +501 -0
- package/codeApp/src/generated/services/AzureKeyVaultService.ts +257 -0
- package/codeApp/src/generated/services/JiraService.ts +1124 -0
- package/examples/{kanban → apps/kanban}/dist/dataverse.js +94 -94
- 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/{dev files/sharepoint.js → examples/apps/kanban/dist/sharepoint.js} +195 -99
- 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/{kanban/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/{solution explorer → apps/solution explorer}/dist/codeapp.js +1098 -1098
- package/examples/{solution explorer → apps/solution explorer}/dist/index.html +80 -80
- package/examples/{solution explorer → apps/solution explorer}/dist/index.js +735 -735
- package/examples/{solution explorer → apps/solution explorer}/dist/styles.css +571 -571
- package/examples/{solution explorer → apps/solution explorer}/power.config.json +150 -150
- 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/{todo → 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/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/{outlook Demo2/OutlookDemo_1_0_0_1.zip → 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 +479 -61
- package/.github/instructions/wyattdave.instructions.md +0 -39
- package/.vscode/settings.json +0 -6
- package/dev files/dataverse.js +0 -105
- package/dev files/office365groups.js +0 -65
- package/dev files/office365users.js +0 -169
- package/dev files/outlook.js +0 -330
- 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/environmentVar.js +0 -55
- package/examples/kanban/dist/office365users.js +0 -169
- package/examples/kanban/src/generated/index.ts +0 -14
- package/examples/outlook Demo2/agent/decision-log.md +0 -7
- package/examples/outlook Demo2/dist/codeapp.js +0 -1334
- package/examples/outlook Demo2/dist/index.html +0 -98
- package/examples/outlook Demo2/dist/index.js +0 -346
- 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/solution explorer/agent/decision-log.md +0 -27
- package/examples/solution explorer/agent/mockup-01-swiss-grid.html +0 -452
- package/examples/solution explorer/agent/mockup-02-dark-glass.html +0 -496
- package/examples/solution explorer/agent/mockup-03-paper-console.html +0 -510
- package/examples/solution explorer/agent/mockup-04-neon-noir.html +0 -546
- package/examples/solution explorer/agent/mockup-05-zen-garden.html +0 -534
- package/examples/solution explorer/dist/power-apps-data.js +0 -3007
- package/scripts/build-power-sdk.mjs +0 -69
- /package/{examples/kanban → codeApp}/src/generated/models/Office365GroupsModel.ts +0 -0
- /package/{examples/kanban → codeApp}/src/generated/models/Office365OutlookModel.ts +0 -0
- /package/{examples/kanban → codeApp}/src/generated/models/Office365UsersModel.ts +0 -0
- /package/{examples/kanban → codeApp}/src/generated/services/Office365GroupsService.ts +0 -0
- /package/{examples/kanban → codeApp}/src/generated/services/Office365OutlookService.ts +0 -0
- /package/{examples/kanban → codeApp}/src/generated/services/Office365UsersService.ts +0 -0
- /package/{dev files → examples/apps/kanban/dist}/environmentVar.js +0 -0
- /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
- /package/examples/{solution explorer → combined demo}/dist/icon-512.png +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
2
|
+
// ─────────────────────────────────── SQL ────────────────────────────────────
|
|
3
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
import { getClient } from "./power-apps-data.js";
|
|
5
|
+
import {_dbgWrap } from "./codeapp.js";
|
|
6
|
+
const SQL_DATA_SOURCE_CANDIDATES = ["sql", "Sql", "SQL"];
|
|
7
|
+
const SQL_APIS = {
|
|
8
|
+
GetTables_V2: {
|
|
9
|
+
path: "/GetTables_V2",
|
|
10
|
+
method: "POST",
|
|
11
|
+
parameters: [
|
|
12
|
+
{ name: "body", in: "body", required: true },
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
GetItems_V2: {
|
|
16
|
+
path: "/GetItems_V2",
|
|
17
|
+
method: "POST",
|
|
18
|
+
parameters: [
|
|
19
|
+
{ name: "body", in: "body", required: true },
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
GetItem_V2: {
|
|
23
|
+
path: "/GetItem_V2",
|
|
24
|
+
method: "POST",
|
|
25
|
+
parameters: [
|
|
26
|
+
{ name: "body", in: "body", required: true },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
PostItem_V2: {
|
|
30
|
+
path: "/PostItem_V2",
|
|
31
|
+
method: "POST",
|
|
32
|
+
parameters: [
|
|
33
|
+
{ name: "body", in: "body", required: true },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
PatchItem_V2: {
|
|
37
|
+
path: "/PatchItem_V2",
|
|
38
|
+
method: "POST",
|
|
39
|
+
parameters: [
|
|
40
|
+
{ name: "body", in: "body", required: true },
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
DeleteItem_V2: {
|
|
44
|
+
path: "/DeleteItem_V2",
|
|
45
|
+
method: "POST",
|
|
46
|
+
parameters: [
|
|
47
|
+
{ name: "body", in: "body", required: true },
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
ExecutePassThroughNativeQuery_V2: {
|
|
51
|
+
path: "/ExecutePassThroughNativeQuery_V2",
|
|
52
|
+
method: "POST",
|
|
53
|
+
parameters: [
|
|
54
|
+
{ name: "body", in: "body", required: true },
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
ExecuteProcedure_V2: {
|
|
58
|
+
path: "/ExecuteProcedure_V2",
|
|
59
|
+
method: "POST",
|
|
60
|
+
parameters: [
|
|
61
|
+
{ name: "body", in: "body", required: true },
|
|
62
|
+
],
|
|
63
|
+
},
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
async function execSqlOp(operationName, parameters) {
|
|
67
|
+
return execConnectorOpWithCandidates(SQL_DATA_SOURCE_CANDIDATES, SQL_APIS, "SQL Server", operationName, parameters);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export async function callSqlOperation(operationName, parameters = {}) {
|
|
71
|
+
return _dbgWrap('callSqlOperation', [operationName, parameters], async function() {
|
|
72
|
+
return execSqlOp(operationName, parameters);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export async function getSqlTables({ server = "default", database = "default" } = {}) {
|
|
77
|
+
return _dbgWrap('getSqlTables', [{ server, database }], async function() {
|
|
78
|
+
return execSqlOp("GetTables_V2", {
|
|
79
|
+
body: { server, database },
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export async function getSqlRows({ server = "default", database = "default", table, apply, filter, orderBy, skip, top, select } = {}) {
|
|
85
|
+
return _dbgWrap('getSqlRows', [{ server, database, table, apply, filter, orderBy, skip, top, select }], async function() {
|
|
86
|
+
const body = { server, database, table };
|
|
87
|
+
if (apply) body.$apply = apply;
|
|
88
|
+
if (filter) body.$filter = filter;
|
|
89
|
+
if (orderBy) body.$orderby = orderBy;
|
|
90
|
+
if (skip != null) body.$skip = skip;
|
|
91
|
+
if (top != null) body.$top = top;
|
|
92
|
+
if (select) body.$select = select;
|
|
93
|
+
|
|
94
|
+
return execSqlOp("GetItems_V2", { body });
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export async function getSqlRow({ server = "default", database = "default", table, id } = {}) {
|
|
99
|
+
return _dbgWrap('getSqlRow', [{ server, database, table, id }], async function() {
|
|
100
|
+
return execSqlOp("GetItem_V2", {
|
|
101
|
+
body: { server, database, table, id },
|
|
102
|
+
});
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export async function insertSqlRow({ server = "default", database = "default", table, item } = {}) {
|
|
107
|
+
return _dbgWrap('insertSqlRow', [{ server, database, table, item }], async function() {
|
|
108
|
+
return execSqlOp("PostItem_V2", {
|
|
109
|
+
body: { server, database, table, item },
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export async function updateSqlRow({ server = "default", database = "default", table, id, item } = {}) {
|
|
115
|
+
return _dbgWrap('updateSqlRow', [{ server, database, table, id, item }], async function() {
|
|
116
|
+
return execSqlOp("PatchItem_V2", {
|
|
117
|
+
body: { server, database, table, id, item },
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export async function deleteSqlRow({ server = "default", database = "default", table, id } = {}) {
|
|
123
|
+
return _dbgWrap('deleteSqlRow', [{ server, database, table, id }], async function() {
|
|
124
|
+
return execSqlOp("DeleteItem_V2", {
|
|
125
|
+
body: { server, database, table, id },
|
|
126
|
+
});
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export async function executeSqlQuery({ server = "default", database = "default", query } = {}) {
|
|
131
|
+
return _dbgWrap('executeSqlQuery', [{ server, database, query }], async function() {
|
|
132
|
+
return execSqlOp("ExecutePassThroughNativeQuery_V2", {
|
|
133
|
+
body: { server, database, query },
|
|
134
|
+
});
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
export async function executeSqlStoredProcedure({ server = "default", database = "default", procedure, parameters } = {}) {
|
|
139
|
+
return _dbgWrap('executeSqlStoredProcedure', [{ server, database, procedure, parameters }], async function() {
|
|
140
|
+
return execSqlOp("ExecuteProcedure_V2", {
|
|
141
|
+
body: {
|
|
142
|
+
server,
|
|
143
|
+
database,
|
|
144
|
+
procedure,
|
|
145
|
+
parameters: parameters || {},
|
|
146
|
+
},
|
|
147
|
+
});
|
|
148
|
+
});
|
|
149
|
+
}
|
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
2
|
+
// ────────────────────────────────── Teams ───────────────────────────────────
|
|
3
|
+
// ────────────────────────────────────────────────────────────────────────────
|
|
4
|
+
import { getClient } from "./power-apps-data.js";
|
|
5
|
+
import {_dbgWrap } from "./codeapp.js";
|
|
6
|
+
const TEAMS_DATA_SOURCE_CANDIDATES = ["teams", "Teams", "microsoftteams", "MicrosoftTeams"];
|
|
7
|
+
const TEAMS_APIS = {
|
|
8
|
+
GetAllTeams: {
|
|
9
|
+
path: "/{connectionId}/GetAllTeams",
|
|
10
|
+
method: "GET",
|
|
11
|
+
parameters: [
|
|
12
|
+
{ name: "connectionId", in: "path", required: true },
|
|
13
|
+
],
|
|
14
|
+
},
|
|
15
|
+
GetChannelsForGroup: {
|
|
16
|
+
path: "/{connectionId}/GetChannelsForGroup",
|
|
17
|
+
method: "GET",
|
|
18
|
+
parameters: [
|
|
19
|
+
{ name: "connectionId", in: "path", required: true },
|
|
20
|
+
{ name: "groupId", in: "query", required: true },
|
|
21
|
+
],
|
|
22
|
+
},
|
|
23
|
+
GetTeam: {
|
|
24
|
+
path: "/{connectionId}/GetTeam",
|
|
25
|
+
method: "GET",
|
|
26
|
+
parameters: [
|
|
27
|
+
{ name: "connectionId", in: "path", required: true },
|
|
28
|
+
{ name: "teamId", in: "query", required: true },
|
|
29
|
+
],
|
|
30
|
+
},
|
|
31
|
+
GetChannel: {
|
|
32
|
+
path: "/{connectionId}/GetChannel",
|
|
33
|
+
method: "GET",
|
|
34
|
+
parameters: [
|
|
35
|
+
{ name: "connectionId", in: "path", required: true },
|
|
36
|
+
{ name: "groupId", in: "query", required: true },
|
|
37
|
+
{ name: "channelId", in: "query", required: true },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
AddMemberToTeam: {
|
|
41
|
+
path: "/{connectionId}/AddMemberToTeam",
|
|
42
|
+
method: "POST",
|
|
43
|
+
parameters: [
|
|
44
|
+
{ name: "connectionId", in: "path", required: true },
|
|
45
|
+
{ name: "teamId", in: "query", required: true },
|
|
46
|
+
{ name: "body", in: "body", required: true },
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
AddMemberToChannel: {
|
|
50
|
+
path: "/{connectionId}/AddMemberToChannel",
|
|
51
|
+
method: "POST",
|
|
52
|
+
parameters: [
|
|
53
|
+
{ name: "connectionId", in: "path", required: true },
|
|
54
|
+
{ name: "groupId", in: "query", required: true },
|
|
55
|
+
{ name: "channelId", in: "query", required: true },
|
|
56
|
+
{ name: "body", in: "body", required: true },
|
|
57
|
+
],
|
|
58
|
+
},
|
|
59
|
+
AtMentionUser: {
|
|
60
|
+
path: "/{connectionId}/AtMentionUser",
|
|
61
|
+
method: "GET",
|
|
62
|
+
parameters: [
|
|
63
|
+
{ name: "connectionId", in: "path", required: true },
|
|
64
|
+
{ name: "userId", in: "query", required: true },
|
|
65
|
+
],
|
|
66
|
+
},
|
|
67
|
+
AtMentionTag: {
|
|
68
|
+
path: "/{connectionId}/AtMentionTag",
|
|
69
|
+
method: "GET",
|
|
70
|
+
parameters: [
|
|
71
|
+
{ name: "connectionId", in: "path", required: true },
|
|
72
|
+
{ name: "teamId", in: "query", required: true },
|
|
73
|
+
{ name: "tagId", in: "query", required: true },
|
|
74
|
+
],
|
|
75
|
+
},
|
|
76
|
+
ListChats: {
|
|
77
|
+
path: "/{connectionId}/ListChats",
|
|
78
|
+
method: "GET",
|
|
79
|
+
parameters: [
|
|
80
|
+
{ name: "connectionId", in: "path", required: true },
|
|
81
|
+
{ name: "$top", in: "query", required: false },
|
|
82
|
+
{ name: "$skip", in: "query", required: false },
|
|
83
|
+
],
|
|
84
|
+
},
|
|
85
|
+
ListMembers: {
|
|
86
|
+
path: "/{connectionId}/ListMembers",
|
|
87
|
+
method: "GET",
|
|
88
|
+
parameters: [
|
|
89
|
+
{ name: "connectionId", in: "path", required: true },
|
|
90
|
+
{ name: "groupId", in: "query", required: true },
|
|
91
|
+
{ name: "channelId", in: "query", required: false },
|
|
92
|
+
],
|
|
93
|
+
},
|
|
94
|
+
PostUserNotification: {
|
|
95
|
+
path: "/{connectionId}/PostUserNotification",
|
|
96
|
+
method: "POST",
|
|
97
|
+
parameters: [
|
|
98
|
+
{ name: "connectionId", in: "path", required: true },
|
|
99
|
+
{ name: "PostNotificationRequest", in: "body", required: true },
|
|
100
|
+
],
|
|
101
|
+
},
|
|
102
|
+
PostChannelNotification: {
|
|
103
|
+
path: "/{connectionId}/PostChannelNotification",
|
|
104
|
+
method: "POST",
|
|
105
|
+
parameters: [
|
|
106
|
+
{ name: "connectionId", in: "path", required: true },
|
|
107
|
+
{ name: "groupId", in: "query", required: true },
|
|
108
|
+
{ name: "PostNotificationRequest", in: "body", required: true },
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
PostCardToConversation: {
|
|
112
|
+
path: "/{connectionId}/PostCardToConversation",
|
|
113
|
+
method: "POST",
|
|
114
|
+
parameters: [
|
|
115
|
+
{ name: "connectionId", in: "path", required: true },
|
|
116
|
+
{ name: "poster", in: "query", required: true },
|
|
117
|
+
{ name: "location", in: "query", required: true },
|
|
118
|
+
{ name: "body", in: "body", required: true },
|
|
119
|
+
],
|
|
120
|
+
},
|
|
121
|
+
PostMessageToConversation: {
|
|
122
|
+
path: "/{connectionId}/PostMessageToConversation",
|
|
123
|
+
method: "POST",
|
|
124
|
+
parameters: [
|
|
125
|
+
{ name: "connectionId", in: "path", required: true },
|
|
126
|
+
{ name: "poster", in: "query", required: true },
|
|
127
|
+
{ name: "location", in: "query", required: true },
|
|
128
|
+
{ name: "body", in: "body", required: true },
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
HttpRequest: {
|
|
132
|
+
path: "/{connectionId}/codeless/v1.0/httprequest",
|
|
133
|
+
method: "POST",
|
|
134
|
+
parameters: [
|
|
135
|
+
{ name: "connectionId", in: "path", required: true },
|
|
136
|
+
],
|
|
137
|
+
},
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
async function execTeamsOp(operationName, parameters) {
|
|
141
|
+
return execConnectorOpWithCandidates(TEAMS_DATA_SOURCE_CANDIDATES, TEAMS_APIS, "Microsoft Teams", operationName, parameters);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export async function callTeamsOperation(operationName, parameters = {}) {
|
|
145
|
+
return _dbgWrap('callTeamsOperation', [operationName, parameters], async function() {
|
|
146
|
+
return execTeamsOp(operationName, parameters);
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
export async function sendTeamsGraphHttpRequest({ method = "GET", uri, headers, body } = {}) {
|
|
151
|
+
return _dbgWrap('sendTeamsGraphHttpRequest', [{ method, uri, headers, body }], async function() {
|
|
152
|
+
return execTeamsOp("HttpRequest", {
|
|
153
|
+
method,
|
|
154
|
+
uri,
|
|
155
|
+
headers: headers || {},
|
|
156
|
+
body: body || "",
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
export async function listTeams() {
|
|
162
|
+
return _dbgWrap('listTeams', [], async function() {
|
|
163
|
+
return execTeamsOp("GetAllTeams", {});
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export async function listChannels(sTeamId) {
|
|
168
|
+
return _dbgWrap('listChannels', [sTeamId], async function() {
|
|
169
|
+
return execTeamsOp("GetChannelsForGroup", {
|
|
170
|
+
groupId: sTeamId,
|
|
171
|
+
});
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export async function getTeam(sTeamId) {
|
|
176
|
+
return _dbgWrap('getTeam', [sTeamId], async function() {
|
|
177
|
+
return execTeamsOp("GetTeam", {
|
|
178
|
+
teamId: sTeamId,
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export async function getChannelDetails(sTeamId, sChannelId) {
|
|
184
|
+
return _dbgWrap('getChannelDetails', [sTeamId, sChannelId], async function() {
|
|
185
|
+
return execTeamsOp("GetChannel", {
|
|
186
|
+
groupId: sTeamId,
|
|
187
|
+
channelId: sChannelId,
|
|
188
|
+
});
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
export async function addMemberToTeam(sTeamId, body) {
|
|
193
|
+
return _dbgWrap('addMemberToTeam', [sTeamId, body], async function() {
|
|
194
|
+
return execTeamsOp("AddMemberToTeam", {
|
|
195
|
+
teamId: sTeamId,
|
|
196
|
+
body,
|
|
197
|
+
});
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export async function addMemberToChannel(sTeamId, sChannelId, body) {
|
|
202
|
+
return _dbgWrap('addMemberToChannel', [sTeamId, sChannelId, body], async function() {
|
|
203
|
+
return execTeamsOp("AddMemberToChannel", {
|
|
204
|
+
groupId: sTeamId,
|
|
205
|
+
channelId: sChannelId,
|
|
206
|
+
body,
|
|
207
|
+
});
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export async function getUserMentionToken(sUserId) {
|
|
212
|
+
return _dbgWrap('getUserMentionToken', [sUserId], async function() {
|
|
213
|
+
return execTeamsOp("AtMentionUser", {
|
|
214
|
+
userId: sUserId,
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
export async function getTeamTagMentionToken(sTeamId, sTagId) {
|
|
220
|
+
return _dbgWrap('getTeamTagMentionToken', [sTeamId, sTagId], async function() {
|
|
221
|
+
return execTeamsOp("AtMentionTag", {
|
|
222
|
+
teamId: sTeamId,
|
|
223
|
+
tagId: sTagId,
|
|
224
|
+
});
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
export async function listChats({ top, skip } = {}) {
|
|
229
|
+
return _dbgWrap('listChats', [{ top, skip }], async function() {
|
|
230
|
+
return execTeamsOp("ListChats", {
|
|
231
|
+
$top: top,
|
|
232
|
+
$skip: skip,
|
|
233
|
+
});
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export async function listMembers(sTeamId, sChannelId) {
|
|
238
|
+
return _dbgWrap('listMembers', [sTeamId, sChannelId], async function() {
|
|
239
|
+
return execTeamsOp("ListMembers", {
|
|
240
|
+
groupId: sTeamId,
|
|
241
|
+
channelId: sChannelId,
|
|
242
|
+
});
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
export async function postFeedNotification({ groupId, body } = {}) {
|
|
247
|
+
return _dbgWrap('postFeedNotification', [{ groupId, body }], async function() {
|
|
248
|
+
if (groupId) {
|
|
249
|
+
return execTeamsOp("PostChannelNotification", {
|
|
250
|
+
groupId,
|
|
251
|
+
PostNotificationRequest: body,
|
|
252
|
+
});
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
return execTeamsOp("PostUserNotification", {
|
|
256
|
+
PostNotificationRequest: body,
|
|
257
|
+
});
|
|
258
|
+
});
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
export async function postCardInChatOrChannel({ poster = "Flow bot", location, body } = {}) {
|
|
262
|
+
return _dbgWrap('postCardInChatOrChannel', [{ poster, location, body }], async function() {
|
|
263
|
+
return execTeamsOp("PostCardToConversation", {
|
|
264
|
+
poster,
|
|
265
|
+
location,
|
|
266
|
+
body,
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
export async function postMessageInChatOrChannel({ poster = "Flow bot", location, body } = {}) {
|
|
272
|
+
return _dbgWrap('postMessageInChatOrChannel', [{ poster, location, body }], async function() {
|
|
273
|
+
return execTeamsOp("PostMessageToConversation", {
|
|
274
|
+
poster,
|
|
275
|
+
location,
|
|
276
|
+
body,
|
|
277
|
+
});
|
|
278
|
+
});
|
|
279
|
+
}
|
|
280
|
+
|
package/codeApp/dist/index.js
CHANGED