@breign/db-schemas 0.1.82 → 0.1.83

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.
@@ -14,6 +14,21 @@ export type Provider = {
14
14
  isPlatform?: boolean;
15
15
  };
16
16
  export type ProviderSource = 'INTERNAL' | 'EXTERNAL';
17
+ /**
18
+ * Accès d'une organisation à un modèle, identifié par `(providerId, modelId)` où `modelId` est
19
+ * l'identifiant du fournisseur (ex. `gpt-4o`), pas l'id interne du modèle.
20
+ * Pour un moteur plateforme, l'existence de l'accès vaut attribution à l'organisation ; pour un
21
+ * moteur d'organisation, il ne sert qu'à restreindre le modèle à certains membres.
22
+ */
23
+ export type ModelOrganizationAccess = {
24
+ providerId: string;
25
+ modelId: string;
26
+ organizationId: string;
27
+ /** Vrai ⇒ seuls `userIds` (et les admins de l'organisation) peuvent utiliser le modèle. */
28
+ restrictToUsers: boolean;
29
+ userIds: string[];
30
+ };
31
+ export type ModelRef = Pick<ModelOrganizationAccess, 'providerId' | 'modelId'>;
17
32
  export type ProviderSimple = Pick<Provider, 'id' | 'name' | 'providerType' | 'models'>;
18
33
  export type EngineOptions = {
19
34
  store?: boolean;
@@ -11,8 +11,6 @@ export type Organization = {
11
11
  };
12
12
  /** Configuration OCR de l'organisation. Absente ⇒ OCR désactivé. */
13
13
  ocr?: OrganizationOcrConfig | null;
14
- /** L'organisation peut choisir les moteurs plateforme (clé Breign). */
15
- allowPlatformEngines?: boolean;
16
14
  users: {
17
15
  id: string;
18
16
  role: 'admin' | 'user' | string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@breign/db-schemas",
3
- "version": "0.1.82",
3
+ "version": "0.1.83",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "scripts": {
@@ -17,6 +17,23 @@ export type Provider = {
17
17
 
18
18
  export type ProviderSource = 'INTERNAL' | 'EXTERNAL';
19
19
 
20
+ /**
21
+ * Accès d'une organisation à un modèle, identifié par `(providerId, modelId)` où `modelId` est
22
+ * l'identifiant du fournisseur (ex. `gpt-4o`), pas l'id interne du modèle.
23
+ * Pour un moteur plateforme, l'existence de l'accès vaut attribution à l'organisation ; pour un
24
+ * moteur d'organisation, il ne sert qu'à restreindre le modèle à certains membres.
25
+ */
26
+ export type ModelOrganizationAccess = {
27
+ providerId: string;
28
+ modelId: string;
29
+ organizationId: string;
30
+ /** Vrai ⇒ seuls `userIds` (et les admins de l'organisation) peuvent utiliser le modèle. */
31
+ restrictToUsers: boolean;
32
+ userIds: string[];
33
+ };
34
+
35
+ export type ModelRef = Pick<ModelOrganizationAccess, 'providerId' | 'modelId'>;
36
+
20
37
  export type ProviderSimple = Pick<Provider, 'id' | 'name' | 'providerType' | 'models'>;
21
38
 
22
39
  export type EngineOptions = {
@@ -12,8 +12,6 @@ export type Organization = {
12
12
  };
13
13
  /** Configuration OCR de l'organisation. Absente ⇒ OCR désactivé. */
14
14
  ocr?: OrganizationOcrConfig | null;
15
- /** L'organisation peut choisir les moteurs plateforme (clé Breign). */
16
- allowPlatformEngines?: boolean;
17
15
  users: {
18
16
  id: string;
19
17
  role: 'admin' | 'user' | string;