@requence/service 1.0.0-alpha.22 → 1.0.0-alpha.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/build/index.js +327 -85
- package/build/index.js.map +10 -9
- package/build/types/helpers/src/files/fileObject.d.ts +2 -2
- package/build/types/helpers/src/index.d.ts +1 -0
- package/build/types/helpers/src/index.d.ts.map +1 -1
- package/build/types/helpers/src/jsonschema/mapSchema.d.ts +1 -1
- package/build/types/helpers/src/jsonschema/mapSchema.d.ts.map +1 -1
- package/build/types/helpers/src/jsonschema/types.d.ts +2 -1
- package/build/types/helpers/src/jsonschema/types.d.ts.map +1 -1
- package/build/types/helpers/src/jsonschema/validate.d.ts.map +1 -1
- package/build/types/helpers/src/protocol/update.d.ts +56 -0
- package/build/types/helpers/src/protocol/update.d.ts.map +1 -1
- package/build/types/helpers/src/utils/mapData.d.ts +1 -0
- package/build/types/helpers/src/utils/mapData.d.ts.map +1 -1
- package/build/types/helpers/src/utils/requenceCallback.d.ts +15 -0
- package/build/types/helpers/src/utils/requenceCallback.d.ts.map +1 -0
- package/build/types/helpers/src/utils/resolveRequenceTypes.d.ts +7 -1
- package/build/types/helpers/src/utils/resolveRequenceTypes.d.ts.map +1 -1
- package/build/types/service/src/createAmqpConnection.d.ts +2 -2
- package/build/types/service/src/createAmqpConnection.d.ts.map +1 -1
- package/build/types/service/src/helpers.d.ts +48 -17
- package/build/types/service/src/helpers.d.ts.map +1 -1
- package/build/types/service/src/index.d.ts +2 -0
- package/build/types/service/src/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -15,7 +15,25 @@ type OutputValue = {
|
|
|
15
15
|
[OUTPUT_VALUE]: string | null;
|
|
16
16
|
value: any;
|
|
17
17
|
};
|
|
18
|
-
export declare function
|
|
18
|
+
export declare function processData(params: {
|
|
19
|
+
data: unknown;
|
|
20
|
+
outputName: null | string;
|
|
21
|
+
options: Pick<TaskOptions, 'uploadUrl' | 'streamUrl'>;
|
|
22
|
+
onCallback: (callback: (...args: any[]) => void) => {
|
|
23
|
+
callbackId: string;
|
|
24
|
+
sourceId: string;
|
|
25
|
+
};
|
|
26
|
+
onDone: () => void;
|
|
27
|
+
}): Promise<unknown>;
|
|
28
|
+
export declare function unwrapResult(params: {
|
|
29
|
+
result: unknown;
|
|
30
|
+
options: Pick<TaskOptions, 'uploadUrl' | 'streamUrl'>;
|
|
31
|
+
onCallback: (callback: (...args: any[]) => void) => {
|
|
32
|
+
callbackId: string;
|
|
33
|
+
sourceId: string;
|
|
34
|
+
};
|
|
35
|
+
onDone: () => void;
|
|
36
|
+
}): Promise<{
|
|
19
37
|
value: unknown;
|
|
20
38
|
outputName: string | null;
|
|
21
39
|
}>;
|
|
@@ -25,22 +43,35 @@ export default function createContextHelper(options: {
|
|
|
25
43
|
configuration: unknown;
|
|
26
44
|
onLog: (method: 'log' | 'warn' | 'info' | 'error', data: any[]) => void;
|
|
27
45
|
onDefer: (reason?: string) => string;
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
46
|
+
onCallback: (params: {
|
|
47
|
+
sourceId: string;
|
|
48
|
+
callbackId: string;
|
|
49
|
+
outputName: string | null;
|
|
50
|
+
propertyPath: (string | number)[];
|
|
51
|
+
arg: unknown;
|
|
52
|
+
}) => void;
|
|
53
|
+
}): readonly [{
|
|
54
|
+
readonly taskId: string;
|
|
55
|
+
readonly input: any;
|
|
56
|
+
readonly configuration: any;
|
|
57
|
+
readonly toOutput: (name: string | null, value: unknown) => OutputValue;
|
|
58
|
+
readonly defer: (reason?: string) => string;
|
|
59
|
+
readonly debug: {
|
|
60
|
+
readonly log: (...data: any[]) => void;
|
|
61
|
+
readonly info: (...data: any[]) => void;
|
|
62
|
+
readonly warn: (...data: any[]) => void;
|
|
63
|
+
readonly error: (...data: any[]) => void;
|
|
39
64
|
};
|
|
40
|
-
retry(delay?: number)
|
|
41
|
-
abort(reason?: string)
|
|
42
|
-
skip()
|
|
43
|
-
|
|
44
|
-
|
|
65
|
+
readonly retry: (delay?: number) => never;
|
|
66
|
+
readonly abort: (reason?: string) => never;
|
|
67
|
+
readonly skip: () => never;
|
|
68
|
+
readonly terminated: Promise<string>;
|
|
69
|
+
readonly wrapIterable: <T extends Iterable<any> | AsyncIterable<any>>(iterable: T) => T;
|
|
70
|
+
}, Promise<string> & {
|
|
71
|
+
resolve: (value: string | PromiseLike<string>) => void;
|
|
72
|
+
reject: (reason?: any) => void;
|
|
73
|
+
promise: Promise<string>;
|
|
74
|
+
}];
|
|
75
|
+
export type ContextHelper = ReturnType<typeof createContextHelper>[0];
|
|
45
76
|
export {};
|
|
46
77
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAE7D,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,MAAM,GACN,OAAO,GACP;IAAE,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,GAC1B,KAAK,CAAC,SAAS,CAAC,GAChB,IAAI,CAAA;AAER,qBAAa,UAAW,SAAQ,KAAK;IAChB,KAAK,CAAC,EAAE,MAAM;gBAAd,KAAK,CAAC,EAAE,MAAM,YAAA;CAGlC;AAED,qBAAa,SAAU,SAAQ,KAAK;CAAG;AAEvC,qBAAa,UAAW,SAAQ,KAAK;CAAG;AAExC,QAAA,MAAM,YAAY,eAAyB,CAAA;AAE3C,KAAK,WAAW,GAAG;IACjB,CAAC,YAAY,CAAC,EAAE,MAAM,GAAG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CAAA;QAClB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;QACzB,YAAY,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;QACjC,GAAG,EAAE,OAAO,CAAA;KACb,KAAK,IAAI,CAAA;CACX;;;;8BAWoB,MAAM,GAAG,IAAI,SAAS,OAAO,KAAG,WAAW;8BAnB3C,MAAM,KAAK,MAAM;;gCA4BjB,GAAG,EAAE;iCAGJ,GAAG,EAAE;iCAGL,GAAG,EAAE;kCAGJ,GAAG,EAAE;;6BAIR,MAAM;8BAGL,MAAM;;;4BAOG,CAAC,SAAS,QAAQ,CAAC,GAAG,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,YACxD,CAAC,KACV,CAAC;;;;;GA8CT;AAED,MAAM,MAAM,aAAa,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC,CAAC,CAAC,CAAA"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { AmqpConnectionManagerOptions } from 'amqp-connection-manager';
|
|
2
2
|
import { type ConnectionApi, type MessageHandler } from './createAmqpConnection.ts';
|
|
3
3
|
export { RequenceFile, RequenceStream } from '../../helpers/src/files/index.js';
|
|
4
|
+
export { createCallback } from '../../helpers/src/index.js';
|
|
5
|
+
export type RequenceCallback<T> = (arg: T) => void;
|
|
4
6
|
export type ServiceApi<V extends keyof RequenceService.Version | (string & {})> = ConnectionApi<V>;
|
|
5
7
|
interface ServiceOptions<V extends string> {
|
|
6
8
|
accessToken?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAA;AAG3E,OAA6B,EAC3B,KAAK,aAAa,EAClB,KAAK,cAAc,EACpB,MAAM,2BAA2B,CAAA;AAElC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAA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