@pnp/cli-microsoft365 7.0.0-beta.90ef876 → 7.0.0-beta.df9f285
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/dist/Command.js +1 -1
- package/dist/cli/Cli.js +23 -8
- package/dist/m365/aad/commands/user/user-get.js +7 -1
- package/dist/m365/aad/commands/user/user-list.js +3 -6
- package/dist/m365/aad/commands/user/user-set.js +20 -20
- package/dist/m365/booking/commands/business/business-get.js +14 -15
- package/dist/m365/cli/commands/config/config-set.js +1 -1
- package/dist/m365/pa/commands/app/app-consent-set.js +2 -2
- package/dist/m365/pa/commands/app/app-export.js +3 -3
- package/dist/m365/pa/commands/app/app-list.js +5 -5
- package/dist/m365/pa/commands/app/app-owner-set.js +115 -0
- package/dist/m365/pa/commands/app/app-permission-list.js +104 -0
- package/dist/m365/pa/commands.js +2 -0
- package/dist/m365/planner/commands/bucket/bucket-add.js +14 -10
- package/dist/m365/planner/commands/bucket/bucket-get.js +25 -19
- package/dist/m365/planner/commands/bucket/bucket-list.js +14 -10
- package/dist/m365/planner/commands/bucket/bucket-remove.js +26 -20
- package/dist/m365/planner/commands/bucket/bucket-set.js +26 -28
- package/dist/m365/planner/commands/roster/roster-member-add.js +3 -14
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-get.js +2 -2
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-list.js +2 -2
- package/dist/m365/pp/commands/aibuildermodel/aibuildermodel-remove.js +3 -3
- package/dist/m365/pp/commands/card/card-clone.js +3 -3
- package/dist/m365/pp/commands/card/card-get.js +2 -2
- package/dist/m365/pp/commands/card/card-list.js +2 -2
- package/dist/m365/pp/commands/card/card-remove.js +3 -3
- package/dist/m365/pp/commands/chatbot/chatbot-get.js +2 -2
- package/dist/m365/pp/commands/chatbot/chatbot-list.js +3 -3
- package/dist/m365/pp/commands/chatbot/chatbot-remove.js +3 -3
- package/dist/m365/pp/commands/dataverse/dataverse-table-get.js +2 -2
- package/dist/m365/pp/commands/dataverse/dataverse-table-list.js +2 -2
- package/dist/m365/pp/commands/dataverse/dataverse-table-remove.js +2 -2
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-list.js +2 -2
- package/dist/m365/pp/commands/dataverse/dataverse-table-row-remove.js +2 -2
- package/dist/m365/pp/commands/solution/solution-get.js +2 -2
- package/dist/m365/pp/commands/solution/solution-list.js +2 -2
- package/dist/m365/pp/commands/solution/solution-publish.js +3 -3
- package/dist/m365/pp/commands/solution/solution-publisher-add.js +2 -2
- package/dist/m365/pp/commands/solution/solution-publisher-get.js +2 -2
- package/dist/m365/pp/commands/solution/solution-publisher-list.js +2 -2
- package/dist/m365/pp/commands/solution/solution-publisher-remove.js +3 -3
- package/dist/m365/pp/commands/solution/solution-remove.js +3 -3
- package/dist/m365/purview/commands/retentionevent/retentionevent-remove.js +19 -17
- package/dist/m365/purview/commands/retentioneventtype/retentioneventtype-remove.js +19 -17
- package/dist/m365/search/commands/externalconnection/externalconnection-remove.js +35 -34
- package/dist/m365/spfx/commands/project/project-externalize/rules/DynamicRule.js +59 -51
- package/dist/m365/spo/commands/file/file-list.js +3 -14
- package/dist/m365/spo/commands/folder/folder-remove.js +30 -28
- package/dist/m365/spo/commands/list/list-add.js +0 -9
- package/dist/m365/spo/commands/list/list-retentionlabel-ensure.js +0 -4
- package/dist/m365/spo/commands/list/list-retentionlabel-get.js +0 -4
- package/dist/m365/spo/commands/list/list-roleassignment-add.js +9 -47
- package/dist/m365/spo/commands/list/list-set.js +0 -9
- package/dist/m365/spo/commands/listitem/listitem-attachment-list.js +4 -4
- package/dist/m365/spo/commands/page/page-remove.js +33 -31
- package/dist/m365/spo/commands/roledefinition/roledefinition-remove.js +25 -23
- package/dist/m365/spo/commands/site/site-apppermission-add.js +3 -3
- package/dist/m365/spo/commands/site/site-commsite-enable.js +9 -18
- package/dist/m365/spo/commands/site/site-set.js +10 -2
- package/dist/m365/spo/commands/tenant/tenant-appcatalog-add.js +13 -16
- package/dist/m365/spo/commands/tenant/tenant-applicationcustomizer-set.js +80 -2
- package/dist/m365/spo/commands/tenant/tenant-commandset-set.js +107 -24
- package/dist/m365/spo/commands/tenant/tenant-recyclebinitem-remove.js +48 -48
- package/dist/m365/spo/commands/theme/theme-get.js +1 -2
- package/dist/m365/spo/commands/user/user-get.js +5 -5
- package/dist/m365/spo/commands.js +0 -2
- package/dist/m365/teams/commands/chat/chat-get.js +4 -4
- package/dist/m365/teams/commands/chat/chat-member-add.js +117 -0
- package/dist/m365/teams/commands/chat/chat-message-send.js +4 -4
- package/dist/m365/teams/commands/meeting/meeting-get.js +16 -24
- package/dist/m365/teams/commands/meeting/meeting-list.js +2 -15
- package/dist/m365/teams/commands/team/team-app-list.js +1 -1
- package/dist/m365/teams/commands.js +1 -0
- package/dist/utils/spo.js +74 -0
- package/docs/docs/_clisettings.mdx +1 -1
- package/docs/docs/cmd/_global.mdx +1 -1
- package/docs/docs/cmd/aad/user/user-get.mdx +118 -25
- package/docs/docs/cmd/aad/user/user-list.mdx +0 -9
- package/docs/docs/cmd/aad/user/user-set.mdx +11 -11
- package/docs/docs/cmd/pa/app/app-consent-set.mdx +3 -3
- package/docs/docs/cmd/pa/app/app-export.mdx +3 -3
- package/docs/docs/cmd/pa/app/app-list.mdx +2 -2
- package/docs/docs/cmd/pa/app/app-owner-set.mdx +60 -0
- package/docs/docs/cmd/pa/app/app-permission-list.mdx +132 -0
- package/docs/docs/cmd/planner/bucket/bucket-add.mdx +21 -4
- package/docs/docs/cmd/planner/bucket/bucket-get.mdx +22 -5
- package/docs/docs/cmd/planner/bucket/bucket-list.mdx +21 -4
- package/docs/docs/cmd/planner/bucket/bucket-remove.mdx +21 -4
- package/docs/docs/cmd/planner/bucket/bucket-set.mdx +22 -5
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-get.mdx +4 -4
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-list.mdx +4 -4
- package/docs/docs/cmd/pp/aibuildermodel/aibuildermodel-remove.mdx +4 -4
- package/docs/docs/cmd/pp/card/card-clone.mdx +6 -6
- package/docs/docs/cmd/pp/card/card-get.mdx +6 -6
- package/docs/docs/cmd/pp/card/card-list.mdx +4 -4
- package/docs/docs/cmd/pp/card/card-remove.mdx +9 -9
- package/docs/docs/cmd/pp/chatbot/chatbot-get.mdx +6 -6
- package/docs/docs/cmd/pp/chatbot/chatbot-list.mdx +4 -4
- package/docs/docs/cmd/pp/chatbot/chatbot-remove.mdx +4 -4
- package/docs/docs/cmd/pp/dataverse/dataverse-table-get.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-list.mdx +2 -2
- package/docs/docs/cmd/pp/dataverse/dataverse-table-remove.mdx +1 -1
- package/docs/docs/cmd/pp/dataverse/dataverse-table-row-list.mdx +5 -5
- package/docs/docs/cmd/pp/dataverse/dataverse-table-row-remove.mdx +5 -5
- package/docs/docs/cmd/pp/solution/solution-get.mdx +6 -6
- package/docs/docs/cmd/pp/solution/solution-list.mdx +4 -4
- package/docs/docs/cmd/pp/solution/solution-publish.mdx +4 -4
- package/docs/docs/cmd/pp/solution/solution-publisher-add.mdx +3 -3
- package/docs/docs/cmd/pp/solution/solution-publisher-get.mdx +6 -6
- package/docs/docs/cmd/pp/solution/solution-publisher-list.mdx +4 -4
- package/docs/docs/cmd/pp/solution/solution-publisher-remove.mdx +5 -5
- package/docs/docs/cmd/pp/solution/solution-remove.mdx +9 -9
- package/docs/docs/cmd/spo/file/file-list.mdx +6 -10
- package/docs/docs/cmd/spo/file/file-retentionlabel-ensure.mdx +1 -1
- package/docs/docs/cmd/spo/list/list-add.mdx +0 -3
- package/docs/docs/cmd/spo/list/list-retentionlabel-ensure.mdx +0 -6
- package/docs/docs/cmd/spo/list/list-retentionlabel-get.mdx +0 -6
- package/docs/docs/cmd/spo/list/list-set.mdx +0 -3
- package/docs/docs/cmd/spo/listitem/listitem-attachment-list.mdx +7 -7
- package/docs/docs/cmd/spo/site/site-add.mdx +35 -0
- package/docs/docs/cmd/spo/site/site-appcatalog-add.mdx +5 -1
- package/docs/docs/cmd/spo/site/site-appcatalog-list.mdx +14 -0
- package/docs/docs/cmd/spo/site/site-appcatalog-remove.mdx +4 -0
- package/docs/docs/cmd/spo/site/site-apppermission-add.mdx +68 -0
- package/docs/docs/cmd/spo/site/site-apppermission-get.mdx +55 -0
- package/docs/docs/cmd/spo/site/site-apppermission-list.mdx +55 -0
- package/docs/docs/cmd/spo/site/site-apppermission-remove.mdx +4 -0
- package/docs/docs/cmd/spo/site/site-apppermission-set.mdx +66 -0
- package/docs/docs/cmd/spo/site/site-chrome-set.mdx +4 -0
- package/docs/docs/cmd/spo/site/site-commsite-enable.mdx +11 -1
- package/docs/docs/cmd/spo/site/site-ensure.mdx +70 -0
- package/docs/docs/cmd/spo/site/site-get.mdx +179 -0
- package/docs/docs/cmd/spo/site/site-groupify.mdx +54 -0
- package/docs/docs/cmd/spo/site/site-hubsite-connect.mdx +4 -0
- package/docs/docs/cmd/spo/site/site-hubsite-disconnect.mdx +4 -0
- package/docs/docs/cmd/spo/site/site-hubsite-theme-sync.mdx +5 -1
- package/docs/docs/cmd/spo/site/site-inplacerecordsmanagement-set.mdx +4 -0
- package/docs/docs/cmd/spo/site/site-list.mdx +303 -0
- package/docs/docs/cmd/spo/site/site-recyclebinitem-list.mdx +80 -0
- package/docs/docs/cmd/spo/site/site-recyclebinitem-restore.mdx +4 -0
- package/docs/docs/cmd/spo/site/site-remove.mdx +4 -0
- package/docs/docs/cmd/spo/site/site-rename.mdx +92 -0
- package/docs/docs/cmd/spo/site/site-set.mdx +13 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-add.mdx +116 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-apply.mdx +125 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-get.mdx +117 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-list.mdx +94 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-remove.mdx +4 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-grant.mdx +4 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-list.mdx +54 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-rights-revoke.mdx +4 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-run-list.mdx +66 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-run-status-get.mdx +65 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-set.mdx +117 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-get.mdx +61 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-list.mdx +60 -0
- package/docs/docs/cmd/spo/sitedesign/sitedesign-task-remove.mdx +4 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-add.mdx +75 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-get.mdx +62 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-list.mdx +60 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-remove.mdx +4 -0
- package/docs/docs/cmd/spo/sitescript/sitescript-set.mdx +63 -0
- package/docs/docs/cmd/spo/storageentity/storageentity-get.mdx +53 -0
- package/docs/docs/cmd/spo/storageentity/storageentity-list.mdx +54 -0
- package/docs/docs/cmd/spo/storageentity/storageentity-remove.mdx +4 -0
- package/docs/docs/cmd/spo/storageentity/storageentity-set.mdx +4 -0
- package/docs/docs/cmd/spo/tenant/tenant-appcatalog-add.mdx +4 -0
- package/docs/docs/cmd/spo/tenant/tenant-appcatalogurl-get.mdx +35 -0
- package/docs/docs/cmd/spo/tenant/tenant-applicationcustomizer-set.mdx +12 -3
- package/docs/docs/cmd/spo/tenant/tenant-commandset-set.mdx +23 -11
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-list.mdx +67 -0
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-remove.mdx +4 -0
- package/docs/docs/cmd/spo/tenant/tenant-recyclebinitem-restore.mdx +50 -0
- package/docs/docs/cmd/spo/tenant/tenant-settings-list.mdx +729 -0
- package/docs/docs/cmd/spo/tenant/tenant-settings-set.mdx +5 -0
- package/docs/docs/cmd/spo/theme/theme-apply.mdx +35 -0
- package/docs/docs/cmd/spo/theme/theme-get.mdx +74 -0
- package/docs/docs/cmd/spo/theme/theme-list.mdx +52 -0
- package/docs/docs/cmd/spo/theme/theme-remove.mdx +4 -0
- package/docs/docs/cmd/spo/theme/theme-set.mdx +4 -0
- package/docs/docs/cmd/spo/user/user-get.mdx +6 -6
- package/docs/docs/cmd/teams/chat/chat-member-add.mdx +66 -0
- package/npm-shrinkwrap.json +212 -212
- package/package.json +10 -10
|
@@ -68,9 +68,13 @@ class PlannerBucketAddCommand extends GraphCommand_1.default {
|
|
|
68
68
|
if (args.options.planId) {
|
|
69
69
|
return args.options.planId;
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
71
|
+
if (args.options.planTitle) {
|
|
72
|
+
const groupId = yield this.getGroupId(args);
|
|
73
|
+
const plan = yield planner_1.planner.getPlanByTitle(args.options.planTitle, groupId);
|
|
74
|
+
return plan.id;
|
|
75
|
+
}
|
|
76
|
+
const plans = yield planner_1.planner.getPlansByRosterId(args.options.rosterId);
|
|
77
|
+
return plans[0].id;
|
|
74
78
|
});
|
|
75
79
|
}
|
|
76
80
|
getGroupId(args) {
|
|
@@ -88,6 +92,7 @@ _PlannerBucketAddCommand_instances = new WeakSet(), _PlannerBucketAddCommand_ini
|
|
|
88
92
|
Object.assign(this.telemetryProperties, {
|
|
89
93
|
planId: typeof args.options.planId !== 'undefined',
|
|
90
94
|
planTitle: typeof args.options.planTitle !== 'undefined',
|
|
95
|
+
rosterId: typeof args.options.rosterId !== 'undefined',
|
|
91
96
|
ownerGroupId: typeof args.options.ownerGroupId !== 'undefined',
|
|
92
97
|
ownerGroupName: typeof args.options.ownerGroupName !== 'undefined',
|
|
93
98
|
orderHint: typeof args.options.orderHint !== 'undefined'
|
|
@@ -100,6 +105,8 @@ _PlannerBucketAddCommand_instances = new WeakSet(), _PlannerBucketAddCommand_ini
|
|
|
100
105
|
option: "--planId [planId]"
|
|
101
106
|
}, {
|
|
102
107
|
option: "--planTitle [planTitle]"
|
|
108
|
+
}, {
|
|
109
|
+
option: '--rosterId [rosterId]'
|
|
103
110
|
}, {
|
|
104
111
|
option: "--ownerGroupId [ownerGroupId]"
|
|
105
112
|
}, {
|
|
@@ -109,19 +116,16 @@ _PlannerBucketAddCommand_instances = new WeakSet(), _PlannerBucketAddCommand_ini
|
|
|
109
116
|
});
|
|
110
117
|
}, _PlannerBucketAddCommand_initValidators = function _PlannerBucketAddCommand_initValidators() {
|
|
111
118
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
112
|
-
if (args.options.planTitle && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
113
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
114
|
-
}
|
|
115
|
-
if (args.options.planTitle && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
116
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
117
|
-
}
|
|
118
119
|
if (args.options.ownerGroupId && !validation_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
119
120
|
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
120
121
|
}
|
|
121
122
|
return true;
|
|
122
123
|
}));
|
|
123
124
|
}, _PlannerBucketAddCommand_initOptionSets = function _PlannerBucketAddCommand_initOptionSets() {
|
|
124
|
-
this.optionSets.push({ options: ['planId', 'planTitle'] }
|
|
125
|
+
this.optionSets.push({ options: ['planId', 'planTitle', 'rosterId'] }, {
|
|
126
|
+
options: ['ownerGroupId', 'ownerGroupName'],
|
|
127
|
+
runsWhen: (args) => args.options.planTitle !== undefined
|
|
128
|
+
});
|
|
125
129
|
};
|
|
126
130
|
module.exports = new PlannerBucketAddCommand();
|
|
127
131
|
//# sourceMappingURL=bucket-add.js.map
|
|
@@ -75,13 +75,17 @@ class PlannerBucketGetCommand extends GraphCommand_1.default {
|
|
|
75
75
|
}
|
|
76
76
|
getPlanId(args) {
|
|
77
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
|
-
const { planId, planTitle } = args.options;
|
|
78
|
+
const { planId, planTitle, rosterId } = args.options;
|
|
79
79
|
if (planId) {
|
|
80
80
|
return planId;
|
|
81
81
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
if (planTitle) {
|
|
83
|
+
const groupId = yield this.getGroupId(args);
|
|
84
|
+
const plan = yield planner_1.planner.getPlanByTitle(planTitle, groupId);
|
|
85
|
+
return plan.id;
|
|
86
|
+
}
|
|
87
|
+
const plans = yield planner_1.planner.getPlansByRosterId(rosterId);
|
|
88
|
+
return plans[0].id;
|
|
85
89
|
});
|
|
86
90
|
}
|
|
87
91
|
getBucketById(id) {
|
|
@@ -114,6 +118,7 @@ _PlannerBucketGetCommand_instances = new WeakSet(), _PlannerBucketGetCommand_ini
|
|
|
114
118
|
name: typeof args.options.name !== 'undefined',
|
|
115
119
|
planId: typeof args.options.planId !== 'undefined',
|
|
116
120
|
planTitle: typeof args.options.planTitle !== 'undefined',
|
|
121
|
+
rosterId: typeof args.options.rosterId !== 'undefined',
|
|
117
122
|
ownerGroupId: typeof args.options.ownerGroupId !== 'undefined',
|
|
118
123
|
ownerGroupName: typeof args.options.ownerGroupName !== 'undefined'
|
|
119
124
|
});
|
|
@@ -127,6 +132,8 @@ _PlannerBucketGetCommand_instances = new WeakSet(), _PlannerBucketGetCommand_ini
|
|
|
127
132
|
option: '--planId [planId]'
|
|
128
133
|
}, {
|
|
129
134
|
option: "--planTitle [planTitle]"
|
|
135
|
+
}, {
|
|
136
|
+
option: '--rosterId [rosterId]'
|
|
130
137
|
}, {
|
|
131
138
|
option: '--ownerGroupId [ownerGroupId]'
|
|
132
139
|
}, {
|
|
@@ -135,24 +142,12 @@ _PlannerBucketGetCommand_instances = new WeakSet(), _PlannerBucketGetCommand_ini
|
|
|
135
142
|
}, _PlannerBucketGetCommand_initValidators = function _PlannerBucketGetCommand_initValidators() {
|
|
136
143
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
137
144
|
if (args.options.id) {
|
|
138
|
-
if (args.options.planId || args.options.planTitle || args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
139
|
-
return 'Don\'t specify planId, planTitle, ownerGroupId or ownerGroupName when using id';
|
|
145
|
+
if (args.options.planId || args.options.planTitle || args.options.rosterId || args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
146
|
+
return 'Don\'t specify planId, planTitle, rosterId, ownerGroupId or ownerGroupName when using id';
|
|
140
147
|
}
|
|
141
148
|
}
|
|
142
149
|
if (args.options.name) {
|
|
143
|
-
if (!args.options.planId && !args.options.planTitle) {
|
|
144
|
-
return 'Specify either planId or planTitle when using name';
|
|
145
|
-
}
|
|
146
|
-
if (args.options.planId && args.options.planTitle) {
|
|
147
|
-
return 'Specify either planId or planTitle when using name but not both';
|
|
148
|
-
}
|
|
149
150
|
if (args.options.planTitle) {
|
|
150
|
-
if (!args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
151
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
152
|
-
}
|
|
153
|
-
if (args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
154
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
155
|
-
}
|
|
156
151
|
if (args.options.ownerGroupId && !validation_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
157
152
|
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
158
153
|
}
|
|
@@ -162,11 +157,22 @@ _PlannerBucketGetCommand_instances = new WeakSet(), _PlannerBucketGetCommand_ini
|
|
|
162
157
|
return 'Don\'t specify ownerGroupId or ownerGroupName when using planId';
|
|
163
158
|
}
|
|
164
159
|
}
|
|
160
|
+
if (args.options.rosterId) {
|
|
161
|
+
if (args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
162
|
+
return 'Don\'t specify ownerGroupId or ownerGroupName when using rosterId';
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
165
|
}
|
|
166
166
|
return true;
|
|
167
167
|
}));
|
|
168
168
|
}, _PlannerBucketGetCommand_initOptionSets = function _PlannerBucketGetCommand_initOptionSets() {
|
|
169
|
-
this.optionSets.push({ options: ['id', 'name'] }
|
|
169
|
+
this.optionSets.push({ options: ['id', 'name'] }, {
|
|
170
|
+
options: ['planId', 'planTitle', 'rosterId'],
|
|
171
|
+
runsWhen: (args) => args.options.name !== undefined
|
|
172
|
+
}, {
|
|
173
|
+
options: ['ownerGroupId', 'ownerGroupName'],
|
|
174
|
+
runsWhen: (args) => args.options.planTitle !== undefined
|
|
175
|
+
});
|
|
170
176
|
};
|
|
171
177
|
module.exports = new PlannerBucketGetCommand();
|
|
172
178
|
//# sourceMappingURL=bucket-get.js.map
|
|
@@ -56,9 +56,13 @@ class PlannerBucketListCommand extends GraphCommand_1.default {
|
|
|
56
56
|
if (args.options.planId) {
|
|
57
57
|
return args.options.planId;
|
|
58
58
|
}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
if (args.options.planTitle) {
|
|
60
|
+
const groupId = yield this.getGroupId(args);
|
|
61
|
+
const plan = yield planner_1.planner.getPlanByTitle(args.options.planTitle, groupId);
|
|
62
|
+
return plan.id;
|
|
63
|
+
}
|
|
64
|
+
const plans = yield planner_1.planner.getPlansByRosterId(args.options.rosterId);
|
|
65
|
+
return plans[0].id;
|
|
62
66
|
});
|
|
63
67
|
}
|
|
64
68
|
getGroupId(args) {
|
|
@@ -76,6 +80,7 @@ _PlannerBucketListCommand_instances = new WeakSet(), _PlannerBucketListCommand_i
|
|
|
76
80
|
Object.assign(this.telemetryProperties, {
|
|
77
81
|
planId: typeof args.options.planId !== 'undefined',
|
|
78
82
|
planTitle: typeof args.options.planTitle !== 'undefined',
|
|
83
|
+
rosterId: typeof args.options.rosterId !== 'undefined',
|
|
79
84
|
ownerGroupId: typeof args.options.ownerGroupId !== 'undefined',
|
|
80
85
|
ownerGroupName: typeof args.options.ownerGroupName !== 'undefined'
|
|
81
86
|
});
|
|
@@ -85,6 +90,8 @@ _PlannerBucketListCommand_instances = new WeakSet(), _PlannerBucketListCommand_i
|
|
|
85
90
|
option: '--planId [planId]'
|
|
86
91
|
}, {
|
|
87
92
|
option: "--planTitle [planTitle]"
|
|
93
|
+
}, {
|
|
94
|
+
option: '--rosterId [rosterId]'
|
|
88
95
|
}, {
|
|
89
96
|
option: '--ownerGroupId [ownerGroupId]'
|
|
90
97
|
}, {
|
|
@@ -92,19 +99,16 @@ _PlannerBucketListCommand_instances = new WeakSet(), _PlannerBucketListCommand_i
|
|
|
92
99
|
});
|
|
93
100
|
}, _PlannerBucketListCommand_initValidators = function _PlannerBucketListCommand_initValidators() {
|
|
94
101
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
if (args.options.planTitle && !args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
96
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
97
|
-
}
|
|
98
|
-
if (args.options.planTitle && args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
99
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
100
|
-
}
|
|
101
102
|
if (args.options.ownerGroupId && !validation_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
102
103
|
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
103
104
|
}
|
|
104
105
|
return true;
|
|
105
106
|
}));
|
|
106
107
|
}, _PlannerBucketListCommand_initOptionSets = function _PlannerBucketListCommand_initOptionSets() {
|
|
107
|
-
this.optionSets.push({ options: ['planId', 'planTitle'] }
|
|
108
|
+
this.optionSets.push({ options: ['planId', 'planTitle', 'rosterId'] }, {
|
|
109
|
+
options: ['ownerGroupId', 'ownerGroupName'],
|
|
110
|
+
runsWhen: (args) => args.options.planTitle !== undefined
|
|
111
|
+
});
|
|
108
112
|
};
|
|
109
113
|
module.exports = new PlannerBucketListCommand();
|
|
110
114
|
//# sourceMappingURL=bucket-list.js.map
|
|
@@ -105,13 +105,17 @@ class PlannerBucketRemoveCommand extends GraphCommand_1.default {
|
|
|
105
105
|
}
|
|
106
106
|
getPlanId(args) {
|
|
107
107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
-
const { planId, planTitle } = args.options;
|
|
108
|
+
const { planId, planTitle, rosterId } = args.options;
|
|
109
109
|
if (planId) {
|
|
110
110
|
return planId;
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
if (planTitle) {
|
|
113
|
+
const groupId = yield this.getGroupId(args);
|
|
114
|
+
const plan = yield planner_1.planner.getPlanByTitle(planTitle, groupId);
|
|
115
|
+
return plan.id;
|
|
116
|
+
}
|
|
117
|
+
const plans = yield planner_1.planner.getPlansByRosterId(rosterId);
|
|
118
|
+
return plans[0].id;
|
|
115
119
|
});
|
|
116
120
|
}
|
|
117
121
|
getGroupId(args) {
|
|
@@ -132,6 +136,7 @@ _PlannerBucketRemoveCommand_instances = new WeakSet(), _PlannerBucketRemoveComma
|
|
|
132
136
|
name: typeof args.options.name !== 'undefined',
|
|
133
137
|
planId: typeof args.options.planId !== 'undefined',
|
|
134
138
|
planTitle: typeof args.options.planTitle !== 'undefined',
|
|
139
|
+
rosterId: typeof args.options.rosterId !== 'undefined',
|
|
135
140
|
ownerGroupId: typeof args.options.ownerGroupId !== 'undefined',
|
|
136
141
|
ownerGroupName: typeof args.options.ownerGroupName !== 'undefined',
|
|
137
142
|
force: args.options.force || false
|
|
@@ -146,6 +151,8 @@ _PlannerBucketRemoveCommand_instances = new WeakSet(), _PlannerBucketRemoveComma
|
|
|
146
151
|
option: '--planId [planId]'
|
|
147
152
|
}, {
|
|
148
153
|
option: "--planTitle [planTitle]"
|
|
154
|
+
}, {
|
|
155
|
+
option: '--rosterId [rosterId]'
|
|
149
156
|
}, {
|
|
150
157
|
option: '--ownerGroupId [ownerGroupId]'
|
|
151
158
|
}, {
|
|
@@ -156,38 +163,37 @@ _PlannerBucketRemoveCommand_instances = new WeakSet(), _PlannerBucketRemoveComma
|
|
|
156
163
|
}, _PlannerBucketRemoveCommand_initValidators = function _PlannerBucketRemoveCommand_initValidators() {
|
|
157
164
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
158
165
|
if (args.options.id) {
|
|
159
|
-
if (args.options.planId || args.options.planTitle || args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
160
|
-
return 'Don\'t specify planId, planTitle, ownerGroupId or ownerGroupName when using id';
|
|
166
|
+
if (args.options.planId || args.options.planTitle || args.options.rosterId || args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
167
|
+
return 'Don\'t specify planId, planTitle, rosterId, ownerGroupId or ownerGroupName when using id';
|
|
161
168
|
}
|
|
162
169
|
}
|
|
163
170
|
else {
|
|
164
|
-
if (!args.options.planId && !args.options.planTitle) {
|
|
165
|
-
return 'Specify either planId or planTitle when using name';
|
|
166
|
-
}
|
|
167
|
-
if (args.options.planId && args.options.planTitle) {
|
|
168
|
-
return 'Specify either planId or planTitle when using name but not both';
|
|
169
|
-
}
|
|
170
171
|
if (args.options.planTitle) {
|
|
171
|
-
if (!args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
172
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
173
|
-
}
|
|
174
|
-
if (args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
175
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
176
|
-
}
|
|
177
172
|
if (args.options.ownerGroupId && !validation_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
178
173
|
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
179
174
|
}
|
|
180
175
|
}
|
|
181
|
-
else {
|
|
176
|
+
else if (args.options.planId) {
|
|
182
177
|
if (args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
183
178
|
return 'Don\'t specify ownerGroupId or ownerGroupName when using planId';
|
|
184
179
|
}
|
|
185
180
|
}
|
|
181
|
+
else {
|
|
182
|
+
if (args.options.ownerGroupId || args.options.ownerGroupName) {
|
|
183
|
+
return 'Don\'t specify ownerGroupId or ownerGroupName when using rosterId';
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
186
|
}
|
|
187
187
|
return true;
|
|
188
188
|
}));
|
|
189
189
|
}, _PlannerBucketRemoveCommand_initOptionSets = function _PlannerBucketRemoveCommand_initOptionSets() {
|
|
190
|
-
this.optionSets.push({ options: ['id', 'name'] }
|
|
190
|
+
this.optionSets.push({ options: ['id', 'name'] }, {
|
|
191
|
+
options: ['planId', 'planTitle', 'rosterId'],
|
|
192
|
+
runsWhen: (args) => args.options.name !== undefined
|
|
193
|
+
}, {
|
|
194
|
+
options: ['ownerGroupId', 'ownerGroupName'],
|
|
195
|
+
runsWhen: (args) => args.options.planTitle !== undefined
|
|
196
|
+
});
|
|
191
197
|
};
|
|
192
198
|
module.exports = new PlannerBucketRemoveCommand();
|
|
193
199
|
//# sourceMappingURL=bucket-remove.js.map
|
|
@@ -96,13 +96,17 @@ class PlannerBucketSetCommand extends GraphCommand_1.default {
|
|
|
96
96
|
}
|
|
97
97
|
getPlanId(args) {
|
|
98
98
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
-
const { planId, planTitle } = args.options;
|
|
99
|
+
const { planId, planTitle, rosterId } = args.options;
|
|
100
100
|
if (planId) {
|
|
101
101
|
return planId;
|
|
102
102
|
}
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
103
|
+
if (planTitle) {
|
|
104
|
+
const groupId = yield this.getGroupId(args);
|
|
105
|
+
const plan = yield planner_1.planner.getPlanByTitle(planTitle, groupId);
|
|
106
|
+
return plan.id;
|
|
107
|
+
}
|
|
108
|
+
const plans = yield planner_1.planner.getPlansByRosterId(rosterId);
|
|
109
|
+
return plans[0].id;
|
|
106
110
|
});
|
|
107
111
|
}
|
|
108
112
|
getGroupId(args) {
|
|
@@ -123,6 +127,7 @@ _PlannerBucketSetCommand_instances = new WeakSet(), _PlannerBucketSetCommand_ini
|
|
|
123
127
|
name: typeof args.options.name !== 'undefined',
|
|
124
128
|
planId: typeof args.options.planId !== 'undefined',
|
|
125
129
|
planTitle: typeof args.options.planTitle !== 'undefined',
|
|
130
|
+
rosterId: typeof args.options.rosterId !== 'undefined',
|
|
126
131
|
ownerGroupId: typeof args.options.ownerGroupId !== 'undefined',
|
|
127
132
|
ownerGroupName: typeof args.options.ownerGroupName !== 'undefined',
|
|
128
133
|
newName: typeof args.options.newName !== 'undefined',
|
|
@@ -138,6 +143,8 @@ _PlannerBucketSetCommand_instances = new WeakSet(), _PlannerBucketSetCommand_ini
|
|
|
138
143
|
option: '--planId [planId]'
|
|
139
144
|
}, {
|
|
140
145
|
option: "--planTitle [planTitle]"
|
|
146
|
+
}, {
|
|
147
|
+
option: '--rosterId [rosterId]'
|
|
141
148
|
}, {
|
|
142
149
|
option: '--ownerGroupId [ownerGroupId]'
|
|
143
150
|
}, {
|
|
@@ -149,33 +156,18 @@ _PlannerBucketSetCommand_instances = new WeakSet(), _PlannerBucketSetCommand_ini
|
|
|
149
156
|
});
|
|
150
157
|
}, _PlannerBucketSetCommand_initValidators = function _PlannerBucketSetCommand_initValidators() {
|
|
151
158
|
this.validators.push((args) => __awaiter(this, void 0, void 0, function* () {
|
|
152
|
-
if (args.options.id) {
|
|
153
|
-
|
|
154
|
-
return 'Don\'t specify planId, planTitle, ownerGroupId or ownerGroupName when using id';
|
|
155
|
-
}
|
|
159
|
+
if (args.options.id && (args.options.planId || args.options.planTitle || args.options.ownerGroupId || args.options.ownerGroupName || args.options.rosterId)) {
|
|
160
|
+
return 'Don\'t specify planId, planTitle, ownerGroupId, ownerGroupName or rosterId when using id';
|
|
156
161
|
}
|
|
157
162
|
if (args.options.name) {
|
|
158
|
-
if (
|
|
159
|
-
return
|
|
163
|
+
if (args.options.ownerGroupId && !validation_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
164
|
+
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
160
165
|
}
|
|
161
|
-
if (args.options.planId && args.options.
|
|
162
|
-
return '
|
|
163
|
-
}
|
|
164
|
-
if (args.options.planTitle) {
|
|
165
|
-
if (!args.options.ownerGroupId && !args.options.ownerGroupName) {
|
|
166
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle';
|
|
167
|
-
}
|
|
168
|
-
if (args.options.ownerGroupId && args.options.ownerGroupName) {
|
|
169
|
-
return 'Specify either ownerGroupId or ownerGroupName when using planTitle but not both';
|
|
170
|
-
}
|
|
171
|
-
if (args.options.ownerGroupId && !validation_1.validation.isValidGuid(args.options.ownerGroupId)) {
|
|
172
|
-
return `${args.options.ownerGroupId} is not a valid GUID`;
|
|
173
|
-
}
|
|
166
|
+
if (args.options.planId && (args.options.ownerGroupId || args.options.ownerGroupName)) {
|
|
167
|
+
return 'Don\'t specify ownerGroupId or ownerGroupName when using planId';
|
|
174
168
|
}
|
|
175
|
-
if (args.options.
|
|
176
|
-
|
|
177
|
-
return 'Don\'t specify ownerGroupId or ownerGroupName when using planId';
|
|
178
|
-
}
|
|
169
|
+
if (args.options.rosterId && (args.options.ownerGroupId || args.options.ownerGroupName)) {
|
|
170
|
+
return 'Don\'t specify ownerGroupId or ownerGroupName when using rosterId';
|
|
179
171
|
}
|
|
180
172
|
}
|
|
181
173
|
if (!args.options.newName && !args.options.orderHint) {
|
|
@@ -184,7 +176,13 @@ _PlannerBucketSetCommand_instances = new WeakSet(), _PlannerBucketSetCommand_ini
|
|
|
184
176
|
return true;
|
|
185
177
|
}));
|
|
186
178
|
}, _PlannerBucketSetCommand_initOptionSets = function _PlannerBucketSetCommand_initOptionSets() {
|
|
187
|
-
this.optionSets.push({ options: ['id', 'name'] }
|
|
179
|
+
this.optionSets.push({ options: ['id', 'name'] }, {
|
|
180
|
+
options: ['planId', 'planTitle', 'rosterId'],
|
|
181
|
+
runsWhen: (args) => args.options.name !== undefined
|
|
182
|
+
}, {
|
|
183
|
+
options: ['ownerGroupId', 'ownerGroupName'],
|
|
184
|
+
runsWhen: (args) => args.options.planTitle !== undefined
|
|
185
|
+
});
|
|
188
186
|
};
|
|
189
187
|
module.exports = new PlannerBucketSetCommand();
|
|
190
188
|
//# sourceMappingURL=bucket-set.js.map
|
|
@@ -19,8 +19,7 @@ const request_1 = require("../../../../request");
|
|
|
19
19
|
const validation_1 = require("../../../../utils/validation");
|
|
20
20
|
const GraphCommand_1 = require("../../../base/GraphCommand");
|
|
21
21
|
const commands_1 = require("../../commands");
|
|
22
|
-
const
|
|
23
|
-
const Cli_1 = require("../../../../cli/Cli");
|
|
22
|
+
const aadUser_1 = require("../../../../utils/aadUser");
|
|
24
23
|
class PlannerRosterMemberAddCommand extends GraphCommand_1.default {
|
|
25
24
|
get name() {
|
|
26
25
|
return commands_1.default.ROSTER_MEMBER_ADD;
|
|
@@ -69,18 +68,8 @@ class PlannerRosterMemberAddCommand extends GraphCommand_1.default {
|
|
|
69
68
|
if (args.options.userId) {
|
|
70
69
|
return args.options.userId;
|
|
71
70
|
}
|
|
72
|
-
const
|
|
73
|
-
|
|
74
|
-
output: 'json',
|
|
75
|
-
debug: args.options.debug,
|
|
76
|
-
verbose: args.options.verbose
|
|
77
|
-
};
|
|
78
|
-
const aadUserGetOutput = yield Cli_1.Cli.executeCommandWithOutput(AadUserGetCommand, { options: Object.assign(Object.assign({}, aadUserGetCommandoptions), { _: [] }) });
|
|
79
|
-
if (this.verbose) {
|
|
80
|
-
logger.logToStderr(aadUserGetOutput.stderr);
|
|
81
|
-
}
|
|
82
|
-
const aadUserGetJsonOutput = JSON.parse(aadUserGetOutput.stdout);
|
|
83
|
-
return aadUserGetJsonOutput.id;
|
|
71
|
+
const userId = yield aadUser_1.aadUser.getUserIdByUpn(args.options.userName);
|
|
72
|
+
return userId;
|
|
84
73
|
});
|
|
85
74
|
}
|
|
86
75
|
}
|
|
@@ -44,7 +44,7 @@ class PpAiBuilderModelGetCommand extends PowerPlatformCommand_1.default {
|
|
|
44
44
|
logger.logToStderr(`Retrieving an AI builder model '${args.options.id || args.options.name}'...`);
|
|
45
45
|
}
|
|
46
46
|
try {
|
|
47
|
-
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
47
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
48
48
|
const res = yield this.getAiBuilderModel(dynamicsApiUrl, args.options);
|
|
49
49
|
logger.log(res);
|
|
50
50
|
}
|
|
@@ -88,7 +88,7 @@ _PpAiBuilderModelGetCommand_instances = new WeakSet(), _PpAiBuilderModelGetComma
|
|
|
88
88
|
});
|
|
89
89
|
}, _PpAiBuilderModelGetCommand_initOptions = function _PpAiBuilderModelGetCommand_initOptions() {
|
|
90
90
|
this.options.unshift({
|
|
91
|
-
option: '-e, --
|
|
91
|
+
option: '-e, --environmentName <environmentName>'
|
|
92
92
|
}, {
|
|
93
93
|
option: '-i, --id [id]'
|
|
94
94
|
}, {
|
|
@@ -41,7 +41,7 @@ class PpAiBuilderModelListCommand extends PowerPlatformCommand_1.default {
|
|
|
41
41
|
logger.logToStderr(`Retrieving available AI Builder models`);
|
|
42
42
|
}
|
|
43
43
|
try {
|
|
44
|
-
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
44
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
45
45
|
const aimodels = yield odata_1.odata.getAllItems(`${dynamicsApiUrl}/api/data/v9.0/msdyn_aimodels?$filter=iscustomizable/Value eq true`);
|
|
46
46
|
logger.log(aimodels);
|
|
47
47
|
}
|
|
@@ -59,7 +59,7 @@ _PpAiBuilderModelListCommand_instances = new WeakSet(), _PpAiBuilderModelListCom
|
|
|
59
59
|
});
|
|
60
60
|
}, _PpAiBuilderModelListCommand_initOptions = function _PpAiBuilderModelListCommand_initOptions() {
|
|
61
61
|
this.options.unshift({
|
|
62
|
-
option: '-e, --
|
|
62
|
+
option: '-e, --environmentName <environmentName>'
|
|
63
63
|
}, {
|
|
64
64
|
option: '--asAdmin'
|
|
65
65
|
});
|
|
@@ -64,7 +64,7 @@ class PpAiBuilderModelRemoveCommand extends PowerPlatformCommand_1.default {
|
|
|
64
64
|
return args.options.id;
|
|
65
65
|
}
|
|
66
66
|
const options = {
|
|
67
|
-
|
|
67
|
+
environmentName: args.options.environmentName,
|
|
68
68
|
name: args.options.name,
|
|
69
69
|
output: 'json',
|
|
70
70
|
debug: this.debug,
|
|
@@ -78,7 +78,7 @@ class PpAiBuilderModelRemoveCommand extends PowerPlatformCommand_1.default {
|
|
|
78
78
|
deleteAiBuilderModel(args) {
|
|
79
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
80
|
try {
|
|
81
|
-
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
81
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
82
82
|
const aiBuilderModelId = yield this.getAiBuilderModelId(args);
|
|
83
83
|
const requestOptions = {
|
|
84
84
|
url: `${dynamicsApiUrl}/api/data/v9.1/msdyn_aimodels(${aiBuilderModelId})`,
|
|
@@ -106,7 +106,7 @@ _PpAiBuilderModelRemoveCommand_instances = new WeakSet(), _PpAiBuilderModelRemov
|
|
|
106
106
|
});
|
|
107
107
|
}, _PpAiBuilderModelRemoveCommand_initOptions = function _PpAiBuilderModelRemoveCommand_initOptions() {
|
|
108
108
|
this.options.unshift({
|
|
109
|
-
option: '-e, --
|
|
109
|
+
option: '-e, --environmentName <environmentName>'
|
|
110
110
|
}, {
|
|
111
111
|
option: '-i, --id [id]'
|
|
112
112
|
}, {
|
|
@@ -52,7 +52,7 @@ class PpCardCloneCommand extends PowerPlatformCommand_1.default {
|
|
|
52
52
|
return args.options.id;
|
|
53
53
|
}
|
|
54
54
|
const options = {
|
|
55
|
-
|
|
55
|
+
environmentName: args.options.environmentName,
|
|
56
56
|
name: args.options.name,
|
|
57
57
|
output: 'json',
|
|
58
58
|
debug: this.debug,
|
|
@@ -66,7 +66,7 @@ class PpCardCloneCommand extends PowerPlatformCommand_1.default {
|
|
|
66
66
|
cloneCard(args) {
|
|
67
67
|
return __awaiter(this, void 0, void 0, function* () {
|
|
68
68
|
try {
|
|
69
|
-
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
69
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
70
70
|
const cardId = yield this.getCardId(args);
|
|
71
71
|
const requestOptions = {
|
|
72
72
|
url: `${dynamicsApiUrl}/api/data/v9.1/CardCreateClone`,
|
|
@@ -98,7 +98,7 @@ _PpCardCloneCommand_instances = new WeakSet(), _PpCardCloneCommand_initTelemetry
|
|
|
98
98
|
});
|
|
99
99
|
}, _PpCardCloneCommand_initOptions = function _PpCardCloneCommand_initOptions() {
|
|
100
100
|
this.options.unshift({
|
|
101
|
-
option: '-e, --
|
|
101
|
+
option: '-e, --environmentName <environmentName>'
|
|
102
102
|
}, {
|
|
103
103
|
option: '--newName <newName>'
|
|
104
104
|
}, {
|
|
@@ -45,7 +45,7 @@ class PpCardGetCommand extends PowerPlatformCommand_1.default {
|
|
|
45
45
|
logger.logToStderr(`Retrieving a card '${args.options.id || args.options.name}'...`);
|
|
46
46
|
}
|
|
47
47
|
try {
|
|
48
|
-
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
48
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
49
49
|
const res = yield this.getCard(dynamicsApiUrl, args.options);
|
|
50
50
|
logger.log(res);
|
|
51
51
|
}
|
|
@@ -93,7 +93,7 @@ _PpCardGetCommand_instances = new WeakSet(), _PpCardGetCommand_initTelemetry = f
|
|
|
93
93
|
});
|
|
94
94
|
}, _PpCardGetCommand_initOptions = function _PpCardGetCommand_initOptions() {
|
|
95
95
|
this.options.unshift({
|
|
96
|
-
option: '-e, --
|
|
96
|
+
option: '-e, --environmentName <environmentName>'
|
|
97
97
|
}, {
|
|
98
98
|
option: '-i, --id [id]'
|
|
99
99
|
}, {
|
|
@@ -41,7 +41,7 @@ class PpCardListCommand extends PowerPlatformCommand_1.default {
|
|
|
41
41
|
logger.logToStderr(`Retrieving list of cards`);
|
|
42
42
|
}
|
|
43
43
|
try {
|
|
44
|
-
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
44
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
45
45
|
const items = yield odata_1.odata.getAllItems(`${dynamicsApiUrl}/api/data/v9.1/cards?$expand=owninguser($select=azureactivedirectoryobjectid,fullname)`);
|
|
46
46
|
logger.log(items);
|
|
47
47
|
}
|
|
@@ -59,7 +59,7 @@ _PpCardListCommand_instances = new WeakSet(), _PpCardListCommand_initTelemetry =
|
|
|
59
59
|
});
|
|
60
60
|
}, _PpCardListCommand_initOptions = function _PpCardListCommand_initOptions() {
|
|
61
61
|
this.options.unshift({
|
|
62
|
-
option: '-e, --
|
|
62
|
+
option: '-e, --environmentName <environmentName>'
|
|
63
63
|
}, {
|
|
64
64
|
option: '--asAdmin'
|
|
65
65
|
});
|
|
@@ -64,7 +64,7 @@ class PpCardRemoveCommand extends PowerPlatformCommand_1.default {
|
|
|
64
64
|
return args.options.id;
|
|
65
65
|
}
|
|
66
66
|
const options = {
|
|
67
|
-
|
|
67
|
+
environmentName: args.options.environmentName,
|
|
68
68
|
name: args.options.name,
|
|
69
69
|
output: 'json',
|
|
70
70
|
debug: this.debug,
|
|
@@ -78,7 +78,7 @@ class PpCardRemoveCommand extends PowerPlatformCommand_1.default {
|
|
|
78
78
|
deleteCard(args) {
|
|
79
79
|
return __awaiter(this, void 0, void 0, function* () {
|
|
80
80
|
try {
|
|
81
|
-
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
81
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
82
82
|
const cardId = yield this.getCardId(args);
|
|
83
83
|
const requestOptions = {
|
|
84
84
|
url: `${dynamicsApiUrl}/api/data/v9.1/cards(${cardId})`,
|
|
@@ -106,7 +106,7 @@ _PpCardRemoveCommand_instances = new WeakSet(), _PpCardRemoveCommand_initTelemet
|
|
|
106
106
|
});
|
|
107
107
|
}, _PpCardRemoveCommand_initOptions = function _PpCardRemoveCommand_initOptions() {
|
|
108
108
|
this.options.unshift({
|
|
109
|
-
option: '-e, --
|
|
109
|
+
option: '-e, --environmentName <environmentName>'
|
|
110
110
|
}, {
|
|
111
111
|
option: '-i, --id [id]'
|
|
112
112
|
}, {
|
|
@@ -45,7 +45,7 @@ class PpChatbotGetCommand extends PowerPlatformCommand_1.default {
|
|
|
45
45
|
logger.logToStderr(`Retrieving chatbot '${args.options.id || args.options.name}'...`);
|
|
46
46
|
}
|
|
47
47
|
try {
|
|
48
|
-
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
48
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
49
49
|
const res = yield this.getChatbot(dynamicsApiUrl, args.options);
|
|
50
50
|
logger.log(res);
|
|
51
51
|
}
|
|
@@ -89,7 +89,7 @@ _PpChatbotGetCommand_instances = new WeakSet(), _PpChatbotGetCommand_initTelemet
|
|
|
89
89
|
});
|
|
90
90
|
}, _PpChatbotGetCommand_initOptions = function _PpChatbotGetCommand_initOptions() {
|
|
91
91
|
this.options.unshift({
|
|
92
|
-
option: '-e, --
|
|
92
|
+
option: '-e, --environmentName <environmentName>'
|
|
93
93
|
}, {
|
|
94
94
|
option: '-i, --id [id]'
|
|
95
95
|
}, {
|
|
@@ -38,7 +38,7 @@ class PpChatbotListCommand extends PowerPlatformCommand_1.default {
|
|
|
38
38
|
commandAction(logger, args) {
|
|
39
39
|
return __awaiter(this, void 0, void 0, function* () {
|
|
40
40
|
if (this.verbose) {
|
|
41
|
-
logger.logToStderr(`Retrieving list of chatbots for environment '${args.options.
|
|
41
|
+
logger.logToStderr(`Retrieving list of chatbots for environment '${args.options.environmentName}'.`);
|
|
42
42
|
}
|
|
43
43
|
const fetchXml = `
|
|
44
44
|
<fetch mapping='logical' version='1.0' >
|
|
@@ -81,7 +81,7 @@ class PpChatbotListCommand extends PowerPlatformCommand_1.default {
|
|
|
81
81
|
</fetch>
|
|
82
82
|
`;
|
|
83
83
|
try {
|
|
84
|
-
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.
|
|
84
|
+
const dynamicsApiUrl = yield powerPlatform_1.powerPlatform.getDynamicsInstanceApiUrl(args.options.environmentName, args.options.asAdmin);
|
|
85
85
|
const items = yield odata_1.odata.getAllItems(`${dynamicsApiUrl}/api/data/v9.1/bots?fetchXml=${fetchXml}`);
|
|
86
86
|
logger.log(items);
|
|
87
87
|
}
|
|
@@ -99,7 +99,7 @@ _PpChatbotListCommand_instances = new WeakSet(), _PpChatbotListCommand_initTelem
|
|
|
99
99
|
});
|
|
100
100
|
}, _PpChatbotListCommand_initOptions = function _PpChatbotListCommand_initOptions() {
|
|
101
101
|
this.options.unshift({
|
|
102
|
-
option: '-e, --
|
|
102
|
+
option: '-e, --environmentName <environmentName>'
|
|
103
103
|
}, {
|
|
104
104
|
option: '--asAdmin'
|
|
105
105
|
});
|