@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.
Files changed (42) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/error/error.d.ts +15 -0
  3. package/dist/error/error.d.ts.map +1 -0
  4. package/dist/error/error.spec.d.ts +2 -0
  5. package/dist/error/error.spec.d.ts.map +1 -0
  6. package/dist/error/index.d.ts +2 -0
  7. package/dist/error/index.d.ts.map +1 -0
  8. package/dist/eventdispatcher/eventdispatcher.d.ts +76 -10
  9. package/dist/eventdispatcher/eventdispatcher.d.ts.map +1 -1
  10. package/dist/filter/decorator.d.ts +21 -3
  11. package/dist/filter/decorator.d.ts.map +1 -1
  12. package/dist/filter/repository.d.ts +84 -6
  13. package/dist/filter/repository.d.ts.map +1 -1
  14. package/dist/http/http.d.ts +244 -37
  15. package/dist/http/http.d.ts.map +1 -1
  16. package/dist/index.cjs +3 -2
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.d.ts +1 -0
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.esm.js +467 -333
  21. package/dist/index.esm.js.map +1 -1
  22. package/dist/keybindings/registry.d.ts +140 -27
  23. package/dist/keybindings/registry.d.ts.map +1 -1
  24. package/dist/logger/factory.d.ts +51 -0
  25. package/dist/logger/factory.d.ts.map +1 -0
  26. package/dist/logger/factory.spec.d.ts +2 -0
  27. package/dist/logger/factory.spec.d.ts.map +1 -0
  28. package/dist/logger/index.d.ts +1 -0
  29. package/dist/logger/index.d.ts.map +1 -1
  30. package/dist/problem/index.d.ts +6 -0
  31. package/dist/problem/index.d.ts.map +1 -0
  32. package/dist/problem/problem.d.ts +394 -0
  33. package/dist/problem/problem.d.ts.map +1 -0
  34. package/dist/problem/provider.d.ts +192 -0
  35. package/dist/problem/provider.d.ts.map +1 -0
  36. package/dist/problem/query.d.ts +312 -0
  37. package/dist/problem/query.d.ts.map +1 -0
  38. package/dist/problem/repository.d.ts +111 -0
  39. package/dist/problem/repository.d.ts.map +1 -0
  40. package/dist/problem/types.d.ts +15 -0
  41. package/dist/problem/types.d.ts.map +1 -0
  42. package/package.json +6 -6
