@cloudnux/cloud-sdk 0.4.0 → 0.10.0

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { EventBrokerService, StorageService, LocationService, EventFunctionContext, HttpFunctionContext, ScheduleFunctionContext, CloudProvider } from '@cloudnux/core-cloud-provider';
2
- export { CloudProvider, EventBrokerService, EventFunctionContext, EventMessage, EventRequest, EventResponse, HTTPAuth, HTTPRequest, HTTPResponse, HttpFunctionContext, LocationAddress, LocationService, LocationSuggestion, ReverseGeocodeParams, ScheduleFunctionContext, ScheduleRequest, StorageService, StorageWriteOptions, SuggestionParams } from '@cloudnux/core-cloud-provider';
1
+ import { EventBrokerService, StorageService, LocationService, EventFunctionContext, HttpFunctionContext, ScheduleFunctionContext, WebSocketFunctionContext, WebSocketService, CloudProvider } from '@cloudnux/core-cloud-provider';
2
+ export { CloudProvider, ErrorCode, EventBrokerService, EventFunctionContext, EventMessage, EventRequest, EventResponse, HTTPAuth, HTTPRequest, HTTPResponse, HttpFunctionContext, LocationAddress, LocationService, LocationSuggestion, ReverseGeocodeParams, ScheduleFunctionContext, ScheduleRequest, StorageService, StorageWriteOptions, SuggestionParams, WebSocketFunctionContext, WebSocketRequest, WebSocketResponse, WebSocketService } from '@cloudnux/core-cloud-provider';
3
3
 
4
4
  declare const cloudEventBroker: () => EventBrokerService;
5
5
 
@@ -7,14 +7,19 @@ declare const cloudStorage: () => StorageService;
7
7
 
8
8
  declare const cloudLocations: () => LocationService;
9
9
 
10
- type Handler$1 = (context: EventFunctionContext) => Promise<void>;
11
- declare function eventBrokerHandler(handler: Handler$1, ...args: any[]): Promise<any>;
10
+ type Handler$2 = (context: EventFunctionContext) => Promise<void>;
11
+ declare function eventBrokerHandler(handler: Handler$2, ...args: any[]): Promise<any>;
12
12
 
13
13
  type HttpHandler = (context: HttpFunctionContext) => Promise<void> | void;
14
14
  declare function httpHandler(handler: HttpHandler, ...args: any[]): Promise<any>;
15
15
 
16
- type Handler = (context: ScheduleFunctionContext) => Promise<void> | void;
17
- declare function scheduleHandler(handler: Handler, ...args: any[]): Promise<any>;
16
+ type Handler$1 = (context: ScheduleFunctionContext) => Promise<void> | void;
17
+ declare function scheduleHandler(handler: Handler$1, ...args: any[]): Promise<any>;
18
+
19
+ type Handler = (context: WebSocketFunctionContext) => Promise<void> | void;
20
+ declare function websocketHandler(handler: Handler, ...args: any[]): Promise<any>;
21
+
22
+ declare const cloudWebSocket: () => WebSocketService;
18
23
 
19
24
  /**
20
25
  * Retrieves the current cloud provider instance.
@@ -89,23 +94,5 @@ declare enum HttpStatus {
89
94
  UNPROCESSABLE_ENTITY = 422,
90
95
  INTERNAL_SERVER_ERROR = 500
91
96
  }
92
- /**
93
- * Error codes for API error responses
94
- */
95
- declare enum ErrorCode {
96
- VALIDATION_ERROR = "VALIDATION_ERROR",
97
- INVALID_INPUT = "INVALID_INPUT",
98
- UNAUTHORIZED = "UNAUTHORIZED",
99
- ACCESS_DENIED = "ACCESS_DENIED",
100
- RESOURCE_NOT_FOUND = "RESOURCE_NOT_FOUND",
101
- RESOURCE_ALREADY_EXISTS = "RESOURCE_ALREADY_EXISTS",
102
- RESOURCE_CONFLICT = "RESOURCE_CONFLICT",
103
- INTERNAL_SERVER_ERROR = "INTERNAL_SERVER_ERROR",
104
- SERVICE_UNAVAILABLE = "SERVICE_UNAVAILABLE",
105
- DATABASE_ERROR = "DATABASE_ERROR",
106
- BUSINESS_RULE_VIOLATION = "BUSINESS_RULE_VIOLATION",
107
- EXTERNAL_API_ERROR = "EXTERNAL_API_ERROR",
108
- UNKNOWN_ERROR = "UNKNOWN_ERROR"
109
- }
110
97
 
111
- export { type ApiContentResponse, type ApiDeleteResponse, type ApiError, type ApiListResponse, type ApiResponse, type ApiResponseMeta, ErrorCode, type ErrorResponse, HttpStatus, cloudEventBroker, cloudLocations, cloudStorage, eventBrokerHandler, getCloudProvider, httpHandler, scheduleHandler, useCloudProvider };
98
+ export { type ApiContentResponse, type ApiDeleteResponse, type ApiError, type ApiListResponse, type ApiResponse, type ApiResponseMeta, type ErrorResponse, HttpStatus, cloudEventBroker, cloudLocations, cloudStorage, cloudWebSocket, eventBrokerHandler, getCloudProvider, httpHandler, scheduleHandler, useCloudProvider, websocketHandler };