construct-hub 0.3.337 → 0.3.340

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,2 +1,58 @@
1
- import type { Context, ScheduledEvent } from 'aws-lambda';
2
- export declare function handler(event: ScheduledEvent, context: Context): Promise<void>;
1
+ import type { Context } from 'aws-lambda';
2
+ export declare function handler(event: InventoryCanaryEvent, context: Context): Promise<InventoryCanaryEvent>;
3
+ interface IndexedPackageStatus {
4
+ metadataPresent?: boolean;
5
+ assemblyPresent?: boolean;
6
+ uninstallable?: boolean;
7
+ submodules?: Set<string>;
8
+ tarballPresent?: boolean;
9
+ unknownObjects?: string[];
10
+ }
11
+ export declare const enum Grain {
12
+ PACKAGE_MAJOR_VERSIONS = "package major versions",
13
+ PACKAGE_VERSION_SUBMODULES = "package version submodules",
14
+ PACKAGE_VERSIONS = "package versions",
15
+ PACKAGES = "packages"
16
+ }
17
+ declare type PerLanguageData = Map<Grain, Map<string, DocumentationStatus>>;
18
+ export declare const enum DocumentationStatus {
19
+ /**
20
+ * This package is missing any kind of documentation or marker file.
21
+ */
22
+ MISSING = "Missing",
23
+ /**
24
+ * This package does not support the given language.
25
+ */
26
+ UNSUPPORTED = "Unsupported",
27
+ /**
28
+ * This package has a corrupted JSII assembly so we can't generate
29
+ * documentation for it.
30
+ */
31
+ CORRUPT_ASSEMBLY = "CorruptAssembly",
32
+ /**
33
+ * This package supports the given language and has documentation for it.
34
+ */
35
+ SUPPORTED = "Supported"
36
+ }
37
+ /**
38
+ * Expected input event structure as passed by the state machine.
39
+ */
40
+ export interface InventoryCanaryEvent {
41
+ readonly continuationObjectKey?: string;
42
+ }
43
+ /**
44
+ * Intermediate state stored between invocations of the inventory canary.
45
+ */
46
+ export interface InventoryCanaryState {
47
+ readonly continuationToken: string;
48
+ readonly indexedPackages: Map<string, IndexedPackageStatus>;
49
+ readonly packageNames: Set<string>;
50
+ readonly packageMajorVersions: Set<string>;
51
+ readonly perLanguage: Map<string, PerLanguageData>;
52
+ }
53
+ declare type Serialized<T> = string & {
54
+ _serialized: T;
55
+ };
56
+ export declare function serialize<T>(value: T): Serialized<T>;
57
+ export declare function deserialize<T>(value: Serialized<T>): T;
58
+ export {};