@mondaydotcomorg/monday-authorization 1.1.9-featureyardenresource-attributes-api-support-authz-sdk.1565 → 1.1.9-featureyardenresource-attributes-api-support-authz-sdk.1567
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/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/lib/authorization-attributes-service.d.ts +4 -8
- package/dist/lib/authorization-attributes-service.js +1 -2
- package/dist/lib/authorization-service.d.ts +1 -1
- package/dist/lib/authorization-service.js +1 -1
- package/dist/lib/types/authorization-attributes-contracts.d.ts +4 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export interface InitOptions {
|
|
|
8
8
|
export declare function init(options?: InitOptions): void;
|
|
9
9
|
export { authorizationCheckMiddleware, getAuthorizationMiddleware, skipAuthorizationMiddleware, } from './lib/authorization-middleware';
|
|
10
10
|
export { AuthorizationService } from './lib/authorization-service';
|
|
11
|
+
export { AuthorizationAttributesService } from './lib/authorization-attributes-service';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuthorizationService = exports.skipAuthorizationMiddleware = exports.getAuthorizationMiddleware = exports.authorizationCheckMiddleware = exports.init = void 0;
|
|
3
|
+
exports.AuthorizationAttributesService = exports.AuthorizationService = exports.skipAuthorizationMiddleware = exports.getAuthorizationMiddleware = exports.authorizationCheckMiddleware = exports.init = void 0;
|
|
4
4
|
const prometheus_service_1 = require("./lib/prometheus-service");
|
|
5
5
|
const authorization_service_1 = require("./lib/authorization-service");
|
|
6
6
|
function init(options = {}) {
|
|
@@ -21,3 +21,5 @@ Object.defineProperty(exports, "getAuthorizationMiddleware", { enumerable: true,
|
|
|
21
21
|
Object.defineProperty(exports, "skipAuthorizationMiddleware", { enumerable: true, get: function () { return authorization_middleware_1.skipAuthorizationMiddleware; } });
|
|
22
22
|
var authorization_service_2 = require("./lib/authorization-service");
|
|
23
23
|
Object.defineProperty(exports, "AuthorizationService", { enumerable: true, get: function () { return authorization_service_2.AuthorizationService; } });
|
|
24
|
+
var authorization_attributes_service_1 = require("./lib/authorization-attributes-service");
|
|
25
|
+
Object.defineProperty(exports, "AuthorizationAttributesService", { enumerable: true, get: function () { return authorization_attributes_service_1.AuthorizationAttributesService; } });
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import { ResourceAttributeAssignment } from '
|
|
2
|
-
import { Resource } from '
|
|
1
|
+
import { ResourceAttributeAssignment, ResourceAttributeResponse } from './types/authorization-attributes-contracts';
|
|
2
|
+
import { Resource } from './types/general';
|
|
3
3
|
export declare class AuthorizationAttributesService {
|
|
4
|
-
static upsertResourceAttributesSync(accountId: number, userId: number, resourceAttributesAssignments: ResourceAttributeAssignment[]): Promise<
|
|
5
|
-
|
|
6
|
-
}>;
|
|
7
|
-
static deleteResourceAttributesSync(accountId: number, resource: Resource, attributeKeys: string[]): Promise<{
|
|
8
|
-
attributes: any;
|
|
9
|
-
}>;
|
|
4
|
+
static upsertResourceAttributesSync(accountId: number, userId: number, resourceAttributesAssignments: ResourceAttributeAssignment[]): Promise<ResourceAttributeResponse>;
|
|
5
|
+
static deleteResourceAttributesSync(accountId: number, resource: Resource, attributeKeys: string[]): Promise<ResourceAttributeResponse>;
|
|
10
6
|
private static getResourceAttributesUrl;
|
|
11
7
|
}
|
|
@@ -11,8 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.AuthorizationAttributesService = void 0;
|
|
13
13
|
const monday_fetch_1 = require("@mondaydotcomorg/monday-fetch");
|
|
14
|
-
const authorization_internal_service_1 = require("
|
|
15
|
-
// TODO : Delete this once done
|
|
14
|
+
const authorization_internal_service_1 = require("./authorization-internal-service");
|
|
16
15
|
class AuthorizationAttributesService {
|
|
17
16
|
static upsertResourceAttributesSync(accountId, userId, resourceAttributesAssignments) {
|
|
18
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MondayFetchOptions } from '@mondaydotcomorg/monday-fetch';
|
|
2
2
|
import { Action, AuthorizationObject, Resource } from './types/general';
|
|
3
|
-
import { ScopedAction, ScopedActionPermit, ScopedActionResponseObject, ScopeOptions } from '
|
|
3
|
+
import { ScopedAction, ScopedActionPermit, ScopedActionResponseObject, ScopeOptions } from './types/scoped-actions-contracts';
|
|
4
4
|
export interface AuthorizeResponse {
|
|
5
5
|
isAuthorized: boolean;
|
|
6
6
|
unauthorizedIds?: number[];
|
|
@@ -14,7 +14,7 @@ const lodash_1 = require("lodash");
|
|
|
14
14
|
const perf_hooks_1 = require("perf_hooks");
|
|
15
15
|
const monday_fetch_1 = require("@mondaydotcomorg/monday-fetch");
|
|
16
16
|
const prometheus_service_1 = require("./prometheus-service");
|
|
17
|
-
const authorization_internal_service_1 = require("
|
|
17
|
+
const authorization_internal_service_1 = require("./authorization-internal-service");
|
|
18
18
|
const GRANTED_FEATURE_CACHE_EXPIRATION_SECONDS = 5 * 60;
|
|
19
19
|
function setRequestFetchOptions(customMondayFetchOptions) {
|
|
20
20
|
authorization_internal_service_1.AuthorizationInternalService.setRequestFetchOptions(customMondayFetchOptions);
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { Resource } from '
|
|
1
|
+
import { Resource } from './general';
|
|
2
2
|
export interface ResourceAttributeAssignment {
|
|
3
3
|
resourceType: Resource['type'];
|
|
4
4
|
resourceId: Resource['id'];
|
|
5
5
|
key: string;
|
|
6
6
|
value: string;
|
|
7
7
|
}
|
|
8
|
+
export interface ResourceAttributeResponse {
|
|
9
|
+
attributes: ResourceAttributeAssignment[];
|
|
10
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mondaydotcomorg/monday-authorization",
|
|
3
|
-
"version": "1.1.9-featureyardenresource-attributes-api-support-authz-sdk.
|
|
3
|
+
"version": "1.1.9-featureyardenresource-attributes-api-support-authz-sdk.1567+85160f426",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -32,5 +32,5 @@
|
|
|
32
32
|
"files": [
|
|
33
33
|
"dist/"
|
|
34
34
|
],
|
|
35
|
-
"gitHead": "
|
|
35
|
+
"gitHead": "85160f426f62e99586c1a3011f94cd2f0a7807e4"
|
|
36
36
|
}
|