1 |
|
2 |
|
3 |
|
4 | import { FunctionInput, FunctionOptions, FunctionOutput, FunctionResult, FunctionTrigger } from './index';
|
5 | import { InvocationContext } from './InvocationContext';
|
6 |
|
7 | export type StorageBlobHandler = (blob: unknown, context: InvocationContext) => FunctionResult;
|
8 | export type StorageQueueHandler = (queueEntry: unknown, context: InvocationContext) => FunctionResult;
|
9 |
|
10 | export interface StorageBlobFunctionOptions extends StorageBlobTriggerOptions, Partial<FunctionOptions> {
|
11 | handler: StorageBlobHandler;
|
12 |
|
13 | trigger?: StorageBlobTrigger;
|
14 | }
|
15 |
|
16 | export interface StorageQueueFunctionOptions extends StorageQueueTriggerOptions, Partial<FunctionOptions> {
|
17 | handler: StorageQueueHandler;
|
18 |
|
19 | trigger?: StorageQueueTrigger;
|
20 | }
|
21 |
|
22 | export interface StorageBlobOptions {
|
23 | |
24 |
|
25 |
|
26 | path: string;
|
27 |
|
28 | |
29 |
|
30 |
|
31 | connection: string;
|
32 | }
|
33 |
|
34 | export interface StorageQueueOptions {
|
35 | |
36 |
|
37 |
|
38 | queueName: string;
|
39 |
|
40 | |
41 |
|
42 |
|
43 | connection: string;
|
44 | }
|
45 |
|
46 | export interface StorageBlobTriggerOptions extends StorageBlobOptions {
|
47 | |
48 |
|
49 |
|
50 |
|
51 |
|
52 | source?: 'EventGrid' | 'LogsAndContainerScan';
|
53 | }
|
54 | export type StorageBlobTrigger = FunctionTrigger & StorageBlobTriggerOptions;
|
55 |
|
56 | export type StorageBlobInputOptions = StorageBlobOptions;
|
57 | export type StorageBlobInput = FunctionInput & StorageBlobInputOptions;
|
58 |
|
59 | export type StorageBlobOutputOptions = StorageBlobOptions;
|
60 | export type StorageBlobOutput = FunctionOutput & StorageBlobOutputOptions;
|
61 |
|
62 | export type StorageQueueTriggerOptions = StorageQueueOptions;
|
63 | export type StorageQueueTrigger = FunctionTrigger & StorageQueueTriggerOptions;
|
64 |
|
65 | export type StorageQueueOutputOptions = StorageQueueOptions;
|
66 | export type StorageQueueOutput = FunctionOutput & StorageQueueOutputOptions;
|