@sw-tsdk/common 0.1.1-next.23
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/LICENSE +8 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -0
- package/lib/schemas/asset.d.ts +13 -0
- package/lib/schemas/asset.js +3 -0
- package/lib/schemas/asset.js.map +1 -0
- package/lib/schemas/available-output-type.d.ts +7 -0
- package/lib/schemas/available-output-type.js +12 -0
- package/lib/schemas/available-output-type.js.map +1 -0
- package/lib/schemas/family.d.ts +14 -0
- package/lib/schemas/family.js +19 -0
- package/lib/schemas/family.js.map +1 -0
- package/lib/schemas/index.d.ts +7 -0
- package/lib/schemas/index.js +11 -0
- package/lib/schemas/index.js.map +1 -0
- package/lib/schemas/integration.d.ts +39 -0
- package/lib/schemas/integration.js +50 -0
- package/lib/schemas/integration.js.map +1 -0
- package/lib/schemas/os-support.d.ts +4 -0
- package/lib/schemas/os-support.js +3 -0
- package/lib/schemas/os-support.js.map +1 -0
- package/lib/schemas/package.d.ts +26 -0
- package/lib/schemas/package.js +3 -0
- package/lib/schemas/package.js.map +1 -0
- package/lib/schemas/python-version.d.ts +4 -0
- package/lib/schemas/python-version.js +9 -0
- package/lib/schemas/python-version.js.map +1 -0
- package/lib/templates/CHANGELOG.md.t +7 -0
- package/lib/templates/INTERNAL_CHANGELOG.md.t +7 -0
- package/lib/templates/README.md.t +40 -0
- package/lib/templates/asset.json.t +132 -0
- package/lib/templates/assetConfig.json.t +3 -0
- package/lib/templates/config.json.t +9 -0
- package/lib/templates/conftest.py.t +1 -0
- package/lib/templates/data_asset.json.t +4 -0
- package/lib/templates/dist_requirements.txt.t +3 -0
- package/lib/templates/example.py.t +13 -0
- package/lib/templates/import.json.t +23 -0
- package/lib/templates/init.py.t +17 -0
- package/lib/templates/package.json.t +22 -0
- package/lib/templates/pre-commit-config.yaml.t +41 -0
- package/lib/templates/rest_module_init.t +11 -0
- package/lib/templates/setup.py.t +17 -0
- package/lib/templates/test_connection.py.t +4 -0
- package/lib/templates/test_default.py.t +1 -0
- package/lib/templates/test_requirements.txt.t +1 -0
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.js +5 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/integration.interfaces.d.ts +43 -0
- package/lib/types/integration.interfaces.js +19 -0
- package/lib/types/integration.interfaces.js.map +1 -0
- package/lib/utils/image-processor.d.ts +13 -0
- package/lib/utils/image-processor.js +105 -0
- package/lib/utils/image-processor.js.map +1 -0
- package/lib/utils/index.d.ts +5 -0
- package/lib/utils/index.js +9 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/integration-generator.d.ts +20 -0
- package/lib/utils/integration-generator.js +257 -0
- package/lib/utils/integration-generator.js.map +1 -0
- package/lib/utils/loading-messages.d.ts +3 -0
- package/lib/utils/loading-messages.js +263 -0
- package/lib/utils/loading-messages.js.map +1 -0
- package/lib/utils/task-generator.d.ts +9 -0
- package/lib/utils/task-generator.js +113 -0
- package/lib/utils/task-generator.js.map +1 -0
- package/lib/utils/template-loader.d.ts +4 -0
- package/lib/utils/template-loader.js +16 -0
- package/lib/utils/template-loader.js.map +1 -0
- package/lib/versioning/constants.d.ts +6 -0
- package/lib/versioning/constants.js +15 -0
- package/lib/versioning/constants.js.map +1 -0
- package/lib/versioning/index.d.ts +3 -0
- package/lib/versioning/index.js +7 -0
- package/lib/versioning/index.js.map +1 -0
- package/lib/versioning/presets.d.ts +27 -0
- package/lib/versioning/presets.js +86 -0
- package/lib/versioning/presets.js.map +1 -0
- package/lib/versioning/read-changelog-diff.d.ts +1 -0
- package/lib/versioning/read-changelog-diff.js +31 -0
- package/lib/versioning/read-changelog-diff.js.map +1 -0
- package/lib/versioning/read-existing-changelog.d.ts +1 -0
- package/lib/versioning/read-existing-changelog.js +32 -0
- package/lib/versioning/read-existing-changelog.js.map +1 -0
- package/lib/versioning/recommend-version.d.ts +1 -0
- package/lib/versioning/recommend-version.js +76 -0
- package/lib/versioning/recommend-version.js.map +1 -0
- package/lib/versioning/templates/commit.hbs +9 -0
- package/lib/versioning/templates/footer.hbs +0 -0
- package/lib/versioning/templates/header.hbs +13 -0
- package/lib/versioning/templates/internal-commit.hbs +32 -0
- package/lib/versioning/templates/template.hbs +23 -0
- package/lib/versioning/update-changelog.d.ts +1 -0
- package/lib/versioning/update-changelog.js +85 -0
- package/lib/versioning/update-changelog.js.map +1 -0
- package/package.json +60 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
The ISC License (ISC)
|
|
2
|
+
|
|
3
|
+
Copyright © SWIMLANE 2021
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
|
|
6
|
+
|
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
8
|
+
{"mode":"full","isActive":false}
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./schemas"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./utils"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./versioning"), exports);
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,oDAAyB;AACzB,kDAAuB;AACvB,kDAAuB;AACvB,uDAA4B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { Family } from './family';
|
|
2
|
+
export declare type Asset = {
|
|
3
|
+
actionType?: string;
|
|
4
|
+
base64Image: string;
|
|
5
|
+
description: string;
|
|
6
|
+
family: Family;
|
|
7
|
+
inputParameters: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
name: string;
|
|
11
|
+
testScriptFile?: string;
|
|
12
|
+
version: string;
|
|
13
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"asset.js","sourceRoot":"","sources":["../../src/schemas/asset.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AvailableOutputType = void 0;
|
|
4
|
+
var AvailableOutputType;
|
|
5
|
+
(function (AvailableOutputType) {
|
|
6
|
+
AvailableOutputType["Email"] = "email";
|
|
7
|
+
AvailableOutputType["InsertUpdateRecord"] = "insertUpdateRecord";
|
|
8
|
+
AvailableOutputType["ReferentialTask"] = "referentialTask";
|
|
9
|
+
AvailableOutputType["SaveToFile"] = "saveToFile";
|
|
10
|
+
AvailableOutputType["SetFieldValue"] = "setFieldValue";
|
|
11
|
+
})(AvailableOutputType = exports.AvailableOutputType || (exports.AvailableOutputType = {}));
|
|
12
|
+
//# sourceMappingURL=available-output-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"available-output-type.js","sourceRoot":"","sources":["../../src/schemas/available-output-type.ts"],"names":[],"mappings":";;;AAAA,IAAY,mBAMX;AAND,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,gEAAyC,CAAA;IACzC,0DAAmC,CAAA;IACnC,gDAAyB,CAAA;IACzB,sDAA+B,CAAA;AACnC,CAAC,EANW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAM9B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare enum Family {
|
|
2
|
+
Communication = "Communication",
|
|
3
|
+
DevOpsApplicationSecurity = "DevOps & Application Security",
|
|
4
|
+
EndpointSecurityManagement = "Endpoint Security & Management",
|
|
5
|
+
GovernanceRiskManagement = "Governance & Risk Management",
|
|
6
|
+
IdentityAccessManagement = "Identity & Access Management",
|
|
7
|
+
Infrastructure = "Infrastructure",
|
|
8
|
+
Investigation = "Investigation",
|
|
9
|
+
Miscellaneous = "Miscellaneous",
|
|
10
|
+
NetworkSecurityManagement = "Network Security & Management",
|
|
11
|
+
SIEMLogManagement = "SIEM & Log Management",
|
|
12
|
+
TicketManagement = "Ticket Management",
|
|
13
|
+
VulnerabilityPatchManagement = "Vulnerability & Patch Management"
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Family = void 0;
|
|
4
|
+
var Family;
|
|
5
|
+
(function (Family) {
|
|
6
|
+
Family["Communication"] = "Communication";
|
|
7
|
+
Family["DevOpsApplicationSecurity"] = "DevOps & Application Security";
|
|
8
|
+
Family["EndpointSecurityManagement"] = "Endpoint Security & Management";
|
|
9
|
+
Family["GovernanceRiskManagement"] = "Governance & Risk Management";
|
|
10
|
+
Family["IdentityAccessManagement"] = "Identity & Access Management";
|
|
11
|
+
Family["Infrastructure"] = "Infrastructure";
|
|
12
|
+
Family["Investigation"] = "Investigation";
|
|
13
|
+
Family["Miscellaneous"] = "Miscellaneous";
|
|
14
|
+
Family["NetworkSecurityManagement"] = "Network Security & Management";
|
|
15
|
+
Family["SIEMLogManagement"] = "SIEM & Log Management";
|
|
16
|
+
Family["TicketManagement"] = "Ticket Management";
|
|
17
|
+
Family["VulnerabilityPatchManagement"] = "Vulnerability & Patch Management";
|
|
18
|
+
})(Family = exports.Family || (exports.Family = {}));
|
|
19
|
+
//# sourceMappingURL=family.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"family.js","sourceRoot":"","sources":["../../src/schemas/family.ts"],"names":[],"mappings":";;;AAAA,IAAY,MAaX;AAbD,WAAY,MAAM;IACd,yCAA+B,CAAA;IAC/B,qEAA2D,CAAA;IAC3D,uEAA6D,CAAA;IAC7D,mEAAyD,CAAA;IACzD,mEAAyD,CAAA;IACzD,2CAAiC,CAAA;IACjC,yCAA+B,CAAA;IAC/B,yCAA+B,CAAA;IAC/B,qEAA2D,CAAA;IAC3D,qDAA2C,CAAA;IAC3C,gDAAsC,CAAA;IACtC,2EAAiE,CAAA;AACrE,CAAC,EAbW,MAAM,GAAN,cAAM,KAAN,cAAM,QAajB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./asset"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./available-output-type"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./family"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./integration"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./os-support"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./package"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./python-version"), exports);
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":";;;AAAA,kDAAuB;AACvB,kEAAuC;AACvC,mDAAwB;AACxB,wDAA6B;AAC7B,uDAA4B;AAC5B,oDAAyB;AACzB,2DAAgC"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { AvailableOutputType } from './available-output-type';
|
|
2
|
+
import type { Family } from './family';
|
|
3
|
+
export declare type Integration = {
|
|
4
|
+
actionType: string;
|
|
5
|
+
assetDependencyType?: string;
|
|
6
|
+
assetDependencyVersion?: string;
|
|
7
|
+
availableOutputTypes: AvailableOutputType[] | boolean | number | {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
} | null | string;
|
|
10
|
+
availableOutputVariables: {
|
|
11
|
+
[key: string]: OutputDescriptor;
|
|
12
|
+
} | null;
|
|
13
|
+
base64Image: string;
|
|
14
|
+
description: string;
|
|
15
|
+
family: Family;
|
|
16
|
+
inputParameters: {
|
|
17
|
+
[key: string]: InputDescriptor;
|
|
18
|
+
} | null;
|
|
19
|
+
name: string;
|
|
20
|
+
readonly: boolean;
|
|
21
|
+
scriptFile: string;
|
|
22
|
+
version: string;
|
|
23
|
+
turbine?: Record<string, any>;
|
|
24
|
+
};
|
|
25
|
+
export declare type ParameterValue = {
|
|
26
|
+
value: string | number | Array<string | number> | boolean | JSON;
|
|
27
|
+
};
|
|
28
|
+
export declare type InputDescriptor = {
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
example?: string;
|
|
32
|
+
type: string | number;
|
|
33
|
+
required?: string | boolean;
|
|
34
|
+
};
|
|
35
|
+
export declare type OutputDescriptor = {
|
|
36
|
+
name: string;
|
|
37
|
+
type: string | number;
|
|
38
|
+
};
|
|
39
|
+
export declare const capsWords: string[];
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.capsWords = void 0;
|
|
4
|
+
// Common Acronyms
|
|
5
|
+
exports.capsWords = [
|
|
6
|
+
'ip',
|
|
7
|
+
'dns',
|
|
8
|
+
'cc',
|
|
9
|
+
'sha256',
|
|
10
|
+
'md5',
|
|
11
|
+
'sha1',
|
|
12
|
+
'url',
|
|
13
|
+
'ai',
|
|
14
|
+
'tlp',
|
|
15
|
+
'ioc',
|
|
16
|
+
'id',
|
|
17
|
+
'uuid',
|
|
18
|
+
'mac',
|
|
19
|
+
'sdn',
|
|
20
|
+
'vt',
|
|
21
|
+
'ts',
|
|
22
|
+
'cve',
|
|
23
|
+
'cwe',
|
|
24
|
+
'cvss',
|
|
25
|
+
'wa',
|
|
26
|
+
'os',
|
|
27
|
+
'av',
|
|
28
|
+
'pe',
|
|
29
|
+
'dll',
|
|
30
|
+
'iso',
|
|
31
|
+
'pcap',
|
|
32
|
+
'pid',
|
|
33
|
+
'pdf',
|
|
34
|
+
'html',
|
|
35
|
+
'det',
|
|
36
|
+
'tld',
|
|
37
|
+
'zip',
|
|
38
|
+
'mime',
|
|
39
|
+
'stix',
|
|
40
|
+
'asdn',
|
|
41
|
+
'asn',
|
|
42
|
+
'jpg',
|
|
43
|
+
'ad',
|
|
44
|
+
'dtg',
|
|
45
|
+
'uri',
|
|
46
|
+
'vlan',
|
|
47
|
+
'dhcp',
|
|
48
|
+
'json',
|
|
49
|
+
];
|
|
50
|
+
//# sourceMappingURL=integration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"integration.js","sourceRoot":"","sources":["../../src/schemas/integration.ts"],"names":[],"mappings":";;;AAyCA,kBAAkB;AACL,QAAA,SAAS,GAAG;IACvB,IAAI;IACJ,KAAK;IACL,IAAI;IACJ,QAAQ;IACR,KAAK;IACL,MAAM;IACN,KAAK;IACL,IAAI;IACJ,KAAK;IACL,KAAK;IACL,IAAI;IACJ,MAAM;IACN,KAAK;IACL,KAAK;IACL,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,MAAM;IACN,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,MAAM;IACN,KAAK;IACL,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;IACN,KAAK;IACL,KAAK;IACL,IAAI;IACJ,KAAK;IACL,KAAK;IACL,MAAM;IACN,MAAM;IACN,MAAM;CACP,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"os-support.js","sourceRoot":"","sources":["../../src/schemas/os-support.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { OSSupport } from './os-support';
|
|
2
|
+
import type { PythonVersion } from './python-version';
|
|
3
|
+
export declare type Package = {
|
|
4
|
+
author: string;
|
|
5
|
+
author_email: string;
|
|
6
|
+
description: string;
|
|
7
|
+
entry_points?: {
|
|
8
|
+
[key: string]: any;
|
|
9
|
+
};
|
|
10
|
+
install_requires?: string[];
|
|
11
|
+
isEmailBundle?: boolean;
|
|
12
|
+
name: string;
|
|
13
|
+
os_support?: OSSupport;
|
|
14
|
+
package_data?: {
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
};
|
|
17
|
+
packages?: string[];
|
|
18
|
+
product: string;
|
|
19
|
+
python_version?: PythonVersion;
|
|
20
|
+
scripts?: any[];
|
|
21
|
+
supported_swimlane_version?: string;
|
|
22
|
+
url?: string;
|
|
23
|
+
vendor: string;
|
|
24
|
+
version: string;
|
|
25
|
+
version_hash?: null;
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"package.js","sourceRoot":"","sources":["../../src/schemas/package.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PythonVersion = void 0;
|
|
4
|
+
var PythonVersion;
|
|
5
|
+
(function (PythonVersion) {
|
|
6
|
+
PythonVersion["The27"] = "2.7";
|
|
7
|
+
PythonVersion["The36"] = "3.6";
|
|
8
|
+
})(PythonVersion = exports.PythonVersion || (exports.PythonVersion = {}));
|
|
9
|
+
//# sourceMappingURL=python-version.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"python-version.js","sourceRoot":"","sources":["../../src/schemas/python-version.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAGX;AAHD,WAAY,aAAa;IACrB,8BAAa,CAAA;IACb,8BAAa,CAAA;AACjB,CAAC,EAHW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAGxB"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# {{{title}}}
|
|
2
|
+
|
|
3
|
+
A brief description goes here. Be sure to provide an overview of what the plugin does. Include description of the
|
|
4
|
+
product being integrated, plus use cases/value prop of the Swimlane integration.
|
|
5
|
+
|
|
6
|
+
## Prerequisites
|
|
7
|
+
|
|
8
|
+
Prerequisites, everything outside of the plugin itself. This should include info on how to
|
|
9
|
+
configure the device (API Key, Perms, ect)
|
|
10
|
+
|
|
11
|
+
## Capabilities
|
|
12
|
+
|
|
13
|
+
This plugin provides the following capabilities:
|
|
14
|
+
|
|
15
|
+
* Capabilities
|
|
16
|
+
* Go
|
|
17
|
+
* Here
|
|
18
|
+
* e.g. Manage Firewall Policies instead of listing each individual tasks
|
|
19
|
+
|
|
20
|
+
### Limitations
|
|
21
|
+
|
|
22
|
+
Include information about known limitations here, including supported or minimum versions, especially
|
|
23
|
+
known unsupported versions.
|
|
24
|
+
|
|
25
|
+
## Asset Setup
|
|
26
|
+
|
|
27
|
+
The content here should discuss asset setup in a conversational manner. Be sure to include any known login
|
|
28
|
+
and test connection errors.
|
|
29
|
+
|
|
30
|
+
## Tasks Setup
|
|
31
|
+
Special task setup as needed depending on plugin, exclude if empty.
|
|
32
|
+
|
|
33
|
+
Known available allowed input options from enum type selection
|
|
34
|
+
|
|
35
|
+
## Notes
|
|
36
|
+
|
|
37
|
+
* Any other notes not fitting other sections go here.
|
|
38
|
+
* Any reference URLs to external docs or other resources
|
|
39
|
+
|
|
40
|
+
This plugin was last tested against product version: !*CHANGEME*!.
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{{name}}}",
|
|
3
|
+
"type": "{{{type}}}",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "{{{description}}}",
|
|
6
|
+
"family": "{{{family}}}",
|
|
7
|
+
"inputParameters":
|
|
8
|
+
{
|
|
9
|
+
"username":
|
|
10
|
+
{
|
|
11
|
+
"name": "Username",
|
|
12
|
+
"description": "Account Username",
|
|
13
|
+
"required": true,
|
|
14
|
+
"type": 1
|
|
15
|
+
},
|
|
16
|
+
"password":
|
|
17
|
+
{
|
|
18
|
+
"name": "Password",
|
|
19
|
+
"description": "Account Password",
|
|
20
|
+
"required": true,
|
|
21
|
+
"type": 4
|
|
22
|
+
},
|
|
23
|
+
"http_proxy":
|
|
24
|
+
{
|
|
25
|
+
"name": "HTTP Proxy",
|
|
26
|
+
"description": "Optional HTTP/HTTPS proxy",
|
|
27
|
+
"example": "http://user:password@10.10.1.10:3128",
|
|
28
|
+
"type": 1
|
|
29
|
+
},
|
|
30
|
+
"verify_ssl":
|
|
31
|
+
{
|
|
32
|
+
"name": "Verify SSL",
|
|
33
|
+
"description": "Enable SSL certificate verification. Ignored for non-SSL connection",
|
|
34
|
+
"type": 7,
|
|
35
|
+
"default": true
|
|
36
|
+
},
|
|
37
|
+
"host":
|
|
38
|
+
{
|
|
39
|
+
"name": "Host",
|
|
40
|
+
"description": "Server Host Address",
|
|
41
|
+
"example": "http://192.168.1.1",
|
|
42
|
+
"required": true,
|
|
43
|
+
"type": 1
|
|
44
|
+
},
|
|
45
|
+
"ip_address":
|
|
46
|
+
{
|
|
47
|
+
"name": "IP Address",
|
|
48
|
+
"description": "Server IP Address",
|
|
49
|
+
"example": "192.168.1.1",
|
|
50
|
+
"required": true,
|
|
51
|
+
"type": 1
|
|
52
|
+
},
|
|
53
|
+
"port":
|
|
54
|
+
{
|
|
55
|
+
"name": "Port",
|
|
56
|
+
"description": "Server Port",
|
|
57
|
+
"example": "8080",
|
|
58
|
+
"required": true,
|
|
59
|
+
"type": 1
|
|
60
|
+
},
|
|
61
|
+
"api_key":
|
|
62
|
+
{
|
|
63
|
+
"name": "API Key",
|
|
64
|
+
"description": "API Key",
|
|
65
|
+
"required": true,
|
|
66
|
+
"type": 4
|
|
67
|
+
},
|
|
68
|
+
"access_key":
|
|
69
|
+
{
|
|
70
|
+
"name": "Access Key",
|
|
71
|
+
"description": "Access Key",
|
|
72
|
+
"required": true,
|
|
73
|
+
"type": 4
|
|
74
|
+
},
|
|
75
|
+
"token":
|
|
76
|
+
{
|
|
77
|
+
"name": "Token",
|
|
78
|
+
"description": "Token",
|
|
79
|
+
"required": true,
|
|
80
|
+
"type": 4
|
|
81
|
+
},
|
|
82
|
+
"access_token":
|
|
83
|
+
{
|
|
84
|
+
"name": "Access Token",
|
|
85
|
+
"description": "Access Token",
|
|
86
|
+
"required": true,
|
|
87
|
+
"type": 4
|
|
88
|
+
},
|
|
89
|
+
"email":
|
|
90
|
+
{
|
|
91
|
+
"name": "Email",
|
|
92
|
+
"description": "Account Email",
|
|
93
|
+
"example": "john.smith@company.com",
|
|
94
|
+
"required": true,
|
|
95
|
+
"type": 1
|
|
96
|
+
},
|
|
97
|
+
"url":
|
|
98
|
+
{
|
|
99
|
+
"name": "URL",
|
|
100
|
+
"description": "URL",
|
|
101
|
+
"example": "http://example.com",
|
|
102
|
+
"required": true,
|
|
103
|
+
"type": 1
|
|
104
|
+
},
|
|
105
|
+
"domain":
|
|
106
|
+
{
|
|
107
|
+
"name": "Domain",
|
|
108
|
+
"description": "Domain",
|
|
109
|
+
"example": "example.com",
|
|
110
|
+
"required": true,
|
|
111
|
+
"type": 1
|
|
112
|
+
},
|
|
113
|
+
"user_agent":
|
|
114
|
+
{
|
|
115
|
+
"name": "User Agent",
|
|
116
|
+
"description": "User Agent",
|
|
117
|
+
"example": "SwimlaneIntegration",
|
|
118
|
+
"required": true,
|
|
119
|
+
"type": 1
|
|
120
|
+
},
|
|
121
|
+
"verbose_errors":
|
|
122
|
+
{
|
|
123
|
+
"name": "Verbose Errors",
|
|
124
|
+
"description": "HTTP errors will contain more detail about the request and response if selected.",
|
|
125
|
+
"type": 7,
|
|
126
|
+
"default": false
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"testScript": "",
|
|
130
|
+
"testScriptFile": "test_connection.py",
|
|
131
|
+
"base64Image": "{{{logo}}}"
|
|
132
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
from swimlane_integration_testing.conftest import *
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{{name}}}",
|
|
3
|
+
"description": "{{{description}}}",
|
|
4
|
+
"version": "{{{version}}}",
|
|
5
|
+
"family": "{{{family}}}",
|
|
6
|
+
"actionType": "{{{actionType}}}",
|
|
7
|
+
"assetDependencyType": "{{{assetDependencyType}}}",
|
|
8
|
+
"assetDependencyVersion": "{{{assetDependencyVersion}}}",
|
|
9
|
+
"inputParameters": {},
|
|
10
|
+
"availableOutputTypes": [
|
|
11
|
+
"email",
|
|
12
|
+
"insertUpdateRecord",
|
|
13
|
+
"referentialTask",
|
|
14
|
+
"saveToFile",
|
|
15
|
+
"setFieldValue"
|
|
16
|
+
],
|
|
17
|
+
"availableOutputVariables": {},
|
|
18
|
+
"pythonDependencies": null,
|
|
19
|
+
"readonly": true,
|
|
20
|
+
"script": "",
|
|
21
|
+
"scriptFile": "{{{scriptFile}}}",
|
|
22
|
+
"base64Image": "{{{logo}}}"
|
|
23
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{{#if rest}}
|
|
2
|
+
from basic_rest_endpoint import BasicRestEndpoint, asset_parser
|
|
3
|
+
|
|
4
|
+
class {{{baseClassName}}}(BasicRestEndpoint):
|
|
5
|
+
|
|
6
|
+
method = "GET"
|
|
7
|
+
endpoint = ""
|
|
8
|
+
|
|
9
|
+
def __init__(self, context):
|
|
10
|
+
super().__init__(**asset_parser(context.asset))
|
|
11
|
+
|
|
12
|
+
self.configure_status_actions(verbose_errors=context.asset['verbose_errors'])
|
|
13
|
+
{{else}}
|
|
14
|
+
class {{{baseClassName}}}(object):
|
|
15
|
+
def __init__(self, context):
|
|
16
|
+
pass
|
|
17
|
+
{{/if}}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version_hash": null,
|
|
3
|
+
"author_email": "info@swimlane.com",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"description": "{{{description}}}",
|
|
6
|
+
"scripts": [],
|
|
7
|
+
"author": "{{{author}}}",
|
|
8
|
+
"vendor": "{{{vendor}}}",
|
|
9
|
+
"product": "{{{product}}}",
|
|
10
|
+
"url": "{{{url}}}",
|
|
11
|
+
"install_requires": [],
|
|
12
|
+
"packages": [
|
|
13
|
+
{{#each packages}}
|
|
14
|
+
"{{this}}"{{#unless @last}},{{/unless}}
|
|
15
|
+
{{/each}}
|
|
16
|
+
],
|
|
17
|
+
"name": "{{{name}}}",
|
|
18
|
+
"supported_swimlane_version": "{{{supportedSwimlaneVersion}}}",
|
|
19
|
+
"python_version": "3.6",
|
|
20
|
+
"python_runtime": "3.6",
|
|
21
|
+
"private": false
|
|
22
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
3
|
+
rev: v2.3.0
|
|
4
|
+
hooks:
|
|
5
|
+
- id: check-json
|
|
6
|
+
- id: check-yaml
|
|
7
|
+
- id: end-of-file-fixer
|
|
8
|
+
- id: requirements-txt-fixer
|
|
9
|
+
- id: trailing-whitespace
|
|
10
|
+
# Remove unused python imports
|
|
11
|
+
- repo: https://github.com/myint/autoflake
|
|
12
|
+
rev: v1.4
|
|
13
|
+
hooks:
|
|
14
|
+
- id: autoflake
|
|
15
|
+
args: [--in-place, --remove-all-unused-imports]
|
|
16
|
+
# why we exclude these files? See below.
|
|
17
|
+
#
|
|
18
|
+
# setup.py -> if formatted the integration validation fails
|
|
19
|
+
# conftest.py -> has intentional unsused imports
|
|
20
|
+
# test_default.py -> has intentional unsused imports
|
|
21
|
+
#
|
|
22
|
+
# This is the same reason why we exclude this
|
|
23
|
+
# files on hooks bellow.
|
|
24
|
+
exclude: "setup.py|conftest.py|test_default.py"
|
|
25
|
+
# Sort python imports
|
|
26
|
+
- repo: https://github.com/PyCQA/isort
|
|
27
|
+
rev: 5.10.1
|
|
28
|
+
hooks:
|
|
29
|
+
- id: isort
|
|
30
|
+
# never remove --profile black
|
|
31
|
+
# if you do that darker and isort will enter
|
|
32
|
+
# in conflict and you'll enter in a infinity import
|
|
33
|
+
# error because black will revert what isort fixed.
|
|
34
|
+
args: ["--profile", "black"]
|
|
35
|
+
exclude: "setup.py|conftest.py|test_default.py"
|
|
36
|
+
# black but powered with diff
|
|
37
|
+
- repo: https://github.com/akaihola/darker
|
|
38
|
+
rev: 1.5.0
|
|
39
|
+
hooks:
|
|
40
|
+
- id: darker
|
|
41
|
+
exclude: "setup.py"
|