@boostercloud/framework-provider-azure 0.27.1 → 0.27.2
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/constants.d.ts +9 -9
- package/dist/helpers/query-helper.d.ts +13 -3
- package/dist/index.d.ts +4 -4
- package/dist/library/api-adapter.d.ts +8 -8
- package/dist/library/events-adapter.d.ts +26 -8
- package/dist/library/events-searcher-adapter.d.ts +8 -3
- package/dist/library/events-searcher-builder.d.ts +16 -9
- package/dist/library/graphql-adapter.d.ts +6 -3
- package/dist/library/partition-keys.d.ts +7 -3
- package/dist/library/read-model-adapter.d.ts +23 -5
- package/dist/library/scheduled-adapter.d.ts +9 -6
- package/dist/library/searcher-adapter.d.ts +13 -3
- package/package.json +3 -3
package/dist/constants.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export declare const eventsStoreAttributes: {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
readonly partitionKey: 'entityTypeName_entityID_kind'
|
|
3
|
+
readonly sortKey: 'createdAt'
|
|
4
|
+
}
|
|
5
5
|
export declare const environmentVarNames: {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
}
|
|
10
|
-
export declare const AZURE_CONFLICT_ERROR_CODE = 409
|
|
11
|
-
export declare const AZURE_PRECONDITION_FAILED_ERROR = 412
|
|
6
|
+
readonly restAPIURL: 'BOOSTER_REST_API_URL'
|
|
7
|
+
readonly websocketAPIURL: 'BOOSTER_WEBSOCKET_API_URL'
|
|
8
|
+
readonly cosmosDbConnectionString: 'COSMOSDB_CONNECTION_STRING'
|
|
9
|
+
}
|
|
10
|
+
export declare const AZURE_CONFLICT_ERROR_CODE = 409
|
|
11
|
+
export declare const AZURE_PRECONDITION_FAILED_ERROR = 412
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import { CosmosClient } from '@azure/cosmos'
|
|
2
|
-
import { BoosterConfig, FilterFor, Logger, ReadModelListResult, SortFor } from '@boostercloud/framework-types'
|
|
3
|
-
export declare function search(
|
|
1
|
+
import { CosmosClient } from '@azure/cosmos'
|
|
2
|
+
import { BoosterConfig, FilterFor, Logger, ReadModelListResult, SortFor } from '@boostercloud/framework-types'
|
|
3
|
+
export declare function search(
|
|
4
|
+
cosmosDb: CosmosClient,
|
|
5
|
+
config: BoosterConfig,
|
|
6
|
+
logger: Logger,
|
|
7
|
+
containerName: string,
|
|
8
|
+
filters: FilterFor<unknown>,
|
|
9
|
+
limit?: number | undefined,
|
|
10
|
+
afterCursor?: Record<string, string> | undefined,
|
|
11
|
+
paginatedVersion?: boolean,
|
|
12
|
+
order?: SortFor<unknown>
|
|
13
|
+
): Promise<Array<any> | ReadModelListResult<any>>
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { HasInfrastructure, ProviderLibrary, RocketDescriptor } from '@boostercloud/framework-types'
|
|
2
|
-
export declare function loadInfrastructurePackage(packageName: string): HasInfrastructure
|
|
3
|
-
export declare const Provider: (rockets?: RocketDescriptor[] | undefined) => ProviderLibrary
|
|
4
|
-
export * from './constants'
|
|
1
|
+
import { HasInfrastructure, ProviderLibrary, RocketDescriptor } from '@boostercloud/framework-types'
|
|
2
|
+
export declare function loadInfrastructurePackage(packageName: string): HasInfrastructure
|
|
3
|
+
export declare const Provider: (rockets?: RocketDescriptor[] | undefined) => ProviderLibrary
|
|
4
|
+
export * from './constants'
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Cookie } from '@azure/functions'
|
|
1
|
+
import { Cookie } from '@azure/functions'
|
|
2
2
|
/**
|
|
3
3
|
* See https://docs.microsoft.com/es-es/azure/azure-functions/functions-reference-node#response-object
|
|
4
4
|
*/
|
|
5
5
|
export interface ContextResponse {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
body: string
|
|
7
|
+
headers: object
|
|
8
|
+
isRaw?: boolean
|
|
9
|
+
status: number
|
|
10
|
+
cookies?: Cookie[]
|
|
11
11
|
}
|
|
12
|
-
export declare function requestSucceeded(body?: any): Promise<ContextResponse
|
|
13
|
-
export declare function requestFailed(error: Error): Promise<ContextResponse
|
|
12
|
+
export declare function requestSucceeded(body?: any): Promise<ContextResponse>
|
|
13
|
+
export declare function requestFailed(error: Error): Promise<ContextResponse>
|
|
@@ -1,8 +1,26 @@
|
|
|
1
|
-
import { EventEnvelope } from '@boostercloud/framework-types'
|
|
2
|
-
import { CosmosClient } from '@azure/cosmos'
|
|
3
|
-
import { BoosterConfig, Logger, UUID } from '@boostercloud/framework-types'
|
|
4
|
-
import { Context } from '@azure/functions'
|
|
5
|
-
export declare function rawEventsToEnvelopes(context: Context): Array<EventEnvelope
|
|
6
|
-
export declare function readEntityEventsSince(
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { EventEnvelope } from '@boostercloud/framework-types'
|
|
2
|
+
import { CosmosClient } from '@azure/cosmos'
|
|
3
|
+
import { BoosterConfig, Logger, UUID } from '@boostercloud/framework-types'
|
|
4
|
+
import { Context } from '@azure/functions'
|
|
5
|
+
export declare function rawEventsToEnvelopes(context: Context): Array<EventEnvelope>
|
|
6
|
+
export declare function readEntityEventsSince(
|
|
7
|
+
cosmosDb: CosmosClient,
|
|
8
|
+
config: BoosterConfig,
|
|
9
|
+
logger: Logger,
|
|
10
|
+
entityTypeName: string,
|
|
11
|
+
entityID: UUID,
|
|
12
|
+
since?: string
|
|
13
|
+
): Promise<Array<EventEnvelope>>
|
|
14
|
+
export declare function readEntityLatestSnapshot(
|
|
15
|
+
cosmosDb: CosmosClient,
|
|
16
|
+
config: BoosterConfig,
|
|
17
|
+
logger: Logger,
|
|
18
|
+
entityTypeName: string,
|
|
19
|
+
entityID: UUID
|
|
20
|
+
): Promise<EventEnvelope | null>
|
|
21
|
+
export declare function storeEvents(
|
|
22
|
+
cosmosDb: CosmosClient,
|
|
23
|
+
eventEnvelopes: Array<EventEnvelope>,
|
|
24
|
+
config: BoosterConfig,
|
|
25
|
+
logger: Logger
|
|
26
|
+
): Promise<void>
|
|
@@ -1,3 +1,8 @@
|
|
|
1
|
-
import { BoosterConfig, EventSearchParameters, EventSearchResponse, Logger } from '@boostercloud/framework-types'
|
|
2
|
-
import { CosmosClient } from '@azure/cosmos'
|
|
3
|
-
export declare function searchEvents(
|
|
1
|
+
import { BoosterConfig, EventSearchParameters, EventSearchResponse, Logger } from '@boostercloud/framework-types'
|
|
2
|
+
import { CosmosClient } from '@azure/cosmos'
|
|
3
|
+
export declare function searchEvents(
|
|
4
|
+
cosmosDb: CosmosClient,
|
|
5
|
+
config: BoosterConfig,
|
|
6
|
+
logger: Logger,
|
|
7
|
+
parameters: EventSearchParameters
|
|
8
|
+
): Promise<Array<EventSearchResponse>>
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
EventParametersFilterByEntity,
|
|
3
|
+
EventParametersFilterByType,
|
|
4
|
+
EventSearchResponse,
|
|
5
|
+
FilterFor,
|
|
6
|
+
} from '@boostercloud/framework-types'
|
|
2
7
|
interface QueryFields {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
8
|
+
createdAt: string
|
|
9
|
+
entityTypeName_entityID_kind: string
|
|
10
|
+
entityTypeName: string
|
|
11
|
+
typeName: string
|
|
7
12
|
}
|
|
8
|
-
export declare function buildFiltersForByTime(fromValue?: string, toValue?: string): FilterFor<QueryFields
|
|
9
|
-
export declare function buildFiltersForByFilters(
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
export declare function buildFiltersForByTime(fromValue?: string, toValue?: string): FilterFor<QueryFields>
|
|
14
|
+
export declare function buildFiltersForByFilters(
|
|
15
|
+
parameters: EventParametersFilterByEntity | EventParametersFilterByType
|
|
16
|
+
): FilterFor<QueryFields>
|
|
17
|
+
export declare function resultToEventSearchResponse(result: any[]): Array<EventSearchResponse>
|
|
18
|
+
export {}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
-
import { GraphQLRequestEnvelope, Logger, GraphQLRequestEnvelopeError } from '@boostercloud/framework-types'
|
|
2
|
-
import { Context } from '@azure/functions'
|
|
3
|
-
export declare function rawGraphQLRequestToEnvelope(
|
|
1
|
+
import { GraphQLRequestEnvelope, Logger, GraphQLRequestEnvelopeError } from '@boostercloud/framework-types'
|
|
2
|
+
import { Context } from '@azure/functions'
|
|
3
|
+
export declare function rawGraphQLRequestToEnvelope(
|
|
4
|
+
context: Context,
|
|
5
|
+
logger: Logger
|
|
6
|
+
): Promise<GraphQLRequestEnvelope | GraphQLRequestEnvelopeError>
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
-
import { EventEnvelope, UUID } from '@boostercloud/framework-types'
|
|
2
|
-
export declare function partitionKeyForEvent(
|
|
3
|
-
|
|
1
|
+
import { EventEnvelope, UUID } from '@boostercloud/framework-types'
|
|
2
|
+
export declare function partitionKeyForEvent(
|
|
3
|
+
entityTypeName: string,
|
|
4
|
+
entityID: UUID,
|
|
5
|
+
kind?: EventEnvelope['kind']
|
|
6
|
+
): string
|
|
7
|
+
export declare function partitionKeyForIndexByEntity(entityTypeName: string, kind: EventEnvelope['kind']): string
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
import { CosmosClient } from '@azure/cosmos'
|
|
2
|
-
import { BoosterConfig, Logger, ReadModelInterface, ReadOnlyNonEmptyArray, UUID } from '@boostercloud/framework-types'
|
|
3
|
-
export declare function fetchReadModel(
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { CosmosClient } from '@azure/cosmos'
|
|
2
|
+
import { BoosterConfig, Logger, ReadModelInterface, ReadOnlyNonEmptyArray, UUID } from '@boostercloud/framework-types'
|
|
3
|
+
export declare function fetchReadModel(
|
|
4
|
+
db: CosmosClient,
|
|
5
|
+
config: BoosterConfig,
|
|
6
|
+
logger: Logger,
|
|
7
|
+
readModelName: string,
|
|
8
|
+
readModelID: UUID
|
|
9
|
+
): Promise<ReadOnlyNonEmptyArray<ReadModelInterface>>
|
|
10
|
+
export declare function storeReadModel(
|
|
11
|
+
db: CosmosClient,
|
|
12
|
+
config: BoosterConfig,
|
|
13
|
+
logger: Logger,
|
|
14
|
+
readModelName: string,
|
|
15
|
+
readModel: ReadModelInterface
|
|
16
|
+
): Promise<void>
|
|
17
|
+
export declare function deleteReadModel(
|
|
18
|
+
db: CosmosClient,
|
|
19
|
+
config: BoosterConfig,
|
|
20
|
+
logger: Logger,
|
|
21
|
+
readModelName: string,
|
|
22
|
+
readModel: ReadModelInterface
|
|
23
|
+
): Promise<void>
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
import { Logger, ScheduledCommandEnvelope } from '@boostercloud/framework-types'
|
|
1
|
+
import { Logger, ScheduledCommandEnvelope } from '@boostercloud/framework-types'
|
|
2
2
|
interface AzureScheduledCommandEnvelope {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
bindings: {
|
|
4
|
+
[name: string]: unknown
|
|
5
|
+
}
|
|
6
6
|
}
|
|
7
|
-
export declare function rawScheduledInputToEnvelope(
|
|
8
|
-
|
|
7
|
+
export declare function rawScheduledInputToEnvelope(
|
|
8
|
+
input: Partial<AzureScheduledCommandEnvelope>,
|
|
9
|
+
logger: Logger
|
|
10
|
+
): Promise<ScheduledCommandEnvelope>
|
|
11
|
+
export {}
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
import { CosmosClient } from '@azure/cosmos'
|
|
2
|
-
import { BoosterConfig, FilterFor, Logger, ReadModelListResult, SortFor } from '@boostercloud/framework-types'
|
|
3
|
-
export declare function searchReadModel(
|
|
1
|
+
import { CosmosClient } from '@azure/cosmos'
|
|
2
|
+
import { BoosterConfig, FilterFor, Logger, ReadModelListResult, SortFor } from '@boostercloud/framework-types'
|
|
3
|
+
export declare function searchReadModel(
|
|
4
|
+
cosmosDb: CosmosClient,
|
|
5
|
+
config: BoosterConfig,
|
|
6
|
+
logger: Logger,
|
|
7
|
+
readModelName: string,
|
|
8
|
+
filters: FilterFor<unknown>,
|
|
9
|
+
sortBy?: SortFor<unknown>,
|
|
10
|
+
limit?: number,
|
|
11
|
+
afterCursor?: Record<string, string> | undefined,
|
|
12
|
+
paginatedVersion?: boolean
|
|
13
|
+
): Promise<Array<any> | ReadModelListResult<any>>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@boostercloud/framework-provider-azure",
|
|
3
|
-
"version": "0.27.
|
|
3
|
+
"version": "0.27.2",
|
|
4
4
|
"description": "Handle Booster's integration with Azure",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework-provider-azure"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@azure/cosmos": "3.7.3",
|
|
24
24
|
"@azure/functions": "^1.2.2",
|
|
25
|
-
"@boostercloud/framework-types": "^0.27.
|
|
25
|
+
"@boostercloud/framework-types": "^0.27.2",
|
|
26
26
|
"chai": "4.2.0",
|
|
27
27
|
"chai-as-promised": "7.1.1",
|
|
28
28
|
"mocha": "8.4.0",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"bugs": {
|
|
42
42
|
"url": "https://github.com/boostercloud/booster/issues"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "4bbee95853800ef8eb134fb284aefe6aa695ac54"
|
|
45
45
|
}
|