@@ -0,0 +1,394 @@
1
+ /**
2
+ * Available severity levels for problems.
3
+ *
4
+ * Severity indicates the urgency and impact of a problem, helping users
5
+ * prioritize which issues need attention first. The levels are:
6
+ * - `Low` - Minor issues that don't significantly impact operations
7
+ * - `Medium` - Issues that should be addressed but aren't urgent
8
+ * - `High` - Important issues requiring prompt attention
9
+ * - `Critical` - Severe issues that need immediate action
10
+ *
11
+ * @example
12
+ * Setting severity when creating a problem
13
+ * ```typescript
14
+ * const problem: Problem = {
15
+ * id: 'email-123',
16
+ * providerId: 'email-integration',
17
+ * type: 'delivery-failed',
18
+ * description: 'Email could not be delivered to recipient',
19
+ * createdAt: new Date().toISOString(),
20
+ * severity: ProblemSeverity.High
21
+ * };
22
+ * ```
23
+ *
24
+ * @example
25
+ * Filtering problems by severity
26
+ * ```typescript
27
+ * const criticalProblems = await provider.getProblems({
28
+ * severity: ProblemSeverity.Critical
29
+ * });
30
+ *
31
+ * const urgentProblems = await provider.getProblems({
32
+ * severity: [ProblemSeverity.High, ProblemSeverity.Critical]
33
+ * });
34
+ * ```
35
+ *
36
+ * @alpha
37
+ * @group Problem
38
+ */
39
+ export declare const ProblemSeverity: {
40
+ readonly Low: "low";
41
+ readonly Medium: "medium";
42
+ readonly High: "high";
43
+ readonly Critical: "critical";
44
+ };
45
+ /**
46
+ * Severity level for a problem, indicating urgency and impact.
47
+ *
48
+ * @see {@link ProblemSeverity} for available values
49
+ *
50
+ * @alpha
51
+ * @group Problem
52
+ */
53
+ export type ProblemSeverity = (typeof ProblemSeverity)[keyof typeof ProblemSeverity];
54
+ /**
55
+ * Links a problem to a specific {@link LimeObject}.
56
+ *
57
+ * When a problem is related to a specific business object (e.g., a contact
58
+ * whose email bounced, or a deal that failed to sync), the context provides
59
+ * the link to that object. This enables:
60
+ * - Navigating from the problem to the related object
61
+ * - Showing problems when viewing a specific object
62
+ * - Filtering problems by related object type or instance
63
+ *
64
+ * @example
65
+ * Problem linked to a specific contact
66
+ * ```typescript
67
+ * const problem: Problem = {
68
+ * id: 'email-789',
69
+ * providerId: 'email-integration',
70
+ * type: 'delivery-failed',
71
+ * description: 'Email bounced - invalid address',
72
+ * createdAt: new Date().toISOString(),
73
+ * context: {
74
+ * limetype: 'contact',
75
+ * id: 12345
76
+ * }
77
+ * };
78
+ * ```
79
+ *
80
+ * @see {@link Problem.context}
81
+ * @see {@link ProblemContextFilter} for filtering by context
82
+ *
83
+ * @alpha
84
+ * @group Problem
85
+ */
86
+ export type ProblemContext = {
87
+ /**
88
+ * The limetype of the related object (e.g., 'contact', 'deal', 'company')
89
+ */
90
+ limetype: string;
91
+ /**
92
+ * The id of the specific object instance
93
+ */
94
+ id: number;
95
+ };
96
+ /**
97
+ * Technical error details for a problem.
98
+ *
99
+ * While {@link Problem.description} provides a user-friendly explanation,
100
+ * ProblemError captures the underlying technical details useful for debugging.
101
+ * This separation allows the platform to show appropriate information to
102
+ * different audiences.
103
+ *
104
+ * @example
105
+ * Problem with error details
106
+ * ```typescript
107
+ * const problem: Problem = {
108
+ * id: 'sync-001',
109
+ * providerId: 'external-crm',
110
+ * type: 'connection-error',
111
+ * description: 'Could not sync deal with external CRM',
112
+ * createdAt: new Date().toISOString(),
113
+ * error: {
114
+ * message: 'Connection refused by remote host',
115
+ * code: 'ECONNREFUSED',
116
+ * stack: 'Error: Connection refused\n at TCPConnectWrap...'
117
+ * }
118
+ * };
119
+ * ```
120
+ *
121
+ * @see {@link Problem.error}
122
+ *
123
+ * @alpha
124
+ * @group Problem
125
+ */
126
+ export interface ProblemError {
127
+ /**
128
+ * Technical error message.
129
+ *
130
+ * This is the raw error message from the underlying system, which may
131
+ * be more technical than the user-facing {@link Problem.description}.
132
+ */
133
+ message: string;
134
+ /**
135
+ * Error code for programmatic handling.
136
+ *
137
+ * Codes allow categorizing errors without parsing message text.
138
+ * Use standard codes where applicable (e.g., `ETIMEDOUT`, `ECONNREFUSED`)
139
+ * or provider-specific codes.
140
+ */
141
+ code?: string;
142
+ /**
143
+ * Stack trace for debugging.
144
+ *
145
+ * The full stack trace helps developers diagnose where errors originated.
146
+ * May be displayed in an expandable "Technical Details" section.
147
+ */
148
+ stack?: string;
149
+ }
150
+ /**
151
+ * Represents a problem reported by a {@link ProblemProvider}.
152
+ *
153
+ * Problems are system-level issues that require manual intervention, such as:
154
+ * - Failed email delivery or validation errors
155
+ * - Integration sync failures with external systems
156
+ * - Background task configuration errors
157
+ * - Data import issues with corrupt records
158
+ *
159
+ * Each problem belongs to a provider which owns the problem's lifecycle,
160
+ * storage, and available actions. Problems can optionally be linked to a
161
+ * specific {@link LimeObject} via the `context` property.
162
+ *
163
+ * The platform aggregates problems from all registered providers, allowing
164
+ * authorized users to view and manage issues across the system.
165
+ *
166
+ * The generic type parameter `T` allows providers to define strongly-typed
167
+ * metadata for their specific problem types.
168
+ *
169
+ * @typeParam T - The type of the metadata object. Defaults to `unknown`.
170
+ *
171
+ * @example
172
+ * Basic problem with required fields only
173
+ * ```typescript
174
+ * const problem: Problem = {
175
+ * id: 'prob-001',
176
+ * providerId: 'email-integration',
177
+ * type: 'delivery-failed',
178
+ * description: 'Email to john@example.com bounced with error: mailbox full',
179
+ * createdAt: '2024-01-15T10:30:00Z'
180
+ * };
181
+ * ```
182
+ *
183
+ * @example
184
+ * Problem with typed metadata
185
+ * ```typescript
186
+ * interface EmailProblemMetadata {
187
+ * recipientEmail: string;
188
+ * bounceType: 'permanent' | 'temporary';
189
+ * smtpCode: number;
190
+ * }
191
+ *
192
+ * const problem: Problem<EmailProblemMetadata> = {
193
+ * id: 'email-123',
194
+ * providerId: 'email-integration',
195
+ * type: 'delivery-failed',
196
+ * description: 'Email bounced',
197
+ * createdAt: '2024-01-15T10:30:00Z',
198
+ * metadata: {
199
+ * recipientEmail: 'john@example.com',
200
+ * bounceType: 'permanent',
201
+ * smtpCode: 550
202
+ * }
203
+ * };
204
+ * ```
205
+ *
206
+ * @example
207
+ * Problem with error details
208
+ * ```typescript
209
+ * const problem: Problem = {
210
+ * id: 'sync-error-042',
211
+ * providerId: 'external-crm-sync',
212
+ * type: 'connection-error',
213
+ * description: 'Failed to sync deal with external CRM',
214
+ * createdAt: '2024-01-15T14:22:00Z',
215
+ * severity: ProblemSeverity.High,
216
+ * status: 'pending-retry',
217
+ * context: { limetype: 'deal', id: 98765 },
218
+ * error: {
219
+ * message: 'ETIMEDOUT: connection timed out after 30000ms',
220
+ * code: 'ETIMEDOUT',
221
+ * stack: 'Error: ETIMEDOUT\n at TCPConnectWrap.afterConnect...'
222
+ * }
223
+ * };
224
+ * ```
225
+ *
226
+ * @see {@link ProblemProvider} for the interface that supplies problems
227
+ * @see {@link ProblemRepository} for registering providers and querying problems
228
+ * @see {@link ProblemSeverity} for severity levels
229
+ * @see {@link ProblemError} for technical error details
230
+ *
231
+ * @alpha
232
+ * @group Problem
233
+ */
234
+ export interface Problem<T = unknown> {
235
+ /**
236
+ * Unique identifier for the problem within the provider.
237
+ *
238
+ * The id only needs to be unique within a single provider. The combination
239
+ * of `providerId` and `id` uniquely identifies a problem across the system.
240
+ */
241
+ id: string;
242
+ /**
243
+ * Identifier of the {@link ProblemProvider} that reported this problem.
244
+ *
245
+ * This links the problem back to its owning provider, which controls
246
+ * the problem's lifecycle and available actions.
247
+ *
248
+ * This property is set automatically by the platform when problems are
249
+ * returned from the {@link ProblemRepository}. Providers should not
250
+ * include this property when returning problems from their methods.
251
+ */
252
+ providerId: string;
253
+ /**
254
+ * Type identifier for categorizing the problem.
255
+ *
256
+ * Types are provider-specific and allow grouping similar problems together.
257
+ * Use a consistent naming convention, typically with a prefix indicating
258
+ * the domain (e.g., 'email.delivery-failed', 'sync.connection-error').
259
+ *
260
+ * The provider's {@link ProblemProvider.getType} method returns display
261
+ * information (title, description, icon) for each type.
262
+ *
263
+ * @example
264
+ * ```typescript
265
+ * // Email integration provider types
266
+ * type: 'email.delivery-failed'
267
+ * type: 'email.validation-error'
268
+ * type: 'email.attachment-too-large'
269
+ *
270
+ * // Sync provider types
271
+ * type: 'sync.connection-error'
272
+ * type: 'sync.data-conflict'
273
+ * type: 'sync.rate-limited'
274
+ * ```
275
+ */
276
+ type: string;
277
+ /**
278
+ * Human-readable description of what went wrong.
279
+ *
280
+ * The description should be clear enough for users to understand the issue
281
+ * without needing technical knowledge. Include relevant details like
282
+ * affected entities, error messages, or suggested actions.
283
+ *
284
+ * @example
285
+ * ```typescript
286
+ * // Good descriptions
287
+ * description: 'Email to john@example.com could not be delivered: mailbox is full'
288
+ * description: 'Failed to sync deal "Big Corp Renewal" with external system: connection timeout'
289
+ *
290
+ * // Avoid overly technical descriptions
291
+ * description: 'SMTP 452 4.2.2 error' // Too technical
292
+ * ```
293
+ */
294
+ description: string;
295
+ /**
296
+ * ISO 8601 timestamp when the problem was first detected.
297
+ *
298
+ * @example
299
+ * ```typescript
300
+ * createdAt: '2024-01-15T10:30:00Z'
301
+ * createdAt: new Date().toISOString()
302
+ * ```
303
+ */
304
+ createdAt: string;
305
+ /**
306
+ * Severity level indicating the problem's urgency and impact.
307
+ *
308
+ * Use severity to help users prioritize which problems to address first.
309
+ *
310
+ * @see {@link ProblemSeverity}
311
+ */
312
+ severity?: ProblemSeverity;
313
+ /**
314
+ * Current status in the problem's lifecycle.
315
+ *
316
+ * Status is provider-defined. Each provider can define their own status
317
+ * values that make sense for their workflow (e.g., 'open', 'in-progress',
318
+ * 'pending-retry', 'resolved').
319
+ *
320
+ * Status is optional. Some providers may choose to simply remove problems
321
+ * when they're resolved rather than tracking status transitions.
322
+ */
323
+ status?: string;
324
+ /**
325
+ * Tags for additional categorization and filtering.
326
+ *
327
+ * Tags provide flexible categorization beyond the `type` field. They can
328
+ * represent things like affected systems, error categories, or custom
329
+ * classifications specific to your domain.
330
+ *
331
+ * @example
332
+ * ```typescript
333
+ * tags: ['email', 'bounce', 'permanent']
334
+ * tags: ['sync', 'external-system', 'timeout']
335
+ * tags: ['import', 'validation', 'required-field']
336
+ * ```
337
+ */
338
+ tags?: string[];
339
+ /**
340
+ * Identifier of the user associated with this problem.
341
+ *
342
+ * This could be the user who triggered the action that failed, or the
343
+ * user responsible for the affected data. The exact meaning depends on
344
+ * the provider's context.
345
+ */
346
+ userId?: string;
347
+ /**
348
+ * Link to a related {@link LimeObject}.
349
+ *
350
+ * When a problem is directly related to a specific business object,
351
+ * the context provides navigation and filtering capabilities.
352
+ *
353
+ * @see {@link ProblemContext}
354
+ */
355
+ context?: ProblemContext;
356
+ /**
357
+ * Technical error details for debugging.
358
+ *
359
+ * While `description` provides a user-friendly explanation, `error`
360
+ * captures the underlying technical details. The platform may display
361
+ * this in an expandable "Technical Details" section.
362
+ *
363
+ * @see {@link ProblemError}
364
+ */
365
+ error?: ProblemError;
366
+ /**
367
+ * Additional provider-specific data.
368
+ *
369
+ * Metadata allows providers to attach arbitrary data to problems that
370
+ * may be useful for debugging, displaying additional details, or
371
+ * powering actions. Values should be JSON-serializable.
372
+ *
373
+ * Use the generic type parameter to get type safety for your metadata.
374
+ *
375
+ * @example
376
+ * ```typescript
377
+ * metadata: {
378
+ * originalEmailId: 'msg-123',
379
+ * recipientEmail: 'john@example.com',
380
+ * bounceType: 'permanent',
381
+ * smtpCode: 550
382
+ * }
383
+ * ```
384
+ */
385
+ metadata?: T;
386
+ /**
387
+ * ISO 8601 timestamp when the problem was last modified.
388
+ *
389
+ * Updated when status changes, metadata is modified, or any other
390
+ * property is updated after initial creation.
391
+ */
392
+ updatedAt?: string;
393
+ }
394
+ //# sourceMappingURL=problem.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"problem.d.ts","sourceRoot":"","sources":["../../src/problem/problem.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AACH,eAAO,MAAM,eAAe;;;;;CAKlB,CAAC;AAEX;;;;;;;GAOG;AACH,MAAM,MAAM,eAAe,GACvB,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,OAAO,eAAe,CAAC,CAAC;AAE3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,MAAM,MAAM,cAAc,GAAG;IACzB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACd,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,WAAW,YAAY;IACzB;;;;;OAKG;IACH,OAAO,EAAE,MAAM,CAAC;IAEhB;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmFG;AACH,MAAM,WAAW,OAAO,CAAC,CAAC,GAAG,OAAO;IAChC;;;;;OAKG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;;;;;;OASG;IACH,UAAU,EAAE,MAAM,CAAC;IAEnB;;;;;;;;;;;;;;;;;;;;;;OAsBG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;;;;;;;;;;;;;;;OAgBG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;;;OAQG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,eAAe,CAAC;IAE3B;;;;;;;;;OASG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAEhB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,cAAc,CAAC;IAEzB;;;;;;;;OAQG;IACH,KAAK,CAAC,EAAE,YAAY,CAAC;IAErB;;;;;;;;;;;;;;;;;;OAkBG;IACH,QAAQ,CAAC,EAAE,CAAC,CAAC;IAEb;;;;;OAKG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB"}
@@ -0,0 +1,192 @@
1
+ import { Action } from '../action';
2
+ import { Icon } from '../core';
3
+ import { Problem } from './problem';
4
+ import { ProblemQueryOptions, ProblemStatus, ProblemType } from './query';
5
+ /**
6
+ * Interface that packages implement to provide problems to the platform.
7
+ *
8
+ * Providers are responsible for:
9
+ * - Storing and managing their own problems
10
+ * - Defining problem types with display information
11
+ * - Supplying actions users can take on problems
12
+ * - Responding to queries from the platform
13
+ *
14
+ * The platform aggregates problems from all registered providers.
15
+ *
16
+ * @example
17
+ * Provider implementation
18
+ * ```typescript
19
+ * class EmailProblemProvider implements ProblemProvider {
20
+ * id = 'email-integration';
21
+ * title = 'Email Integration';
22
+ * description = 'Problems related to email sending and delivery';
23
+ * icon = 'envelope';
24
+ *
25
+ * private types: ProblemType[] = [
26
+ * { id: 'delivery-failed', title: 'Delivery Failed' }
27
+ * ];
28
+ *
29
+ * private statuses: ProblemStatus[] = [
30
+ * { id: 'open', title: 'Open' },
31
+ * { id: 'resolved', title: 'Resolved' }
32
+ * ];
33
+ *
34
+ * getTypes(): ProblemType[] { return this.types; }
35
+ * getType(type: string): ProblemType | undefined {
36
+ * return this.types.find(t => t.id === type);
37
+ * }
38
+ * getStatuses(): ProblemStatus[] { return this.statuses; }
39
+ * getStatus(status: string): ProblemStatus | undefined {
40
+ * return this.statuses.find(s => s.id === status);
41
+ * }
42
+ * // ... implement remaining methods
43
+ * }
44
+ * ```
45
+ *
46
+ * @example
47
+ * Registering a provider
48
+ * ```typescript
49
+ * const repository = platform.get(PlatformServiceName.ProblemRepository);
50
+ * repository.registerProvider(new EmailProblemProvider());
51
+ * ```
52
+ *
53
+ * @see {@link ProblemRepository} for registering providers and querying problems
54
+ * @see {@link Problem} for the problem structure
55
+ * @see {@link ProblemQueryOptions} for query filtering
56
+ * @see {@link ProblemType} for problem type display information
57
+ * @see {@link Action} for problem actions
58
+ *
59
+ * @alpha
60
+ * @group Problem
61
+ */
62
+ export interface ProblemProvider {
63
+ /**
64
+ * Unique identifier for this provider.
65
+ *
66
+ * Used to identify the provider in the repository and to link problems back
67
+ * to their source. Should be a stable, lowercase identifier using hyphens
68
+ * for word separation (e.g., 'email-integration', 'external-crm-sync').
69
+ *
70
+ * The platform uses this id to set {@link Problem.providerId} when
71
+ * returning problems to consumers.
72
+ */
73
+ id: string;
74
+ /**
75
+ * Human-readable title for the provider.
76
+ *
77
+ * Should clearly identify the source of problems
78
+ * (e.g., 'Email Integration', 'External CRM Sync').
79
+ */
80
+ title: string;
81
+ /**
82
+ * Description of what problems this provider handles.
83
+ */
84
+ description: string;
85
+ /**
86
+ * Icon representing this provider.
87
+ *
88
+ * Can be either a string referencing an icon name from the platform's icon
89
+ * library, or an {@link Icon} object with additional properties like color.
90
+ *
91
+ * @see {@link Icon}
92
+ */
93
+ icon: string | Icon;
94
+ /**
95
+ * Retrieves problems from this provider.
96
+ *
97
+ * Implement filtering based on the provided options where supported.
98
+ * Unsupported filters should be silently ignored.
99
+ *
100
+ * @param options - Query options for filtering and pagination. All properties
101
+ * are optional. Providers should handle what they support and ignore the rest.
102
+ * @returns A promise resolving to an array of problems matching the query.
103
+ *
104
+ * @see {@link ProblemQueryOptions}
105
+ */
106
+ getProblems(options?: ProblemQueryOptions): Promise<Omit<Problem, 'providerId'>[]>;
107
+ /**
108
+ * Returns the count of problems matching the query options.
109
+ *
110
+ * Should return the total count of matching problems, not affected by
111
+ * pagination (limit/offset).
112
+ *
113
+ * @param options - Query options for filtering. Pagination options (limit/offset)
114
+ * should be ignored when counting.
115
+ * @returns A promise resolving to the number of matching problems.
116
+ */
117
+ getCount(options?: ProblemQueryOptions): Promise<number>;
118
+ /**
119
+ * Retrieves a specific problem by its id.
120
+ *
121
+ * @param id - The unique identifier of the problem within this provider.
122
+ * @returns A promise resolving to the problem if found, or undefined if
123
+ * no problem with that id exists.
124
+ */
125
+ get(id: string): Promise<Omit<Problem, 'providerId'> | undefined>;
126
+ /**
127
+ * Returns available actions for a specific problem.
128
+ *
129
+ * Actions allow users to take action on problems (e.g., retry, dismiss,
130
+ * navigate to configuration). Each action wraps a command that executes
131
+ * when triggered.
132
+ *
133
+ * @param problem - The problem to get actions for.
134
+ * @returns An array of actions available for this problem. Return an empty
135
+ * array `[]` if no actions are available.
136
+ *
137
+ * @see {@link Action}
138
+ */
139
+ getActions(problem: Problem): Action[];
140
+ /**
141
+ * Returns all problem types supported by this provider.
142
+ *
143
+ * Used by the platform to render type filters and understand
144
+ * the provider's problem categories.
145
+ *
146
+ * @returns An array of all problem types this provider can produce.
147
+ *
148
+ * @see {@link ProblemType}
149
+ * @see {@link Problem."type"}
150
+ */
151
+ getTypes(): ProblemType[];
152
+ /**
153
+ * Returns display information for a problem type.
154
+ *
155
+ * Problem types are provider-specific identifiers (e.g., 'delivery-failed',
156
+ * 'connection-error'). This method provides the human-readable title,
157
+ * description, and icon for each type.
158
+ *
159
+ * @param type - The problem type identifier (from {@link Problem."type"}).
160
+ * @returns Display information for the type, or undefined if the type
161
+ * is not recognized by this provider.
162
+ *
163
+ * @see {@link ProblemType}
164
+ * @see {@link Problem."type"}
165
+ */
166
+ getType(type: string): ProblemType | undefined;
167
+ /**
168
+ * Returns all statuses supported by this provider.
169
+ *
170
+ * Used by the platform to render status filters and understand
171
+ * the provider's workflow.
172
+ *
173
+ * @returns An array of all statuses this provider uses. Return an empty
174
+ * array `[]` if this provider doesn't track status.
175
+ *
176
+ * @see {@link ProblemStatus}
177
+ * @see {@link Problem.status}
178
+ */
179
+ getStatuses(): ProblemStatus[];
180
+ /**
181
+ * Returns display information for a problem status.
182
+ *
183
+ * @param status - The status identifier (from {@link Problem.status}).
184
+ * @returns Display information for the status, or undefined if the status
185
+ * is not recognized by this provider.
186
+ *
187
+ * @see {@link ProblemStatus}
188
+ * @see {@link Problem.status}
189
+ */
190
+ getStatus(status: string): ProblemStatus | undefined;
191
+ }
192
+ //# sourceMappingURL=provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/problem/provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwDG;AACH,MAAM,WAAW,eAAe;IAC5B;;;;;;;;;OASG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;;;OAKG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;;;;;;OAOG;IACH,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAEpB;;;;;;;;;;;OAWG;IACH,WAAW,CACP,OAAO,CAAC,EAAE,mBAAmB,GAC9B,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC;IAE1C;;;;;;;;;OASG;IACH,QAAQ,CAAC,OAAO,CAAC,EAAE,mBAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAEzD;;;;;;OAMG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,YAAY,CAAC,GAAG,SAAS,CAAC,CAAC;IAElE;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,EAAE,CAAC;IAEvC;;;;;;;;;;OAUG;IACH,QAAQ,IAAI,WAAW,EAAE,CAAC;IAE1B;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;IAE/C;;;;;;;;;;;OAWG;IACH,WAAW,IAAI,aAAa,EAAE,CAAC;IAE/B;;;;;;;;;OASG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAAC;CACxD"}