@botpress/sdk 6.11.1 → 6.12.0

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.
@@ -1,20 +1,20 @@
1
1
 
2
- > @botpress/sdk@6.11.1 build /home/runner/work/botpress/botpress/packages/sdk
2
+ > @botpress/sdk@6.12.0 build /home/runner/work/botpress/botpress/packages/sdk
3
3
  > pnpm build:type && pnpm build:node && pnpm build:browser
4
4
 
5
5
 
6
- > @botpress/sdk@6.11.1 build:type /home/runner/work/botpress/botpress/packages/sdk
6
+ > @botpress/sdk@6.12.0 build:type /home/runner/work/botpress/botpress/packages/sdk
7
7
  > tsc -p ./tsconfig.package.json --emitDeclarationOnly --declaration
8
8
 
9
9
 
10
- > @botpress/sdk@6.11.1 build:node /home/runner/work/botpress/botpress/packages/sdk
10
+ > @botpress/sdk@6.12.0 build:node /home/runner/work/botpress/botpress/packages/sdk
11
11
  > ts-node -T ./build.ts --node
12
12
 
13
13
  Done
14
14
 
15
- > @botpress/sdk@6.11.1 build:browser /home/runner/work/botpress/botpress/packages/sdk
15
+ > @botpress/sdk@6.12.0 build:browser /home/runner/work/botpress/botpress/packages/sdk
16
16
  > ts-node -T ./build.ts --browser
17
17
 
18
- (node:3295) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
18
+ (node:3380) [DEP0180] DeprecationWarning: fs.Stats constructor is deprecated.
19
19
  (Use `node --trace-deprecation ...` to show where the warning was created)
20
20
  Done
@@ -22,6 +22,11 @@ export declare abstract class BaseLogger<TOptions extends object> {
22
22
  warn(...args: Parameters<typeof console.warn>): void;
23
23
  error(...args: Parameters<typeof console.error>): void;
24
24
  issue(args: IssueLogEvent): void;
25
+ /**
26
+ * Identity fields merged into every issue line so downstream ingestion can
27
+ * attribute and validate the issue without out-of-band context.
28
+ */
29
+ protected getIssueContext(): Record<string, string>;
25
30
  private _log;
26
31
  private _serializeMessage;
27
32
  protected getJsonMessage(level: LogLevel, msg: string): string;
@@ -0,0 +1 @@
1
+ export {};
@@ -30,6 +30,10 @@ export type RecurringEventDefinition<TEvents extends BaseEvents = BaseEvents> =
30
30
  };
31
31
  }[keyof TEvents];
32
32
  export type EventDefinition<TEvent extends BaseEvents[string] = BaseEvents[string]> = SchemaDefinition<TEvent> & {
33
+ recurrence?: {
34
+ cron: string;
35
+ payload: z.input<TEvent>;
36
+ };
33
37
  attributes?: Record<string, string>;
34
38
  };
35
39
  export type ConfigurationDefinition<TConfig extends BaseConfig = BaseConfig> = SchemaDefinition<TConfig>;
@@ -140,6 +144,7 @@ export type BotDefinitionProps<TStates extends BaseStates = BaseStates, TEvents
140
144
  events?: {
141
145
  [K in keyof TEvents]: EventDefinition<TEvents[K]>;
142
146
  };
147
+ /** @deprecated Use the `recurrence` field on each event in `events` instead. */
143
148
  recurringEvents?: Record<string, RecurringEventDefinition<TEvents>>;
144
149
  actions?: {
145
150
  [K in keyof TActions]: ActionDefinition<TActions[K]>;
@@ -0,0 +1,9 @@
1
+ import { BotDefinitionProps, EventDefinition } from '../bot/definition';
2
+ import { SafeOmit } from '../utils/type-utils';
3
+ type StrippedEvents<TEvents extends Record<string, EventDefinition>> = {
4
+ [K in keyof TEvents]: SafeOmit<TEvents[K], 'recurrence'>;
5
+ };
6
+ export declare function stripRecurringFromEvents<TEvents extends Record<string, EventDefinition>>(events: TEvents): StrippedEvents<TEvents>;
7
+ export declare function stripRecurringFromEvents<TEvents extends Record<string, EventDefinition>>(events: TEvents | undefined): StrippedEvents<TEvents> | undefined;
8
+ export declare function resolveRecurringEvents(events: Record<string, EventDefinition> | undefined, explicitRecurringEvents: BotDefinitionProps['recurringEvents']): BotDefinitionProps['recurringEvents'];
9
+ export {};
@@ -0,0 +1 @@
1
+ export {};