@salesforce/analytics 1.1.0 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commands/analytics/autoinstall/app/cancel.d.ts +12 -0
- package/lib/commands/analytics/autoinstall/app/cancel.js +38 -0
- package/lib/commands/analytics/autoinstall/app/cancel.js.map +1 -0
- package/lib/commands/analytics/dataflow/job/display.d.ts +12 -0
- package/lib/commands/analytics/dataflow/job/display.js +55 -0
- package/lib/commands/analytics/dataflow/job/display.js.map +1 -0
- package/lib/commands/analytics/dataflow/job/list.d.ts +21 -0
- package/lib/commands/analytics/dataflow/job/list.js +50 -0
- package/lib/commands/analytics/dataflow/job/list.js.map +1 -0
- package/lib/commands/analytics/dataflow/job/stop.d.ts +12 -0
- package/lib/commands/analytics/dataflow/job/stop.js +41 -0
- package/lib/commands/analytics/dataflow/job/stop.js.map +1 -0
- package/lib/commands/analytics/dataflow/start.d.ts +12 -0
- package/lib/commands/analytics/dataflow/start.js +41 -0
- package/lib/commands/analytics/dataflow/start.js.map +1 -0
- package/lib/commands/analytics/dataflow/update.d.ts +14 -0
- package/lib/commands/analytics/dataflow/update.js +70 -0
- package/lib/commands/analytics/dataflow/update.js.map +1 -0
- package/lib/commands/analytics/recipe/list.d.ts +1 -1
- package/lib/commands/analytics/recipe/start.d.ts +12 -0
- package/lib/commands/analytics/recipe/start.js +41 -0
- package/lib/commands/analytics/recipe/start.js.map +1 -0
- package/lib/lib/analytics/autoinstall/autoinstall.d.ts +1 -0
- package/lib/lib/analytics/autoinstall/autoinstall.js +17 -0
- package/lib/lib/analytics/autoinstall/autoinstall.js.map +1 -1
- package/lib/lib/analytics/dataflow/dataflow.d.ts +40 -1
- package/lib/lib/analytics/dataflow/dataflow.js +63 -0
- package/lib/lib/analytics/dataflow/dataflow.js.map +1 -1
- package/lib/lib/analytics/recipe/recipe.d.ts +45 -3
- package/lib/lib/analytics/recipe/recipe.js +26 -0
- package/lib/lib/analytics/recipe/recipe.js.map +1 -1
- package/messages/autoinstall.json +4 -1
- package/messages/dataflow.json +26 -1
- package/messages/recipe.json +7 -1
- package/oclif.manifest.json +1 -1
- package/package.json +11 -8
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
export default class Cancel extends SfdxCommand {
|
|
3
|
+
static description: string;
|
|
4
|
+
static longDescription: string;
|
|
5
|
+
static examples: string[];
|
|
6
|
+
protected static flagsConfig: {
|
|
7
|
+
autoinstallid: flags.Discriminated<flags.String>;
|
|
8
|
+
};
|
|
9
|
+
protected static requiresUsername: boolean;
|
|
10
|
+
protected static requiresProject: boolean;
|
|
11
|
+
run(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
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) 2021, 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 command_1 = require("@salesforce/command");
|
|
13
|
+
const core_1 = require("@salesforce/core");
|
|
14
|
+
const autoinstall_1 = __importDefault(require("../../../../lib/analytics/autoinstall/autoinstall"));
|
|
15
|
+
core_1.Messages.importMessagesDirectory(__dirname);
|
|
16
|
+
const messages = core_1.Messages.loadMessages('@salesforce/analytics', 'autoinstall');
|
|
17
|
+
class Cancel extends command_1.SfdxCommand {
|
|
18
|
+
async run() {
|
|
19
|
+
const autoinstall = new autoinstall_1.default(this.org);
|
|
20
|
+
await autoinstall.cancel(this.flags.autoinstallid);
|
|
21
|
+
this.ux.log(messages.getMessage('appAutoInstallCancelRequestSuccess', [this.flags.autoinstallid]));
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = Cancel;
|
|
25
|
+
Cancel.description = messages.getMessage('cancelAutoinstallCommandDescription');
|
|
26
|
+
Cancel.longDescription = messages.getMessage('cancelAutoinstallCommandLongDescription');
|
|
27
|
+
Cancel.examples = ['$ sfdx analytics:autoinstall:app:cancel -i id'];
|
|
28
|
+
Cancel.flagsConfig = {
|
|
29
|
+
autoinstallid: command_1.flags.id({
|
|
30
|
+
char: 'i',
|
|
31
|
+
required: true,
|
|
32
|
+
description: messages.getMessage('autoinstallidFlagDescription'),
|
|
33
|
+
longDescription: messages.getMessage('autoinstallidFlagLongDescription')
|
|
34
|
+
})
|
|
35
|
+
};
|
|
36
|
+
Cancel.requiresUsername = true;
|
|
37
|
+
Cancel.requiresProject = false;
|
|
38
|
+
//# sourceMappingURL=cancel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel.js","sourceRoot":"","sources":["../../../../../src/commands/analytics/autoinstall/app/cancel.ts"],"names":[],"mappings":";;;;;AAAA;;;;;GAKG;AACH,iDAAyD;AACzD,2CAAiD;AAEjD,oGAA4E;AAE5E,eAAQ,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC;AAC5C,MAAM,QAAQ,GAAG,eAAQ,CAAC,YAAY,CAAC,uBAAuB,EAAE,aAAa,CAAC,CAAC;AAE/E,MAAqB,MAAO,SAAQ,qBAAW;IAkBtC,KAAK,CAAC,GAAG;QACd,MAAM,WAAW,GAAG,IAAI,qBAAW,CAAC,IAAI,CAAC,GAAU,CAAC,CAAC;QACrD,MAAM,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,aAAuB,CAAC,CAAC;QAC7D,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,QAAQ,CAAC,UAAU,CAAC,oCAAoC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;IACrG,CAAC;;AAtBH,yBAuBC;AAtBe,kBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,qCAAqC,CAAC,CAAC;AACzE,sBAAe,GAAG,QAAQ,CAAC,UAAU,CAAC,yCAAyC,CAAC,CAAC;AAEjF,eAAQ,GAAG,CAAC,+CAA+C,CAAC,CAAC;AAE1D,kBAAW,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,uBAAgB,GAAG,IAAI,CAAC;AACxB,sBAAe,GAAG,KAAK,CAAC"}
|
|
@@ -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,EAAE;YACpC,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE;YAC1C,EAAE,GAAG,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE;YAC5C,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE;YACjD,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,CAAC,QAAQ,EAAE;YAChD,EAAE,GAAG,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,CAAC,UAAU,EAAE;YACrD,EAAE,GAAG,EAAE,YAAY,EAAE,KAAK,EAAE,WAAW,CAAC,SAAS,EAAE;SACpD,EACD;YACE,OAAO,EAAE;gBACP,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE;gBAC5B,EAAE,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE;aACjC;SACF,CACF,CAAC;QACF,OAAO,WAAW,CAAC;IACrB,CAAC;;AA1CH,0BA2CC;AA1Ce,mBAAW,GAAG,QAAQ,CAAC,UAAU,CAAC,2BAA2B,CAAC,CAAC;AAC/D,uBAAe,GAAG,QAAQ,CAAC,UAAU,CAAC,+BAA+B,CAAC,CAAC;AAEvE,gBAAQ,GAAG,CAAC,uEAAuE,CAAC,CAAC;AAElF,mBAAW,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,wBAAgB,GAAG,IAAI,CAAC;AACxB,uBAAe,GAAG,KAAK,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { flags, SfdxCommand } from '@salesforce/command';
|
|
2
|
+
export default class List 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
|
+
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,CAA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,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
|
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C;KACtE,CAAC;CACH,CAAC;AAEe,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,MAAO,SAAQ,qBAAW;IA8BtC,KAAK,CAAC,GAAG;QACd,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,UAAoB,CAAC;QACnD,MAAM,QAAQ,GAAG,IAAI,kBAAQ,CAAC,IAAI,CAAC,GAAU,CAAC,CAAC;QAE/C,IAAI,IAAa,CAAC;QAClB,IAAI,IAAI,CAAC,KAAK,CAAC,YAAY,EAAE;YAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;YAC7C,IAAI;gBACF,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,aAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CAAC;aACpD;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,IAAI,gBAAS,CACjB,iBAAiB,IAAI,EAAE,EACvB,SAAS,EACT,SAAS,EACT,SAA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I,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"}
|
|
@@ -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"}
|
|
@@ -58,5 +58,6 @@ export default class AutoInstall {
|
|
|
58
58
|
update(templateApiName: string, folderId: string): Promise<string | undefined>;
|
|
59
59
|
delete(folderId: string): Promise<string | undefined>;
|
|
60
60
|
enable(): Promise<string | undefined>;
|
|
61
|
+
cancel(autoinstallid: string): Promise<string | undefined>;
|
|
61
62
|
private performPost;
|
|
62
63
|
}
|
|
@@ -12,6 +12,7 @@ const enqueuedStatus = 'Enqueued';
|
|
|
12
12
|
const createType = 'WaveAppCreate';
|
|
13
13
|
const updateType = 'WaveAppUpdate';
|
|
14
14
|
const deleteType = 'WaveAppDelete';
|
|
15
|
+
const cancelStatusType = 'Cancelled';
|
|
15
16
|
class AutoInstall {
|
|
16
17
|
constructor(organization) {
|
|
17
18
|
this.connection = organization.getConnection();
|
|
@@ -89,6 +90,22 @@ class AutoInstall {
|
|
|
89
90
|
});
|
|
90
91
|
return this.performPost(body);
|
|
91
92
|
}
|
|
93
|
+
async cancel(autoinstallid) {
|
|
94
|
+
const body = JSON.stringify({
|
|
95
|
+
requestStatus: cancelStatusType
|
|
96
|
+
});
|
|
97
|
+
const response = await (0, request_1.connectRequest)(this.connection, {
|
|
98
|
+
method: 'PATCH',
|
|
99
|
+
url: this.autoInstallUrl + encodeURIComponent(autoinstallid),
|
|
100
|
+
body
|
|
101
|
+
});
|
|
102
|
+
if (response) {
|
|
103
|
+
return response.id;
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
(0, utils_1.throwError)(response);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
92
109
|
async performPost(body) {
|
|
93
110
|
const response = await (0, request_1.connectRequest)(this.connection, {
|
|
94
111
|
method: 'POST',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"autoinstall.js","sourceRoot":"","sources":["../../../../src/lib/analytics/autoinstall/autoinstall.ts"],"names":[],"mappings":";;AAQA,wCAA2D;AAC3D,oCAA+C;AAgD/C,SAAS,iBAAiB,CAAC,CAAyB;;IAClD,MAAM,MAAM,GAAG,MAAA,CAAC,CAAC,aAAa,0CAAE,iBAAiB,EAAE,CAAC;IACpD,OAAO,MAAM,KAAK,WAAW,IAAI,MAAM,KAAK,SAAS,IAAI,M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Q,CAAC,EAAE,CAAC;SACpB;aAAM;YACL,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAC;SACtB;IACH,CAAC;IAEO,KAAK,CAAC,WAAW,CAAC,IAAY;QACpC,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAc,EAAyB,IAAI,CAAC,UAAU,EAAE;YAC7E,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,IAAI,CAAC,cAAc;YACxB,IAAI;SACL,CAAC,CAAC;QACH,IAAI,QAAQ,EAAE;YACZ,OAAO,QAAQ,CAAC,EAAE,CAAC;SACpB;aAAM;YACL,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAC;SACtB;IACH,CAAC;CACF;AA1ID,8BA0IC"}
|
|
@@ -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
|
}
|