@vtex/api
Advanced tools
@@ -10,4 +10,2 @@ # Changelog | ||
## [6.39.2-beta] - 2021-02-05 | ||
## [6.39.1] - 2021-02-05 | ||
@@ -14,0 +12,0 @@ - Increase HTTP agents connection pools freeSockets and lifetime |
@@ -6,3 +6,3 @@ /// <reference types="node" /> | ||
import { InstanceOptions, RequestTracingConfig } from '../../HttpClient'; | ||
import { AppBundlePublished, AppFilesList, AppManifest } from '../../responses'; | ||
import { AppBundlePublished, AppFilesList, AppManifest, AppState } from '../../responses'; | ||
import { IOContext } from '../../service/worker/runtime/typings'; | ||
@@ -12,2 +12,3 @@ import { InfraClient } from './InfraClient'; | ||
constructor(context: IOContext, options?: InstanceOptions); | ||
getAppState: (app: string, version: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<AppState>; | ||
publishApp: (files: File[], tag?: string | undefined, { zlib }?: ZipOptions, tracingConfig?: RequestTracingConfig | undefined) => Promise<AppBundlePublished>; | ||
@@ -14,0 +15,0 @@ publishAppRc: (files: File[], tag?: string | undefined, { zlib }?: ZipOptions, tracingConfig?: RequestTracingConfig | undefined) => Promise<AppBundlePublished>; |
@@ -20,2 +20,3 @@ "use strict"; | ||
AppFiles: (app, version) => `${routes.AppVersion(app, version)}/files`, | ||
AppState: (app, version) => `${routes.AppVersion(app, version)}/state`, | ||
AppVersion: (app, version) => `${routes.App(app)}/${version}`, | ||
@@ -30,2 +31,14 @@ Publish: '/v2/registry', | ||
super('apps@0.x', { ...context, workspace: constants_1.DEFAULT_WORKSPACE }, options); | ||
this.getAppState = (app, version, tracingConfig) => { | ||
const metric = 'registry-app-state'; | ||
const inflightKey = HttpClient_1.inflightUrlWithQuery; | ||
return this.http.get(routes.AppState(app, version), { | ||
inflightKey, | ||
metric, | ||
tracing: { | ||
requestSpanNameSuffix: metric, | ||
...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing, | ||
}, | ||
}); | ||
}; | ||
this.publishApp = (files, tag, { zlib } = {}, tracingConfig) => { | ||
@@ -32,0 +45,0 @@ return this.publish(routes.Publish, files, tag, { zlib }, tracingConfig); |
@@ -59,2 +59,3 @@ import { BillingOptions } from './utils/billingOptions'; | ||
}; | ||
export declare type AppState = 'stable' | 'releaseCandidate'; | ||
export interface HouseKeeperState { | ||
@@ -61,0 +62,0 @@ infra: string[]; |
{ | ||
"name": "@vtex/api", | ||
"version": "6.39.2-beta", | ||
"version": "6.40.0-beta.2", | ||
"description": "VTEX I/O API client", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
512533
0.15%10991
0.14%