@seidor-cloud-produtos/orbit-backend-lib 2.0.91 → 2.0.92

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.
@@ -73,6 +73,13 @@ export declare const traceSchema: z.ZodObject<{
73
73
  }, {
74
74
  "x-trace-id"?: string | undefined;
75
75
  }>;
76
+ export declare const tenantSchema: z.ZodObject<{
77
+ tenantname: z.ZodString;
78
+ }, "strip", z.ZodTypeAny, {
79
+ tenantname: string;
80
+ }, {
81
+ tenantname: string;
82
+ }>;
76
83
  export declare const integrationHeaders: z.ZodObject<z.objectUtil.extendShape<{
77
84
  tenantid: z.ZodString;
78
85
  }, {
@@ -84,7 +91,7 @@ export declare const integrationHeaders: z.ZodObject<z.objectUtil.extendShape<{
84
91
  tenantid: string;
85
92
  "x-trace-id"?: string | undefined;
86
93
  }>;
87
- export declare const authorizerHeaders: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<{
94
+ export declare const authorizerHeaders: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
88
95
  username: z.ZodString;
89
96
  useremail: z.ZodString;
90
97
  userid: z.ZodOptional<z.ZodString>;
@@ -92,34 +99,42 @@ export declare const authorizerHeaders: z.ZodUnion<[z.ZodObject<z.objectUtil.ext
92
99
  tenantid: z.ZodString;
93
100
  }, {
94
101
  "x-trace-id": z.ZodDefault<z.ZodString>;
95
- }>>, "strip", z.ZodTypeAny, {
102
+ }>>, {
103
+ tenantname: z.ZodString;
104
+ }>, "strip", z.ZodTypeAny, {
96
105
  username: string;
97
106
  "x-trace-id": string;
98
107
  tenantid: string;
99
108
  useremail: string;
109
+ tenantname: string;
100
110
  userid?: string | undefined;
101
111
  }, {
102
112
  username: string;
103
113
  tenantid: string;
104
114
  useremail: string;
115
+ tenantname: string;
105
116
  "x-trace-id"?: string | undefined;
106
117
  userid?: string | undefined;
107
- }>, z.ZodObject<z.objectUtil.extendShape<{
118
+ }>, z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
108
119
  "app-name": z.ZodString;
109
120
  "app-id": z.ZodString;
110
121
  }, z.objectUtil.extendShape<{
111
122
  tenantid: z.ZodString;
112
123
  }, {
113
124
  "x-trace-id": z.ZodDefault<z.ZodString>;
114
- }>>, "strip", z.ZodTypeAny, {
125
+ }>>, {
126
+ tenantname: z.ZodString;
127
+ }>, "strip", z.ZodTypeAny, {
115
128
  "app-id": string;
116
129
  "app-name": string;
117
130
  "x-trace-id": string;
118
131
  tenantid: string;
132
+ tenantname: string;
119
133
  }, {
120
134
  "app-id": string;
121
135
  "app-name": string;
122
136
  tenantid: string;
137
+ tenantname: string;
123
138
  "x-trace-id"?: string | undefined;
124
139
  }>]>;
125
140
  export declare const authorizerHeadersWithFiscalIds: z.ZodUnion<[z.ZodObject<z.objectUtil.extendShape<z.objectUtil.extendShape<{
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.headersDefaultWithFiscalIds = exports.authorizerHeadersWithFiscalIds = exports.authorizerHeaders = exports.integrationHeaders = exports.traceSchema = exports.appSchema = exports.userSchema = exports.tenantIdSchema = exports.headersDefaultWithUserId = exports.headersDefault = void 0;
3
+ exports.headersDefaultWithFiscalIds = exports.authorizerHeadersWithFiscalIds = exports.authorizerHeaders = exports.integrationHeaders = exports.tenantSchema = exports.traceSchema = exports.appSchema = exports.userSchema = exports.tenantIdSchema = exports.headersDefaultWithUserId = exports.headersDefault = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const zod_1 = require("zod");
6
6
  const crypto_1 = tslib_1.__importDefault(require("crypto"));
@@ -48,10 +48,13 @@ const fiscalIdsSchema = zod_1.z.object({
48
48
  countryCode: zod_1.z.string(),
49
49
  }))),
50
50
  });
51
+ exports.tenantSchema = zod_1.z.object({
52
+ tenantname: zod_1.z.string(),
53
+ });
51
54
  exports.integrationHeaders = exports.tenantIdSchema.merge(exports.traceSchema);
52
55
  exports.authorizerHeaders = zod_1.z.union([
53
- exports.userSchema.merge(exports.integrationHeaders),
54
- exports.appSchema.merge(exports.integrationHeaders),
56
+ exports.userSchema.merge(exports.integrationHeaders).merge(exports.tenantSchema),
57
+ exports.appSchema.merge(exports.integrationHeaders).merge(exports.tenantSchema),
55
58
  ]);
56
59
  exports.authorizerHeadersWithFiscalIds = zod_1.z.union([
57
60
  exports.userSchema.merge(fiscalIdsSchema).merge(exports.integrationHeaders),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seidor-cloud-produtos/orbit-backend-lib",
3
- "version": "2.0.91",
3
+ "version": "2.0.92",
4
4
  "description": "Internal lib for backend components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",