@salesforce/analytics 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/lib/commands/analytics/dataflow/job/display.d.ts +12 -0
  2. package/lib/commands/analytics/dataflow/job/display.js +55 -0
  3. package/lib/commands/analytics/dataflow/job/display.js.map +1 -0
  4. package/lib/commands/analytics/dataflow/job/list.d.ts +21 -0
  5. package/lib/commands/analytics/dataflow/job/list.js +50 -0
  6. package/lib/commands/analytics/dataflow/job/list.js.map +1 -0
  7. package/lib/commands/analytics/dataflow/job/stop.d.ts +12 -0
  8. package/lib/commands/analytics/dataflow/job/stop.js +41 -0
  9. package/lib/commands/analytics/dataflow/job/stop.js.map +1 -0
  10. package/lib/commands/analytics/dataflow/start.d.ts +12 -0
  11. package/lib/commands/analytics/dataflow/start.js +41 -0
  12. package/lib/commands/analytics/dataflow/start.js.map +1 -0
  13. package/lib/commands/analytics/dataflow/update.d.ts +14 -0
  14. package/lib/commands/analytics/dataflow/update.js +70 -0
  15. package/lib/commands/analytics/dataflow/update.js.map +1 -0
  16. package/lib/commands/analytics/recipe/list.d.ts +1 -1
  17. package/lib/commands/analytics/recipe/start.d.ts +12 -0
  18. package/lib/commands/analytics/recipe/start.js +41 -0
  19. package/lib/commands/analytics/recipe/start.js.map +1 -0
  20. package/lib/lib/analytics/dataflow/dataflow.d.ts +40 -1
  21. package/lib/lib/analytics/dataflow/dataflow.js +63 -0
  22. package/lib/lib/analytics/dataflow/dataflow.js.map +1 -1
  23. package/lib/lib/analytics/recipe/recipe.d.ts +45 -3
  24. package/lib/lib/analytics/recipe/recipe.js +26 -0
  25. package/lib/lib/analytics/recipe/recipe.js.map +1 -1
  26. package/messages/dataflow.json +26 -1
  27. package/messages/recipe.json +7 -1
  28. package/oclif.manifest.json +1 -1
  29. package/package.json +11 -8
