@awsless/awsless 0.0.287 → 0.0.289

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/server.d.ts CHANGED
@@ -1,8 +1,23 @@
1
+ import { AwsCredentialIdentityProvider } from '@aws-sdk/types';
1
2
  import * as _awsless_lambda from '@awsless/lambda';
2
3
  import { Handler, Loggers } from '@awsless/lambda';
3
4
  import { BaseSchema, SqsQueueSchema, SnsTopicSchema } from '@awsless/validate';
4
5
  import * as valibot from 'valibot';
5
6
 
7
+ declare const regions: readonly ["us-east-2", "us-east-1", "us-west-1", "us-west-2", "af-south-1", "ap-east-1", "ap-south-2", "ap-southeast-3", "ap-southeast-4", "ap-south-1", "ap-northeast-3", "ap-northeast-2", "ap-southeast-1", "ap-southeast-2", "ap-northeast-1", "ca-central-1", "eu-central-1", "eu-west-1", "eu-west-2", "eu-south-1", "eu-west-3", "eu-south-2", "eu-north-1", "eu-central-2", "me-south-1", "me-central-1", "sa-east-1"];
8
+ type Region = (typeof regions)[number];
9
+
10
+ type Credentials = AwsCredentialIdentityProvider;
11
+
12
+ type CommandOptions = Record<string, string | number | boolean | undefined>;
13
+ type CommandContext = {
14
+ region: Region;
15
+ credentials: Credentials;
16
+ accountId: string;
17
+ update: (msg: string) => void;
18
+ };
19
+ type CommandHandler = (options: CommandOptions, context: CommandContext) => Promise<string | undefined | void>;
20
+
6
21
  type CronProps<H extends Handler<S>, S extends BaseSchema> = {
7
22
  handle: H;
8
23
  schema?: S;
@@ -118,4 +133,4 @@ declare const Topic: TopicResources;
118
133
  declare const APP: "app";
119
134
  declare const STACK: "stack";
120
135
 
121
- export { APP, Cache, CacheResources, Config, ConfigResources, CronProps, Fn, Function, FunctionMock, FunctionMockResponse, FunctionProps, FunctionResources, Queue, QueueMock, QueueMockResponse, QueueProps, QueueResources, STACK, Search, SearchResources, Store, StoreResources, Table, TableResources, Task, TaskMock, TaskMockResponse, TaskResources, Topic, TopicMock, TopicMockResponse, TopicProps, TopicResources, cron, func, getCacheProps, getConfigName, getFunctionName, getQueueName, getSearchName, getStoreName, getTableName, getTaskName, getTopicName, mockFunction, mockQueue, mockTask, mockTopic, queue, topic };
136
+ export { APP, Cache, CacheResources, CommandContext, CommandHandler, CommandOptions, Config, ConfigResources, CronProps, Fn, Function, FunctionMock, FunctionMockResponse, FunctionProps, FunctionResources, Queue, QueueMock, QueueMockResponse, QueueProps, QueueResources, STACK, Search, SearchResources, Store, StoreResources, Table, TableResources, Task, TaskMock, TaskMockResponse, TaskResources, Topic, TopicMock, TopicMockResponse, TopicProps, TopicResources, cron, func, getCacheProps, getConfigName, getFunctionName, getQueueName, getSearchName, getStoreName, getTableName, getTaskName, getTopicName, mockFunction, mockQueue, mockTask, mockTopic, queue, topic };