@mondaydotcomorg/monday-authorization 1.1.9-featureyardenresource-attributes-api-support-authz-sdk.1567 → 1.1.9-featureyardenresource-attributes-api-support-authz-sdk.1568
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ResourceAttributeAssignment, ResourceAttributeResponse } from './types/authorization-attributes-contracts';
|
|
2
2
|
import { Resource } from './types/general';
|
|
3
3
|
export declare class AuthorizationAttributesService {
|
|
4
|
-
static upsertResourceAttributesSync(accountId: number, userId: number,
|
|
4
|
+
static upsertResourceAttributesSync(accountId: number, userId: number, resourceAttributeAssignments: ResourceAttributeAssignment[]): Promise<ResourceAttributeResponse>;
|
|
5
5
|
static deleteResourceAttributesSync(accountId: number, resource: Resource, attributeKeys: string[]): Promise<ResourceAttributeResponse>;
|
|
6
6
|
private static getResourceAttributesUrl;
|
|
7
7
|
}
|
|
@@ -13,14 +13,14 @@ exports.AuthorizationAttributesService = void 0;
|
|
|
13
13
|
const monday_fetch_1 = require("@mondaydotcomorg/monday-fetch");
|
|
14
14
|
const authorization_internal_service_1 = require("./authorization-internal-service");
|
|
15
15
|
class AuthorizationAttributesService {
|
|
16
|
-
static upsertResourceAttributesSync(accountId, userId,
|
|
16
|
+
static upsertResourceAttributesSync(accountId, userId, resourceAttributeAssignments) {
|
|
17
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
18
|
const internalAuthToken = authorization_internal_service_1.AuthorizationInternalService.generateInternalAuthToken(accountId, userId);
|
|
19
19
|
const response = yield (0, monday_fetch_1.fetch)(this.getResourceAttributesUrl(accountId), {
|
|
20
20
|
method: 'POST',
|
|
21
21
|
headers: { Authorization: internalAuthToken, 'Content-Type': 'application/json' },
|
|
22
22
|
timeout: authorization_internal_service_1.AuthorizationInternalService.getRequestTimeout(),
|
|
23
|
-
body: JSON.stringify({
|
|
23
|
+
body: JSON.stringify({ resourceAttributeAssignments }),
|
|
24
24
|
}, authorization_internal_service_1.AuthorizationInternalService.getRequestFetchOptions());
|
|
25
25
|
const responseBody = yield response.json();
|
|
26
26
|
authorization_internal_service_1.AuthorizationInternalService.throwOnHttpErrorIfNeeded(response, 'upsertResourceAttributesSync');
|
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.1568+580506c24",
|
|
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": "580506c248d4f1d0b7dc3f4aa6242b2aaa488df8"
|
|
36
36
|
}
|