@salesforce/plugin-devops-center 1.3.0 → 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/README.md +649 -102
  2. package/lib/commands/devops/pipeline/create.d.ts +2 -1
  3. package/lib/commands/devops/pipeline/create.js +37 -7
  4. package/lib/commands/devops/pipeline/create.js.map +1 -1
  5. package/lib/commands/devops/pipeline/{activate.d.ts → get.d.ts} +3 -3
  6. package/lib/commands/devops/pipeline/get.js +81 -0
  7. package/lib/commands/devops/pipeline/get.js.map +1 -0
  8. package/lib/commands/devops/pipeline/list.d.ts +13 -0
  9. package/lib/commands/devops/pipeline/list.js +58 -0
  10. package/lib/commands/devops/pipeline/list.js.map +1 -0
  11. package/lib/commands/devops/pipeline/{attach-project.d.ts → project/add.d.ts} +2 -2
  12. package/lib/commands/devops/pipeline/{attach-project.js → project/add.js} +5 -5
  13. package/lib/commands/devops/pipeline/project/add.js.map +1 -0
  14. package/lib/commands/devops/pipeline/project/delete.d.ts +15 -0
  15. package/lib/commands/devops/pipeline/{activate.js → project/delete.js} +17 -28
  16. package/lib/commands/devops/pipeline/project/delete.js.map +1 -0
  17. package/lib/commands/devops/pipeline/stage/delete.d.ts +15 -0
  18. package/lib/commands/devops/pipeline/stage/delete.js +69 -0
  19. package/lib/commands/devops/pipeline/stage/delete.js.map +1 -0
  20. package/lib/commands/devops/pipeline/update.d.ts +18 -0
  21. package/lib/commands/devops/pipeline/update.js +126 -0
  22. package/lib/commands/devops/pipeline/update.js.map +1 -0
  23. package/lib/commands/devops/project/update.d.ts +17 -0
  24. package/lib/commands/devops/project/update.js +86 -0
  25. package/lib/commands/devops/project/update.js.map +1 -0
  26. package/lib/commands/devops/promote.d.ts +24 -0
  27. package/lib/commands/devops/promote.js +148 -0
  28. package/lib/commands/devops/promote.js.map +1 -0
  29. package/lib/commands/devops/promotion/complete.d.ts +20 -0
  30. package/lib/commands/devops/promotion/complete.js +112 -0
  31. package/lib/commands/devops/promotion/complete.js.map +1 -0
  32. package/lib/commands/devops/request/status.d.ts +14 -0
  33. package/lib/commands/devops/request/status.js +71 -0
  34. package/lib/commands/devops/request/status.js.map +1 -0
  35. package/lib/commands/devops/{pull-request → review}/create.d.ts +1 -3
  36. package/lib/commands/devops/{pull-request → review}/create.js +11 -43
  37. package/lib/commands/devops/review/create.js.map +1 -0
  38. package/lib/commands/devops/stage/{add-branch.d.ts → branch/add.d.ts} +2 -2
  39. package/lib/commands/devops/stage/{add-branch.js → branch/add.js} +6 -6
  40. package/lib/commands/devops/stage/branch/add.js.map +1 -0
  41. package/lib/commands/devops/stage/{add-environment.d.ts → environment/add.d.ts} +2 -2
  42. package/lib/commands/devops/stage/{add-environment.js → environment/add.js} +13 -6
  43. package/lib/commands/devops/stage/environment/add.js.map +1 -0
  44. package/lib/commands/devops/stage/environment/delete.d.ts +15 -0
  45. package/lib/commands/devops/stage/environment/delete.js +75 -0
  46. package/lib/commands/devops/stage/environment/delete.js.map +1 -0
  47. package/lib/commands/devops/work-item/combine.d.ts +15 -0
  48. package/lib/commands/devops/work-item/combine.js +109 -0
  49. package/lib/commands/devops/work-item/combine.js.map +1 -0
  50. package/lib/commands/devops/work-item/prepare.d.ts +14 -0
  51. package/lib/commands/devops/work-item/prepare.js +98 -0
  52. package/lib/commands/devops/work-item/prepare.js.map +1 -0
  53. package/lib/commands/devops/work-item/{status/update.d.ts → update.d.ts} +6 -4
  54. package/lib/commands/devops/work-item/{status/update.js → update.js} +30 -9
  55. package/lib/commands/devops/work-item/update.js.map +1 -0
  56. package/lib/common/flags/promote/promoteFlags.d.ts +1 -0
  57. package/lib/common/flags/promote/promoteFlags.js +5 -0
  58. package/lib/common/flags/promote/promoteFlags.js.map +1 -1
  59. package/lib/common/outputService/aorOutputService.js +4 -4
  60. package/lib/common/outputService/aorOutputService.js.map +1 -1
  61. package/lib/common/outputService/outputUtils.js +1 -2
  62. package/lib/common/outputService/outputUtils.js.map +1 -1
  63. package/lib/common/selectors/asyncOperationResultsSelector.js +3 -1
  64. package/lib/common/selectors/asyncOperationResultsSelector.js.map +1 -1
  65. package/lib/common/selectors/deployComponentsSelector.js +5 -6
  66. package/lib/common/selectors/deployComponentsSelector.js.map +1 -1
  67. package/lib/common/selectors/deployProgressSummarySelector.js +3 -1
  68. package/lib/common/selectors/deployProgressSummarySelector.js.map +1 -1
  69. package/lib/common/selectors/deploymentResultsSelector.js +10 -6
  70. package/lib/common/selectors/deploymentResultsSelector.js.map +1 -1
  71. package/lib/common/selectors/environmentSelector.js +4 -2
  72. package/lib/common/selectors/environmentSelector.js.map +1 -1
  73. package/lib/common/selectors/namedCredentialSelector.js +2 -1
  74. package/lib/common/selectors/namedCredentialSelector.js.map +1 -1
  75. package/lib/common/selectors/pipelineStageSelector.js +5 -3
  76. package/lib/common/selectors/pipelineStageSelector.js.map +1 -1
  77. package/lib/common/selectors/validateDeploySelector.js +3 -1
  78. package/lib/common/selectors/validateDeploySelector.js.map +1 -1
  79. package/lib/common/selectors/workItemSelector.js +4 -1
  80. package/lib/common/selectors/workItemSelector.js.map +1 -1
  81. package/lib/utils/activatePipeline.d.ts +13 -4
  82. package/lib/utils/activatePipeline.js +7 -6
  83. package/lib/utils/activatePipeline.js.map +1 -1
  84. package/lib/utils/attachProject.js +2 -0
  85. package/lib/utils/attachProject.js.map +1 -1
  86. package/lib/utils/combineWorkItems.d.ts +20 -0
  87. package/lib/utils/combineWorkItems.js +42 -0
  88. package/lib/utils/combineWorkItems.js.map +1 -0
  89. package/lib/utils/createPipeline.d.ts +14 -1
  90. package/lib/utils/createPipeline.js +52 -6
  91. package/lib/utils/createPipeline.js.map +1 -1
  92. package/lib/utils/createProject.js +1 -0
  93. package/lib/utils/createProject.js.map +1 -1
  94. package/lib/utils/createPullRequest.d.ts +7 -19
  95. package/lib/utils/createPullRequest.js +51 -122
  96. package/lib/utils/createPullRequest.js.map +1 -1
  97. package/lib/utils/deletePipelineStage.d.ts +12 -0
  98. package/lib/utils/deletePipelineStage.js +41 -0
  99. package/lib/utils/deletePipelineStage.js.map +1 -0
  100. package/lib/utils/deleteStageEnvironment.d.ts +8 -0
  101. package/lib/utils/deleteStageEnvironment.js +33 -0
  102. package/lib/utils/deleteStageEnvironment.js.map +1 -0
  103. package/lib/utils/deployStage.d.ts +29 -0
  104. package/lib/utils/deployStage.js +68 -0
  105. package/lib/utils/deployStage.js.map +1 -0
  106. package/lib/utils/detachProject.d.ts +8 -0
  107. package/lib/utils/detachProject.js +37 -0
  108. package/lib/utils/detachProject.js.map +1 -0
  109. package/lib/utils/getPipeline.d.ts +27 -0
  110. package/lib/utils/getPipeline.js +66 -0
  111. package/lib/utils/getPipeline.js.map +1 -0
  112. package/lib/utils/getRequestStatus.d.ts +10 -0
  113. package/lib/utils/getRequestStatus.js +32 -0
  114. package/lib/utils/getRequestStatus.js.map +1 -0
  115. package/lib/utils/listPipelines.d.ts +11 -0
  116. package/lib/utils/listPipelines.js +20 -0
  117. package/lib/utils/listPipelines.js.map +1 -0
  118. package/lib/utils/pipelineUtils.js +3 -0
  119. package/lib/utils/pipelineUtils.js.map +1 -1
  120. package/lib/utils/prepareWorkItem.d.ts +25 -0
  121. package/lib/utils/prepareWorkItem.js +55 -0
  122. package/lib/utils/prepareWorkItem.js.map +1 -0
  123. package/lib/utils/promoteStage.d.ts +21 -0
  124. package/lib/utils/promoteStage.js +46 -0
  125. package/lib/utils/promoteStage.js.map +1 -0
  126. package/lib/utils/soqlUtils.d.ts +23 -0
  127. package/lib/utils/soqlUtils.js +63 -0
  128. package/lib/utils/soqlUtils.js.map +1 -0
  129. package/lib/utils/updateProject.d.ts +17 -0
  130. package/lib/utils/updateProject.js +41 -0
  131. package/lib/utils/updateProject.js.map +1 -0
  132. package/lib/utils/{updateWorkItemStatus.d.ts → updateWorkItem.d.ts} +12 -14
  133. package/lib/utils/{updateWorkItemStatus.js → updateWorkItem.js} +31 -27
  134. package/lib/utils/updateWorkItem.js.map +1 -0
  135. package/lib/utils/workItems.js +2 -0
  136. package/lib/utils/workItems.js.map +1 -1
  137. package/messages/devops.pipeline.create.md +26 -6
  138. package/messages/devops.pipeline.get.md +17 -0
  139. package/messages/devops.pipeline.list.md +13 -0
  140. package/messages/devops.pipeline.project.delete.md +25 -0
  141. package/messages/devops.pipeline.stage.delete.md +25 -0
  142. package/messages/devops.pipeline.update.md +47 -0
  143. package/messages/devops.project.update.md +45 -0
  144. package/messages/devops.promote.md +61 -0
  145. package/messages/devops.promotion.complete.md +47 -0
  146. package/messages/devops.request.status.md +21 -0
  147. package/messages/devops.review.create.md +33 -0
  148. package/messages/{devops.stage.add-environment.md → devops.stage.environment.add.md} +4 -0
  149. package/messages/devops.stage.environment.delete.md +29 -0
  150. package/messages/devops.work-item.combine.md +39 -0
  151. package/messages/devops.work-item.prepare.md +27 -0
  152. package/messages/devops.work-item.update.md +45 -0
  153. package/npm-shrinkwrap.json +37 -174
  154. package/oclif.lock +1 -1
  155. package/oclif.manifest.json +1167 -223
  156. package/package.json +20 -8
  157. package/schemas/devops-pipeline-get.json +98 -0
  158. package/schemas/devops-pipeline-list.json +38 -0
  159. package/schemas/devops-pipeline-project-delete.json +25 -0
  160. package/schemas/devops-pipeline-stage-delete.json +25 -0
  161. package/schemas/{devops-pipeline-activate.json → devops-pipeline-update.json} +5 -2
  162. package/schemas/devops-project-update.json +31 -0
  163. package/schemas/devops-promote.json +28 -0
  164. package/schemas/devops-promotion-complete.json +34 -0
  165. package/schemas/devops-request-status.json +31 -0
  166. package/schemas/{devops-pull__request-create.json → devops-review-create.json} +0 -3
  167. package/schemas/devops-stage-environment-delete.json +25 -0
  168. package/schemas/devops-work__item-combine.json +25 -0
  169. package/schemas/devops-work__item-prepare.json +25 -0
  170. package/schemas/{devops-work__item-status-update.json → devops-work__item-update.json} +8 -2
  171. package/lib/commands/devops/pipeline/activate.js.map +0 -1
  172. package/lib/commands/devops/pipeline/attach-project.js.map +0 -1
  173. package/lib/commands/devops/pull-request/create.js.map +0 -1
  174. package/lib/commands/devops/stage/add-branch.js.map +0 -1
  175. package/lib/commands/devops/stage/add-environment.js.map +0 -1
  176. package/lib/commands/devops/work-item/status/update.js.map +0 -1
  177. package/lib/utils/updateWorkItemStatus.js.map +0 -1
  178. package/messages/devops.pipeline.activate.md +0 -29
  179. package/messages/devops.pull-request.create.md +0 -57
  180. package/messages/devops.work-item.status.update.md +0 -29
  181. /package/messages/{devops.pipeline.attach-project.md → devops.pipeline.project.add.md} +0 -0
  182. /package/messages/{devops.stage.add-branch.md → devops.stage.branch.add.md} +0 -0
  183. /package/schemas/{devops-pipeline-attach__project.json → devops-pipeline-project-add.json} +0 -0
  184. /package/schemas/{devops-stage-add__branch.json → devops-stage-branch-add.json} +0 -0
  185. /package/schemas/{devops-stage-add__environment.json → devops-stage-environment-add.json} +0 -0
