SHARE
TWEET

Untitled

a guest Sep 18th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. declare module 'service-metadata' {
  2.   const aaaErrorLogs: any; // TODO: check type
  3.  
  4.   const b2bProxy: {
  5.     b2bMessageId: string,
  6.     b2bPartnerFrom: string,
  7.     b2bPartnerTo: string,
  8.     integrationId: string,
  9.     isMdn: string,
  10.     messageDecrypted: string,
  11.     messageEncryptRequired: string,
  12.     messageSignRequired: string,
  13.     messageSignatureVerified: string,
  14.     passthruEnabled: string,
  15.   };
  16.  
  17.   const cache: { dynamicPolicies: any; }; // TODO: check type
  18.  
  19.   const clientServiceAddress: string;
  20.   const conformance: { policyname: string };
  21.   const connection: { note: string };
  22.   const currentCallDepth: string;
  23.   const defaultStylesheet: string;
  24.   const domainName: string;
  25.   const errorCode: string;
  26.   const errorHeaders: string;
  27.   const errorIgnore: string;
  28.   const errorMessage: string;
  29.   const errorSubcode: string;
  30.   const formattedErrorMessage: string;
  31.  
  32.   const gatewayscript: {
  33.     debugEnabled: string,
  34.     enableEval: string,
  35.   };
  36.  
  37.   const globalTransactionId: string;
  38.   const headerManifest: any; // TODO: check type
  39.   const http: { websocketUpgrade: string };
  40.   const inputSize: string;
  41.   const lb: {
  42.     group: string,
  43.     member: string,
  44.   };
  45.   const localServiceAddress: string;
  46.   const maxActionDepth: string;
  47.   const maxCallDepth: string;
  48.   const memoryUsed: string;
  49.  
  50.   const mpgw: {
  51.     backendConfig: any, // TODO: check type
  52.     backendTimeout: string,
  53.     requestSize: string,
  54.     responseSize: string,
  55.     skipBackside: string,
  56.     transactionTimeoutMsCount: string,
  57.     transactionTimeoutMsThreshold: string,
  58.   };
  59.  
  60.   const multistep: {
  61.     contexts: any, // TODO: check type
  62.     inputContextName: string,
  63.     loopCount: string,
  64.     loopIterator: string,
  65.     outputContextName: string,
  66.     txWarn: string,
  67.   };
  68.  
  69.   const originalContentType: string;
  70.   const originalResponseContentType: string;
  71.   const persistentConnectionCounter: string;
  72.   const preserveMimeEncapsulation: string;
  73.   const processorName: string;
  74.   const processorType: string;
  75.   const protocol: string;
  76.   const protocolMethod: string;
  77.  
  78.   const qos: { priority: string };
  79.  
  80.   const rewriteErrors: string;
  81.   const routingUrl: string;
  82.   const routingUrlDelayContentTypeDetermination: string;
  83.   const routingUrlSslprofile: string;
  84.   const soapFaultResponse: string;
  85.   const strictErrorMode: string;
  86.  
  87.   const system: { ident: any }; // TODO: check type
  88.  
  89.   const timeElapsed: string;
  90.   const timeForwarded: string;
  91.   const timeResponseComplete: string;
  92.   const timeStarted: string;
  93.  
  94.   const transactionAuditTrail: any; // TODO: check type
  95.  
  96.   const transactionClient: string;
  97.   const transactionId: string;
  98.   const transactionPolicyName: string;
  99.   const transactionRuleName: string;
  100.   const transactionRuleType: string;
  101.   const URI: string;
  102.   const URLIn: string;
  103.   const URLOut: string;
  104.  
  105.   const wsa: {
  106.     genpattern: string,
  107.     timeout: string,
  108.   };
  109.  
  110.   const wsm: {
  111.     httpParsedUrlReplacement: any, // TODO: check type
  112.     userData: any, // TODO: check type
  113.   };
  114.  
  115.   const wspolicy: {
  116.     endpoint: { configname: string },
  117.     message: { configname: string },
  118.     operation: { configname: string },
  119.     service: { configname: string },
  120.   };
  121.  
  122.   const xmlmgrName: string;
  123.  
  124.   function getVar(name: string): string;
  125.   function list(): { [key: string]: string };
  126.   function setVar(name: string, value: any): void;
  127. };
  128.  
  129.  
  130. declare module 'headers-metadata' {
  131.   interface IHeaders {
  132.     headers: { [key: string]: string },
  133.  
  134.     get(): { [key: string]: string },
  135.     get(name: string): string | undefined,
  136.     get(opts: { type: 'mq' }, name: string): { [key: string]: string } | undefined,
  137.  
  138.     set(name: string, value: any): void,
  139.     set(opts: { type: 'mq' }, name: string, value: any): void,
  140.  
  141.     remove(name: string): void,
  142.  
  143.     types(): ['mq'],
  144.   }
  145.  
  146.   const current: IHeaders;
  147.   const original: IHeaders;
  148.   const response: IHeaders;
  149. };
  150.  
  151.  
  152. declare const session: Session;
  153.  
  154.  
  155. type CallbackType<T> = (error: Error | undefined | null, result: T | undefined) => void;
  156.  
  157.  
  158. interface NodeListDP {
  159.   length: number,
  160.  
  161.   item(index: number): NodeDP | NamedNodeMapDP | null,
  162. }
  163.  
  164.  
  165. interface NodeDP {
  166.   nodeName: string,
  167.   localName: string,
  168.   textContent: string,
  169.   namespaceURI: string,
  170.   prefix: string | null,
  171.   ownerDocument: NodeDP,
  172.   childNodes: NodeListDP,
  173.   lastChild: NodeDP | null,
  174.   parentNode: NodeDP | null,
  175.   firstChild: NodeDP | null,
  176.   nextSibling: NodeDP | null,
  177.   previousSibling: NodeDP | null,
  178.   attributes: NamedNodeMapDP | null,
  179.  
  180.   nodeType: string, // TODO: check constants https://www.ibm.com/support/knowledgecenter/SS9H2Y_7.5.0/com.ibm.dp.doc/dom-apis_js.html
  181.   nodeValue: any,   // same
  182.  
  183.   hasAttributes(): boolean,
  184.   hasChildNodes(): boolean,
  185.   lookupPrefix(ns: string): string,
  186.   isSameNode(node: NodeDP): boolean,
  187.   isEqualNode(node: NodeDP): boolean,
  188.   isDefaultNameSpace(ns: string): boolean,
  189.   lookupNamespaceURI(prefix: string): string,
  190.   compareDocumentPosition(node: NodeDP): number,
  191.   // TODO: continue
  192. }
  193.  
  194.  
  195. interface NamedNodeMapDP {
  196.   length: number,
  197.  
  198.   item(index: number): NodeDP,
  199.   getNamedItem(name: string): NodeDP,
  200.   getNamedItemNS(ns: string, localName: string): NodeDP,
  201. }
  202.  
  203.  
  204. interface Context {
  205.   write(any): void,
  206.  
  207.   readAsJSON(callback: CallbackType<any>): void,
  208.   readAsXML(callback: CallbackType<NodeListDP>): void,
  209.   readAsBuffer(callback: CallbackType<Buffer>): void,
  210.   readAsBuffers(callback: CallbackType<Buffer[]>): void,
  211. }
  212.  
  213.  
  214. interface Session {
  215.   INPUT: Context,
  216.   input: Context,
  217.   output: Context,
  218.   accepting: boolean,
  219.   parameters: { [key: string]: any },
  220.  
  221.   accept(): void,
  222.  
  223.   reject(): void,
  224.   reject(reason: string): void,
  225.   reject(opts: { override: boolean }): void,
  226.   reject(opts: { override: boolean }, reason: string): void,
  227.  
  228.   createContext(name: string): Context,
  229.   name(name: string): Context | undefined,
  230. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top