Skip to content

Commit 08a2484

Browse files
committed
fix: trigger event
1 parent 0681405 commit 08a2484

13 files changed

+271
-150
lines changed

libs/internal-sdk/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
**/.speakeasy/temp/
2+
**/.speakeasy/logs/
13
.speakeasy/temp/
24
.DS_Store
35
/mcp-server

libs/internal-sdk/eslint.config.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export default [
1111
{
1212
rules: {
1313
"no-constant-condition": "off",
14+
"no-useless-escape": "off",
1415
// Handled by typescript compiler
1516
"@typescript-eslint/no-unused-vars": "off",
1617
"@typescript-eslint/no-explicit-any": "off",

libs/internal-sdk/src/lib/config.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
6161

6262
export const SDK_METADATA = {
6363
language: "typescript",
64-
openapiDocVersion: "1.0",
64+
openapiDocVersion: "2.1.13",
6565
sdkVersion: "0.1.21",
66-
genVersion: "2.588.4",
67-
userAgent: "speakeasy-sdk/typescript 0.1.21 2.588.4 1.0 @novu/api",
66+
genVersion: "2.597.9",
67+
userAgent: "speakeasy-sdk/typescript 0.1.21 2.597.9 2.1.13 @novu/api",
6868
} as const;

libs/internal-sdk/src/lib/sdks.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ export type RequestOptions = {
4646
*/
4747
serverURL?: string | URL;
4848
/**
49+
* @deprecated `fetchOptions` has been flattened into `RequestOptions`.
50+
*
4951
* Sets various request options on the `fetch` call made by an SDK method.
5052
*
5153
* @see {@link https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options|Request}
5254
*/
5355
fetchOptions?: Omit<RequestInit, "method" | "body">;
54-
};
56+
} & Omit<RequestInit, "method" | "body">;
5557

5658
type RequestConfig = {
5759
method: string;
@@ -168,7 +170,9 @@ export class ClientSDK {
168170
cookie = cookie.startsWith("; ") ? cookie.slice(2) : cookie;
169171
headers.set("cookie", cookie);
170172

171-
const userHeaders = new Headers(options?.fetchOptions?.headers);
173+
const userHeaders = new Headers(
174+
options?.headers ?? options?.fetchOptions?.headers,
175+
);
172176
for (const [k, v] of userHeaders) {
173177
headers.set(k, v);
174178
}
@@ -179,20 +183,16 @@ export class ClientSDK {
179183
headers.set(conf.uaHeader ?? "user-agent", SDK_METADATA.userAgent);
180184
}
181185

182-
let fetchOptions = options?.fetchOptions;
186+
const fetchOptions: Omit<RequestInit, "method" | "body"> = {
187+
...options?.fetchOptions,
188+
...options,
189+
};
183190
if (!fetchOptions?.signal && conf.timeoutMs && conf.timeoutMs > 0) {
184191
const timeoutSignal = AbortSignal.timeout(conf.timeoutMs);
185-
if (!fetchOptions) {
186-
fetchOptions = { signal: timeoutSignal };
187-
} else {
188-
fetchOptions.signal = timeoutSignal;
189-
}
192+
fetchOptions.signal = timeoutSignal;
190193
}
191194

192195
if (conf.body instanceof ReadableStream) {
193-
if (!fetchOptions) {
194-
fetchOptions = {};
195-
}
196196
Object.assign(fetchOptions, { duplex: "half" });
197197
}
198198

libs/internal-sdk/src/models/components/activitynotificationstepresponsedto.ts

+50-29
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export type ControlVariables = {};
3333
/**
3434
* Metadata for the workflow step
3535
*/
36-
export type Metadata = {};
36+
export type ActivityNotificationStepResponseDtoMetadata = {};
3737

3838
/**
3939
* Step issues
@@ -60,7 +60,7 @@ export type ActivityNotificationStepResponseDto = {
6060
/**
6161
* Metadata for the workflow step
6262
*/
63-
metadata?: Metadata | undefined;
63+
metadata?: ActivityNotificationStepResponseDtoMetadata | undefined;
6464
/**
6565
* Step issues
6666
*/
@@ -202,46 +202,63 @@ export function controlVariablesFromJSON(
202202
}
203203

204204
/** @internal */
205-
export const Metadata$inboundSchema: z.ZodType<
206-
Metadata,
207-
z.ZodTypeDef,
208-
unknown
209-
> = z.object({});
205+
export const ActivityNotificationStepResponseDtoMetadata$inboundSchema:
206+
z.ZodType<
207+
ActivityNotificationStepResponseDtoMetadata,
208+
z.ZodTypeDef,
209+
unknown
210+
> = z.object({});
210211

211212
/** @internal */
212-
export type Metadata$Outbound = {};
213+
export type ActivityNotificationStepResponseDtoMetadata$Outbound = {};
213214

214215
/** @internal */
215-
export const Metadata$outboundSchema: z.ZodType<
216-
Metadata$Outbound,
217-
z.ZodTypeDef,
218-
Metadata
219-
> = z.object({});
216+
export const ActivityNotificationStepResponseDtoMetadata$outboundSchema:
217+
z.ZodType<
218+
ActivityNotificationStepResponseDtoMetadata$Outbound,
219+
z.ZodTypeDef,
220+
ActivityNotificationStepResponseDtoMetadata
221+
> = z.object({});
220222

221223
/**
222224
* @internal
223225
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
224226
*/
225-
export namespace Metadata$ {
226-
/** @deprecated use `Metadata$inboundSchema` instead. */
227-
export const inboundSchema = Metadata$inboundSchema;
228-
/** @deprecated use `Metadata$outboundSchema` instead. */
229-
export const outboundSchema = Metadata$outboundSchema;
230-
/** @deprecated use `Metadata$Outbound` instead. */
231-
export type Outbound = Metadata$Outbound;
227+
export namespace ActivityNotificationStepResponseDtoMetadata$ {
228+
/** @deprecated use `ActivityNotificationStepResponseDtoMetadata$inboundSchema` instead. */
229+
export const inboundSchema =
230+
ActivityNotificationStepResponseDtoMetadata$inboundSchema;
231+
/** @deprecated use `ActivityNotificationStepResponseDtoMetadata$outboundSchema` instead. */
232+
export const outboundSchema =
233+
ActivityNotificationStepResponseDtoMetadata$outboundSchema;
234+
/** @deprecated use `ActivityNotificationStepResponseDtoMetadata$Outbound` instead. */
235+
export type Outbound = ActivityNotificationStepResponseDtoMetadata$Outbound;
232236
}
233237

234-
export function metadataToJSON(metadata: Metadata): string {
235-
return JSON.stringify(Metadata$outboundSchema.parse(metadata));
238+
export function activityNotificationStepResponseDtoMetadataToJSON(
239+
activityNotificationStepResponseDtoMetadata:
240+
ActivityNotificationStepResponseDtoMetadata,
241+
): string {
242+
return JSON.stringify(
243+
ActivityNotificationStepResponseDtoMetadata$outboundSchema.parse(
244+
activityNotificationStepResponseDtoMetadata,
245+
),
246+
);
236247
}
237248

238-
export function metadataFromJSON(
249+
export function activityNotificationStepResponseDtoMetadataFromJSON(
239250
jsonString: string,
240-
): SafeParseResult<Metadata, SDKValidationError> {
251+
): SafeParseResult<
252+
ActivityNotificationStepResponseDtoMetadata,
253+
SDKValidationError
254+
> {
241255
return safeParse(
242256
jsonString,
243-
(x) => Metadata$inboundSchema.parse(JSON.parse(x)),
244-
`Failed to parse 'Metadata' from JSON`,
257+
(x) =>
258+
ActivityNotificationStepResponseDtoMetadata$inboundSchema.parse(
259+
JSON.parse(x),
260+
),
261+
`Failed to parse 'ActivityNotificationStepResponseDtoMetadata' from JSON`,
245262
);
246263
}
247264

@@ -298,7 +315,9 @@ export const ActivityNotificationStepResponseDto$inboundSchema: z.ZodType<
298315
ActivityNotificationStepResponseDtoReplyCallback$inboundSchema
299316
).optional(),
300317
controlVariables: z.lazy(() => ControlVariables$inboundSchema).optional(),
301-
metadata: z.lazy(() => Metadata$inboundSchema).optional(),
318+
metadata: z.lazy(() =>
319+
ActivityNotificationStepResponseDtoMetadata$inboundSchema
320+
).optional(),
302321
issues: z.lazy(() => Issues$inboundSchema).optional(),
303322
filters: z.array(StepFilterDto$inboundSchema),
304323
template: MessageTemplateDto$inboundSchema.optional(),
@@ -324,7 +343,7 @@ export type ActivityNotificationStepResponseDto$Outbound = {
324343
| ActivityNotificationStepResponseDtoReplyCallback$Outbound
325344
| undefined;
326345
controlVariables?: ControlVariables$Outbound | undefined;
327-
metadata?: Metadata$Outbound | undefined;
346+
metadata?: ActivityNotificationStepResponseDtoMetadata$Outbound | undefined;
328347
issues?: Issues$Outbound | undefined;
329348
filters: Array<StepFilterDto$Outbound>;
330349
template?: MessageTemplateDto$Outbound | undefined;
@@ -346,7 +365,9 @@ export const ActivityNotificationStepResponseDto$outboundSchema: z.ZodType<
346365
ActivityNotificationStepResponseDtoReplyCallback$outboundSchema
347366
).optional(),
348367
controlVariables: z.lazy(() => ControlVariables$outboundSchema).optional(),
349-
metadata: z.lazy(() => Metadata$outboundSchema).optional(),
368+
metadata: z.lazy(() =>
369+
ActivityNotificationStepResponseDtoMetadata$outboundSchema
370+
).optional(),
350371
issues: z.lazy(() => Issues$outboundSchema).optional(),
351372
filters: z.array(StepFilterDto$outboundSchema),
352373
template: MessageTemplateDto$outboundSchema.optional(),

libs/internal-sdk/src/models/components/digesttimedconfigdto.ts

+18-14
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import {
2323
OrdinalValueEnum$outboundSchema,
2424
} from "./ordinalvalueenum.js";
2525

26-
export const WeekDays = {
26+
export const DigestTimedConfigDtoWeekDays = {
2727
Monday: "monday",
2828
Tuesday: "tuesday",
2929
Wednesday: "wednesday",
@@ -32,7 +32,9 @@ export const WeekDays = {
3232
Saturday: "saturday",
3333
Sunday: "sunday",
3434
} as const;
35-
export type WeekDays = ClosedEnum<typeof WeekDays>;
35+
export type DigestTimedConfigDtoWeekDays = ClosedEnum<
36+
typeof DigestTimedConfigDtoWeekDays
37+
>;
3638

3739
export type DigestTimedConfigDto = {
3840
/**
@@ -42,7 +44,7 @@ export type DigestTimedConfigDto = {
4244
/**
4345
* Days of the week for the digest
4446
*/
45-
weekDays?: Array<WeekDays> | undefined;
47+
weekDays?: Array<DigestTimedConfigDtoWeekDays> | undefined;
4648
/**
4749
* Specific days of the month for the digest
4850
*/
@@ -66,22 +68,24 @@ export type DigestTimedConfigDto = {
6668
};
6769

6870
/** @internal */
69-
export const WeekDays$inboundSchema: z.ZodNativeEnum<typeof WeekDays> = z
70-
.nativeEnum(WeekDays);
71+
export const DigestTimedConfigDtoWeekDays$inboundSchema: z.ZodNativeEnum<
72+
typeof DigestTimedConfigDtoWeekDays
73+
> = z.nativeEnum(DigestTimedConfigDtoWeekDays);
7174

7275
/** @internal */
73-
export const WeekDays$outboundSchema: z.ZodNativeEnum<typeof WeekDays> =
74-
WeekDays$inboundSchema;
76+
export const DigestTimedConfigDtoWeekDays$outboundSchema: z.ZodNativeEnum<
77+
typeof DigestTimedConfigDtoWeekDays
78+
> = DigestTimedConfigDtoWeekDays$inboundSchema;
7579

7680
/**
7781
* @internal
7882
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
7983
*/
80-
export namespace WeekDays$ {
81-
/** @deprecated use `WeekDays$inboundSchema` instead. */
82-
export const inboundSchema = WeekDays$inboundSchema;
83-
/** @deprecated use `WeekDays$outboundSchema` instead. */
84-
export const outboundSchema = WeekDays$outboundSchema;
84+
export namespace DigestTimedConfigDtoWeekDays$ {
85+
/** @deprecated use `DigestTimedConfigDtoWeekDays$inboundSchema` instead. */
86+
export const inboundSchema = DigestTimedConfigDtoWeekDays$inboundSchema;
87+
/** @deprecated use `DigestTimedConfigDtoWeekDays$outboundSchema` instead. */
88+
export const outboundSchema = DigestTimedConfigDtoWeekDays$outboundSchema;
8589
}
8690

8791
/** @internal */
@@ -91,7 +95,7 @@ export const DigestTimedConfigDto$inboundSchema: z.ZodType<
9195
unknown
9296
> = z.object({
9397
atTime: z.string().optional(),
94-
weekDays: z.array(WeekDays$inboundSchema).optional(),
98+
weekDays: z.array(DigestTimedConfigDtoWeekDays$inboundSchema).optional(),
9599
monthDays: z.array(z.number()).optional(),
96100
ordinal: OrdinalEnum$inboundSchema.optional(),
97101
ordinalValue: OrdinalValueEnum$inboundSchema.optional(),
@@ -117,7 +121,7 @@ export const DigestTimedConfigDto$outboundSchema: z.ZodType<
117121
DigestTimedConfigDto
118122
> = z.object({
119123
atTime: z.string().optional(),
120-
weekDays: z.array(WeekDays$outboundSchema).optional(),
124+
weekDays: z.array(DigestTimedConfigDtoWeekDays$outboundSchema).optional(),
121125
monthDays: z.array(z.number()).optional(),
122126
ordinal: OrdinalEnum$outboundSchema.optional(),
123127
ordinalValue: OrdinalValueEnum$outboundSchema.optional(),

0 commit comments

Comments
 (0)