@@ -0,0 +1,126 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Messages } from '@salesforce/core';
17
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
18
+ import { activatePipeline, updatePipelineRecord } from '../../../utils/activatePipeline.js';
19
+ import { fetchPipelineStages } from '../../../utils/pipelineUtils.js';
20
+ import { validateSalesforceId } from '../../../utils/soqlUtils.js';
21
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
22
+ const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'devops.pipeline.update');
23
+ const commonErrorMessages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonErrors');
24
+ export default class DevopsPipelineUpdate extends SfCommand {
25
+ static summary = messages.getMessage('summary');
26
+ static description = messages.getMessage('description');
27
+ static examples = messages.getMessages('examples');
28
+ static flags = {
29
+ 'target-org': Flags.requiredOrg(),
30
+ 'api-version': Flags.orgApiVersion(),
31
+ 'pipeline-id': Flags.salesforceId({
32
+ summary: messages.getMessage('flags.pipeline-id.summary'),
33
+ required: true,
34
+ char: undefined,
35
+ }),
36
+ active: Flags.boolean({
37
+ summary: messages.getMessage('flags.active.summary'),
38
+ required: false,
39
+ allowNo: true,
40
+ }),
41
+ name: Flags.string({
42
+ summary: messages.getMessage('flags.name.summary'),
43
+ required: false,
44
+ char: 'n',
45
+ }),
46
+ };
47
+ static async getPipelineState(connection, pipelineId) {
48
+ validateSalesforceId(pipelineId, 'pipeline');
49
+ const result = await connection.query(`SELECT IsActive, Name FROM DevopsPipeline WHERE Id = '${pipelineId}' LIMIT 1`);
50
+ const record = result.records[0];
51
+ if (!record) {
52
+ throw new Error(`Pipeline ${pipelineId} not found.`);
53
+ }
54
+ return record;
55
+ }
56
+ async run() {
57
+ const { flags } = await this.parse(DevopsPipelineUpdate);
58
+ const org = flags['target-org'];
59
+ const connection = org.getConnection(flags['api-version']);
60
+ const pipelineId = flags['pipeline-id'];
61
+ const activateFlag = flags.active;
62
+ const newName = flags.name;
63
+ if (activateFlag === undefined && newName === undefined) {
64
+ this.error(messages.getMessage('error.NoFlags'));
65
+ }
66
+ let stages = [];
67
+ try {
68
+ stages = await fetchPipelineStages(connection, pipelineId);
69
+ }
70
+ catch (error) {
71
+ const errMsg = error instanceof Error ? error.message : String(error);
72
+ if (errMsg.includes('sObject type') && errMsg.includes('is not supported')) {
73
+ this.error(commonErrorMessages.getMessage('error.DevopsCenterNotEnabled'));
74
+ }
75
+ throw error;
76
+ }
77
+ const pipeline = await DevopsPipelineUpdate.getPipelineState(connection, pipelineId);
78
+ if (activateFlag === true && pipeline.IsActive) {
79
+ this.error(messages.getMessage('error.AlreadyActive', [pipelineId]));
80
+ }
81
+ if (activateFlag === false && !pipeline.IsActive) {
82
+ this.error(messages.getMessage('error.AlreadyInactive', [pipelineId]));
83
+ }
84
+ if (activateFlag === true && stages.length === 0) {
85
+ this.error(messages.getMessage('error.NoStages', [pipelineId]));
86
+ }
87
+ const result = await this.applyUpdates(connection, pipelineId, activateFlag, newName, stages.length);
88
+ this.log(` Pipeline ID: ${pipelineId}`);
89
+ if (result.name !== undefined)
90
+ this.log(` Name: ${result.name}`);
91
+ if (result.status !== undefined)
92
+ this.log(` Status: ${result.status}`);
93
+ if (activateFlag === true)
94
+ this.log(` Stages: ${result.stageCount ?? stages.length}`);
95
+ return result;
96
+ }
97
+ async applyUpdates(connection, pipelineId, activateFlag, newName, stageCount) {
98
+ const result = { success: true, pipelineId };
99
+ // Activate via Connect API
100
+ if (activateFlag === true) {
101
+ const activateResult = await activatePipeline({ connection, pipelineId });
102
+ result.status = activateResult.status;
103
+ result.stageCount = stageCount;
104
+ this.log('Successfully activated the pipeline.');
105
+ }
106
+ // Deactivate and/or rename via Record API
107
+ const recordFields = {};
108
+ if (activateFlag === false)
109
+ recordFields.IsActive = false;
110
+ if (newName !== undefined)
111
+ recordFields.Name = newName;
112
+ if (Object.keys(recordFields).length > 0) {
113
+ await updatePipelineRecord(connection, pipelineId, recordFields);
114
+ if (activateFlag === false) {
115
+ result.status = 'Inactive';
116
+ this.log('Successfully deactivated the pipeline.');
117
+ }
118
+ if (newName !== undefined) {
119
+ result.name = newName;
120
+ this.log(`Successfully renamed the pipeline to "${newName}".`);
121
+ }
122
+ }
123
+ return result;
124
+ }
125
+ }
126
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/devops/pipeline/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAc,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,C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E,CAAC;gBAC3B,MAAM,CAAC,MAAM,GAAG,UAAU,CAAC;gBAC3B,IAAI,CAAC,GAAG,CAAC,wCAAwC,CAAC,CAAC;YACrD,CAAC;YACD,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;gBAC1B,MAAM,CAAC,IAAI,GAAG,OAAO,CAAC;gBACtB,IAAI,CAAC,GAAG,CAAC,yCAAyC,OAAO,IAAI,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { Org } from '@salesforce/core';
2
+ import { SfCommand } from '@salesforce/sf-plugins-core';
3
+ import { UpdateProjectResult } from '../../../utils/updateProject.js';
4
+ export default class DevopsProjectUpdate extends SfCommand<UpdateProjectResult> {
5
+ static readonly summary: string;
6
+ static readonly description: string;
7
+ static readonly examples: string[];
8
+ static readonly flags: {
9
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<Org, import("@oclif/core/interfaces").CustomOptions>;
10
+ 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'project-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
+ name: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ description: import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
14
+ 'is-active': import("@oclif/core/interfaces").BooleanFlag<boolean>;
15
+ };
16
+ run(): Promise<UpdateProjectResult>;
17
+ }
@@ -0,0 +1,86 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Messages } from '@salesforce/core';
17
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
18
+ import { updateProject } from '../../../utils/updateProject.js';
19
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
20
+ const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'devops.project.update');
21
+ const commonErrorMessages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonErrors');
22
+ export default class DevopsProjectUpdate extends SfCommand {
23
+ static summary = messages.getMessage('summary');
24
+ static description = messages.getMessage('description');
25
+ static examples = messages.getMessages('examples');
26
+ static flags = {
27
+ 'target-org': Flags.requiredOrg(),
28
+ 'api-version': Flags.orgApiVersion(),
29
+ 'project-id': Flags.salesforceId({
30
+ summary: messages.getMessage('flags.project-id.summary'),
31
+ char: 'i',
32
+ required: true,
33
+ }),
34
+ name: Flags.string({
35
+ summary: messages.getMessage('flags.name.summary'),
36
+ char: 'n',
37
+ }),
38
+ description: Flags.string({
39
+ summary: messages.getMessage('flags.description.summary'),
40
+ char: 'd',
41
+ }),
42
+ 'is-active': Flags.boolean({
43
+ summary: messages.getMessage('flags.is-active.summary'),
44
+ allowNo: true,
45
+ }),
46
+ };
47
+ async run() {
48
+ const { flags } = await this.parse(DevopsProjectUpdate);
49
+ if (flags['name'] === undefined && flags['description'] === undefined && flags['is-active'] === undefined) {
50
+ this.error(messages.getMessage('error.NoFieldsProvided'));
51
+ }
52
+ const org = flags['target-org'];
53
+ const connection = org.getConnection(flags['api-version']);
54
+ let result;
55
+ try {
56
+ result = await updateProject({
57
+ connection,
58
+ projectId: flags['project-id'],
59
+ name: flags['name'],
60
+ description: flags['description'],
61
+ isActive: flags['is-active'],
62
+ });
63
+ }
64
+ catch (error) {
65
+ const errMsg = error instanceof Error ? error.message : String(error);
66
+ if (errMsg.includes('sObject type') && errMsg.includes('is not supported')) {
67
+ this.error(commonErrorMessages.getMessage('error.DevopsCenterNotEnabled'));
68
+ }
69
+ throw error;
70
+ }
71
+ if (result.success) {
72
+ this.log(`Successfully updated project: ${flags['project-id']}`);
73
+ if (result.name !== undefined)
74
+ this.log(` Name: ${result.name}`);
75
+ if (result.description !== undefined)
76
+ this.log(` Description: ${result.description}`);
77
+ if (result.isActive !== undefined)
78
+ this.log(` IsActive: ${result.isActive}`);
79
+ }
80
+ else {
81
+ this.error(`Failed to update project: ${result.error ?? ''}`);
82
+ }
83
+ return result;
84
+ }
85
+ }
86
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/devops/project/update.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAO,MAAM,kBAAkB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAuB,MAAM,iCAAiC,CAAC;AAErF,QAAQ,CAAC,kCAAkC,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7D,MAAM,QAAQ,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,uBAAuB,CAAC,CAAC;AACpG,MAAM,mBAAmB,GAAG,QAAQ,CAAC,YAAY,CAAC,kCAAkC,EAAE,cAAc,CAAC,CAAC;AAEtG,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,SAA8B;IACtE,MAAM,CAAU,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IACzD,MAAM,CAAU,WAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC;IACjE,MAAM,CAAU,QAAQ,GAAG,QAAQ,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IAE5D,MAAM,CAAU,KAAK,GAA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IAChB,CAAC"}
@@ -0,0 +1,24 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ export type PromoteResult = {
3
+ requestId: string;
4
+ status: string;
5
+ message: string;
6
+ promotedWorkitemIds: string[];
7
+ };
8
+ export default class DevopsPromote extends SfCommand<PromoteResult> {
9
+ static readonly summary: string;
10
+ static readonly description: string;
11
+ static readonly examples: string[];
12
+ static readonly flags: {
13
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
14
+ 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ 'target-stage-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
16
+ 'work-item-id': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ 'stage-id': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
18
+ 'deploy-all': import("@oclif/core/interfaces").BooleanFlag<boolean>;
19
+ 'test-level': import("@oclif/core/interfaces").OptionFlag<import("../../common/types.js").TestLevel | undefined, import("@oclif/core/interfaces").CustomOptions>;
20
+ tests: import("@oclif/core/interfaces").OptionFlag<string[] | undefined>;
21
+ };
22
+ private static fetchStageWorkItems;
23
+ run(): Promise<PromoteResult>;
24
+ }
@@ -0,0 +1,148 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Messages } from '@salesforce/core';
17
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
18
+ import { promoteStage } from '../../utils/promoteStage.js';
19
+ import { resolveProjectIdFromWorkItem } from '../../utils/prepareWorkItem.js';
20
+ import { getPipelineIdForProject } from '../../utils/pipelineUtils.js';
21
+ import { deployAll, testLevel as testLevelFlag, specificTestsNoChar } from '../../common/flags/promote/promoteFlags.js';
22
+ import { validateSalesforceId } from '../../utils/soqlUtils.js';
23
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
24
+ const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'devops.promote');
25
+ const commonErrorMessages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonErrors');
26
+ export default class DevopsPromote extends SfCommand {
27
+ static summary = messages.getMessage('summary');
28
+ static description = messages.getMessage('description');
29
+ static examples = messages.getMessages('examples');
30
+ static flags = {
31
+ 'target-org': Flags.requiredOrg(),
32
+ 'api-version': Flags.orgApiVersion(),
33
+ 'target-stage-id': Flags.salesforceId({
34
+ char: 't',
35
+ summary: messages.getMessage('flags.target-stage-id.summary'),
36
+ required: true,
37
+ startsWith: '1QV',
38
+ }),
39
+ 'work-item-id': Flags.salesforceId({
40
+ char: 'i',
41
+ summary: messages.getMessage('flags.work-item-id.summary'),
42
+ description: messages.getMessage('flags.work-item-id.description'),
43
+ required: false,
44
+ multiple: true,
45
+ startsWith: '1fk',
46
+ exclusive: ['stage-id'],
47
+ }),
48
+ 'stage-id': Flags.salesforceId({
49
+ char: 's',
50
+ summary: messages.getMessage('flags.stage-id.summary'),
51
+ required: false,
52
+ startsWith: '1QV',
53
+ exclusive: ['work-item-id'],
54
+ }),
55
+ 'deploy-all': deployAll,
56
+ 'test-level': testLevelFlag(),
57
+ tests: specificTestsNoChar,
58
+ };
59
+ static async fetchStageWorkItems(connection, pipelineId, sourceStageId, targetStageId) {
60
+ // Validate all IDs before using in SOQL
61
+ validateSalesforceId(pipelineId, 'pipeline');
62
+ validateSalesforceId(sourceStageId, 'source stage');
63
+ validateSalesforceId(targetStageId, 'target stage');
64
+ // Verify the source stage feeds into the target stage
65
+ const stageResult = await connection.query(`SELECT NextStageId FROM DevopsPipelineStage WHERE Id = '${sourceStageId}' AND DevopsPipelineId = '${pipelineId}' LIMIT 1`);
66
+ const nextStageId = stageResult.records[0]?.NextStageId;
67
+ if (!nextStageId) {
68
+ throw new Error(`Stage '${sourceStageId}' not found in the pipeline or has no next stage.`);
69
+ }
70
+ if (nextStageId !== targetStageId) {
71
+ throw new Error(`Stage '${sourceStageId}' does not feed into target stage '${targetStageId}'.`);
72
+ }
73
+ const workItemResult = await connection.query(`SELECT Id FROM WorkItem WHERE DevopsPipelineStageId = '${sourceStageId}' LIMIT 200`);
74
+ return workItemResult.records.map((r) => r.Id);
75
+ }
76
+ async run() {
77
+ const { flags } = await this.parse(DevopsPromote);
78
+ const connection = flags['target-org'].getConnection(flags['api-version']);
79
+ const targetStageId = flags['target-stage-id'];
80
+ const workItemIds = flags['work-item-id'];
81
+ const sourceStageId = flags['stage-id'];
82
+ if (!workItemIds?.length && !sourceStageId) {
83
+ this.error(messages.getMessage('error.NoModeFlag'));
84
+ }
85
+ let pipelineId;
86
+ let resolvedWorkItemIds;
87
+ if (workItemIds?.length) {
88
+ const { projectId } = await resolveProjectIdFromWorkItem(connection, workItemIds[0]);
89
+ const pid = await getPipelineIdForProject(connection, projectId);
90
+ if (!pid) {
91
+ this.error(`No pipeline found for work item "${workItemIds[0]}". Ensure the project has an associated pipeline.`);
92
+ }
93
+ pipelineId = pid;
94
+ resolvedWorkItemIds = workItemIds;
95
+ }
96
+ else {
97
+ // Stage path: resolve pipelineId from the source stage
98
+ const sid = sourceStageId;
99
+ validateSalesforceId(sid, 'source stage');
100
+ const stageQueryResult = await connection.query(`SELECT DevopsPipelineId FROM DevopsPipelineStage WHERE Id = '${sid}' LIMIT 1`);
101
+ const pid = stageQueryResult.records[0]?.DevopsPipelineId;
102
+ if (!pid) {
103
+ this.error(`Stage '${sid}' not found or has no associated pipeline.`);
104
+ }
105
+ pipelineId = pid;
106
+ resolvedWorkItemIds = await DevopsPromote.fetchStageWorkItems(connection, pipelineId, sid, targetStageId);
107
+ if (resolvedWorkItemIds.length === 0) {
108
+ this.error(messages.getMessage('error.NoWorkItems'));
109
+ }
110
+ }
111
+ let apiResult;
112
+ try {
113
+ apiResult = await promoteStage({
114
+ connection,
115
+ pipelineId,
116
+ workItemIds: resolvedWorkItemIds,
117
+ targetStageId,
118
+ fullDeploy: flags['deploy-all'],
119
+ testLevel: flags['test-level'],
120
+ runTests: flags.tests,
121
+ });
122
+ }
123
+ catch (error) {
124
+ const errMsg = error instanceof Error ? error.message : String(error);
125
+ if (errMsg.includes('sObject type') && errMsg.includes('is not supported')) {
126
+ this.error(commonErrorMessages.getMessage('error.DevopsCenterNotEnabled'));
127
+ }
128
+ const cleanMsg = errMsg.split('<')[0].trim();
129
+ this.error(messages.getMessage('error.PromoteFailed', [cleanMsg]));
130
+ }
131
+ this.log(`Status: ${apiResult.status}`);
132
+ this.log(`Message: ${apiResult.message}`);
133
+ this.log(`Request ID: ${apiResult.requestId}`);
134
+ this.log('');
135
+ this.log('Promoted Work Items');
136
+ this.log('───────────────────');
137
+ for (const id of apiResult.promotedWorkitemIds) {
138
+ this.log(id);
139
+ }
140
+ return {
141
+ requestId: apiResult.requestId,
142
+ status: apiResult.status,
143
+ message: apiResult.message,
144
+ promotedWorkitemIds: apiResult.promotedWorkitemIds,
145
+ };
146
+ }
147
+ }
148
+ //# sourceMappingURL=promote.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promote.js","sourceRoot":"","sources":["../../../src/commands/devops/promote.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAc,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,YAAY,EAAsB,MAAM,6BA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CAAC,8BAA8B,CAAC,CAAC,CAAC;YAC7E,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAC7C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACrE,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,WAAW,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;QACxC,IAAI,CAAC,GAAG,CAAC,YAAY,SAAS,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,GAAG,CAAC,eAAe,SAAS,CAAC,SAAS,EAAE,CAAC,CAAC;QAC/C,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACb,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QAChC,IAAI,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;QAChC,KAAK,MAAM,EAAE,IAAI,SAAS,CAAC,mBAAmB,EAAE,CAAC;YAC/C,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACf,CAAC;QAED,OAAO;YACL,SAAS,EAAE,SAAS,CAAC,SAAS;YAC9B,MAAM,EAAE,SAAS,CAAC,MAAM;YACxB,OAAO,EAAE,SAAS,CAAC,OAAO;YAC1B,mBAAmB,EAAE,SAAS,CAAC,mBAAmB;SACnD,CAAC;IACJ,CAAC"}
@@ -0,0 +1,20 @@
1
+ import { SfCommand } from '@salesforce/sf-plugins-core';
2
+ import { DeployStageResult } from '../../../utils/deployStage.js';
3
+ export type PromotionCompleteResult = DeployStageResult & {
4
+ undeployedWorkitemIds: string[];
5
+ };
6
+ export default class DevopsPromotionComplete extends SfCommand<PromotionCompleteResult> {
7
+ static readonly summary: string;
8
+ static readonly description: string;
9
+ static readonly examples: string[];
10
+ static readonly flags: {
11
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<import("@salesforce/core").Org, import("@oclif/core/interfaces").CustomOptions>;
12
+ 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
13
+ 'target-stage-id': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
14
+ 'work-item-id': import("@oclif/core/interfaces").OptionFlag<string[] | undefined, import("@oclif/core/interfaces").CustomOptions>;
15
+ 'deploy-all': import("@oclif/core/interfaces").BooleanFlag<boolean>;
16
+ 'test-level': import("@oclif/core/interfaces").OptionFlag<import("../../../common/types.js").TestLevel | undefined, import("@oclif/core/interfaces").CustomOptions>;
17
+ tests: import("@oclif/core/interfaces").OptionFlag<string[] | undefined>;
18
+ };
19
+ run(): Promise<PromotionCompleteResult>;
20
+ }
@@ -0,0 +1,112 @@
1
+ /*
2
+ * Copyright 2026, Salesforce, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Messages } from '@salesforce/core';
17
+ import { SfCommand, Flags } from '@salesforce/sf-plugins-core';
18
+ import { getUndeployedWorkItems, validateDeploy, executeDeploy, } from '../../../utils/deployStage.js';
19
+ import { deployAll, testLevel, specificTestsNoChar } from '../../../common/flags/promote/promoteFlags.js';
20
+ import { validateSalesforceId } from '../../../utils/soqlUtils.js';
21
+ Messages.importMessagesDirectoryFromMetaUrl(import.meta.url);
22
+ const messages = Messages.loadMessages('@salesforce/plugin-devops-center', 'devops.promotion.complete');
23
+ const commonErrorMessages = Messages.loadMessages('@salesforce/plugin-devops-center', 'commonErrors');
24
+ export default class DevopsPromotionComplete extends SfCommand {
25
+ static summary = messages.getMessage('summary');
26
+ static description = messages.getMessage('description');
27
+ static examples = messages.getMessages('examples');
28
+ static flags = {
29
+ 'target-org': Flags.requiredOrg(),
30
+ 'api-version': Flags.orgApiVersion(),
31
+ 'target-stage-id': Flags.salesforceId({
32
+ char: 't',
33
+ summary: messages.getMessage('flags.target-stage-id.summary'),
34
+ required: true,
35
+ startsWith: '1QV',
36
+ }),
37
+ 'work-item-id': Flags.salesforceId({
38
+ char: 'i',
39
+ summary: messages.getMessage('flags.work-item-id.summary'),
40
+ required: false,
41
+ multiple: true,
42
+ startsWith: '1fk',
43
+ }),
44
+ 'deploy-all': deployAll,
45
+ 'test-level': testLevel(),
46
+ tests: specificTestsNoChar,
47
+ };
48
+ async run() {
49
+ const { flags } = await this.parse(DevopsPromotionComplete);
50
+ const connection = flags['target-org'].getConnection(flags['api-version']);
51
+ const targetStageId = flags['target-stage-id'];
52
+ const workItemIds = flags['work-item-id'];
53
+ let pipelineId;
54
+ try {
55
+ validateSalesforceId(targetStageId, 'target stage');
56
+ const stageResult = await connection.query(`SELECT DevopsPipelineId FROM DevopsPipelineStage WHERE Id = '${targetStageId}' LIMIT 1`);
57
+ const id = stageResult.records[0]?.DevopsPipelineId;
58
+ if (!id) {
59
+ this.error(messages.getMessage('error.StageNotFound', [targetStageId]));
60
+ }
61
+ pipelineId = id;
62
+ }
63
+ catch (error) {
64
+ const errMsg = error instanceof Error ? error.message : String(error);
65
+ if (errMsg.includes('sObject type') && errMsg.includes('is not supported')) {
66
+ this.error(commonErrorMessages.getMessage('error.DevopsCenterNotEnabled'));
67
+ }
68
+ throw error;
69
+ }
70
+ // When --work-item-id is provided, skip discovery and target those IDs directly.
71
+ // When omitted, discover all undeployed work items for the stage.
72
+ let resolvedWorkItemIds;
73
+ if (workItemIds?.length) {
74
+ resolvedWorkItemIds = workItemIds;
75
+ }
76
+ else {
77
+ const { undeployedWorkitemIds } = await getUndeployedWorkItems(connection, pipelineId, targetStageId);
78
+ if (undeployedWorkitemIds.length === 0) {
79
+ this.log(messages.getMessage('info.NothingToDeploy'));
80
+ return {
81
+ requestId: '',
82
+ status: 'NoOp',
83
+ message: 'No undeployed work items found for this stage.',
84
+ promotedWorkitemIds: [],
85
+ undeployedWorkitemIds: [],
86
+ };
87
+ }
88
+ resolvedWorkItemIds = undeployedWorkitemIds;
89
+ }
90
+ const validation = await validateDeploy(connection, pipelineId, resolvedWorkItemIds, targetStageId);
91
+ if (!validation.success) {
92
+ this.error(messages.getMessage('error.ValidationFailed', [validation.errorType ?? '', validation.errorDetails ?? '']));
93
+ }
94
+ let result;
95
+ try {
96
+ result = await executeDeploy(connection, pipelineId, targetStageId, flags['deploy-all'], flags['test-level'], flags.tests, workItemIds?.length ? resolvedWorkItemIds : undefined);
97
+ }
98
+ catch (error) {
99
+ const errMsg = error instanceof Error ? error.message : String(error);
100
+ if (errMsg.includes('sObject type') && errMsg.includes('is not supported')) {
101
+ this.error(commonErrorMessages.getMessage('error.DevopsCenterNotEnabled'));
102
+ }
103
+ const cleanMsg = errMsg.split('<')[0].trim();
104
+ this.error(messages.getMessage('error.DeployFailed', [cleanMsg]));
105
+ }
106
+ this.log(`Status: ${result.status}`);
107
+ this.log(`Message: ${result.message}`);
108
+ this.log(`Request ID: ${result.requestId}`);
109
+ return { ...result, undeployedWorkitemIds: resolvedWorkItemIds };
110
+ }
111
+ }
112
+ //# sourceMappingURL=complete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"complete.js","sourceRoot":"","sources":["../../../../src/commands/devops/promotion/complete.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,aAAa,GAEd,MAAM,+BAA+B,CAAC;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M,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YACtE,IAAI,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,CAAC;gBAC3E,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC,CAAC;YAC7E,CAAC;YACD,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;YAC7C,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;QACpE,CAAC;QAED,IAAI,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;QACzC,IAAI,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;QAC1C,IAAI,CAAC,GAAG,CAAC,eAAe,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;QAE5C,OAAO,EAAE,GAAG,MAAM,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC;IACnE,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { Org } from '@salesforce/core';
2
+ import { SfCommand } from '@salesforce/sf-plugins-core';
3
+ import { RequestStatusResult } from '../../../utils/getRequestStatus.js';
4
+ export default class DevopsRequestStatus extends SfCommand<RequestStatusResult> {
5
+ static readonly summary: string;
6
+ static readonly description: string;
7
+ static readonly examples: string[];
8
+ static readonly flags: {
9
+ 'target-org': import("@oclif/core/interfaces").OptionFlag<Org, import("@oclif/core/interfaces").CustomOptions>;
10
+ 'api-version': import("@oclif/core/interfaces").OptionFlag<string | undefined, import("@oclif/core/interfaces").CustomOptions>;
11
+ 'request-token': import("@oclif/core/interfaces").OptionFlag<string, import("@oclif/core/interfaces").CustomOptions>;
12
+ };
13
+ run(): Promise<RequestStatusResult>;
14
+ }