@lilaquadrat/interfaces 1.17.0 → 1.18.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [1.18.1](https://github.com/lilaquadrat/interfaces/compare/v1.18.0...v1.18.1) (2025-02-02)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **hostingcommand:** fixed hosting command for current hosting implementation ([6e5fc95](https://github.com/lilaquadrat/interfaces/commit/6e5fc95d7259060645ccc7252cad57be0d8daef5))
11
+
12
+ ## [1.18.0](https://github.com/lilaquadrat/interfaces/compare/v1.17.0...v1.18.0) (2025-02-02)
13
+
14
+
15
+ ### Features
16
+
17
+ * **exportdata, importjob:** added import and export interfaces ([908a741](https://github.com/lilaquadrat/interfaces/commit/908a74116d244253ac19363435cf4aadf452aa13))
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * **exportdata:** made keys optional ([5abadb6](https://github.com/lilaquadrat/interfaces/commit/5abadb6c3fc369dad454a824aeba64d65cce5b3b))
23
+
5
24
  ## [1.17.0](https://github.com/lilaquadrat/interfaces/compare/v1.16.0...v1.17.0) (2025-01-14)
6
25
 
7
26
 
@@ -1,7 +1,7 @@
1
- import type { ObjectId } from "mongodb";
2
1
  import { ChildData } from "./ChildData";
3
2
  import { GenericData } from "./GenericData";
4
3
  import { ModuleGeneric } from "./ModuleGeneric";
4
+ import { ObjectIdString } from "./ObjectIdString";
5
5
  export interface Content {
6
6
  id: string;
7
7
  company: string;
@@ -16,7 +16,7 @@ export interface Content {
16
16
  target?: 'browser' | 'mail';
17
17
  settings: {
18
18
  url?: string;
19
- useLayout?: ObjectId;
19
+ useLayout?: ObjectIdString;
20
20
  title?: string;
21
21
  description?: string;
22
22
  noSSR?: boolean;
@@ -0,0 +1,15 @@
1
+ export interface ExportData {
2
+ company: string;
3
+ project: string;
4
+ created: number;
5
+ files?: string[];
6
+ filesize?: number;
7
+ path?: string;
8
+ metadata?: {
9
+ createdAt?: string;
10
+ company?: string;
11
+ project?: string;
12
+ selectedServices?: string[];
13
+ statistics?: Record<string, number>;
14
+ };
15
+ }
@@ -1,6 +1,7 @@
1
- import { CommandNginx } from "./CommandNginx";
1
+ import { Command } from "./Command";
2
2
  export interface HostingCommand {
3
- command: CommandNginx;
3
+ target: 'nginx' | 'docker';
4
+ command: Command<HostingCommand['target']>;
4
5
  date: Date;
5
6
  state: 'new' | 'inProgress' | 'success' | 'error';
6
7
  data: {
@@ -10,6 +11,7 @@ export interface HostingCommand {
10
11
  company?: string;
11
12
  project?: string;
12
13
  after?: {
13
- command: CommandNginx;
14
+ target: 'nginx' | 'docker';
15
+ command: Command<HostingCommand['target']>;
14
16
  };
15
17
  }
@@ -0,0 +1,22 @@
1
+ import { BasicData } from "./BasicData";
2
+ import { Content } from "./Content";
3
+ import { Customers } from "./Customers";
4
+ import { Hosting } from "./Hosting";
5
+ import { List } from "./List";
6
+ import { ListParticipants } from "./ListParticipants";
7
+ import { Media } from "./Media";
8
+ import { Payment } from "./Payment";
9
+ import { PaymentProvider } from "./PaymentProvider";
10
+ import { PublishMethod } from "./PublishMethod";
11
+ export interface ImportExportData {
12
+ editor: BasicData<Content>[];
13
+ hosting: BasicData<Hosting>[];
14
+ lists: BasicData<List>[];
15
+ listParticipants: BasicData<ListParticipants>[];
16
+ payments: BasicData<Payment>[];
17
+ paymentsProviders: BasicData<PaymentProvider>[];
18
+ publishMethod: BasicData<PublishMethod>[];
19
+ media: BasicData<Media>[];
20
+ customers: BasicData<Customers>[];
21
+ permissions: BasicData<Permissions>[];
22
+ }
@@ -0,0 +1,23 @@
1
+ export interface ImportJob {
2
+ /**
3
+ * List of services to import
4
+ */
5
+ services: string[];
6
+ /**
7
+ * Current state of the import job
8
+ */
9
+ state: 'new' | 'running' | 'done' | 'failed';
10
+ /**
11
+ * Path to the import files
12
+ */
13
+ path: string;
14
+ cdn?: string;
15
+ /**
16
+ * Target company for the import
17
+ */
18
+ targetCompany: string;
19
+ /**
20
+ * Target project for the import
21
+ */
22
+ targetProject: string;
23
+ }
@@ -0,0 +1,7 @@
1
+ import { Project } from "./Project";
2
+ export interface ProjectWithCompany extends Omit<Project, 'company'> {
3
+ company: {
4
+ name: string;
5
+ id: string;
6
+ };
7
+ }
@@ -1,13 +1,13 @@
1
- import { ObjectId } from "mongodb";
2
1
  import { Content } from "./Content";
3
2
  import { PublishContentGroup } from "./PublishContentGroup";
3
+ import { ObjectIdString } from "./ObjectIdString";
4
4
  export interface PublishMethod {
5
5
  type: 'ftp' | 'webhook' | 'internal' | 'pdf' | 'email';
6
6
  active: boolean;
7
7
  label: string;
8
8
  availableForApps: string[];
9
9
  availableForContentGroups: PublishContentGroup[];
10
- contextData: ObjectId[];
10
+ contextData: ObjectIdString[];
11
11
  affectedStates?: Content['state'][];
12
12
  [key: string]: any;
13
13
  }
@@ -25,6 +25,8 @@ export interface ShareClientInterface {
25
25
  remove(folder: string, file: string): Promise<boolean>;
26
26
  update(folder: string, filename: string, data: string | Buffer): Promise<boolean>;
27
27
  get(folder: string, filename: string): Promise<Buffer>;
28
- list(folder: string, filter: RegExp): Promise<string[]>;
28
+ list(folder: string, filter: RegExp, options?: {
29
+ fullPath?: boolean;
30
+ }): Promise<string[]>;
29
31
  copy(files: string[], sourceFolder: string, destinationFolder: string): Promise<boolean>;
30
32
  }
@@ -58,6 +58,7 @@ export * from './EditorBase';
58
58
  export * from './EditorLegacy';
59
59
  export * from './EmailsContent';
60
60
  export * from './ErrorObject';
61
+ export * from './ExportData';
61
62
  export * from './GenericData';
62
63
  export * from './GenericDataDistributed';
63
64
  export * from './GenericDataWithContent';
@@ -72,6 +73,8 @@ export * from './HostingWithSettings';
72
73
  export * from './HttpStatusCodes';
73
74
  export * from './Id';
74
75
  export * from './IdentifiersEntity';
76
+ export * from './ImportExportData';
77
+ export * from './ImportJob';
75
78
  export * from './List';
76
79
  export * from './ListCategory';
77
80
  export * from './ListContent';
@@ -109,6 +112,7 @@ export * from './PermissionsWithScope';
109
112
  export * from './Price';
110
113
  export * from './Project';
111
114
  export * from './ProjectDomain';
115
+ export * from './ProjectWithCompany';
112
116
  export * from './Publish';
113
117
  export * from './PublishContentGroup';
114
118
  export * from './PublishMethod';
@@ -1,7 +1,7 @@
1
- import type { ObjectId } from "mongodb";
2
1
  import { ChildData } from "./ChildData";
3
2
  import { GenericData } from "./GenericData";
4
3
  import { ModuleGeneric } from "./ModuleGeneric";
4
+ import { ObjectIdString } from "./ObjectIdString";
5
5
  export interface Content {
6
6
  id: string;
7
7
  company: string;
@@ -16,7 +16,7 @@ export interface Content {
16
16
  target?: 'browser' | 'mail';
17
17
  settings: {
18
18
  url?: string;
19
- useLayout?: ObjectId;
19
+ useLayout?: ObjectIdString;
20
20
  title?: string;
21
21
  description?: string;
22
22
  noSSR?: boolean;
@@ -0,0 +1,15 @@
1
+ export interface ExportData {
2
+ company: string;
3
+ project: string;
4
+ created: number;
5
+ files?: string[];
6
+ filesize?: number;
7
+ path?: string;
8
+ metadata?: {
9
+ createdAt?: string;
10
+ company?: string;
11
+ project?: string;
12
+ selectedServices?: string[];
13
+ statistics?: Record<string, number>;
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ExportData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExportData.js","sourceRoot":"","sources":["../../src/ExportData.ts"],"names":[],"mappings":""}
@@ -1,6 +1,7 @@
1
- import { CommandNginx } from "./CommandNginx";
1
+ import { Command } from "./Command";
2
2
  export interface HostingCommand {
3
- command: CommandNginx;
3
+ target: 'nginx' | 'docker';
4
+ command: Command<HostingCommand['target']>;
4
5
  date: Date;
5
6
  state: 'new' | 'inProgress' | 'success' | 'error';
6
7
  data: {
@@ -10,6 +11,7 @@ export interface HostingCommand {
10
11
  company?: string;
11
12
  project?: string;
12
13
  after?: {
13
- command: CommandNginx;
14
+ target: 'nginx' | 'docker';
15
+ command: Command<HostingCommand['target']>;
14
16
  };
15
17
  }
@@ -0,0 +1,22 @@
1
+ import { BasicData } from "./BasicData";
2
+ import { Content } from "./Content";
3
+ import { Customers } from "./Customers";
4
+ import { Hosting } from "./Hosting";
5
+ import { List } from "./List";
6
+ import { ListParticipants } from "./ListParticipants";
7
+ import { Media } from "./Media";
8
+ import { Payment } from "./Payment";
9
+ import { PaymentProvider } from "./PaymentProvider";
10
+ import { PublishMethod } from "./PublishMethod";
11
+ export interface ImportExportData {
12
+ editor: BasicData<Content>[];
13
+ hosting: BasicData<Hosting>[];
14
+ lists: BasicData<List>[];
15
+ listParticipants: BasicData<ListParticipants>[];
16
+ payments: BasicData<Payment>[];
17
+ paymentsProviders: BasicData<PaymentProvider>[];
18
+ publishMethod: BasicData<PublishMethod>[];
19
+ media: BasicData<Media>[];
20
+ customers: BasicData<Customers>[];
21
+ permissions: BasicData<Permissions>[];
22
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ImportExportData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportExportData.js","sourceRoot":"","sources":["../../src/ImportExportData.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ export interface ImportJob {
2
+ /**
3
+ * List of services to import
4
+ */
5
+ services: string[];
6
+ /**
7
+ * Current state of the import job
8
+ */
9
+ state: 'new' | 'running' | 'done' | 'failed';
10
+ /**
11
+ * Path to the import files
12
+ */
13
+ path: string;
14
+ cdn?: string;
15
+ /**
16
+ * Target company for the import
17
+ */
18
+ targetCompany: string;
19
+ /**
20
+ * Target project for the import
21
+ */
22
+ targetProject: string;
23
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ImportJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImportJob.js","sourceRoot":"","sources":["../../src/ImportJob.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { Project } from "./Project";
2
+ export interface ProjectWithCompany extends Omit<Project, 'company'> {
3
+ company: {
4
+ name: string;
5
+ id: string;
6
+ };
7
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=ProjectWithCompany.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProjectWithCompany.js","sourceRoot":"","sources":["../../src/ProjectWithCompany.ts"],"names":[],"mappings":""}
@@ -1,13 +1,13 @@
1
- import { ObjectId } from "mongodb";
2
1
  import { Content } from "./Content";
3
2
  import { PublishContentGroup } from "./PublishContentGroup";
3
+ import { ObjectIdString } from "./ObjectIdString";
4
4
  export interface PublishMethod {
5
5
  type: 'ftp' | 'webhook' | 'internal' | 'pdf' | 'email';
6
6
  active: boolean;
7
7
  label: string;
8
8
  availableForApps: string[];
9
9
  availableForContentGroups: PublishContentGroup[];
10
- contextData: ObjectId[];
10
+ contextData: ObjectIdString[];
11
11
  affectedStates?: Content['state'][];
12
12
  [key: string]: any;
13
13
  }
@@ -25,6 +25,8 @@ export interface ShareClientInterface {
25
25
  remove(folder: string, file: string): Promise<boolean>;
26
26
  update(folder: string, filename: string, data: string | Buffer): Promise<boolean>;
27
27
  get(folder: string, filename: string): Promise<Buffer>;
28
- list(folder: string, filter: RegExp): Promise<string[]>;
28
+ list(folder: string, filter: RegExp, options?: {
29
+ fullPath?: boolean;
30
+ }): Promise<string[]>;
29
31
  copy(files: string[], sourceFolder: string, destinationFolder: string): Promise<boolean>;
30
32
  }
@@ -58,6 +58,7 @@ export * from './EditorBase';
58
58
  export * from './EditorLegacy';
59
59
  export * from './EmailsContent';
60
60
  export * from './ErrorObject';
61
+ export * from './ExportData';
61
62
  export * from './GenericData';
62
63
  export * from './GenericDataDistributed';
63
64
  export * from './GenericDataWithContent';
@@ -72,6 +73,8 @@ export * from './HostingWithSettings';
72
73
  export * from './HttpStatusCodes';
73
74
  export * from './Id';
74
75
  export * from './IdentifiersEntity';
76
+ export * from './ImportExportData';
77
+ export * from './ImportJob';
75
78
  export * from './List';
76
79
  export * from './ListCategory';
77
80
  export * from './ListContent';
@@ -109,6 +112,7 @@ export * from './PermissionsWithScope';
109
112
  export * from './Price';
110
113
  export * from './Project';
111
114
  export * from './ProjectDomain';
115
+ export * from './ProjectWithCompany';
112
116
  export * from './Publish';
113
117
  export * from './PublishContentGroup';
114
118
  export * from './PublishMethod';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lilaquadrat/interfaces",
3
- "version": "1.17.0",
3
+ "version": "1.18.1",
4
4
  "description": "interfaces in context of lilaquadrat STUDIO",
5
5
  "author": {
6
6
  "email": "m.schuebel@lila2.de",
package/src/Content.ts CHANGED
@@ -1,7 +1,7 @@
1
- import type { ObjectId } from "mongodb"
2
1
  import { ChildData } from "./ChildData"
3
2
  import { GenericData } from "./GenericData"
4
3
  import { ModuleGeneric } from "./ModuleGeneric"
4
+ import { ObjectIdString } from "./ObjectIdString"
5
5
 
6
6
  export interface Content {
7
7
  id: string
@@ -17,7 +17,7 @@ export interface Content {
17
17
  target?: 'browser' | 'mail'
18
18
  settings: {
19
19
  url?: string
20
- useLayout?: ObjectId
20
+ useLayout?: ObjectIdString
21
21
  title?: string
22
22
  description?: string
23
23
  noSSR?: boolean
@@ -0,0 +1,15 @@
1
+ export interface ExportData {
2
+ company: string;
3
+ project: string;
4
+ created: number;
5
+ files?: string[];
6
+ filesize?: number;
7
+ path?: string;
8
+ metadata?: {
9
+ createdAt?: string;
10
+ company?: string;
11
+ project?: string;
12
+ selectedServices?: string[];
13
+ statistics?: Record<string, number>;
14
+ };
15
+ }
@@ -1,14 +1,17 @@
1
- import { CommandNginx } from "./CommandNginx";
2
-
1
+ import { Command } from "./Command";
3
2
  export interface HostingCommand {
4
- command: CommandNginx;
5
- date: Date;
6
- state: 'new' | 'inProgress' | 'success' | 'error';
7
- data: { [key: string]: any };
8
- batchId?: string;
9
- company?: string;
10
- project?: string;
11
- after?: {
12
- command: CommandNginx;
13
- };
14
- }
3
+ target: 'nginx' | 'docker';
4
+ command: Command<HostingCommand['target']>;
5
+ date: Date;
6
+ state: 'new' | 'inProgress' | 'success' | 'error';
7
+ data: {
8
+ [key: string]: any;
9
+ };
10
+ batchId?: string;
11
+ company?: string;
12
+ project?: string;
13
+ after?: {
14
+ target: 'nginx' | 'docker';
15
+ command: Command<HostingCommand['target']>;
16
+ };
17
+ }
@@ -0,0 +1,23 @@
1
+ import { BasicData } from "./BasicData";
2
+ import { Content } from "./Content";
3
+ import { Customers } from "./Customers";
4
+ import { Hosting } from "./Hosting";
5
+ import { List } from "./List";
6
+ import { ListParticipants } from "./ListParticipants";
7
+ import { Media } from "./Media";
8
+ import { Payment } from "./Payment";
9
+ import { PaymentProvider } from "./PaymentProvider";
10
+ import { PublishMethod } from "./PublishMethod";
11
+
12
+ export interface ImportExportData {
13
+ editor: BasicData<Content>[]
14
+ hosting: BasicData<Hosting>[]
15
+ lists: BasicData<List>[]
16
+ listParticipants: BasicData<ListParticipants>[]
17
+ payments: BasicData<Payment>[]
18
+ paymentsProviders: BasicData<PaymentProvider>[]
19
+ publishMethod: BasicData<PublishMethod>[]
20
+ media: BasicData<Media>[]
21
+ customers: BasicData<Customers>[]
22
+ permissions: BasicData<Permissions>[]
23
+ }
@@ -0,0 +1,28 @@
1
+ export interface ImportJob {
2
+ /**
3
+ * List of services to import
4
+ */
5
+ services: string[];
6
+
7
+ /**
8
+ * Current state of the import job
9
+ */
10
+ state: 'new' | 'running' | 'done' | 'failed';
11
+
12
+ /**
13
+ * Path to the import files
14
+ */
15
+ path: string;
16
+
17
+ cdn?: string;
18
+
19
+ /**
20
+ * Target company for the import
21
+ */
22
+ targetCompany: string;
23
+
24
+ /**
25
+ * Target project for the import
26
+ */
27
+ targetProject: string;
28
+ }
@@ -0,0 +1,7 @@
1
+ import { Project } from "./Project"
2
+
3
+ export interface ProjectWithCompany extends Omit<Project, 'company'> {
4
+
5
+ company: {name: string, id: string}
6
+
7
+ }
@@ -1,6 +1,6 @@
1
- import { ObjectId } from "mongodb"
2
1
  import { Content } from "./Content"
3
2
  import { PublishContentGroup } from "./PublishContentGroup"
3
+ import { ObjectIdString } from "./ObjectIdString"
4
4
 
5
5
  export interface PublishMethod {
6
6
 
@@ -14,7 +14,7 @@ export interface PublishMethod {
14
14
 
15
15
  availableForContentGroups: PublishContentGroup[]
16
16
 
17
- contextData: ObjectId[]
17
+ contextData: ObjectIdString[]
18
18
 
19
19
  affectedStates?: Content['state'][]
20
20
 
@@ -29,7 +29,7 @@ export interface ShareClientInterface {
29
29
 
30
30
  get(folder: string, filename: string): Promise<Buffer>;
31
31
 
32
- list(folder: string, filter: RegExp): Promise<string[]>;
32
+ list(folder: string, filter: RegExp, options?: {fullPath?: boolean}): Promise<string[]>;
33
33
 
34
34
  copy(files: string[], sourceFolder: string, destinationFolder: string): Promise<boolean>;
35
35