@telos-dev-team/dealernode-permissions 1.1.44 → 1.1.46

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.
@@ -63,6 +63,21 @@ export declare const BACKOFFICE_PERMISSIONS: {
63
63
  readonly VIEW: "backoffice.dealer_roles.view";
64
64
  readonly MANAGE: "backoffice.dealer_roles.manage";
65
65
  };
66
+ /**
67
+ * Platform-to-dealer billing (dealernode-backend `src/billing`): plans,
68
+ * global charge provider, dealer subscriptions, cards and invoices. Not
69
+ * PAYMENTS, which is what a dealer charges its own buyers.
70
+ */
71
+ readonly BILLING: {
72
+ readonly VIEW: "backoffice.billing.view";
73
+ readonly MANAGE: "backoffice.billing.manage";
74
+ /**
75
+ * Load and change the platform's merchant credentials on each charge
76
+ * provider. Separate from MANAGE because these keys move money: whoever
77
+ * manages plans and subscriptions doesn't need to be able to change them.
78
+ */
79
+ readonly CREDENTIALS: "backoffice.billing.credentials";
80
+ };
66
81
  };
67
82
  export type BackofficePermission = typeof BACKOFFICE_PERMISSIONS;
68
83
  /**
@@ -82,10 +97,10 @@ export type BackofficePermissionId = Leaves<BackofficePermission>;
82
97
  */
83
98
  export declare const BACKOFFICE_PERMISSION_PRESETS: {
84
99
  /** Every `*.view` permission, nothing else. */
85
- readonly READ_ONLY: ("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage")[];
100
+ readonly READ_ONLY: ("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage" | "backoffice.billing.view" | "backoffice.billing.manage" | "backoffice.billing.credentials")[];
86
101
  /** Read-only plus the two areas support routinely needs to act on. */
87
- readonly SUPPORT: readonly [...("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage")[], "backoffice.dealers.manage", "backoffice.dealer_resources.manage"];
102
+ readonly SUPPORT: readonly [...("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage" | "backoffice.billing.view" | "backoffice.billing.manage" | "backoffice.billing.credentials")[], "backoffice.dealers.manage", "backoffice.dealer_resources.manage"];
88
103
  /** Every backoffice permission. */
89
- readonly ADMIN: ("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage")[];
104
+ readonly ADMIN: ("backoffice.dealers.view" | "backoffice.dealers.manage" | "backoffice.users.view" | "backoffice.users.manage" | "backoffice.permissions.manage" | "backoffice.payments.view" | "backoffice.payments.manage" | "backoffice.dealer_resources.view" | "backoffice.dealer_resources.manage" | "backoffice.catalog.view" | "backoffice.catalog.manage" | "backoffice.dealer_roles.view" | "backoffice.dealer_roles.manage" | "backoffice.billing.view" | "backoffice.billing.manage" | "backoffice.billing.credentials")[];
90
105
  };
91
106
  export {};
@@ -66,6 +66,21 @@ exports.BACKOFFICE_PERMISSIONS = {
66
66
  VIEW: "backoffice.dealer_roles.view",
67
67
  MANAGE: "backoffice.dealer_roles.manage",
68
68
  },
69
+ /**
70
+ * Platform-to-dealer billing (dealernode-backend `src/billing`): plans,
71
+ * global charge provider, dealer subscriptions, cards and invoices. Not
72
+ * PAYMENTS, which is what a dealer charges its own buyers.
73
+ */
74
+ BILLING: {
75
+ VIEW: "backoffice.billing.view",
76
+ MANAGE: "backoffice.billing.manage",
77
+ /**
78
+ * Load and change the platform's merchant credentials on each charge
79
+ * provider. Separate from MANAGE because these keys move money: whoever
80
+ * manages plans and subscriptions doesn't need to be able to change them.
81
+ */
82
+ CREDENTIALS: "backoffice.billing.credentials",
83
+ },
69
84
  };
70
85
  function flatten(node) {
71
86
  const values = [];
@@ -738,5 +738,13 @@ export declare const PERMISSIONS: {
738
738
  };
739
739
  };
740
740
  };
741
+ readonly CRM: {
742
+ readonly CONVERSATION: {
743
+ readonly OPERATIONS: {
744
+ readonly VIEW: "crm.conversation.operations.view";
745
+ readonly REPLY: "crm.conversation.operations.reply";
746
+ };
747
+ };
748
+ };
741
749
  };
742
750
  export type Permission = typeof PERMISSIONS;
@@ -822,4 +822,15 @@ exports.PERMISSIONS = {
822
822
  },
823
823
  },
824
824
  },
825
+ // ============================================
826
+ // CRM
827
+ // ============================================
828
+ CRM: {
829
+ CONVERSATION: {
830
+ OPERATIONS: {
831
+ VIEW: "crm.conversation.operations.view",
832
+ REPLY: "crm.conversation.operations.reply",
833
+ },
834
+ },
835
+ },
825
836
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telos-dev-team/dealernode-permissions",
3
- "version": "1.1.44",
3
+ "version": "1.1.46",
4
4
  "description": "Shared permissions constants for dealernode projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -63,6 +63,21 @@ export const BACKOFFICE_PERMISSIONS = {
63
63
  VIEW: "backoffice.dealer_roles.view",
64
64
  MANAGE: "backoffice.dealer_roles.manage",
65
65
  },
66
+ /**
67
+ * Platform-to-dealer billing (dealernode-backend `src/billing`): plans,
68
+ * global charge provider, dealer subscriptions, cards and invoices. Not
69
+ * PAYMENTS, which is what a dealer charges its own buyers.
70
+ */
71
+ BILLING: {
72
+ VIEW: "backoffice.billing.view",
73
+ MANAGE: "backoffice.billing.manage",
74
+ /**
75
+ * Load and change the platform's merchant credentials on each charge
76
+ * provider. Separate from MANAGE because these keys move money: whoever
77
+ * manages plans and subscriptions doesn't need to be able to change them.
78
+ */
79
+ CREDENTIALS: "backoffice.billing.credentials",
80
+ },
66
81
  } as const;
67
82
 
68
83
  export type BackofficePermission = typeof BACKOFFICE_PERMISSIONS;
@@ -849,6 +849,18 @@ export const PERMISSIONS = {
849
849
  },
850
850
  },
851
851
  },
852
+
853
+ // ============================================
854
+ // CRM
855
+ // ============================================
856
+ CRM: {
857
+ CONVERSATION: {
858
+ OPERATIONS: {
859
+ VIEW: "crm.conversation.operations.view",
860
+ REPLY: "crm.conversation.operations.reply",
861
+ },
862
+ },
863
+ },
852
864
  } as const;
853
865
 
854
866
  export type Permission = typeof PERMISSIONS;