@rh-support/api
Advanced tools
Comparing version 0.0.58 to 0.0.59
@@ -32,6 +32,11 @@ export interface INotifiedUser { | ||
solutionUrl?: string; | ||
pinnedAt?: number; | ||
pinnedBy?: string; | ||
linked?: boolean; | ||
} | ||
export interface ICasePayload { | ||
alternateId: string; | ||
product: string; | ||
version: string; | ||
openshiftClusterID: string; | ||
summary: string; | ||
@@ -63,2 +68,8 @@ description: string; | ||
owner: string; | ||
closed: boolean; | ||
escalated: boolean; | ||
isStrategicAccount: boolean; | ||
bugzillas: ICaseBugzillas; | ||
contactName: string; | ||
actionPlan: string; | ||
} | ||
@@ -68,2 +79,9 @@ export interface ICaseDetailStrata { | ||
created_date: Date; | ||
time_frames_and_urgency: string; | ||
periodicity_of_issue: string; | ||
environment: string; | ||
issue: string; | ||
folder_number: string; | ||
hostname: string; | ||
contact_info24_x7: string; | ||
last_modified_by: string; | ||
@@ -96,3 +114,3 @@ last_modified_date: Date | null; | ||
fts: boolean; | ||
bugzillas: ICaseTags; | ||
bugzillas: ICaseBugzillas; | ||
sbr_groups: ICaseSbrgroups; | ||
@@ -103,2 +121,5 @@ language: string; | ||
is_strategic_account: boolean; | ||
recommendations?: { | ||
recommendation: IStrataCaseRecommendation[]; | ||
}; | ||
cep: boolean; | ||
@@ -108,3 +129,38 @@ case_number: string; | ||
alternate_id: string; | ||
action_plan: string; | ||
} | ||
export interface IStrataCaseRecommendation { | ||
linked: boolean; | ||
algorithm_score: number; | ||
analysis_algorithm: string; | ||
analysis_algorithm_version: string; | ||
analysis_category: string; | ||
analysis_service: string; | ||
analysis_service_version: string; | ||
client: string; | ||
client_version: string; | ||
display: boolean; | ||
first_suggested_date: number; | ||
last_suggested_date: number; | ||
lucene_score: number; | ||
note: string; | ||
origin: string; | ||
pinned_at: number; | ||
pinned_by: string; | ||
resource: string; | ||
resource_id: string; | ||
resource_type: string; | ||
resource_uri: string; | ||
resource_view_uri: string; | ||
scoring_algorithm_version: number; | ||
solution_kcs_state: string; | ||
solution_title: string; | ||
solution_abstract: string; | ||
solution_url: string; | ||
suggested_count: number; | ||
suggestion_relevance_score: number; | ||
title: string; | ||
solution_case_count: number; | ||
abstract: string; | ||
} | ||
export interface ICaseSbrgroups { | ||
@@ -139,2 +195,10 @@ sbr_group: string[]; | ||
} | ||
export interface ICaseBugzilla { | ||
bugzilla_number: string; | ||
resource_view_uri: string; | ||
summary: string; | ||
} | ||
export interface ICaseBugzillas { | ||
bugzilla: ICaseBugzilla[]; | ||
} | ||
export interface ICaseTags { | ||
@@ -160,3 +224,4 @@ } | ||
export declare const createCase: (casePayload: Partial<ICasePayload>) => Promise<string>; | ||
export declare const addNotifiedUser: (notifiedUser: INotifiedUsers, caseNumber: string) => Promise<never>; | ||
export declare const addNotifiedUser: (notifiedUser: INotifiedUsers, caseNumber: string) => Promise<unknown>; | ||
export declare const removeNotifiedUser: (ssoUserName: string, caseNumber: string) => Promise<unknown>; | ||
export declare const getCase: (caseNumber: string) => Promise<ICaseDetailStrata>; | ||
@@ -163,0 +228,0 @@ export declare const getCaseWithFields: (caseNumber: string, fields: string[]) => Promise<ICaseDetailStrata>; |
@@ -10,3 +10,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
}; | ||
import { addQueryParamsToUri, getUri, postUri, putUri } from '../utils/fetch'; | ||
import { addQueryParamsToUri, getUri, postUri, putUri, deleteUri } from '../utils/fetch'; | ||
import Env from '../utils/env'; | ||
@@ -25,12 +25,11 @@ export const createCase = (casePayload) => __awaiter(void 0, void 0, void 0, function* () { | ||
}); | ||
export const addNotifiedUser = (notifiedUser, caseNumber) => __awaiter(void 0, void 0, void 0, function* () { | ||
try { | ||
const uri = Env.apiHostName.clone().setPath(`${Env.securedSupport.pathPrefix}/rs/cases/${caseNumber}/notified_users`); | ||
addQueryParamsToUri(uri, Env.strataHeaders); | ||
yield postUri(uri, notifiedUser); | ||
} | ||
catch (error) { | ||
return Promise.reject(error); | ||
} | ||
}); | ||
export const addNotifiedUser = (notifiedUser, caseNumber) => { | ||
const uri = Env.apiHostName.clone().setPath(`${Env.securedSupport.pathPrefix}/rs/cases/${caseNumber}/notified_users`); | ||
addQueryParamsToUri(uri, Env.strataHeaders); | ||
return postUri(uri, notifiedUser); | ||
}; | ||
export const removeNotifiedUser = (ssoUserName, caseNumber) => { | ||
const uri = Env.apiHostName.clone().setPath(`${Env.securedSupport.pathPrefix}/rs/cases/${caseNumber}/notified_users/${encodeURIComponent(ssoUserName)}`); | ||
return deleteUri(uri); | ||
}; | ||
export const getCase = (caseNumber) => { | ||
@@ -37,0 +36,0 @@ const uri = Env.apiHostName.clone().setPath(`${Env.securedSupport.pathPrefix}/rs/cases/${caseNumber}`); |
@@ -12,1 +12,2 @@ export * from './account/account'; | ||
export * from './utils'; | ||
export * from './troubleshootingSession'; |
@@ -12,1 +12,2 @@ export * from './account/account'; | ||
export * from './utils'; | ||
export * from './troubleshootingSession'; |
@@ -13,3 +13,3 @@ import Env from '../utils/env'; | ||
'hl': true, | ||
'hl.fl': 'abstract, publishedAbstract, allTitle, publishedTitle, issue', | ||
'hl.fl': 'abstract, publishedAbstract, issue', | ||
'hl.simple.pre': '%3Cmark%3E', | ||
@@ -16,0 +16,0 @@ 'hl.simple.post': '%3C%2Fmark%3E', |
{ | ||
"name": "@rh-support/api", | ||
"version": "0.0.58", | ||
"version": "0.0.59", | ||
"description": "Contains all the backend API calls", | ||
@@ -43,8 +43,9 @@ "author": "Vikas Rathee <vrathee@redhat.com>", | ||
"dependencies": { | ||
"@rh-support/types": "^0.0.58", | ||
"@rh-support/types": "^0.0.59", | ||
"btoa-lite": "^1.0.0", | ||
"hydrajs": "git+https://gitlab.cee.redhat.com/redhataccess/hydrajs.git#2.0.18", | ||
"jsuri": "^1.3.1", | ||
"lodash": "^4.17.15" | ||
}, | ||
"gitHead": "956eaf4bf5a5979fb2ba574cf2fd74f02a9b032e" | ||
"gitHead": "f6ec38ab111b59b8dce80d06158ccb19c377f073" | ||
} |
Sorry, the diff of this file is too big to display
Git dependency
Supply chain riskContains a dependency which resolves to a remote git URL. Dependencies fetched from git URLs are not immutable and can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
175598
69
5035
5
1
+ Addedhydrajs@git+https://gitlab.cee.redhat.com/redhataccess/hydrajs.git#2.0.18
+ Added@rh-support/types@0.0.59(transitive)
- Removed@rh-support/types@0.0.58(transitive)
Updated@rh-support/types@^0.0.59