@forge/manifest 11.0.0-next.0 → 11.0.0-next.10
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/CHANGELOG.md +61 -0
- package/README.md +22 -0
- package/out/mapping/product-event-to-scope-mapping.json +2 -0
- package/out/processor/product-trigger-validation-processor.d.ts.map +1 -1
- package/out/schema/manifest-schema.json +256 -8
- package/out/schema/manifest.d.ts +449 -25
- package/out/scopes/shipyard-scopes.json +5 -0
- package/out/types/module-types.d.ts +2 -0
- package/out/types/module-types.d.ts.map +1 -1
- package/out/types/module-types.js +2 -0
- package/out/types/validation-types.d.ts +7 -0
- package/out/types/validation-types.d.ts.map +1 -1
- package/out/validators/index.d.ts +1 -0
- package/out/validators/index.d.ts.map +1 -1
- package/out/validators/index.js +1 -0
- package/out/validators/product-trigger-scopes-validator.d.ts +5 -1
- package/out/validators/product-trigger-scopes-validator.d.ts.map +1 -1
- package/out/validators/product-trigger-scopes-validator.js +9 -7
- package/out/validators/simple-trigger-scope-validator.d.ts +3 -0
- package/out/validators/simple-trigger-scope-validator.d.ts.map +1 -0
- package/out/validators/simple-trigger-scope-validator.js +17 -0
- package/package.json +1 -1
|
@@ -133,6 +133,8 @@
|
|
|
133
133
|
"read:app-data:confluence",
|
|
134
134
|
"read:app-data:jira",
|
|
135
135
|
"read:app-global-channel:realtime",
|
|
136
|
+
"read:app-notification:confluence",
|
|
137
|
+
"read:app-notification:jira",
|
|
136
138
|
"read:app-system-token",
|
|
137
139
|
"read:app-user-token",
|
|
138
140
|
"read:application-role:jira",
|
|
@@ -219,6 +221,7 @@
|
|
|
219
221
|
"read:forge-app:confluence",
|
|
220
222
|
"read:forge-app:jira",
|
|
221
223
|
"read:forge-proxy:support-api-gateway",
|
|
224
|
+
"read:graph:jira",
|
|
222
225
|
"read:group:confluence",
|
|
223
226
|
"read:group:jira",
|
|
224
227
|
"read:hierarchical-content:confluence",
|
|
@@ -365,6 +368,8 @@
|
|
|
365
368
|
"redact:issue:jira",
|
|
366
369
|
"report:personal-data",
|
|
367
370
|
"search:confluence",
|
|
371
|
+
"send:app-notification:confluence",
|
|
372
|
+
"send:app-notification:jira",
|
|
368
373
|
"send:notification:jira",
|
|
369
374
|
"space-admin:connect-confluence",
|
|
370
375
|
"storage:app",
|
|
@@ -6,6 +6,7 @@ export declare enum AllModuleTypes {
|
|
|
6
6
|
CoreAPIRoute = "core:apiRoute",
|
|
7
7
|
CoreEvent = "core:event",
|
|
8
8
|
CoreConsumer = "core:consumer",
|
|
9
|
+
CoreFifoConsumer = "core:fifoConsumer",
|
|
9
10
|
CoreScheduledTrigger = "core:scheduledTrigger",
|
|
10
11
|
CoreEndpoint = "core:endpoint",
|
|
11
12
|
CoreMigration = "core:migration",
|
|
@@ -182,6 +183,7 @@ export declare enum AllModuleTypes {
|
|
|
182
183
|
AutomationForConfluenceI18n = "automation:i18n",
|
|
183
184
|
AutomationActionProvider = "automation:actionProvider",
|
|
184
185
|
RovoAgent = "rovo:agent",
|
|
186
|
+
RovoAgentConnector = "rovo:agentConnector",
|
|
185
187
|
CoreAction = "core:action",
|
|
186
188
|
GraphEntityProvider = "graph:entityProvider",
|
|
187
189
|
GraphConnector = "graph:connector",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-types.d.ts","sourceRoot":"","sources":["../../src/types/module-types.ts"],"names":[],"mappings":"AAAA,oBAAY,cAAc;IACxB,YAAY,kBAAkB;IAC9B,YAAY,kBAAkB;IAC9B,WAAW,iBAAiB;IAC5B,cAAc,oBAAoB;IAClC,YAAY,kBAAkB;IAC9B,SAAS,eAAe;IACxB,YAAY,kBAAkB;IAC9B,oBAAoB,0BAA0B;IAC9C,YAAY,kBAAkB;IAC9B,aAAa,mBAAmB;IAChC,UAAU,gBAAgB;IAC1B,OAAO,aAAa;IACpB,MAAM,qBAAqB;IAC3B,OAAO,aAAa;IACpB,QAAQ,cAAc;IACtB,sBAAsB,4BAA4B;IAClD,gBAAgB,s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A4B,kCAAkC;IAC9D,uBAAuB,6BAA6B;IACpD,4BAA4B,kCAAkC;CAC/D;AAED,eAAO,MAAM,iBAAiB,kBAAgC,CAAC;AAE/D,eAAO,MAAM,uBAAuB,UAAwE,CAAC"}
|
|
@@ -10,6 +10,7 @@ var AllModuleTypes;
|
|
|
10
10
|
AllModuleTypes["CoreAPIRoute"] = "core:apiRoute";
|
|
11
11
|
AllModuleTypes["CoreEvent"] = "core:event";
|
|
12
12
|
AllModuleTypes["CoreConsumer"] = "core:consumer";
|
|
13
|
+
AllModuleTypes["CoreFifoConsumer"] = "core:fifoConsumer";
|
|
13
14
|
AllModuleTypes["CoreScheduledTrigger"] = "core:scheduledTrigger";
|
|
14
15
|
AllModuleTypes["CoreEndpoint"] = "core:endpoint";
|
|
15
16
|
AllModuleTypes["CoreMigration"] = "core:migration";
|
|
@@ -186,6 +187,7 @@ var AllModuleTypes;
|
|
|
186
187
|
AllModuleTypes["AutomationForConfluenceI18n"] = "automation:i18n";
|
|
187
188
|
AllModuleTypes["AutomationActionProvider"] = "automation:actionProvider";
|
|
188
189
|
AllModuleTypes["RovoAgent"] = "rovo:agent";
|
|
190
|
+
AllModuleTypes["RovoAgentConnector"] = "rovo:agentConnector";
|
|
189
191
|
AllModuleTypes["CoreAction"] = "core:action";
|
|
190
192
|
AllModuleTypes["GraphEntityProvider"] = "graph:entityProvider";
|
|
191
193
|
AllModuleTypes["GraphConnector"] = "graph:connector";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RequiredScopes } from '../scopes';
|
|
1
2
|
export declare enum ValidationTypes {
|
|
2
3
|
BASIC = "basic",
|
|
3
4
|
FULL = "full",
|
|
@@ -6,4 +7,10 @@ export declare enum ValidationTypes {
|
|
|
6
7
|
FORGE_REMOTE_COMPUTE = "forge-remote-compute",
|
|
7
8
|
DEPRECATED_EGRESS_PERMISSIONS = "deprecated-egress-permissions"
|
|
8
9
|
}
|
|
10
|
+
export interface TriggerScopeValidationResult {
|
|
11
|
+
valid: boolean;
|
|
12
|
+
event: string;
|
|
13
|
+
missingScopes: string[];
|
|
14
|
+
requiredScopes: RequiredScopes | null;
|
|
15
|
+
}
|
|
9
16
|
//# sourceMappingURL=validation-types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation-types.d.ts","sourceRoot":"","sources":["../../src/types/validation-types.ts"],"names":[],"mappings":"AAAA,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,qBAAqB,0BAA0B;IAC/C,oBAAoB,yBAAyB;IAC7C,6BAA6B,kCAAkC;CAChE"}
|
|
1
|
+
{"version":3,"file":"validation-types.d.ts","sourceRoot":"","sources":["../../src/types/validation-types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAE3C,oBAAY,eAAe;IACzB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,eAAe,oBAAoB;IACnC,qBAAqB,0BAA0B;IAC/C,oBAAoB,yBAAyB;IAC7C,6BAA6B,kCAAkC;CAChE;AAKD,MAAM,WAAW,4BAA4B;IAC3C,KAAK,EAAE,OAAO,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,cAAc,EAAE,cAAc,GAAG,IAAI,CAAC;CACvC"}
|
|
@@ -7,6 +7,7 @@ export * from './validator-interface';
|
|
|
7
7
|
export * from './resources-validator';
|
|
8
8
|
export * from './display-conditions-validator';
|
|
9
9
|
export * from './product-trigger-scopes-validator';
|
|
10
|
+
export * from './simple-trigger-scope-validator';
|
|
10
11
|
export * from './providers-validator';
|
|
11
12
|
export * from './permissions-validator';
|
|
12
13
|
export * from './connect-remote-validator';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/validators/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,oCAAoC,CAAC;AACnD,cAAc,kCAAkC,CAAC;AACjD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC"}
|
package/out/validators/index.js
CHANGED
|
@@ -10,6 +10,7 @@ tslib_1.__exportStar(require("./validator-interface"), exports);
|
|
|
10
10
|
tslib_1.__exportStar(require("./resources-validator"), exports);
|
|
11
11
|
tslib_1.__exportStar(require("./display-conditions-validator"), exports);
|
|
12
12
|
tslib_1.__exportStar(require("./product-trigger-scopes-validator"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./simple-trigger-scope-validator"), exports);
|
|
13
14
|
tslib_1.__exportStar(require("./providers-validator"), exports);
|
|
14
15
|
tslib_1.__exportStar(require("./permissions-validator"), exports);
|
|
15
16
|
tslib_1.__exportStar(require("./connect-remote-validator"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ManifestObject, ManifestValidationResult } from '../types';
|
|
2
2
|
import { ValidatorInterface } from './validator-interface';
|
|
3
|
-
import { ManifestSchema } from '../schema/manifest';
|
|
3
|
+
import { ManifestSchema, Scopes } from '../schema/manifest';
|
|
4
4
|
import { RequiredScopes } from '../scopes';
|
|
5
5
|
export interface MappingEntry {
|
|
6
6
|
productEvent: string;
|
|
@@ -9,6 +9,10 @@ export interface MappingEntry {
|
|
|
9
9
|
export interface MappingConfig {
|
|
10
10
|
mapping: MappingEntry[];
|
|
11
11
|
}
|
|
12
|
+
export declare function validateEventScopes(event: string, scopes: Scopes | undefined, config: MappingConfig): Promise<{
|
|
13
|
+
requiredScopes: RequiredScopes;
|
|
14
|
+
missingScopes: string[];
|
|
15
|
+
}>;
|
|
12
16
|
export declare class ProductTriggerScopesValidator<T> implements ValidatorInterface<ManifestObject<ManifestSchema> | undefined, ManifestSchema> {
|
|
13
17
|
private readonly config;
|
|
14
18
|
constructor(config: MappingConfig);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-trigger-scopes-validator.d.ts","sourceRoot":"","sources":["../../src/validators/product-trigger-scopes-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"product-trigger-scopes-validator.d.ts","sourceRoot":"","sources":["../../src/validators/product-trigger-scopes-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAmB,MAAM,UAAU,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAG5D,OAAO,EAAoB,cAAc,EAAE,MAAM,WAAW,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,cAAc,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,YAAY,EAAE,CAAC;CACzB;AAcD,wBAAsB,mBAAmB,CACvC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,GAAG,SAAS,EAC1B,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC;IAAE,cAAc,EAAE,cAAc,CAAC;IAAC,aAAa,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAStE;AAED,qBAAa,6BAA6B,CAAC,CAAC,CAC1C,YAAW,kBAAkB,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,EAAE,cAAc,CAAC;IAE7E,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,aAAa;IAE5C,QAAQ,CACZ,QAAQ,EAAE,cAAc,CAAC,cAAc,CAAC,GAAG,SAAS,GACnD,OAAO,CAAC,wBAAwB,CAAC,cAAc,CAAC,CAAC;CA6CrD"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductTriggerScopesValidator = void 0;
|
|
3
|
+
exports.ProductTriggerScopesValidator = exports.validateEventScopes = void 0;
|
|
4
4
|
const text_1 = require("../text");
|
|
5
5
|
const utils_1 = require("../utils");
|
|
6
6
|
const scopes_1 = require("../scopes");
|
|
7
|
+
async function validateEventScopes(event, scopes, config) {
|
|
8
|
+
const emptyRequiredScopes = { current: [] };
|
|
9
|
+
const requiredScopes = config.mapping.find((entry) => entry.productEvent === event)?.oAuthScopes || emptyRequiredScopes;
|
|
10
|
+
const missingScopes = await (0, scopes_1.getMissingScopes)(scopes, requiredScopes);
|
|
11
|
+
return { requiredScopes, missingScopes };
|
|
12
|
+
}
|
|
13
|
+
exports.validateEventScopes = validateEventScopes;
|
|
7
14
|
class ProductTriggerScopesValidator {
|
|
8
15
|
config;
|
|
9
16
|
constructor(config) {
|
|
@@ -17,10 +24,6 @@ class ProductTriggerScopesValidator {
|
|
|
17
24
|
};
|
|
18
25
|
}
|
|
19
26
|
const validationErrors = [];
|
|
20
|
-
const getRequiredScopes = (productEvent) => {
|
|
21
|
-
const emptyRequiredScopes = { current: [] };
|
|
22
|
-
return (this.config.mapping.find((value) => value.productEvent == productEvent)?.oAuthScopes || emptyRequiredScopes);
|
|
23
|
-
};
|
|
24
27
|
const addValidationError = (scope, event) => {
|
|
25
28
|
validationErrors.push({
|
|
26
29
|
message: text_1.errors.permissions.missingPermissionFromScope(scope, event),
|
|
@@ -41,8 +44,7 @@ class ProductTriggerScopesValidator {
|
|
|
41
44
|
const manifestScopes = manifest.typedContent.permissions?.scopes || [];
|
|
42
45
|
for (const element of manifest.typedContent.modules.trigger) {
|
|
43
46
|
for (const event of element.events) {
|
|
44
|
-
const
|
|
45
|
-
const missingScopes = await (0, scopes_1.getMissingScopes)(manifestScopes, requiredScopes);
|
|
47
|
+
const { missingScopes } = await validateEventScopes(event, manifestScopes, this.config);
|
|
46
48
|
missingScopes.forEach((scope) => addValidationError(scope, event));
|
|
47
49
|
}
|
|
48
50
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"simple-trigger-scope-validator.d.ts","sourceRoot":"","sources":["../../src/validators/simple-trigger-scope-validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,2BAA2B,CAAC;AA4BzE,wBAAsB,qBAAqB,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAgBlH"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.validateTriggerScopes = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const product_trigger_scopes_validator_1 = require("./product-trigger-scopes-validator");
|
|
6
|
+
const EVENT_SCOPE_MAPPING = tslib_1.__importStar(require("../mapping/product-event-to-scope-mapping.json"));
|
|
7
|
+
async function validateTriggerScopes(event, scopes) {
|
|
8
|
+
const { requiredScopes, missingScopes } = await (0, product_trigger_scopes_validator_1.validateEventScopes)(event, scopes, EVENT_SCOPE_MAPPING);
|
|
9
|
+
const hasRequirements = requiredScopes.current.length > 0;
|
|
10
|
+
return {
|
|
11
|
+
valid: missingScopes.length === 0,
|
|
12
|
+
event,
|
|
13
|
+
missingScopes,
|
|
14
|
+
requiredScopes: hasRequirements ? requiredScopes : null
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
exports.validateTriggerScopes = validateTriggerScopes;
|