@beseif-solutions/prow-core 0.2.1 → 0.2.2
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/dist/entities/events.d.ts +5 -1
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
- package/src/entities/events.ts +5 -2
- package/src/index.ts +1 -1
|
@@ -172,7 +172,7 @@ type MemoryOutput<Config extends MemoryEventConfig = {
|
|
|
172
172
|
}> = {
|
|
173
173
|
memory: Config[`memory`];
|
|
174
174
|
} & (StandardOutput<Config> | {});
|
|
175
|
-
export type
|
|
175
|
+
export type SyncAction<Config extends MemoryEventConfig = {
|
|
176
176
|
fields: Record<string, any>;
|
|
177
177
|
memory: Record<string, any>;
|
|
178
178
|
}> = CommonEvents<Config> & {
|
|
@@ -227,6 +227,7 @@ export type AsyncAction<Config extends SetupEventConfig = {
|
|
|
227
227
|
inputs: {
|
|
228
228
|
fields: Config[`fields`];
|
|
229
229
|
flags: Partial<Record<Config[`flags`][`inputs`][number], true>>;
|
|
230
|
+
link: string;
|
|
230
231
|
setup?: Config[`setup`];
|
|
231
232
|
};
|
|
232
233
|
outputs: {
|
|
@@ -256,6 +257,9 @@ export type AsyncAction<Config extends SetupEventConfig = {
|
|
|
256
257
|
}>;
|
|
257
258
|
};
|
|
258
259
|
};
|
|
260
|
+
export type Action<Config extends EventConfig = {
|
|
261
|
+
fields: Record<string, any>;
|
|
262
|
+
}> = SyncAction<Config> | AsyncAction<Config>;
|
|
259
263
|
export type Event<Config extends EventConfig = {
|
|
260
264
|
fields: Record<string, any>;
|
|
261
265
|
}> = Action<Config> | Trigger<Config>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Core, core } from './core';
|
|
2
2
|
export { CoreFunction, idSchema } from './entities/commons';
|
|
3
3
|
export { Credentials, credentialsSchema, OAuthCredentials, oauthCredentialsSchema, SessionCredentials, sessionCredentialsSchema, StaticCredentials, staticCredentialsSchema } from './entities/credentials';
|
|
4
|
-
export { Action, actionOutputSchema, actionSchema, AsyncAction, Event, eventSchema, ImmediateTrigger, immediateTriggerSchema, Request, ScheduledTrigger, scheduledTriggerSchema, syncActionSchema, Trigger, triggerOutputSchema, triggerSchema } from './entities/events';
|
|
4
|
+
export { Action, actionOutputSchema, actionSchema, AsyncAction, Event, eventSchema, ImmediateTrigger, immediateTriggerSchema, Request, ScheduledTrigger, scheduledTriggerSchema, SyncAction, syncActionSchema, Trigger, triggerOutputSchema, triggerSchema } from './entities/events';
|
|
5
5
|
export { Provider, providerSchema } from './entities/provider';
|
|
6
6
|
export { Source } from './entities/source';
|
|
7
7
|
export { alter, extract, Field, fieldSchema, fieldsSchema, File, SelectFieldChoice, validate, ValidationResult } from './minified-utils/fields';
|
package/package.json
CHANGED
package/src/entities/events.ts
CHANGED
|
@@ -131,7 +131,7 @@ type MemoryOutput<Config extends MemoryEventConfig = { memory: Record<string, an
|
|
|
131
131
|
memory: Config[`memory`],
|
|
132
132
|
} & (StandardOutput<Config> | {});
|
|
133
133
|
|
|
134
|
-
export type
|
|
134
|
+
export type SyncAction<Config extends MemoryEventConfig = { fields: Record<string, any>, memory: Record<string, any> }> = CommonEvents<Config> & {
|
|
135
135
|
type: `action`,
|
|
136
136
|
inputs: [DefaultConnectableEvent<Config[`flags`][`inputs`][number]>, ...AdditionalConnectableEvent<Config[`flags`][`inputs`][number]>[]],
|
|
137
137
|
outputs: [DefaultConnectableEvent<Config[`flags`][`outputs`][number]>, ...(AdditionalConnectableEvent<Config[`flags`][`outputs`][number]> | ErrorConnectableEvent<Config[`flags`][`outputs`][number]>)[]],
|
|
@@ -162,7 +162,7 @@ export type AsyncAction<Config extends SetupEventConfig = { fields: Record<strin
|
|
|
162
162
|
}>,
|
|
163
163
|
execute: CoreFunction<{
|
|
164
164
|
credentials: Config[`credentials`],
|
|
165
|
-
inputs: { fields: Config[`fields`], flags: Partial<Record<Config[`flags`][`inputs`][number], true>>, setup?: Config[`setup`] },
|
|
165
|
+
inputs: { fields: Config[`fields`], flags: Partial<Record<Config[`flags`][`inputs`][number], true>>, link: string, setup?: Config[`setup`] },
|
|
166
166
|
outputs: { done: boolean, setup?: Config[`setup`] },
|
|
167
167
|
}>,
|
|
168
168
|
handle: CoreFunction<{
|
|
@@ -177,6 +177,9 @@ export type AsyncAction<Config extends SetupEventConfig = { fields: Record<strin
|
|
|
177
177
|
}>,
|
|
178
178
|
},
|
|
179
179
|
};
|
|
180
|
+
export type Action<Config extends EventConfig = { fields: Record<string, any> }> =
|
|
181
|
+
| SyncAction<Config>
|
|
182
|
+
| AsyncAction<Config>;
|
|
180
183
|
|
|
181
184
|
export type Event<Config extends EventConfig = { fields: Record<string, any> }> =
|
|
182
185
|
| Action<Config>
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { Core, core } from './core';
|
|
2
2
|
export { CoreFunction, idSchema } from './entities/commons';
|
|
3
3
|
export { Credentials, credentialsSchema, OAuthCredentials, oauthCredentialsSchema, SessionCredentials, sessionCredentialsSchema, StaticCredentials, staticCredentialsSchema } from './entities/credentials';
|
|
4
|
-
export { Action, actionOutputSchema, actionSchema, AsyncAction, Event, eventSchema, ImmediateTrigger, immediateTriggerSchema, Request, ScheduledTrigger, scheduledTriggerSchema, syncActionSchema, Trigger, triggerOutputSchema, triggerSchema } from './entities/events';
|
|
4
|
+
export { Action, actionOutputSchema, actionSchema, AsyncAction, Event, eventSchema, ImmediateTrigger, immediateTriggerSchema, Request, ScheduledTrigger, scheduledTriggerSchema, SyncAction, syncActionSchema, Trigger, triggerOutputSchema, triggerSchema } from './entities/events';
|
|
5
5
|
export { Provider, providerSchema } from './entities/provider';
|
|
6
6
|
export { Source } from './entities/source';
|
|
7
7
|
export { alter, extract, Field, fieldSchema, fieldsSchema, File, SelectFieldChoice, validate, ValidationResult } from './minified-utils/fields';
|