@devkong/cli 0.0.56 → 0.0.58
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/index.js +2679 -849
- package/package.json +1 -1
- package/packages/kong-cli/src/services/api.d.ts +1 -2
- package/packages/kong-spec/src/index.d.ts +2 -2
- package/packages/kong-spec/src/lib/kongSpec.d.ts +34 -7
- package/packages/kong-spec/src/lib/kongSpecBuild.d.ts +2 -1
- package/packages/kong-spec/src/lib/kongSpecDoc.d.ts +2 -2
- package/packages/kong-spec/src/lib/kongSpecUtils.d.ts +13 -5
- package/packages/kong-ts/src/index.d.ts +6 -4
- package/packages/kong-ts/src/lib/cron.d.ts +4 -0
- package/packages/kong-ts/src/lib/guard.d.ts +1 -0
- package/packages/kong-ts/src/lib/interval.d.ts +1 -0
- package/packages/kong-ts/src/lib/jq.d.ts +4 -4
- package/packages/kong-ts/src/lib/text.d.ts +2 -0
- package/packages/kong-ts/src/lib/timezone.d.ts +1 -0
- package/packages/kong-ts-contract/src/index.d.ts +1 -0
- package/packages/kong-ts-contract/src/lib/appProcessData.d.ts +13 -0
package/package.json
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { AxiosRequestConfig } from "axios";
|
|
2
2
|
import { Profile } from "../common/profile";
|
|
3
3
|
export type RequestConfigProvider = () => Promise<AxiosRequestConfig>;
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function requestConfigProvider(profile: Profile): () => Promise<AxiosRequestConfig>;
|
|
4
|
+
export declare function requestConfigProvider(profile: Profile): RequestConfigProvider;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { makeServerlessJavaAppProps, serverlessFlowBuilder, stringifyServerlessFlow, } from "./lib/kongServerless";
|
|
2
2
|
export type { FloweyServerlessBuilder } from "./lib/kongServerless";
|
|
3
3
|
export type { KongSpecJobSession } from "./lib/kongSession";
|
|
4
|
-
export type { KongSpecAction, KongSpecActionCallFunction, KongSpecActionCallProcess, KongSpecActionDelay, KongSpecActionInject, KongSpecActionSendEvent, KongSpecAnnotation,
|
|
4
|
+
export type { KongSpecAction, KongSpecActionCallFunction, KongSpecActionCallProcess, KongSpecActionDelay, KongSpecActionInject, KongSpecActionSendEvent, KongSpecAnnotation, KongSpecBranch, KongSpecCache, KongSpecCallModel, KongSpecCircuitBreaker, KongSpecCondition, KongSpecEffect, KongSpecEffectStatus, KongSpecError, KongSpecEventBroker, KongSpecEventConnection, KongSpecFeatureCompensation, KongSpecFlow, KongSpecFunctionRef, KongSpecHowToInvoke, KongSpecHowToOutput, KongSpecHowToStore, KongSpecOutputAppend, KongSpecProcessRef, KongSpecRecord, KongSpecRecordHeader, KongSpecRetry, KongSpecRule, KongSpecSecretRef, KongSpecState, KongSpecStateCallFunction, KongSpecStateCallProcess, KongSpecStateCompensate, KongSpecStateDelay, KongSpecStateExit, KongSpecStateFail, KongSpecStateForeach, KongSpecStateInject, KongSpecStateParallel, KongSpecStateRule, KongSpecStateSendEvent, KongSpecStateStart, KongSpecStateSucceed, KongSpecStateSwitch, KongSpecStateWaitEvent, KongSpecStoreRetryControl, KongSpecSupportsActions, KongSpecSupportsErrors, KongSpecSupportsOutputSample, KongSpecSupportsTransition, } from "./lib/kongSpec";
|
|
5
5
|
export { KongSpecBuild } from "./lib/kongSpecBuild";
|
|
6
6
|
export { KongSpecDoc } from "./lib/kongSpecDoc";
|
|
7
7
|
export { KongSpecEnv } from "./lib/kongSpecEnv";
|
|
@@ -13,6 +13,6 @@ export { normalizeName } from "./lib/kongSpecNormalize";
|
|
|
13
13
|
export { KongSpecRef } from "./lib/kongSpecRef";
|
|
14
14
|
export type { KongSpecActionPath, KongSpecStatePath } from "./lib/kongSpecRef";
|
|
15
15
|
export { convertSpecToServerless } from "./lib/kongSpecToServerless";
|
|
16
|
-
export { findSourceState, getActions, outputAggregator, parallelStateOutputAggregator, traverseFlowUp, } from "./lib/kongSpecUtils";
|
|
16
|
+
export { findSourceState, getActions, getDependencies, outputAggregator, outputAggregatorUnsafe, parallelStateOutputAggregator, traverseFlowUp, } from "./lib/kongSpecUtils";
|
|
17
17
|
export { validate } from "./lib/kongSpecValidate";
|
|
18
18
|
export type { KongSpecValidationIssue, KongSpecValidators } from "./lib/kongSpecValidate";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { DataGuard, Distinct, Duration8601, JqFilter, JqObject, JqText, JsonObject, JsonText, Optional, SessionTenant, ShortUUID } from "@kong/ts";
|
|
1
|
+
import { Cron, DataGuard, Distinct, Duration8601, JqFilter, JqObject, JqText, JsonObject, JsonText, Optional, SessionTenant, ShortUUID } from "@kong/ts";
|
|
2
2
|
import { JSONSchema7 } from "json-schema";
|
|
3
|
-
export type KongSpecAppend = "list" | "last";
|
|
4
3
|
export interface KongSpecFunctionRef {
|
|
5
4
|
tenant: SessionTenant;
|
|
6
5
|
basedOn: Distinct<string, "KongSpecFunctionRefBasedOn">;
|
|
@@ -28,7 +27,7 @@ export interface KongSpecCache {
|
|
|
28
27
|
enabled: boolean;
|
|
29
28
|
key: JqFilter;
|
|
30
29
|
failOnMiss: JqFilter;
|
|
31
|
-
ttl: Duration8601;
|
|
30
|
+
ttl: Duration8601 | Cron;
|
|
32
31
|
onFailure: "RETRY" | "SKIP";
|
|
33
32
|
}
|
|
34
33
|
export interface KongSpecRetry {
|
|
@@ -68,9 +67,27 @@ export interface KongSpecEffect {
|
|
|
68
67
|
usage: Record<string, unknown>;
|
|
69
68
|
data: JsonObject | null;
|
|
70
69
|
}
|
|
70
|
+
export interface KongSpecStoreRetryControl {
|
|
71
|
+
maxAttempts: number;
|
|
72
|
+
attemptDelay: Duration8601;
|
|
73
|
+
attemptTimeout: Duration8601 | null;
|
|
74
|
+
}
|
|
75
|
+
export interface KongSpecHowToStore {
|
|
76
|
+
type: "CONTEXT" | "EXTERNAL" | "CONTEXT_AND_EXTERNAL";
|
|
77
|
+
onFailure: "RETRY" | "SKIP";
|
|
78
|
+
retry: KongSpecStoreRetryControl;
|
|
79
|
+
secretRef: KongSpecSecretRef | null;
|
|
80
|
+
}
|
|
81
|
+
export interface KongSpecSecretRef {
|
|
82
|
+
type: string;
|
|
83
|
+
key: string;
|
|
84
|
+
metadata: Record<string, string>;
|
|
85
|
+
}
|
|
71
86
|
export interface KongSpecHowToOutput {
|
|
72
87
|
filter: JqFilter;
|
|
88
|
+
store: KongSpecHowToStore;
|
|
73
89
|
destinations: string[];
|
|
90
|
+
guards: DataGuard[];
|
|
74
91
|
}
|
|
75
92
|
export interface KongSpecSupportsInputFilter {
|
|
76
93
|
inputFilter: JqFilter;
|
|
@@ -78,8 +95,12 @@ export interface KongSpecSupportsInputFilter {
|
|
|
78
95
|
export interface KongSpecSupportsOutputFilter {
|
|
79
96
|
outputFilter: JqFilter;
|
|
80
97
|
}
|
|
98
|
+
export interface KongSpecSupportsOutputStore {
|
|
99
|
+
outputStore: KongSpecHowToStore;
|
|
100
|
+
}
|
|
101
|
+
export type KongSpecOutputAppend = "list" | "last";
|
|
81
102
|
export interface KongSpecSupportsOutputAppend {
|
|
82
|
-
outputAppend: Array<
|
|
103
|
+
outputAppend: Array<KongSpecOutputAppend>;
|
|
83
104
|
}
|
|
84
105
|
export interface KongSpecSupportsDataGuards {
|
|
85
106
|
guards: DataGuard[];
|
|
@@ -87,7 +108,7 @@ export interface KongSpecSupportsDataGuards {
|
|
|
87
108
|
export interface KongSpecSupportsOutputSample {
|
|
88
109
|
outputSample: Optional<JsonText>;
|
|
89
110
|
}
|
|
90
|
-
export interface KongSpecCallModel extends KongSpecSupportsInput, KongSpecSupportsOutputFilter, KongSpecSupportsOutputAppend, KongSpecSupportsOutputSample, KongSpecSupportsDataGuards, KongSpecSupportsInvoke {
|
|
111
|
+
export interface KongSpecCallModel extends KongSpecSupportsInput, KongSpecSupportsOutputFilter, KongSpecSupportsOutputStore, KongSpecSupportsOutputAppend, KongSpecSupportsOutputSample, KongSpecSupportsDataGuards, KongSpecSupportsInvoke {
|
|
91
112
|
}
|
|
92
113
|
export interface KongSpecSupportsErrors {
|
|
93
114
|
errors: KongSpecError[];
|
|
@@ -163,9 +184,15 @@ export interface KongSpecStateSendEvent extends KongSpecStateBase, KongSpecSuppo
|
|
|
163
184
|
connection: KongSpecEventConnection;
|
|
164
185
|
record: KongSpecRecord;
|
|
165
186
|
}
|
|
166
|
-
export interface KongSpecStateWaitEvent extends KongSpecStateBase, KongSpecSupportsTransition, KongSpecSupportsErrors, KongSpecFeatureCompensation, KongSpecSupportsTimeout, KongSpecSupportsCompensatedBy, KongSpecSupportsOutputFilter, KongSpecSupportsOutputAppend, KongSpecSupportsOutputSample {
|
|
187
|
+
export interface KongSpecStateWaitEvent extends KongSpecStateBase, KongSpecSupportsTransition, KongSpecSupportsErrors, KongSpecFeatureCompensation, KongSpecSupportsTimeout, KongSpecSupportsCompensatedBy, KongSpecSupportsOutputFilter, KongSpecSupportsOutputAppend, KongSpecSupportsOutputSample, KongSpecSupportsOutputStore {
|
|
167
188
|
type: "waitEvent";
|
|
168
|
-
|
|
189
|
+
correlationSource: "webhook";
|
|
190
|
+
correlationPath: string;
|
|
191
|
+
correlationFilter: JqFilter;
|
|
192
|
+
resolutionFilter: JqFilter;
|
|
193
|
+
resolutionAttemptDelay: Duration8601;
|
|
194
|
+
resolutionAttemptBackoff: "fast";
|
|
195
|
+
replyContent: JqText;
|
|
169
196
|
}
|
|
170
197
|
export interface KongSpecStateCallProcess extends KongSpecStateBase, KongSpecSupportsTransition, KongSpecCanBeUsedForCompensation, KongSpecSupportsErrors, KongSpecFeatureCompensation, KongSpecSupportsCompensatedBy, KongSpecCallModel {
|
|
171
198
|
type: "callProcess";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { JqObject, Optional } from "@kong/ts";
|
|
2
|
-
import { KongSpecActionCallFunction, KongSpecActionCallProcess, KongSpecActionDelay, KongSpecActionInject, KongSpecActionSendEvent, KongSpecAnnotation, KongSpecBranch, KongSpecCallModel, KongSpecCondition, KongSpecError, KongSpecEventBroker, KongSpecFlow, KongSpecFunctionRef, KongSpecHowToInvoke, KongSpecHowToOutput, KongSpecProcessRef, KongSpecRecordHeader, KongSpecRule, KongSpecState, KongSpecStateCallFunction, KongSpecStateCallProcess, KongSpecStateCompensate, KongSpecStateDelay, KongSpecStateFail, KongSpecStateForeach, KongSpecStateInject, KongSpecStateParallel, KongSpecStateRule, KongSpecStateSendEvent, KongSpecStateStart, KongSpecStateSucceed, KongSpecStateSwitch, KongSpecStateWaitEvent } from "./kongSpec";
|
|
2
|
+
import { KongSpecActionCallFunction, KongSpecActionCallProcess, KongSpecActionDelay, KongSpecActionInject, KongSpecActionSendEvent, KongSpecAnnotation, KongSpecBranch, KongSpecCallModel, KongSpecCondition, KongSpecError, KongSpecEventBroker, KongSpecFlow, KongSpecFunctionRef, KongSpecHowToInvoke, KongSpecHowToOutput, KongSpecHowToStore, KongSpecProcessRef, KongSpecRecordHeader, KongSpecRule, KongSpecState, KongSpecStateCallFunction, KongSpecStateCallProcess, KongSpecStateCompensate, KongSpecStateDelay, KongSpecStateFail, KongSpecStateForeach, KongSpecStateInject, KongSpecStateParallel, KongSpecStateRule, KongSpecStateSendEvent, KongSpecStateStart, KongSpecStateSucceed, KongSpecStateSwitch, KongSpecStateWaitEvent } from "./kongSpec";
|
|
3
3
|
export declare class KongSpecBuild {
|
|
4
4
|
flow(id: KongSpecFlow["id"]): KongSpecFlow;
|
|
5
5
|
startState(overrides?: Partial<KongSpecStateStart>): KongSpecStateStart;
|
|
@@ -28,6 +28,7 @@ export declare class KongSpecBuild {
|
|
|
28
28
|
recordHeader(overrides?: Partial<KongSpecRecordHeader>): KongSpecRecordHeader;
|
|
29
29
|
error(overrides?: Partial<KongSpecError>): KongSpecError;
|
|
30
30
|
output(overrides?: Partial<KongSpecHowToOutput>): KongSpecHowToOutput;
|
|
31
|
+
store(overrides?: Partial<KongSpecHowToStore>): KongSpecHowToStore;
|
|
31
32
|
invoke(overrides?: Partial<KongSpecHowToInvoke>): KongSpecHowToInvoke;
|
|
32
33
|
retry(overrides?: Partial<KongSpecHowToInvoke["retry"]>): KongSpecHowToInvoke["retry"];
|
|
33
34
|
circuitBreaker(overrides?: Partial<KongSpecHowToInvoke["circuitBreaker"]>): KongSpecHowToInvoke["circuitBreaker"];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export declare class KongSpecDoc {
|
|
2
2
|
static aboutCompensation: string;
|
|
3
|
+
static aboutWaitEvent: string;
|
|
3
4
|
static aboutProcessTimeout: string;
|
|
4
5
|
static aboutCallbackTimeout: string;
|
|
5
6
|
static aboutActionDataFilterOfOutput: string;
|
|
@@ -12,7 +13,7 @@ export declare class KongSpecDoc {
|
|
|
12
13
|
static aboutResilience: string;
|
|
13
14
|
static aboutLimits: string;
|
|
14
15
|
static aboutIdentify: string;
|
|
15
|
-
static aboutSizeLimit: (bytes:
|
|
16
|
+
static aboutSizeLimit: (bytes: string) => string;
|
|
16
17
|
static aboutCallFunction: string;
|
|
17
18
|
static aboutCallProcess: string;
|
|
18
19
|
static aboutCompensate: string;
|
|
@@ -25,6 +26,5 @@ export declare class KongSpecDoc {
|
|
|
25
26
|
static aboutSucceed: string;
|
|
26
27
|
static aboutSwitch: string;
|
|
27
28
|
static aboutRule: string;
|
|
28
|
-
static aboutWaitEvent: string;
|
|
29
29
|
static aboutOptionalWhenAtLeastOne: string;
|
|
30
30
|
}
|
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import { JqFilter, JsonText } from "@kong/ts";
|
|
2
|
-
import { KongSpecAction, KongSpecFlow, KongSpecState, KongSpecStateParallel, KongSpecSupportsTransition } from "./kongSpec";
|
|
1
|
+
import { JqFilter, JsonObject, JsonText, SessionTenant } from "@kong/ts";
|
|
2
|
+
import { KongSpecAction, KongSpecFlow, KongSpecFunctionRef, KongSpecProcessRef, KongSpecState, KongSpecStateParallel, KongSpecSupportsTransition } from "./kongSpec";
|
|
3
3
|
import { KongSpecActionPath, KongSpecStatePath } from "./kongSpecRef";
|
|
4
|
-
interface
|
|
4
|
+
interface TestItem {
|
|
5
5
|
id: KongSpecState["id"] | KongSpecAction["id"];
|
|
6
6
|
source: "initial" | "errors" | "transition" | "noMatchedRule" | "conditions" | "compensateBy" | "actions" | "branches";
|
|
7
7
|
}
|
|
8
|
-
|
|
8
|
+
interface Dependency {
|
|
9
|
+
type: "function" | "process";
|
|
10
|
+
tenant: SessionTenant;
|
|
11
|
+
basedOn: KongSpecFunctionRef["basedOn"] | KongSpecFunctionRef["basedOn"];
|
|
12
|
+
aliasName: KongSpecFunctionRef["aliasName"] | KongSpecProcessRef["aliasName"];
|
|
13
|
+
usage: Array<KongSpecAction["name"] | KongSpecState["name"]>;
|
|
14
|
+
}
|
|
15
|
+
export declare function traverseFlowUp(id: KongSpecState["id"] | KongSpecAction["id"], states: KongSpecFlow["states"], test: (current: TestItem) => boolean): boolean;
|
|
9
16
|
export declare function outputAggregator(jq: (sample: string, filter: JqFilter) => Promise<string>): (flow: KongSpecFlow, path: KongSpecStatePath | KongSpecActionPath, includeTarget?: boolean) => Promise<JsonText>;
|
|
17
|
+
export declare function outputAggregatorUnsafe(jq: (sample: string, filter: JqFilter) => Promise<string>): (flow: KongSpecFlow, path: KongSpecStatePath | KongSpecActionPath, includeTarget?: boolean) => Promise<JsonObject>;
|
|
10
18
|
export declare function getActions(state: KongSpecState): KongSpecAction[];
|
|
11
19
|
export declare function findSourceState(states: KongSpecState[], targetRef: KongSpecState["id"]): import("@kong/ts").Distinct<string, "KongSpecStateId">;
|
|
12
20
|
export declare function convertActionToState(action: KongSpecAction): KongSpecState & KongSpecSupportsTransition;
|
|
13
21
|
export declare function parallelStateOutputAggregator(jq: (sample: string, filter: JqFilter) => Promise<string>): (state: KongSpecStateParallel, flow: KongSpecFlow) => Promise<JsonText>;
|
|
14
|
-
export declare function
|
|
22
|
+
export declare function getDependencies(flow: KongSpecFlow): Dependency[];
|
|
15
23
|
export {};
|
|
@@ -4,16 +4,18 @@ export type { BusinessKey } from "./lib/businessKey";
|
|
|
4
4
|
export { CloudEvent } from "./lib/cloudEvent";
|
|
5
5
|
export { textToColor, textToMonoGradient } from "./lib/color";
|
|
6
6
|
export { deepEquals, prepareTextForComparison, sameText, shadowEquals } from "./lib/compare";
|
|
7
|
+
export { cronToText, isCron } from "./lib/cron";
|
|
8
|
+
export type { Cron } from "./lib/cron";
|
|
7
9
|
export { DataGuardType } from "./lib/dataGuard";
|
|
8
10
|
export type { DataGuard } from "./lib/dataGuard";
|
|
9
11
|
export { isDuration } from "./lib/duration";
|
|
10
12
|
export type { Duration8601 } from "./lib/duration";
|
|
11
13
|
export type { Entity } from "./lib/entity";
|
|
12
14
|
export { AppError, DataError, errorToPrettyString } from "./lib/error";
|
|
13
|
-
export { ensureIsDuration, nonNegative, nonRecursiveCall, notBlank, notNull } from "./lib/guard";
|
|
15
|
+
export { ensureIsDuration, ensureIsDurationOrCron, nonNegative, nonRecursiveCall, notBlank, notNull, } from "./lib/guard";
|
|
14
16
|
export { guid, stableUUID, uuidc16, uuidc32, uuidStableSequence } from "./lib/id";
|
|
15
17
|
export type { CompactUUID16, CompactUUID32, GUID, ShortUUID } from "./lib/id";
|
|
16
|
-
export { intervalToString } from "./lib/interval";
|
|
18
|
+
export { intervalToString, millisToShortString } from "./lib/interval";
|
|
17
19
|
export { applyJqFilterReplacements, applyJqObjectReplacements, applyJqTextReplacements, convertToJqFilter, extractJqTextContent, jqFilter, JqObjectSerializer, jqText, sanitizeJqFilter, wrapWithJqTextMarkers, } from "./lib/jq";
|
|
18
20
|
export type { JqArray, JqFilter, JqObject, JqSerializer, JqText, RefactorReplacement, } from "./lib/jq";
|
|
19
21
|
export { generateFakeJsonObject, jsonToHumanReadable, prettyJson, safeJsonParse } from "./lib/json";
|
|
@@ -28,10 +30,10 @@ export { fromRequestId, generateTraceParent, newRequestId } from "./lib/telemetr
|
|
|
28
30
|
export type { RequestId, TraceParent } from "./lib/telemetry";
|
|
29
31
|
export { parseTenant } from "./lib/tenant";
|
|
30
32
|
export type { SessionTenant } from "./lib/tenant";
|
|
31
|
-
export { byteCount, camelize, escapeLikeText, escapeQuotes, escapeRegex, hashString, quote, removeOuterQuotes, replaceFirstOccurrence, splitToBlocks, trim, upperFirst, words, } from "./lib/text";
|
|
33
|
+
export { byteCount, camelize, escapeLikeText, escapeQuotes, escapeRegex, formatBytes, getTextWidth, hashString, quote, removeOuterQuotes, replaceFirstOccurrence, splitToBlocks, trim, upperFirst, words, } from "./lib/text";
|
|
32
34
|
export type { TextBlock } from "./lib/text";
|
|
33
35
|
export { TextReader } from "./lib/textReader";
|
|
34
|
-
export { DEFAULT_TIMEZONE } from "./lib/timezone";
|
|
36
|
+
export { DEFAULT_TIMEZONE, getTimezoneLabel } from "./lib/timezone";
|
|
35
37
|
export type { Timezone } from "./lib/timezone";
|
|
36
38
|
export type { Action, DeepPartial, Distinct, Indexed, Loading, NonFunctionProperties, Optional, Pair, PreventDefault, Primitive, PropertyPath, PropertyPathMap, RequiredProperties, Result, StringKeys, UnArray, ValidateKeys, } from "./lib/types";
|
|
37
39
|
export { joinUrlAndPath, urlText } from "./lib/url";
|
|
@@ -3,3 +3,4 @@ export declare function nonRecursiveCall<Args extends unknown[], R>(fn: (...args
|
|
|
3
3
|
export declare function notBlank(value: string): void;
|
|
4
4
|
export declare function nonNegative(value: number): void;
|
|
5
5
|
export declare function ensureIsDuration(value: string): void;
|
|
6
|
+
export declare function ensureIsDurationOrCron(value: string): void;
|
|
@@ -6,7 +6,7 @@ export interface JqObject {
|
|
|
6
6
|
}
|
|
7
7
|
export type JqArray = Array<Primitive | JqText | JqObject | JqArray>;
|
|
8
8
|
export type RefactorReplacement = [RegExp, string];
|
|
9
|
-
export interface JqSerializer<T = JqObject | JqArray> {
|
|
9
|
+
export interface JqSerializer<T = JqObject | JqArray | JqText> {
|
|
10
10
|
serialize(value: T): JqFilter;
|
|
11
11
|
}
|
|
12
12
|
export declare function jqFilter(value: Primitive): JqFilter;
|
|
@@ -17,8 +17,8 @@ export declare function applyJqFilterReplacements(value: JqFilter, replacements:
|
|
|
17
17
|
export declare function applyJqObjectReplacements(obj: JqObject, replacements: RefactorReplacement[]): JqObject;
|
|
18
18
|
export declare function applyJqTextReplacements(text: JqText, replacements: RefactorReplacement[]): JqText;
|
|
19
19
|
export declare class JqObjectSerializer implements JqSerializer {
|
|
20
|
-
serialize(obj: JqObject | JqArray): JqFilter;
|
|
20
|
+
serialize(obj: JqObject | JqArray | JqText): JqFilter;
|
|
21
21
|
private convert;
|
|
22
22
|
}
|
|
23
|
-
export declare function extractJqTextContent(text: JqText):
|
|
24
|
-
export declare function wrapWithJqTextMarkers(content:
|
|
23
|
+
export declare function extractJqTextContent(text: JqText): JqFilter;
|
|
24
|
+
export declare function wrapWithJqTextMarkers(content: JqFilter): JqText;
|
|
@@ -16,3 +16,5 @@ export declare function camelize(text: string): string;
|
|
|
16
16
|
export declare function escapeQuotes(text: string): string;
|
|
17
17
|
export declare function escapeLikeText(text: string): string;
|
|
18
18
|
export declare function byteCount(text: string): number;
|
|
19
|
+
export declare function getTextWidth(font: string, text: string): number;
|
|
20
|
+
export declare function formatBytes(bytes: number, decimals?: number): string;
|
|
@@ -2,4 +2,5 @@ import { Distinct } from "./types";
|
|
|
2
2
|
export type Timezone = Distinct<string, "timezone">;
|
|
3
3
|
export declare const UTC: Timezone;
|
|
4
4
|
export declare const DEFAULT_TIMEZONE: Timezone;
|
|
5
|
+
export declare function getTimezoneLabel(timezone: Timezone): string;
|
|
5
6
|
export declare function getTimezoneList(): Promise<Timezone[]>;
|
|
@@ -13,6 +13,7 @@ export type { AppExtension } from "./lib/appExtension";
|
|
|
13
13
|
export type { AppExtensionAlias } from "./lib/appExtensionAlias";
|
|
14
14
|
export type { AppPresignedUrl } from "./lib/appPresignedUrl";
|
|
15
15
|
export type { AppProcessAlias } from "./lib/appProcessAlias";
|
|
16
|
+
export type { AppProcessData } from "./lib/appProcessData";
|
|
16
17
|
export type { AppProcessInstanceId } from "./lib/appProcessInstanceId";
|
|
17
18
|
export type { AppProject } from "./lib/appProject";
|
|
18
19
|
export type { AppSnapshot } from "./lib/appSnapshot";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BusinessKey, Entity, JsonText, Optional, SessionTenant, UtcDateTime } from "@kong/ts";
|
|
2
|
+
export interface AppProcessData extends Entity {
|
|
3
|
+
tenant: SessionTenant;
|
|
4
|
+
processId: string;
|
|
5
|
+
processVersion: string;
|
|
6
|
+
businessKey: BusinessKey;
|
|
7
|
+
status: "REGISTERED" | "STARTED" | "SUCCEEDED" | "FAILED" | "EXPIRED" | "CANCELED";
|
|
8
|
+
source: string;
|
|
9
|
+
deadline: UtcDateTime;
|
|
10
|
+
created: Optional<UtcDateTime>;
|
|
11
|
+
updated: UtcDateTime;
|
|
12
|
+
result: Optional<JsonText>;
|
|
13
|
+
}
|