How to use the @pnp/sp-clientsvc.objectPath function in @pnp/sp-clientsvc

To help you get started, we’ve selected a few @pnp/sp-clientsvc examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pnp / pnpjs / sp-taxonomy / src / termstores.ts View on Github external
public getTerms(info: ILabelMatchInfo): ITerms {

        const objectPaths = this._objectPaths.copy();

        // this will be the parent of the GetTerms call, but we need to create the input param first
        const parentIndex = objectPaths.lastIndex;

        // this is our input object
        const input = objConstructor("{61a1d689-2744-4ea3-a88b-c95bee9803aa}",
            // actions
            objectPath(),
            ...objectProperties(info),
        );

        // add the input object path
        const inputIndex = objectPaths.add(input);

        // this sets up the GetTerms call
        const params = MethodParams.build().objectPath(inputIndex);

        // call the method
        const methodIndex = objectPaths.add(method("GetTerms", params,
            // actions
            objectPath()));

        // setup the parent relationship even though they are seperated in the collection
        objectPaths.addChildRelationship(parentIndex, methodIndex);
github pnp / pnpjs / packages / sp-taxonomy / src / termstores.ts View on Github external
public getChanges(info: ChangeInformation): Promise {

        const objectPaths = this._objectPaths.copy();
        const methodParent = objectPaths.lastIndex;

        const inputIndex = objectPaths.add(objConstructor("{1f849fb0-4fcb-4a54-9b01-9152b9e482d3}",
            // actions
            objectPath(),
            ...objectProperties(info),
        ));

        const params = MethodParams.build().objectPath(inputIndex);

        const methodIndex = objectPaths.add(method("GetChanges", params,
            // actions
            objectPath(),
            opQuery([], this.getSelects()),
        ));

        objectPaths.addChildRelationship(methodParent, methodIndex);

        return this.send(objectPaths);
    }
}
github pnp / pnpjs / sp-taxonomy / src / termstores.ts View on Github external
constructor(parent: ClientSvcQueryable | string = "") {
        super(parent);

        this._objectPaths.add(property("TermStores",
            // actions
            objectPath()));
    }
github pnp / pnpjs / packages / sp-taxonomy / src / termstores.ts View on Github external
constructor(parent: ClientSvcQueryable | string = "") {
        super(parent);

        this._objectPaths.add(property("TermStores",
            // actions
            objectPath()));
    }
github pnp / pnpjs / sp-taxonomy / src / termstores.ts View on Github external
const input = objConstructor("{61a1d689-2744-4ea3-a88b-c95bee9803aa}",
            // actions
            objectPath(),
            ...objectProperties(info),
        );

        // add the input object path
        const inputIndex = objectPaths.add(input);

        // this sets up the GetTerms call
        const params = MethodParams.build().objectPath(inputIndex);

        // call the method
        const methodIndex = objectPaths.add(method("GetTerms", params,
            // actions
            objectPath()));

        // setup the parent relationship even though they are seperated in the collection
        objectPaths.addChildRelationship(parentIndex, methodIndex);

        return new Terms(this, objectPaths);
    }
github pnp / pnpjs / sp-taxonomy / src / termstores.ts View on Github external
public getChanges(info: ChangeInformation): Promise {

        const objectPaths = this._objectPaths.copy();
        const methodParent = objectPaths.lastIndex;

        const inputIndex = objectPaths.add(objConstructor("{1f849fb0-4fcb-4a54-9b01-9152b9e482d3}",
            // actions
            objectPath(),
            ...objectProperties(info),
        ));

        const params = MethodParams.build().objectPath(inputIndex);

        const methodIndex = objectPaths.add(method("GetChanges", params,
            // actions
            objectPath(),
            opQuery([], this.getSelects()),
        ));

        objectPaths.addChildRelationship(methodParent, methodIndex);

        return this.send(objectPaths);
    }
}
github pnp / pnpjs / packages / sp-taxonomy / src / termstores.ts View on Github external
public getTerms(info: ILabelMatchInfo): ITerms {

        const objectPaths = this._objectPaths.copy();

        // this will be the parent of the GetTerms call, but we need to create the input param first
        const parentIndex = objectPaths.lastIndex;

        // this is our input object
        const input = objConstructor("{61a1d689-2744-4ea3-a88b-c95bee9803aa}",
            // actions
            objectPath(),
            ...objectProperties(info),
        );

        // add the input object path
        const inputIndex = objectPaths.add(input);

        // this sets up the GetTerms call
        const params = MethodParams.build().objectPath(inputIndex);

        // call the method
        const methodIndex = objectPaths.add(method("GetTerms", params,
            // actions
            objectPath()));

        // setup the parent relationship even though they are seperated in the collection
        objectPaths.addChildRelationship(parentIndex, methodIndex);
github pnp / pnpjs / packages / sp-taxonomy / src / termstores.ts View on Github external
public getSiteCollectionGroup(createIfMissing = false): ITermGroup {

        const objectPaths = this._objectPaths.copy();
        const methodParent = objectPaths.lastIndex;
        const siteIndex = objectPaths.siteIndex;

        const params = MethodParams.build().objectPath(siteIndex).boolean(createIfMissing);

        const methodIndex = objectPaths.add(method("GetSiteCollectionGroup", params,
            // actions
            objectPath(),
        ));

        // the parent of this method call is this instance, not the current/site
        objectPaths.addChildRelationship(methodParent, methodIndex);

        return new TermGroup(this, objectPaths);
    }
github pnp / pnpjs / packages / sp-taxonomy / src / termstores.ts View on Github external
const input = objConstructor("{61a1d689-2744-4ea3-a88b-c95bee9803aa}",
            // actions
            objectPath(),
            ...objectProperties(info),
        );

        // add the input object path
        const inputIndex = objectPaths.add(input);

        // this sets up the GetTerms call
        const params = MethodParams.build().objectPath(inputIndex);

        // call the method
        const methodIndex = objectPaths.add(method("GetTerms", params,
            // actions
            objectPath()));

        // setup the parent relationship even though they are seperated in the collection
        objectPaths.addChildRelationship(parentIndex, methodIndex);

        return new Terms(this, objectPaths);
    }
github pnp / pnpjs / sp-taxonomy / src / termstores.ts View on Github external
public getChanges(info: ChangeInformation): Promise {

        const objectPaths = this._objectPaths.copy();
        const methodParent = objectPaths.lastIndex;

        const inputIndex = objectPaths.add(objConstructor("{1f849fb0-4fcb-4a54-9b01-9152b9e482d3}",
            // actions
            objectPath(),
            ...objectProperties(info),
        ));

        const params = MethodParams.build().objectPath(inputIndex);

        const methodIndex = objectPaths.add(method("GetChanges", params,
            // actions
            objectPath(),
            opQuery([], this.getSelects()),
        ));

        objectPaths.addChildRelationship(methodParent, methodIndex);

        return this.send(objectPaths);
    }
}

@pnp/sp-clientsvc

pnp - Provides core functionality to interact with the legacy client.svc SharePoint endpoint

MIT
Latest version published 5 years ago

Package Health Score

70 / 100
Full package analysis

Similar packages