Skip to content

Commit 204113a

Browse files
authored
Update SDK to the latest spec status. (#178)
1 parent 0e40bef commit 204113a

File tree

105 files changed

+1513
-1337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

105 files changed

+1513
-1337
lines changed

src/lib/builders/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
# Auto generated notice
2-
32
This directory and its content has been generated automatically. Do not modify its content, it WILL be lost.

src/lib/builders/actiondatafilter-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function actiondatafilterBuildingFn(data: Specification.Actiondatafilter): () =>
2727
return () => {
2828
const model = new Specification.Actiondatafilter(data);
2929

30-
validate('Actiondatafilter', model);
30+
validate('Actiondatafilter', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/basicpropsdef-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function basicpropsdefBuildingFn(data: Specification.Basicpropsdef): () => Speci
2727
return () => {
2828
const model = new Specification.Basicpropsdef(data);
2929

30-
validate('Basicpropsdef', model);
30+
validate('Basicpropsdef', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/bearerpropsdef-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function bearerpropsdefBuildingFn(data: Specification.Bearerpropsdef): () => Spe
2727
return () => {
2828
const model = new Specification.Bearerpropsdef(data);
2929

30-
validate('Bearerpropsdef', model);
30+
validate('Bearerpropsdef', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/correlation-def-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function correlationDefBuildingFn(data: Specification.CorrelationDef): () => Spe
2727
return () => {
2828
const model = new Specification.CorrelationDef(data);
2929

30-
validate('CorrelationDef', model);
30+
validate('CorrelationDef', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/crondef-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function crondefBuildingFn(data: Specification.Crondef): () => Specification.Cro
2727
return () => {
2828
const model = new Specification.Crondef(data);
2929

30-
validate('Crondef', model);
30+
validate('Crondef', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/enddeventcondition-builder.ts renamed to src/lib/builders/endeventcondition-builder.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ import { validate } from '../utils';
2020

2121
/**
2222
* The internal function used by the builder proxy to validate and return its underlying object
23-
* @param {Specification.Enddeventcondition} data The underlying object
24-
* @returns {Specification.Enddeventcondition} The validated underlying object
23+
* @param {Specification.Endeventcondition} data The underlying object
24+
* @returns {Specification.Endeventcondition} The validated underlying object
2525
*/
26-
function enddeventconditionBuildingFn(data: Specification.Enddeventcondition): () => Specification.Enddeventcondition {
26+
function endeventconditionBuildingFn(data: Specification.Endeventcondition): () => Specification.Endeventcondition {
2727
return () => {
28-
const model = new Specification.Enddeventcondition(data);
28+
const model = new Specification.Endeventcondition(data);
2929

30-
validate('Enddeventcondition', model.normalize());
30+
validate('Endeventcondition', model.normalize());
3131
return model;
3232
};
3333
}
3434

3535
/**
36-
* A factory to create a builder proxy for the type `Specification.Enddeventcondition`
37-
* @returns {Specification.Enddeventcondition} A builder for `Specification.Enddeventcondition`
36+
* A factory to create a builder proxy for the type `Specification.Endeventcondition`
37+
* @returns {Specification.Endeventcondition} A builder for `Specification.Endeventcondition`
3838
*/
39-
export function enddeventconditionBuilder(): Builder<Specification.Enddeventcondition> {
40-
return builder<Specification.Enddeventcondition>(enddeventconditionBuildingFn);
39+
export function endeventconditionBuilder(): Builder<Specification.Endeventcondition> {
40+
return builder<Specification.Endeventcondition>(endeventconditionBuildingFn);
4141
}

src/lib/builders/errordef-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function errordefBuildingFn(data: Specification.Errordef): () => Specification.E
2727
return () => {
2828
const model = new Specification.Errordef(data);
2929

30-
validate('Errordef', model);
30+
validate('Errordef', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/eventdatafilter-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function eventdatafilterBuildingFn(data: Specification.Eventdatafilter): () => S
2727
return () => {
2828
const model = new Specification.Eventdatafilter(data);
2929

30-
validate('Eventdatafilter', model);
30+
validate('Eventdatafilter', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/state-exec-timeout-builder.ts renamed to src/lib/builders/extension-builder.ts

+9-9
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ import { validate } from '../utils';
2020

2121
/**
2222
* The internal function used by the builder proxy to validate and return its underlying object
23-
* @param {Specification.StateExecTimeout} data The underlying object
24-
* @returns {Specification.StateExecTimeout} The validated underlying object
23+
* @param {Specification.Extension} data The underlying object
24+
* @returns {Specification.Extension} The validated underlying object
2525
*/
26-
function stateExecTimeoutBuildingFn(data: Specification.StateExecTimeout): () => Specification.StateExecTimeout {
26+
function extensionBuildingFn(data: Specification.Extension): () => Specification.Extension {
2727
return () => {
28-
const model = new Specification.StateExecTimeout(data);
28+
const model = new Specification.Extension(data);
2929

30-
validate('StateExecTimeout', model);
30+
validate('Extension', model.normalize());
3131
return model;
3232
};
3333
}
3434

3535
/**
36-
* A factory to create a builder proxy for the type `Specification.StateExecTimeout`
37-
* @returns {Specification.StateExecTimeout} A builder for `Specification.StateExecTimeout`
36+
* A factory to create a builder proxy for the type `Specification.Extension`
37+
* @returns {Specification.Extension} A builder for `Specification.Extension`
3838
*/
39-
export function stateExecTimeoutBuilder(): Builder<Specification.StateExecTimeout> {
40-
return builder<Specification.StateExecTimeout>(stateExecTimeoutBuildingFn);
39+
export function extensionBuilder(): Builder<Specification.Extension> {
40+
return builder<Specification.Extension>(extensionBuildingFn);
4141
}

src/lib/builders/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,15 @@ export * from './databasedswitchstate-builder';
2929
export * from './defaultconditiondef-builder';
3030
export * from './end-builder';
3131
export * from './enddatacondition-builder';
32-
export * from './enddeventcondition-builder';
32+
export * from './endeventcondition-builder';
3333
export * from './error-builder';
3434
export * from './errordef-builder';
3535
export * from './eventbasedswitchstate-builder';
3636
export * from './eventdatafilter-builder';
3737
export * from './eventdef-builder';
3838
export * from './eventref-builder';
3939
export * from './eventstate-builder';
40+
export * from './extension-builder';
4041
export * from './foreachstate-builder';
4142
export * from './function-builder';
4243
export * from './functionref-builder';
@@ -52,7 +53,6 @@ export * from './schedule-builder';
5253
export * from './sleep-builder';
5354
export * from './sleepstate-builder';
5455
export * from './startdef-builder';
55-
export * from './state-exec-timeout-builder';
5656
export * from './statedatafilter-builder';
5757
export * from './subflowref-builder';
5858
export * from './timeouts-builder';

src/lib/builders/oauth2propsdef-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function oauth2propsdefBuildingFn(data: Specification.Oauth2propsdef): () => Spe
2727
return () => {
2828
const model = new Specification.Oauth2propsdef(data);
2929

30-
validate('Oauth2propsdef', model);
30+
validate('Oauth2propsdef', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/produceeventdef-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function produceeventdefBuildingFn(data: Specification.Produceeventdef): () => S
2727
return () => {
2828
const model = new Specification.Produceeventdef(data);
2929

30-
validate('Produceeventdef', model);
30+
validate('Produceeventdef', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/retrydef-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function retrydefBuildingFn(data: Specification.Retrydef): () => Specification.R
2727
return () => {
2828
const model = new Specification.Retrydef(data);
2929

30-
validate('Retrydef', model);
30+
validate('Retrydef', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/schedule-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function scheduleBuildingFn(data: Specification.Schedule): () => Specification.S
2727
return () => {
2828
const model = new Specification.Schedule(data);
2929

30-
validate('Schedule', model);
30+
validate('Schedule', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/sleep-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function sleepBuildingFn(data: Specification.Sleep): () => Specification.Sleep {
2727
return () => {
2828
const model = new Specification.Sleep(data);
2929

30-
validate('Sleep', model);
30+
validate('Sleep', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/startdef-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function startdefBuildingFn(data: Specification.Startdef): () => Specification.S
2727
return () => {
2828
const model = new Specification.Startdef(data);
2929

30-
validate('Startdef', model);
30+
validate('Startdef', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/builders/statedatafilter-builder.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ function statedatafilterBuildingFn(data: Specification.Statedatafilter): () => S
2727
return () => {
2828
const model = new Specification.Statedatafilter(data);
2929

30-
validate('Statedatafilter', model);
30+
validate('Statedatafilter', model.normalize());
3131
return model;
3232
};
3333
}

src/lib/definitions/action.ts

-4
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,6 @@ import { Sleep } from './sleep';
3232

3333
export class Action {
3434
sourceModel?: Action;
35-
/**
36-
* Unique action identifier
37-
*/
38-
id?: string;
3935
/**
4036
* Unique action definition name
4137
*/

src/lib/definitions/actiondatafilter.ts

+8
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,12 @@ export class Actiondatafilter {
3535
constructor(model: any) {
3636
Object.assign(this, model);
3737
}
38+
/**
39+
* Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state.
40+
* @returns {Specification.Actiondatafilter} without deleted properties.
41+
*/
42+
normalize = (): Actiondatafilter => {
43+
const clone = new Actiondatafilter(this);
44+
return clone;
45+
};
3846
}

src/lib/definitions/basicpropsdef.ts

+8
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,12 @@ export class Basicpropsdef {
3333

3434
overwriteMetadata(this);
3535
}
36+
/**
37+
* Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state.
38+
* @returns {Specification.Basicpropsdef} without deleted properties.
39+
*/
40+
normalize = (): Basicpropsdef => {
41+
const clone = new Basicpropsdef(this);
42+
return clone;
43+
};
3644
}

src/lib/definitions/bearerpropsdef.ts

+8
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,12 @@ export class Bearerpropsdef {
2828
Object.assign(this, model);
2929
overwriteMetadata(this);
3030
}
31+
/**
32+
* Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state.
33+
* @returns {Specification.Bearerpropsdef} without deleted properties.
34+
*/
35+
normalize = (): Bearerpropsdef => {
36+
const clone = new Bearerpropsdef(this);
37+
return clone;
38+
};
3139
}

src/lib/definitions/branch.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export class Branch /* Branch Definition */ {
2828
* State specific timeouts
2929
*/
3030
timeouts?: {
31-
actionExecTimeout?: /* Single actions definition execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout;
32-
branchExecTimeout?: /* Single branch execution timeout duration (ISO 8601 duration format) */ BranchExecTimeout;
31+
actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout;
32+
branchExecTimeout?: /* Branch execution timeout duration (ISO 8601 duration format) */ BranchExecTimeout;
3333
};
3434
/**
3535
* Actions to be executed in this branch

src/lib/definitions/callbackstate.ts

+5-6
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,12 @@ import {
3333
overwriteEventDataFilter,
3434
overwriteMetadata,
3535
overwriteOnErrors,
36+
overwritePropertyAsPlainType,
3637
overwriteStateDataFilter,
37-
overwriteTimeoutWithStateExecTimeout,
3838
overwriteTransition,
3939
setEndValueIfNoTransition,
4040
} from './utils';
41-
import { ActionExecTimeout, EventTimeout } from './types';
42-
import { StateExecTimeout } from './stateExecTimeout';
41+
import { ActionExecTimeout, EventTimeout, StateExecTimeout } from './types';
4342

4443
export class Callbackstate {
4544
sourceModel?: Callbackstate;
@@ -67,8 +66,8 @@ export class Callbackstate {
6766
* State specific timeouts
6867
*/
6968
timeouts?: {
70-
stateExecTimeout?: StateExecTimeout;
71-
actionExecTimeout?: /* Single actions definition execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout;
69+
stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout;
70+
actionExecTimeout?: /* Action execution timeout duration (ISO 8601 duration format) */ ActionExecTimeout;
7271
eventTimeout?: /* Timeout duration to wait for consuming defined events (ISO 8601 duration format) */ EventTimeout;
7372
};
7473
/**
@@ -113,7 +112,7 @@ export class Callbackstate {
113112
Object.assign(this, defaultModel, model);
114113

115114
overwriteAction(this);
116-
overwriteTimeoutWithStateExecTimeout(this);
115+
overwritePropertyAsPlainType('timeouts', this);
117116
overwriteEventDataFilter(this);
118117
overwriteStateDataFilter(this);
119118
overwriteOnErrors(this);

src/lib/definitions/continueasdef.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export class Continueasdef {
3232
/**
3333
* Version of the workflow to continue execution as
3434
*/
35-
version?: string;
35+
version?: string; // ^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$
3636
/**
3737
* If string type, an expression which selects parts of the states data output to become the workflow data input of continued execution. If object type, a custom object to become the workflow data input of the continued execution
3838
*/

src/lib/definitions/correlationDef.ts

+8
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,12 @@ export class CorrelationDef {
2727
constructor(model: any) {
2828
Object.assign(this, model);
2929
}
30+
/**
31+
* Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state.
32+
* @returns {Specification.CorrelationDef} without deleted properties.
33+
*/
34+
normalize = (): CorrelationDef => {
35+
const clone = new CorrelationDef(this);
36+
return clone;
37+
};
3038
}

src/lib/definitions/crondef.ts

+8
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,12 @@ export class Crondef {
2727
constructor(model: any) {
2828
Object.assign(this, model);
2929
}
30+
/**
31+
* Normalize the value of each property by recursively deleting properties whose value is equal to its default value. Does not modify the object state.
32+
* @returns {Specification.Crondef} without deleted properties.
33+
*/
34+
normalize = (): Crondef => {
35+
const clone = new Crondef(this);
36+
return clone;
37+
};
3038
}

src/lib/definitions/databasedswitchstate.ts

+4-9
Original file line numberDiff line numberDiff line change
@@ -29,17 +29,12 @@ import {
2929
overwriteMetadata,
3030
overwriteOnErrors,
3131
overwriteStateDataFilter,
32-
overwriteTimeoutWithStateExecTimeout,
32+
overwritePropertyAsPlainType,
3333
} from './utils';
34-
import { Datacondition } from './types';
35-
import { StateExecTimeout } from './stateExecTimeout';
34+
import { Datacondition, StateExecTimeout } from './types';
3635

3736
export class Databasedswitchstate {
3837
sourceModel?: Databasedswitchstate;
39-
/**
40-
* Unique State id
41-
*/
42-
id?: string;
4338
/**
4439
* State name
4540
*/
@@ -56,7 +51,7 @@ export class Databasedswitchstate {
5651
* State specific timeouts
5752
*/
5853
timeouts?: {
59-
stateExecTimeout?: StateExecTimeout;
54+
stateExecTimeout?: /* Workflow state execution timeout duration (ISO 8601 duration format) */ StateExecTimeout;
6055
};
6156
/**
6257
* Defines conditions evaluated against state data
@@ -87,7 +82,7 @@ export class Databasedswitchstate {
8782
Object.assign(this, defaultModel, model);
8883

8984
overwriteStateDataFilter(this);
90-
overwriteTimeoutWithStateExecTimeout(this);
85+
overwritePropertyAsPlainType('timeouts', this);
9186
overwriteDataConditions(this);
9287
overwriteOnErrors(this);
9388
overwriteDefaultCondition(this);

0 commit comments

Comments
 (0)