@tak-ps/etl
    Preparing search index...

    Class StaticCapabilities

    The static Capabilities document authored alongside an ETL task's source code as a capabilities.json and embedded in the OCI Image Manifest at build time. It describes the task, the permissions it needs, and the invocation modes it supports before the task is ever deployed

    Note this format intentionally differs from the live Capabilities document returned by invoking a deployed task Lambda (the Capabilities export of this package), which reflects the runtime environment schemas of the running image

    Index
    annotation: string = CAPABILITIES_ANNOTATION
    outgoingTypes: Record<string, string[]> = OUTGOING_TYPES
    permissions: Record<string, string[]> = PERMISSIONS
    schema: TObject<
        {
            compute: TObject<{ memory: TInteger; timeout: TInteger }>;
            description: TString;
            invocations: TObject<
                {
                    incoming: TOptional<
                        TObject<
                            {
                                schedule: TOptional<
                                    TObject<{ default: TObject<(...)>; description: TString }>,
                                >;
                                webhook: TOptional<
                                    TObject<{ default: TObject<(...)>; description: TString }>,
                                >;
                            },
                        >,
                    >;
                    outgoing: TOptional<
                        TObject<
                            {
                                types: TArray<
                                    TObject<{ description: TString; resource: TString }>,
                                >;
                            },
                        >,
                    >;
                },
            >;
            name: TString;
            permissions: TArray<
                TObject<
                    { description: TString; required: TBoolean; resource: TString },
                >,
            >;
            version: TString;
        },
    > = StaticCapabilitiesSchema
    • Parameters

      • input: unknown

      Returns input is {
          compute: { memory: number; timeout: number };
          description: string;
          invocations: {
              incoming?: {
                  schedule?: {
                      default: { enabled: boolean; schedule: string };
                      description: string;
                  };
                  webhook?: { default: { enabled: boolean }; description: string };
              };
              outgoing?: { types: { description: string; resource: string }[] };
          };
          name: string;
          permissions: { description: string; required: boolean; resource: string }[];
          version: string;
      }

    • Is a concrete <resource>:<action> string covered by any entry of a list of declared or subscribed Outgoing types

      Parameters

      • subscriptions: string[]
      • resource: string

      Returns boolean

    • Ensure a <resource>:<action> string refers to a known Outgoing resource type and an action it can be subscribed at - <resource>:* is valid for every resource type

      Parameters

      • resource: string

      Returns boolean

    • Ensure a <permission>:<level> string refers to a known permission and a level it can be granted at - <permission>:* is valid for every permission

      Parameters

      • resource: string

      Returns boolean

    • Does a declared or subscribed Outgoing type (which may carry a wildcard action) cover a concrete <resource>:<action> string

      Parameters

      • declared: string
      • resource: string

      Returns boolean

    • Read and validate a capabilities.json document from disk, returning null if no document exists at the given path

      Parameters

      • path: string | URL

      Returns Promise<
          | {
              compute: { memory: number; timeout: number };
              description: string;
              invocations: {
                  incoming?: {
                      schedule?: {
                          default: { enabled: boolean; schedule: string };
                          description: string;
                      };
                      webhook?: { default: { enabled: boolean }; description: string };
                  };
                  outgoing?: { types: { description: string; resource: string }[] };
              };
              name: string;
              permissions: { description: string; required: boolean; resource: string }[];
              version: string;
          }
          | null,
      >

    • Parameters

      • input: unknown

      Returns {
          compute: { memory: number; timeout: number };
          description: string;
          invocations: {
              incoming?: {
                  schedule?: {
                      default: { enabled: boolean; schedule: string };
                      description: string;
                  };
                  webhook?: { default: { enabled: boolean }; description: string };
              };
              outgoing?: { types: { description: string; resource: string }[] };
          };
          name: string;
          permissions: { description: string; required: boolean; resource: string }[];
          version: string;
      }