@floristcloud/api-lib 1.2.197 → 1.2.198

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.
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CompanyIntegrationFlagsSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ // Какие интеграции подключены у компании. Панель по ним решает, слать ли запросы интеграций.
6
+ // oneC — у компании есть интеграция 1С; moysklad — МойСклад в статусе ACTIVE.
7
+ exports.CompanyIntegrationFlagsSchema = zod_1.z.object({
8
+ oneC: zod_1.z.boolean(),
9
+ moysklad: zod_1.z.boolean(),
10
+ });
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./moysklad"), exports);
18
18
  __exportStar(require("./one-c"), exports);
19
19
  __exportStar(require("./ozexport"), exports);
20
+ __exportStar(require("./company-integration-flags.schema"), exports);
@@ -4,4 +4,10 @@ exports.GetMeDataSchema = void 0;
4
4
  const zod_1 = require("zod");
5
5
  const user_schema_1 = require("./user.schema");
6
6
  const access_policy_schema_1 = require("../access-policy/access-policy.schema");
7
- exports.GetMeDataSchema = zod_1.z.object({ user: user_schema_1.UserSchema, permissions: access_policy_schema_1.EffectivePermissionsSchema });
7
+ const company_integration_flags_schema_1 = require("../integration/company-integration-flags.schema");
8
+ // integrations = null — флаги прочитать не удалось; клиент ведёт себя так, будто интеграция может быть подключена.
9
+ exports.GetMeDataSchema = zod_1.z.object({
10
+ user: user_schema_1.UserSchema,
11
+ permissions: access_policy_schema_1.EffectivePermissionsSchema,
12
+ integrations: company_integration_flags_schema_1.CompanyIntegrationFlagsSchema.nullable(),
13
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@floristcloud/api-lib",
3
- "version": "1.2.197",
3
+ "version": "1.2.198",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "scripts": {
@@ -0,0 +1,8 @@
1
+ import { z } from 'zod';
2
+
3
+ // Какие интеграции подключены у компании. Панель по ним решает, слать ли запросы интеграций.
4
+ // oneC — у компании есть интеграция 1С; moysklad — МойСклад в статусе ACTIVE.
5
+ export const CompanyIntegrationFlagsSchema = z.object({
6
+ oneC: z.boolean(),
7
+ moysklad: z.boolean(),
8
+ });
@@ -1,3 +1,4 @@
1
1
  export * from './moysklad';
2
2
  export * from './one-c';
3
3
  export * from './ozexport';
4
+ export * from './company-integration-flags.schema';
@@ -1,5 +1,11 @@
1
1
  import { z } from 'zod';
2
2
  import { UserSchema } from './user.schema';
3
3
  import { EffectivePermissionsSchema } from '../access-policy/access-policy.schema';
4
+ import { CompanyIntegrationFlagsSchema } from '../integration/company-integration-flags.schema';
4
5
 
5
- export const GetMeDataSchema = z.object({ user: UserSchema, permissions: EffectivePermissionsSchema });
6
+ // integrations = null — флаги прочитать не удалось; клиент ведёт себя так, будто интеграция может быть подключена.
7
+ export const GetMeDataSchema = z.object({
8
+ user: UserSchema,
9
+ permissions: EffectivePermissionsSchema,
10
+ integrations: CompanyIntegrationFlagsSchema.nullable(),
11
+ });