@ketrics/sdk-backend 0.3.0 → 0.5.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/README.md +1311 -127
- package/dist/context.d.ts +11 -4
- package/dist/context.d.ts.map +1 -1
- package/dist/index.d.ts +300 -110
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +31 -1
- package/dist/index.js.map +1 -1
- package/dist/job-errors.d.ts +157 -0
- package/dist/job-errors.d.ts.map +1 -0
- package/dist/job-errors.js +212 -0
- package/dist/job-errors.js.map +1 -0
- package/dist/job.d.ts +158 -0
- package/dist/job.d.ts.map +1 -0
- package/dist/job.js +31 -0
- package/dist/job.js.map +1 -0
- package/dist/messages-errors.d.ts +69 -0
- package/dist/messages-errors.d.ts.map +1 -0
- package/dist/messages-errors.js +110 -0
- package/dist/messages-errors.js.map +1 -0
- package/dist/messages.d.ts +163 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +41 -0
- package/dist/messages.js.map +1 -0
- package/dist/pdf-errors.d.ts +77 -0
- package/dist/pdf-errors.d.ts.map +1 -0
- package/dist/pdf-errors.js +127 -0
- package/dist/pdf-errors.js.map +1 -0
- package/dist/pdf.d.ts +268 -0
- package/dist/pdf.d.ts.map +1 -0
- package/dist/pdf.js +8 -0
- package/dist/pdf.js.map +1 -0
- package/package.json +2 -2
package/dist/context.d.ts
CHANGED
|
@@ -46,15 +46,15 @@ export interface UserContext {
|
|
|
46
46
|
email: string;
|
|
47
47
|
/** User full name */
|
|
48
48
|
name: string;
|
|
49
|
-
/**
|
|
50
|
-
|
|
49
|
+
/** User's application permissions for the current app (e.g., ["read", "write"] or ["*"]) */
|
|
50
|
+
applicationPermissions: string[];
|
|
51
51
|
}
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Runtime Context
|
|
54
54
|
*
|
|
55
55
|
* Information about the runtime environment.
|
|
56
56
|
*/
|
|
57
|
-
export interface
|
|
57
|
+
export interface RuntimeContext {
|
|
58
58
|
/** Node.js version (e.g., "18.x") */
|
|
59
59
|
nodeVersion: string;
|
|
60
60
|
/** Runtime platform */
|
|
@@ -62,4 +62,11 @@ export interface EnvironmentContext {
|
|
|
62
62
|
/** AWS region (e.g., "us-east-1") */
|
|
63
63
|
region: string;
|
|
64
64
|
}
|
|
65
|
+
/**
|
|
66
|
+
* Environment Variables
|
|
67
|
+
*
|
|
68
|
+
* Key-value map of application environment variables.
|
|
69
|
+
* Keys are uppercase with letters, numbers, and underscores only.
|
|
70
|
+
*/
|
|
71
|
+
export type EnvironmentVariables = Record<string, string>;
|
|
65
72
|
//# sourceMappingURL=context.d.ts.map
|
package/dist/context.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,kBAAkB;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,gBAAgB;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,kBAAkB;IAClB,EAAE,EAAE,MAAM,CAAC;IACX,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,kDAAkD;IAClD,IAAI,EAAE,MAAM,CAAC;IACb,+BAA+B;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,qCAAqC;IACrC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4BAA4B;IAC5B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,gBAAgB;IAChB,EAAE,EAAE,MAAM,CAAC;IACX,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,4FAA4F;IAC5F,sBAAsB,EAAE,MAAM,EAAE,CAAC;CAClC;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,qCAAqC;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,uBAAuB;IACvB,OAAO,EAAE,aAAa,CAAC;IACvB,qCAAqC;IACrC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
* }
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
export { TenantContext, ApplicationContext, UserContext,
|
|
57
|
+
export { TenantContext, ApplicationContext, UserContext, RuntimeContext, EnvironmentVariables, } from './context';
|
|
58
58
|
export { ConsoleLogger } from './console';
|
|
59
59
|
export { HttpRequestConfig, HttpResponse, HttpClient } from './http';
|
|
60
60
|
export { DatabaseQueryResult, DatabaseExecuteResult, IDatabaseConnection, DatabaseManager, } from './databases';
|
|
@@ -63,18 +63,37 @@ export { ISecret } from './secrets';
|
|
|
63
63
|
export { SecretError, SecretNotFoundError, SecretAccessDeniedError, SecretDecryptionError, isSecretError, isSecretErrorType, } from './secret-errors';
|
|
64
64
|
export { ExcelCellValue, ExcelRowValues, ExcelColumnDefinition, AddWorksheetOptions, IExcelCell, IExcelRow, IExcelWorksheet, IExcelWorkbook, ExcelManager, } from './excel';
|
|
65
65
|
export { ExcelError, ExcelParseError, ExcelWriteError, isExcelError, isExcelErrorType, } from './excel-errors';
|
|
66
|
+
export { PdfPageSize, PdfStandardFont, PdfRgbColor, PdfDrawTextOptions, PdfDrawRectOptions, PdfDrawLineOptions, PdfDrawCircleOptions, PdfDrawImageOptions, PdfEmbeddedImage, PdfEmbeddedFont, IPdfPage, IPdfDocument, PdfManager, } from './pdf';
|
|
67
|
+
export { PdfError, PdfParseError, PdfWriteError, isPdfError, isPdfErrorType, } from './pdf-errors';
|
|
68
|
+
export { JobStatusValue, RunInBackgroundOptions, RunInBackgroundParams, JobErrorDetails, JobStatus, JobListParams, JobListResult, } from './job';
|
|
69
|
+
export { JobError, JobNotFoundError, InvalidFunctionError, CrossAppPermissionError, JobExecutionError, isJobError, isJobErrorType, } from './job-errors';
|
|
70
|
+
export { MessagePriorityLevel, MessageChannelConfig, SendMessageParams, SendBulkMessageParams, SendGroupMessageParams, SendMessageResult, SendBulkMessageResult, MessagesManager, } from './messages';
|
|
71
|
+
export { MessageError, MessageValidationError, GroupNotFoundError, TenantGrantPermissionDeniedError, isMessageError, isMessageErrorType, } from './messages-errors';
|
|
66
72
|
export { PutContent, FileContent, FileMetadata, FileInfo, PutOptions, PutResult, DeleteResult, DeleteError, DeleteByPrefixResult, ListOptions, ListResult, CopyOptions, CopyResult, MoveOptions, MoveResult, DownloadUrlOptions, UploadUrlOptions, PresignedUrl, IVolume, } from './volumes';
|
|
67
73
|
export { VolumePermissionValue, VolumeError, VolumeNotFoundError, VolumeAccessDeniedError, VolumePermissionDeniedError, FileNotFoundError, FileAlreadyExistsError, InvalidPathError, FileSizeLimitError, ContentTypeNotAllowedError, isVolumeError, isVolumeErrorType, } from './errors';
|
|
68
|
-
import type { TenantContext, ApplicationContext, UserContext,
|
|
74
|
+
import type { TenantContext, ApplicationContext, UserContext, RuntimeContext, EnvironmentVariables } from './context';
|
|
69
75
|
import type { ConsoleLogger } from './console';
|
|
70
76
|
import type { HttpClient } from './http';
|
|
71
77
|
import type { IDatabaseConnection } from './databases';
|
|
72
78
|
import type { IVolume } from './volumes';
|
|
73
79
|
import type { IExcelWorkbook } from './excel';
|
|
80
|
+
import type { IPdfDocument, PdfRgbColor } from './pdf';
|
|
81
|
+
import type { RunInBackgroundParams, JobStatus, JobListParams, JobListResult } from './job';
|
|
82
|
+
import type { MessagesManager } from './messages';
|
|
74
83
|
import { VolumeError as VolumeErrorClass, VolumeNotFoundError as VolumeNotFoundErrorClass, VolumeAccessDeniedError as VolumeAccessDeniedErrorClass, VolumePermissionDeniedError as VolumePermissionDeniedErrorClass, FileNotFoundError as FileNotFoundErrorClass, FileAlreadyExistsError as FileAlreadyExistsErrorClass, InvalidPathError as InvalidPathErrorClass, FileSizeLimitError as FileSizeLimitErrorClass, ContentTypeNotAllowedError as ContentTypeNotAllowedErrorClass } from './errors';
|
|
75
84
|
import { DatabaseError as DatabaseErrorClass, DatabaseNotFoundError as DatabaseNotFoundErrorClass, DatabaseAccessDeniedError as DatabaseAccessDeniedErrorClass, DatabaseConnectionError as DatabaseConnectionErrorClass, DatabaseQueryError as DatabaseQueryErrorClass, DatabaseTransactionError as DatabaseTransactionErrorClass } from './database-errors';
|
|
76
85
|
import { SecretError as SecretErrorClass, SecretNotFoundError as SecretNotFoundErrorClass, SecretAccessDeniedError as SecretAccessDeniedErrorClass, SecretDecryptionError as SecretDecryptionErrorClass } from './secret-errors';
|
|
77
86
|
import { ExcelError as ExcelErrorClass, ExcelParseError as ExcelParseErrorClass, ExcelWriteError as ExcelWriteErrorClass } from './excel-errors';
|
|
87
|
+
import { PdfError as PdfErrorClass, PdfParseError as PdfParseErrorClass, PdfWriteError as PdfWriteErrorClass } from './pdf-errors';
|
|
88
|
+
import { JobError as JobErrorClass, JobNotFoundError as JobNotFoundErrorClass, InvalidFunctionError as InvalidFunctionErrorClass, CrossAppPermissionError as CrossAppPermissionErrorClass, JobExecutionError as JobExecutionErrorClass } from './job-errors';
|
|
89
|
+
import { MessageError as MessageErrorClass, MessageValidationError as MessageValidationErrorClass, GroupNotFoundError as GroupNotFoundErrorClass, TenantGrantPermissionDeniedError as TenantGrantPermissionDeniedErrorClass } from './messages-errors';
|
|
90
|
+
import { isVolumeError, isVolumeErrorType } from './errors';
|
|
91
|
+
import { isDatabaseError, isDatabaseErrorType } from './database-errors';
|
|
92
|
+
import { isSecretError, isSecretErrorType } from './secret-errors';
|
|
93
|
+
import { isExcelError, isExcelErrorType } from './excel-errors';
|
|
94
|
+
import { isPdfError, isPdfErrorType } from './pdf-errors';
|
|
95
|
+
import { isJobError, isJobErrorType } from './job-errors';
|
|
96
|
+
import { isMessageError, isMessageErrorType } from './messages-errors';
|
|
78
97
|
/**
|
|
79
98
|
* Ketrics Platform SDK Interface
|
|
80
99
|
*
|
|
@@ -87,7 +106,7 @@ import { ExcelError as ExcelErrorClass, ExcelParseError as ExcelParseErrorClass,
|
|
|
87
106
|
* console.log(ketrics.tenant.name);
|
|
88
107
|
* console.log(ketrics.application.code);
|
|
89
108
|
* console.log(ketrics.user.email);
|
|
90
|
-
* console.log(ketrics.
|
|
109
|
+
* console.log(ketrics.runtime.region);
|
|
91
110
|
*
|
|
92
111
|
* // Use console logging (forwarded to CloudWatch)
|
|
93
112
|
* ketrics.console.log('Processing request...');
|
|
@@ -108,6 +127,14 @@ import { ExcelError as ExcelErrorClass, ExcelParseError as ExcelParseErrorClass,
|
|
|
108
127
|
* // Access volumes
|
|
109
128
|
* const volume = await ketrics.Volume.connect('uploads');
|
|
110
129
|
* const file = await volume.get('document.pdf');
|
|
130
|
+
*
|
|
131
|
+
* // Send messages to users
|
|
132
|
+
* await ketrics.Messages.send({
|
|
133
|
+
* userId: 'user-123',
|
|
134
|
+
* type: 'ORDER_SHIPPED',
|
|
135
|
+
* subject: 'Your order shipped!',
|
|
136
|
+
* body: 'Track your package...'
|
|
137
|
+
* });
|
|
111
138
|
* ```
|
|
112
139
|
*/
|
|
113
140
|
export interface KetricsSdkV1 {
|
|
@@ -118,11 +145,141 @@ export interface KetricsSdkV1 {
|
|
|
118
145
|
/** Current user information */
|
|
119
146
|
user: UserContext;
|
|
120
147
|
/** Runtime environment information */
|
|
121
|
-
|
|
148
|
+
runtime: RuntimeContext;
|
|
149
|
+
/** Application environment variables (key-value pairs) */
|
|
150
|
+
environment: EnvironmentVariables;
|
|
122
151
|
/** Console logging (forwarded to CloudWatch) */
|
|
123
152
|
console: ConsoleLogger;
|
|
124
153
|
/** HTTP client for external API requests */
|
|
125
154
|
http: HttpClient;
|
|
155
|
+
/** Volume class with static connect() factory method */
|
|
156
|
+
Volume: {
|
|
157
|
+
connect(volumeCode: string): Promise<IVolume>;
|
|
158
|
+
};
|
|
159
|
+
/** Base error class for all Volume errors (abstract) */
|
|
160
|
+
VolumeError: typeof VolumeErrorClass;
|
|
161
|
+
/** Error thrown when volume doesn't exist */
|
|
162
|
+
VolumeNotFoundError: typeof VolumeNotFoundErrorClass;
|
|
163
|
+
/** Error thrown when application has no access grant */
|
|
164
|
+
VolumeAccessDeniedError: typeof VolumeAccessDeniedErrorClass;
|
|
165
|
+
/** Error thrown when operation requires missing permission */
|
|
166
|
+
VolumePermissionDeniedError: typeof VolumePermissionDeniedErrorClass;
|
|
167
|
+
/** Error thrown when file doesn't exist */
|
|
168
|
+
FileNotFoundError: typeof FileNotFoundErrorClass;
|
|
169
|
+
/** Error thrown when file already exists (with ifNotExists option) */
|
|
170
|
+
FileAlreadyExistsError: typeof FileAlreadyExistsErrorClass;
|
|
171
|
+
/** Error thrown for invalid path characters or traversal attempts */
|
|
172
|
+
InvalidPathError: typeof InvalidPathErrorClass;
|
|
173
|
+
/** Error thrown when file exceeds size limit */
|
|
174
|
+
FileSizeLimitError: typeof FileSizeLimitErrorClass;
|
|
175
|
+
/** Error thrown when content type is not allowed */
|
|
176
|
+
ContentTypeNotAllowedError: typeof ContentTypeNotAllowedErrorClass;
|
|
177
|
+
/** Type guard to check if error is a VolumeError */
|
|
178
|
+
isVolumeError: typeof isVolumeError;
|
|
179
|
+
/** Type guard to check if error is a specific VolumeError type */
|
|
180
|
+
isVolumeErrorType: typeof isVolumeErrorType;
|
|
181
|
+
/** DatabaseConnection class with static connect() factory method */
|
|
182
|
+
DatabaseConnection: {
|
|
183
|
+
connect(databaseCode: string): Promise<IDatabaseConnection>;
|
|
184
|
+
};
|
|
185
|
+
/** Base error class for all Database errors (abstract) */
|
|
186
|
+
DatabaseError: typeof DatabaseErrorClass;
|
|
187
|
+
/** Error thrown when database doesn't exist */
|
|
188
|
+
DatabaseNotFoundError: typeof DatabaseNotFoundErrorClass;
|
|
189
|
+
/** Error thrown when application has no access grant */
|
|
190
|
+
DatabaseAccessDeniedError: typeof DatabaseAccessDeniedErrorClass;
|
|
191
|
+
/** Error thrown when connection cannot be established */
|
|
192
|
+
DatabaseConnectionError: typeof DatabaseConnectionErrorClass;
|
|
193
|
+
/** Error thrown when query execution fails */
|
|
194
|
+
DatabaseQueryError: typeof DatabaseQueryErrorClass;
|
|
195
|
+
/** Error thrown when transaction fails */
|
|
196
|
+
DatabaseTransactionError: typeof DatabaseTransactionErrorClass;
|
|
197
|
+
/** Type guard to check if error is a DatabaseError */
|
|
198
|
+
isDatabaseError: typeof isDatabaseError;
|
|
199
|
+
/** Type guard to check if error is a specific DatabaseError type */
|
|
200
|
+
isDatabaseErrorType: typeof isDatabaseErrorType;
|
|
201
|
+
/** Secret class with static get() method */
|
|
202
|
+
Secret: {
|
|
203
|
+
get(secretCode: string): Promise<string>;
|
|
204
|
+
exists(secretCode: string): Promise<boolean>;
|
|
205
|
+
};
|
|
206
|
+
/** Base error class for all Secret errors (abstract) */
|
|
207
|
+
SecretError: typeof SecretErrorClass;
|
|
208
|
+
/** Error thrown when secret doesn't exist */
|
|
209
|
+
SecretNotFoundError: typeof SecretNotFoundErrorClass;
|
|
210
|
+
/** Error thrown when application has no access grant */
|
|
211
|
+
SecretAccessDeniedError: typeof SecretAccessDeniedErrorClass;
|
|
212
|
+
/** Error thrown when decryption fails */
|
|
213
|
+
SecretDecryptionError: typeof SecretDecryptionErrorClass;
|
|
214
|
+
/** Type guard to check if error is a SecretError */
|
|
215
|
+
isSecretError: typeof isSecretError;
|
|
216
|
+
/** Type guard to check if error is a specific SecretError type */
|
|
217
|
+
isSecretErrorType: typeof isSecretErrorType;
|
|
218
|
+
/** Excel class with static read() and create() methods */
|
|
219
|
+
Excel: {
|
|
220
|
+
read(buffer: Buffer): Promise<IExcelWorkbook>;
|
|
221
|
+
create(): IExcelWorkbook;
|
|
222
|
+
};
|
|
223
|
+
/** Base error class for all Excel errors (abstract) */
|
|
224
|
+
ExcelError: typeof ExcelErrorClass;
|
|
225
|
+
/** Error thrown when parsing Excel file fails */
|
|
226
|
+
ExcelParseError: typeof ExcelParseErrorClass;
|
|
227
|
+
/** Error thrown when writing Excel file fails */
|
|
228
|
+
ExcelWriteError: typeof ExcelWriteErrorClass;
|
|
229
|
+
/** Type guard to check if error is an ExcelError */
|
|
230
|
+
isExcelError: typeof isExcelError;
|
|
231
|
+
/** Type guard to check if error is a specific ExcelError type */
|
|
232
|
+
isExcelErrorType: typeof isExcelErrorType;
|
|
233
|
+
/** PDF class with static read() and create() methods */
|
|
234
|
+
Pdf: {
|
|
235
|
+
read(buffer: Buffer): Promise<IPdfDocument>;
|
|
236
|
+
create(): Promise<IPdfDocument>;
|
|
237
|
+
rgb(r: number, g: number, b: number): PdfRgbColor;
|
|
238
|
+
};
|
|
239
|
+
/** Base error class for all PDF errors (abstract) */
|
|
240
|
+
PdfError: typeof PdfErrorClass;
|
|
241
|
+
/** Error thrown when parsing PDF file fails */
|
|
242
|
+
PdfParseError: typeof PdfParseErrorClass;
|
|
243
|
+
/** Error thrown when writing PDF file fails */
|
|
244
|
+
PdfWriteError: typeof PdfWriteErrorClass;
|
|
245
|
+
/** Type guard to check if error is a PdfError */
|
|
246
|
+
isPdfError: typeof isPdfError;
|
|
247
|
+
/** Type guard to check if error is a specific PdfError type */
|
|
248
|
+
isPdfErrorType: typeof isPdfErrorType;
|
|
249
|
+
/** Job class with static methods for background job operations */
|
|
250
|
+
Job: {
|
|
251
|
+
runInBackground(params: RunInBackgroundParams): Promise<string>;
|
|
252
|
+
getStatus(jobId: string): Promise<JobStatus>;
|
|
253
|
+
list(params?: JobListParams): Promise<JobListResult>;
|
|
254
|
+
};
|
|
255
|
+
/** Base error class for all job errors */
|
|
256
|
+
JobError: typeof JobErrorClass;
|
|
257
|
+
/** Thrown when a job is not found */
|
|
258
|
+
JobNotFoundError: typeof JobNotFoundErrorClass;
|
|
259
|
+
/** Thrown when function name is invalid or missing */
|
|
260
|
+
InvalidFunctionError: typeof InvalidFunctionErrorClass;
|
|
261
|
+
/** Thrown when cross-app job lacks required permission */
|
|
262
|
+
CrossAppPermissionError: typeof CrossAppPermissionErrorClass;
|
|
263
|
+
/** Thrown when job execution fails */
|
|
264
|
+
JobExecutionError: typeof JobExecutionErrorClass;
|
|
265
|
+
/** Type guard to check if error is a JobError */
|
|
266
|
+
isJobError: typeof isJobError;
|
|
267
|
+
/** Type guard to check if error is a specific JobError type */
|
|
268
|
+
isJobErrorType: typeof isJobErrorType;
|
|
269
|
+
/** Messages class with static methods for sending messages to users */
|
|
270
|
+
Messages: MessagesManager;
|
|
271
|
+
/** Base error class for all message errors */
|
|
272
|
+
MessageError: typeof MessageErrorClass;
|
|
273
|
+
/** Error thrown when message validation fails */
|
|
274
|
+
MessageValidationError: typeof MessageValidationErrorClass;
|
|
275
|
+
/** Error thrown when group is not found */
|
|
276
|
+
GroupNotFoundError: typeof GroupNotFoundErrorClass;
|
|
277
|
+
/** Error thrown when TenantGrant permissions are missing */
|
|
278
|
+
TenantGrantPermissionDeniedError: typeof TenantGrantPermissionDeniedErrorClass;
|
|
279
|
+
/** Type guard to check if error is a MessageError */
|
|
280
|
+
isMessageError: typeof isMessageError;
|
|
281
|
+
/** Type guard to check if error is a specific MessageError type */
|
|
282
|
+
isMessageErrorType: typeof isMessageErrorType;
|
|
126
283
|
}
|
|
127
284
|
/**
|
|
128
285
|
* Volume - S3-backed storage for tenant applications
|
|
@@ -339,123 +496,156 @@ export declare class Excel {
|
|
|
339
496
|
*/
|
|
340
497
|
static create(): IExcelWorkbook;
|
|
341
498
|
}
|
|
499
|
+
/**
|
|
500
|
+
* Pdf - Read, create, and modify PDF files in tenant applications
|
|
501
|
+
*
|
|
502
|
+
* Access via `ketrics.Pdf.read()` or `ketrics.Pdf.create()`.
|
|
503
|
+
*
|
|
504
|
+
* @example
|
|
505
|
+
* ```typescript
|
|
506
|
+
* export async function handler() {
|
|
507
|
+
* try {
|
|
508
|
+
* // Read PDF from volume
|
|
509
|
+
* const volume = await ketrics.Volume.connect('uploads');
|
|
510
|
+
* const file = await volume.get('document.pdf');
|
|
511
|
+
* const doc = await ketrics.Pdf.read(file.content);
|
|
512
|
+
*
|
|
513
|
+
* // Get page info
|
|
514
|
+
* console.log('Pages:', doc.getPageCount());
|
|
515
|
+
*
|
|
516
|
+
* // Create new PDF
|
|
517
|
+
* const newDoc = await ketrics.Pdf.create();
|
|
518
|
+
* const page = newDoc.addPage('A4');
|
|
519
|
+
* await page.drawText('Hello, World!', {
|
|
520
|
+
* x: 50,
|
|
521
|
+
* y: 700,
|
|
522
|
+
* size: 24,
|
|
523
|
+
* color: ketrics.Pdf.rgb(0, 0, 0),
|
|
524
|
+
* });
|
|
525
|
+
*
|
|
526
|
+
* const buffer = await newDoc.toBuffer();
|
|
527
|
+
* await volume.put('output.pdf', buffer);
|
|
528
|
+
*
|
|
529
|
+
* } catch (error) {
|
|
530
|
+
* if (error instanceof ketrics.PdfParseError) {
|
|
531
|
+
* console.log('Failed to parse PDF file');
|
|
532
|
+
* } else if (error instanceof ketrics.PdfWriteError) {
|
|
533
|
+
* console.log('Failed to write PDF file');
|
|
534
|
+
* }
|
|
535
|
+
* }
|
|
536
|
+
* }
|
|
537
|
+
* ```
|
|
538
|
+
*/
|
|
539
|
+
export declare class Pdf {
|
|
540
|
+
private constructor();
|
|
541
|
+
/**
|
|
542
|
+
* Read a PDF file from a buffer
|
|
543
|
+
*
|
|
544
|
+
* @param buffer - Buffer containing PDF file data
|
|
545
|
+
* @returns Parsed PDF document
|
|
546
|
+
* @throws PdfParseError if file cannot be parsed
|
|
547
|
+
*/
|
|
548
|
+
static read(buffer: Buffer): Promise<IPdfDocument>;
|
|
549
|
+
/**
|
|
550
|
+
* Create a new empty PDF document
|
|
551
|
+
*
|
|
552
|
+
* @returns New empty PDF document
|
|
553
|
+
*/
|
|
554
|
+
static create(): Promise<IPdfDocument>;
|
|
555
|
+
/**
|
|
556
|
+
* Create an RGB color object
|
|
557
|
+
*
|
|
558
|
+
* @param r - Red component (0-1)
|
|
559
|
+
* @param g - Green component (0-1)
|
|
560
|
+
* @param b - Blue component (0-1)
|
|
561
|
+
* @returns RGB color object
|
|
562
|
+
*/
|
|
563
|
+
static rgb(r: number, g: number, b: number): PdfRgbColor;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Job - Background job execution for tenant applications
|
|
567
|
+
*
|
|
568
|
+
* Access via `ketrics.Job.runInBackground()` to queue a background job,
|
|
569
|
+
* `ketrics.Job.getStatus()` to check job status, or `ketrics.Job.list()`
|
|
570
|
+
* to list jobs.
|
|
571
|
+
*
|
|
572
|
+
* @example
|
|
573
|
+
* ```typescript
|
|
574
|
+
* export async function handler() {
|
|
575
|
+
* try {
|
|
576
|
+
* // Queue a background job
|
|
577
|
+
* const jobId = await ketrics.Job.runInBackground({
|
|
578
|
+
* function: 'generateReport',
|
|
579
|
+
* payload: { year: 2024, format: 'pdf' },
|
|
580
|
+
* options: { timeout: 600000 }
|
|
581
|
+
* });
|
|
582
|
+
* console.log('Job created:', jobId);
|
|
583
|
+
*
|
|
584
|
+
* // Check job status
|
|
585
|
+
* const status = await ketrics.Job.getStatus(jobId);
|
|
586
|
+
* console.log('Job status:', status.status);
|
|
587
|
+
*
|
|
588
|
+
* // List pending jobs
|
|
589
|
+
* const result = await ketrics.Job.list({ status: 'pending' });
|
|
590
|
+
* console.log('Pending jobs:', result.jobs.length);
|
|
591
|
+
*
|
|
592
|
+
* } catch (error) {
|
|
593
|
+
* if (error instanceof ketrics.JobNotFoundError) {
|
|
594
|
+
* console.log('Job not found');
|
|
595
|
+
* } else if (error instanceof ketrics.InvalidFunctionError) {
|
|
596
|
+
* console.log('Invalid function name');
|
|
597
|
+
* } else if (error instanceof ketrics.CrossAppPermissionError) {
|
|
598
|
+
* console.log('Cross-app permission denied');
|
|
599
|
+
* }
|
|
600
|
+
* }
|
|
601
|
+
* }
|
|
602
|
+
* ```
|
|
603
|
+
*/
|
|
604
|
+
export declare class Job {
|
|
605
|
+
private constructor();
|
|
606
|
+
/**
|
|
607
|
+
* Queue a function to run as a background job
|
|
608
|
+
*
|
|
609
|
+
* @param params - Job parameters including function name and optional payload
|
|
610
|
+
* @returns Job ID (UUID) that can be used to check status
|
|
611
|
+
* @throws InvalidFunctionError if function name is invalid
|
|
612
|
+
* @throws CrossAppPermissionError if cross-app job lacks permission
|
|
613
|
+
*/
|
|
614
|
+
static runInBackground(params: RunInBackgroundParams): Promise<string>;
|
|
615
|
+
/**
|
|
616
|
+
* Get the current status of a background job
|
|
617
|
+
*
|
|
618
|
+
* @param jobId - Job UUID
|
|
619
|
+
* @returns Job status including current state and timestamps
|
|
620
|
+
* @throws JobNotFoundError if job doesn't exist
|
|
621
|
+
*/
|
|
622
|
+
static getStatus(jobId: string): Promise<JobStatus>;
|
|
623
|
+
/**
|
|
624
|
+
* List background jobs for the current application
|
|
625
|
+
*
|
|
626
|
+
* @param params - Optional filter and pagination parameters
|
|
627
|
+
* @returns List of job statuses with optional pagination cursor
|
|
628
|
+
*/
|
|
629
|
+
static list(params?: JobListParams): Promise<JobListResult>;
|
|
630
|
+
}
|
|
342
631
|
/**
|
|
343
632
|
* Global declaration for the Ketrics VM sandbox.
|
|
344
633
|
*
|
|
345
634
|
* The `ketrics` global object provides:
|
|
346
|
-
* - Context: tenant, application, user,
|
|
635
|
+
* - Context: tenant, application, user, runtime, environment
|
|
347
636
|
* - Utilities: console, http
|
|
348
637
|
* - Volume: Static class for S3 storage
|
|
349
638
|
* - DatabaseConnection: Static class for database access
|
|
350
639
|
* - Secret: Static class for secret retrieval
|
|
640
|
+
* - Excel: Static class for Excel file operations
|
|
641
|
+
* - Pdf: Static class for PDF file operations
|
|
642
|
+
* - Job: Static class for background job execution
|
|
643
|
+
* - Messages: Static class for user messaging
|
|
351
644
|
* - Error classes: For instanceof checks
|
|
645
|
+
* - Type guards: For error type checking
|
|
352
646
|
*/
|
|
353
647
|
declare global {
|
|
354
648
|
/** Ketrics SDK global object - available in all tenant application code */
|
|
355
|
-
const ketrics: KetricsSdkV1
|
|
356
|
-
/**
|
|
357
|
-
* Volume class for S3-backed storage
|
|
358
|
-
*
|
|
359
|
-
* Use `ketrics.Volume.connect()` to get a connected volume instance.
|
|
360
|
-
*
|
|
361
|
-
* @example
|
|
362
|
-
* ```typescript
|
|
363
|
-
* const volume = await ketrics.Volume.connect('uploads');
|
|
364
|
-
* const file = await volume.get('document.pdf');
|
|
365
|
-
* ```
|
|
366
|
-
*/
|
|
367
|
-
Volume: {
|
|
368
|
-
connect(volumeCode: string): Promise<IVolume>;
|
|
369
|
-
};
|
|
370
|
-
/**
|
|
371
|
-
* DatabaseConnection class for external database access
|
|
372
|
-
*
|
|
373
|
-
* Use `ketrics.DatabaseConnection.connect()` to get a connected database instance.
|
|
374
|
-
*
|
|
375
|
-
* @example
|
|
376
|
-
* ```typescript
|
|
377
|
-
* const db = await ketrics.DatabaseConnection.connect('main-db');
|
|
378
|
-
* const result = await db.query('SELECT * FROM users');
|
|
379
|
-
* await db.close();
|
|
380
|
-
* ```
|
|
381
|
-
*/
|
|
382
|
-
DatabaseConnection: {
|
|
383
|
-
connect(databaseCode: string): Promise<IDatabaseConnection>;
|
|
384
|
-
};
|
|
385
|
-
/**
|
|
386
|
-
* Secret class for encrypted secret retrieval
|
|
387
|
-
*
|
|
388
|
-
* Use `ketrics.Secret.get()` to retrieve a secret value.
|
|
389
|
-
*
|
|
390
|
-
* @example
|
|
391
|
-
* ```typescript
|
|
392
|
-
* const apiKey = await ketrics.Secret.get('stripe-api-key');
|
|
393
|
-
* ```
|
|
394
|
-
*/
|
|
395
|
-
Secret: {
|
|
396
|
-
get(secretCode: string): Promise<string>;
|
|
397
|
-
exists(secretCode: string): Promise<boolean>;
|
|
398
|
-
};
|
|
399
|
-
/**
|
|
400
|
-
* Excel class for reading and writing Excel files
|
|
401
|
-
*
|
|
402
|
-
* Use `ketrics.Excel.read()` to parse an Excel file or
|
|
403
|
-
* `ketrics.Excel.create()` to create a new workbook.
|
|
404
|
-
*
|
|
405
|
-
* @example
|
|
406
|
-
* ```typescript
|
|
407
|
-
* const workbook = await ketrics.Excel.read(file.content);
|
|
408
|
-
* const sheet = workbook.getWorksheet('Sheet1');
|
|
409
|
-
* ```
|
|
410
|
-
*/
|
|
411
|
-
Excel: {
|
|
412
|
-
read(buffer: Buffer): Promise<IExcelWorkbook>;
|
|
413
|
-
create(): IExcelWorkbook;
|
|
414
|
-
};
|
|
415
|
-
/** Base class for all volume errors */
|
|
416
|
-
VolumeError: typeof VolumeErrorClass;
|
|
417
|
-
/** Thrown when a volume does not exist */
|
|
418
|
-
VolumeNotFoundError: typeof VolumeNotFoundErrorClass;
|
|
419
|
-
/** Thrown when application has no access grant to volume */
|
|
420
|
-
VolumeAccessDeniedError: typeof VolumeAccessDeniedErrorClass;
|
|
421
|
-
/** Thrown when operation requires a permission not granted */
|
|
422
|
-
VolumePermissionDeniedError: typeof VolumePermissionDeniedErrorClass;
|
|
423
|
-
/** Thrown when a file does not exist */
|
|
424
|
-
FileNotFoundError: typeof FileNotFoundErrorClass;
|
|
425
|
-
/** Thrown when file already exists (with ifNotExists option) */
|
|
426
|
-
FileAlreadyExistsError: typeof FileAlreadyExistsErrorClass;
|
|
427
|
-
/** Thrown when file path is invalid */
|
|
428
|
-
InvalidPathError: typeof InvalidPathErrorClass;
|
|
429
|
-
/** Thrown when file exceeds size limit */
|
|
430
|
-
FileSizeLimitError: typeof FileSizeLimitErrorClass;
|
|
431
|
-
/** Thrown when content type is not allowed */
|
|
432
|
-
ContentTypeNotAllowedError: typeof ContentTypeNotAllowedErrorClass;
|
|
433
|
-
/** Base class for all database errors */
|
|
434
|
-
DatabaseError: typeof DatabaseErrorClass;
|
|
435
|
-
/** Thrown when a database does not exist */
|
|
436
|
-
DatabaseNotFoundError: typeof DatabaseNotFoundErrorClass;
|
|
437
|
-
/** Thrown when application has no access grant to database */
|
|
438
|
-
DatabaseAccessDeniedError: typeof DatabaseAccessDeniedErrorClass;
|
|
439
|
-
/** Thrown when database connection cannot be established */
|
|
440
|
-
DatabaseConnectionError: typeof DatabaseConnectionErrorClass;
|
|
441
|
-
/** Thrown when a database query fails */
|
|
442
|
-
DatabaseQueryError: typeof DatabaseQueryErrorClass;
|
|
443
|
-
/** Thrown when a database transaction fails */
|
|
444
|
-
DatabaseTransactionError: typeof DatabaseTransactionErrorClass;
|
|
445
|
-
/** Base class for all secret errors */
|
|
446
|
-
SecretError: typeof SecretErrorClass;
|
|
447
|
-
/** Thrown when a secret does not exist */
|
|
448
|
-
SecretNotFoundError: typeof SecretNotFoundErrorClass;
|
|
449
|
-
/** Thrown when application has no access grant to secret */
|
|
450
|
-
SecretAccessDeniedError: typeof SecretAccessDeniedErrorClass;
|
|
451
|
-
/** Thrown when secret decryption fails */
|
|
452
|
-
SecretDecryptionError: typeof SecretDecryptionErrorClass;
|
|
453
|
-
/** Base class for all Excel errors */
|
|
454
|
-
ExcelError: typeof ExcelErrorClass;
|
|
455
|
-
/** Thrown when an Excel file cannot be parsed */
|
|
456
|
-
ExcelParseError: typeof ExcelParseErrorClass;
|
|
457
|
-
/** Thrown when an Excel file cannot be written */
|
|
458
|
-
ExcelWriteError: typeof ExcelWriteErrorClass;
|
|
459
|
-
};
|
|
649
|
+
const ketrics: KetricsSdkV1;
|
|
460
650
|
}
|
|
461
651
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAMH,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;AAMH,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,WAAW,EACX,cAAc,EACd,oBAAoB,GACrB,MAAM,WAAW,CAAC;AAMnB,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAM1C,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAMrE,OAAO,EACL,mBAAmB,EACnB,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,GAChB,MAAM,aAAa,CAAC;AAMrB,OAAO,EACL,aAAa,EACb,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,kBAAkB,EAClB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,GACpB,MAAM,mBAAmB,CAAC;AAM3B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAA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IAEP;;;;;;;OAOG;IACH,MAAM,CAAC,eAAe,CAAC,MAAM,EAAE,qBAAqB,GAAG,OAAO,CAAC,MAAM,CAAC;IAEtE;;;;;;OAMG;IACH,MAAM,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAEnD;;;;;OAKG;IACH,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC;CAC5D;AAMD;;;;;;;;;;;;;;;GAeG;AACH,OAAO,CAAC,MAAM,CAAC;IACb,2EAA2E;IAC3E,MAAM,OAAO,EAAE,YAAY,CAAC;CAC7B"}
|
package/dist/index.js
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* ```
|
|
57
57
|
*/
|
|
58
58
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
|
-
exports.isVolumeErrorType = exports.isVolumeError = exports.ContentTypeNotAllowedError = exports.FileSizeLimitError = exports.InvalidPathError = exports.FileAlreadyExistsError = exports.FileNotFoundError = exports.VolumePermissionDeniedError = exports.VolumeAccessDeniedError = exports.VolumeNotFoundError = exports.VolumeError = exports.isExcelErrorType = exports.isExcelError = exports.ExcelWriteError = exports.ExcelParseError = exports.ExcelError = exports.isSecretErrorType = exports.isSecretError = exports.SecretDecryptionError = exports.SecretAccessDeniedError = exports.SecretNotFoundError = exports.SecretError = exports.isDatabaseErrorType = exports.isDatabaseError = exports.DatabaseTransactionError = exports.DatabaseQueryError = exports.DatabaseConnectionError = exports.DatabaseAccessDeniedError = exports.DatabaseNotFoundError = exports.DatabaseError = void 0;
|
|
59
|
+
exports.isVolumeErrorType = exports.isVolumeError = exports.ContentTypeNotAllowedError = exports.FileSizeLimitError = exports.InvalidPathError = exports.FileAlreadyExistsError = exports.FileNotFoundError = exports.VolumePermissionDeniedError = exports.VolumeAccessDeniedError = exports.VolumeNotFoundError = exports.VolumeError = exports.isMessageErrorType = exports.isMessageError = exports.TenantGrantPermissionDeniedError = exports.GroupNotFoundError = exports.MessageValidationError = exports.MessageError = exports.isJobErrorType = exports.isJobError = exports.JobExecutionError = exports.CrossAppPermissionError = exports.InvalidFunctionError = exports.JobNotFoundError = exports.JobError = exports.isPdfErrorType = exports.isPdfError = exports.PdfWriteError = exports.PdfParseError = exports.PdfError = exports.isExcelErrorType = exports.isExcelError = exports.ExcelWriteError = exports.ExcelParseError = exports.ExcelError = exports.isSecretErrorType = exports.isSecretError = exports.SecretDecryptionError = exports.SecretAccessDeniedError = exports.SecretNotFoundError = exports.SecretError = exports.isDatabaseErrorType = exports.isDatabaseError = exports.DatabaseTransactionError = exports.DatabaseQueryError = exports.DatabaseConnectionError = exports.DatabaseAccessDeniedError = exports.DatabaseNotFoundError = exports.DatabaseError = void 0;
|
|
60
60
|
// ============================================================================
|
|
61
61
|
// Database Error Exports
|
|
62
62
|
// ============================================================================
|
|
@@ -89,6 +89,36 @@ Object.defineProperty(exports, "ExcelWriteError", { enumerable: true, get: funct
|
|
|
89
89
|
Object.defineProperty(exports, "isExcelError", { enumerable: true, get: function () { return excel_errors_1.isExcelError; } });
|
|
90
90
|
Object.defineProperty(exports, "isExcelErrorType", { enumerable: true, get: function () { return excel_errors_1.isExcelErrorType; } });
|
|
91
91
|
// ============================================================================
|
|
92
|
+
// PDF Error Exports
|
|
93
|
+
// ============================================================================
|
|
94
|
+
var pdf_errors_1 = require("./pdf-errors");
|
|
95
|
+
Object.defineProperty(exports, "PdfError", { enumerable: true, get: function () { return pdf_errors_1.PdfError; } });
|
|
96
|
+
Object.defineProperty(exports, "PdfParseError", { enumerable: true, get: function () { return pdf_errors_1.PdfParseError; } });
|
|
97
|
+
Object.defineProperty(exports, "PdfWriteError", { enumerable: true, get: function () { return pdf_errors_1.PdfWriteError; } });
|
|
98
|
+
Object.defineProperty(exports, "isPdfError", { enumerable: true, get: function () { return pdf_errors_1.isPdfError; } });
|
|
99
|
+
Object.defineProperty(exports, "isPdfErrorType", { enumerable: true, get: function () { return pdf_errors_1.isPdfErrorType; } });
|
|
100
|
+
// ============================================================================
|
|
101
|
+
// Job Error Exports
|
|
102
|
+
// ============================================================================
|
|
103
|
+
var job_errors_1 = require("./job-errors");
|
|
104
|
+
Object.defineProperty(exports, "JobError", { enumerable: true, get: function () { return job_errors_1.JobError; } });
|
|
105
|
+
Object.defineProperty(exports, "JobNotFoundError", { enumerable: true, get: function () { return job_errors_1.JobNotFoundError; } });
|
|
106
|
+
Object.defineProperty(exports, "InvalidFunctionError", { enumerable: true, get: function () { return job_errors_1.InvalidFunctionError; } });
|
|
107
|
+
Object.defineProperty(exports, "CrossAppPermissionError", { enumerable: true, get: function () { return job_errors_1.CrossAppPermissionError; } });
|
|
108
|
+
Object.defineProperty(exports, "JobExecutionError", { enumerable: true, get: function () { return job_errors_1.JobExecutionError; } });
|
|
109
|
+
Object.defineProperty(exports, "isJobError", { enumerable: true, get: function () { return job_errors_1.isJobError; } });
|
|
110
|
+
Object.defineProperty(exports, "isJobErrorType", { enumerable: true, get: function () { return job_errors_1.isJobErrorType; } });
|
|
111
|
+
// ============================================================================
|
|
112
|
+
// Messages Error Exports
|
|
113
|
+
// ============================================================================
|
|
114
|
+
var messages_errors_1 = require("./messages-errors");
|
|
115
|
+
Object.defineProperty(exports, "MessageError", { enumerable: true, get: function () { return messages_errors_1.MessageError; } });
|
|
116
|
+
Object.defineProperty(exports, "MessageValidationError", { enumerable: true, get: function () { return messages_errors_1.MessageValidationError; } });
|
|
117
|
+
Object.defineProperty(exports, "GroupNotFoundError", { enumerable: true, get: function () { return messages_errors_1.GroupNotFoundError; } });
|
|
118
|
+
Object.defineProperty(exports, "TenantGrantPermissionDeniedError", { enumerable: true, get: function () { return messages_errors_1.TenantGrantPermissionDeniedError; } });
|
|
119
|
+
Object.defineProperty(exports, "isMessageError", { enumerable: true, get: function () { return messages_errors_1.isMessageError; } });
|
|
120
|
+
Object.defineProperty(exports, "isMessageErrorType", { enumerable: true, get: function () { return messages_errors_1.isMessageErrorType; } });
|
|
121
|
+
// ============================================================================
|
|
92
122
|
// Volume Error Exports
|
|
93
123
|
// ============================================================================
|
|
94
124
|
var errors_1 = require("./errors");
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuDG;;;AAqCH,+EAA+E;AAC/E,yBAAyB;AACzB,+EAA+E;AAE/E,qDAS2B;AARzB,gHAAA,aAAa,OAAA;AACb,wHAAA,qBAAqB,OAAA;AACrB,4HAAA,yBAAyB,OAAA;AACzB,0HAAA,uBAAuB,OAAA;AACvB,qHAAA,kBAAkB,OAAA;AAClB,2HAAA,wBAAwB,OAAA;AACxB,kHAAA,eAAe,OAAA;AACf,sHAAA,mBAAmB,OAAA;AASrB,+EAA+E;AAC/E,uBAAuB;AACvB,+EAA+E;AAE/E,iDAOyB;AANvB,4GAAA,WAAW,OAAA;AACX,oHAAA,mBAAmB,OAAA;AACnB,wHAAA,uBAAuB,OAAA;AACvB,sHAAA,qBAAqB,OAAA;AACrB,8GAAA,aAAa,OAAA;AACb,kHAAA,iBAAiB,OAAA;AAqBnB,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E,+CAMwB;AALtB,0GAAA,UAAU,OAAA;AACV,+GAAA,eAAe,OAAA;AACf,+GAAA,eAAe,OAAA;AACf,4GAAA,YAAY,OAAA;AACZ,gHAAA,gBAAgB,OAAA;AA2BlB,+EAA+E;AAC/E,oBAAoB;AACpB,+EAA+E;AAE/E,2CAMsB;AALpB,sGAAA,QAAQ,OAAA;AACR,2GAAA,aAAa,O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