@limetech/lime-web-components 6.6.0 → 6.8.0
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 +17 -0
- package/dist/error/error.d.ts +15 -0
- package/dist/error/error.d.ts.map +1 -0
- package/dist/error/error.spec.d.ts +2 -0
- package/dist/error/error.spec.d.ts.map +1 -0
- package/dist/error/index.d.ts +2 -0
- package/dist/error/index.d.ts.map +1 -0
- package/dist/eventdispatcher/eventdispatcher.d.ts +76 -10
- package/dist/eventdispatcher/eventdispatcher.d.ts.map +1 -1
- package/dist/filter/decorator.d.ts +21 -3
- package/dist/filter/decorator.d.ts.map +1 -1
- package/dist/filter/repository.d.ts +84 -6
- package/dist/filter/repository.d.ts.map +1 -1
- package/dist/http/http.d.ts +244 -37
- package/dist/http/http.d.ts.map +1 -1
- package/dist/index.cjs +3 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +467 -333
- package/dist/index.esm.js.map +1 -1
- package/dist/keybindings/registry.d.ts +140 -27
- package/dist/keybindings/registry.d.ts.map +1 -1
- package/dist/logger/factory.d.ts +51 -0
- package/dist/logger/factory.d.ts.map +1 -0
- package/dist/logger/factory.spec.d.ts +2 -0
- package/dist/logger/factory.spec.d.ts.map +1 -0
- package/dist/logger/index.d.ts +1 -0
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/problem/index.d.ts +6 -0
- package/dist/problem/index.d.ts.map +1 -0
- package/dist/problem/problem.d.ts +394 -0
- package/dist/problem/problem.d.ts.map +1 -0
- package/dist/problem/provider.d.ts +192 -0
- package/dist/problem/provider.d.ts.map +1 -0
- package/dist/problem/query.d.ts +312 -0
- package/dist/problem/query.d.ts.map +1 -0
- package/dist/problem/repository.d.ts +111 -0
- package/dist/problem/repository.d.ts.map +1 -0
- package/dist/problem/types.d.ts +15 -0
- package/dist/problem/types.d.ts.map +1 -0
- package/package.json +6 -6
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { Icon } from '../core';
|
|
2
|
+
import { ProblemSeverity } from './problem';
|
|
3
|
+
/**
|
|
4
|
+
* Filter for querying problems related to {@link LimeObject}s.
|
|
5
|
+
*
|
|
6
|
+
* Used with {@link ProblemQueryOptions.context} to find problems linked to
|
|
7
|
+
* specific limeobjects. The limetype is always required, while id is optional:
|
|
8
|
+
* - With only `limetype`: Returns all problems related to that object type
|
|
9
|
+
* - With both `limetype` and `id`: Returns problems for that specific object
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* Find all problems related to contacts
|
|
13
|
+
* ```typescript
|
|
14
|
+
* const contactProblems = await provider.getProblems({
|
|
15
|
+
* context: { limetype: 'contact' }
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* Find problems for a specific deal
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const dealProblems = await provider.getProblems({
|
|
23
|
+
* context: {
|
|
24
|
+
* limetype: 'deal',
|
|
25
|
+
* id: 12345
|
|
26
|
+
* }
|
|
27
|
+
* });
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @see {@link ProblemQueryOptions.context}
|
|
31
|
+
* @see {@link ProblemContext} for the context stored on problems
|
|
32
|
+
*
|
|
33
|
+
* @alpha
|
|
34
|
+
* @group Problem
|
|
35
|
+
*/
|
|
36
|
+
export type ProblemContextFilter = {
|
|
37
|
+
/**
|
|
38
|
+
* The limetype to filter by (e.g., 'contact', 'deal', 'company').
|
|
39
|
+
*
|
|
40
|
+
* This is required because object ids are only unique within a limetype.
|
|
41
|
+
*/
|
|
42
|
+
limetype: string;
|
|
43
|
+
/**
|
|
44
|
+
* The specific object id to filter by.
|
|
45
|
+
*
|
|
46
|
+
* When omitted, matches all problems related to the specified limetype.
|
|
47
|
+
*/
|
|
48
|
+
id?: number;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Options for querying problems from a {@link ProblemProvider}.
|
|
52
|
+
*
|
|
53
|
+
* All filter properties are optional. Providers handle what they support and
|
|
54
|
+
* silently ignore unsupported filters. This allows the platform to pass a
|
|
55
|
+
* consistent set of filters without needing to know each provider's capabilities.
|
|
56
|
+
*
|
|
57
|
+
* Multiple values can be provided for most filters (severity, status, type, tags)
|
|
58
|
+
* to match problems that have any of the specified values (OR logic).
|
|
59
|
+
*
|
|
60
|
+
* @example
|
|
61
|
+
* Get all open problems
|
|
62
|
+
* ```typescript
|
|
63
|
+
* const openProblems = await provider.getProblems({
|
|
64
|
+
* status: 'open'
|
|
65
|
+
* });
|
|
66
|
+
* ```
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* Get high-priority unresolved problems with pagination
|
|
70
|
+
* ```typescript
|
|
71
|
+
* const urgentProblems = await provider.getProblems({
|
|
72
|
+
* severity: [ProblemSeverity.High, ProblemSeverity.Critical],
|
|
73
|
+
* status: ['open', 'acknowledged'],
|
|
74
|
+
* limit: 20,
|
|
75
|
+
* offset: 0
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* Get problems for a specific type and user
|
|
81
|
+
* ```typescript
|
|
82
|
+
* const userEmailProblems = await provider.getProblems({
|
|
83
|
+
* type: 'email.delivery-failed',
|
|
84
|
+
* userId: 'user-123'
|
|
85
|
+
* });
|
|
86
|
+
* ```
|
|
87
|
+
*
|
|
88
|
+
* @example
|
|
89
|
+
* Get problems related to a specific limeobject
|
|
90
|
+
* ```typescript
|
|
91
|
+
* const dealProblems = await provider.getProblems({
|
|
92
|
+
* context: {
|
|
93
|
+
* limetype: 'deal',
|
|
94
|
+
* id: 98765
|
|
95
|
+
* }
|
|
96
|
+
* });
|
|
97
|
+
* ```
|
|
98
|
+
*
|
|
99
|
+
* @see {@link ProblemProvider.getProblems}
|
|
100
|
+
* @see {@link ProblemProvider.getCount}
|
|
101
|
+
*
|
|
102
|
+
* @alpha
|
|
103
|
+
* @group Problem
|
|
104
|
+
*/
|
|
105
|
+
export interface ProblemQueryOptions {
|
|
106
|
+
/**
|
|
107
|
+
* Filter by severity level(s).
|
|
108
|
+
*
|
|
109
|
+
* When a single value is provided, returns problems with that severity.
|
|
110
|
+
* When an array is provided, returns problems matching any of the severities.
|
|
111
|
+
*
|
|
112
|
+
* @see {@link ProblemSeverity}
|
|
113
|
+
*/
|
|
114
|
+
severity?: ProblemSeverity | ProblemSeverity[];
|
|
115
|
+
/**
|
|
116
|
+
* Filter by status(es).
|
|
117
|
+
*
|
|
118
|
+
* Status values are provider-defined strings. When a single value is provided,
|
|
119
|
+
* returns problems with that status. When an array is provided, returns
|
|
120
|
+
* problems matching any of the statuses.
|
|
121
|
+
*
|
|
122
|
+
* @see {@link Problem.status}
|
|
123
|
+
*/
|
|
124
|
+
status?: string | string[];
|
|
125
|
+
/**
|
|
126
|
+
* Filter by problem type(s).
|
|
127
|
+
*
|
|
128
|
+
* Types are provider-specific strings like 'email.delivery-failed' or
|
|
129
|
+
* 'sync.connection-error'. When an array is provided, returns problems
|
|
130
|
+
* matching any of the types.
|
|
131
|
+
*
|
|
132
|
+
* @see {@link Problem."type"}
|
|
133
|
+
*/
|
|
134
|
+
type?: string | string[];
|
|
135
|
+
/**
|
|
136
|
+
* Filter by tag(s).
|
|
137
|
+
*
|
|
138
|
+
* Returns problems that have any of the specified tags (OR logic).
|
|
139
|
+
*
|
|
140
|
+
* @see {@link Problem.tags}
|
|
141
|
+
*/
|
|
142
|
+
tags?: string[];
|
|
143
|
+
/**
|
|
144
|
+
* Filter by user identifier.
|
|
145
|
+
*
|
|
146
|
+
* Returns problems associated with the specified user.
|
|
147
|
+
*
|
|
148
|
+
* @see {@link Problem.userId}
|
|
149
|
+
*/
|
|
150
|
+
userId?: string;
|
|
151
|
+
/**
|
|
152
|
+
* Filter by related {@link LimeObject}.
|
|
153
|
+
*
|
|
154
|
+
* Use this to find problems linked to a specific limetype or object instance.
|
|
155
|
+
*
|
|
156
|
+
* @see {@link ProblemContextFilter}
|
|
157
|
+
* @see {@link Problem.context}
|
|
158
|
+
*/
|
|
159
|
+
context?: ProblemContextFilter;
|
|
160
|
+
/**
|
|
161
|
+
* Maximum number of problems to return.
|
|
162
|
+
*
|
|
163
|
+
* Used for pagination. When omitted, the provider decides the default limit.
|
|
164
|
+
*/
|
|
165
|
+
limit?: number;
|
|
166
|
+
/**
|
|
167
|
+
* Number of problems to skip before returning results.
|
|
168
|
+
*
|
|
169
|
+
* Used for pagination in combination with `limit`. For example, to get
|
|
170
|
+
* the second page of 20 items, use `{ limit: 20, offset: 20 }`.
|
|
171
|
+
*/
|
|
172
|
+
offset?: number;
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* Display information for a problem type.
|
|
176
|
+
*
|
|
177
|
+
* Providers define multiple problem types (e.g., an Email Integration provider
|
|
178
|
+
* might have 'delivery-failed', 'validation-error', 'attachment-too-large').
|
|
179
|
+
* ProblemType provides the human-readable display information for each type.
|
|
180
|
+
*
|
|
181
|
+
* The platform retrieves this information via {@link ProblemProvider.getType}
|
|
182
|
+
* and {@link ProblemProvider.getTypes} to display problems with appropriate
|
|
183
|
+
* titles and icons.
|
|
184
|
+
*
|
|
185
|
+
* @example
|
|
186
|
+
* Implementing type methods in a provider
|
|
187
|
+
* ```typescript
|
|
188
|
+
* class EmailProblemProvider implements ProblemProvider {
|
|
189
|
+
* private types: ProblemType[] = [
|
|
190
|
+
* {
|
|
191
|
+
* id: 'delivery-failed',
|
|
192
|
+
* title: 'Delivery Failed',
|
|
193
|
+
* description: 'Email could not be delivered to the recipient',
|
|
194
|
+
* icon: 'envelope-exclamation'
|
|
195
|
+
* },
|
|
196
|
+
* {
|
|
197
|
+
* id: 'validation-error',
|
|
198
|
+
* title: 'Validation Error'
|
|
199
|
+
* }
|
|
200
|
+
* ];
|
|
201
|
+
*
|
|
202
|
+
* getTypes(): ProblemType[] {
|
|
203
|
+
* return this.types;
|
|
204
|
+
* }
|
|
205
|
+
*
|
|
206
|
+
* getType(type: string): ProblemType | undefined {
|
|
207
|
+
* return this.types.find(t => t.id === type);
|
|
208
|
+
* }
|
|
209
|
+
* }
|
|
210
|
+
* ```
|
|
211
|
+
*
|
|
212
|
+
* @see {@link ProblemProvider.getType}
|
|
213
|
+
* @see {@link ProblemProvider.getTypes}
|
|
214
|
+
* @see {@link Problem."type"}
|
|
215
|
+
*
|
|
216
|
+
* @alpha
|
|
217
|
+
* @group Problem
|
|
218
|
+
*/
|
|
219
|
+
export interface ProblemType {
|
|
220
|
+
/**
|
|
221
|
+
* The type identifier as used in {@link Problem."type"}.
|
|
222
|
+
*/
|
|
223
|
+
id: string;
|
|
224
|
+
/**
|
|
225
|
+
* Human-readable title for the problem type.
|
|
226
|
+
*
|
|
227
|
+
* Displayed as the primary label for problems of this type. Should be
|
|
228
|
+
* concise but descriptive (e.g., 'Delivery Failed', 'Connection Error').
|
|
229
|
+
*/
|
|
230
|
+
title: string;
|
|
231
|
+
/**
|
|
232
|
+
* Detailed description of what this type of problem means.
|
|
233
|
+
*
|
|
234
|
+
* Provides context to help users understand the nature of the problem.
|
|
235
|
+
* May be displayed in tooltips or detail views.
|
|
236
|
+
*/
|
|
237
|
+
description?: string;
|
|
238
|
+
/**
|
|
239
|
+
* Icon to display for problems of this type.
|
|
240
|
+
*
|
|
241
|
+
* Can be either a string referencing an icon name from the platform's icon
|
|
242
|
+
* library, or an {@link Icon} object with additional properties like color.
|
|
243
|
+
*
|
|
244
|
+
* @see {@link Icon}
|
|
245
|
+
*/
|
|
246
|
+
icon?: string | Icon;
|
|
247
|
+
}
|
|
248
|
+
/**
|
|
249
|
+
* Display information for a problem status.
|
|
250
|
+
*
|
|
251
|
+
* Since status values are provider-defined, providers must supply display
|
|
252
|
+
* information for their statuses so the platform can render them appropriately.
|
|
253
|
+
*
|
|
254
|
+
* @example
|
|
255
|
+
* Implementing getStatus in a provider
|
|
256
|
+
* ```typescript
|
|
257
|
+
* class EmailProblemProvider implements ProblemProvider {
|
|
258
|
+
* private statusInfoMap: Record<string, ProblemStatus> = {
|
|
259
|
+
* 'open': {
|
|
260
|
+
* id: 'open',
|
|
261
|
+
* title: 'Open',
|
|
262
|
+
* icon: 'circle'
|
|
263
|
+
* },
|
|
264
|
+
* 'pending-retry': {
|
|
265
|
+
* id: 'pending-retry',
|
|
266
|
+
* title: 'Pending Retry',
|
|
267
|
+
* icon: 'clock'
|
|
268
|
+
* },
|
|
269
|
+
* 'resolved': {
|
|
270
|
+
* id: 'resolved',
|
|
271
|
+
* title: 'Resolved',
|
|
272
|
+
* icon: 'check-circle'
|
|
273
|
+
* }
|
|
274
|
+
* };
|
|
275
|
+
*
|
|
276
|
+
* getStatus(status: string): ProblemStatus | undefined {
|
|
277
|
+
* return this.statusInfoMap[status];
|
|
278
|
+
* }
|
|
279
|
+
*
|
|
280
|
+
* getStatuses(): ProblemStatus[] {
|
|
281
|
+
* return Object.values(this.statusInfoMap);
|
|
282
|
+
* }
|
|
283
|
+
* }
|
|
284
|
+
* ```
|
|
285
|
+
*
|
|
286
|
+
* @see {@link ProblemProvider.getStatus}
|
|
287
|
+
* @see {@link ProblemProvider.getStatuses}
|
|
288
|
+
* @see {@link Problem.status}
|
|
289
|
+
*
|
|
290
|
+
* @alpha
|
|
291
|
+
* @group Problem
|
|
292
|
+
*/
|
|
293
|
+
export interface ProblemStatus {
|
|
294
|
+
/**
|
|
295
|
+
* The status identifier as used in {@link Problem.status}.
|
|
296
|
+
*/
|
|
297
|
+
id: string;
|
|
298
|
+
/**
|
|
299
|
+
* Human-readable title for the status.
|
|
300
|
+
*/
|
|
301
|
+
title: string;
|
|
302
|
+
/**
|
|
303
|
+
* Icon to display for this status.
|
|
304
|
+
*
|
|
305
|
+
* Can be either a string referencing an icon name from the platform's icon
|
|
306
|
+
* library, or an {@link Icon} object with additional properties like color.
|
|
307
|
+
*
|
|
308
|
+
* @see {@link Icon}
|
|
309
|
+
*/
|
|
310
|
+
icon?: string | Icon;
|
|
311
|
+
}
|
|
312
|
+
//# sourceMappingURL=query.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/problem/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAE5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,MAAM,oBAAoB,GAAG;IAC/B;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,EAAE,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AACH,MAAM,WAAW,mBAAmB;IAChC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,eAAe,GAAG,eAAe,EAAE,CAAC;IAE/C;;;;;;;;OAQG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAE3B;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IAEzB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,oBAAoB,CAAC;IAE/B;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,WAAW,WAAW;IACxB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,WAAW,aAAa;IAC1B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { Problem } from './problem';
|
|
2
|
+
import { ProblemProvider } from './provider';
|
|
3
|
+
import { ProblemQueryOptions } from './query';
|
|
4
|
+
/**
|
|
5
|
+
* Repository for accessing problems from registered providers.
|
|
6
|
+
*
|
|
7
|
+
* The repository is the primary interface for consumers to interact with
|
|
8
|
+
* problems. It provides a unified API for querying, counting, and retrieving
|
|
9
|
+
* problems from registered {@link ProblemProvider}s.
|
|
10
|
+
*
|
|
11
|
+
* Packages register their providers with the repository during initialization.
|
|
12
|
+
* Consumers then use the repository's query methods rather than interacting
|
|
13
|
+
* with providers directly.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* Registering a provider
|
|
17
|
+
* ```typescript
|
|
18
|
+
* const repository = platform.get(PlatformServiceName.ProblemRepository);
|
|
19
|
+
* repository.registerProvider(new EmailProblemProvider());
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* Fetching problems from a provider
|
|
24
|
+
* ```typescript
|
|
25
|
+
* const repository = platform.get(PlatformServiceName.ProblemRepository);
|
|
26
|
+
* const problems = await repository.getProblems('email-integration', {
|
|
27
|
+
* severity: ProblemSeverity.Critical
|
|
28
|
+
* });
|
|
29
|
+
* ```
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* Getting actions for a problem
|
|
33
|
+
* ```typescript
|
|
34
|
+
* const problem = await repository.get('email-integration', 'prob-123');
|
|
35
|
+
* const provider = repository.getProvider(problem.providerId);
|
|
36
|
+
* const actions = provider.getActions(problem);
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* @see {@link ProblemProvider} for the provider interface
|
|
40
|
+
*
|
|
41
|
+
* @alpha
|
|
42
|
+
* @group Problem
|
|
43
|
+
*/
|
|
44
|
+
export interface ProblemRepository {
|
|
45
|
+
/**
|
|
46
|
+
* Registers a problem provider with the repository.
|
|
47
|
+
*
|
|
48
|
+
* The provider's {@link ProblemProvider.id} must be unique. Registering
|
|
49
|
+
* a provider with an id that already exists will throw an error.
|
|
50
|
+
*
|
|
51
|
+
* @param provider - The provider to register. Must have a unique id.
|
|
52
|
+
* @throws Error if a provider with the same id is already registered.
|
|
53
|
+
*/
|
|
54
|
+
registerProvider(provider: ProblemProvider): void;
|
|
55
|
+
/**
|
|
56
|
+
* Returns all registered providers.
|
|
57
|
+
*
|
|
58
|
+
* Useful for displaying provider information in the UI, such as
|
|
59
|
+
* provider titles and icons for filtering.
|
|
60
|
+
*
|
|
61
|
+
* @returns An array of all registered providers.
|
|
62
|
+
*/
|
|
63
|
+
getProviders(): ProblemProvider[];
|
|
64
|
+
/**
|
|
65
|
+
* Returns a specific provider by its id.
|
|
66
|
+
*
|
|
67
|
+
* @param id - The unique identifier of the provider.
|
|
68
|
+
* @returns The provider if found, undefined otherwise.
|
|
69
|
+
*/
|
|
70
|
+
getProvider(id: string): ProblemProvider | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Fetches problems from a provider matching the query options.
|
|
73
|
+
*
|
|
74
|
+
* @param providerId - The provider id to query.
|
|
75
|
+
* @param options - Optional filtering and pagination options.
|
|
76
|
+
* @returns A promise resolving to an array of problems.
|
|
77
|
+
* @throws Error if no provider with the given id is registered.
|
|
78
|
+
*
|
|
79
|
+
* @example
|
|
80
|
+
* ```typescript
|
|
81
|
+
* const emailProblems = await repository.getProblems('email-integration');
|
|
82
|
+
*
|
|
83
|
+
* const criticalProblems = await repository.getProblems(
|
|
84
|
+
* 'email-integration',
|
|
85
|
+
* { severity: ProblemSeverity.Critical }
|
|
86
|
+
* );
|
|
87
|
+
* ```
|
|
88
|
+
*/
|
|
89
|
+
getProblems(providerId: string, options?: ProblemQueryOptions): Promise<Problem[]>;
|
|
90
|
+
/**
|
|
91
|
+
* Returns the count of problems from a provider.
|
|
92
|
+
*
|
|
93
|
+
* More efficient than fetching all problems when only the count is needed.
|
|
94
|
+
*
|
|
95
|
+
* @param providerId - The provider id to query.
|
|
96
|
+
* @param options - Optional filtering options.
|
|
97
|
+
* @returns A promise resolving to the count.
|
|
98
|
+
* @throws Error if no provider with the given id is registered.
|
|
99
|
+
*/
|
|
100
|
+
getCount(providerId: string, options?: ProblemQueryOptions): Promise<number>;
|
|
101
|
+
/**
|
|
102
|
+
* Retrieves a specific problem by provider and problem id.
|
|
103
|
+
*
|
|
104
|
+
* @param providerId - The id of the provider that owns the problem.
|
|
105
|
+
* @param problemId - The id of the problem within that provider.
|
|
106
|
+
* @returns A promise resolving to the problem if found, undefined otherwise.
|
|
107
|
+
* @throws Error if no provider with the given id is registered.
|
|
108
|
+
*/
|
|
109
|
+
get(providerId: string, problemId: string): Promise<Problem | undefined>;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=repository.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"repository.d.ts","sourceRoot":"","sources":["../../src/problem/repository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,WAAW,iBAAiB;IAC9B;;;;;;;;OAQG;IACH,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI,CAAC;IAElD;;;;;;;OAOG;IACH,YAAY,IAAI,eAAe,EAAE,CAAC;IAElC;;;;;OAKG;IACH,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,eAAe,GAAG,SAAS,CAAC;IAErD;;;;;;;;;;;;;;;;;OAiBG;IACH,WAAW,CACP,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,mBAAmB,GAC9B,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;IAEtB;;;;;;;;;OASG;IACH,QAAQ,CACJ,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,mBAAmB,GAC9B,OAAO,CAAC,MAAM,CAAC,CAAC;IAEnB;;;;;;;OAOG;IACH,GAAG,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAAC,CAAC;CAC5E"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ProblemRepository as Service } from './repository';
|
|
2
|
+
declare const SERVICE_NAME = "problemRepository";
|
|
3
|
+
declare module '../core/platform' {
|
|
4
|
+
interface PlatformServiceNameType {
|
|
5
|
+
/**
|
|
6
|
+
* @see {@link Service | ProblemRepository}
|
|
7
|
+
*/
|
|
8
|
+
ProblemRepository: typeof SERVICE_NAME;
|
|
9
|
+
}
|
|
10
|
+
interface LimeWebComponentPlatform {
|
|
11
|
+
get(name: PlatformServiceNameType['ProblemRepository']): Service;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/problem/types.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,MAAM,cAAc,CAAC;AAE5D,QAAA,MAAM,YAAY,sBAAsB,CAAC;AAIzC,OAAO,QAAQ,kBAAkB,CAAC;IAC9B,UAAU,uBAAuB;QAC7B;;WAEG;QACH,iBAAiB,EAAE,OAAO,YAAY,CAAC;KAC1C;IACD,UAAU,wBAAwB;QAC9B,GAAG,CAAC,IAAI,EAAE,uBAAuB,CAAC,mBAAmB,CAAC,GAAG,OAAO,CAAC;KACpE;CACJ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@limetech/lime-web-components",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.8.0",
|
|
4
4
|
"description": "Lime Web Components",
|
|
5
5
|
"author": "Lime Technologies",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"tslib": "^2.8.1"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@commitlint/config-conventional": "^20.
|
|
38
|
+
"@commitlint/config-conventional": "^20.3.1",
|
|
39
39
|
"@limetech/eslint-config": "^4.0.0",
|
|
40
40
|
"@microsoft/api-extractor": "^7.55.2",
|
|
41
41
|
"eslint": "^9.39.2",
|
|
42
42
|
"expect-type": "^1.3.0",
|
|
43
|
-
"globals": "^
|
|
44
|
-
"jsdom": "^27.
|
|
43
|
+
"globals": "^17.2.0",
|
|
44
|
+
"jsdom": "^27.4.0",
|
|
45
45
|
"replace-in-file": "^8.4.0",
|
|
46
46
|
"shelljs": "0.10.0",
|
|
47
47
|
"typedoc": "^0.23.24",
|
|
48
48
|
"typedoc-plugin-markdown": "~3.15.0",
|
|
49
49
|
"typescript": "^4.9.5",
|
|
50
|
-
"vite": "^7.3.
|
|
50
|
+
"vite": "^7.3.1",
|
|
51
51
|
"vite-plugin-dts": "^4.5.0",
|
|
52
|
-
"vitest": "^4.0.
|
|
52
|
+
"vitest": "^4.0.18",
|
|
53
53
|
"yargs": "^18.0.0"
|
|
54
54
|
},
|
|
55
55
|
"keywords": [
|