@pnp/cli-microsoft365 11.9.0-beta.8c1ee05 → 11.9.0-beta.9bd71dd
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/.devcontainer/Dockerfile +2 -2
- package/.devproxy/api-specs/sharepoint.yaml +166 -0
- package/allCommands.json +1 -1
- package/allCommandsFull.json +1 -1
- package/dist/m365/cli/commands/app/app-reconsent.js +8 -0
- package/dist/m365/cli/commands/cli-consent.js +8 -31
- package/dist/m365/cli/commands/cli-doctor.js +6 -1
- package/dist/m365/cli/commands/cli-issue.js +8 -36
- package/dist/m365/cli/commands/completion/completion-clink-update.js +8 -0
- package/dist/m365/cli/commands/completion/completion-pwsh-setup.js +8 -16
- package/dist/m365/cli/commands/completion/completion-pwsh-update.js +8 -0
- package/dist/m365/cli/commands/completion/completion-sh-setup.js +8 -0
- package/dist/m365/cli/commands/completion/completion-sh-update.js +8 -0
- package/dist/m365/cli/commands/config/config-get.js +9 -32
- package/dist/m365/cli/commands/config/config-list.js +8 -0
- package/dist/m365/cli/commands/config/config-reset.js +9 -34
- package/dist/m365/cli/commands/config/config-set.js +86 -70
- package/dist/m365/commands/request.js +26 -60
- package/dist/m365/commands/search.js +59 -77
- package/dist/m365/commands/setup.js +16 -31
- package/dist/m365/commands/version.js +6 -0
- package/dist/m365/connection/commands/connection-remove.js +9 -29
- package/dist/m365/connection/commands/connection-use.js +8 -26
- package/dist/m365/context/commands/context-init.js +6 -0
- package/dist/m365/context/commands/option/option-set.js +9 -18
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-add.js +32 -63
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-get.js +21 -45
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-list.js +32 -53
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-member-remove.js +34 -74
- package/dist/m365/entra/commands/administrativeunit/administrativeunit-roleassignment-add.js +37 -57
- package/dist/m365/entra/commands/approleassignment/approleassignment-add.js +23 -48
- package/dist/m365/entra/commands/approleassignment/approleassignment-list.js +20 -43
- package/dist/m365/entra/commands/approleassignment/approleassignment-remove.js +24 -51
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-add.js +20 -43
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-get.js +20 -43
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-list.js +9 -25
- package/dist/m365/entra/commands/enterpriseapp/enterpriseapp-remove.js +21 -50
- package/dist/m365/entra/commands/groupsetting/groupsetting-add.js +9 -25
- package/dist/m365/entra/commands/groupsetting/groupsetting-get.js +8 -24
- package/dist/m365/entra/commands/groupsetting/groupsetting-list.js +6 -0
- package/dist/m365/entra/commands/groupsetting/groupsetting-remove.js +9 -33
- package/dist/m365/entra/commands/groupsetting/groupsetting-set.js +8 -24
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-get.js +19 -38
- package/dist/m365/entra/commands/groupsettingtemplate/groupsettingtemplate-list.js +6 -0
- package/dist/m365/entra/commands/multitenant/multitenant-get.js +8 -1
- package/dist/m365/entra/commands/multitenant/multitenant-remove.js +8 -22
- package/dist/m365/entra/commands/multitenant/multitenant-set.js +15 -36
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-add.js +10 -31
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-list.js +8 -24
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-remove.js +9 -17
- package/dist/m365/entra/commands/oauth2grant/oauth2grant-set.js +9 -17
- package/dist/m365/entra/commands/pim/pim-role-assignment-add.js +68 -114
- package/dist/m365/entra/commands/pim/pim-role-assignment-eligibility-list.js +28 -55
- package/dist/m365/entra/commands/pim/pim-role-assignment-list.js +30 -57
- package/dist/m365/entra/commands/pim/pim-role-assignment-remove.js +50 -90
- package/dist/m365/entra/commands/pim/pim-role-request-list.js +36 -69
- package/dist/m365/entra/commands/policy/policy-list.js +13 -56
- package/dist/m365/entra/commands/user/user-add.js +39 -118
- package/dist/m365/entra/commands/user/user-get.js +24 -49
- package/dist/m365/entra/commands/user/user-groupmembership-list.js +25 -48
- package/dist/m365/entra/commands/user/user-guest-add.js +14 -39
- package/dist/m365/entra/commands/user/user-hibp.js +12 -34
- package/dist/m365/entra/commands/user/user-license-add.js +23 -42
- package/dist/m365/entra/commands/user/user-license-list.js +21 -42
- package/dist/m365/entra/commands/user/user-license-remove.js +25 -47
- package/dist/m365/entra/commands/user/user-list.js +12 -39
- package/dist/m365/entra/commands/user/user-password-validate.js +8 -15
- package/dist/m365/entra/commands/user/user-recyclebinitem-clear.js +8 -22
- package/dist/m365/entra/commands/user/user-recyclebinitem-remove.js +9 -33
- package/dist/m365/entra/commands/user/user-recyclebinitem-restore.js +8 -24
- package/dist/m365/entra/commands/user/user-registrationdetails-list.js +43 -113
- package/dist/m365/entra/commands/user/user-remove.js +22 -42
- package/dist/m365/entra/commands/user/user-set.js +69 -149
- package/dist/m365/entra/commands/user/user-signin-list.js +22 -51
- package/dist/m365/external/commands/connection/connection-add.js +40 -65
- package/dist/m365/external/commands/connection/connection-doctor.js +14 -30
- package/dist/m365/external/commands/connection/connection-get.js +19 -28
- package/dist/m365/external/commands/connection/connection-remove.js +20 -25
- package/dist/m365/external/commands/connection/connection-schema-add.js +53 -42
- package/dist/m365/external/commands/connection/connection-urltoitemresolver-add.js +12 -23
- package/dist/m365/external/commands/item/item-add.js +37 -60
- package/dist/m365/file/commands/convert/convert-pdf.js +18 -33
- package/dist/m365/file/commands/file-add.js +28 -34
- package/dist/m365/file/commands/file-copy.js +18 -34
- package/dist/m365/file/commands/file-list.js +18 -24
- package/dist/m365/file/commands/file-move.js +22 -35
- package/dist/m365/flow/commands/flow-disable.js +10 -26
- package/dist/m365/flow/commands/flow-enable.js +10 -26
- package/dist/m365/flow/commands/flow-export.js +45 -71
- package/dist/m365/flow/commands/flow-get.js +10 -26
- package/dist/m365/flow/commands/flow-list.js +17 -48
- package/dist/m365/flow/commands/flow-remove.js +11 -38
- package/dist/m365/flow/commands/owner/owner-ensure.js +30 -65
- package/dist/m365/flow/commands/owner/owner-list.js +10 -35
- package/dist/m365/flow/commands/owner/owner-remove.js +30 -61
- package/dist/m365/flow/commands/run/run-cancel.js +11 -37
- package/dist/m365/flow/commands/run/run-get.js +12 -43
- package/dist/m365/flow/commands/run/run-list.js +29 -61
- package/dist/m365/flow/commands/run/run-resubmit.js +11 -37
- package/dist/m365/graph/commands/changelog/changelog-list.js +68 -67
- package/dist/m365/graph/commands/schemaextension/schemaextension-add.js +25 -31
- package/dist/m365/graph/commands/schemaextension/schemaextension-get.js +8 -15
- package/dist/m365/graph/commands/schemaextension/schemaextension-list.js +26 -50
- package/dist/m365/graph/commands/schemaextension/schemaextension-remove.js +9 -24
- package/dist/m365/graph/commands/schemaextension/schemaextension-set.js +32 -53
- package/dist/m365/graph/commands/subscription/subscription-add.js +63 -89
- package/dist/m365/outlook/commands/calendar/calendar-get.js +1 -1
- package/dist/m365/outlook/commands/calendar/calendar-list.js +64 -0
- package/dist/m365/outlook/commands/mail/mail-send.js +55 -84
- package/dist/m365/outlook/commands/message/message-get.js +27 -27
- package/dist/m365/outlook/commands/message/message-list.js +53 -80
- package/dist/m365/outlook/commands/message/message-move.js +43 -40
- package/dist/m365/outlook/commands/message/message-remove.js +17 -45
- package/dist/m365/outlook/commands.js +1 -0
- package/dist/m365/spe/commands/container/container-get.js +54 -26
- package/dist/m365/spe/commands/container/container-permission-list.js +43 -4
- package/dist/m365/spe/commands/container/container-set.js +77 -0
- package/dist/m365/spe/commands.js +1 -0
- package/dist/m365/spo/commands/file/file-unarchive.js +83 -0
- package/dist/m365/spo/commands/folder/folder-archive.js +89 -0
- package/dist/m365/spo/commands/list/list-sensitivitylabel-remove.js +83 -0
- package/dist/m365/spo/commands.js +3 -0
- package/dist/m365/viva/commands/engage/engage-role-member-add.js +79 -0
- package/dist/m365/viva/commands.js +1 -0
- package/docs/docs/cmd/outlook/calendar/calendar-get.mdx +7 -7
- package/docs/docs/cmd/outlook/calendar/calendar-list.mdx +155 -0
- package/docs/docs/cmd/spe/container/container-get.mdx +24 -3
- package/docs/docs/cmd/spe/container/container-permission-list.mdx +24 -3
- package/docs/docs/cmd/spe/container/container-set.mdx +160 -0
- package/docs/docs/cmd/spo/app/app-add.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-deploy.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-get.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-install.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-instance-list.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-list.mdx +19 -0
- package/docs/docs/cmd/spo/app/app-remove.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-retract.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-teamspackage-download.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-uninstall.mdx +21 -0
- package/docs/docs/cmd/spo/app/app-upgrade.mdx +21 -0
- package/docs/docs/cmd/spo/apppage/apppage-add.mdx +19 -1
- package/docs/docs/cmd/spo/apppage/apppage-set.mdx +21 -0
- package/docs/docs/cmd/spo/commandset/commandset-add.mdx +19 -0
- package/docs/docs/cmd/spo/commandset/commandset-get.mdx +19 -0
- package/docs/docs/cmd/spo/commandset/commandset-list.mdx +19 -0
- package/docs/docs/cmd/spo/commandset/commandset-remove.mdx +21 -0
- package/docs/docs/cmd/spo/commandset/commandset-set.mdx +21 -0
- package/docs/docs/cmd/spo/file/file-unarchive.mdx +68 -0
- package/docs/docs/cmd/spo/folder/folder-archive.mdx +73 -0
- package/docs/docs/cmd/spo/list/list-sensitivitylabel-remove.mdx +77 -0
- package/docs/docs/cmd/viva/engage/engage-role-member-add.mdx +76 -0
- package/npm-shrinkwrap.json +280 -128
- package/package.json +18 -18
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _FlowRunCancelCommand_instances, _FlowRunCancelCommand_initTelemetry, _FlowRunCancelCommand_initOptions, _FlowRunCancelCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import { cli } from '../../../../cli/cli.js';
|
|
3
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
8
4
|
import request from '../../../../request.js';
|
|
9
5
|
import { formatting } from '../../../../utils/formatting.js';
|
|
10
|
-
import { validation } from '../../../../utils/validation.js';
|
|
11
6
|
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
12
7
|
import commands from '../../commands.js';
|
|
8
|
+
export const options = z.strictObject({
|
|
9
|
+
...globalOptionsZod.shape,
|
|
10
|
+
name: z.string().alias('n'),
|
|
11
|
+
flowName: z.uuid(),
|
|
12
|
+
environmentName: z.string().alias('e'),
|
|
13
|
+
force: z.boolean().optional().alias('f')
|
|
14
|
+
});
|
|
13
15
|
class FlowRunCancelCommand extends PowerAutomateCommand {
|
|
14
16
|
get name() {
|
|
15
17
|
return commands.RUN_CANCEL;
|
|
@@ -17,12 +19,8 @@ class FlowRunCancelCommand extends PowerAutomateCommand {
|
|
|
17
19
|
get description() {
|
|
18
20
|
return 'Cancels a specific run of the specified Microsoft Flow';
|
|
19
21
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
_FlowRunCancelCommand_instances.add(this);
|
|
23
|
-
__classPrivateFieldGet(this, _FlowRunCancelCommand_instances, "m", _FlowRunCancelCommand_initTelemetry).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _FlowRunCancelCommand_instances, "m", _FlowRunCancelCommand_initOptions).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _FlowRunCancelCommand_instances, "m", _FlowRunCancelCommand_initValidators).call(this);
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
26
24
|
}
|
|
27
25
|
async commandAction(logger, args) {
|
|
28
26
|
if (this.verbose) {
|
|
@@ -54,29 +52,5 @@ class FlowRunCancelCommand extends PowerAutomateCommand {
|
|
|
54
52
|
}
|
|
55
53
|
}
|
|
56
54
|
}
|
|
57
|
-
_FlowRunCancelCommand_instances = new WeakSet(), _FlowRunCancelCommand_initTelemetry = function _FlowRunCancelCommand_initTelemetry() {
|
|
58
|
-
this.telemetry.push((args) => {
|
|
59
|
-
Object.assign(this.telemetryProperties, {
|
|
60
|
-
force: !!args.options.force
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
}, _FlowRunCancelCommand_initOptions = function _FlowRunCancelCommand_initOptions() {
|
|
64
|
-
this.options.unshift({
|
|
65
|
-
option: '-n, --name <name>'
|
|
66
|
-
}, {
|
|
67
|
-
option: '--flowName <flowName>'
|
|
68
|
-
}, {
|
|
69
|
-
option: '-e, --environmentName <environmentName>'
|
|
70
|
-
}, {
|
|
71
|
-
option: '-f, --force'
|
|
72
|
-
});
|
|
73
|
-
}, _FlowRunCancelCommand_initValidators = function _FlowRunCancelCommand_initValidators() {
|
|
74
|
-
this.validators.push(async (args) => {
|
|
75
|
-
if (!validation.isValidGuid(args.options.flowName)) {
|
|
76
|
-
return `${args.options.flowName} is not a valid GUID`;
|
|
77
|
-
}
|
|
78
|
-
return true;
|
|
79
|
-
});
|
|
80
|
-
};
|
|
81
55
|
export default new FlowRunCancelCommand();
|
|
82
56
|
//# sourceMappingURL=run-cancel.js.map
|
|
@@ -1,14 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _FlowRunGetCommand_instances, _FlowRunGetCommand_initOptions, _FlowRunGetCommand_initValidators, _FlowRunGetCommand_initTelemetry;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
|
-
import { validation } from '../../../../utils/validation.js';
|
|
10
5
|
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
11
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
name: z.string().alias('n'),
|
|
10
|
+
flowName: z.uuid(),
|
|
11
|
+
environmentName: z.string().alias('e'),
|
|
12
|
+
withTrigger: z.boolean().optional(),
|
|
13
|
+
withActions: z.union([z.string(), z.boolean()]).optional()
|
|
14
|
+
});
|
|
12
15
|
class FlowRunGetCommand extends PowerAutomateCommand {
|
|
13
16
|
get name() {
|
|
14
17
|
return commands.RUN_GET;
|
|
@@ -16,12 +19,8 @@ class FlowRunGetCommand extends PowerAutomateCommand {
|
|
|
16
19
|
get description() {
|
|
17
20
|
return 'Gets information about a specific run of the specified Microsoft Flow';
|
|
18
21
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
_FlowRunGetCommand_instances.add(this);
|
|
22
|
-
__classPrivateFieldGet(this, _FlowRunGetCommand_instances, "m", _FlowRunGetCommand_initTelemetry).call(this);
|
|
23
|
-
__classPrivateFieldGet(this, _FlowRunGetCommand_instances, "m", _FlowRunGetCommand_initOptions).call(this);
|
|
24
|
-
__classPrivateFieldGet(this, _FlowRunGetCommand_instances, "m", _FlowRunGetCommand_initValidators).call(this);
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
25
24
|
}
|
|
26
25
|
async commandAction(logger, args) {
|
|
27
26
|
if (this.verbose) {
|
|
@@ -86,35 +85,5 @@ class FlowRunGetCommand extends PowerAutomateCommand {
|
|
|
86
85
|
return additionalInformationResponse.body ? additionalInformationResponse.body : additionalInformationResponse;
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
|
-
_FlowRunGetCommand_instances = new WeakSet(), _FlowRunGetCommand_initOptions = function _FlowRunGetCommand_initOptions() {
|
|
90
|
-
this.options.unshift({
|
|
91
|
-
option: '-n, --name <name>'
|
|
92
|
-
}, {
|
|
93
|
-
option: '--flowName <flowName>'
|
|
94
|
-
}, {
|
|
95
|
-
option: '-e, --environmentName <environmentName>'
|
|
96
|
-
}, {
|
|
97
|
-
option: '--withTrigger'
|
|
98
|
-
}, {
|
|
99
|
-
option: '--withActions [withActions]'
|
|
100
|
-
});
|
|
101
|
-
}, _FlowRunGetCommand_initValidators = function _FlowRunGetCommand_initValidators() {
|
|
102
|
-
this.validators.push(async (args) => {
|
|
103
|
-
if (!validation.isValidGuid(args.options.flowName)) {
|
|
104
|
-
return `${args.options.flowName} is not a valid GUID`;
|
|
105
|
-
}
|
|
106
|
-
if (args.options.withActions && (typeof args.options.withActions !== 'string' && typeof args.options.withActions !== 'boolean')) {
|
|
107
|
-
return 'the withActions parameter must be a string or boolean';
|
|
108
|
-
}
|
|
109
|
-
return true;
|
|
110
|
-
});
|
|
111
|
-
}, _FlowRunGetCommand_initTelemetry = function _FlowRunGetCommand_initTelemetry() {
|
|
112
|
-
this.telemetry.push((args) => {
|
|
113
|
-
Object.assign(this.telemetryProperties, {
|
|
114
|
-
withTrigger: !!args.options.withTrigger,
|
|
115
|
-
withActions: typeof args.options.withActions !== 'undefined'
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
88
|
export default new FlowRunGetCommand();
|
|
120
89
|
//# sourceMappingURL=run-get.js.map
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _FlowRunListCommand_instances, _FlowRunListCommand_initTelemetry, _FlowRunListCommand_initOptions, _FlowRunListCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { formatting } from '../../../../utils/formatting.js';
|
|
9
5
|
import { odata } from '../../../../utils/odata.js';
|
|
10
6
|
import { validation } from '../../../../utils/validation.js';
|
|
11
7
|
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
12
8
|
import commands from '../../commands.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
flowName: z.uuid(),
|
|
12
|
+
environmentName: z.string().alias('e'),
|
|
13
|
+
status: z.enum(['Succeeded', 'Running', 'Failed', 'Cancelled']).optional(),
|
|
14
|
+
triggerStartTime: z.string().refine(date => validation.isValidISODateTime(date), {
|
|
15
|
+
error: e => `'${e.input}' is not a valid datetime.`
|
|
16
|
+
}).optional(),
|
|
17
|
+
triggerEndTime: z.string().refine(date => validation.isValidISODateTime(date), {
|
|
18
|
+
error: e => `'${e.input}' is not a valid datetime.`
|
|
19
|
+
}).optional(),
|
|
20
|
+
withTrigger: z.boolean().optional(),
|
|
21
|
+
asAdmin: z.boolean().optional()
|
|
22
|
+
});
|
|
13
23
|
class FlowRunListCommand extends PowerAutomateCommand {
|
|
14
24
|
get name() {
|
|
15
25
|
return commands.RUN_LIST;
|
|
@@ -17,17 +27,22 @@ class FlowRunListCommand extends PowerAutomateCommand {
|
|
|
17
27
|
get description() {
|
|
18
28
|
return 'Lists runs of the specified Microsoft Flow';
|
|
19
29
|
}
|
|
30
|
+
get schema() {
|
|
31
|
+
return options;
|
|
32
|
+
}
|
|
33
|
+
getRefinedSchema(schema) {
|
|
34
|
+
return schema.refine(options => {
|
|
35
|
+
if (options.output !== 'json' && options.withTrigger) {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
return true;
|
|
39
|
+
}, {
|
|
40
|
+
error: 'The --withTrigger option is only available when output is set to json'
|
|
41
|
+
});
|
|
42
|
+
}
|
|
20
43
|
defaultProperties() {
|
|
21
44
|
return ['name', 'startTime', 'status'];
|
|
22
45
|
}
|
|
23
|
-
constructor() {
|
|
24
|
-
super();
|
|
25
|
-
_FlowRunListCommand_instances.add(this);
|
|
26
|
-
this.allowedStatusses = ['Succeeded', 'Running', 'Failed', 'Cancelled'];
|
|
27
|
-
__classPrivateFieldGet(this, _FlowRunListCommand_instances, "m", _FlowRunListCommand_initTelemetry).call(this);
|
|
28
|
-
__classPrivateFieldGet(this, _FlowRunListCommand_instances, "m", _FlowRunListCommand_initOptions).call(this);
|
|
29
|
-
__classPrivateFieldGet(this, _FlowRunListCommand_instances, "m", _FlowRunListCommand_initValidators).call(this);
|
|
30
|
-
}
|
|
31
46
|
async commandAction(logger, args) {
|
|
32
47
|
if (this.verbose) {
|
|
33
48
|
await logger.logToStderr(`Retrieving list of runs for Microsoft Flow ${args.options.flowName}...`);
|
|
@@ -83,52 +98,5 @@ class FlowRunListCommand extends PowerAutomateCommand {
|
|
|
83
98
|
await Promise.all(tasks);
|
|
84
99
|
}
|
|
85
100
|
}
|
|
86
|
-
_FlowRunListCommand_instances = new WeakSet(), _FlowRunListCommand_initTelemetry = function _FlowRunListCommand_initTelemetry() {
|
|
87
|
-
this.telemetry.push((args) => {
|
|
88
|
-
Object.assign(this.telemetryProperties, {
|
|
89
|
-
status: typeof args.options.status !== 'undefined',
|
|
90
|
-
triggerStartTime: typeof args.options.triggerStartTime !== 'undefined',
|
|
91
|
-
triggerEndTime: typeof args.options.triggerEndTime !== 'undefined',
|
|
92
|
-
withTrigger: !!args.options.withTrigger,
|
|
93
|
-
asAdmin: !!args.options.asAdmin
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}, _FlowRunListCommand_initOptions = function _FlowRunListCommand_initOptions() {
|
|
97
|
-
this.options.unshift({
|
|
98
|
-
option: '--flowName <flowName>'
|
|
99
|
-
}, {
|
|
100
|
-
option: '-e, --environmentName <environmentName>'
|
|
101
|
-
}, {
|
|
102
|
-
option: '--status [status]',
|
|
103
|
-
autocomplete: this.allowedStatusses
|
|
104
|
-
}, {
|
|
105
|
-
option: '--triggerStartTime [triggerStartTime]'
|
|
106
|
-
}, {
|
|
107
|
-
option: '--triggerEndTime [triggerEndTime]'
|
|
108
|
-
}, {
|
|
109
|
-
option: '--withTrigger'
|
|
110
|
-
}, {
|
|
111
|
-
option: '--asAdmin'
|
|
112
|
-
});
|
|
113
|
-
}, _FlowRunListCommand_initValidators = function _FlowRunListCommand_initValidators() {
|
|
114
|
-
this.validators.push(async (args) => {
|
|
115
|
-
if (!validation.isValidGuid(args.options.flowName)) {
|
|
116
|
-
return `${args.options.flowName} is not a valid GUID`;
|
|
117
|
-
}
|
|
118
|
-
if (args.options.status && this.allowedStatusses.indexOf(args.options.status) === -1) {
|
|
119
|
-
return `'${args.options.status}' is not a valid status. Allowed values are: ${this.allowedStatusses.join(',')}`;
|
|
120
|
-
}
|
|
121
|
-
if (args.options.triggerStartTime && !validation.isValidISODateTime(args.options.triggerStartTime)) {
|
|
122
|
-
return `'${args.options.triggerStartTime}' is not a valid datetime.`;
|
|
123
|
-
}
|
|
124
|
-
if (args.options.triggerEndTime && !validation.isValidISODateTime(args.options.triggerEndTime)) {
|
|
125
|
-
return `'${args.options.triggerEndTime}' is not a valid datetime.`;
|
|
126
|
-
}
|
|
127
|
-
if (args.options.output !== 'json' && args.options.withTrigger) {
|
|
128
|
-
return 'The --withTrigger option is only available when output is set to json';
|
|
129
|
-
}
|
|
130
|
-
return true;
|
|
131
|
-
});
|
|
132
|
-
};
|
|
133
101
|
export default new FlowRunListCommand();
|
|
134
102
|
//# sourceMappingURL=run-list.js.map
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _FlowRunResubmitCommand_instances, _FlowRunResubmitCommand_initTelemetry, _FlowRunResubmitCommand_initOptions, _FlowRunResubmitCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
7
2
|
import chalk from 'chalk';
|
|
8
3
|
import { cli } from '../../../../cli/cli.js';
|
|
4
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
9
5
|
import request from '../../../../request.js';
|
|
10
6
|
import { formatting } from '../../../../utils/formatting.js';
|
|
11
|
-
import { validation } from '../../../../utils/validation.js';
|
|
12
7
|
import commands from '../../commands.js';
|
|
13
8
|
import PowerAutomateCommand from '../../../base/PowerAutomateCommand.js';
|
|
9
|
+
export const options = z.strictObject({
|
|
10
|
+
...globalOptionsZod.shape,
|
|
11
|
+
name: z.string().alias('n'),
|
|
12
|
+
flowName: z.uuid(),
|
|
13
|
+
environmentName: z.string().alias('e'),
|
|
14
|
+
force: z.boolean().optional().alias('f')
|
|
15
|
+
});
|
|
14
16
|
class FlowRunResubmitCommand extends PowerAutomateCommand {
|
|
15
17
|
get name() {
|
|
16
18
|
return commands.RUN_RESUBMIT;
|
|
@@ -18,12 +20,8 @@ class FlowRunResubmitCommand extends PowerAutomateCommand {
|
|
|
18
20
|
get description() {
|
|
19
21
|
return 'Resubmits a specific flow run for the specified Microsoft Flow';
|
|
20
22
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
_FlowRunResubmitCommand_instances.add(this);
|
|
24
|
-
__classPrivateFieldGet(this, _FlowRunResubmitCommand_instances, "m", _FlowRunResubmitCommand_initTelemetry).call(this);
|
|
25
|
-
__classPrivateFieldGet(this, _FlowRunResubmitCommand_instances, "m", _FlowRunResubmitCommand_initOptions).call(this);
|
|
26
|
-
__classPrivateFieldGet(this, _FlowRunResubmitCommand_instances, "m", _FlowRunResubmitCommand_initValidators).call(this);
|
|
23
|
+
get schema() {
|
|
24
|
+
return options;
|
|
27
25
|
}
|
|
28
26
|
async commandAction(logger, args) {
|
|
29
27
|
if (this.verbose) {
|
|
@@ -70,29 +68,5 @@ class FlowRunResubmitCommand extends PowerAutomateCommand {
|
|
|
70
68
|
return res.value[0].name;
|
|
71
69
|
}
|
|
72
70
|
}
|
|
73
|
-
_FlowRunResubmitCommand_instances = new WeakSet(), _FlowRunResubmitCommand_initTelemetry = function _FlowRunResubmitCommand_initTelemetry() {
|
|
74
|
-
this.telemetry.push((args) => {
|
|
75
|
-
Object.assign(this.telemetryProperties, {
|
|
76
|
-
force: args.options.force
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
}, _FlowRunResubmitCommand_initOptions = function _FlowRunResubmitCommand_initOptions() {
|
|
80
|
-
this.options.unshift({
|
|
81
|
-
option: '-n, --name <name>'
|
|
82
|
-
}, {
|
|
83
|
-
option: '--flowName <flowName>'
|
|
84
|
-
}, {
|
|
85
|
-
option: '-e, --environmentName <environmentName>'
|
|
86
|
-
}, {
|
|
87
|
-
option: '-f, --force'
|
|
88
|
-
});
|
|
89
|
-
}, _FlowRunResubmitCommand_initValidators = function _FlowRunResubmitCommand_initValidators() {
|
|
90
|
-
this.validators.push(async (args) => {
|
|
91
|
-
if (!validation.isValidGuid(args.options.flowName)) {
|
|
92
|
-
return `${args.options.flowName} is not a valid GUID`;
|
|
93
|
-
}
|
|
94
|
-
return true;
|
|
95
|
-
});
|
|
96
|
-
};
|
|
97
71
|
export default new FlowRunResubmitCommand();
|
|
98
72
|
//# sourceMappingURL=run-resubmit.js.map
|
|
@@ -1,16 +1,38 @@
|
|
|
1
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
2
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _GraphChangelogListCommand_instances, _GraphChangelogListCommand_initTelemetry, _GraphChangelogListCommand_initOptions, _GraphChangelogListCommand_initValidators;
|
|
7
1
|
import { DOMParser } from '@xmldom/xmldom';
|
|
2
|
+
import { z } from 'zod';
|
|
8
3
|
import { cli } from '../../../../cli/cli.js';
|
|
4
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
9
5
|
import request from '../../../../request.js';
|
|
10
6
|
import { md } from '../../../../utils/md.js';
|
|
11
7
|
import { validation } from '../../../../utils/validation.js';
|
|
8
|
+
import { zod } from '../../../../utils/zod.js';
|
|
12
9
|
import AnonymousCommand from '../../../base/AnonymousCommand.js';
|
|
13
10
|
import commands from '../../commands.js';
|
|
11
|
+
const allowedVersions = ['beta', 'v1.0'];
|
|
12
|
+
var ChangeType;
|
|
13
|
+
(function (ChangeType) {
|
|
14
|
+
ChangeType["Addition"] = "Addition";
|
|
15
|
+
ChangeType["Change"] = "Change";
|
|
16
|
+
ChangeType["Deletion"] = "Deletion";
|
|
17
|
+
ChangeType["Deprecation"] = "Deprecation";
|
|
18
|
+
})(ChangeType || (ChangeType = {}));
|
|
19
|
+
const allowedServices = [
|
|
20
|
+
'Applications', 'Calendar', 'Change notifications', 'Cloud communications',
|
|
21
|
+
'Compliance', 'Cross-device experiences', 'Customer booking', 'Device and app management',
|
|
22
|
+
'Education', 'Files', 'Financials', 'Groups',
|
|
23
|
+
'Identity and access', 'Mail', 'Notes', 'Notifications',
|
|
24
|
+
'People and workplace intelligence', 'Personal contacts', 'Reports', 'Search',
|
|
25
|
+
'Security', 'Sites and lists', 'Tasks and plans', 'Teamwork',
|
|
26
|
+
'To-do tasks', 'Users', 'Workbooks and charts'
|
|
27
|
+
];
|
|
28
|
+
export const options = z.strictObject({
|
|
29
|
+
...globalOptionsZod.shape,
|
|
30
|
+
versions: z.string().optional().alias('v'),
|
|
31
|
+
changeType: zod.coercedEnum(ChangeType).optional().alias('c'),
|
|
32
|
+
services: z.string().optional().alias('s'),
|
|
33
|
+
startDate: z.string().optional(),
|
|
34
|
+
endDate: z.string().optional()
|
|
35
|
+
});
|
|
14
36
|
class GraphChangelogListCommand extends AnonymousCommand {
|
|
15
37
|
get name() {
|
|
16
38
|
return commands.CHANGELOG_LIST;
|
|
@@ -21,28 +43,45 @@ class GraphChangelogListCommand extends AnonymousCommand {
|
|
|
21
43
|
defaultProperties() {
|
|
22
44
|
return ['category', 'title', 'description'];
|
|
23
45
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
46
|
+
get schema() {
|
|
47
|
+
return options;
|
|
48
|
+
}
|
|
49
|
+
getRefinedSchema(schema) {
|
|
50
|
+
return schema
|
|
51
|
+
.refine(options => {
|
|
52
|
+
if (!options.versions) {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
return !options.versions.toLocaleLowerCase().split(',').some(x => !allowedVersions.map(y => y.toLocaleLowerCase()).includes(x));
|
|
56
|
+
}, {
|
|
57
|
+
error: `The versions contains an invalid value. Specify either ${allowedVersions.join(', ')} as properties`,
|
|
58
|
+
path: ['versions']
|
|
59
|
+
})
|
|
60
|
+
.refine(options => {
|
|
61
|
+
if (!options.services) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
return !options.services.toLocaleLowerCase().split(',').some(x => !allowedServices.map(y => y.toLocaleLowerCase()).includes(x));
|
|
65
|
+
}, {
|
|
66
|
+
error: `The services contains invalid value. Specify either ${allowedServices.join(', ')} as properties`,
|
|
67
|
+
path: ['services']
|
|
68
|
+
})
|
|
69
|
+
.refine(options => !options.startDate || validation.isValidISODate(options.startDate), {
|
|
70
|
+
error: 'The startDate is not a valid ISO date string',
|
|
71
|
+
path: ['startDate']
|
|
72
|
+
})
|
|
73
|
+
.refine(options => !options.endDate || validation.isValidISODate(options.endDate), {
|
|
74
|
+
error: 'The endDate is not a valid ISO date string',
|
|
75
|
+
path: ['endDate']
|
|
76
|
+
})
|
|
77
|
+
.refine(options => !(options.endDate && options.startDate && new Date(options.endDate) < new Date(options.startDate)), {
|
|
78
|
+
error: 'The endDate should be later than startDate',
|
|
79
|
+
path: ['endDate']
|
|
80
|
+
});
|
|
41
81
|
}
|
|
42
82
|
async commandAction(logger, args) {
|
|
43
83
|
try {
|
|
44
|
-
const
|
|
45
|
-
const searchParam = args.options.changeType ? `/?filterBy=${allowedChangeType}` : '';
|
|
84
|
+
const searchParam = args.options.changeType ? `/?filterBy=${args.options.changeType}` : '';
|
|
46
85
|
const requestOptions = {
|
|
47
86
|
url: `https://developer.microsoft.com/en-us/graph/changelog/rss${searchParam}`,
|
|
48
87
|
headers: {
|
|
@@ -63,14 +102,14 @@ class GraphChangelogListCommand extends AnonymousCommand {
|
|
|
63
102
|
filterThroughOptions(options, changelog) {
|
|
64
103
|
let items = changelog.items;
|
|
65
104
|
if (options.services) {
|
|
66
|
-
const
|
|
105
|
+
const matchedServices = allowedServices
|
|
67
106
|
.filter(allowedService => options.services.toLocaleLowerCase().split(',').includes(allowedService.toLocaleLowerCase()));
|
|
68
|
-
items = changelog.items.filter(item =>
|
|
107
|
+
items = changelog.items.filter(item => matchedServices.includes(item.title));
|
|
69
108
|
}
|
|
70
109
|
if (options.versions) {
|
|
71
|
-
const
|
|
110
|
+
const matchedVersions = allowedVersions
|
|
72
111
|
.filter(allowedVersion => options.versions.toLocaleLowerCase().split(',').includes(allowedVersion.toLocaleLowerCase()));
|
|
73
|
-
items = items.filter(item =>
|
|
112
|
+
items = items.filter(item => matchedVersions.includes(item.category));
|
|
74
113
|
}
|
|
75
114
|
if (options.startDate) {
|
|
76
115
|
const startDate = new Date(options.startDate);
|
|
@@ -110,43 +149,5 @@ class GraphChangelogListCommand extends AnonymousCommand {
|
|
|
110
149
|
return changelog;
|
|
111
150
|
}
|
|
112
151
|
}
|
|
113
|
-
_GraphChangelogListCommand_instances = new WeakSet(), _GraphChangelogListCommand_initTelemetry = function _GraphChangelogListCommand_initTelemetry() {
|
|
114
|
-
this.telemetry.push((args) => {
|
|
115
|
-
Object.assign(this.telemetryProperties, {
|
|
116
|
-
versions: typeof args.options.versions !== 'undefined',
|
|
117
|
-
changeType: typeof args.options.changeType !== 'undefined',
|
|
118
|
-
services: typeof args.options.services !== 'undefined',
|
|
119
|
-
startDate: typeof args.options.startDate !== 'undefined',
|
|
120
|
-
endDate: typeof args.options.endDate !== 'undefined'
|
|
121
|
-
});
|
|
122
|
-
});
|
|
123
|
-
}, _GraphChangelogListCommand_initOptions = function _GraphChangelogListCommand_initOptions() {
|
|
124
|
-
this.options.unshift({ option: '-v, --versions [versions]', autocomplete: this.allowedVersions }, { option: "-c, --changeType [changeType]", autocomplete: this.allowedChangeTypes }, { option: "-s, --services [services]", autocomplete: this.allowedServices }, { option: "--startDate [startDate]" }, { option: "--endDate [endDate]" });
|
|
125
|
-
}, _GraphChangelogListCommand_initValidators = function _GraphChangelogListCommand_initValidators() {
|
|
126
|
-
this.validators.push(async (args) => {
|
|
127
|
-
if (args.options.versions &&
|
|
128
|
-
args.options.versions.toLocaleLowerCase().split(',').some(x => !this.allowedVersions.map(y => y.toLocaleLowerCase()).includes(x))) {
|
|
129
|
-
return `The verions contains an invalid value. Specify either ${this.allowedVersions.join(', ')} as properties`;
|
|
130
|
-
}
|
|
131
|
-
if (args.options.changeType &&
|
|
132
|
-
!this.allowedChangeTypes.map(x => x.toLocaleLowerCase()).includes(args.options.changeType.toLocaleLowerCase())) {
|
|
133
|
-
return `The change type contain an invalid value. Specify either ${this.allowedChangeTypes.join(', ')} as properties`;
|
|
134
|
-
}
|
|
135
|
-
if (args.options.services &&
|
|
136
|
-
args.options.services.toLocaleLowerCase().split(',').some(x => !this.allowedServices.map(y => y.toLocaleLowerCase()).includes(x))) {
|
|
137
|
-
return `The services contains invalid value. Specify either ${this.allowedServices.join(', ')} as properties`;
|
|
138
|
-
}
|
|
139
|
-
if (args.options.startDate && !validation.isValidISODate(args.options.startDate)) {
|
|
140
|
-
return 'The startDate is not a valid ISO date string';
|
|
141
|
-
}
|
|
142
|
-
if (args.options.endDate && !validation.isValidISODate(args.options.endDate)) {
|
|
143
|
-
return 'The endDate is not a valid ISO date string';
|
|
144
|
-
}
|
|
145
|
-
if (args.options.endDate && args.options.startDate && new Date(args.options.endDate) < new Date(args.options.startDate)) {
|
|
146
|
-
return 'The endDate should be later than startDate';
|
|
147
|
-
}
|
|
148
|
-
return true;
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
152
|
export default new GraphChangelogListCommand();
|
|
152
153
|
//# sourceMappingURL=changelog-list.js.map
|
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _GraphSchemaExtensionAddCommand_instances, _GraphSchemaExtensionAddCommand_initOptions, _GraphSchemaExtensionAddCommand_initValidators;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import { validation } from '../../../../utils/validation.js';
|
|
9
5
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
10
6
|
import commands from '../../commands.js';
|
|
7
|
+
export const options = z.strictObject({
|
|
8
|
+
...globalOptionsZod.shape,
|
|
9
|
+
id: z.string().alias('i'),
|
|
10
|
+
description: z.string().optional().alias('d'),
|
|
11
|
+
owner: z.string(),
|
|
12
|
+
targetTypes: z.string().alias('t'),
|
|
13
|
+
properties: z.string().alias('p')
|
|
14
|
+
});
|
|
11
15
|
class GraphSchemaExtensionAddCommand extends GraphCommand {
|
|
12
16
|
get name() {
|
|
13
17
|
return commands.SCHEMAEXTENSION_ADD;
|
|
@@ -15,11 +19,21 @@ class GraphSchemaExtensionAddCommand extends GraphCommand {
|
|
|
15
19
|
get description() {
|
|
16
20
|
return 'Creates a Microsoft Graph schema extension';
|
|
17
21
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
get schema() {
|
|
23
|
+
return options;
|
|
24
|
+
}
|
|
25
|
+
getRefinedSchema(schema) {
|
|
26
|
+
return schema
|
|
27
|
+
.refine(options => validation.isValidGuid(options.owner), {
|
|
28
|
+
error: e => `The specified owner '${e.input.owner}' is not a valid App Id`,
|
|
29
|
+
path: ['owner']
|
|
30
|
+
})
|
|
31
|
+
.refine(options => {
|
|
32
|
+
return this.validateProperties(options.properties) === true;
|
|
33
|
+
}, {
|
|
34
|
+
error: e => `${this.validateProperties(e.input.properties)}`,
|
|
35
|
+
path: ['properties']
|
|
36
|
+
});
|
|
23
37
|
}
|
|
24
38
|
async commandAction(logger, args) {
|
|
25
39
|
if (this.verbose) {
|
|
@@ -85,25 +99,5 @@ class GraphSchemaExtensionAddCommand extends GraphCommand {
|
|
|
85
99
|
return ['Binary', 'Boolean', 'DateTime', 'Integer', 'String'].indexOf(propertyType) > -1;
|
|
86
100
|
}
|
|
87
101
|
}
|
|
88
|
-
_GraphSchemaExtensionAddCommand_instances = new WeakSet(), _GraphSchemaExtensionAddCommand_initOptions = function _GraphSchemaExtensionAddCommand_initOptions() {
|
|
89
|
-
this.options.unshift({
|
|
90
|
-
option: '-i, --id <id>'
|
|
91
|
-
}, {
|
|
92
|
-
option: '-d, --description [description]'
|
|
93
|
-
}, {
|
|
94
|
-
option: '--owner <owner>'
|
|
95
|
-
}, {
|
|
96
|
-
option: '-t, --targetTypes <targetTypes>'
|
|
97
|
-
}, {
|
|
98
|
-
option: '-p, --properties <properties>'
|
|
99
|
-
});
|
|
100
|
-
}, _GraphSchemaExtensionAddCommand_initValidators = function _GraphSchemaExtensionAddCommand_initValidators() {
|
|
101
|
-
this.validators.push(async (args) => {
|
|
102
|
-
if (args.options.owner && !validation.isValidGuid(args.options.owner)) {
|
|
103
|
-
return `The specified owner '${args.options.owner}' is not a valid App Id`;
|
|
104
|
-
}
|
|
105
|
-
return this.validateProperties(args.options.properties);
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
102
|
export default new GraphSchemaExtensionAddCommand();
|
|
109
103
|
//# sourceMappingURL=schemaextension-add.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
4
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
5
|
-
};
|
|
6
|
-
var _GraphSchemaExtensionGetCommand_instances, _GraphSchemaExtensionGetCommand_initOptions;
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { globalOptionsZod } from '../../../../Command.js';
|
|
7
3
|
import request from '../../../../request.js';
|
|
8
4
|
import GraphCommand from '../../../base/GraphCommand.js';
|
|
9
5
|
import commands from '../../commands.js';
|
|
6
|
+
export const options = z.strictObject({
|
|
7
|
+
...globalOptionsZod.shape,
|
|
8
|
+
id: z.string().alias('i')
|
|
9
|
+
});
|
|
10
10
|
class GraphSchemaExtensionGetCommand extends GraphCommand {
|
|
11
11
|
get name() {
|
|
12
12
|
return commands.SCHEMAEXTENSION_GET;
|
|
@@ -14,10 +14,8 @@ class GraphSchemaExtensionGetCommand extends GraphCommand {
|
|
|
14
14
|
get description() {
|
|
15
15
|
return 'Gets the properties of the specified schema extension definition';
|
|
16
16
|
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
_GraphSchemaExtensionGetCommand_instances.add(this);
|
|
20
|
-
__classPrivateFieldGet(this, _GraphSchemaExtensionGetCommand_instances, "m", _GraphSchemaExtensionGetCommand_initOptions).call(this);
|
|
17
|
+
get schema() {
|
|
18
|
+
return options;
|
|
21
19
|
}
|
|
22
20
|
async commandAction(logger, args) {
|
|
23
21
|
if (this.verbose) {
|
|
@@ -40,10 +38,5 @@ class GraphSchemaExtensionGetCommand extends GraphCommand {
|
|
|
40
38
|
}
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
|
-
_GraphSchemaExtensionGetCommand_instances = new WeakSet(), _GraphSchemaExtensionGetCommand_initOptions = function _GraphSchemaExtensionGetCommand_initOptions() {
|
|
44
|
-
this.options.unshift({
|
|
45
|
-
option: '-i, --id <id>'
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
41
|
export default new GraphSchemaExtensionGetCommand();
|
|
49
42
|
//# sourceMappingURL=schemaextension-get.js.map
|