Skip to content

Commit

Permalink
Merge pull request #4 from SparrowAvanade/master
Browse files Browse the repository at this point in the history
Add typings for global XMLUtilJS Server API
  • Loading branch information
bryceg authored Aug 8, 2017
2 parents 8966ad5 + b9a8f7f commit aae378c
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 0 deletions.
9 changes: 9 additions & 0 deletions server/global/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ declare var JSUtil: sn.Server.IJSUtil;
declare var JSValidator: sn.Server.IJSValidator;
declare var sn_ws: sn.Server.ISN_WS;
declare var TableUtils: sn.Server.ITableUtils;
declare var XMLUtilJS: sn.Server.IXMLUtilJS;

declare module sn {

Expand Down Expand Up @@ -636,6 +637,14 @@ declare module sn {
isSoloClass(): boolean;
}

// https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=c_XMLUtilJSAPI
export interface IXMLUtilJS {
escapeForXMLText(text: string): string;
stringToValue(str: string): string;
unescapeForXMLText(text: string): string;
valueToString(xmlValue: string): string;
}

export interface IWebServicePolicyValidator {
new (target: string, request: any);
validate(): boolean;
Expand Down
9 changes: 9 additions & 0 deletions server/scoped-fuji/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@ declare namespace sn {
GlideStringUtil: sn.Server.IGlideStringUtil;
JSON: sn.Server.IJSON;
JSUtil: sn.Server.IJSUtil;
XMLUtilJS: sn.Server.IXMLUtilJS;
}

// http://wiki.servicenow.com/index.php?title=GSLog
Expand Down Expand Up @@ -679,6 +680,14 @@ declare namespace sn {
isSoloClass(): boolean;
}

// https://developer.servicenow.com/app.do#!/api_doc?v=fuji&id=c_XMLUtilJSAPI
export interface IXMLUtilJS {
escapeForXMLText(text: string): string;
stringToValue(str: string): string;
unescapeForXMLText(text: string): string;
valueToString(xmlValue: string): string;
}

// http://wiki.servicenow.com/index.php?title=Scoped_XMLDocument2_API_Reference
export interface IXMLDocument2 {
new (): IXMLDocument2;
Expand Down
9 changes: 9 additions & 0 deletions server/scoped-geneva/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,7 @@ declare namespace sn {
GlideStringUtil: sn.Server.IGlideStringUtil;
JSON: sn.Server.IJSON;
JSUtil: sn.Server.IJSUtil;
XMLUtilJS: sn.Server.IXMLUtilJS;
}

// http://wiki.servicenow.com/index.php?title=GSLog
Expand Down Expand Up @@ -672,6 +673,14 @@ declare namespace sn {
isSoloClass(): boolean;
}

// https://developer.servicenow.com/app.do#!/api_doc?v=geneva&id=c_XMLUtilJSAPI
export interface IXMLUtilJS {
escapeForXMLText(text: string): string;
stringToValue(str: string): string;
unescapeForXMLText(text: string): string;
valueToString(xmlValue: string): string;
}

// http://wiki.servicenow.com/index.php?title=Scoped_XMLDocument2_API_Reference
export interface IXMLDocument2 {
new (): IXMLDocument2;
Expand Down
9 changes: 9 additions & 0 deletions server/scoped-helsinki/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ declare namespace sn {
AbstractAjaxProcessor: sn.Server.IGlideAjax;
GlideStringUtil: sn.Server.IGlideStringUtil;
JSUtil: sn.Server.IJSUtil;
XMLUtilJS: sn.Server.IXMLUtilJS;
}

// http://wiki.servicenow.com/index.php?title=GSLog
Expand Down Expand Up @@ -670,6 +671,14 @@ declare namespace sn {
isSoloClass(): boolean;
}

// https://developer.servicenow.com/app.do#!/api_doc?v=helsinki&id=c_XMLUtilJSAPI
export interface IXMLUtilJS {
escapeForXMLText(text: string): string;
stringToValue(str: string): string;
unescapeForXMLText(text: string): string;
valueToString(xmlValue: string): string;
}

// http://wiki.servicenow.com/index.php?title=Scoped_XMLDocument2_API_Reference
export interface IXMLDocument2 {
new (): IXMLDocument2;
Expand Down

0 comments on commit aae378c

Please sign in to comment.