1 | import { __decorate } from "tslib";
|
2 | import { body } from "@pnp/queryable";
|
3 | import { _SPInstance, _SPCollection, spInvokableFactory, } from "../spqueryable.js";
|
4 | import { defaultPath } from "../decorators.js";
|
5 | import { spPost } from "../operations.js";
|
6 | let _Features = class _Features extends _SPCollection {
|
7 | |
8 |
|
9 |
|
10 |
|
11 |
|
12 |
|
13 | async add(featureId, force = false) {
|
14 | const data = await spPost(Features(this, "add"), body({
|
15 | featdefScope: 0,
|
16 | featureId,
|
17 | force,
|
18 | }));
|
19 | return {
|
20 | data: data,
|
21 | feature: this.getById(featureId),
|
22 | };
|
23 | }
|
24 | |
25 |
|
26 |
|
27 |
|
28 |
|
29 | getById(id) {
|
30 | return Feature(this).concat(`('${id}')`);
|
31 | }
|
32 | |
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 | remove(featureId, force = false) {
|
39 | return spPost(Features(this, "remove"), body({
|
40 | featureId,
|
41 | force,
|
42 | }));
|
43 | }
|
44 | };
|
45 | _Features = __decorate([
|
46 | defaultPath("features")
|
47 | ], _Features);
|
48 | export { _Features };
|
49 | export const Features = spInvokableFactory(_Features);
|
50 | export class _Feature extends _SPInstance {
|
51 | }
|
52 | export const Feature = spInvokableFactory(_Feature);
|
53 |
|
\ | No newline at end of file |