@aidc-toolkit/app-extension 1.0.48-beta → 1.0.49

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 (181) hide show
  1. package/dist/character-set-proxy-BOW94WCe.d.cts +473 -0
  2. package/dist/character-set-proxy-BOW94WCe.d.ts +473 -0
  3. package/dist/chunk-22IRLVWO.js +1 -0
  4. package/dist/chunk-MR63TJ3B.js +1 -0
  5. package/dist/chunk-TWX7TPRC.js +1 -0
  6. package/dist/{descriptor.d.ts → descriptor-D6tZH-vc.d.cts} +13 -13
  7. package/dist/descriptor-D6tZH-vc.d.ts +185 -0
  8. package/dist/generator/index.cjs +17 -0
  9. package/dist/generator/index.d.cts +240 -0
  10. package/dist/generator/index.d.ts +239 -17
  11. package/dist/generator/index.js +1 -2
  12. package/dist/gs1/index.cjs +1 -0
  13. package/dist/gs1/index.d.cts +185 -0
  14. package/dist/gs1/index.d.ts +185 -11
  15. package/dist/gs1/index.js +1 -11
  16. package/dist/index.cjs +17 -0
  17. package/dist/{locale/en/locale-resources.d.ts → index.d.cts} +113 -2
  18. package/dist/index.d.ts +862 -21
  19. package/dist/index.js +1 -7
  20. package/package.json +5 -5
  21. package/src/app-extension.ts +29 -0
  22. package/src/app-helper-proxy.ts +45 -7
  23. package/src/generator/functions-generator.ts +292 -0
  24. package/src/generator/generator.ts +9 -29
  25. package/src/generator/index.ts +1 -0
  26. package/src/generator/locale-resources-generator.ts +9 -7
  27. package/src/gs1/check-proxy.ts +3 -3
  28. package/src/gs1/gtin-validator-proxy.ts +2 -2
  29. package/src/gs1/identifier-validator-proxy.ts +2 -2
  30. package/src/locale/fr/locale-resources.ts +2 -2
  31. package/src/locale/i18n.ts +5 -5
  32. package/src/version.ts +4 -0
  33. package/tsconfig-src.tsbuildinfo +1 -1
  34. package/dist/app-extension.d.ts +0 -198
  35. package/dist/app-extension.d.ts.map +0 -1
  36. package/dist/app-extension.js +0 -133
  37. package/dist/app-extension.js.map +0 -1
  38. package/dist/app-helper-proxy.d.ts +0 -61
  39. package/dist/app-helper-proxy.d.ts.map +0 -1
  40. package/dist/app-helper-proxy.js +0 -333
  41. package/dist/app-helper-proxy.js.map +0 -1
  42. package/dist/descriptor.d.ts.map +0 -1
  43. package/dist/descriptor.js +0 -44
  44. package/dist/descriptor.js.map +0 -1
  45. package/dist/generator/generator.d.ts +0 -124
  46. package/dist/generator/generator.d.ts.map +0 -1
  47. package/dist/generator/generator.js +0 -198
  48. package/dist/generator/generator.js.map +0 -1
  49. package/dist/generator/index.d.ts.map +0 -1
  50. package/dist/generator/index.js.map +0 -1
  51. package/dist/generator/locale-resources-generator.d.ts +0 -2
  52. package/dist/generator/locale-resources-generator.d.ts.map +0 -1
  53. package/dist/generator/locale-resources-generator.js +0 -312
  54. package/dist/generator/locale-resources-generator.js.map +0 -1
  55. package/dist/gs1/character-set-proxy.d.ts +0 -13
  56. package/dist/gs1/character-set-proxy.d.ts.map +0 -1
  57. package/dist/gs1/character-set-proxy.js +0 -126
  58. package/dist/gs1/character-set-proxy.js.map +0 -1
  59. package/dist/gs1/check-proxy.d.ts +0 -11
  60. package/dist/gs1/check-proxy.d.ts.map +0 -1
  61. package/dist/gs1/check-proxy.js +0 -163
  62. package/dist/gs1/check-proxy.js.map +0 -1
  63. package/dist/gs1/gcp-length-proxy.d.ts +0 -11
  64. package/dist/gs1/gcp-length-proxy.d.ts.map +0 -1
  65. package/dist/gs1/gcp-length-proxy.js +0 -187
  66. package/dist/gs1/gcp-length-proxy.js.map +0 -1
  67. package/dist/gs1/gtin-creator-proxy.d.ts +0 -10
  68. package/dist/gs1/gtin-creator-proxy.d.ts.map +0 -1
  69. package/dist/gs1/gtin-creator-proxy.js +0 -85
  70. package/dist/gs1/gtin-creator-proxy.js.map +0 -1
  71. package/dist/gs1/gtin-descriptor.d.ts +0 -3
  72. package/dist/gs1/gtin-descriptor.d.ts.map +0 -1
  73. package/dist/gs1/gtin-descriptor.js +0 -8
  74. package/dist/gs1/gtin-descriptor.js.map +0 -1
  75. package/dist/gs1/gtin-validator-proxy.d.ts +0 -26
  76. package/dist/gs1/gtin-validator-proxy.d.ts.map +0 -1
  77. package/dist/gs1/gtin-validator-proxy.js +0 -256
  78. package/dist/gs1/gtin-validator-proxy.js.map +0 -1
  79. package/dist/gs1/identifier-creator-proxy.d.ts +0 -30
  80. package/dist/gs1/identifier-creator-proxy.d.ts.map +0 -1
  81. package/dist/gs1/identifier-creator-proxy.js +0 -318
  82. package/dist/gs1/identifier-creator-proxy.js.map +0 -1
  83. package/dist/gs1/identifier-descriptor.d.ts +0 -4
  84. package/dist/gs1/identifier-descriptor.d.ts.map +0 -1
  85. package/dist/gs1/identifier-descriptor.js +0 -14
  86. package/dist/gs1/identifier-descriptor.js.map +0 -1
  87. package/dist/gs1/identifier-type.d.ts +0 -22
  88. package/dist/gs1/identifier-type.d.ts.map +0 -1
  89. package/dist/gs1/identifier-type.js +0 -34
  90. package/dist/gs1/identifier-type.js.map +0 -1
  91. package/dist/gs1/identifier-validator-proxy.d.ts +0 -29
  92. package/dist/gs1/identifier-validator-proxy.d.ts.map +0 -1
  93. package/dist/gs1/identifier-validator-proxy.js +0 -212
  94. package/dist/gs1/identifier-validator-proxy.js.map +0 -1
  95. package/dist/gs1/index.d.ts.map +0 -1
  96. package/dist/gs1/index.js.map +0 -1
  97. package/dist/gs1/non-gtin-creator-proxy.d.ts +0 -38
  98. package/dist/gs1/non-gtin-creator-proxy.d.ts.map +0 -1
  99. package/dist/gs1/non-gtin-creator-proxy.js +0 -301
  100. package/dist/gs1/non-gtin-creator-proxy.js.map +0 -1
  101. package/dist/gs1/non-gtin-validator-proxy.d.ts +0 -37
  102. package/dist/gs1/non-gtin-validator-proxy.d.ts.map +0 -1
  103. package/dist/gs1/non-gtin-validator-proxy.js +0 -302
  104. package/dist/gs1/non-gtin-validator-proxy.js.map +0 -1
  105. package/dist/gs1/prefix-definition-descriptor.d.ts +0 -4
  106. package/dist/gs1/prefix-definition-descriptor.d.ts.map +0 -1
  107. package/dist/gs1/prefix-definition-descriptor.js +0 -16
  108. package/dist/gs1/prefix-definition-descriptor.js.map +0 -1
  109. package/dist/gs1/prefix-manager-proxy.d.ts +0 -8
  110. package/dist/gs1/prefix-manager-proxy.d.ts.map +0 -1
  111. package/dist/gs1/prefix-manager-proxy.js +0 -94
  112. package/dist/gs1/prefix-manager-proxy.js.map +0 -1
  113. package/dist/gs1/variable-measure-proxy.d.ts +0 -7
  114. package/dist/gs1/variable-measure-proxy.d.ts.map +0 -1
  115. package/dist/gs1/variable-measure-proxy.js +0 -114
  116. package/dist/gs1/variable-measure-proxy.js.map +0 -1
  117. package/dist/gs1/verified-by-gs1-proxy.d.ts +0 -7
  118. package/dist/gs1/verified-by-gs1-proxy.d.ts.map +0 -1
  119. package/dist/gs1/verified-by-gs1-proxy.js +0 -106
  120. package/dist/gs1/verified-by-gs1-proxy.js.map +0 -1
  121. package/dist/index.d.ts.map +0 -1
  122. package/dist/index.js.map +0 -1
  123. package/dist/lib-proxy.d.ts +0 -135
  124. package/dist/lib-proxy.d.ts.map +0 -1
  125. package/dist/lib-proxy.js +0 -276
  126. package/dist/lib-proxy.js.map +0 -1
  127. package/dist/locale/en/locale-resources.d.ts.map +0 -1
  128. package/dist/locale/en/locale-resources.js +0 -754
  129. package/dist/locale/en/locale-resources.js.map +0 -1
  130. package/dist/locale/fr/locale-resources.d.ts +0 -755
  131. package/dist/locale/fr/locale-resources.d.ts.map +0 -1
  132. package/dist/locale/fr/locale-resources.js +0 -754
  133. package/dist/locale/fr/locale-resources.js.map +0 -1
  134. package/dist/locale/i18n.d.ts +0 -27
  135. package/dist/locale/i18n.d.ts.map +0 -1
  136. package/dist/locale/i18n.js +0 -36
  137. package/dist/locale/i18n.js.map +0 -1
  138. package/dist/proxy.d.ts +0 -136
  139. package/dist/proxy.d.ts.map +0 -1
  140. package/dist/proxy.js +0 -291
  141. package/dist/proxy.js.map +0 -1
  142. package/dist/streaming.d.ts +0 -10
  143. package/dist/streaming.d.ts.map +0 -1
  144. package/dist/streaming.js +0 -2
  145. package/dist/streaming.js.map +0 -1
  146. package/dist/type.d.ts +0 -91
  147. package/dist/type.d.ts.map +0 -1
  148. package/dist/type.js +0 -2
  149. package/dist/type.js.map +0 -1
  150. package/dist/utility/character-set-descriptor.d.ts +0 -6
  151. package/dist/utility/character-set-descriptor.d.ts.map +0 -1
  152. package/dist/utility/character-set-descriptor.js +0 -28
  153. package/dist/utility/character-set-descriptor.js.map +0 -1
  154. package/dist/utility/character-set-proxy.d.ts +0 -31
  155. package/dist/utility/character-set-proxy.d.ts.map +0 -1
  156. package/dist/utility/character-set-proxy.js +0 -278
  157. package/dist/utility/character-set-proxy.js.map +0 -1
  158. package/dist/utility/index.d.ts +0 -4
  159. package/dist/utility/index.d.ts.map +0 -1
  160. package/dist/utility/index.js +0 -4
  161. package/dist/utility/index.js.map +0 -1
  162. package/dist/utility/reg-exp-proxy.d.ts +0 -8
  163. package/dist/utility/reg-exp-proxy.d.ts.map +0 -1
  164. package/dist/utility/reg-exp-proxy.js +0 -103
  165. package/dist/utility/reg-exp-proxy.js.map +0 -1
  166. package/dist/utility/string-descriptor.d.ts +0 -4
  167. package/dist/utility/string-descriptor.d.ts.map +0 -1
  168. package/dist/utility/string-descriptor.js +0 -12
  169. package/dist/utility/string-descriptor.js.map +0 -1
  170. package/dist/utility/string-proxy.d.ts +0 -7
  171. package/dist/utility/string-proxy.d.ts.map +0 -1
  172. package/dist/utility/string-proxy.js +0 -63
  173. package/dist/utility/string-proxy.js.map +0 -1
  174. package/dist/utility/transformer-descriptor.d.ts +0 -6
  175. package/dist/utility/transformer-descriptor.d.ts.map +0 -1
  176. package/dist/utility/transformer-descriptor.js +0 -24
  177. package/dist/utility/transformer-descriptor.js.map +0 -1
  178. package/dist/utility/transformer-proxy.d.ts +0 -9
  179. package/dist/utility/transformer-proxy.d.ts.map +0 -1
  180. package/dist/utility/transformer-proxy.js +0 -111
  181. package/dist/utility/transformer-proxy.js.map +0 -1
