@cloudnux/cloud-sdk 0.12.0 → 0.15.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 +16 -3
- package/dist/index.js +181 -591
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EventBrokerService, StorageService, LocationService, EventFunctionContext, HttpFunctionContext, ScheduleFunctionContext, WebSocketFunctionContext, WebSocketService, CloudProvider } from '@cloudnux/core-cloud-provider';
|
|
1
|
+
import { EventBrokerService, StorageService, LocationService, EventFunctionContext, EventBatchItemResult, HttpFunctionContext, ScheduleFunctionContext, WebSocketFunctionContext, WebSocketService, CloudProvider } from '@cloudnux/core-cloud-provider';
|
|
2
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;
|
|
@@ -8,7 +8,7 @@ declare const cloudStorage: () => StorageService;
|
|
|
8
8
|
declare const cloudLocations: () => LocationService;
|
|
9
9
|
|
|
10
10
|
type Handler$2 = (context: EventFunctionContext) => Promise<void>;
|
|
11
|
-
declare function eventBrokerHandler(handler: Handler$2, ...args: any[]): Promise<
|
|
11
|
+
declare function eventBrokerHandler(handler: Handler$2, ...args: any[]): Promise<EventBatchItemResult>;
|
|
12
12
|
|
|
13
13
|
type HttpHandler = (context: HttpFunctionContext) => Promise<void> | void;
|
|
14
14
|
declare function httpHandler(handler: HttpHandler, ...args: any[]): Promise<any>;
|
|
@@ -51,6 +51,9 @@ type ApiResponseMeta = {
|
|
|
51
51
|
pageSize?: number;
|
|
52
52
|
totalItems?: number;
|
|
53
53
|
totalPages?: number;
|
|
54
|
+
nextCursor?: string | null;
|
|
55
|
+
prevCursor?: string | null;
|
|
56
|
+
hasMore?: boolean;
|
|
54
57
|
timestamp?: string;
|
|
55
58
|
requestId?: string;
|
|
56
59
|
};
|
|
@@ -67,6 +70,16 @@ interface ApiListResponse<T> extends ApiResponse<T[]> {
|
|
|
67
70
|
timestamp: string;
|
|
68
71
|
};
|
|
69
72
|
}
|
|
73
|
+
interface ApiCursorListResponse<T> extends ApiResponse<T[]> {
|
|
74
|
+
data: T[];
|
|
75
|
+
meta: {
|
|
76
|
+
nextCursor: string | null;
|
|
77
|
+
prevCursor?: string | null;
|
|
78
|
+
pageSize: number;
|
|
79
|
+
hasMore: boolean;
|
|
80
|
+
timestamp: string;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
70
83
|
interface ApiDeleteResponse extends ApiResponse<{
|
|
71
84
|
deleted: boolean;
|
|
72
85
|
}> {
|
|
@@ -95,4 +108,4 @@ declare enum HttpStatus {
|
|
|
95
108
|
INTERNAL_SERVER_ERROR = 500
|
|
96
109
|
}
|
|
97
110
|
|
|
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 };
|
|
111
|
+
export { type ApiContentResponse, type ApiCursorListResponse, type ApiDeleteResponse, type ApiError, type ApiListResponse, type ApiResponse, type ApiResponseMeta, type ErrorResponse, HttpStatus, cloudEventBroker, cloudLocations, cloudStorage, cloudWebSocket, eventBrokerHandler, getCloudProvider, httpHandler, scheduleHandler, useCloudProvider, websocketHandler };
|