@@ -0,0 +1,12 @@
1
+ import { flags, SfdxCommand } from '@salesforce/command';
2
+ export default class Display extends SfdxCommand {
3
+ static description: string;
4
+ static longDescription: string;
5
+ static examples: string[];
6
+ protected static flagsConfig: {
7
+ dataflowjobid: flags.Discriminated<flags.String>;
8
+ };
9
+ protected static requiresUsername: boolean;
10
+ protected static requiresProject: boolean;
11
+ run(): Promise<import("../../../../lib/analytics/dataflow/dataflow").DataflowJobType>;
12
+ }
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2023, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const command_1 = require("@salesforce/command");
13
+ const core_1 = require("@salesforce/core");
14
+ const chalk_1 = require("chalk");
15
+ const dataflow_1 = __importDefault(require("../../../../lib/analytics/dataflow/dataflow"));
16
+ core_1.Messages.importMessagesDirectory(__dirname);
17
+ const messages = core_1.Messages.loadMessages('@salesforce/analytics', 'dataflow');
18
+ class Display extends command_1.SfdxCommand {
19
+ async run() {
20
+ const dataflowjobId = this.flags.dataflowjobid;
21
+ const dataflow = new dataflow_1.default(this.org);
22
+ const dataflowJob = await dataflow.getDataflowJob(dataflowjobId);
23
+ this.ux.styledHeader((0, chalk_1.blue)(messages.getMessage('displayDetailHeader')));
24
+ this.ux.table([
25
+ { key: 'Id', value: dataflowJob.id },
26
+ { key: 'Label', value: dataflowJob.label },
27
+ { key: 'Status', value: dataflowJob.status },
28
+ { key: 'Wait Time', value: dataflowJob.waitTime },
29
+ { key: 'Progress', value: dataflowJob.progress },
30
+ { key: 'Retry Count', value: dataflowJob.retryCount },
31
+ { key: 'Start Date', value: dataflowJob.startDate }
32
+ ], {
33
+ columns: [
34
+ { key: 'key', label: 'Key' },
35
+ { key: 'value', label: 'Value' }
36
+ ]
37
+ });
38
+ return dataflowJob;
39
+ }
40
+ }
41
+ exports.default = Display;
42
+ Display.description = messages.getMessage('displayCommandDescription');
43
+ Display.longDescription = messages.getMessage('displayCommandLongDescription');
44
+ Display.examples = ['$ sfdx analytics:dataflow:job:display --dataflowjobid <dataflowjobid>'];
45
+ Display.flagsConfig = {
46
+ dataflowjobid: command_1.flags.id({
47
+ char: 'i',
48
+ required: true,
49
+ description: messages.getMessage('dataflowjobIdFlagDescription'),
50
+ longDescription: messages.getMessage('dataflowjobIdFlagLongDescription')
51
+ })
52
+ };
53
+ Display.requiresUsername = true;
54
+ Display.requiresProject = false;
55
+ //# sourceMappingURL=display.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"display.js","sourceRoot":"","sources":["../../../../../src/commands/analytics/dataflow/job/display.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AAEH,iDAAyD;AACzD,2CAAiD;AACjD,iCAA6B;AAC7B,2FAAmE;AAEnE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;AAE5E,MAAqB,OAAQ,SAAQ,qBAAW;IAkBvC,KAAK,CAAC,GAAG;QACd,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,aAAuB,CAAC;QACzD,MAAM,QAAQ,GAAG,IAAI,kBAAQ,CAAC,IAAI,CAAC,GAAU,CAAC,CAAC;QAE/C,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;QACjE,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,IAAA,YAAI,EAAC,QAAQ,CAAC,UAAU,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC;QACvE,IAAI,CAAC,EAAE,CAAC,KAAK,CACX;YACE,EAAE,GAAG,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,CAAC,EAAE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fdxCommand {
3
+ static description: string;
4
+ static longDescription: string;
5
+ static examples: string[];
6
+ protected static flagsConfig: {
7
+ dataflowid: flags.Discriminated<flags.String>;
8
+ };
9
+ protected static requiresUsername: boolean;
10
+ protected static requiresProject: boolean;
11
+ protected static tableColumnData: string[];
12
+ run(): Promise<{
13
+ id: string | undefined;
14
+ label: string | undefined;
15
+ status: string | undefined;
16
+ waitTime: number | undefined;
17
+ progress: number | undefined;
18
+ retryCount: number | undefined;
19
+ startDate: string | undefined;
20
+ }[]>;
21
+ }
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2023, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const command_1 = require("@salesforce/command");
13
+ const core_1 = require("@salesforce/core");
14
+ const dataflow_1 = __importDefault(require("../../../../lib/analytics/dataflow/dataflow"));
15
+ core_1.Messages.importMessagesDirectory(__dirname);
16
+ const messages = core_1.Messages.loadMessages('@salesforce/analytics', 'dataflow');
17
+ class List extends command_1.SfdxCommand {
18
+ async run() {
19
+ const dataflow = new dataflow_1.default(this.org);
20
+ const dataflowJobs = ((await dataflow.getDataflowJobs(this.flags.dataflowid)) || []).map(job => ({
21
+ id: job.id,
22
+ label: job.label,
23
+ status: job.status,
24
+ waitTime: job.waitTime,
25
+ progress: job.progress,
26
+ retryCount: job.retryCount,
27
+ startDate: job.startDate
28
+ }));
29
+ if (dataflowJobs.length) {
30
+ this.ux.styledHeader(messages.getMessage('dataflowsFound', [dataflowJobs.length]));
31
+ }
32
+ return dataflowJobs;
33
+ }
34
+ }
35
+ exports.default = List;
36
+ List.description = messages.getMessage('listJobsCommandDescription');
37
+ List.longDescription = messages.getMessage('listJobsCommandLongDescription');
38
+ List.examples = ['$ sfdx analytics:dataflow:job:list --dataflowid <dataflowid>'];
39
+ List.flagsConfig = {
40
+ dataflowid: command_1.flags.id({
41
+ char: 'i',
42
+ required: true,
43
+ description: messages.getMessage('dataflowidFlagDescription'),
44
+ longDescription: messages.getMessage('dataflowidFlagLongDescription')
45
+ })
46
+ };
47
+ List.requiresUsername = true;
48
+ List.requiresProject = false;
49
+ List.tableColumnData = ['id', 'label', 'status', 'waitTime', 'progress', 'retryCount', 'startDate'];
50
+ //# sourceMappingURL=list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"list.js","sourceRoot":"","sources":["../../../../../src/commands/analytics/dataflow/job/list.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AAEH,iDAAyD;AACzD,2CAAiD;AACjD,2FAAmE;AAEnE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;AAE5E,MAAqB,IAAK,SAAQ,qBAAW;IAoBpC,KAAK,CAAC,GAAG;QACd,MAAM,QAAQ,GAAG,IAAI,kBAAQ,CAAC,IAAI,CAAC,GAAU,CAAC,CAAC;QAC/C,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,UAAoB,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;YACzG,EAAE,EAAE,GAAG,CAAC,EAAE;YACV,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,QAAQ,EAAE,GAAG,CAAC,QAAQ;YACtB,UAAU,EAAE,GAAG,CAAC,UAAU;YAC1B,SAAS,EAAE,GAAG,CAAC,SAAS;SACzB,CAAC,CAAC,CAAC;QACJ,IAAI,YAAY,CAAC,MAAM,EAAE;YACvB,IAAI,CAAC,EAAE,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,gBAAgB,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;SACpF;QACD,OAAO,YAAY,CAAC;IACtB,CAAC;;AAnCH,uBAoCC;AAnCe,gBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAChE,oBAAe,GAAG,QAAQ,CAAC,UAAU,CAAC,gCAAgC,CAAC,CAAC;AAExE,aAAQ,GAAG,CAAC,8DAA8D,CAAC,CAAC;AAEzE,gBAAW,GAAG;IAC7B,UAAU,EAAE,eAAK,CAAC,EAAE,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;QAC7D,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;KACtE,CAAC;CACH,CAAC;AAEe,qBAAgB,GAAG,IAAI,CAAC;AACxB,oBAAe,GAAG,KAAK,CAAC;AAExB,oBAAe,GAAG,CAAC,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { flags, SfdxCommand } from '@salesforce/command';
2
+ export default class Stop extends SfdxCommand {
3
+ static description: string;
4
+ static longDescription: string;
5
+ static examples: string[];
6
+ protected static flagsConfig: {
7
+ dataflowjobid: flags.Discriminated<flags.String>;
8
+ };
9
+ protected static requiresUsername: boolean;
10
+ protected static requiresProject: boolean;
11
+ run(): Promise<import("../../../../lib/analytics/dataflow/dataflow").DataflowJobType>;
12
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2023, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const command_1 = require("@salesforce/command");
13
+ const core_1 = require("@salesforce/core");
14
+ const dataflow_1 = __importDefault(require("../../../../lib/analytics/dataflow/dataflow"));
15
+ core_1.Messages.importMessagesDirectory(__dirname);
16
+ const messages = core_1.Messages.loadMessages('@salesforce/analytics', 'dataflow');
17
+ class Stop extends command_1.SfdxCommand {
18
+ async run() {
19
+ const dataflowjobId = this.flags.dataflowjobid;
20
+ const dataflow = new dataflow_1.default(this.org);
21
+ const dataflowJob = await dataflow.stopDataflowJob(dataflowjobId);
22
+ const message = messages.getMessage('dataflowJobUpdate', [dataflowjobId, dataflowJob.status]);
23
+ this.ux.log(message);
24
+ return dataflowJob;
25
+ }
26
+ }
27
+ exports.default = Stop;
28
+ Stop.description = messages.getMessage('stopCommandDescription');
29
+ Stop.longDescription = messages.getMessage('stopCommandLongDescription');
30
+ Stop.examples = ['$ sfdx analytics:dataflow:job:stop --dataflowjobid <dataflowjobid>'];
31
+ Stop.flagsConfig = {
32
+ dataflowjobid: command_1.flags.id({
33
+ char: 'i',
34
+ required: true,
35
+ description: messages.getMessage('dataflowjobIdFlagDescription'),
36
+ longDescription: messages.getMessage('dataflowjobIdFlagLongDescription')
37
+ })
38
+ };
39
+ Stop.requiresUsername = true;
40
+ Stop.requiresProject = false;
41
+ //# sourceMappingURL=stop.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stop.js","sourceRoot":"","sources":["../../../../../src/commands/analytics/dataflow/job/stop.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AAEH,iDAAyD;AACzD,2CAAiD;AAEjD,2FAAmE;AAEnE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;AAE5E,MAAqB,IAAK,SAAQ,qBAAW;IAkBpC,KAAK,CAAC,GAAG;QACd,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,aAAuB,CAAC;QACzD,MAAM,QAAQ,GAAG,IAAI,kBAAQ,CAAC,IAAI,CAAC,GAAU,CAAC,CAAC;QAE/C,MAAM,WAAW,GAAG,MAAM,QAAQ,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC;QAClE,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC,aAAa,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;QAC9F,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO,WAAW,CAAC;IACrB,CAAC;;AA1BH,uBA2BC;AA1Be,gBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,wBAAwB,CAAC,CAAC;AAC5D,oBAAe,GAAG,QAAQ,CAAC,UAAU,CAAC,4BAA4B,CAAC,CAAC;AAEpE,aAAQ,GAAG,CAAC,oEAAoE,CAAC,CAAC;AAE/E,gBAAW,GAAG;IAC7B,aAAa,EAAE,eAAK,CAAC,EAAE,CAAC;QACtB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC;QAChE,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,kCAAkC,CAAC;KACzE,CAAC;CACH,CAAC;AAEe,qBAAgB,GAAG,IAAI,CAAC;AACxB,oBAAe,GAAG,KAAK,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { flags, SfdxCommand } from '@salesforce/command';
2
+ export default class Start extends SfdxCommand {
3
+ static description: string;
4
+ static longDescription: string;
5
+ static examples: string[];
6
+ protected static flagsConfig: {
7
+ dataflowid: flags.Discriminated<flags.String>;
8
+ };
9
+ protected static requiresUsername: boolean;
10
+ protected static requiresProject: boolean;
11
+ run(): Promise<import("../../../lib/analytics/dataflow/dataflow").DataflowJobType>;
12
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2023, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const command_1 = require("@salesforce/command");
13
+ const core_1 = require("@salesforce/core");
14
+ const dataflow_1 = __importDefault(require("../../../lib/analytics/dataflow/dataflow"));
15
+ core_1.Messages.importMessagesDirectory(__dirname);
16
+ const messages = core_1.Messages.loadMessages('@salesforce/analytics', 'dataflow');
17
+ class Start extends command_1.SfdxCommand {
18
+ async run() {
19
+ const dataflowId = this.flags.dataflowid;
20
+ const dataflow = new dataflow_1.default(this.org);
21
+ const dataflowJob = await dataflow.startDataflow(dataflowId);
22
+ const message = messages.getMessage('dataflowJobUpdate', [dataflowJob.id, dataflowJob.status]);
23
+ this.ux.log(message);
24
+ return dataflowJob;
25
+ }
26
+ }
27
+ exports.default = Start;
28
+ Start.description = messages.getMessage('startCommandDescription');
29
+ Start.longDescription = messages.getMessage('startCommandLongDescription');
30
+ Start.examples = ['$ sfdx analytics:dataflow:start --dataflowid <dataflowid>'];
31
+ Start.flagsConfig = {
32
+ dataflowid: command_1.flags.id({
33
+ char: 'i',
34
+ required: true,
35
+ description: messages.getMessage('dataflowidFlagDescription'),
36
+ longDescription: messages.getMessage('dataflowidFlagLongDescription')
37
+ })
38
+ };
39
+ Start.requiresUsername = true;
40
+ Start.requiresProject = false;
41
+ //# sourceMappingURL=start.js.map
@@ -0,0 +1 @@
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e,sBAAgB,GAAG,IAAI,CAAC;AACxB,qBAAe,GAAG,KAAK,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { flags, SfdxCommand } from '@salesforce/command';
2
+ export default class Update extends SfdxCommand {
3
+ static description: string;
4
+ static longDescription: string;
5
+ static examples: string[];
6
+ protected static flagsConfig: {
7
+ dataflowid: flags.Discriminated<flags.String>;
8
+ dataflowfile: flags.Discriminated<flags.String>;
9
+ dataflowstr: flags.Discriminated<flags.String>;
10
+ };
11
+ protected static requiresUsername: boolean;
12
+ protected static requiresProject: boolean;
13
+ run(): Promise<import("../../../lib/analytics/dataflow/dataflow").DataflowType>;
14
+ }
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ /*
7
+ * Copyright (c) 2023, salesforce.com, inc.
8
+ * All rights reserved.
9
+ * Licensed under the BSD 3-Clause license.
10
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
11
+ */
12
+ const fs_1 = require("fs");
13
+ const command_1 = require("@salesforce/command");
14
+ const core_1 = require("@salesforce/core");
15
+ const dataflow_1 = __importDefault(require("../../../lib/analytics/dataflow/dataflow"));
16
+ core_1.Messages.importMessagesDirectory(__dirname);
17
+ const messages = core_1.Messages.loadMessages('@salesforce/analytics', 'dataflow');
18
+ class Update extends command_1.SfdxCommand {
19
+ async run() {
20
+ const dataflowId = this.flags.dataflowid;
21
+ const dataflow = new dataflow_1.default(this.org);
22
+ let json;
23
+ if (this.flags.dataflowfile) {
24
+ const path = String(this.flags.dataflowfile);
25
+ try {
26
+ json = JSON.parse(await fs_1.promises.readFile(path, 'utf8'));
27
+ }
28
+ catch (e) {
29
+ throw new core_1.SfdxError(`Error parsing ${path}`, undefined, undefined, undefined, e instanceof Error ? e : new Error(e ? String(e) : '<unknown>'));
30
+ }
31
+ }
32
+ else if (this.flags.dataflowstr) {
33
+ json = JSON.parse(String(this.flags.dataflowstr));
34
+ }
35
+ else {
36
+ throw new core_1.SfdxError(messages.getMessage('missingRequiredField'));
37
+ }
38
+ const dataflowResponse = await dataflow.updateDataflow(dataflowId, json);
39
+ const message = messages.getMessage('updateDataflow', [dataflowResponse.name, dataflowId]);
40
+ this.ux.log(message);
41
+ return dataflowResponse;
42
+ }
43
+ }
44
+ exports.default = Update;
45
+ Update.description = messages.getMessage('updateCommandDescription');
46
+ Update.longDescription = messages.getMessage('updateCommandLongDescription');
47
+ Update.examples = [
48
+ '$ sfdx analytics:dataflow:update --dataflowid <dataflowid> --dataflowfile dataflow-file.json'
49
+ ];
50
+ Update.flagsConfig = {
51
+ dataflowid: command_1.flags.id({
52
+ char: 'i',
53
+ required: true,
54
+ description: messages.getMessage('dataflowidFlagDescription'),
55
+ longDescription: messages.getMessage('dataflowidFlagLongDescription')
56
+ }),
57
+ dataflowfile: command_1.flags.filepath({
58
+ char: 'f',
59
+ description: messages.getMessage('dataflowFileFlagDescription'),
60
+ longDescription: messages.getMessage('dataflowFileFlagLongDescription')
61
+ }),
62
+ dataflowstr: command_1.flags.string({
63
+ char: 's',
64
+ description: messages.getMessage('dataflowJsonFlagDescription'),
65
+ longDescription: messages.getMessage('dataflowJsonFlagLongDescription')
66
+ })
67
+ };
68
+ Update.requiresUsername = true;
69
+ Update.requiresProject = false;
70
+ //# sourceMappingURL=update.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update.js","sourceRoot":"","sources":["../../../../src/commands/analytics/dataflow/update.ts"],"names":[],"mappings":";;;;;AAAA;;;;;GAKG;AACH,2BAAoC;AACpC,iDAAyD;AACzD,2CAA4D;AAC5D,wFAAgE;AAEhE,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,UAAU,CAAC,CAAC;AAE5E,MAAqB,MAA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AE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO,gBAAgB,CAAC;IAC1B,CAAC;;AAzDH,yBA0DC;AAzDe,kBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,0BAA0B,CAAC,CAAC;AAC9D,sBAAe,GAAG,QAAQ,CAAC,UAAU,CAAC,8BAA8B,CAAC,CAAC;AAEtE,eAAQ,GAAG;IACvB,8FAA8F;CAC/F,CAAC;AAEe,kBAAW,GAAG;IAC7B,UAAU,EAAE,eAAK,CAAC,EAAE,CAAC;QACnB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC;QAC7D,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC;KACtE,CAAC;IACF,YAAY,EAAE,eAAK,CAAC,QAAQ,CAAC;QAC3B,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC;QAC/D,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,iCAAiC,CAAC;KACxE,CAAC;IACF,WAAW,EAAE,eAAK,CAAC,MAAM,CAAC;QACxB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC;QAC/D,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,iCAAiC,CAAC;KACxE,CAAC;CACH,CAAC;AAEe,uBAAgB,GAAG,IAAI,CAAC;AACxB,sBAAe,GAAG,KAAK,CAAC"}
@@ -10,7 +10,7 @@ export default class List extends SfdxCommand {
10
10
  run(): Promise<{
11
11
  recipeid: string | undefined;
12
12
  name: string | undefined;
13
- namespace: string | undefined;
13
+ namespace: unknown;
14
14
  label: string | undefined;
15
15
  status: string | undefined;
16
16
  }[]>;
@@ -0,0 +1,12 @@
1
+ import { flags, SfdxCommand } from '@salesforce/command';
2
+ export default class Start extends SfdxCommand {
3
+ static description: string;
4
+ static longDescription: string;
5
+ static examples: string[];
6
+ protected static flagsConfig: {
7
+ recipeid: flags.Discriminated<flags.String>;
8
+ };
9
+ protected static requiresUsername: boolean;
10
+ protected static requiresProject: boolean;
11
+ run(): Promise<import("../../../lib/analytics/recipe/recipe").RecipeType | undefined>;
12
+ }
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ /*
3
+ * Copyright (c) 2023, salesforce.com, inc.
4
+ * All rights reserved.
5
+ * Licensed under the BSD 3-Clause license.
6
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
7
+ */
8
+ var __importDefault = (this && this.__importDefault) || function (mod) {
9
+ return (mod && mod.__esModule) ? mod : { "default": mod };
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const command_1 = require("@salesforce/command");
13
+ const core_1 = require("@salesforce/core");
14
+ const recipe_1 = __importDefault(require("../../../lib/analytics/recipe/recipe"));
15
+ core_1.Messages.importMessagesDirectory(__dirname);
16
+ const messages = core_1.Messages.loadMessages('@salesforce/analytics', 'recipe');
17
+ class Start extends command_1.SfdxCommand {
18
+ async run() {
19
+ const recipeId = this.flags.recipeid;
20
+ const recipe = new recipe_1.default(this.org);
21
+ const recipeJob = await recipe.startRecipe(recipeId);
22
+ const message = messages.getMessage('recipeJobUpdate', [recipeJob === null || recipeJob === void 0 ? void 0 : recipeJob.id, recipeJob === null || recipeJob === void 0 ? void 0 : recipeJob.status]);
23
+ this.ux.log(message);
24
+ return recipeJob;
25
+ }
26
+ }
27
+ exports.default = Start;
28
+ Start.description = messages.getMessage('startCommandDescription');
29
+ Start.longDescription = messages.getMessage('startCommandLongDescription');
30
+ Start.examples = ['$ sfdx analytics:recipe:start --recipeid <recipeid>'];
31
+ Start.flagsConfig = {
32
+ recipeid: command_1.flags.id({
33
+ char: 'i',
34
+ required: true,
35
+ description: messages.getMessage('recipeidFlagDescription'),
36
+ longDescription: messages.getMessage('recipeidFlagLongDescription')
37
+ })
38
+ };
39
+ Start.requiresUsername = true;
40
+ Start.requiresProject = false;
41
+ //# sourceMappingURL=start.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start.js","sourceRoot":"","sources":["../../../../src/commands/analytics/recipe/start.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;AAEH,iDAAyD;AACzD,2CAAiD;AAEjD,kFAA0D;AAE1D,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,QAAQ,CAAC,CAAC;AAE1E,MAAqB,KAAM,SAAQ,qBAAW;IAkBrC,KAAK,CAAC,GAAG;QACd,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,QAAkB,CAAC;QAC/C,MAAM,MAAM,GAAG,IAAI,gBAAM,CAAC,IAAI,CAAC,GAAU,CAAC,CAAC;QAE3C,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACrD,MAAM,OAAO,GAAG,QAAQ,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,EAAE,EAAE,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,MAAM,CAAC,CAAC,CAAC;QAC3F,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACrB,OAAO,SAAS,CAAC;IACnB,CAAC;;AA1BH,wBA2BC;AA1Be,iBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC,CAAC;AAC7D,qBAAe,GAAG,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC,CAAC;AAErE,cAAQ,GAAG,CAAC,qDAAqD,CAAC,CAAC;AAEhE,iBAAW,GAAG;IAC7B,QAAQ,EAAE,eAAK,CAAC,EAAE,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,QAAQ,EAAE,IAAI;QACd,WAAW,EAAE,QAAQ,CAAC,UAAU,CAAC,yBAAyB,CAAC;QAC3D,eAAe,EAAE,QAAQ,CAAC,UAAU,CAAC,6BAA6B,CAAC;KACpE,CAAC;CACH,CAAC;AAEe,sBAAgB,GAAG,IAAI,CAAC;AACxB,qBAAe,GAAG,KAAK,CAAC"}
@@ -4,18 +4,57 @@ export type DataflowHistoryType = {
4
4
  name?: string;
5
5
  label?: string;
6
6
  };
7
- export type DataflowType = {
7
+ export type DataflowType = Record<string, unknown> & {
8
8
  id?: string;
9
9
  namespace?: string;
10
10
  name?: string;
11
11
  label?: string;
12
12
  type?: string;
13
+ createdBy?: Record<string, unknown> & {
14
+ id?: string;
15
+ name?: string;
16
+ profilePhotoUrl?: string;
17
+ };
18
+ createdDate?: string;
19
+ definition?: unknown;
20
+ emailNotificationLevel?: string;
21
+ historiesUrl?: string;
22
+ lastModifiedBy?: Record<string, unknown> & {
23
+ id?: string;
24
+ name?: string;
25
+ profilePhotoUrl?: string;
26
+ };
27
+ lastModifiedDate?: string;
28
+ url?: string;
29
+ };
30
+ export type DataflowJobType = Record<string, unknown> & {
31
+ duration?: number;
32
+ id?: string;
33
+ jobType?: string;
34
+ label?: string;
35
+ nodesUrl?: string;
36
+ progress?: number;
37
+ retryCount?: number;
38
+ createdDate?: string;
39
+ executedDate?: string;
40
+ startDate?: string;
41
+ status?: 'Failure' | 'Queued' | 'Live' | 'Running' | 'Success' | 'Warning' | string;
42
+ syncDataflows?: [];
43
+ type?: string;
44
+ url?: string;
45
+ waitTime?: number;
13
46
  };
14
47
  export default class Dataflow {
15
48
  private readonly connection;
16
49
  private readonly dataflowsUrl;
50
+ private readonly dataflowsJobsUrl;
17
51
  constructor(organization: Org);
18
52
  list(): Promise<DataflowType[]>;
19
53
  getHistories(dataflowId: string): Promise<DataflowHistoryType[]>;
20
54
  revertToHistory(dataflowId: string, historyId: string, historyLabel?: string): Promise<string | undefined>;
55
+ startDataflow(dataflowId: string): Promise<DataflowJobType>;
56
+ stopDataflowJob(dataflowJobId: string): Promise<DataflowJobType>;
57
+ updateDataflow(dataflowId: string, definition: unknown): Promise<DataflowType>;
58
+ getDataflowJob(dataflowJobId: string): Promise<DataflowJobType>;
59
+ getDataflowJobs(dataflowId: string): Promise<DataflowJobType[]>;
21
60
  }
@@ -6,6 +6,7 @@ class Dataflow {
6
6
  constructor(organization) {
7
7
  this.connection = organization.getConnection();
8
8
  this.dataflowsUrl = `${this.connection.baseUrl()}/wave/dataflows/`;
9
+ this.dataflowsJobsUrl = `${this.connection.baseUrl()}/wave/dataflowjobs/`;
9
10
  }
10
11
  list() {
11
12
  return (0, request_1.fetchAllPages)(this.connection, this.dataflowsUrl, 'dataflows');
@@ -33,6 +34,68 @@ class Dataflow {
33
34
  (0, utils_1.throwError)(response);
34
35
  }
35
36
  }
37
+ async startDataflow(dataflowId) {
38
+ const command = 'start';
39
+ const response = await (0, request_1.connectRequest)(this.connection, {
40
+ method: 'POST',
41
+ url: this.dataflowsJobsUrl,
42
+ body: JSON.stringify({
43
+ dataflowId,
44
+ command
45
+ })
46
+ });
47
+ if (response) {
48
+ return response;
49
+ }
50
+ else {
51
+ (0, utils_1.throwError)(response);
52
+ }
53
+ }
54
+ async stopDataflowJob(dataflowJobId) {
55
+ const command = 'stop';
56
+ const response = await (0, request_1.connectRequest)(this.connection, {
57
+ method: 'PATCH',
58
+ url: this.dataflowsJobsUrl + encodeURIComponent(dataflowJobId),
59
+ body: JSON.stringify({
60
+ command
61
+ })
62
+ });
63
+ if (response) {
64
+ return response;
65
+ }
66
+ else {
67
+ (0, utils_1.throwError)(response);
68
+ }
69
+ }
70
+ async updateDataflow(dataflowId, definition) {
71
+ const response = await (0, request_1.connectRequest)(this.connection, {
72
+ method: 'PATCH',
73
+ url: this.dataflowsUrl + encodeURIComponent(dataflowId),
74
+ body: JSON.stringify({ definition })
75
+ });
76
+ if (response) {
77
+ return response;
78
+ }
79
+ else {
80
+ (0, utils_1.throwError)(response);
81
+ }
82
+ }
83
+ async getDataflowJob(dataflowJobId) {
84
+ const response = await (0, request_1.connectRequest)(this.connection, {
85
+ method: 'GET',
86
+ url: this.dataflowsJobsUrl + encodeURIComponent(dataflowJobId)
87
+ });
88
+ if (response) {
89
+ return response;
90
+ }
91
+ else {
92
+ (0, utils_1.throwError)(response);
93
+ }
94
+ }
95
+ async getDataflowJobs(dataflowId) {
96
+ const wtUrl = this.dataflowsJobsUrl + '?dataflowId=' + dataflowId;
97
+ return (0, request_1.fetchAllPages)(this.connection, wtUrl, 'dataflowJobs');
98
+ }
36
99
  }
37
100
  exports.default = Dataflow;
38
101
  //# sourceMappingURL=dataflow.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dataflow.js","sourceRoot":"","sources":["../../../../src/lib/analytics/dataflow/dataflow.ts"],"names":[],"mappings":";;AAOA,wCAA2D;AAC3D,oCAAsC;AAetC,MAAqB,QAAQ;IAI3B,YAAmB,YAAiB;QAClC,IAAI,CAAC,UAAU,GAAG,YAAY,CAAC,aAAa,EAAE,CAAC;QAC/C,IAAI,CAAC,YAAY,GAAG,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,EAAE,kBAAkB,CAAC;IACrE,CAAC;IAEM,IAAI;QACT,OAAO,IAAA,uBAAa,EAAe,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;IACtF,CAAC;IAEM,YAAY,CAAC,UAAkB;QACpC,MAAM,UAAU,GAAG,IAAI,CAAC,YAAY,GAAG,kBAAkB,CAAC,UAAU,CAAC,GAAG,YAAY,CAAC;QACrF,6GAA6G;QAC7G,+GAA+G;QAC/G,OAAO,IAAA,uBAAa,EAAsB,IAAI,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;IACtF,CAAC;IAEM,KAAK,CAAC,eAAe,CAC1B,UAAkB,EAClB,SAAiB,EACjB,YAAqB;QAErB,MAAM,SAAS,GAAG,IAAI,CAAC,YAAY,GAAG,UAAU,CAAC;QACjD,MAAM,Q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,CAAC,CAAC;SACtB;IACH,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,UAAkB,EAAE,UAAmB;QACjE,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAc,EAAe,IAAI,CAAC,UAAU,EAAE;YACnE,MAAM,EAAE,OAAO;YACf,GAAG,EAAE,IAAI,CAAC,YAAY,GAAG,kBAAkB,CAAC,UAAU,CAAC;YACvD,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,UAAU,EAAE,CAAC;SACrC,CAAC,CAAC;QACH,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC;SACjB;aAAM;YACL,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAC;SACtB;IACH,CAAC;IAEM,KAAK,CAAC,cAAc,CAAC,aAAqB;QAC/C,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAc,EAAkB,IAAI,CAAC,UAAU,EAAE;YACtE,MAAM,EAAE,KAAK;YACb,GAAG,EAAE,IAAI,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,aAAa,CAAC;SAC/D,CAAC,CAAC;QACH,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC;SACjB;aAAM;YACL,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAC;SACtB;IACH,CAAC;IAEM,KAAK,CAAC,eAAe,CAAC,UAAkB;QAC7C,MAAM,KAAK,GAAG,IAAI,CAAC,gBAAgB,GAAG,cAAc,GAAG,UAAU,CAAC;QAClE,OAAO,IAAA,uBAAa,EAAkB,IAAI,CAAC,UAAU,EAAE,KAAK,EAAE,cAAc,CAAC,CAAC;IAChF,CAAC;CACF;AA3GD,2BA2GC"}
@@ -1,14 +1,56 @@
1
1
  import { Org } from '@salesforce/core';
2
- export type RecipeType = {
2
+ export type RecipeType = Record<string, unknown> & {
3
+ conversionDetails: [];
4
+ createdBy?: {
5
+ id?: string;
6
+ name?: string;
7
+ profilePhotoUrl?: string;
8
+ };
9
+ createdDate?: string;
10
+ dataflowLastUpdate?: string;
11
+ dataset?: {
12
+ id?: string;
13
+ name?: string;
14
+ url?: string;
15
+ };
16
+ fileUrl?: string;
17
+ format?: string;
18
+ historiesUrl?: string;
3
19
  id?: string;
4
- name?: string;
5
- namespace?: string;
6
20
  label?: string;
21
+ lastModifiedBy?: {
22
+ id?: string;
23
+ name?: string;
24
+ profilePhotoUrl?: string;
25
+ };
26
+ lastModifiedDate?: string;
27
+ licenseAttributes?: {
28
+ type?: string;
29
+ };
30
+ name?: string;
31
+ publishingTarget?: string;
32
+ recipeDefinition?: {
33
+ name?: string;
34
+ nodes?: Record<string, unknown>;
35
+ ui?: Record<string, unknown>;
36
+ version?: string;
37
+ };
38
+ scheduleAttributes?: {
39
+ assetId: string;
40
+ frequency: string;
41
+ };
42
+ sourceRecipe?: string;
7
43
  status?: string;
44
+ targetDataflowId?: string;
45
+ type?: string;
46
+ url?: string;
47
+ validationDetails: [];
8
48
  };
9
49
  export default class Recipe {
10
50
  private readonly connection;
11
51
  private readonly recipesUrl;
52
+ private readonly dataflowsJobsUrl;
12
53
  constructor(organization: Org);
13
54
  list(): Promise<RecipeType[]>;
55
+ startRecipe(recipeId: string): Promise<RecipeType | undefined>;
14
56
  }