Skip to content

Commit

Permalink
Updated the SPTypes.
Browse files Browse the repository at this point in the history
  • Loading branch information
gunjandatta committed Sep 20, 2022
1 parent 19e15b2 commit 22c8b34
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 8 deletions.
1 change: 1 addition & 0 deletions @types/sptypes/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export interface ISPTypes {
ClientTemplateUtility: Types.IClientTemplateUtility;
ControlMode: Types.IControlMode;
DateFormat: Types.IDateFormat;
DisplayMode: Types.IDisplayMode;
DraftVisibilityType: Types.IDraftVisibilityType;
EventReceiverType: Types.IEventReceiverType;
EventReceiverSynchronizationType: Types.IEventReceiverSynchronizationType;
Expand Down
11 changes: 10 additions & 1 deletion @types/sptypes/sptypes.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,14 @@ export type IDateFormat = {
DateTime: number
}

/**
* Display Mode
*/
export type IDisplayMode = {
Edit: number,
Read: number
}

/**
* Draft Visibility Types
*/
Expand Down Expand Up @@ -667,8 +675,9 @@ export type IFileTemplateType = {
* Form Display Mode
*/
export type IFormDisplayMode = {
Display: number,
Edit: number,
Read: number
New: number
}

/**
Expand Down
12 changes: 11 additions & 1 deletion dist/gd-sprest.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ declare module 'gd-sprest/sptypes' {
ClientTemplateUtility: Types.IClientTemplateUtility;
ControlMode: Types.IControlMode;
DateFormat: Types.IDateFormat;
DisplayMode: Types.IDisplayMode;
DraftVisibilityType: Types.IDraftVisibilityType;
EventReceiverType: Types.IEventReceiverType;
EventReceiverSynchronizationType: Types.IEventReceiverSynchronizationType;
Expand Down Expand Up @@ -4236,6 +4237,14 @@ declare module 'gd-sprest/sptypes/sptypes' {
DateTime: number
}

/**
* Display Mode
*/
export type IDisplayMode = {
Edit: number,
Read: number
}

/**
* Draft Visibility Types
*/
Expand Down Expand Up @@ -4712,8 +4721,9 @@ declare module 'gd-sprest/sptypes/sptypes' {
* Form Display Mode
*/
export type IFormDisplayMode = {
Display: number,
Edit: number,
Read: number
New: number
}

/**
Expand Down
2 changes: 1 addition & 1 deletion dist/gd-sprest.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/gd-sprest.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gd-sprest",
"version": "7.3.1",
"version": "7.3.2",
"description": "An easy way to develop against the SharePoint REST API.",
"author": "Gunjan Datta <[email protected]> (https://gunjandatta.github.io)",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/rest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { IREST } from "../@types";
* SharePoint REST Library
*/
export const $REST: IREST = {
__ver: 7.31,
__ver: 7.32,
AppContext: (siteUrl: string) => { return Lib.Site.getAppContext(siteUrl); },
Apps: Lib.Apps,
ContextInfo: Lib.ContextInfo,
Expand Down
13 changes: 11 additions & 2 deletions src/sptypes/sptypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,14 @@ export const ControlMode: SPTypes.IControlMode = {
*/
export const DateFormat: SPTypes.IDateFormat = { DateOnly: 0, DateTime: 1 };

/**
* Display Mode
*/
export const DisplayMode: SPTypes.IDisplayMode = {
Edit: 2,
Read: 1
}

/**
* Draft Visibility Types
*/
Expand Down Expand Up @@ -343,8 +351,9 @@ export const FileTemplateType: SPTypes.IFileTemplateType = { StandardPage: 0, Wi
* Form Display Mode
*/
export const FormDisplayMode: SPTypes.IFormDisplayMode = {
Edit: 2,
Read: 1
Display: 4,
Edit: 6,
New: 8
}

/**
Expand Down

0 comments on commit 22c8b34

Please sign in to comment.