sinfactura-types 1.10.404 → 1.10.405
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/cjs/gating.js +8 -0
- package/dist/gating.d.ts +8 -1
- package/dist/gating.js +8 -0
- package/package.json +1 -1
package/dist/cjs/gating.js
CHANGED
|
@@ -37,6 +37,13 @@ exports.GATING_ERROR_CODES = void 0;
|
|
|
37
37
|
* - `WAREHOUSE_OUT_OF_SCOPE` · 403 — `stacks/helpers/warehouseScope.ts`, on a
|
|
38
38
|
* stock write naming a depósito outside the operator's
|
|
39
39
|
* `User.allowedWarehouseIds`; `data.warehouseId` names it.
|
|
40
|
+
* - `ROLE_FORBIDDEN` · 403 — `stacks/helpers/response.ts` (`tryCatch`), ahead
|
|
41
|
+
* of every other gate, when an ACCOUNTANT token reaches a route outside
|
|
42
|
+
* `ACCOUNTANT_ALLOWED_ROUTES` (`@helpers/accountantGate`). ⚠️ The same code is
|
|
43
|
+
* ALSO a member of several domain unions (`cash`, `stock`, `appointment`,
|
|
44
|
+
* `cycleCount`), where a HANDLER refuses a role on its own; that membership
|
|
45
|
+
* describes those routes' own role checks and is NOT this reach — the
|
|
46
|
+
* wrapper answers it on any wrapped route, for an ACCOUNTANT claim.
|
|
40
47
|
*
|
|
41
48
|
* ⚠️ A domain's own error union does NOT list these, and that is deliberate:
|
|
42
49
|
* they are reachable from endpoints whose union predates them, and duplicating
|
|
@@ -60,4 +67,5 @@ exports.GATING_ERROR_CODES = [
|
|
|
60
67
|
'PLAN_UPGRADE_REQUIRED',
|
|
61
68
|
'CAPABILITY_REQUIRED',
|
|
62
69
|
'WAREHOUSE_OUT_OF_SCOPE',
|
|
70
|
+
'ROLE_FORBIDDEN',
|
|
63
71
|
];
|
package/dist/gating.d.ts
CHANGED
|
@@ -34,6 +34,13 @@
|
|
|
34
34
|
* - `WAREHOUSE_OUT_OF_SCOPE` · 403 — `stacks/helpers/warehouseScope.ts`, on a
|
|
35
35
|
* stock write naming a depósito outside the operator's
|
|
36
36
|
* `User.allowedWarehouseIds`; `data.warehouseId` names it.
|
|
37
|
+
* - `ROLE_FORBIDDEN` · 403 — `stacks/helpers/response.ts` (`tryCatch`), ahead
|
|
38
|
+
* of every other gate, when an ACCOUNTANT token reaches a route outside
|
|
39
|
+
* `ACCOUNTANT_ALLOWED_ROUTES` (`@helpers/accountantGate`). ⚠️ The same code is
|
|
40
|
+
* ALSO a member of several domain unions (`cash`, `stock`, `appointment`,
|
|
41
|
+
* `cycleCount`), where a HANDLER refuses a role on its own; that membership
|
|
42
|
+
* describes those routes' own role checks and is NOT this reach — the
|
|
43
|
+
* wrapper answers it on any wrapped route, for an ACCOUNTANT claim.
|
|
37
44
|
*
|
|
38
45
|
* ⚠️ A domain's own error union does NOT list these, and that is deliberate:
|
|
39
46
|
* they are reachable from endpoints whose union predates them, and duplicating
|
|
@@ -45,6 +52,6 @@
|
|
|
45
52
|
* answer `SUBSCRIPTION_READONLY`. Membership here means "exists and is
|
|
46
53
|
* cross-cutting", not "every route emits it".
|
|
47
54
|
*/
|
|
48
|
-
export declare const GATING_ERROR_CODES: readonly ["MAINTENANCE", "IMPERSONATION_READONLY", "IMPERSONATION_SESSION_INVALID", "IMPERSONATION_REGISTRY_UNAVAILABLE", "CSRF_ORIGIN_REJECTED", "SUBSCRIPTION_READONLY", "SUBSCRIPTION_STATE_UNAVAILABLE", "PLAN_LIMIT_EXCEEDED", "PLAN_UPGRADE_REQUIRED", "CAPABILITY_REQUIRED", "WAREHOUSE_OUT_OF_SCOPE"];
|
|
55
|
+
export declare const GATING_ERROR_CODES: readonly ["MAINTENANCE", "IMPERSONATION_READONLY", "IMPERSONATION_SESSION_INVALID", "IMPERSONATION_REGISTRY_UNAVAILABLE", "CSRF_ORIGIN_REJECTED", "SUBSCRIPTION_READONLY", "SUBSCRIPTION_STATE_UNAVAILABLE", "PLAN_LIMIT_EXCEEDED", "PLAN_UPGRADE_REQUIRED", "CAPABILITY_REQUIRED", "WAREHOUSE_OUT_OF_SCOPE", "ROLE_FORBIDDEN"];
|
|
49
56
|
export type GatingErrorCode = (typeof GATING_ERROR_CODES)[number];
|
|
50
57
|
export {};
|
package/dist/gating.js
CHANGED
|
@@ -34,6 +34,13 @@
|
|
|
34
34
|
* - `WAREHOUSE_OUT_OF_SCOPE` · 403 — `stacks/helpers/warehouseScope.ts`, on a
|
|
35
35
|
* stock write naming a depósito outside the operator's
|
|
36
36
|
* `User.allowedWarehouseIds`; `data.warehouseId` names it.
|
|
37
|
+
* - `ROLE_FORBIDDEN` · 403 — `stacks/helpers/response.ts` (`tryCatch`), ahead
|
|
38
|
+
* of every other gate, when an ACCOUNTANT token reaches a route outside
|
|
39
|
+
* `ACCOUNTANT_ALLOWED_ROUTES` (`@helpers/accountantGate`). ⚠️ The same code is
|
|
40
|
+
* ALSO a member of several domain unions (`cash`, `stock`, `appointment`,
|
|
41
|
+
* `cycleCount`), where a HANDLER refuses a role on its own; that membership
|
|
42
|
+
* describes those routes' own role checks and is NOT this reach — the
|
|
43
|
+
* wrapper answers it on any wrapped route, for an ACCOUNTANT claim.
|
|
37
44
|
*
|
|
38
45
|
* ⚠️ A domain's own error union does NOT list these, and that is deliberate:
|
|
39
46
|
* they are reachable from endpoints whose union predates them, and duplicating
|
|
@@ -57,4 +64,5 @@ export const GATING_ERROR_CODES = [
|
|
|
57
64
|
'PLAN_UPGRADE_REQUIRED',
|
|
58
65
|
'CAPABILITY_REQUIRED',
|
|
59
66
|
'WAREHOUSE_OUT_OF_SCOPE',
|
|
67
|
+
'ROLE_FORBIDDEN',
|
|
60
68
|
];
|