/** * This file is auto generated from JavaDoc. Do not modify it manually. */ import type { String } from "../../types/java/lang/String"; import type { RestAppInvoker } from "../../types/senselogic/sitevision/api/script/app/RestAppInvoker"; import type { Node } from "../../types/javax/jcr/Node"; /** * Creates RestAppInvoker instances. * *
* Below is an example of how to get a {@link RestAppInvoker} instance using the path (of the headless custom module). *
var restAppInvokerFactory = require('RestAppInvokerFactory'),
* restAppInvoker = restAppInvokerFactory.fromPath('/rest-api/my-rest-app');
*
* if (restAppInvoker) {
* // Use the RESTApp invoker...
* }
*
*
* Below is an example of how to get a {@link RestAppInvoker} instance using a Node. Note that the Node must be of type
* sv:restApp, sv:headlessCustomModule or sv:marketplaceHeadlessCustomModule.
*
var restAppInvokerFactory = require('RestAppInvokerFactory'),
* restAppInvoker = restAppInvokerFactory.fromNode(aNode);
*
* if (restAppInvoker) {
* // Use the RESTApp invoker...
* }
*
*
* Below is an example of how to get a {@link RestAppInvoker} instance using a Node identifier. Note that the identifier must be for a Node of type
* sv:restApp, sv:headlessCustomModule or sv:marketplaceHeadlessCustomModule
* (i.e. an identifier prefixed "361.", "188." or "211.").
*
var restAppInvokerFactory = require('RestAppInvokerFactory'),
* restAppInvoker = restAppInvokerFactory.fromIdentifier(aIdentifier);
*
* if (restAppInvoker) {
* // Use the RESTApp invoker...
* }
*
* * See {@link RestAppInvoker} for more code examples. *
* @param