Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions extensions/pvaPublish/src/node/constants.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const COMPOSER_1P_APP_ID = 'ce48853e-0605-4f77-8746-d70ac63cc6bc';
const API_VERSION = 'v1';
export const API_VERSION = 'v1';

export const AUTH_CREDENTIALS = {
INT: {
Expand All @@ -23,7 +23,7 @@ export const AUTH_CREDENTIALS = {
};

export const BASE_URLS = {
INT: `https://bots.int.customercareintelligence.net/api/botmanagement/${API_VERSION}`,
PPE: `https://bots.ppe.customercareintelligence.net/api/botmanagement/${API_VERSION}`,
PROD: `https://powerva.microsoft.com/api/botmanagement/${API_VERSION}`,
INT: `https://bots.int.customercareintelligence.net/`,
PPE: `https://bots.ppe.customercareintelligence.net/`,
PROD: `https://powerva.microsoft.com/`,
};
9 changes: 5 additions & 4 deletions extensions/pvaPublish/src/node/publish.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
} from './types';
import { getAuthCredentials, getBaseUrl } from './utils';
import { logger } from './logger';
import { API_VERSION } from './constants';

// in-memory history that allows us to get the status of the most recent job
const publishHistory: PublishHistory = {};
Expand Down Expand Up @@ -84,7 +85,7 @@ export const publish = async (
const length = zipReadStream.readableLength;

// initiate the publish job
let url = `${base}/environments/${envId}/bots/${botId}/composer/publishoperations?deleteMissingDependencies=${deleteMissingDependencies}`;
let url = `${base}api/botmanagement/${API_VERSION}/environments/${envId}/bots/${botId}/composer/publishoperations?deleteMissingDependencies=${deleteMissingDependencies}`;
if (comment) {
url += `&comment=${encodeURIComponent(comment)}`;
}
Expand Down Expand Up @@ -160,7 +161,7 @@ export const getStatus = async (
const accessToken = await getAccessToken(creds);

// check the status for the publish job
const url = `${base}/environments/${envId}/bots/${botId}/composer/publishoperations/${operationId}`;
const url = `${base}api/botmanagement/${API_VERSION}/environments/${envId}/bots/${botId}/composer/publishoperations/${operationId}`;
const res = await fetch(url, {
method: 'GET',
headers: {
Expand Down Expand Up @@ -216,7 +217,7 @@ export const history = async (
const accessToken = await getAccessToken(creds);

// get the publish history for the bot
const url = `${base}/environments/${envId}/bots/${botId}/composer/publishoperations`;
const url = `${base}api/botmanagement/${API_VERSION}/environments/${envId}/bots/${botId}/composer/publishoperations`;
const res = await fetch(url, {
method: 'GET',
headers: getAuthHeaders(accessToken, tenantId),
Expand Down Expand Up @@ -250,7 +251,7 @@ export const pull = async (
const accessToken = await getAccessToken(creds);

// fetch zip containing bot content
const url = `${base}/environments/${envId}/bots/${botId}/composer/content`;
const url = `${base}api/botmanagement/${API_VERSION}/environments/${envId}/bots/${botId}/composer/content`;
const options: RequestInit = {
method: 'GET',
headers: getAuthHeaders(accessToken, tenantId),
Expand Down