@mondaydotcomorg/monday-authorization 1.1.9-authzbashanyeadd-async-resource-attributes-support.3112 → 1.1.9-authzbashanyeadd-async-resource-attributes-support.3114

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.
@@ -15,6 +15,9 @@ const authorization_internal_service_1 = require("./authorization-internal-servi
15
15
  const attributions_service_1 = require("./attributions-service");
16
16
  const trident_backend_api_1 = require("@mondaydotcomorg/trident-backend-api");
17
17
  const monday_sns_1 = require("@mondaydotcomorg/monday-sns");
18
+ // TODO:
19
+ // Add UT
20
+ // Add optional health check (export it as a function, so clients can subscribe to it in the initialization)
18
21
  class AuthorizationAttributesService {
19
22
  /**
20
23
  * Upsert resource attributes synchronously, performing http call to the authorization MS to assign the given attributes to the given resource.
@@ -76,13 +79,16 @@ class AuthorizationAttributesService {
76
79
  const upsertOperations = this.getUpsertOperations(resourceAttributeUpserts);
77
80
  const deleteOperations = this.getDeleteOperations(resourceAttributeDeletes);
78
81
  const payload = {
79
- accountId: accountId,
80
- callerAppName: appName,
81
- callerActionIdentifier: "test-action",
82
- operations: [
83
- ...upsertOperations,
84
- ...deleteOperations,
85
- ],
82
+ kind: 'resourceAttributeModification',
83
+ payload: {
84
+ accountId: accountId,
85
+ callerAppName: appName,
86
+ callerActionIdentifier: "test-action",
87
+ operations: [
88
+ ...upsertOperations,
89
+ ...deleteOperations,
90
+ ],
91
+ }
86
92
  };
87
93
  yield (0, monday_sns_1.sendToSns)(payload, topicArn);
88
94
  });
@@ -95,8 +101,8 @@ class AuthorizationAttributesService {
95
101
  }
96
102
  static getSnsTopicArn() {
97
103
  var _a;
98
- return ((_a = trident_backend_api_1.Api.getPart('configurationVariables')) === null || _a === void 0 ? void 0 : _a.get('authorization_resource_attributes_sns')) ||
99
- process.env.AUTHORIZATION_RESOURCE_ATTRIBUTES_SNS;
104
+ return ((_a = trident_backend_api_1.Api.getPart('configurationVariables')) === null || _a === void 0 ? void 0 : _a.get('authorization_resource_attributes_sns_topic').arn) ||
105
+ process.env.AUTHORIZATION_RESOURCE_ATTRIBUTES_SNS_TOPIC;
100
106
  }
101
107
  static getResourceAttributesUrl(accountId) {
102
108
  return `${process.env.AUTHORIZATION_URL}/attributes/${accountId}/resource`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/monday-authorization",
3
- "version": "1.1.9-authzbashanyeadd-async-resource-attributes-support.3112+963c7b49f",
3
+ "version": "1.1.9-authzbashanyeadd-async-resource-attributes-support.3114+a146bb976",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "BSD-3-Clause",
@@ -34,5 +34,5 @@
34
34
  "files": [
35
35
  "dist/"
36
36
  ],
37
- "gitHead": "963c7b49f6bf56bb15150dc2b76f0d875c77ec97"
37
+ "gitHead": "a146bb9768748b534920ab53635f3396ee4cb0af"
38
38
  }