Manage shared ARNavi VPS contours and application keys from infrastructure
This commit is contained in:
@@ -63,6 +63,12 @@ export function createDeviceCoreClient({ baseUrl, token, fetchImpl = fetch } = {
|
||||
|
||||
return {
|
||||
configured: true,
|
||||
async b2Infrastructure(actor, input, requestId) {
|
||||
return request("/internal/v1/b2/infrastructure", actor, {
|
||||
method: "POST", headers: { "Content-Type": "application/json", "Idempotency-Key": requestId },
|
||||
body: JSON.stringify(input),
|
||||
}).then((body) => body.result);
|
||||
},
|
||||
async listProjects(actor) {
|
||||
return request("/internal/v1/query/projects", actor)
|
||||
.then((body) => body.projects);
|
||||
@@ -1297,7 +1303,7 @@ function normalizeBaseUrl(value) {
|
||||
}
|
||||
|
||||
function safeCoreError(value) {
|
||||
return typeof value === "string" && /^device_[a-z0-9._:-]{2,120}$/.test(value)
|
||||
return typeof value === "string" && /^(?:device|b2)_[a-z0-9._:-]{2,120}$/.test(value)
|
||||
? value
|
||||
: "device_core_unavailable";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user