@clxmedia/xperience-rights-client 1.1.12 → 1.2.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/dist/client.d.ts CHANGED
@@ -14,9 +14,6 @@ export declare const CLIQ_GROUPS: {
14
14
  export declare const CLIQ_ROLES: {
15
15
  [x: string]: string;
16
16
  };
17
- export declare const FRIENDLY_SCOPE_NAMES: {
18
- [key in XperienceScopes]: string;
19
- };
20
17
  export declare class XperienceRightsClient {
21
18
  static findAbility(data: XperienceRightsData, scope: XperienceScopes, qualifier?: number): XperienceAbility;
22
19
  static cliqLocatorDescription(locator: CLiQUserLocator | null, long?: boolean): string | null;
@@ -25,5 +22,4 @@ export declare class XperienceRightsClient {
25
22
  static abilityValue(ability: XperienceAbility): number;
26
23
  static compareAbilities(a: XperienceAbility, b: XperienceAbility, comparison?: "enough" | "better"): boolean;
27
24
  static bestAbility(...abilities: XperienceAbility[]): XperienceAbility;
28
- static xperienceScopeName(scope: XperienceScopes): string;
29
25
  }
package/dist/client.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.XperienceRightsClient = exports.FRIENDLY_SCOPE_NAMES = exports.CLIQ_ROLES = exports.CLIQ_GROUPS = exports.ODOO_ROLES = void 0;
3
+ exports.XperienceRightsClient = exports.CLIQ_ROLES = exports.CLIQ_GROUPS = exports.ODOO_ROLES = void 0;
4
4
  exports.ODOO_ROLES = {
5
5
  proofing_contact: {
6
6
  id: 2,
@@ -81,30 +81,6 @@ exports.CLIQ_ROLES = {
81
81
  account_manager: "Account Manager",
82
82
  task_assignee: "Task Assignee",
83
83
  };
84
- exports.FRIENDLY_SCOPE_NAMES = {
85
- company: "Property",
86
- tasks: "Tasks",
87
- displayreview: "Display Review",
88
- platform: "Platform",
89
- users: "Users",
90
- forms: "Forms",
91
- gbpreview: "GBP Review",
92
- gbpa: "GBPA",
93
- insights: "Insights",
94
- mac: "Meta",
95
- macreview: "MAC Review",
96
- billing: "Billing",
97
- mediahub: "Media Hub",
98
- onboarding: "Onboarding",
99
- adrequests: "Ad Requests",
100
- dashboard: "Dashboard",
101
- videoreview: "Video Review",
102
- video: "Video",
103
- tcc: "The Conversion Cloud",
104
- search: "Search Builder",
105
- searchreview: "Search Review",
106
- pmaxreview: "PMax Review",
107
- };
108
84
  class XperienceRightsClient {
109
85
  static findAbility(data, scope, qualifier) {
110
86
  if (!data || !data.rights) {
@@ -149,8 +125,8 @@ class XperienceRightsClient {
149
125
  if (locator.type === "right") {
150
126
  const [scope, ability] = locator.value.split("@");
151
127
  return long
152
- ? `any ${locator.constraint ? `${locator.constraint} ` : ""}user with the ${exports.FRIENDLY_SCOPE_NAMES[scope]} ${ability} rights`
153
- : `${exports.FRIENDLY_SCOPE_NAMES[scope]} ${ability}${locator.constraint ? ` (${locator.constraint})` : ""}`;
128
+ ? `any ${locator.constraint ? `${locator.constraint} ` : ""}user with the ${scope} ${ability} rights`
129
+ : `${scope} ${ability}${locator.constraint ? ` (${locator.constraint})` : ""}`;
154
130
  }
155
131
  if (locator.type === "odoo_role") {
156
132
  return `${long ? "any user with the Odoo role: " : ""}${exports.ODOO_ROLES[locator.value]
@@ -232,8 +208,5 @@ class XperienceRightsClient {
232
208
  : best;
233
209
  }, "none");
234
210
  }
235
- static xperienceScopeName(scope) {
236
- return exports.FRIENDLY_SCOPE_NAMES[scope] || "Unknown";
237
- }
238
211
  }
239
212
  exports.XperienceRightsClient = XperienceRightsClient;
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export { XperienceRightsClient, CLIQ_GROUPS, CLIQ_ROLES, FRIENDLY_SCOPE_NAMES, ODOO_ROLES, OdooRole, } from './client';
1
+ export { XperienceRightsClient, CLIQ_GROUPS, CLIQ_ROLES, ODOO_ROLES, OdooRole, } from './client';
package/dist/index.js CHANGED
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ODOO_ROLES = exports.FRIENDLY_SCOPE_NAMES = exports.CLIQ_ROLES = exports.CLIQ_GROUPS = exports.XperienceRightsClient = void 0;
3
+ exports.ODOO_ROLES = exports.CLIQ_ROLES = exports.CLIQ_GROUPS = exports.XperienceRightsClient = void 0;
4
4
  var client_1 = require("./client");
5
5
  Object.defineProperty(exports, "XperienceRightsClient", { enumerable: true, get: function () { return client_1.XperienceRightsClient; } });
6
6
  Object.defineProperty(exports, "CLIQ_GROUPS", { enumerable: true, get: function () { return client_1.CLIQ_GROUPS; } });
7
7
  Object.defineProperty(exports, "CLIQ_ROLES", { enumerable: true, get: function () { return client_1.CLIQ_ROLES; } });
8
- Object.defineProperty(exports, "FRIENDLY_SCOPE_NAMES", { enumerable: true, get: function () { return client_1.FRIENDLY_SCOPE_NAMES; } });
9
8
  Object.defineProperty(exports, "ODOO_ROLES", { enumerable: true, get: function () { return client_1.ODOO_ROLES; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/xperience-rights-client",
3
- "version": "1.1.12",
3
+ "version": "1.2.1",
4
4
  "description": "CLXperience Rights Client",
5
5
  "author": "Brandon Thompson <brandont@clxmedia.com>",
6
6
  "license": "MIT",
@@ -32,7 +32,7 @@
32
32
  },
33
33
  "bugs": "https://github.com/adsupnow/xperience-library/xperience-rights-client",
34
34
  "dependencies": {
35
- "@clxmedia/types": "1.3.0"
35
+ "@clxmedia/types": "1.5.1"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@types/jest": "29.5.11",