@kwiz/common 1.0.1
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/LICENSE +21 -0
- package/dist/_dependencies.d.ts +1 -0
- package/dist/_dependencies.js +8 -0
- package/dist/_dependencies.js.map +1 -0
- package/dist/helpers/Guid.d.ts +119 -0
- package/dist/helpers/Guid.js +183 -0
- package/dist/helpers/Guid.js.map +1 -0
- package/dist/helpers/_dependencies.d.ts +2 -0
- package/dist/helpers/_dependencies.js +21 -0
- package/dist/helpers/_dependencies.js.map +1 -0
- package/dist/helpers/base64.d.ts +8 -0
- package/dist/helpers/base64.js +178 -0
- package/dist/helpers/base64.js.map +1 -0
- package/dist/helpers/browser.d.ts +144 -0
- package/dist/helpers/browser.js +1200 -0
- package/dist/helpers/browser.js.map +1 -0
- package/dist/helpers/browserinfo.d.ts +23 -0
- package/dist/helpers/browserinfo.js +215 -0
- package/dist/helpers/browserinfo.js.map +1 -0
- package/dist/helpers/collections.base.d.ts +128 -0
- package/dist/helpers/collections.base.js +430 -0
- package/dist/helpers/collections.base.js.map +1 -0
- package/dist/helpers/collections.d.ts +18 -0
- package/dist/helpers/collections.js +99 -0
- package/dist/helpers/collections.js.map +1 -0
- package/dist/helpers/color.d.ts +11 -0
- package/dist/helpers/color.js +57 -0
- package/dist/helpers/color.js.map +1 -0
- package/dist/helpers/cookies.d.ts +6 -0
- package/dist/helpers/cookies.js +56 -0
- package/dist/helpers/cookies.js.map +1 -0
- package/dist/helpers/date.d.ts +43 -0
- package/dist/helpers/date.js +158 -0
- package/dist/helpers/date.js.map +1 -0
- package/dist/helpers/debug.d.ts +33 -0
- package/dist/helpers/debug.js +177 -0
- package/dist/helpers/debug.js.map +1 -0
- package/dist/helpers/emails.d.ts +2 -0
- package/dist/helpers/emails.js +10 -0
- package/dist/helpers/emails.js.map +1 -0
- package/dist/helpers/eval.d.ts +1 -0
- package/dist/helpers/eval.js +10 -0
- package/dist/helpers/eval.js.map +1 -0
- package/dist/helpers/file.d.ts +11 -0
- package/dist/helpers/file.js +55 -0
- package/dist/helpers/file.js.map +1 -0
- package/dist/helpers/flatted.d.ts +20 -0
- package/dist/helpers/flatted.js +135 -0
- package/dist/helpers/flatted.js.map +1 -0
- package/dist/helpers/functions.d.ts +4 -0
- package/dist/helpers/functions.js +17 -0
- package/dist/helpers/functions.js.map +1 -0
- package/dist/helpers/graph/calendar.types.d.ts +3 -0
- package/dist/helpers/graph/calendar.types.js +15 -0
- package/dist/helpers/graph/calendar.types.js.map +1 -0
- package/dist/helpers/http.d.ts +25 -0
- package/dist/helpers/http.js +70 -0
- package/dist/helpers/http.js.map +1 -0
- package/dist/helpers/images.d.ts +16 -0
- package/dist/helpers/images.js +21 -0
- package/dist/helpers/images.js.map +1 -0
- package/dist/helpers/index.d.ts +29 -0
- package/dist/helpers/index.js +46 -0
- package/dist/helpers/index.js.map +1 -0
- package/dist/helpers/json.d.ts +3 -0
- package/dist/helpers/json.js +44 -0
- package/dist/helpers/json.js.map +1 -0
- package/dist/helpers/md5.d.ts +5 -0
- package/dist/helpers/md5.js +172 -0
- package/dist/helpers/md5.js.map +1 -0
- package/dist/helpers/objects.d.ts +49 -0
- package/dist/helpers/objects.js +271 -0
- package/dist/helpers/objects.js.map +1 -0
- package/dist/helpers/promises.d.ts +14 -0
- package/dist/helpers/promises.js +112 -0
- package/dist/helpers/promises.js.map +1 -0
- package/dist/helpers/random.d.ts +2 -0
- package/dist/helpers/random.js +32 -0
- package/dist/helpers/random.js.map +1 -0
- package/dist/helpers/scheduler/scheduler.d.ts +39 -0
- package/dist/helpers/scheduler/scheduler.js +109 -0
- package/dist/helpers/scheduler/scheduler.js.map +1 -0
- package/dist/helpers/sharepoint.d.ts +112 -0
- package/dist/helpers/sharepoint.js +629 -0
- package/dist/helpers/sharepoint.js.map +1 -0
- package/dist/helpers/strings.d.ts +56 -0
- package/dist/helpers/strings.js +282 -0
- package/dist/helpers/strings.js.map +1 -0
- package/dist/helpers/typecheckers.d.ts +56 -0
- package/dist/helpers/typecheckers.js +274 -0
- package/dist/helpers/typecheckers.js.map +1 -0
- package/dist/helpers/url.d.ts +46 -0
- package/dist/helpers/url.js +199 -0
- package/dist/helpers/url.js.map +1 -0
- package/dist/helpers/urlhelper.d.ts +16 -0
- package/dist/helpers/urlhelper.js +96 -0
- package/dist/helpers/urlhelper.js.map +1 -0
- package/dist/index.d.ts +15 -0
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -0
- package/dist/types/common.types.d.ts +19 -0
- package/dist/types/common.types.js +4 -0
- package/dist/types/common.types.js.map +1 -0
- package/dist/types/flatted.types.d.ts +49 -0
- package/dist/types/flatted.types.js +3 -0
- package/dist/types/flatted.types.js.map +1 -0
- package/dist/types/globals.types.d.ts +6 -0
- package/dist/types/globals.types.js +3 -0
- package/dist/types/globals.types.js.map +1 -0
- package/dist/types/graph/calendar.types.d.ts +79 -0
- package/dist/types/graph/calendar.types.js +3 -0
- package/dist/types/graph/calendar.types.js.map +1 -0
- package/dist/types/graph/index.d.ts +1 -0
- package/dist/types/graph/index.js +18 -0
- package/dist/types/graph/index.js.map +1 -0
- package/dist/types/index.d.ts +11 -0
- package/dist/types/index.js +28 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/knownscript.types.d.ts +22 -0
- package/dist/types/knownscript.types.js +3 -0
- package/dist/types/knownscript.types.js.map +1 -0
- package/dist/types/libs/datajs.types.d.ts +29 -0
- package/dist/types/libs/datajs.types.js +3 -0
- package/dist/types/libs/datajs.types.js.map +1 -0
- package/dist/types/libs/ics.types.d.ts +29 -0
- package/dist/types/libs/ics.types.js +3 -0
- package/dist/types/libs/ics.types.js.map +1 -0
- package/dist/types/libs/index.d.ts +3 -0
- package/dist/types/libs/index.js +20 -0
- package/dist/types/libs/index.js.map +1 -0
- package/dist/types/libs/msal.types.d.ts +33 -0
- package/dist/types/libs/msal.types.js +63 -0
- package/dist/types/libs/msal.types.js.map +1 -0
- package/dist/types/locales.d.ts +122 -0
- package/dist/types/locales.js +1 -0
- package/dist/types/locales.js.map +1 -0
- package/dist/types/localstoragecache.types.d.ts +8 -0
- package/dist/types/localstoragecache.types.js +3 -0
- package/dist/types/localstoragecache.types.js.map +1 -0
- package/dist/types/moment.d.ts +6 -0
- package/dist/types/moment.js +1 -0
- package/dist/types/moment.js.map +1 -0
- package/dist/types/regex.types.d.ts +14 -0
- package/dist/types/regex.types.js +3 -0
- package/dist/types/regex.types.js.map +1 -0
- package/dist/types/rest.types.d.ts +81 -0
- package/dist/types/rest.types.js +24 -0
- package/dist/types/rest.types.js.map +1 -0
- package/dist/types/sharepoint.types.d.ts +1432 -0
- package/dist/types/sharepoint.types.js +629 -0
- package/dist/types/sharepoint.types.js.map +1 -0
- package/dist/types/sharepoint.utils.types.d.ts +246 -0
- package/dist/types/sharepoint.utils.types.js +26 -0
- package/dist/types/sharepoint.utils.types.js.map +1 -0
- package/dist/utils/_dependencies.d.ts +3 -0
- package/dist/utils/_dependencies.js +24 -0
- package/dist/utils/_dependencies.js.map +1 -0
- package/dist/utils/base64.d.ts +2 -0
- package/dist/utils/base64.js +41 -0
- package/dist/utils/base64.js.map +1 -0
- package/dist/utils/consolelogger.d.ts +73 -0
- package/dist/utils/consolelogger.js +281 -0
- package/dist/utils/consolelogger.js.map +1 -0
- package/dist/utils/date.d.ts +10 -0
- package/dist/utils/date.js +30 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/emails.d.ts +2 -0
- package/dist/utils/emails.js +24 -0
- package/dist/utils/emails.js.map +1 -0
- package/dist/utils/index.d.ts +13 -0
- package/dist/utils/index.js +31 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/knownscript.d.ts +99 -0
- package/dist/utils/knownscript.js +261 -0
- package/dist/utils/knownscript.js.map +1 -0
- package/dist/utils/localstoragecache.d.ts +19 -0
- package/dist/utils/localstoragecache.js +372 -0
- package/dist/utils/localstoragecache.js.map +1 -0
- package/dist/utils/rest.d.ts +17 -0
- package/dist/utils/rest.js +402 -0
- package/dist/utils/rest.js.map +1 -0
- package/dist/utils/script.d.ts +33 -0
- package/dist/utils/script.js +169 -0
- package/dist/utils/script.js.map +1 -0
- package/dist/utils/sharepoint.rest/common.d.ts +32 -0
- package/dist/utils/sharepoint.rest/common.js +146 -0
- package/dist/utils/sharepoint.rest/common.js.map +1 -0
- package/dist/utils/sharepoint.rest/date.d.ts +2 -0
- package/dist/utils/sharepoint.rest/date.js +57 -0
- package/dist/utils/sharepoint.rest/date.js.map +1 -0
- package/dist/utils/sharepoint.rest/file.folder.d.ts +58 -0
- package/dist/utils/sharepoint.rest/file.folder.js +305 -0
- package/dist/utils/sharepoint.rest/file.folder.js.map +1 -0
- package/dist/utils/sharepoint.rest/index.d.ts +11 -0
- package/dist/utils/sharepoint.rest/index.js +28 -0
- package/dist/utils/sharepoint.rest/index.js.map +1 -0
- package/dist/utils/sharepoint.rest/item.d.ts +81 -0
- package/dist/utils/sharepoint.rest/item.js +444 -0
- package/dist/utils/sharepoint.rest/item.js.map +1 -0
- package/dist/utils/sharepoint.rest/list.d.ts +228 -0
- package/dist/utils/sharepoint.rest/list.js +868 -0
- package/dist/utils/sharepoint.rest/list.js.map +1 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsByCaml.d.ts +19 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsByCaml.js +629 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsByCaml.js.map +1 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsById.d.ts +14 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsById.js +222 -0
- package/dist/utils/sharepoint.rest/listutils/GetListItemsById.js.map +1 -0
- package/dist/utils/sharepoint.rest/listutils/common.d.ts +3 -0
- package/dist/utils/sharepoint.rest/listutils/common.js +198 -0
- package/dist/utils/sharepoint.rest/listutils/common.js.map +1 -0
- package/dist/utils/sharepoint.rest/user-search.d.ts +76 -0
- package/dist/utils/sharepoint.rest/user-search.js +239 -0
- package/dist/utils/sharepoint.rest/user-search.js.map +1 -0
- package/dist/utils/sharepoint.rest/user.d.ts +71 -0
- package/dist/utils/sharepoint.rest/user.js +404 -0
- package/dist/utils/sharepoint.rest/user.js.map +1 -0
- package/dist/utils/sharepoint.rest/web.d.ts +107 -0
- package/dist/utils/sharepoint.rest/web.js +929 -0
- package/dist/utils/sharepoint.rest/web.js.map +1 -0
- package/dist/utils/sod.d.ts +29 -0
- package/dist/utils/sod.js +177 -0
- package/dist/utils/sod.js.map +1 -0
- package/package.json +60 -0
- package/readme.md +13 -0
- package/src/_dependencies.ts +2 -0
- package/src/helpers/Guid.ts +182 -0
- package/src/helpers/_dependencies.ts +3 -0
- package/src/helpers/base64.ts +174 -0
- package/src/helpers/browser.test.js +9 -0
- package/src/helpers/browser.ts +1299 -0
- package/src/helpers/browserinfo.ts +293 -0
- package/src/helpers/collections.base.test.js +26 -0
- package/src/helpers/collections.base.ts +439 -0
- package/src/helpers/collections.ts +108 -0
- package/src/helpers/color.ts +55 -0
- package/src/helpers/cookies.ts +55 -0
- package/src/helpers/date.test.js +97 -0
- package/src/helpers/date.ts +163 -0
- package/src/helpers/debug.ts +187 -0
- package/src/helpers/emails.ts +7 -0
- package/src/helpers/eval.ts +5 -0
- package/src/helpers/file.test.js +51 -0
- package/src/helpers/file.ts +59 -0
- package/src/helpers/flatted.ts +150 -0
- package/src/helpers/functions.ts +17 -0
- package/src/helpers/graph/calendar.types.ts +11 -0
- package/src/helpers/http.ts +70 -0
- package/src/helpers/images.ts +23 -0
- package/src/helpers/index.ts +29 -0
- package/src/helpers/json.ts +39 -0
- package/src/helpers/md5.ts +190 -0
- package/src/helpers/objects.test.js +27 -0
- package/src/helpers/objects.ts +256 -0
- package/src/helpers/promises.test.js +18 -0
- package/src/helpers/promises.ts +102 -0
- package/src/helpers/random.ts +27 -0
- package/src/helpers/scheduler/scheduler.test.js +104 -0
- package/src/helpers/scheduler/scheduler.ts +132 -0
- package/src/helpers/sharepoint.ts +681 -0
- package/src/helpers/strings.test.js +43 -0
- package/src/helpers/strings.ts +288 -0
- package/src/helpers/typecheckers.test.js +35 -0
- package/src/helpers/typecheckers.ts +263 -0
- package/src/helpers/url.test.js +18 -0
- package/src/helpers/url.ts +202 -0
- package/src/helpers/urlhelper.ts +104 -0
- package/src/index.ts +24 -0
- package/src/types/common.types.ts +16 -0
- package/src/types/flatted.types.ts +60 -0
- package/src/types/globals.types.ts +7 -0
- package/src/types/graph/calendar.types.ts +81 -0
- package/src/types/graph/index.ts +1 -0
- package/src/types/index.ts +12 -0
- package/src/types/knownscript.types.ts +19 -0
- package/src/types/libs/datajs.types.ts +29 -0
- package/src/types/libs/ics.types.ts +31 -0
- package/src/types/libs/index.ts +4 -0
- package/src/types/libs/msal.types.ts +79 -0
- package/src/types/locales.ts +125 -0
- package/src/types/localstoragecache.types.ts +9 -0
- package/src/types/moment.ts +7 -0
- package/src/types/regex.types.ts +17 -0
- package/src/types/rest.types.ts +94 -0
- package/src/types/sharepoint.types.ts +1413 -0
- package/src/types/sharepoint.utils.types.ts +246 -0
- package/src/utils/_dependencies.ts +4 -0
- package/src/utils/base64.ts +27 -0
- package/src/utils/consolelogger.ts +315 -0
- package/src/utils/date.ts +36 -0
- package/src/utils/emails.ts +25 -0
- package/src/utils/index.ts +13 -0
- package/src/utils/knownscript.ts +280 -0
- package/src/utils/localstoragecache.ts +419 -0
- package/src/utils/rest.ts +465 -0
- package/src/utils/script.ts +168 -0
- package/src/utils/sharepoint.rest/common.ts +149 -0
- package/src/utils/sharepoint.rest/date.ts +61 -0
- package/src/utils/sharepoint.rest/file.folder.ts +368 -0
- package/src/utils/sharepoint.rest/index.ts +11 -0
- package/src/utils/sharepoint.rest/item.ts +456 -0
- package/src/utils/sharepoint.rest/list.ts +1144 -0
- package/src/utils/sharepoint.rest/listutils/GetListItemsByCaml.ts +750 -0
- package/src/utils/sharepoint.rest/listutils/GetListItemsById.ts +265 -0
- package/src/utils/sharepoint.rest/listutils/common.ts +202 -0
- package/src/utils/sharepoint.rest/user-search.ts +254 -0
- package/src/utils/sharepoint.rest/user.ts +447 -0
- package/src/utils/sharepoint.rest/web.ts +1031 -0
- package/src/utils/sod.ts +193 -0
- package/tsconfig.json +21 -0
|
@@ -0,0 +1,228 @@
|
|
|
1
|
+
import { BaseTypes, FieldTypeAsString, FieldTypes, GeListItemsFoldersBehaviour, IFieldInfo, IFieldInfoEX, IFieldInfoExHash, IFieldJsonSchema, IListWorkflowAssociation, IRestItem, ISPEventReceiver, ListExperienceOptions, ListTemplateTypes, PageType, SPBasePermissionKind, iContentType, iList, iListView, jsonTypes } from "../_dependencies";
|
|
2
|
+
/** returns /_api/web/lists/getById() or /_api/web/lists/getByTitle() */
|
|
3
|
+
export declare function GetListRestUrl(siteUrl: string, listIdOrTitle: string): string;
|
|
4
|
+
export declare function GetListId(siteUrl: string, listIdOrTitle: string): string;
|
|
5
|
+
/** get the list ID from a list page, such as a list view or an item form */
|
|
6
|
+
export declare function GetListIdFromPageSync(siteUrl: string, listPageUrl: string): string;
|
|
7
|
+
interface IGetSiteAssetLibraryResult {
|
|
8
|
+
Id: string;
|
|
9
|
+
Name: string;
|
|
10
|
+
ServerRelativeUrl: string;
|
|
11
|
+
}
|
|
12
|
+
/** ensures the site assets library exists and return its info. on errors - it will return null. */
|
|
13
|
+
export declare function EnsureAssetLibrary(siteUrl: string): Promise<IGetSiteAssetLibraryResult>;
|
|
14
|
+
export declare function GetSiteAssetLibrary(siteUrl: string, sync?: false): Promise<IGetSiteAssetLibraryResult>;
|
|
15
|
+
export declare function GetSiteAssetLibrary(siteUrl: string, sync: true): IGetSiteAssetLibraryResult;
|
|
16
|
+
/** Return the list Title */
|
|
17
|
+
export declare function GetListTitle(siteUrl: string, listIdOrTitle: string): Promise<string>;
|
|
18
|
+
/** Return the list */
|
|
19
|
+
export declare function GetList(siteUrlOrId: string, listIdOrTitle: string, options?: {
|
|
20
|
+
includeViews?: boolean;
|
|
21
|
+
viewOptions?: IListViewOptions;
|
|
22
|
+
includeContentTypes?: boolean;
|
|
23
|
+
includeRootFolder?: boolean;
|
|
24
|
+
includeEventReceivers?: boolean;
|
|
25
|
+
}): Promise<iList>;
|
|
26
|
+
/** Return the list */
|
|
27
|
+
export declare function GetListSync(siteUrl: string, listIdOrTitle: string): iList;
|
|
28
|
+
export declare function GetListNameSync(webUrl: string, listIdOrTitle: string): string;
|
|
29
|
+
export declare function GetListName(webUrl: string, listIdOrTitle: string): Promise<string>;
|
|
30
|
+
export declare function GetListRootFolder(siteUrlOrId: string, listIdOrTitle: string): Promise<{
|
|
31
|
+
ServerRelativeUrl: string;
|
|
32
|
+
Name: string;
|
|
33
|
+
}>;
|
|
34
|
+
export declare function GetListRootFolderSync(siteUrlOrId: string, listIdOrTitle: string): {
|
|
35
|
+
ServerRelativeUrl: string;
|
|
36
|
+
Name: string;
|
|
37
|
+
};
|
|
38
|
+
export declare function GetListField(siteUrlOrId: string, listIdOrTitle: string, fieldIdOrName: string, refreshCache?: boolean): Promise<IFieldInfo>;
|
|
39
|
+
/** Gets ID, Title, ContentType Author, Editor, Created and Modified fields */
|
|
40
|
+
export declare function GetStandardListFields(siteUrlOrId: string, listIdOrTitle: string, refreshCache?: boolean): Promise<IFieldInfoEX[]>;
|
|
41
|
+
export interface IGetListFieldsOptions {
|
|
42
|
+
refreshCache?: boolean;
|
|
43
|
+
/** fieldNames that should be returned with the request */
|
|
44
|
+
fieldNames?: string[];
|
|
45
|
+
}
|
|
46
|
+
export declare function GetListFields(siteUrlOrId: string, listIdOrTitle: string, options?: IGetListFieldsOptions): Promise<IFieldInfoEX[]>;
|
|
47
|
+
export declare function GetListFieldsSync(siteUrlOrId: string, listIdOrTitle: string, options?: IGetListFieldsOptions): IFieldInfoEX[];
|
|
48
|
+
export declare function GetListFieldsAsHash(siteUrlOrId: string, listIdOrTitle: string, refreshCache?: boolean): Promise<IFieldInfoExHash>;
|
|
49
|
+
export declare function GetListFieldsAsHashSync(siteUrlOrId: string, listIdOrTitle: string, refreshCache?: boolean): IFieldInfoExHash;
|
|
50
|
+
export declare function GetListWorkflows(siteUrl: string, listIdOrTitle: string, refreshCache?: boolean): Promise<IListWorkflowAssociation[]>;
|
|
51
|
+
export declare function UserHasManagePermissions(siteUrl: string, listIdOrTitle: string): Promise<boolean>;
|
|
52
|
+
export declare function UserHasEditPermissions(siteUrl: string, listIdOrTitle: string): Promise<boolean>;
|
|
53
|
+
export declare function UserHasPermissions(siteUrlOrId: string, listIdOrTitle: string, permissionKind: SPBasePermissionKind): Promise<boolean>;
|
|
54
|
+
export declare function UserHasPermissionsSync(siteUrlOrId: string, listIdOrTitle: string, permissionKind: SPBasePermissionKind): boolean;
|
|
55
|
+
/** create a new column and try to add it to default view. Send either Title and Type, or SchemaXml. Create with SchemaXml also adds to all content types */
|
|
56
|
+
export declare function CreateField(siteUrl: string, listIdOrTitle: string, options: {
|
|
57
|
+
Title?: string;
|
|
58
|
+
Type?: FieldTypes;
|
|
59
|
+
Required?: boolean;
|
|
60
|
+
SchemaXml?: string;
|
|
61
|
+
SchemaXmlSpecificInternalName?: boolean;
|
|
62
|
+
SkipAddToDefaultView?: boolean;
|
|
63
|
+
ClientSideComponentId?: string;
|
|
64
|
+
ClientSideComponentProperties?: string;
|
|
65
|
+
}): Promise<IFieldInfoEX>;
|
|
66
|
+
/** Update field SchemaXml OR Title, only 1 update at a time supported. */
|
|
67
|
+
export declare function UpdateField(siteUrlOrId: string, listIdOrTitle: string, fieldInternalName: string, options: {
|
|
68
|
+
Title?: string;
|
|
69
|
+
SchemaXml?: string;
|
|
70
|
+
FieldType?: FieldTypeAsString;
|
|
71
|
+
Required?: boolean;
|
|
72
|
+
Hidden?: boolean;
|
|
73
|
+
ClientSideComponentId?: string;
|
|
74
|
+
ClientSideComponentProperties?: string;
|
|
75
|
+
}): Promise<IFieldInfoEX>;
|
|
76
|
+
export declare function DeleteField(siteUrl: string, listIdOrTitle: string, fieldInternalName: string, options?: {
|
|
77
|
+
DeleteHiddenField?: boolean;
|
|
78
|
+
}): Promise<boolean>;
|
|
79
|
+
export interface IListViewOptions {
|
|
80
|
+
includeViewFields?: boolean;
|
|
81
|
+
}
|
|
82
|
+
export declare function GetListViews(siteUrl: string, listIdOrTitle: string, options?: IListViewOptions): Promise<iListView[]>;
|
|
83
|
+
export declare function GetListViewsSync(siteUrl: string, listIdOrTitle: string): iListView[];
|
|
84
|
+
export declare function AddViewFieldToListView(siteUrl: string, listIdOrTitle: string, viewId: string, viewField: string): Promise<boolean>;
|
|
85
|
+
export declare function GetListContentTypes(siteUrl: string, listIdOrTitle: string, options?: {
|
|
86
|
+
ignoreFolders?: boolean;
|
|
87
|
+
ignoreHidden?: boolean;
|
|
88
|
+
includeFields?: boolean;
|
|
89
|
+
}): Promise<iContentType[]>;
|
|
90
|
+
export declare function GetListContentTypesSync(siteUrl: string, listIdOrTitle: string, options?: {
|
|
91
|
+
ignoreFolders?: boolean;
|
|
92
|
+
ignoreHidden?: boolean;
|
|
93
|
+
includeFields?: boolean;
|
|
94
|
+
}): iContentType[];
|
|
95
|
+
/** generic version. for the KWIZ forms version that supports action id call GetListFormUrlAppsWeb instead */
|
|
96
|
+
export declare function GetListFormUrl(siteUrl: string, listId: string, pageType: PageType, params?: {
|
|
97
|
+
contentTypeId?: string;
|
|
98
|
+
itemId?: number | string;
|
|
99
|
+
}): string;
|
|
100
|
+
export declare function GetFieldSchemaSync(siteUrl: string, listIdOrTitle: string, fieldInternalName: string, refreshCache?: boolean): IFieldJsonSchema;
|
|
101
|
+
export declare function GetFieldSchema(siteUrl: string, listIdOrTitle: string, fieldInternalName: string, refreshCache?: boolean): Promise<IFieldJsonSchema>;
|
|
102
|
+
export declare function GetListItems(siteUrl: string, listIdOrTitle: string, options: {
|
|
103
|
+
/** Optional, default: 1000. 0: get all items. */
|
|
104
|
+
rowLimit?: number;
|
|
105
|
+
/** Id, Title, Modified, FileLeafRef, FileDirRef, FileRef, FileSystemObjectType */
|
|
106
|
+
columns: (string | IFieldInfoEX)[];
|
|
107
|
+
foldersBehaviour?: GeListItemsFoldersBehaviour;
|
|
108
|
+
/** Optional, request to expand some columns. */
|
|
109
|
+
expand?: string[];
|
|
110
|
+
/** allow to change the jsonMetadata for this request, default: verbose */
|
|
111
|
+
jsonMetadata?: jsonTypes;
|
|
112
|
+
refreshCache?: boolean;
|
|
113
|
+
/** allow to send a filter statement */
|
|
114
|
+
$filter?: string;
|
|
115
|
+
}): Promise<IRestItem[]>;
|
|
116
|
+
export declare function GetListItemsSync(siteUrl: string, listIdOrTitle: string, options: {
|
|
117
|
+
/** Optional, default: 1000. 0: get all items. */
|
|
118
|
+
rowLimit?: number;
|
|
119
|
+
/** Id, Title, Modified, FileLeafRef, FileDirRef, FileRef, FileSystemObjectType */
|
|
120
|
+
columns: (string | IFieldInfoEX)[];
|
|
121
|
+
foldersBehaviour?: GeListItemsFoldersBehaviour;
|
|
122
|
+
/** Optional, request to expand some columns. */
|
|
123
|
+
expand?: string[];
|
|
124
|
+
/** allow to send a filter statement */
|
|
125
|
+
$filter?: string;
|
|
126
|
+
}): IRestItem[];
|
|
127
|
+
/** Find an item by id, even if it is nested in a sub-folder */
|
|
128
|
+
export declare function FindListItemById(items: IRestItem[], itemId: number): IRestItem;
|
|
129
|
+
export declare function GetListEventReceivers(siteUrl: string, listIdOrTitle: string, refreshCache?: boolean): Promise<ISPEventReceiver[]>;
|
|
130
|
+
export declare function AddListEventReceiver(siteUrl: string, listIdOrTitle: string, eventReceiverDefinition: Pick<ISPEventReceiver, "EventType" | "ReceiverName" | "ReceiverUrl" | "SequenceNumber">): Promise<ISPEventReceiver>;
|
|
131
|
+
export declare function DeleteListEventReceiver(siteUrl: string, listIdOrTitle: string, eventReceiverId: string): Promise<boolean>;
|
|
132
|
+
/** timestamp of changes:
|
|
133
|
+
* - item updates
|
|
134
|
+
* - changes to columns
|
|
135
|
+
* - content types
|
|
136
|
+
* - list versioning settings
|
|
137
|
+
* - list title/description
|
|
138
|
+
* - content approval settings
|
|
139
|
+
* does not track:
|
|
140
|
+
* - Changes to views
|
|
141
|
+
* - changing list/items permissions
|
|
142
|
+
*/
|
|
143
|
+
export declare function GetListLastItemModifiedDate(siteUrl: string, listIdOrTitle: string, options: {
|
|
144
|
+
sync: true;
|
|
145
|
+
refreshCache?: boolean;
|
|
146
|
+
/** ignore system changes */
|
|
147
|
+
userChangesOnly?: boolean;
|
|
148
|
+
}): string;
|
|
149
|
+
/** timestamp of changes:
|
|
150
|
+
* - item updates
|
|
151
|
+
* - changes to columns
|
|
152
|
+
* - content types
|
|
153
|
+
* - list versioning settings
|
|
154
|
+
* - list title/description
|
|
155
|
+
* - content approval settings
|
|
156
|
+
* does not track:
|
|
157
|
+
* - Changes to views
|
|
158
|
+
* - changing list/items permissions
|
|
159
|
+
*/
|
|
160
|
+
export declare function GetListLastItemModifiedDate(siteUrl: string, listIdOrTitle: string, options?: {
|
|
161
|
+
sync?: false;
|
|
162
|
+
refreshCache?: boolean;
|
|
163
|
+
/** ignore system changes */
|
|
164
|
+
userChangesOnly?: boolean;
|
|
165
|
+
}): Promise<string>;
|
|
166
|
+
export declare function ReloadListLastModified(siteUrl: string, listIdOrTitle: string): Promise<void>;
|
|
167
|
+
export declare function ListHasUniquePermissions(siteUrl: string, listIdOrTitle: string): Promise<boolean>;
|
|
168
|
+
export declare function BreakListbPermissionInheritance(siteUrl: string, listIdOrTitle: string, clear?: boolean): Promise<void>;
|
|
169
|
+
export declare function AssignListPermission(siteUrl: string, listIdOrTitle: string, principalId: number, roleId: number): Promise<void>;
|
|
170
|
+
export declare function RemoveListPermission(siteUrl: string, listIdOrTitle: string, principalId: number, roleId: number): Promise<void>;
|
|
171
|
+
interface iCreateListResult {
|
|
172
|
+
AllowContentTypes: boolean;
|
|
173
|
+
BaseTemplate: ListTemplateTypes;
|
|
174
|
+
BaseType: BaseTypes;
|
|
175
|
+
ContentTypesEnabled: boolean;
|
|
176
|
+
Created: string;
|
|
177
|
+
DefaultItemOpenUseListSetting: boolean;
|
|
178
|
+
Description: string;
|
|
179
|
+
DisableCommenting: boolean;
|
|
180
|
+
DisableGridEditing: boolean;
|
|
181
|
+
DocumentTemplateUrl: string;
|
|
182
|
+
DraftVersionVisibility: 0;
|
|
183
|
+
EnableAttachments: boolean;
|
|
184
|
+
EnableFolderCreation: boolean;
|
|
185
|
+
EnableMinorVersions: boolean;
|
|
186
|
+
EnableModeration: false;
|
|
187
|
+
EnableRequestSignOff: boolean;
|
|
188
|
+
EnableVersioning: boolean;
|
|
189
|
+
EntityTypeName: string;
|
|
190
|
+
ExemptFromBlockDownloadOfNonViewableFiles: boolean;
|
|
191
|
+
FileSavePostProcessingEnabled: boolean;
|
|
192
|
+
ForceCheckout: boolean;
|
|
193
|
+
HasExternalDataSource: boolean;
|
|
194
|
+
Hidden: boolean;
|
|
195
|
+
Id: string;
|
|
196
|
+
ImagePath: {
|
|
197
|
+
DecodedUrl: string;
|
|
198
|
+
};
|
|
199
|
+
ImageUrl: string;
|
|
200
|
+
IsApplicationList: boolean;
|
|
201
|
+
IsCatalog: boolean;
|
|
202
|
+
IsPrivate: boolean;
|
|
203
|
+
ItemCount: 0;
|
|
204
|
+
LastItemDeletedDate: string;
|
|
205
|
+
LastItemModifiedDate: string;
|
|
206
|
+
LastItemUserModifiedDate: string;
|
|
207
|
+
ListExperienceOptions: ListExperienceOptions;
|
|
208
|
+
ListItemEntityTypeFullName: string;
|
|
209
|
+
MajorVersionLimit: number;
|
|
210
|
+
MajorWithMinorVersionsLimit: number;
|
|
211
|
+
MultipleDataList: boolean;
|
|
212
|
+
NoCrawl: boolean;
|
|
213
|
+
ParentWebPath: {
|
|
214
|
+
DecodedUrl: string;
|
|
215
|
+
};
|
|
216
|
+
ParentWebUrl: string;
|
|
217
|
+
ParserDisabled: boolean;
|
|
218
|
+
ServerTemplateCanCreateFolders: boolean;
|
|
219
|
+
TemplateFeatureId: string;
|
|
220
|
+
Title: string;
|
|
221
|
+
}
|
|
222
|
+
export declare function CreateList(siteUrl: string, info: {
|
|
223
|
+
title: string;
|
|
224
|
+
description: string;
|
|
225
|
+
type: BaseTypes;
|
|
226
|
+
template: ListTemplateTypes;
|
|
227
|
+
}): Promise<iCreateListResult>;
|
|
228
|
+
export {};
|