@@ -0,0 +1,473 @@
1
+ import { MemoryTransport, Promisable, AppDataStorage, HTTPFetch, Hyperlink, Nullishable } from '@aidc-toolkit/core';
2
+ import { StringValidation, StringValidator, CharacterSetValidator, Exclusion, CharacterSetCreator } from '@aidc-toolkit/utility';
3
+ import { Logger } from 'tslog';
4
+
5
+ /**
6
+ * Type that error type is expected to extend. If the application framework reports errors through the throw/catch
7
+ * mechanism, the error type is expected to extend {@linkcode Error}. Otherwise, it may extend any object type.
8
+ *
9
+ * @template ThrowError
10
+ * If true, errors are reported through the throw/catch mechanism.
11
+ */
12
+ type ErrorExtends<ThrowError extends boolean> = ThrowError extends true ? Error : object;
13
+ /**
14
+ * Sheet.
15
+ */
16
+ interface Sheet {
17
+ /**
18
+ * Sheet name.
19
+ */
20
+ readonly name: string;
21
+ }
22
+ /**
23
+ * Single cell address.
24
+ */
25
+ interface Address {
26
+ /**
27
+ * Zero-indexed row.
28
+ */
29
+ readonly rowIndex: number;
30
+ /**
31
+ * Zero-indexed column.
32
+ */
33
+ readonly columnIndex: number;
34
+ }
35
+ /**
36
+ * Sheet address.
37
+ */
38
+ interface SheetAddress extends Sheet, Address {
39
+ }
40
+ /**
41
+ * Range of cells.
42
+ */
43
+ interface Range {
44
+ /**
45
+ * Start address, inclusive.
46
+ */
47
+ readonly startAddress: Address;
48
+ /**
49
+ * End address, exclusive.
50
+ */
51
+ readonly endAddress: Address;
52
+ }
53
+ /**
54
+ * Sheet range.
55
+ */
56
+ interface SheetRange extends Sheet, Range {
57
+ }
58
+ /**
59
+ * Matrix type; shorthand for defining a two-dimensional matrix (array of array) of a type.
60
+ *
61
+ * @template T
62
+ * Type.
63
+ */
64
+ type Matrix<T> = T[][];
65
+ /**
66
+ * Function singleton return, possibly including an error return. If the application extension reports errors through
67
+ * the return value, the result is the union of the return type and the error type; otherwise, it's just the return
68
+ * type.
69
+ *
70
+ * @template TResult
71
+ * Result type.
72
+ *
73
+ * @template ThrowError
74
+ * If true, errors are reported through the throw/catch mechanism.
75
+ *
76
+ * @template TError
77
+ * Error type.
78
+ */
79
+ type SingletonResult<TResult, ThrowError extends boolean, TError extends ErrorExtends<ThrowError>> = ThrowError extends false ? TResult | TError : TResult;
80
+ /**
81
+ * Function matrix return, possibly including an error return in each element. If the application extension reports
82
+ * errors through the return value, the individual element result is the union of the return type and the error type;
83
+ * otherwise, it's just the return type.
84
+ *
85
+ * @template TResult
86
+ * Result type.
87
+ *
88
+ * @template ThrowError
89
+ * If true, errors are reported through the throw/catch mechanism.
90
+ *
91
+ * @template TError
92
+ * Error type.
93
+ */
94
+ type MatrixResult<TResult, ThrowError extends boolean, TError extends ErrorExtends<ThrowError>> = Matrix<SingletonResult<TResult, ThrowError, TError>>;
95
+
96
+ /**
97
+ * Streaming consumer callback, returned by application extension implementation.
98
+ */
99
+ type StreamingConsumerCallback<TResult, ThrowError extends boolean, TError extends ErrorExtends<ThrowError>> = (result: MatrixResult<TResult, ThrowError, TError>) => void;
100
+ /**
101
+ * Streaming cancelled callback, passed to application extension implementation.
102
+ */
103
+ type StreamingCancelledCallback = () => void;
104
+
105
+ /**
106
+ * Library proxy.
107
+ *
108
+ * @template ThrowError
109
+ * If true, errors are reported through the throw/catch mechanism.
110
+ *
111
+ * @template TError
112
+ * Error type.
113
+ *
114
+ * @template TInvocationContext
115
+ * Application-specific invocation context type.
116
+ *
117
+ * @template TStreamingInvocationContext
118
+ * Application-specific streaming invocation context type.
119
+ *
120
+ * @template TBigInt
121
+ * Type to which big integer is mapped.
122
+ */
123
+ declare abstract class LibProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> {
124
+ #private;
125
+ /**
126
+ * Constructor.
127
+ *
128
+ * @param appExtension
129
+ * Application extension.
130
+ */
131
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
132
+ /**
133
+ * Get the application extension.
134
+ */
135
+ get appExtension(): AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>;
136
+ /**
137
+ * Map big integer to another type if necessary.
138
+ *
139
+ * @param value
140
+ * Big integer value to map.
141
+ *
142
+ * @returns
143
+ * Mapped big integer value.
144
+ */
145
+ mapBigInt(value: bigint): SingletonResult<TBigInt, ThrowError, TError>;
146
+ /**
147
+ * Call a singleton result function with error handling.
148
+ *
149
+ * @param callback
150
+ * Callback.
151
+ *
152
+ * @returns
153
+ * Callback return or error if errors are not thrown.
154
+ */
155
+ singletonResult<TResult>(callback: () => SingletonResult<TResult, ThrowError, TError>): SingletonResult<TResult, ThrowError, TError>;
156
+ /**
157
+ * Call a matrix result function with error handling.
158
+ *
159
+ * @param matrixValues
160
+ * Matrix of values.
161
+ *
162
+ * @param valueCallback
163
+ * Callback to process value.
164
+ *
165
+ * @returns
166
+ * Matrix of callback results and errors if errors are not thrown.
167
+ */
168
+ protected matrixResult<TValue, TResult>(matrixValues: Matrix<TValue>, valueCallback: (value: TValue) => SingletonResult<TResult, ThrowError, TError>): MatrixResult<TResult, ThrowError, TError>;
169
+ /**
170
+ * Map a matrix of validate string results to boolean. If the string is empty, the result is true, indicating that
171
+ * there is no error.
172
+ *
173
+ * @param matrixValidateResults
174
+ * Matrix of results from a call to a validate function.
175
+ *
176
+ * @returns
177
+ * Matrix of boolean values, true if corresponding string is empty.
178
+ */
179
+ protected isValidString(matrixValidateResults: MatrixResult<string, ThrowError, TError>): Matrix<boolean>;
180
+ /**
181
+ * Set up a mapping and call a matrix result function with error handling.
182
+ *
183
+ * @param setUpCallback
184
+ * Callback to set up the mapping.
185
+ *
186
+ * @param matrixValues
187
+ * Matrix of values.
188
+ *
189
+ * @param valueCallback
190
+ * Callback to process value.
191
+ *
192
+ * @returns
193
+ * Matrix of callback results and errors if errors are not thrown.
194
+ */
195
+ protected setUpMatrixResult<TSetup, TValue, TResult>(setUpCallback: () => TSetup, matrixValues: Matrix<TValue>, valueCallback: (setup: TSetup, value: TValue) => SingletonResult<TResult, ThrowError, TError>): MatrixResult<TResult, ThrowError, TError>;
196
+ /**
197
+ * Call an array result function with error handling and map to a matrix.
198
+ *
199
+ * @param matrixValues
200
+ * Matrix of values.
201
+ *
202
+ * @param callback
203
+ * Callback.
204
+ *
205
+ * @returns
206
+ * Matrix of callback results and errors if errors are not thrown.
207
+ */
208
+ protected arrayResult<TValue, TResult>(matrixValues: Matrix<TValue>, callback: (value: TValue) => Array<SingletonResult<TResult, ThrowError, TError>>): MatrixResult<TResult, ThrowError, TError>;
209
+ /**
210
+ * Call a matrix result function with error handling and map a non-error result to an empty string and {@linkcode
211
+ * RangeError} to the string error message.
212
+ *
213
+ * @param matrixValues
214
+ * Matrix of values.
215
+ *
216
+ * @param callback
217
+ * Callback that either returns or throws an exception.
218
+ *
219
+ * @returns
220
+ * Matrix of strings.
221
+ */
222
+ protected matrixErrorResult<TValue>(matrixValues: Matrix<TValue>, callback: (value: TValue) => void): Matrix<string>;
223
+ /**
224
+ * Call an iterable result function with error handling and map to a matrix. Although the natural approach would be
225
+ * to map to a single-element array containing an array of *N* results (i.e., [[r0, r1, r2, ..., r*N*]]), this is
226
+ * rendered visually as a single row. The more readable approach is as a single column, so the mapping is to an
227
+ * *N*-element array of single-element result arrays (i.e., [[r0], [r1], [r2], ..., [r*N*]]).
228
+ *
229
+ * @param iterableCallback
230
+ * Iterable callback.
231
+ *
232
+ * @returns
233
+ * Matrix of callback results.
234
+ */
235
+ protected iterableResult<TResult>(iterableCallback: () => Iterable<SingletonResult<TResult, ThrowError, TError>>): MatrixResult<TResult, ThrowError, TError>;
236
+ }
237
+
238
+ /**
239
+ * Application extension.
240
+ *
241
+ * @template ThrowError
242
+ * If true, errors are reported through the throw/catch mechanism.
243
+ *
244
+ * @template TError
245
+ * Error type.
246
+ *
247
+ * @template TInvocationContext
248
+ * Application-specific invocation context type.
249
+ *
250
+ * @template TStreamingInvocationContext
251
+ * Application-specific streaming invocation context type.
252
+ *
253
+ * @template TBigInt
254
+ * Type to which big integer is mapped.
255
+ */
256
+ declare abstract class AppExtension<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> {
257
+ #private;
258
+ /**
259
+ * Application name.
260
+ */
261
+ static readonly APPLICATION_NAME = "AIDCToolkit";
262
+ /**
263
+ * Version property name.
264
+ */
265
+ static readonly VERSION_NAME: string;
266
+ /**
267
+ * Constructor.
268
+ *
269
+ * @param version
270
+ * Application version.
271
+ *
272
+ * @param maximumSequenceCount
273
+ * Maximum sequence count supported by application.
274
+ *
275
+ * @param throwError
276
+ * If true, errors are reported through the throw/catch mechanism.
277
+ */
278
+ protected constructor(version: string, maximumSequenceCount: number, throwError: ThrowError);
279
+ /**
280
+ * Initialize the application extension.
281
+ */
282
+ initialize(): Promise<void>;
283
+ /**
284
+ * Get the version.
285
+ *
286
+ * @returns
287
+ * Version.
288
+ */
289
+ get version(): string;
290
+ /**
291
+ * Determine if errors are reported through the throw/catch mechanism.
292
+ */
293
+ get throwError(): ThrowError;
294
+ /**
295
+ * Get the logger.
296
+ */
297
+ get logger(): Logger<object>;
298
+ /**
299
+ * Get the logger memory transport.
300
+ */
301
+ get memoryTransport(): MemoryTransport<object>;
302
+ /**
303
+ * Get the maximum width supported by the application.
304
+ */
305
+ abstract get maximumWidth(): number;
306
+ /**
307
+ * Get the maximum height supported by the application.
308
+ */
309
+ abstract get maximumHeight(): number;
310
+ /**
311
+ * Get a proxy instance. The use of a weak map ensures that proxies are loaded only as needed and may be garbage
312
+ * collected if required.
313
+ *
314
+ * @param ProxyConstructor
315
+ * Proxy constructor.
316
+ *
317
+ * @returns
318
+ * Proxy instance.
319
+ */
320
+ getProxy<T extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>>(ProxyConstructor: new (appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>) => T): T;
321
+ /**
322
+ * Get the sheet address from an invocation context.
323
+ *
324
+ * @param invocationContext
325
+ * Invocation context.
326
+ *
327
+ * @returns
328
+ * Sheet address.
329
+ */
330
+ abstract getSheetAddress(invocationContext: TInvocationContext): Promisable<SheetAddress>;
331
+ /**
332
+ * Get a parameter range from an invocation context.
333
+ *
334
+ * @param invocationContext
335
+ * Invocation context.
336
+ *
337
+ * @param parameterNumber
338
+ * Parameter number.
339
+ *
340
+ * @returns
341
+ * Sheet range or null if parameter is not a range.
342
+ */
343
+ abstract getParameterSheetRange(invocationContext: TInvocationContext, parameterNumber: number): Promisable<SheetRange | null>;
344
+ /**
345
+ * Set up streaming for a streaming function.
346
+ *
347
+ * @param streamingInvocationContext
348
+ * Streaming invocation context.
349
+ *
350
+ * @param streamingCancelledCallback
351
+ * Streaming cancelled callback, called when streaming is cancelled.
352
+ *
353
+ * @returns
354
+ * Streaming consumer callback, called when stream contents updated.
355
+ */
356
+ abstract setUpStreaming<TResult>(streamingInvocationContext: TStreamingInvocationContext, streamingCancelledCallback: StreamingCancelledCallback): StreamingConsumerCallback<TResult, ThrowError, TError>;
357
+ /**
358
+ * Get a property stored within the active document.
359
+ *
360
+ * @param name
361
+ * Property name.
362
+ *
363
+ * @returns
364
+ * Property value or undefined if no value is stored under the given name.
365
+ */
366
+ abstract getDocumentProperty(name: string): Promisable<string | undefined>;
367
+ /**
368
+ * Set a property to be stored within the active document.
369
+ *
370
+ * @param name
371
+ * Property name.
372
+ *
373
+ * @param value
374
+ * Property value.
375
+ */
376
+ abstract setDocumentProperty(name: string, value: string): Promisable<void>;
377
+ /**
378
+ * Delete a property from the active document.
379
+ *
380
+ * @param name
381
+ * Property name.
382
+ */
383
+ abstract deleteDocumentProperty(name: string): Promisable<void>;
384
+ /**
385
+ * Get application data storage for the current document.
386
+ */
387
+ abstract get documentAppDataStorage(): AppDataStorage<boolean>;
388
+ /**
389
+ * Get application data storage shared across multiple documents.
390
+ */
391
+ abstract get sharedAppDataStorage(): AppDataStorage<boolean>;
392
+ /**
393
+ * Get HTTP fetch function.
394
+ */
395
+ abstract get httpFetch(): HTTPFetch;
396
+ /**
397
+ * Validate a sequence count against the maximum supported by application.
398
+ *
399
+ * @param sequenceCount
400
+ * Sequence count.
401
+ */
402
+ validateSequenceCount(sequenceCount: number): void;
403
+ /**
404
+ * Map big integer to another type if necessary.
405
+ *
406
+ * @param value
407
+ * Big integer value to map.
408
+ *
409
+ * @returns
410
+ * Mapped big integer value.
411
+ */
412
+ abstract mapBigInt(value: bigint): SingletonResult<TBigInt, ThrowError, TError>;
413
+ /**
414
+ * Map hyperlink results to a form suitable for the application.
415
+ *
416
+ * @param invocationContext
417
+ * Invocation context.
418
+ *
419
+ * @param matrixHyperlinkResults
420
+ * Matrix of hyperlink results from function call.
421
+ *
422
+ * @returns
423
+ * Matrix of results in a form suitable for the application.
424
+ */
425
+ abstract mapHyperlinkResults(invocationContext: TInvocationContext, matrixHyperlinkResults: MatrixResult<Hyperlink, ThrowError, TError>): Promisable<MatrixResult<unknown, ThrowError, TError>>;
426
+ /**
427
+ * Map a range error (thrown by the library) to an application-specific error. If errors are reported through the
428
+ * throw/catch mechanism, the implementation may return the range error unmodified if that is supported.
429
+ *
430
+ * @param rangeError
431
+ */
432
+ abstract mapRangeError(rangeError: RangeError): TError;
433
+ /**
434
+ * Handle an error with a message; called when an exception occurs outside the control of the AIDC Toolkit library.
435
+ * Implementation must not return, most likely by throwing the message wrapped in an error type.
436
+ *
437
+ * @param message
438
+ * Message to include in the error.
439
+ */
440
+ abstract handleError(message: string): never;
441
+ }
442
+
443
+ declare abstract class StringProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends LibProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
444
+ protected validateString<TStringValidation extends StringValidation>(validator: StringValidator<TStringValidation>, matrixSs: Matrix<string>, validation?: TStringValidation): Matrix<string>;
445
+ }
446
+
447
+ declare abstract class CharacterSetValidatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends StringProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
448
+ #private;
449
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>, characterSetValidator: CharacterSetValidator);
450
+ validate(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): Matrix<string>;
451
+ isValid(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>): Matrix<boolean>;
452
+ }
453
+ declare abstract class CharacterSetCreatorProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetValidatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
454
+ #private;
455
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>, characterSetCreator: CharacterSetCreator);
456
+ create(length: number, matrixValues: Matrix<number | bigint>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<string, ThrowError, TError>;
457
+ createSequence(length: number, startValue: number, count: number, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<string, ThrowError, TError>;
458
+ valueFor(matrixSs: Matrix<string>, exclusion: Nullishable<Exclusion>, tweak: Nullishable<number | bigint>): MatrixResult<TBigInt, ThrowError, TError>;
459
+ }
460
+ declare class NumericProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
461
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
462
+ }
463
+ declare class HexadecimalProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
464
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
465
+ }
466
+ declare class AlphabeticProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
467
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
468
+ }
469
+ declare class AlphanumericProxy<ThrowError extends boolean, TError extends ErrorExtends<ThrowError>, TInvocationContext, TStreamingInvocationContext, TBigInt> extends CharacterSetCreatorProxy<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt> {
470
+ constructor(appExtension: AppExtension<ThrowError, TError, TInvocationContext, TStreamingInvocationContext, TBigInt>);
471
+ }
472
+
473
+ export { type Address as A, CharacterSetValidatorProxy as C, type ErrorExtends as E, HexadecimalProxy as H, LibProxy as L, type Matrix as M, NumericProxy as N, type Range as R, StringProxy as S, type MatrixResult as a, type Sheet as b, type SheetAddress as c, type SheetRange as d, type SingletonResult as e, type StreamingConsumerCallback as f, type StreamingCancelledCallback as g, AppExtension as h, CharacterSetCreatorProxy as i, AlphabeticProxy as j, AlphanumericProxy as k };