@limetech/limepkg-cpq-order 2.11.0-dev.1 → 2.11.0-dev.2

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.
@@ -1,6 +1,6 @@
1
1
  import { LimeWebComponent, LimeWebComponentContext, LimeWebComponentPlatform, Translator } from '@limetech/lime-web-components';
2
2
  import { EventEmitter } from '../../stencil-public-runtime';
3
- import { DocumentTemplate } from 'src/services/documenttemplate.service.interface';
3
+ import { DocumentTemplate } from '@limetech/limepkg-document-templates';
4
4
  export declare class TemplateSelector implements LimeWebComponent {
5
5
  /**
6
6
  * @inherit
@@ -9,7 +9,7 @@ import { LimeProperty, LimeType, LimeWebComponentContext, LimeWebComponentPlatfo
9
9
  import { ErpStatus, Iarticle, IarticleGroup, Iconfig, IconfigItemMapping, Iitem } from "./interfaces";
10
10
  import { Deal, Item, Order } from "./classes";
11
11
  import { StatusLabelMapping } from "./components/erp-status/flow-items";
12
- import { DocumentTemplate } from "src/services/documenttemplate.service.interface";
12
+ import { DocumentTemplate } from "@limetech/limepkg-document-templates";
13
13
  export namespace Components {
14
14
  interface CocArticleGroupPicker {
15
15
  "config"?: Iconfig;
@@ -1,35 +1,4 @@
1
- export declare const ServerCommandServiceName = "limepkg-server-commands.service";
2
- export interface ServerCommandService {
3
- /**
4
- * Posts the commands to the command endpoint.
5
- *
6
- * @param {ServerCommand[]} payload The commands.
7
- * @returns {Promise<ServerCommandBatchResponse>} The response.
8
- */
9
- postCommands(payload: ServerCommand[]): Promise<ServerCommandBatchResponse>;
10
- }
11
- export interface ServerCommand {
12
- name: string;
13
- parameters: object;
14
- }
15
- export interface ServerCommandResponse {
16
- successful: boolean;
17
- command: object;
18
- data: any;
19
- error: ServerCommandError;
20
- }
21
- export interface ServerCommandError {
22
- code: string;
23
- message: string;
24
- }
25
- export interface ServerCommandBatch {
26
- commands: ServerCommand[];
27
- }
28
- export interface ServerCommandBatchResponse {
29
- successful: boolean;
30
- id: string;
31
- commands: ServerCommandResponse[];
32
- }
1
+ export * from '@limetech/limepkg-server-commands';
33
2
  export declare enum ServerCommandName {
34
3
  upsert = "upsert-limeobject",
35
4
  delete = "delete-limeobject"
@@ -1,4 +1,4 @@
1
1
  import { CreateLimeobjectDialogCommand, LimeWebComponentPlatform } from '@limetech/lime-web-components';
2
- import { DocumentTemplate } from './documenttemplate.service.interface';
2
+ import { DocumentTemplate } from '@limetech/limepkg-document-templates';
3
3
  export declare function loadAllTemplates(platform: LimeWebComponentPlatform, limetype: string): Promise<DocumentTemplate[]>;
4
4
  export declare function openGenerateQuotationDialog(platform: LimeWebComponentPlatform, command: CreateLimeobjectDialogCommand): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@limetech/limepkg-cpq-order",
3
- "version": "2.11.0-dev.1",
3
+ "version": "2.11.0-dev.2",
4
4
  "description": "Type definitions for limepkg-cpq-order frontend",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs.js",
@@ -1,142 +0,0 @@
1
- import { FileInfo } from '@limetech/lime-elements';
2
- export interface Template {
3
- id: number;
4
- extension?: string;
5
- last_modified?: string;
6
- mimetype?: string;
7
- filename?: string;
8
- size?: number;
9
- storage_type?: string;
10
- metadata?: {
11
- [key: string]: any;
12
- };
13
- filetype: TemplateFileType;
14
- }
15
- export declare enum TemplateFileType {
16
- DOCUMENT_TEMPLATE = 113,
17
- DOCUMENT_TEMPLATE_2 = 115
18
- }
19
- /**
20
- * The registered name of the document template service.
21
- */
22
- export declare const DocumentTemplateServiceName = "limepkg-document-templates.documenttemplateservice";
23
- /**
24
- * Array of supported document template extensions. Currently allowed ones are: .docx, .pdf, .xlsx
25
- */
26
- export declare const SupportedDocumentTemplateExtensions: readonly ["docx", "pdf", "xlsx"];
27
- /**
28
- * The supported document template extension.
29
- */
30
- export declare type SupportedDocumentTemplateExtension = (typeof SupportedDocumentTemplateExtensions)[number];
31
- /**
32
- * The available options used when getting templates.
33
- */
34
- export declare type GetOptions = {
35
- /**
36
- * Only return templates compatible with this lime type.
37
- */
38
- limetype?: string;
39
- /**
40
- * Only return templates matching this extension.
41
- */
42
- extension?: SupportedDocumentTemplateExtension[];
43
- };
44
- /**
45
- * Defines the document template service.
46
- */
47
- export interface DocumentTemplateService {
48
- /**
49
- * Returns a list of available templates based
50
- * on the provided options.
51
- *
52
- * @param {GetOptions} options The options for the request
53
- * @returns {Promise<DocumentTemplate[]>} The document templates.
54
- */
55
- getTemplates(options?: GetOptions): Promise<DocumentTemplate[]>;
56
- /**
57
- * Returns a file info representation of a document template.
58
- *
59
- * @param {DocumentTemplate} template The document template
60
- * @returns {FileInfo} The file info representation
61
- */
62
- templateToFileInfo(template: DocumentTemplate): FileInfo;
63
- /**
64
- * Returns a document template representation of a file info.
65
- *
66
- * @param {FileInfo} file The file info
67
- * @returns {DocumentTemplate} The document template representation
68
- */
69
- fileInfoToTemplate(file: FileInfo): DocumentTemplate;
70
- }
71
- export interface Locale {
72
- /**
73
- * The locale code.
74
- * For example "en_US".
75
- */
76
- code?: string;
77
- /**
78
- * The locale display name.
79
- */
80
- displayName?: string;
81
- }
82
- /**
83
- * The available document template types.
84
- */
85
- export declare type DocumentTemplateType = 'document_template' | 'legacy_template' | 'field_file';
86
- export interface DocumentTemplate {
87
- /**
88
- * The id of the document template.
89
- *
90
- * When this value is a string it has a custom template id which will
91
- * stay persisted even if the document template file changes.
92
- * When this value is a number it is the same as {@link DocumentTemplate#id}.
93
- */
94
- templateId: string | number;
95
- /**
96
- * The id of the document template's file.
97
- *
98
- * IMPORTANT!
99
- * This id is volatile since it is the id of the document template
100
- * file and thus will change when the template document file changes.
101
- */
102
- fileId: number;
103
- /**
104
- * The name of the document template file.
105
- */
106
- fileName: string;
107
- /**
108
- * The extension of the document template file.
109
- */
110
- extension: string;
111
- /**
112
- * Additional tags for this document template.
113
- */
114
- tags?: string[];
115
- /**
116
- * An optional category for this document template.
117
- *
118
- * NOTE! Only used with legacy templates.
119
- */
120
- category?: string;
121
- /**
122
- * Defines the default locale for this document template.
123
- */
124
- locale?: Locale;
125
- /**
126
- * The type of this document template.
127
- */
128
- type?: DocumentTemplateType;
129
- }
130
- export interface TemplatePickerComponent {
131
- /**
132
- * The name of the web component.
133
- */
134
- name: string;
135
- /**
136
- * The optional web component properties.
137
- */
138
- props?: object;
139
- }
140
- export interface LoadTemplateOptions {
141
- limetype?: string;
142
- }