jitz-sharepoint-utilities 2.0.3 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/data/context/Repository.ts +81 -0
- package/data/interfaces/IRepository.ts +1 -0
- package/lib/data/context/Repository.d.ts +1 -0
- package/lib/data/context/Repository.js +68 -0
- package/lib/data/interfaces/IRepository.d.ts +1 -0
- package/package.json +1 -1
- package/lib/data/Activities.d.ts +0 -6
- package/lib/data/Activities.js +0 -36
- package/lib/data/Attachments.d.ts +0 -6
- package/lib/data/Attachments.js +0 -30
- package/lib/data/Configurations.d.ts +0 -6
- package/lib/data/Configurations.js +0 -30
- package/lib/data/CustomStylesheet.d.ts +0 -6
- package/lib/data/CustomStylesheet.js +0 -30
- package/lib/data/EmailTemplates.d.ts +0 -6
- package/lib/data/EmailTemplates.js +0 -31
- package/lib/data/FAQs.d.ts +0 -6
- package/lib/data/FAQs.js +0 -30
- package/lib/data/HomePageTexts.d.ts +0 -6
- package/lib/data/HomePageTexts.js +0 -30
- package/lib/data/TicketCategories.d.ts +0 -6
- package/lib/data/TicketCategories.js +0 -26
- package/lib/data/TicketComments.d.ts +0 -6
- package/lib/data/TicketComments.js +0 -32
- package/lib/data/TicketPriorities.d.ts +0 -6
- package/lib/data/TicketPriorities.js +0 -31
- package/lib/data/TicketStatuses.d.ts +0 -6
- package/lib/data/TicketStatuses.js +0 -31
- package/lib/data/TicketSubcategories.d.ts +0 -6
- package/lib/data/TicketSubcategories.js +0 -26
- package/lib/data/Tickets.d.ts +0 -6
- package/lib/data/Tickets.js +0 -45
@@ -1,3 +1,4 @@
|
|
1
|
+
import UtilityService from "../../services/UtilityService";
|
1
2
|
import IJitzSPContext from "../interfaces/IJitzSPContext";
|
2
3
|
import { IListItemsMetadata, IModel } from "../interfaces/IModels";
|
3
4
|
import { IRepository } from "../interfaces/IRepository";
|
@@ -360,6 +361,86 @@ export default class Repository<T extends IModel> implements IRepository<T> {
|
|
360
361
|
});
|
361
362
|
}
|
362
363
|
|
364
|
+
public deleteItems(ids: number[]): Promise<boolean> {
|
365
|
+
// Here we will delete two different list items from two different lists in a single REST call
|
366
|
+
// Every batch will have a Batch ID/GUID
|
367
|
+
var batchGuid = UtilityService.generateGUID();
|
368
|
+
|
369
|
+
// Every delete/changeset should have a ChangeSet ID/GUID
|
370
|
+
var changeSetGUID = UtilityService.generateGUID()();
|
371
|
+
|
372
|
+
// creating the body
|
373
|
+
var batchContents = new Array();
|
374
|
+
|
375
|
+
ids.map((id) => {
|
376
|
+
// Request creation for first list item Delete
|
377
|
+
var endpoint = `${this.context.siteUrl}/_api/web/lists/getbytitle('${this.listName}')/items(${id})`;
|
378
|
+
|
379
|
+
// create the changeset
|
380
|
+
batchContents.push("--changeset_" + changeSetGUID);
|
381
|
+
batchContents.push("Content-Type: application/http");
|
382
|
+
batchContents.push("Content-Transfer-Encoding: binary");
|
383
|
+
batchContents.push("");
|
384
|
+
batchContents.push("DELETE " + endpoint + " HTTP/1.1");
|
385
|
+
batchContents.push("Content-Type: application/json;odata=verbose");
|
386
|
+
batchContents.push("Accept: application/json;odata=verbose");
|
387
|
+
batchContents.push("IF-MATCH: *");
|
388
|
+
batchContents.push("");
|
389
|
+
});
|
390
|
+
|
391
|
+
batchContents.push("--changeset_" + changeSetGUID + "--");
|
392
|
+
|
393
|
+
// batch body
|
394
|
+
var batchBody = batchContents.join("\r\n");
|
395
|
+
|
396
|
+
batchContents = new Array();
|
397
|
+
|
398
|
+
// create a batch for creating items
|
399
|
+
batchContents.push("--batch_" + batchGuid);
|
400
|
+
batchContents.push(
|
401
|
+
'Content-Type: multipart/mixed; boundary="changeset_' +
|
402
|
+
changeSetGUID +
|
403
|
+
'"'
|
404
|
+
);
|
405
|
+
batchContents.push("Content-Length: " + batchBody.length);
|
406
|
+
batchContents.push("Content-Transfer-Encoding: binary");
|
407
|
+
batchContents.push("");
|
408
|
+
batchContents.push(batchBody);
|
409
|
+
batchContents.push("");
|
410
|
+
|
411
|
+
batchContents.push("--batch_" + batchGuid + "--");
|
412
|
+
batchBody = batchContents.join("\r\n");
|
413
|
+
|
414
|
+
// create the request endpoint
|
415
|
+
var batchEndPoint = `${this.context.siteUrl}/_api/$batch`;
|
416
|
+
|
417
|
+
// // create request
|
418
|
+
// jQuery.ajax({
|
419
|
+
// url: endpoint,
|
420
|
+
// type: 'POST',
|
421
|
+
// headers: batchRequestHeader,
|
422
|
+
// data: batchBody,
|
423
|
+
// success: function (response) {
|
424
|
+
// console.log(response);
|
425
|
+
// },
|
426
|
+
// fail: function (error) {
|
427
|
+
// console.log(response);
|
428
|
+
// }
|
429
|
+
// });
|
430
|
+
|
431
|
+
return this.context.client
|
432
|
+
.post(batchEndPoint, batchBody, {
|
433
|
+
"Content-Type": 'multipart/mixed; boundary="batch_' + batchGuid + '"',
|
434
|
+
})
|
435
|
+
.then((response: any) => {
|
436
|
+
if (response.status >= 200 && response.status < 300) {
|
437
|
+
return true;
|
438
|
+
} else {
|
439
|
+
return Promise.reject(new Error(JSON.stringify(response)));
|
440
|
+
}
|
441
|
+
});
|
442
|
+
}
|
443
|
+
|
363
444
|
private getEntityType(): Promise<string> {
|
364
445
|
return new Promise<string>(
|
365
446
|
(
|
@@ -20,6 +20,7 @@ export interface IRepository<T extends IModel> {
|
|
20
20
|
createItem(item: T): Promise<T>;
|
21
21
|
updateItem(item: T): Promise<T>;
|
22
22
|
deleteItem(id: number): Promise<boolean>;
|
23
|
+
deleteItems(ids: number[]): Promise<boolean>;
|
23
24
|
getAllRecursive(
|
24
25
|
selectFields?: string,
|
25
26
|
expand?: string,
|
@@ -15,5 +15,6 @@ export default class Repository<T extends IModel> implements IRepository<T> {
|
|
15
15
|
createItem(item: T): Promise<T>;
|
16
16
|
updateItem(item: T): Promise<T>;
|
17
17
|
deleteItem(id: number): Promise<boolean>;
|
18
|
+
deleteItems(ids: number[]): Promise<boolean>;
|
18
19
|
private getEntityType;
|
19
20
|
}
|
@@ -36,6 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
36
36
|
}
|
37
37
|
};
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
39
|
+
var UtilityService_1 = require("../../services/UtilityService");
|
39
40
|
var Repository = /** @class */ (function () {
|
40
41
|
function Repository(context, listName) {
|
41
42
|
this.context = context;
|
@@ -396,6 +397,73 @@ var Repository = /** @class */ (function () {
|
|
396
397
|
}
|
397
398
|
});
|
398
399
|
};
|
400
|
+
Repository.prototype.deleteItems = function (ids) {
|
401
|
+
var _this = this;
|
402
|
+
// Here we will delete two different list items from two different lists in a single REST call
|
403
|
+
// Every batch will have a Batch ID/GUID
|
404
|
+
var batchGuid = UtilityService_1.default.generateGUID();
|
405
|
+
// Every delete/changeset should have a ChangeSet ID/GUID
|
406
|
+
var changeSetGUID = UtilityService_1.default.generateGUID()();
|
407
|
+
// creating the body
|
408
|
+
var batchContents = new Array();
|
409
|
+
ids.map(function (id) {
|
410
|
+
// Request creation for first list item Delete
|
411
|
+
var endpoint = "".concat(_this.context.siteUrl, "/_api/web/lists/getbytitle('").concat(_this.listName, "')/items(").concat(id, ")");
|
412
|
+
// create the changeset
|
413
|
+
batchContents.push("--changeset_" + changeSetGUID);
|
414
|
+
batchContents.push("Content-Type: application/http");
|
415
|
+
batchContents.push("Content-Transfer-Encoding: binary");
|
416
|
+
batchContents.push("");
|
417
|
+
batchContents.push("DELETE " + endpoint + " HTTP/1.1");
|
418
|
+
batchContents.push("Content-Type: application/json;odata=verbose");
|
419
|
+
batchContents.push("Accept: application/json;odata=verbose");
|
420
|
+
batchContents.push("IF-MATCH: *");
|
421
|
+
batchContents.push("");
|
422
|
+
});
|
423
|
+
batchContents.push("--changeset_" + changeSetGUID + "--");
|
424
|
+
// batch body
|
425
|
+
var batchBody = batchContents.join("\r\n");
|
426
|
+
batchContents = new Array();
|
427
|
+
// create a batch for creating items
|
428
|
+
batchContents.push("--batch_" + batchGuid);
|
429
|
+
batchContents.push('Content-Type: multipart/mixed; boundary="changeset_' +
|
430
|
+
changeSetGUID +
|
431
|
+
'"');
|
432
|
+
batchContents.push("Content-Length: " + batchBody.length);
|
433
|
+
batchContents.push("Content-Transfer-Encoding: binary");
|
434
|
+
batchContents.push("");
|
435
|
+
batchContents.push(batchBody);
|
436
|
+
batchContents.push("");
|
437
|
+
batchContents.push("--batch_" + batchGuid + "--");
|
438
|
+
batchBody = batchContents.join("\r\n");
|
439
|
+
// create the request endpoint
|
440
|
+
var batchEndPoint = "".concat(this.context.siteUrl, "/_api/$batch");
|
441
|
+
// // create request
|
442
|
+
// jQuery.ajax({
|
443
|
+
// url: endpoint,
|
444
|
+
// type: 'POST',
|
445
|
+
// headers: batchRequestHeader,
|
446
|
+
// data: batchBody,
|
447
|
+
// success: function (response) {
|
448
|
+
// console.log(response);
|
449
|
+
// },
|
450
|
+
// fail: function (error) {
|
451
|
+
// console.log(response);
|
452
|
+
// }
|
453
|
+
// });
|
454
|
+
return this.context.client
|
455
|
+
.post(batchEndPoint, batchBody, {
|
456
|
+
"Content-Type": 'multipart/mixed; boundary="batch_' + batchGuid + '"',
|
457
|
+
})
|
458
|
+
.then(function (response) {
|
459
|
+
if (response.status >= 200 && response.status < 300) {
|
460
|
+
return true;
|
461
|
+
}
|
462
|
+
else {
|
463
|
+
return Promise.reject(new Error(JSON.stringify(response)));
|
464
|
+
}
|
465
|
+
});
|
466
|
+
};
|
399
467
|
Repository.prototype.getEntityType = function () {
|
400
468
|
var _this = this;
|
401
469
|
return new Promise(function (resolve, reject) {
|
@@ -10,5 +10,6 @@ export interface IRepository<T extends IModel> {
|
|
10
10
|
createItem(item: T): Promise<T>;
|
11
11
|
updateItem(item: T): Promise<T>;
|
12
12
|
deleteItem(id: number): Promise<boolean>;
|
13
|
+
deleteItems(ids: number[]): Promise<boolean>;
|
13
14
|
getAllRecursive(selectFields?: string, expand?: string, filters?: string, orderBy?: string, top?: number, maxRecursiveCount?: number): any;
|
14
15
|
}
|
package/package.json
CHANGED
package/lib/data/Activities.d.ts
DELETED
package/lib/data/Activities.js
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var Activities = /** @class */ (function (_super) {
|
19
|
-
__extends(Activities, _super);
|
20
|
-
function Activities(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.Activities.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.Activities.fields.Story,
|
26
|
-
SpConstants_1.default.lists.Activities.fields.Ticket_Code,
|
27
|
-
SpConstants_1.default.lists.Activities.fields.ActivityType,
|
28
|
-
SpConstants_1.default.lists.commonFields.Created,
|
29
|
-
], [
|
30
|
-
SpConstants_1.default.lists.Activities.fields.TargetUser,
|
31
|
-
SpConstants_1.default.lists.commonFields.Author,
|
32
|
-
], [SpConstants_1.default.lists.Activities.fields.Ticket]) || this;
|
33
|
-
}
|
34
|
-
return Activities;
|
35
|
-
}(List_1.default));
|
36
|
-
exports.default = Activities;
|
package/lib/data/Attachments.js
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var Attachments = /** @class */ (function (_super) {
|
19
|
-
__extends(Attachments, _super);
|
20
|
-
function Attachments(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.Attachments.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.Attachments.fields.Ticket_Code,
|
26
|
-
], [], [SpConstants_1.default.lists.Attachments.fields.Ticket]) || this;
|
27
|
-
}
|
28
|
-
return Attachments;
|
29
|
-
}(List_1.default));
|
30
|
-
exports.default = Attachments;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { IConfiguration } from "../common/Models";
|
2
|
-
import List from "./context/List";
|
3
|
-
import IJitzContext from "./interfaces/IJitzContext";
|
4
|
-
export default class Configurations extends List<IConfiguration> {
|
5
|
-
constructor(context: IJitzContext, listName?: string);
|
6
|
-
}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var Configurations = /** @class */ (function (_super) {
|
19
|
-
__extends(Configurations, _super);
|
20
|
-
function Configurations(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.Configurations.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.Configurations.fields.CurrentValue,
|
26
|
-
], [], []) || this;
|
27
|
-
}
|
28
|
-
return Configurations;
|
29
|
-
}(List_1.default));
|
30
|
-
exports.default = Configurations;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { ICustomStylesheet } from "../common/Models";
|
2
|
-
import List from "./context/List";
|
3
|
-
import IJitzContext from "./interfaces/IJitzContext";
|
4
|
-
export default class CustomStylesheet extends List<ICustomStylesheet> {
|
5
|
-
constructor(context: IJitzContext, listName?: string);
|
6
|
-
}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var CustomStylesheet = /** @class */ (function (_super) {
|
19
|
-
__extends(CustomStylesheet, _super);
|
20
|
-
function CustomStylesheet(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.CustomStyleSheet.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.CustomStyleSheet.fields.MainContent,
|
26
|
-
], [], []) || this;
|
27
|
-
}
|
28
|
-
return CustomStylesheet;
|
29
|
-
}(List_1.default));
|
30
|
-
exports.default = CustomStylesheet;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { IEmailTemplate } from "../common/Models";
|
2
|
-
import List from "./context/List";
|
3
|
-
import IJitzContext from "./interfaces/IJitzContext";
|
4
|
-
export default class EmailTemplates extends List<IEmailTemplate> {
|
5
|
-
constructor(context: IJitzContext, listName?: string);
|
6
|
-
}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var EmailTemplates = /** @class */ (function (_super) {
|
19
|
-
__extends(EmailTemplates, _super);
|
20
|
-
function EmailTemplates(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.EmailTemplates.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.EmailTemplates.fields.Subject,
|
26
|
-
SpConstants_1.default.lists.EmailTemplates.fields.Body,
|
27
|
-
], [], []) || this;
|
28
|
-
}
|
29
|
-
return EmailTemplates;
|
30
|
-
}(List_1.default));
|
31
|
-
exports.default = EmailTemplates;
|
package/lib/data/FAQs.d.ts
DELETED
package/lib/data/FAQs.js
DELETED
@@ -1,30 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var FAQs = /** @class */ (function (_super) {
|
19
|
-
__extends(FAQs, _super);
|
20
|
-
function FAQs(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.FAQs.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.FAQs.fields.MainContent,
|
26
|
-
], [], []) || this;
|
27
|
-
}
|
28
|
-
return FAQs;
|
29
|
-
}(List_1.default));
|
30
|
-
exports.default = FAQs;
|
@@ -1,30 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var HomePageTexts = /** @class */ (function (_super) {
|
19
|
-
__extends(HomePageTexts, _super);
|
20
|
-
function HomePageTexts(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.HomePageTexts.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.HomePageTexts.fields.MainContent,
|
26
|
-
], [], []) || this;
|
27
|
-
}
|
28
|
-
return HomePageTexts;
|
29
|
-
}(List_1.default));
|
30
|
-
exports.default = HomePageTexts;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { ITicketCategory } from "../common/Models";
|
2
|
-
import List from "./context/List";
|
3
|
-
import IJitzContext from "./interfaces/IJitzContext";
|
4
|
-
export default class TicketCategories extends List<ITicketCategory> {
|
5
|
-
constructor(context: IJitzContext, listName?: string);
|
6
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var TicketCategories = /** @class */ (function (_super) {
|
19
|
-
__extends(TicketCategories, _super);
|
20
|
-
function TicketCategories(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.TicketCategories.title; }
|
22
|
-
return _super.call(this, context, listName, [SpConstants_1.default.lists.commonFields.Id, SpConstants_1.default.lists.commonFields.Title], [], []) || this;
|
23
|
-
}
|
24
|
-
return TicketCategories;
|
25
|
-
}(List_1.default));
|
26
|
-
exports.default = TicketCategories;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { ITicketComment } from "../common/Models";
|
2
|
-
import List from "./context/List";
|
3
|
-
import IJitzContext from "./interfaces/IJitzContext";
|
4
|
-
export default class TicketComments extends List<ITicketComment> {
|
5
|
-
constructor(context: IJitzContext, listName?: string);
|
6
|
-
}
|
@@ -1,32 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var TicketComments = /** @class */ (function (_super) {
|
19
|
-
__extends(TicketComments, _super);
|
20
|
-
function TicketComments(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.TicketComments.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.commonFields.Created,
|
26
|
-
SpConstants_1.default.lists.TicketComments.fields.Story,
|
27
|
-
SpConstants_1.default.lists.TicketComments.fields.Ticket_Code,
|
28
|
-
], [SpConstants_1.default.lists.commonFields.Author], [SpConstants_1.default.lists.TicketComments.fields.Ticket]) || this;
|
29
|
-
}
|
30
|
-
return TicketComments;
|
31
|
-
}(List_1.default));
|
32
|
-
exports.default = TicketComments;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { ITicketPriority } from "../common/Models";
|
2
|
-
import List from "./context/List";
|
3
|
-
import IJitzContext from "./interfaces/IJitzContext";
|
4
|
-
export default class TicketPriorities extends List<ITicketPriority> {
|
5
|
-
constructor(context: IJitzContext, listName?: string);
|
6
|
-
}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var TicketPriorities = /** @class */ (function (_super) {
|
19
|
-
__extends(TicketPriorities, _super);
|
20
|
-
function TicketPriorities(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.TicketPriorities.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.TicketPriorities.fields.ColorCode,
|
26
|
-
SpConstants_1.default.lists.TicketPriorities.fields.SortOrder,
|
27
|
-
], [], []) || this;
|
28
|
-
}
|
29
|
-
return TicketPriorities;
|
30
|
-
}(List_1.default));
|
31
|
-
exports.default = TicketPriorities;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { ITicketStatus } from "../common/Models";
|
2
|
-
import List from "./context/List";
|
3
|
-
import IJitzContext from "./interfaces/IJitzContext";
|
4
|
-
export default class TicketStatuses extends List<ITicketStatus> {
|
5
|
-
constructor(context: IJitzContext, listName?: string);
|
6
|
-
}
|
@@ -1,31 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var TicketStatuses = /** @class */ (function (_super) {
|
19
|
-
__extends(TicketStatuses, _super);
|
20
|
-
function TicketStatuses(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.TicketStatuses.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.TicketStatuses.fields.ColorCode,
|
26
|
-
SpConstants_1.default.lists.TicketStatuses.fields.SortOrder,
|
27
|
-
], [], []) || this;
|
28
|
-
}
|
29
|
-
return TicketStatuses;
|
30
|
-
}(List_1.default));
|
31
|
-
exports.default = TicketStatuses;
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { ITicketSubcategory } from "../common/Models";
|
2
|
-
import List from "./context/List";
|
3
|
-
import IJitzContext from "./interfaces/IJitzContext";
|
4
|
-
export default class TicketSubcategories extends List<ITicketSubcategory> {
|
5
|
-
constructor(context: IJitzContext, listName?: string);
|
6
|
-
}
|
@@ -1,26 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var TicketSubcategories = /** @class */ (function (_super) {
|
19
|
-
__extends(TicketSubcategories, _super);
|
20
|
-
function TicketSubcategories(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.TicketSubcategories.title; }
|
22
|
-
return _super.call(this, context, listName, [SpConstants_1.default.lists.commonFields.Id, SpConstants_1.default.lists.commonFields.Title], [], [SpConstants_1.default.lists.TicketSubcategories.fields.Category]) || this;
|
23
|
-
}
|
24
|
-
return TicketSubcategories;
|
25
|
-
}(List_1.default));
|
26
|
-
exports.default = TicketSubcategories;
|
package/lib/data/Tickets.d.ts
DELETED
package/lib/data/Tickets.js
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
extendStatics(d, b);
|
11
|
-
function __() { this.constructor = d; }
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
13
|
-
};
|
14
|
-
})();
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
16
|
-
var SpConstants_1 = require("../common/SpConstants");
|
17
|
-
var List_1 = require("./context/List");
|
18
|
-
var Tickets = /** @class */ (function (_super) {
|
19
|
-
__extends(Tickets, _super);
|
20
|
-
function Tickets(context, listName) {
|
21
|
-
if (listName === void 0) { listName = SpConstants_1.default.lists.Tickets.title; }
|
22
|
-
return _super.call(this, context, listName, [
|
23
|
-
SpConstants_1.default.lists.commonFields.Id,
|
24
|
-
SpConstants_1.default.lists.commonFields.Title,
|
25
|
-
SpConstants_1.default.lists.commonFields.Created,
|
26
|
-
SpConstants_1.default.lists.commonFields.Modified,
|
27
|
-
SpConstants_1.default.lists.Tickets.fields.Code,
|
28
|
-
SpConstants_1.default.lists.Tickets.fields.Story,
|
29
|
-
SpConstants_1.default.lists.Tickets.fields.Status_ColorCode,
|
30
|
-
SpConstants_1.default.lists.Tickets.fields.Priority_ColorCode,
|
31
|
-
], [
|
32
|
-
SpConstants_1.default.lists.commonFields.Author,
|
33
|
-
SpConstants_1.default.lists.Tickets.fields.Assignee,
|
34
|
-
SpConstants_1.default.lists.Tickets.fields.RaisedFor,
|
35
|
-
SpConstants_1.default.lists.Tickets.fields.TaggedUsers,
|
36
|
-
], [
|
37
|
-
SpConstants_1.default.lists.Tickets.fields.Status,
|
38
|
-
SpConstants_1.default.lists.Tickets.fields.Priority,
|
39
|
-
SpConstants_1.default.lists.Tickets.fields.Category,
|
40
|
-
SpConstants_1.default.lists.Tickets.fields.Subcategory,
|
41
|
-
]) || this;
|
42
|
-
}
|
43
|
-
return Tickets;
|
44
|
-
}(List_1.default));
|
45
|
-
exports.default = Tickets;
|