@novu/api 3.14.0 → 3.14.1
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 +7 -3
- package/funcs/environmentsDiff.d.ts +19 -0
- package/funcs/environmentsDiff.d.ts.map +1 -0
- package/funcs/environmentsDiff.js +156 -0
- package/funcs/environmentsDiff.js.map +1 -0
- package/funcs/environmentsPublish.d.ts +19 -0
- package/funcs/environmentsPublish.d.ts.map +1 -0
- package/funcs/environmentsPublish.js +156 -0
- package/funcs/environmentsPublish.js.map +1 -0
- package/funcs/translationsMasterUpload.js +7 -0
- package/funcs/translationsMasterUpload.js.map +1 -1
- package/funcs/translationsUpload.js +8 -1
- package/funcs/translationsUpload.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +4 -4
- package/lib/config.js +4 -4
- package/lib/matchers.d.ts.map +1 -1
- package/lib/matchers.js +0 -1
- package/lib/matchers.js.map +1 -1
- package/lib/security.d.ts.map +1 -1
- package/lib/security.js +1 -2
- package/lib/security.js.map +1 -1
- package/models/components/chatstepresponsedto.d.ts +4 -0
- package/models/components/chatstepresponsedto.d.ts.map +1 -1
- package/models/components/chatstepresponsedto.js +1 -0
- package/models/components/chatstepresponsedto.js.map +1 -1
- package/models/components/customstepresponsedto.d.ts +4 -0
- package/models/components/customstepresponsedto.d.ts.map +1 -1
- package/models/components/customstepresponsedto.js +1 -0
- package/models/components/customstepresponsedto.js.map +1 -1
- package/models/components/delaystepresponsedto.d.ts +4 -0
- package/models/components/delaystepresponsedto.d.ts.map +1 -1
- package/models/components/delaystepresponsedto.js +1 -0
- package/models/components/delaystepresponsedto.js.map +1 -1
- package/models/components/dependencyreasonenum.d.ts +16 -0
- package/models/components/dependencyreasonenum.d.ts.map +1 -0
- package/models/components/dependencyreasonenum.js +50 -0
- package/models/components/dependencyreasonenum.js.map +1 -0
- package/models/components/diffactionenum.d.ts +19 -0
- package/models/components/diffactionenum.d.ts.map +1 -0
- package/models/components/diffactionenum.js +53 -0
- package/models/components/diffactionenum.js.map +1 -0
- package/models/components/diffenvironmentrequestdto.d.ts +15 -0
- package/models/components/diffenvironmentrequestdto.d.ts.map +1 -0
- package/models/components/diffenvironmentrequestdto.js +49 -0
- package/models/components/diffenvironmentrequestdto.js.map +1 -0
- package/models/components/diffenvironmentresponsedto.d.ts +27 -0
- package/models/components/diffenvironmentresponsedto.d.ts.map +1 -0
- package/models/components/diffenvironmentresponsedto.js +55 -0
- package/models/components/diffenvironmentresponsedto.js.map +1 -0
- package/models/components/diffsummarydto.d.ts +25 -0
- package/models/components/diffsummarydto.d.ts.map +1 -0
- package/models/components/diffsummarydto.js +53 -0
- package/models/components/diffsummarydto.js.map +1 -0
- package/models/components/digeststepresponsedto.d.ts +4 -0
- package/models/components/digeststepresponsedto.d.ts.map +1 -1
- package/models/components/digeststepresponsedto.js +1 -0
- package/models/components/digeststepresponsedto.js.map +1 -1
- package/models/components/emailcontroldto.d.ts +20 -0
- package/models/components/emailcontroldto.d.ts.map +1 -1
- package/models/components/emailcontroldto.js +14 -1
- package/models/components/emailcontroldto.js.map +1 -1
- package/models/components/emailstepresponsedto.d.ts +21 -0
- package/models/components/emailstepresponsedto.d.ts.map +1 -1
- package/models/components/emailstepresponsedto.js +12 -1
- package/models/components/emailstepresponsedto.js.map +1 -1
- package/models/components/environmentdiffsummarydto.d.ts +21 -0
- package/models/components/environmentdiffsummarydto.d.ts.map +1 -0
- package/models/components/environmentdiffsummarydto.js +52 -0
- package/models/components/environmentdiffsummarydto.js.map +1 -0
- package/models/components/failedworkflowdto.d.ts +30 -0
- package/models/components/failedworkflowdto.d.ts.map +1 -0
- package/models/components/failedworkflowdto.js +55 -0
- package/models/components/failedworkflowdto.js.map +1 -0
- package/models/components/inappstepresponsedto.d.ts +4 -0
- package/models/components/inappstepresponsedto.d.ts.map +1 -1
- package/models/components/inappstepresponsedto.js +1 -0
- package/models/components/inappstepresponsedto.js.map +1 -1
- package/models/components/index.d.ts +18 -0
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +18 -0
- package/models/components/index.js.map +1 -1
- package/models/components/publishenvironmentrequestdto.d.ts +26 -0
- package/models/components/publishenvironmentrequestdto.d.ts.map +1 -0
- package/models/components/publishenvironmentrequestdto.js +52 -0
- package/models/components/publishenvironmentrequestdto.js.map +1 -0
- package/models/components/publishenvironmentresponsedto.d.ts +19 -0
- package/models/components/publishenvironmentresponsedto.d.ts.map +1 -0
- package/models/components/publishenvironmentresponsedto.js +53 -0
- package/models/components/publishenvironmentresponsedto.js.map +1 -0
- package/models/components/publishsummarydto.d.ts +25 -0
- package/models/components/publishsummarydto.d.ts.map +1 -0
- package/models/components/publishsummarydto.js +53 -0
- package/models/components/publishsummarydto.js.map +1 -0
- package/models/components/pushstepresponsedto.d.ts +4 -0
- package/models/components/pushstepresponsedto.d.ts.map +1 -1
- package/models/components/pushstepresponsedto.js +1 -0
- package/models/components/pushstepresponsedto.js.map +1 -1
- package/models/components/resourcedependencydto.d.ts +31 -0
- package/models/components/resourcedependencydto.d.ts.map +1 -0
- package/models/components/resourcedependencydto.js +56 -0
- package/models/components/resourcedependencydto.js.map +1 -0
- package/models/components/resourcediffdto.d.ts +159 -0
- package/models/components/resourcediffdto.d.ts.map +1 -0
- package/models/components/resourcediffdto.js +123 -0
- package/models/components/resourcediffdto.js.map +1 -0
- package/models/components/resourcediffresultdto.d.ts +133 -0
- package/models/components/resourcediffresultdto.d.ts.map +1 -0
- package/models/components/resourcediffresultdto.js +114 -0
- package/models/components/resourcediffresultdto.js.map +1 -0
- package/models/components/resourcetopublishdto.d.ts +21 -0
- package/models/components/resourcetopublishdto.d.ts.map +1 -0
- package/models/components/resourcetopublishdto.js +51 -0
- package/models/components/resourcetopublishdto.js.map +1 -0
- package/models/components/resourcetypeenum.d.ts +2 -0
- package/models/components/resourcetypeenum.d.ts.map +1 -1
- package/models/components/resourcetypeenum.js +3 -1
- package/models/components/resourcetypeenum.js.map +1 -1
- package/models/components/skippedworkflowdto.d.ts +26 -0
- package/models/components/skippedworkflowdto.d.ts.map +1 -0
- package/models/components/skippedworkflowdto.js +54 -0
- package/models/components/skippedworkflowdto.js.map +1 -0
- package/models/components/smsstepresponsedto.d.ts +4 -0
- package/models/components/smsstepresponsedto.d.ts.map +1 -1
- package/models/components/smsstepresponsedto.js +1 -0
- package/models/components/smsstepresponsedto.js.map +1 -1
- package/models/components/stepresponsedto.d.ts +4 -0
- package/models/components/stepresponsedto.d.ts.map +1 -1
- package/models/components/stepresponsedto.js +1 -0
- package/models/components/stepresponsedto.js.map +1 -1
- package/models/components/syncactionenum.d.ts +18 -0
- package/models/components/syncactionenum.d.ts.map +1 -0
- package/models/components/syncactionenum.js +52 -0
- package/models/components/syncactionenum.js.map +1 -0
- package/models/components/syncedworkflowdto.d.ts +27 -0
- package/models/components/syncedworkflowdto.d.ts.map +1 -0
- package/models/components/syncedworkflowdto.js +55 -0
- package/models/components/syncedworkflowdto.js.map +1 -0
- package/models/components/syncresultdto.d.ts +33 -0
- package/models/components/syncresultdto.d.ts.map +1 -0
- package/models/components/syncresultdto.js +58 -0
- package/models/components/syncresultdto.js.map +1 -0
- package/models/components/throttlestepresponsedto.d.ts +4 -0
- package/models/components/throttlestepresponsedto.d.ts.map +1 -1
- package/models/components/throttlestepresponsedto.js +1 -0
- package/models/components/throttlestepresponsedto.js.map +1 -1
- package/models/components/uicomponentenum.d.ts +4 -3
- package/models/components/uicomponentenum.d.ts.map +1 -1
- package/models/components/uicomponentenum.js +3 -2
- package/models/components/uicomponentenum.js.map +1 -1
- package/models/components/workflowcreationsourceenum.d.ts +1 -0
- package/models/components/workflowcreationsourceenum.d.ts.map +1 -1
- package/models/components/workflowcreationsourceenum.js +1 -0
- package/models/components/workflowcreationsourceenum.js.map +1 -1
- package/models/operations/environmentscontrollerdiffenvironment.d.ts +37 -0
- package/models/operations/environmentscontrollerdiffenvironment.d.ts.map +1 -0
- package/models/operations/environmentscontrollerdiffenvironment.js +73 -0
- package/models/operations/environmentscontrollerdiffenvironment.js.map +1 -0
- package/models/operations/environmentscontrollerpublishenvironment.d.ts +37 -0
- package/models/operations/environmentscontrollerpublishenvironment.d.ts.map +1 -0
- package/models/operations/environmentscontrollerpublishenvironment.js +73 -0
- package/models/operations/environmentscontrollerpublishenvironment.js.map +1 -0
- package/models/operations/index.d.ts +2 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -0
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/environments.d.ts +14 -0
- package/sdk/environments.d.ts.map +1 -1
- package/sdk/environments.js +20 -0
- package/sdk/environments.js.map +1 -1
- package/src/funcs/environmentsDiff.ts +243 -0
- package/src/funcs/environmentsPublish.ts +243 -0
- package/src/funcs/translationsMasterUpload.ts +12 -0
- package/src/funcs/translationsUpload.ts +12 -1
- package/src/lib/config.ts +4 -4
- package/src/lib/matchers.ts +3 -2
- package/src/lib/security.ts +1 -2
- package/src/models/components/chatstepresponsedto.ts +5 -0
- package/src/models/components/customstepresponsedto.ts +5 -0
- package/src/models/components/delaystepresponsedto.ts +5 -0
- package/src/models/components/dependencyreasonenum.ts +23 -0
- package/src/models/components/diffactionenum.ts +26 -0
- package/src/models/components/diffenvironmentrequestdto.ts +34 -0
- package/src/models/components/diffenvironmentresponsedto.ts +57 -0
- package/src/models/components/diffsummarydto.ts +49 -0
- package/src/models/components/digeststepresponsedto.ts +5 -0
- package/src/models/components/emailcontroldto.ts +26 -0
- package/src/models/components/emailstepresponsedto.ts +31 -0
- package/src/models/components/environmentdiffsummarydto.ts +44 -0
- package/src/models/components/failedworkflowdto.ts +58 -0
- package/src/models/components/inappstepresponsedto.ts +5 -0
- package/src/models/components/index.ts +18 -0
- package/src/models/components/publishenvironmentrequestdto.ts +53 -0
- package/src/models/components/publishenvironmentresponsedto.ts +44 -0
- package/src/models/components/publishsummarydto.ts +49 -0
- package/src/models/components/pushstepresponsedto.ts +5 -0
- package/src/models/components/resourcedependencydto.ts +62 -0
- package/src/models/components/resourcediffdto.ts +305 -0
- package/src/models/components/resourcediffresultdto.ts +277 -0
- package/src/models/components/resourcetopublishdto.ts +44 -0
- package/src/models/components/resourcetypeenum.ts +4 -0
- package/src/models/components/skippedworkflowdto.ts +53 -0
- package/src/models/components/smsstepresponsedto.ts +5 -0
- package/src/models/components/stepresponsedto.ts +5 -0
- package/src/models/components/syncactionenum.ts +25 -0
- package/src/models/components/syncedworkflowdto.ts +57 -0
- package/src/models/components/syncresultdto.ts +70 -0
- package/src/models/components/throttlestepresponsedto.ts +5 -0
- package/src/models/components/uicomponentenum.ts +9 -5
- package/src/models/components/workflowcreationsourceenum.ts +1 -0
- package/src/models/operations/environmentscontrollerdiffenvironment.ts +98 -0
- package/src/models/operations/environmentscontrollerpublishenvironment.ts +99 -0
- package/src/models/operations/index.ts +2 -0
- package/src/sdk/environments.ts +44 -0
- package/_speakeasy/.github/action-inputs-config.json +0 -53
- package/_speakeasy/.github/action-security-config.json +0 -88
- package/codeSamples.json +0 -1772
- package/examples/package-lock.json +0 -610
- package/examples/package.json +0 -18
- package/sources/code-samples.json +0 -2105
- package/sources/json-development.json +0 -55438
- package/sources/openapi.sdk.json +0 -13193
- package/tsconfig.json +0 -40
|
@@ -66,6 +66,10 @@ export type StepResponseDto = {
|
|
|
66
66
|
* Issues associated with the step
|
|
67
67
|
*/
|
|
68
68
|
issues?: StepIssuesDto | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Hash identifying the deployed Cloudflare Worker for this step
|
|
71
|
+
*/
|
|
72
|
+
stepResolverHash?: string | undefined;
|
|
69
73
|
};
|
|
70
74
|
|
|
71
75
|
/** @internal */
|
|
@@ -86,6 +90,7 @@ export const StepResponseDto$inboundSchema: z.ZodType<
|
|
|
86
90
|
workflowId: z.string(),
|
|
87
91
|
workflowDatabaseId: z.string(),
|
|
88
92
|
issues: StepIssuesDto$inboundSchema.optional(),
|
|
93
|
+
stepResolverHash: z.string().optional(),
|
|
89
94
|
}).transform((v) => {
|
|
90
95
|
return remap$(v, {
|
|
91
96
|
"_id": "id",
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Sync action performed
|
|
10
|
+
*/
|
|
11
|
+
export const SyncActionEnum = {
|
|
12
|
+
Created: "created",
|
|
13
|
+
Updated: "updated",
|
|
14
|
+
Skipped: "skipped",
|
|
15
|
+
Deleted: "deleted",
|
|
16
|
+
} as const;
|
|
17
|
+
/**
|
|
18
|
+
* Sync action performed
|
|
19
|
+
*/
|
|
20
|
+
export type SyncActionEnum = ClosedEnum<typeof SyncActionEnum>;
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const SyncActionEnum$inboundSchema: z.ZodNativeEnum<
|
|
24
|
+
typeof SyncActionEnum
|
|
25
|
+
> = z.nativeEnum(SyncActionEnum);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
ResourceTypeEnum,
|
|
11
|
+
ResourceTypeEnum$inboundSchema,
|
|
12
|
+
} from "./resourcetypeenum.js";
|
|
13
|
+
import {
|
|
14
|
+
SyncActionEnum,
|
|
15
|
+
SyncActionEnum$inboundSchema,
|
|
16
|
+
} from "./syncactionenum.js";
|
|
17
|
+
|
|
18
|
+
export type SyncedWorkflowDto = {
|
|
19
|
+
/**
|
|
20
|
+
* Type of the layout
|
|
21
|
+
*/
|
|
22
|
+
resourceType: ResourceTypeEnum;
|
|
23
|
+
/**
|
|
24
|
+
* Resource ID
|
|
25
|
+
*/
|
|
26
|
+
resourceId: string;
|
|
27
|
+
/**
|
|
28
|
+
* Resource name
|
|
29
|
+
*/
|
|
30
|
+
resourceName: string;
|
|
31
|
+
/**
|
|
32
|
+
* Sync action performed
|
|
33
|
+
*/
|
|
34
|
+
action: SyncActionEnum;
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/** @internal */
|
|
38
|
+
export const SyncedWorkflowDto$inboundSchema: z.ZodType<
|
|
39
|
+
SyncedWorkflowDto,
|
|
40
|
+
z.ZodTypeDef,
|
|
41
|
+
unknown
|
|
42
|
+
> = z.object({
|
|
43
|
+
resourceType: ResourceTypeEnum$inboundSchema,
|
|
44
|
+
resourceId: z.string(),
|
|
45
|
+
resourceName: z.string(),
|
|
46
|
+
action: SyncActionEnum$inboundSchema,
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export function syncedWorkflowDtoFromJSON(
|
|
50
|
+
jsonString: string,
|
|
51
|
+
): SafeParseResult<SyncedWorkflowDto, SDKValidationError> {
|
|
52
|
+
return safeParse(
|
|
53
|
+
jsonString,
|
|
54
|
+
(x) => SyncedWorkflowDto$inboundSchema.parse(JSON.parse(x)),
|
|
55
|
+
`Failed to parse 'SyncedWorkflowDto' from JSON`,
|
|
56
|
+
);
|
|
57
|
+
}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
FailedWorkflowDto,
|
|
11
|
+
FailedWorkflowDto$inboundSchema,
|
|
12
|
+
} from "./failedworkflowdto.js";
|
|
13
|
+
import {
|
|
14
|
+
ResourceTypeEnum,
|
|
15
|
+
ResourceTypeEnum$inboundSchema,
|
|
16
|
+
} from "./resourcetypeenum.js";
|
|
17
|
+
import {
|
|
18
|
+
SkippedWorkflowDto,
|
|
19
|
+
SkippedWorkflowDto$inboundSchema,
|
|
20
|
+
} from "./skippedworkflowdto.js";
|
|
21
|
+
import {
|
|
22
|
+
SyncedWorkflowDto,
|
|
23
|
+
SyncedWorkflowDto$inboundSchema,
|
|
24
|
+
} from "./syncedworkflowdto.js";
|
|
25
|
+
|
|
26
|
+
export type SyncResultDto = {
|
|
27
|
+
/**
|
|
28
|
+
* Type of the layout
|
|
29
|
+
*/
|
|
30
|
+
resourceType: ResourceTypeEnum;
|
|
31
|
+
/**
|
|
32
|
+
* Successfully synced resources
|
|
33
|
+
*/
|
|
34
|
+
successful: Array<SyncedWorkflowDto>;
|
|
35
|
+
/**
|
|
36
|
+
* Failed resource syncs
|
|
37
|
+
*/
|
|
38
|
+
failed: Array<FailedWorkflowDto>;
|
|
39
|
+
/**
|
|
40
|
+
* Skipped resources
|
|
41
|
+
*/
|
|
42
|
+
skipped: Array<SkippedWorkflowDto>;
|
|
43
|
+
/**
|
|
44
|
+
* Total number of resources processed
|
|
45
|
+
*/
|
|
46
|
+
totalProcessed: number;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const SyncResultDto$inboundSchema: z.ZodType<
|
|
51
|
+
SyncResultDto,
|
|
52
|
+
z.ZodTypeDef,
|
|
53
|
+
unknown
|
|
54
|
+
> = z.object({
|
|
55
|
+
resourceType: ResourceTypeEnum$inboundSchema,
|
|
56
|
+
successful: z.array(SyncedWorkflowDto$inboundSchema),
|
|
57
|
+
failed: z.array(FailedWorkflowDto$inboundSchema),
|
|
58
|
+
skipped: z.array(SkippedWorkflowDto$inboundSchema),
|
|
59
|
+
totalProcessed: z.number(),
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
export function syncResultDtoFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<SyncResultDto, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => SyncResultDto$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'SyncResultDto' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -134,6 +134,10 @@ export type ThrottleStepResponseDto = {
|
|
|
134
134
|
* Issues associated with the step
|
|
135
135
|
*/
|
|
136
136
|
issues?: StepIssuesDto | undefined;
|
|
137
|
+
/**
|
|
138
|
+
* Hash identifying the deployed Cloudflare Worker for this step
|
|
139
|
+
*/
|
|
140
|
+
stepResolverHash?: string | undefined;
|
|
137
141
|
};
|
|
138
142
|
|
|
139
143
|
/** @internal */
|
|
@@ -196,6 +200,7 @@ export const ThrottleStepResponseDto$inboundSchema: z.ZodType<
|
|
|
196
200
|
workflowId: z.string(),
|
|
197
201
|
workflowDatabaseId: z.string(),
|
|
198
202
|
issues: StepIssuesDto$inboundSchema.optional(),
|
|
203
|
+
stepResolverHash: z.string().optional(),
|
|
199
204
|
}).transform((v) => {
|
|
200
205
|
return remap$(v, {
|
|
201
206
|
"_id": "id",
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import
|
|
6
|
+
import * as openEnums from "../../types/enums.js";
|
|
7
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Component type for the UI Schema Property
|
|
@@ -11,6 +12,7 @@ import { ClosedEnum } from "../../types/enums.js";
|
|
|
11
12
|
export const UiComponentEnum = {
|
|
12
13
|
EmailEditorSelect: "EMAIL_EDITOR_SELECT",
|
|
13
14
|
LayoutSelect: "LAYOUT_SELECT",
|
|
15
|
+
EmailRendererSelect: "EMAIL_RENDERER_SELECT",
|
|
14
16
|
BlockEditor: "BLOCK_EDITOR",
|
|
15
17
|
EmailBody: "EMAIL_BODY",
|
|
16
18
|
TextFullLine: "TEXT_FULL_LINE",
|
|
@@ -50,9 +52,11 @@ export const UiComponentEnum = {
|
|
|
50
52
|
/**
|
|
51
53
|
* Component type for the UI Schema Property
|
|
52
54
|
*/
|
|
53
|
-
export type UiComponentEnum =
|
|
55
|
+
export type UiComponentEnum = OpenEnum<typeof UiComponentEnum>;
|
|
54
56
|
|
|
55
57
|
/** @internal */
|
|
56
|
-
export const UiComponentEnum$inboundSchema: z.
|
|
57
|
-
|
|
58
|
-
|
|
58
|
+
export const UiComponentEnum$inboundSchema: z.ZodType<
|
|
59
|
+
UiComponentEnum,
|
|
60
|
+
z.ZodTypeDef,
|
|
61
|
+
unknown
|
|
62
|
+
> = openEnums.inboundSchema(UiComponentEnum);
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type EnvironmentsControllerDiffEnvironmentRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Target environment ID (MongoDB ObjectId) to compare against
|
|
15
|
+
*/
|
|
16
|
+
targetEnvironmentId: string;
|
|
17
|
+
/**
|
|
18
|
+
* A header for idempotency purposes
|
|
19
|
+
*/
|
|
20
|
+
idempotencyKey?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Diff request configuration
|
|
23
|
+
*/
|
|
24
|
+
diffEnvironmentRequestDto: components.DiffEnvironmentRequestDto;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type EnvironmentsControllerDiffEnvironmentResponse = {
|
|
28
|
+
headers: { [k: string]: Array<string> };
|
|
29
|
+
result: components.DiffEnvironmentResponseDto;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type EnvironmentsControllerDiffEnvironmentRequest$Outbound = {
|
|
34
|
+
targetEnvironmentId: string;
|
|
35
|
+
"idempotency-key"?: string | undefined;
|
|
36
|
+
DiffEnvironmentRequestDto: components.DiffEnvironmentRequestDto$Outbound;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
/** @internal */
|
|
40
|
+
export const EnvironmentsControllerDiffEnvironmentRequest$outboundSchema:
|
|
41
|
+
z.ZodType<
|
|
42
|
+
EnvironmentsControllerDiffEnvironmentRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
EnvironmentsControllerDiffEnvironmentRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
targetEnvironmentId: z.string(),
|
|
47
|
+
idempotencyKey: z.string().optional(),
|
|
48
|
+
diffEnvironmentRequestDto:
|
|
49
|
+
components.DiffEnvironmentRequestDto$outboundSchema,
|
|
50
|
+
}).transform((v) => {
|
|
51
|
+
return remap$(v, {
|
|
52
|
+
idempotencyKey: "idempotency-key",
|
|
53
|
+
diffEnvironmentRequestDto: "DiffEnvironmentRequestDto",
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export function environmentsControllerDiffEnvironmentRequestToJSON(
|
|
58
|
+
environmentsControllerDiffEnvironmentRequest:
|
|
59
|
+
EnvironmentsControllerDiffEnvironmentRequest,
|
|
60
|
+
): string {
|
|
61
|
+
return JSON.stringify(
|
|
62
|
+
EnvironmentsControllerDiffEnvironmentRequest$outboundSchema.parse(
|
|
63
|
+
environmentsControllerDiffEnvironmentRequest,
|
|
64
|
+
),
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** @internal */
|
|
69
|
+
export const EnvironmentsControllerDiffEnvironmentResponse$inboundSchema:
|
|
70
|
+
z.ZodType<
|
|
71
|
+
EnvironmentsControllerDiffEnvironmentResponse,
|
|
72
|
+
z.ZodTypeDef,
|
|
73
|
+
unknown
|
|
74
|
+
> = z.object({
|
|
75
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
76
|
+
Result: components.DiffEnvironmentResponseDto$inboundSchema,
|
|
77
|
+
}).transform((v) => {
|
|
78
|
+
return remap$(v, {
|
|
79
|
+
"Headers": "headers",
|
|
80
|
+
"Result": "result",
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
export function environmentsControllerDiffEnvironmentResponseFromJSON(
|
|
85
|
+
jsonString: string,
|
|
86
|
+
): SafeParseResult<
|
|
87
|
+
EnvironmentsControllerDiffEnvironmentResponse,
|
|
88
|
+
SDKValidationError
|
|
89
|
+
> {
|
|
90
|
+
return safeParse(
|
|
91
|
+
jsonString,
|
|
92
|
+
(x) =>
|
|
93
|
+
EnvironmentsControllerDiffEnvironmentResponse$inboundSchema.parse(
|
|
94
|
+
JSON.parse(x),
|
|
95
|
+
),
|
|
96
|
+
`Failed to parse 'EnvironmentsControllerDiffEnvironmentResponse' from JSON`,
|
|
97
|
+
);
|
|
98
|
+
}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type EnvironmentsControllerPublishEnvironmentRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Target environment ID (MongoDB ObjectId) to publish resources to
|
|
15
|
+
*/
|
|
16
|
+
targetEnvironmentId: string;
|
|
17
|
+
/**
|
|
18
|
+
* A header for idempotency purposes
|
|
19
|
+
*/
|
|
20
|
+
idempotencyKey?: string | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Publish request configuration
|
|
23
|
+
*/
|
|
24
|
+
publishEnvironmentRequestDto: components.PublishEnvironmentRequestDto;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type EnvironmentsControllerPublishEnvironmentResponse = {
|
|
28
|
+
headers: { [k: string]: Array<string> };
|
|
29
|
+
result: components.PublishEnvironmentResponseDto;
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/** @internal */
|
|
33
|
+
export type EnvironmentsControllerPublishEnvironmentRequest$Outbound = {
|
|
34
|
+
targetEnvironmentId: string;
|
|
35
|
+
"idempotency-key"?: string | undefined;
|
|
36
|
+
PublishEnvironmentRequestDto:
|
|
37
|
+
components.PublishEnvironmentRequestDto$Outbound;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const EnvironmentsControllerPublishEnvironmentRequest$outboundSchema:
|
|
42
|
+
z.ZodType<
|
|
43
|
+
EnvironmentsControllerPublishEnvironmentRequest$Outbound,
|
|
44
|
+
z.ZodTypeDef,
|
|
45
|
+
EnvironmentsControllerPublishEnvironmentRequest
|
|
46
|
+
> = z.object({
|
|
47
|
+
targetEnvironmentId: z.string(),
|
|
48
|
+
idempotencyKey: z.string().optional(),
|
|
49
|
+
publishEnvironmentRequestDto:
|
|
50
|
+
components.PublishEnvironmentRequestDto$outboundSchema,
|
|
51
|
+
}).transform((v) => {
|
|
52
|
+
return remap$(v, {
|
|
53
|
+
idempotencyKey: "idempotency-key",
|
|
54
|
+
publishEnvironmentRequestDto: "PublishEnvironmentRequestDto",
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export function environmentsControllerPublishEnvironmentRequestToJSON(
|
|
59
|
+
environmentsControllerPublishEnvironmentRequest:
|
|
60
|
+
EnvironmentsControllerPublishEnvironmentRequest,
|
|
61
|
+
): string {
|
|
62
|
+
return JSON.stringify(
|
|
63
|
+
EnvironmentsControllerPublishEnvironmentRequest$outboundSchema.parse(
|
|
64
|
+
environmentsControllerPublishEnvironmentRequest,
|
|
65
|
+
),
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** @internal */
|
|
70
|
+
export const EnvironmentsControllerPublishEnvironmentResponse$inboundSchema:
|
|
71
|
+
z.ZodType<
|
|
72
|
+
EnvironmentsControllerPublishEnvironmentResponse,
|
|
73
|
+
z.ZodTypeDef,
|
|
74
|
+
unknown
|
|
75
|
+
> = z.object({
|
|
76
|
+
Headers: z.record(z.array(z.string())).default({}),
|
|
77
|
+
Result: components.PublishEnvironmentResponseDto$inboundSchema,
|
|
78
|
+
}).transform((v) => {
|
|
79
|
+
return remap$(v, {
|
|
80
|
+
"Headers": "headers",
|
|
81
|
+
"Result": "result",
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
export function environmentsControllerPublishEnvironmentResponseFromJSON(
|
|
86
|
+
jsonString: string,
|
|
87
|
+
): SafeParseResult<
|
|
88
|
+
EnvironmentsControllerPublishEnvironmentResponse,
|
|
89
|
+
SDKValidationError
|
|
90
|
+
> {
|
|
91
|
+
return safeParse(
|
|
92
|
+
jsonString,
|
|
93
|
+
(x) =>
|
|
94
|
+
EnvironmentsControllerPublishEnvironmentResponse$inboundSchema.parse(
|
|
95
|
+
JSON.parse(x),
|
|
96
|
+
),
|
|
97
|
+
`Failed to parse 'EnvironmentsControllerPublishEnvironmentResponse' from JSON`,
|
|
98
|
+
);
|
|
99
|
+
}
|
|
@@ -17,7 +17,9 @@ export * from "./contextscontrollerdeletecontext.js";
|
|
|
17
17
|
export * from "./contextscontrollergetcontext.js";
|
|
18
18
|
export * from "./contextscontrollerlistcontexts.js";
|
|
19
19
|
export * from "./contextscontrollerupdatecontext.js";
|
|
20
|
+
export * from "./environmentscontrollerdiffenvironment.js";
|
|
20
21
|
export * from "./environmentscontrollergetenvironmenttags.js";
|
|
22
|
+
export * from "./environmentscontrollerpublishenvironment.js";
|
|
21
23
|
export * from "./environmentscontrollerv1createenvironment.js";
|
|
22
24
|
export * from "./environmentscontrollerv1deleteenvironment.js";
|
|
23
25
|
export * from "./environmentscontrollerv1listmyenvironments.js";
|
package/src/sdk/environments.ts
CHANGED
|
@@ -4,8 +4,10 @@
|
|
|
4
4
|
|
|
5
5
|
import { environmentsCreate } from "../funcs/environmentsCreate.js";
|
|
6
6
|
import { environmentsDelete } from "../funcs/environmentsDelete.js";
|
|
7
|
+
import { environmentsDiff } from "../funcs/environmentsDiff.js";
|
|
7
8
|
import { environmentsGetTags } from "../funcs/environmentsGetTags.js";
|
|
8
9
|
import { environmentsList } from "../funcs/environmentsList.js";
|
|
10
|
+
import { environmentsPublish } from "../funcs/environmentsPublish.js";
|
|
9
11
|
import { environmentsUpdate } from "../funcs/environmentsUpdate.js";
|
|
10
12
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
11
13
|
import * as components from "../models/components/index.js";
|
|
@@ -32,6 +34,48 @@ export class Environments extends ClientSDK {
|
|
|
32
34
|
));
|
|
33
35
|
}
|
|
34
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Compare resources between environments
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Compares workflows and other resources between the source and target environments, returning detailed diff information including additions, modifications, and deletions.
|
|
42
|
+
*/
|
|
43
|
+
async diff(
|
|
44
|
+
diffEnvironmentRequestDto: components.DiffEnvironmentRequestDto,
|
|
45
|
+
targetEnvironmentId: string,
|
|
46
|
+
idempotencyKey?: string | undefined,
|
|
47
|
+
options?: RequestOptions,
|
|
48
|
+
): Promise<operations.EnvironmentsControllerDiffEnvironmentResponse> {
|
|
49
|
+
return unwrapAsync(environmentsDiff(
|
|
50
|
+
this,
|
|
51
|
+
diffEnvironmentRequestDto,
|
|
52
|
+
targetEnvironmentId,
|
|
53
|
+
idempotencyKey,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Publish resources to target environment
|
|
60
|
+
*
|
|
61
|
+
* @remarks
|
|
62
|
+
* Publishes all workflows and resources from the source environment to the target environment. Optionally specify specific resources to publish or use dryRun mode to preview changes.
|
|
63
|
+
*/
|
|
64
|
+
async publish(
|
|
65
|
+
publishEnvironmentRequestDto: components.PublishEnvironmentRequestDto,
|
|
66
|
+
targetEnvironmentId: string,
|
|
67
|
+
idempotencyKey?: string | undefined,
|
|
68
|
+
options?: RequestOptions,
|
|
69
|
+
): Promise<operations.EnvironmentsControllerPublishEnvironmentResponse> {
|
|
70
|
+
return unwrapAsync(environmentsPublish(
|
|
71
|
+
this,
|
|
72
|
+
publishEnvironmentRequestDto,
|
|
73
|
+
targetEnvironmentId,
|
|
74
|
+
idempotencyKey,
|
|
75
|
+
options,
|
|
76
|
+
));
|
|
77
|
+
}
|
|
78
|
+
|
|
35
79
|
/**
|
|
36
80
|
* Create an environment
|
|
37
81
|
*
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"name": "mode",
|
|
4
|
-
"validation_regex": "/^(direct|pr)$/.source",
|
|
5
|
-
"validation_message": "Must be `direct` or `pr`"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
"name": "speakeasy_version",
|
|
9
|
-
"validation_regex": "/^[\\w.\\-]+$/.source",
|
|
10
|
-
"validation_message": "Letters, numbers, or .-_ only"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
"name": "openapi_doc_location",
|
|
14
|
-
"validation_regex": "/^((https?):\\/\\/([\\w\\-]+\\.)+\\w+(\\/.*)?|[\\w.\\-\\/]+)$/i.source",
|
|
15
|
-
"validation_message": "Must be a valid server URL or file path containing letters, numbers, or .-_/ only"
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
"name": "openapi_doc_auth_header",
|
|
19
|
-
"validation_regex": "/^[A-Za-z\\-]+$/.source",
|
|
20
|
-
"validation_message": "Letters or - only"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"name": "create_release"
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
"name": "publish_python",
|
|
27
|
-
"language": "python"
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
"name": "publish_typescript",
|
|
31
|
-
"language": "typescript"
|
|
32
|
-
},
|
|
33
|
-
{
|
|
34
|
-
"name": "publish_java",
|
|
35
|
-
"language": "java"
|
|
36
|
-
},
|
|
37
|
-
{
|
|
38
|
-
"name": "publish_php",
|
|
39
|
-
"language": "php"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"name": "publish_ruby",
|
|
43
|
-
"language": "ruby"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"name": "publish_csharp",
|
|
47
|
-
"language": "csharp"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"name": "publish_terraform",
|
|
51
|
-
"language": "terraform"
|
|
52
|
-
}
|
|
53
|
-
]
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"name": "pypi_token",
|
|
4
|
-
"secret_name": "PYPI_TOKEN",
|
|
5
|
-
"validation_regex": "/^[\\w.\\-]+$/.source",
|
|
6
|
-
"validation_message": "Letters, numbers, or .-_ only",
|
|
7
|
-
"language": "python"
|
|
8
|
-
},
|
|
9
|
-
{
|
|
10
|
-
"name": "npm_token",
|
|
11
|
-
"secret_name": "NPM_TOKEN",
|
|
12
|
-
"validation_regex": "/^[\\w.\\-]+$/.source",
|
|
13
|
-
"validation_message": "Letters, numbers, or .-_ only",
|
|
14
|
-
"language": "typescript"
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"name": "packagist_username",
|
|
18
|
-
"validation_regex": "/^[\\w.\\-]+$/.source",
|
|
19
|
-
"validation_message": "Letters, numbers, or .-_ only",
|
|
20
|
-
"language": "php"
|
|
21
|
-
},
|
|
22
|
-
{
|
|
23
|
-
"name": "packagist_token",
|
|
24
|
-
"validation_regex": "/^[\\w.\\-]+$/.source",
|
|
25
|
-
"validation_message": "Letters, numbers, or .-_ only",
|
|
26
|
-
"language": "php"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"name": "openapi_doc_auth_token",
|
|
30
|
-
"secret_name": "SPEC_TOKEN",
|
|
31
|
-
"validation_regex": "/^[\\w.\\-]+$/.source",
|
|
32
|
-
"validation_message": "Letters, numbers, or .-_ only"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"name": "speakeasy_api_key",
|
|
36
|
-
"secret_name": "SPEAKEASY_API_KEY",
|
|
37
|
-
"validation_regex": "/^[\\w.\\-]+$/.source",
|
|
38
|
-
"validation_message": "Letters, numbers, or .-_ only"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
"name": "ossrh_username",
|
|
42
|
-
"secret_name": "MAVEN_USERNAME",
|
|
43
|
-
"validation_regex": "/^[\\w.\\-]+$/.source",
|
|
44
|
-
"validation_message": "Letters, numbers, or .-_ only",
|
|
45
|
-
"language": "java"
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
"name": "ossrh_password",
|
|
49
|
-
"secret_name": "MAVEN_PASSWORD",
|
|
50
|
-
"language": "java"
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
"name": "java_gpg_secret_key",
|
|
54
|
-
"validation_regex": "/^[\\w.\\-\\t \\r\\n]+$/.source",
|
|
55
|
-
"validation_message": "Letters, numbers, tabs, spaces, newlines, or .-_ only",
|
|
56
|
-
"language": "java"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"name": "java_gpg_passphrase",
|
|
60
|
-
"language": "java"
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
"name": "terraform_gpg_secret_key",
|
|
64
|
-
"secret_name": "TERRAFORM_GPG_SECRET_KEY",
|
|
65
|
-
"validation_regex": "/^[\\w.\\-\\t \\r\\n]+$/.source",
|
|
66
|
-
"validation_message": "Letters, numbers, tabs, spaces, newlines, or .-_ only",
|
|
67
|
-
"language": "terraform"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
"name": "terraform_gpg_passphrase",
|
|
71
|
-
"secret_name": "TERRAFORM_GPG_PASSPHRASE",
|
|
72
|
-
"language": "terraform"
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
"name": "rubygems_auth_token",
|
|
76
|
-
"secret_name": "RUBYGEMS_AUTH_TOKEN",
|
|
77
|
-
"language": "ruby"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"name": "nuget_api_key",
|
|
81
|
-
"secret_name": "NUGET_API_KEY",
|
|
82
|
-
"language": "csharp"
|
|
83
|
-
},
|
|
84
|
-
{
|
|
85
|
-
"name": "slack_webhook_url",
|
|
86
|
-
"secret_name": "SLACK_WEBHOOK_URL"
|
|
87
|
-
}
|
|
88
|
-
]
|