@joshuanode/n8n-nodes-immybot 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +314 -0
- package/dist/credentials/ImmyDotBotOAuth2Api.credentials.d.ts +10 -0
- package/dist/credentials/ImmyDotBotOAuth2Api.credentials.d.ts.map +1 -0
- package/dist/credentials/ImmyDotBotOAuth2Api.credentials.js +103 -0
- package/dist/credentials/ImmyDotBotOAuth2Api.credentials.js.map +1 -0
- package/dist/credentials/immybot.png +0 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -0
- package/dist/nodes/ImmyBot/ImmyBot.node.d.ts +16 -0
- package/dist/nodes/ImmyBot/ImmyBot.node.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/ImmyBot.node.js +348 -0
- package/dist/nodes/ImmyBot/ImmyBot.node.js.map +1 -0
- package/dist/nodes/ImmyBot/immybot.png +0 -0
- package/dist/nodes/ImmyBot/resources/ChangeRequest/ChangeRequestRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/ChangeRequest/ChangeRequestRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/ChangeRequest/ChangeRequestRouter.js +81 -0
- package/dist/nodes/ImmyBot/resources/ChangeRequest/ChangeRequestRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/ChangeRequest/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/ChangeRequest/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/ChangeRequest/index.js +189 -0
- package/dist/nodes/ImmyBot/resources/ChangeRequest/index.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Computer/ComputerRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/Computer/ComputerRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Computer/ComputerRouter.js +284 -0
- package/dist/nodes/ImmyBot/resources/Computer/ComputerRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Computer/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/Computer/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Computer/index.js +557 -0
- package/dist/nodes/ImmyBot/resources/Computer/index.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/MaintenanceAction/MaintenanceActionRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/MaintenanceAction/MaintenanceActionRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/MaintenanceAction/MaintenanceActionRouter.js +34 -0
- package/dist/nodes/ImmyBot/resources/MaintenanceAction/MaintenanceActionRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/MaintenanceAction/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/MaintenanceAction/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/MaintenanceAction/index.js +103 -0
- package/dist/nodes/ImmyBot/resources/MaintenanceAction/index.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Person/PersonRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/Person/PersonRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Person/PersonRouter.js +34 -0
- package/dist/nodes/ImmyBot/resources/Person/PersonRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Person/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/Person/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Person/index.js +104 -0
- package/dist/nodes/ImmyBot/resources/Person/index.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Script/ScriptRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/Script/ScriptRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Script/ScriptRouter.js +38 -0
- package/dist/nodes/ImmyBot/resources/Script/ScriptRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Script/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/Script/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Script/index.js +113 -0
- package/dist/nodes/ImmyBot/resources/Script/index.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Software/SoftwareRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/Software/SoftwareRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Software/SoftwareRouter.js +93 -0
- package/dist/nodes/ImmyBot/resources/Software/SoftwareRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Software/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/Software/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Software/index.js +177 -0
- package/dist/nodes/ImmyBot/resources/Software/index.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Sync/SyncRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/Sync/SyncRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Sync/SyncRouter.js +43 -0
- package/dist/nodes/ImmyBot/resources/Sync/SyncRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Sync/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/Sync/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Sync/index.js +73 -0
- package/dist/nodes/ImmyBot/resources/Sync/index.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Tag/TagRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/Tag/TagRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Tag/TagRouter.js +34 -0
- package/dist/nodes/ImmyBot/resources/Tag/TagRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Tag/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/Tag/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Tag/index.js +104 -0
- package/dist/nodes/ImmyBot/resources/Tag/index.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Tenant/TenantRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/Tenant/TenantRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Tenant/TenantRouter.js +85 -0
- package/dist/nodes/ImmyBot/resources/Tenant/TenantRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/Tenant/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/Tenant/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/Tenant/index.js +178 -0
- package/dist/nodes/ImmyBot/resources/Tenant/index.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/User/UserRouter.d.ts +3 -0
- package/dist/nodes/ImmyBot/resources/User/UserRouter.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/User/UserRouter.js +167 -0
- package/dist/nodes/ImmyBot/resources/User/UserRouter.js.map +1 -0
- package/dist/nodes/ImmyBot/resources/User/index.d.ts +4 -0
- package/dist/nodes/ImmyBot/resources/User/index.d.ts.map +1 -0
- package/dist/nodes/ImmyBot/resources/User/index.js +344 -0
- package/dist/nodes/ImmyBot/resources/User/index.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.softwareFields = exports.softwareOperations = void 0;
|
|
4
|
+
exports.softwareOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['software'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get Global Software',
|
|
18
|
+
value: 'getGlobal',
|
|
19
|
+
description: 'Get a global software by identifier',
|
|
20
|
+
action: 'Get global software',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get Local Software',
|
|
24
|
+
value: 'getLocal',
|
|
25
|
+
description: 'Get a local software by identifier',
|
|
26
|
+
action: 'Get local software',
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
name: 'Get Many Global',
|
|
30
|
+
value: 'getManyGlobal',
|
|
31
|
+
description: 'Get many global software items',
|
|
32
|
+
action: 'Get many global software items',
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
name: 'Get Many Local',
|
|
36
|
+
value: 'getManyLocal',
|
|
37
|
+
description: 'Get many local software items',
|
|
38
|
+
action: 'Get many local software items',
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
name: 'Create Global Software',
|
|
42
|
+
value: 'createGlobal',
|
|
43
|
+
description: 'Create a new global software item',
|
|
44
|
+
action: 'Create global software',
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
name: 'Create Local Software',
|
|
48
|
+
value: 'createLocal',
|
|
49
|
+
description: 'Create a new local software item',
|
|
50
|
+
action: 'Create local software',
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: 'Delete Global Software',
|
|
54
|
+
value: 'deleteGlobal',
|
|
55
|
+
description: 'Delete a global software item',
|
|
56
|
+
action: 'Delete global software',
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
name: 'Delete Local Software',
|
|
60
|
+
value: 'deleteLocal',
|
|
61
|
+
description: 'Delete a local software item',
|
|
62
|
+
action: 'Delete local software',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
default: 'getManyLocal',
|
|
66
|
+
},
|
|
67
|
+
];
|
|
68
|
+
exports.softwareFields = [
|
|
69
|
+
// Software Identifier for get/delete operations
|
|
70
|
+
{
|
|
71
|
+
displayName: 'Software Identifier',
|
|
72
|
+
name: 'softwareIdentifier',
|
|
73
|
+
type: 'string',
|
|
74
|
+
default: '',
|
|
75
|
+
required: true,
|
|
76
|
+
displayOptions: {
|
|
77
|
+
show: {
|
|
78
|
+
resource: ['software'],
|
|
79
|
+
operation: ['getLocal', 'getGlobal', 'deleteLocal', 'deleteGlobal'],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
description: 'The unique identifier for the software (e.g., "google-chrome", "mozilla-firefox")',
|
|
83
|
+
placeholder: 'google-chrome',
|
|
84
|
+
},
|
|
85
|
+
// Get Many operations
|
|
86
|
+
{
|
|
87
|
+
displayName: 'Return All',
|
|
88
|
+
name: 'returnAll',
|
|
89
|
+
type: 'boolean',
|
|
90
|
+
displayOptions: {
|
|
91
|
+
show: {
|
|
92
|
+
resource: ['software'],
|
|
93
|
+
operation: ['getManyLocal', 'getManyGlobal'],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
default: false,
|
|
97
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
displayName: 'Limit',
|
|
101
|
+
name: 'limit',
|
|
102
|
+
type: 'number',
|
|
103
|
+
displayOptions: {
|
|
104
|
+
show: {
|
|
105
|
+
resource: ['software'],
|
|
106
|
+
operation: ['getManyLocal', 'getManyGlobal'],
|
|
107
|
+
returnAll: [false],
|
|
108
|
+
},
|
|
109
|
+
},
|
|
110
|
+
typeOptions: {
|
|
111
|
+
minValue: 1,
|
|
112
|
+
maxValue: 500,
|
|
113
|
+
},
|
|
114
|
+
default: 50,
|
|
115
|
+
description: 'Max number of results to return',
|
|
116
|
+
},
|
|
117
|
+
// Create operations
|
|
118
|
+
{
|
|
119
|
+
displayName: 'Name',
|
|
120
|
+
name: 'name',
|
|
121
|
+
type: 'string',
|
|
122
|
+
default: '',
|
|
123
|
+
required: true,
|
|
124
|
+
displayOptions: {
|
|
125
|
+
show: {
|
|
126
|
+
resource: ['software'],
|
|
127
|
+
operation: ['createLocal', 'createGlobal'],
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
description: 'Name of the software',
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
displayName: 'Software Identifier',
|
|
134
|
+
name: 'softwareIdentifier',
|
|
135
|
+
type: 'string',
|
|
136
|
+
default: '',
|
|
137
|
+
required: true,
|
|
138
|
+
displayOptions: {
|
|
139
|
+
show: {
|
|
140
|
+
resource: ['software'],
|
|
141
|
+
operation: ['createLocal', 'createGlobal'],
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
description: 'Unique identifier for the software (e.g., "google-chrome")',
|
|
145
|
+
placeholder: 'google-chrome',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
displayName: 'Additional Fields',
|
|
149
|
+
name: 'additionalFields',
|
|
150
|
+
type: 'collection',
|
|
151
|
+
placeholder: 'Add Field',
|
|
152
|
+
default: {},
|
|
153
|
+
displayOptions: {
|
|
154
|
+
show: {
|
|
155
|
+
resource: ['software'],
|
|
156
|
+
operation: ['createLocal', 'createGlobal'],
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
options: [
|
|
160
|
+
{
|
|
161
|
+
displayName: 'Description',
|
|
162
|
+
name: 'description',
|
|
163
|
+
type: 'string',
|
|
164
|
+
default: '',
|
|
165
|
+
description: 'Description of the software',
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
displayName: 'Publisher',
|
|
169
|
+
name: 'publisher',
|
|
170
|
+
type: 'string',
|
|
171
|
+
default: '',
|
|
172
|
+
description: 'Software publisher/vendor',
|
|
173
|
+
},
|
|
174
|
+
],
|
|
175
|
+
},
|
|
176
|
+
];
|
|
177
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Software/index.ts"],"names":[],"mappings":";;;AAEa,QAAA,kBAAkB,GAAsB;IACpD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL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AAI,EAAE,QAAQ;QACd,OAAO,EAAE,EAAE;QACX,QAAQ,EAAE,IAAI;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;aAC1C;SACD;QACD,WAAW,EAAE,4DAA4D;QACzE,WAAW,EAAE,eAAe;KAC5B;IACD;QACC,WAAW,EAAE,mBAAmB;QAChC,IAAI,EAAE,kBAAkB;QACxB,IAAI,EAAE,YAAY;QAClB,WAAW,EAAE,WAAW;QACxB,OAAO,EAAE,EAAE;QACX,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,UAAU,CAAC;gBACtB,SAAS,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;aAC1C;SACD;QACD,OAAO,EAAE;YACR;gBACC,WAAW,EAAE,aAAa;gBAC1B,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,6BAA6B;aAC1C;YACD;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,WAAW;gBACjB,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,2BAA2B;aACxC;SACD;KACD;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SyncRouter.d.ts","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Sync/SyncRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AASnE,wBAAsB,UAAU,CAC/B,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,GAAG,WAAW,EAAE,CAAC,CAsCtC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.syncRouter = syncRouter;
|
|
4
|
+
function getResourceLocatorValue(value) {
|
|
5
|
+
if (typeof value === 'string') {
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
return value.value || '';
|
|
9
|
+
}
|
|
10
|
+
async function syncRouter(index, operation) {
|
|
11
|
+
if (operation === 'triggerUserAffinitySync') {
|
|
12
|
+
const tenantIdParam = this.getNodeParameter('tenantId', index, '');
|
|
13
|
+
const body = {};
|
|
14
|
+
if (tenantIdParam) {
|
|
15
|
+
const tenantId = getResourceLocatorValue(tenantIdParam);
|
|
16
|
+
if (tenantId) {
|
|
17
|
+
body.tenantId = parseInt(tenantId, 10);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
return await this.helpers.httpRequest({
|
|
21
|
+
method: 'POST',
|
|
22
|
+
url: '/api/v1/syncs/trigger-user-affinity-sync',
|
|
23
|
+
body,
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
if (operation === 'triggerAzureUserSync') {
|
|
27
|
+
const tenantIdParam = this.getNodeParameter('tenantId', index, '');
|
|
28
|
+
const body = {};
|
|
29
|
+
if (tenantIdParam) {
|
|
30
|
+
const tenantId = getResourceLocatorValue(tenantIdParam);
|
|
31
|
+
if (tenantId) {
|
|
32
|
+
body.tenantId = parseInt(tenantId, 10);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return await this.helpers.httpRequest({
|
|
36
|
+
method: 'POST',
|
|
37
|
+
url: '/api/v1/syncs/azure-user-sync',
|
|
38
|
+
body,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
throw new Error(`Unknown operation: ${operation}`);
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=SyncRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SyncRouter.js","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Sync/SyncRouter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C,OAAO,CAAC,WAAW,CAAC;YACrC,MAAM,EAAE,MAAM;YACd,GAAG,EAAE,+BAA+B;YACpC,IAAI;SACJ,CAAC,CAAC;IACJ,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,sBAAsB,SAAS,EAAE,CAAC,CAAC;AACpD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Sync/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,cAAc,EAAE,eAAe,EA2B3C,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,eAAe,EAwCvC,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.syncFields = exports.syncOperations = void 0;
|
|
4
|
+
exports.syncOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['sync'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Trigger Azure User Sync',
|
|
18
|
+
value: 'triggerAzureUserSync',
|
|
19
|
+
description: 'Trigger Azure user synchronization',
|
|
20
|
+
action: 'Trigger azure user sync',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Trigger User Affinity Sync',
|
|
24
|
+
value: 'triggerUserAffinitySync',
|
|
25
|
+
description: 'Trigger user affinity synchronization',
|
|
26
|
+
action: 'Trigger user affinity sync',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
default: 'triggerUserAffinitySync',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
exports.syncFields = [
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Tenant',
|
|
35
|
+
name: 'tenantId',
|
|
36
|
+
type: 'resourceLocator',
|
|
37
|
+
default: { mode: 'list', value: '' },
|
|
38
|
+
required: false,
|
|
39
|
+
modes: [
|
|
40
|
+
{
|
|
41
|
+
displayName: 'From List',
|
|
42
|
+
name: 'list',
|
|
43
|
+
type: 'list',
|
|
44
|
+
typeOptions: {
|
|
45
|
+
searchListMethod: 'getTenants',
|
|
46
|
+
searchable: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
displayName: 'By ID',
|
|
51
|
+
name: 'id',
|
|
52
|
+
type: 'string',
|
|
53
|
+
validation: [
|
|
54
|
+
{
|
|
55
|
+
type: 'regex',
|
|
56
|
+
properties: {
|
|
57
|
+
regex: '^\\d+$',
|
|
58
|
+
errorMessage: 'Must be a numeric ID',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
},
|
|
63
|
+
],
|
|
64
|
+
displayOptions: {
|
|
65
|
+
show: {
|
|
66
|
+
resource: ['sync'],
|
|
67
|
+
operation: ['triggerAzureUserSync', 'triggerUserAffinitySync'],
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
description: 'Optional tenant to sync. If not specified, syncs all tenants.',
|
|
71
|
+
},
|
|
72
|
+
];
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Sync/index.ts"],"names":[],"mappings":";;;AAEa,QAAA,cAAc,GAAsB;IAChD;QACC,WAAW,EAAE,WAAW;QACxB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,gBAAgB,EAAE,IAAI;QACtB,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;aAClB;SACD;QACD,OAAO,EAAE;YACR;gBACC,IAAI,EAAE,yBAAyB;gBAC/B,KAAK,EAAE,sBAAsB;gBAC7B,WAAW,EAAE,oCAAoC;gBACjD,MAAM,EAAE,yBAAyB;aACjC;YACD;gBACC,IAAI,EAAE,4BAA4B;gBAClC,KAAK,EAAE,yBAAyB;gBAChC,WAAW,EAAE,uCAAuC;gBACpD,MAAM,EAAE,4BAA4B;aACpC;SACD;QACD,OAAO,EAAE,yBAAyB;KAClC;CACD,CAAC;AAEW,QAAA,UAAU,GAAsB;IAC5C;QACC,WAAW,EAAE,QAAQ;QACrB,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,iBAAiB;QACvB,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,EAAE;QACpC,QAAQ,EAAE,KAAK;QACf,KAAK,EAAE;YACN;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,MAAM;gBACZ,WAAW,EAAE;oBACZ,gBAAgB,EAAE,YAAY;oBAC9B,UAAU,EAAE,IAAI;iBAChB;aACD;YACD;gBACC,WAAW,EAAE,OAAO;gBACpB,IAAI,EAAE,IAAI;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACX;wBACC,IAAI,EAAE,OAAO;wBACb,UAAU,EAAE;4BACX,KAAK,EAAE,QAAQ;4BACf,YAAY,EAAE,sBAAsB;yBACpC;qBACD;iBACD;aACD;SACD;QACD,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,SAAS,EAAE,CAAC,sBAAsB,EAAE,yBAAyB,CAAC;aAC9D;SACD;QACD,WAAW,EAAE,+DAA+D;KAC5E;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagRouter.d.ts","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Tag/TagRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AASnE,wBAAsB,SAAS,CAC9B,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,GAAG,WAAW,EAAE,CAAC,CA4BtC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tagRouter = tagRouter;
|
|
4
|
+
function getResourceLocatorValue(value) {
|
|
5
|
+
if (typeof value === 'string') {
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
return value.value || '';
|
|
9
|
+
}
|
|
10
|
+
async function tagRouter(index, operation) {
|
|
11
|
+
if (operation === 'get') {
|
|
12
|
+
const tagId = getResourceLocatorValue(this.getNodeParameter('tagId', index));
|
|
13
|
+
return await this.helpers.httpRequest({
|
|
14
|
+
method: 'GET',
|
|
15
|
+
url: `/api/v1/tags/${tagId}`,
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
if (operation === 'getMany') {
|
|
19
|
+
const returnAll = this.getNodeParameter('returnAll', index, false);
|
|
20
|
+
const qs = {};
|
|
21
|
+
if (!returnAll) {
|
|
22
|
+
const limit = this.getNodeParameter('limit', index, 50);
|
|
23
|
+
qs.pageSize = limit;
|
|
24
|
+
}
|
|
25
|
+
const response = (await this.helpers.httpRequest({
|
|
26
|
+
method: 'GET',
|
|
27
|
+
url: '/api/v1/tags',
|
|
28
|
+
qs,
|
|
29
|
+
}));
|
|
30
|
+
return response;
|
|
31
|
+
}
|
|
32
|
+
throw new Error(`Unknown operation: ${operation}`);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=TagRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagRouter.js","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Tag/TagR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":"index.d.ts","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,eAAO,MAAM,aAAa,EAAE,eAAe,EA2B1C,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,eAAe,EAuEtC,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tagFields = exports.tagOperations = void 0;
|
|
4
|
+
exports.tagOperations = [
|
|
5
|
+
{
|
|
6
|
+
displayName: 'Operation',
|
|
7
|
+
name: 'operation',
|
|
8
|
+
type: 'options',
|
|
9
|
+
noDataExpression: true,
|
|
10
|
+
displayOptions: {
|
|
11
|
+
show: {
|
|
12
|
+
resource: ['tag'],
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
options: [
|
|
16
|
+
{
|
|
17
|
+
name: 'Get',
|
|
18
|
+
value: 'get',
|
|
19
|
+
description: 'Get a tag by ID',
|
|
20
|
+
action: 'Get a tag',
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'Get Many',
|
|
24
|
+
value: 'getMany',
|
|
25
|
+
description: 'Get many tags',
|
|
26
|
+
action: 'Get many tags',
|
|
27
|
+
},
|
|
28
|
+
],
|
|
29
|
+
default: 'getMany',
|
|
30
|
+
},
|
|
31
|
+
];
|
|
32
|
+
exports.tagFields = [
|
|
33
|
+
{
|
|
34
|
+
displayName: 'Tag',
|
|
35
|
+
name: 'tagId',
|
|
36
|
+
type: 'resourceLocator',
|
|
37
|
+
default: { mode: 'list', value: '' },
|
|
38
|
+
required: true,
|
|
39
|
+
modes: [
|
|
40
|
+
{
|
|
41
|
+
displayName: 'From List',
|
|
42
|
+
name: 'list',
|
|
43
|
+
type: 'list',
|
|
44
|
+
typeOptions: {
|
|
45
|
+
searchListMethod: 'getTags',
|
|
46
|
+
searchable: true,
|
|
47
|
+
},
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
displayName: 'By ID',
|
|
51
|
+
name: 'id',
|
|
52
|
+
type: 'string',
|
|
53
|
+
validation: [
|
|
54
|
+
{
|
|
55
|
+
type: 'regex',
|
|
56
|
+
properties: {
|
|
57
|
+
regex: '^\\d+$',
|
|
58
|
+
errorMessage: 'Must be a numeric ID',
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
],
|
|
62
|
+
placeholder: '12345',
|
|
63
|
+
},
|
|
64
|
+
],
|
|
65
|
+
displayOptions: {
|
|
66
|
+
show: {
|
|
67
|
+
resource: ['tag'],
|
|
68
|
+
operation: ['get'],
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
displayName: 'Return All',
|
|
74
|
+
name: 'returnAll',
|
|
75
|
+
type: 'boolean',
|
|
76
|
+
displayOptions: {
|
|
77
|
+
show: {
|
|
78
|
+
resource: ['tag'],
|
|
79
|
+
operation: ['getMany'],
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
default: false,
|
|
83
|
+
description: 'Whether to return all results or only up to a given limit',
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
displayName: 'Limit',
|
|
87
|
+
name: 'limit',
|
|
88
|
+
type: 'number',
|
|
89
|
+
displayOptions: {
|
|
90
|
+
show: {
|
|
91
|
+
resource: ['tag'],
|
|
92
|
+
operation: ['getMany'],
|
|
93
|
+
returnAll: [false],
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
typeOptions: {
|
|
97
|
+
minValue: 1,
|
|
98
|
+
maxValue: 500,
|
|
99
|
+
},
|
|
100
|
+
default: 50,
|
|
101
|
+
description: 'Max number of results to return',
|
|
102
|
+
},
|
|
103
|
+
];
|
|
104
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","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AAQ,EAAE,CAAC,KAAK,CAAC;gBACjB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;KACD;IACD;QACC,WAAW,EAAE,YAAY;QACzB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,KAAK,CAAC;gBACjB,SAAS,EAAE,CAAC,SAAS,CAAC;aACtB;SACD;QACD,OAAO,EAAE,KAAK;QACd,WAAW,EAAE,2DAA2D;KACxE;IACD;QACC,WAAW,EAAE,OAAO;QACpB,IAAI,EAAE,OAAO;QACb,IAAI,EAAE,QAAQ;QACd,cAAc,EAAE;YACf,IAAI,EAAE;gBACL,QAAQ,EAAE,CAAC,KAAK,CAAC;gBACjB,SAAS,EAAE,CAAC,SAAS,CAAC;gBACtB,SAAS,EAAE,CAAC,KAAK,CAAC;aAClB;SACD;QACD,WAAW,EAAE;YACZ,QAAQ,EAAE,CAAC;YACX,QAAQ,EAAE,GAAG;SACb;QACD,OAAO,EAAE,EAAE;QACX,WAAW,EAAE,iCAAiC;KAC9C;CACD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantRouter.d.ts","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Tenant/TenantRouter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAsBnE,wBAAsB,YAAY,CACjC,IAAI,EAAE,iBAAiB,EACvB,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,GACf,OAAO,CAAC,WAAW,GAAG,WAAW,EAAE,CAAC,CA2EtC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.tenantRouter = tenantRouter;
|
|
4
|
+
function getResourceLocatorValue(value) {
|
|
5
|
+
if (typeof value === 'string') {
|
|
6
|
+
return value;
|
|
7
|
+
}
|
|
8
|
+
return value.value || '';
|
|
9
|
+
}
|
|
10
|
+
function parseIds(value) {
|
|
11
|
+
if (typeof value === 'string') {
|
|
12
|
+
if (value.startsWith('[')) {
|
|
13
|
+
return JSON.parse(value);
|
|
14
|
+
}
|
|
15
|
+
return value.split(',').map((id) => parseInt(id.trim(), 10));
|
|
16
|
+
}
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
return value.map((id) => (typeof id === 'number' ? id : parseInt(id, 10)));
|
|
19
|
+
}
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
async function tenantRouter(index, operation) {
|
|
23
|
+
if (operation === 'get') {
|
|
24
|
+
const tenantId = getResourceLocatorValue(this.getNodeParameter('tenantId', index));
|
|
25
|
+
return await this.helpers.httpRequest({
|
|
26
|
+
method: 'GET',
|
|
27
|
+
url: `/api/v1/tenants/${tenantId}`,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
if (operation === 'getMany') {
|
|
31
|
+
const returnAll = this.getNodeParameter('returnAll', index, false);
|
|
32
|
+
const qs = {};
|
|
33
|
+
if (!returnAll) {
|
|
34
|
+
const limit = this.getNodeParameter('limit', index, 50);
|
|
35
|
+
qs.pageSize = limit;
|
|
36
|
+
}
|
|
37
|
+
const response = (await this.helpers.httpRequest({
|
|
38
|
+
method: 'GET',
|
|
39
|
+
url: '/api/v1/tenants',
|
|
40
|
+
qs,
|
|
41
|
+
}));
|
|
42
|
+
return response;
|
|
43
|
+
}
|
|
44
|
+
if (operation === 'create') {
|
|
45
|
+
const name = this.getNodeParameter('name', index);
|
|
46
|
+
return await this.helpers.httpRequest({
|
|
47
|
+
method: 'POST',
|
|
48
|
+
url: '/api/v1/tenants',
|
|
49
|
+
body: {
|
|
50
|
+
name,
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
if (operation === 'update') {
|
|
55
|
+
const tenantId = getResourceLocatorValue(this.getNodeParameter('tenantId', index));
|
|
56
|
+
const updateFields = this.getNodeParameter('updateFields', index, {});
|
|
57
|
+
// Get current data
|
|
58
|
+
const currentData = (await this.helpers.httpRequest({
|
|
59
|
+
method: 'GET',
|
|
60
|
+
url: `/api/v1/tenants/${tenantId}`,
|
|
61
|
+
}));
|
|
62
|
+
const body = {
|
|
63
|
+
...currentData,
|
|
64
|
+
...updateFields,
|
|
65
|
+
};
|
|
66
|
+
return await this.helpers.httpRequest({
|
|
67
|
+
method: 'PUT',
|
|
68
|
+
url: `/api/v1/tenants/${tenantId}`,
|
|
69
|
+
body,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
if (operation === 'bulkDelete') {
|
|
73
|
+
const tenantIdsStr = this.getNodeParameter('tenantIds', index);
|
|
74
|
+
const tenantIds = parseIds(tenantIdsStr);
|
|
75
|
+
return await this.helpers.httpRequest({
|
|
76
|
+
method: 'POST',
|
|
77
|
+
url: '/api/v1/tenants/bulk-delete',
|
|
78
|
+
body: {
|
|
79
|
+
tenantIds,
|
|
80
|
+
},
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
throw new Error(`Unknown operation: ${operation}`);
|
|
84
|
+
}
|
|
85
|
+
//# sourceMappingURL=TenantRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TenantRouter.js","sourceRoot":"","sources":["../../../../../src/nodes/ImmyBot/resources/Tenant/TenantRouter.ts"],"names":[],"mappings":";;AAsBA,oCA+EC;AAnGD,SAAS,uBAAuB,CAAC,KAA2B;IAC3D,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,OAAO,KAAK,CAAC;IACd,CAAC;IACD,OAAQ,KAAK,CAAC,KAAgB,IAAI,EAAE,CAAC;AACtC,CAAC;AAED,SAAS,QAAQ,CAAC,KAAwB;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC/B,IAAI,KAAK,CAAC,UAAU,CAAC,G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