@pnp/sp 2.7.0 → 2.11.0

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.
Files changed (309) hide show
  1. package/LICENSE +25 -25
  2. package/appcatalog/index.d.ts +8 -8
  3. package/appcatalog/index.js +30 -30
  4. package/appcatalog/types.d.ts +81 -81
  5. package/appcatalog/types.js +177 -177
  6. package/appcatalog/web.d.ts +16 -16
  7. package/appcatalog/web.js +6 -6
  8. package/attachments/index.d.ts +2 -2
  9. package/attachments/index.js +2 -2
  10. package/attachments/item.d.ts +12 -12
  11. package/attachments/item.js +4 -4
  12. package/attachments/types.d.ts +92 -92
  13. package/attachments/types.js +240 -240
  14. package/batch.d.ts +17 -17
  15. package/batch.js +223 -223
  16. package/batch.js.map +1 -1
  17. package/clientside-pages/funcs.d.ts +22 -22
  18. package/clientside-pages/funcs.js +25 -25
  19. package/clientside-pages/index.d.ts +2 -2
  20. package/clientside-pages/index.js +2 -2
  21. package/clientside-pages/types.d.ts +496 -494
  22. package/clientside-pages/types.d.ts.map +1 -1
  23. package/clientside-pages/types.js +1496 -1485
  24. package/clientside-pages/types.js.map +1 -1
  25. package/clientside-pages/web.d.ts +41 -41
  26. package/clientside-pages/web.js +57 -57
  27. package/column-defaults/folder.d.ts +27 -27
  28. package/column-defaults/folder.js +82 -82
  29. package/column-defaults/index.d.ts +3 -3
  30. package/column-defaults/index.js +2 -2
  31. package/column-defaults/list.d.ts +19 -19
  32. package/column-defaults/list.js +198 -198
  33. package/column-defaults/types.d.ts +21 -21
  34. package/column-defaults/types.js +1 -1
  35. package/comments/clientside-page.d.ts +57 -57
  36. package/comments/clientside-page.d.ts.map +1 -1
  37. package/comments/clientside-page.js +136 -136
  38. package/comments/index.d.ts +2 -2
  39. package/comments/index.js +2 -2
  40. package/comments/item.d.ts +29 -29
  41. package/comments/item.js +47 -47
  42. package/comments/types.d.ts +107 -107
  43. package/comments/types.d.ts.map +1 -1
  44. package/comments/types.js +145 -145
  45. package/comments/types.js.map +1 -1
  46. package/content-types/index.d.ts +4 -4
  47. package/content-types/index.js +4 -4
  48. package/content-types/item.d.ts +12 -12
  49. package/content-types/item.js +4 -4
  50. package/content-types/list.d.ts +12 -12
  51. package/content-types/list.js +4 -4
  52. package/content-types/types.d.ts +107 -107
  53. package/content-types/types.js +166 -166
  54. package/content-types/web.d.ts +12 -12
  55. package/content-types/web.js +4 -4
  56. package/decorators.d.ts +11 -11
  57. package/decorators.js +28 -28
  58. package/features/index.d.ts +3 -3
  59. package/features/index.js +3 -3
  60. package/features/site.d.ts +12 -12
  61. package/features/site.js +4 -4
  62. package/features/types.d.ts +47 -47
  63. package/features/types.js +109 -109
  64. package/features/web.d.ts +12 -12
  65. package/features/web.js +4 -4
  66. package/fields/index.d.ts +4 -4
  67. package/fields/index.js +4 -4
  68. package/fields/list.d.ts +12 -12
  69. package/fields/list.js +4 -4
  70. package/fields/types.d.ts +368 -361
  71. package/fields/types.d.ts.map +1 -1
  72. package/fields/types.js +624 -609
  73. package/fields/types.js.map +1 -1
  74. package/fields/web.d.ts +17 -17
  75. package/fields/web.js +5 -5
  76. package/files/folder.d.ts +12 -12
  77. package/files/folder.js +4 -4
  78. package/files/index.d.ts +4 -4
  79. package/files/index.js +4 -4
  80. package/files/item.d.ts +12 -12
  81. package/files/item.js +4 -4
  82. package/files/types.d.ts +421 -421
  83. package/files/types.js +853 -853
  84. package/files/types.js.map +1 -1
  85. package/files/web.d.ts +35 -35
  86. package/files/web.js +15 -15
  87. package/folders/index.d.ts +4 -4
  88. package/folders/index.js +4 -4
  89. package/folders/item.d.ts +9 -9
  90. package/folders/item.js +4 -4
  91. package/folders/list.d.ts +12 -12
  92. package/folders/list.js +4 -4
  93. package/folders/types.d.ts +207 -207
  94. package/folders/types.js +433 -433
  95. package/folders/types.js.map +1 -1
  96. package/folders/web.d.ts +39 -39
  97. package/folders/web.js +15 -15
  98. package/forms/index.d.ts +2 -2
  99. package/forms/index.js +2 -2
  100. package/forms/list.d.ts +9 -9
  101. package/forms/list.js +4 -4
  102. package/forms/types.d.ts +35 -35
  103. package/forms/types.js +41 -41
  104. package/hubsites/index.d.ts +12 -12
  105. package/hubsites/index.js +15 -15
  106. package/hubsites/site.d.ts +26 -26
  107. package/hubsites/site.js +39 -39
  108. package/hubsites/types.d.ts +55 -55
  109. package/hubsites/types.js +53 -53
  110. package/hubsites/web.d.ts +21 -21
  111. package/hubsites/web.js +23 -23
  112. package/index.d.ts +14 -14
  113. package/index.js +13 -13
  114. package/items/index.d.ts +2 -2
  115. package/items/index.js +2 -2
  116. package/items/list.d.ts +9 -9
  117. package/items/list.js +4 -4
  118. package/items/types.d.ts +226 -219
  119. package/items/types.d.ts.map +1 -1
  120. package/items/types.js +549 -511
  121. package/items/types.js.map +1 -1
  122. package/lists/index.d.ts +2 -2
  123. package/lists/index.js +2 -2
  124. package/lists/types.d.ts +495 -495
  125. package/lists/types.js +522 -522
  126. package/lists/types.js.map +1 -1
  127. package/lists/web.d.ts +43 -43
  128. package/lists/web.js +27 -27
  129. package/navigation/index.d.ts +8 -8
  130. package/navigation/index.js +14 -14
  131. package/navigation/types.d.ts +154 -154
  132. package/navigation/types.js +219 -219
  133. package/navigation/web.d.ts +13 -13
  134. package/navigation/web.js +4 -4
  135. package/odata.d.ts +5 -5
  136. package/odata.js +90 -90
  137. package/odata.js.map +1 -1
  138. package/operations.d.ts +9 -9
  139. package/operations.js +63 -63
  140. package/package.json +4 -4
  141. package/presets/all.d.ts +72 -72
  142. package/presets/all.js +72 -72
  143. package/presets/core.d.ts +11 -11
  144. package/presets/core.js +11 -11
  145. package/profiles/index.d.ts +7 -7
  146. package/profiles/index.js +13 -13
  147. package/profiles/types.d.ts +357 -357
  148. package/profiles/types.js +454 -454
  149. package/readme.md +21 -21
  150. package/regional-settings/content-type.d.ts +7 -7
  151. package/regional-settings/content-type.js +4 -4
  152. package/regional-settings/field.d.ts +7 -7
  153. package/regional-settings/field.js +4 -4
  154. package/regional-settings/funcs.d.ts +2 -2
  155. package/regional-settings/funcs.js +8 -8
  156. package/regional-settings/index.d.ts +6 -6
  157. package/regional-settings/index.js +6 -6
  158. package/regional-settings/list.d.ts +7 -7
  159. package/regional-settings/list.js +4 -4
  160. package/regional-settings/types.d.ts +111 -111
  161. package/regional-settings/types.js +159 -159
  162. package/regional-settings/user-custom-actions.d.ts +7 -7
  163. package/regional-settings/user-custom-actions.js +4 -4
  164. package/regional-settings/web.d.ts +12 -12
  165. package/regional-settings/web.js +7 -7
  166. package/related-items/index.d.ts +1 -1
  167. package/related-items/index.js +1 -1
  168. package/related-items/types.d.ts +76 -76
  169. package/related-items/types.js +103 -103
  170. package/related-items/web.d.ts +12 -12
  171. package/related-items/web.js +9 -9
  172. package/rest.d.ts +44 -44
  173. package/rest.js +72 -72
  174. package/search/index.d.ts +30 -30
  175. package/search/index.js +25 -25
  176. package/search/query.d.ts +62 -62
  177. package/search/query.js +302 -302
  178. package/search/suggest.d.ts +76 -76
  179. package/search/suggest.js +66 -66
  180. package/search/types.d.ts +426 -426
  181. package/search/types.js +57 -57
  182. package/security/funcs.d.ts +43 -43
  183. package/security/funcs.js +142 -142
  184. package/security/index.d.ts +4 -4
  185. package/security/index.js +4 -4
  186. package/security/item.d.ts +7 -7
  187. package/security/item.js +14 -14
  188. package/security/list.d.ts +7 -7
  189. package/security/list.js +14 -14
  190. package/security/types.d.ts +318 -318
  191. package/security/types.js +399 -399
  192. package/security/web.d.ts +9 -9
  193. package/security/web.js +15 -15
  194. package/sharepointqueryable.d.ts +135 -135
  195. package/sharepointqueryable.js +265 -265
  196. package/sharing/file.d.ts +18 -18
  197. package/sharing/file.d.ts.map +1 -1
  198. package/sharing/file.js +116 -15
  199. package/sharing/file.js.map +1 -1
  200. package/sharing/folder.d.ts +9 -9
  201. package/sharing/folder.js +136 -136
  202. package/sharing/funcs.d.ts +62 -62
  203. package/sharing/funcs.js +239 -239
  204. package/sharing/funcs.js.map +1 -1
  205. package/sharing/index.d.ts +5 -5
  206. package/sharing/index.js +5 -5
  207. package/sharing/item.d.ts +16 -16
  208. package/sharing/item.js +15 -15
  209. package/sharing/types.d.ts +583 -583
  210. package/sharing/types.js +113 -113
  211. package/sharing/web.d.ts +19 -19
  212. package/sharing/web.js +76 -76
  213. package/site-designs/index.d.ts +8 -8
  214. package/site-designs/index.js +14 -14
  215. package/site-designs/types.d.ts +319 -319
  216. package/site-designs/types.js +203 -203
  217. package/site-designs/web.d.ts +25 -25
  218. package/site-designs/web.js +11 -11
  219. package/site-groups/index.d.ts +2 -2
  220. package/site-groups/index.js +2 -2
  221. package/site-groups/types.d.ts +89 -89
  222. package/site-groups/types.js +125 -125
  223. package/site-groups/web.d.ts +40 -40
  224. package/site-groups/web.js +30 -30
  225. package/site-scripts/index.d.ts +9 -9
  226. package/site-scripts/index.js +15 -15
  227. package/site-scripts/list.d.ts +12 -12
  228. package/site-scripts/list.js +24 -24
  229. package/site-scripts/types.d.ts +183 -183
  230. package/site-scripts/types.js +141 -141
  231. package/site-scripts/web.d.ts +13 -13
  232. package/site-scripts/web.js +5 -5
  233. package/site-users/index.d.ts +2 -2
  234. package/site-users/index.js +2 -2
  235. package/site-users/types.d.ts +138 -138
  236. package/site-users/types.js +122 -122
  237. package/site-users/web.d.ts +31 -31
  238. package/site-users/web.js +27 -27
  239. package/sites/index.d.ts +7 -7
  240. package/sites/index.js +13 -13
  241. package/sites/types.d.ts +147 -147
  242. package/sites/types.js +321 -321
  243. package/social/index.d.ts +10 -10
  244. package/social/index.js +13 -13
  245. package/social/types.d.ts +309 -309
  246. package/social/types.js +322 -322
  247. package/sphttpclient.d.ts +18 -18
  248. package/sphttpclient.js +189 -189
  249. package/splibconfig.d.ts +22 -22
  250. package/splibconfig.js +13 -13
  251. package/sputilities/index.d.ts +7 -7
  252. package/sputilities/index.js +13 -13
  253. package/sputilities/types.d.ts +130 -130
  254. package/sputilities/types.js +118 -118
  255. package/subscriptions/index.d.ts +2 -2
  256. package/subscriptions/index.js +2 -2
  257. package/subscriptions/list.d.ts +13 -13
  258. package/subscriptions/list.js +4 -4
  259. package/subscriptions/types.d.ts +54 -54
  260. package/subscriptions/types.js +111 -111
  261. package/taxonomy/index.d.ts +7 -7
  262. package/taxonomy/index.js +13 -13
  263. package/taxonomy/types.d.ts +200 -200
  264. package/taxonomy/types.js +347 -347
  265. package/taxonomy/types.js.map +1 -1
  266. package/telemetry.d.ts +12 -12
  267. package/telemetry.js +48 -48
  268. package/types.d.ts +218 -218
  269. package/types.js +79 -79
  270. package/user-custom-actions/index.d.ts +4 -4
  271. package/user-custom-actions/index.js +4 -4
  272. package/user-custom-actions/list.d.ts +12 -12
  273. package/user-custom-actions/list.js +4 -4
  274. package/user-custom-actions/site.d.ts +12 -12
  275. package/user-custom-actions/site.js +4 -4
  276. package/user-custom-actions/types.d.ts +82 -82
  277. package/user-custom-actions/types.js +93 -93
  278. package/user-custom-actions/web.d.ts +15 -15
  279. package/user-custom-actions/web.js +4 -4
  280. package/utils/escapeQueryStrValue.d.ts +1 -1
  281. package/utils/escapeQueryStrValue.js +19 -19
  282. package/utils/extractweburl.d.ts +1 -1
  283. package/utils/extractweburl.js +15 -15
  284. package/utils/file-names.d.ts +17 -17
  285. package/utils/file-names.js +38 -38
  286. package/utils/metadata.d.ts +5 -5
  287. package/utils/metadata.js +5 -5
  288. package/utils/objectToSPKeyValueCollection.d.ts +20 -20
  289. package/utils/objectToSPKeyValueCollection.js +16 -16
  290. package/utils/toResourcePath.d.ts +7 -7
  291. package/utils/toResourcePath.js +6 -6
  292. package/utils/toabsoluteurl.d.ts +7 -7
  293. package/utils/toabsoluteurl.js +61 -61
  294. package/views/index.d.ts +2 -2
  295. package/views/index.js +2 -2
  296. package/views/list.d.ts +23 -23
  297. package/views/list.js +8 -8
  298. package/views/types.d.ts +140 -140
  299. package/views/types.js +184 -184
  300. package/webparts/file.d.ts +15 -15
  301. package/webparts/file.js +6 -6
  302. package/webparts/index.d.ts +2 -2
  303. package/webparts/index.js +2 -2
  304. package/webparts/types.d.ts +83 -83
  305. package/webparts/types.js +117 -117
  306. package/webs/index.d.ts +16 -16
  307. package/webs/index.js +16 -16
  308. package/webs/types.d.ts +210 -210
  309. package/webs/types.js +295 -295
package/fields/types.js CHANGED
@@ -1,610 +1,625 @@
1
- import { __awaiter, __decorate, __extends, __generator } from "tslib";
2
- import { _SharePointQueryableInstance, _SharePointQueryableCollection, spInvokableFactory, deleteable, } from "../sharepointqueryable.js";
3
- import { assign } from "@pnp/common";
4
- import { metadata } from "../utils/metadata.js";
5
- import { body, headers } from "@pnp/odata";
6
- import { defaultPath } from "../decorators.js";
7
- import { spPost } from "../operations.js";
8
- import { tag } from "../telemetry.js";
9
- var _Fields = /** @class */ (function (_super) {
10
- __extends(_Fields, _super);
11
- function _Fields() {
12
- return _super !== null && _super.apply(this, arguments) || this;
13
- }
14
- /**
15
- * Creates a field based on the specified schema
16
- *
17
- * @param xml A string or XmlSchemaFieldCreationInformation instance descrbing the field to create
18
- */
19
- _Fields.prototype.createFieldAsXml = function (xml) {
20
- return __awaiter(this, void 0, void 0, function () {
21
- var postBody, data;
22
- return __generator(this, function (_a) {
23
- switch (_a.label) {
24
- case 0:
25
- if (typeof xml === "string") {
26
- xml = { SchemaXml: xml };
27
- }
28
- postBody = body({
29
- "parameters": assign(metadata("SP.XmlSchemaFieldCreationInformation"), xml),
30
- });
31
- return [4 /*yield*/, spPost(this.clone(Fields, "createfieldasxml"), postBody)];
32
- case 1:
33
- data = _a.sent();
34
- return [2 /*return*/, {
35
- data: data,
36
- field: this.getById(data.Id),
37
- }];
38
- }
39
- });
40
- });
41
- };
42
- /**
43
- * Gets a field from the collection by id
44
- *
45
- * @param id The Id of the list
46
- */
47
- _Fields.prototype.getById = function (id) {
48
- return tag.configure(Field(this).concat("('" + id + "')"), "fs.getById");
49
- };
50
- /**
51
- * Gets a field from the collection by title
52
- *
53
- * @param title The case-sensitive title of the field
54
- */
55
- _Fields.prototype.getByTitle = function (title) {
56
- return tag.configure(Field(this, "getByTitle('" + title + "')"), "fs.getByTitle");
57
- };
58
- /**
59
- * Gets a field from the collection by using internal name or title
60
- *
61
- * @param name The case-sensitive internal name or title of the field
62
- */
63
- _Fields.prototype.getByInternalNameOrTitle = function (name) {
64
- return tag.configure(Field(this, "getByInternalNameOrTitle('" + name + "')"), "fs.getByInternalNameOrTitle");
65
- };
66
- /**
67
- * Adds a new field to the collection
68
- *
69
- * @param title The new field's title
70
- * @param fieldType The new field's type (ex: SP.FieldText)
71
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
72
- */
73
- _Fields.prototype.add = function (title, fieldType, properties) {
74
- return __awaiter(this, void 0, void 0, function () {
75
- var postBody, data;
76
- return __generator(this, function (_a) {
77
- switch (_a.label) {
78
- case 0:
79
- postBody = body(Object.assign(metadata(fieldType), {
80
- "Title": title,
81
- }, properties));
82
- if (!tag.isTagged(this)) {
83
- tag.configure(this, "fs.add");
84
- }
85
- return [4 /*yield*/, spPost(this.clone(Fields, null), postBody)];
86
- case 1:
87
- data = _a.sent();
88
- return [2 /*return*/, {
89
- data: data,
90
- field: this.getById(data.Id),
91
- }];
92
- }
93
- });
94
- });
95
- };
96
- /**
97
- * Adds a new SP.FieldText to the collection
98
- *
99
- * @param title The field title
100
- * @param maxLength The maximum number of characters allowed in the value of the field.
101
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
102
- */
103
- _Fields.prototype.addText = function (title, maxLength, properties) {
104
- if (maxLength === void 0) { maxLength = 255; }
105
- var props = {
106
- FieldTypeKind: 2,
107
- MaxLength: maxLength,
108
- };
109
- return this.add(title, "SP.FieldText", assign(props, properties));
110
- };
111
- /**
112
- * Adds a new SP.FieldCalculated to the collection
113
- *
114
- * @param title The field title.
115
- * @param formula The formula for the field.
116
- * @param dateFormat The date and time format that is displayed in the field.
117
- * @param outputType Specifies the output format for the field. Represents a FieldType value.
118
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
119
- */
120
- _Fields.prototype.addCalculated = function (title, formula, dateFormat, outputType, properties) {
121
- if (outputType === void 0) { outputType = FieldTypes.Text; }
122
- var props = {
123
- DateFormat: dateFormat,
124
- FieldTypeKind: 17,
125
- Formula: formula,
126
- OutputType: outputType,
127
- };
128
- return this.add(title, "SP.FieldCalculated", assign(props, properties));
129
- };
130
- /**
131
- * Adds a new SP.FieldDateTime to the collection
132
- *
133
- * @param title The field title
134
- * @param displayFormat The format of the date and time that is displayed in the field.
135
- * @param calendarType Specifies the calendar type of the field.
136
- * @param friendlyDisplayFormat The type of friendly display format that is used in the field.
137
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
138
- */
139
- _Fields.prototype.addDateTime = function (title, displayFormat, calendarType, friendlyDisplayFormat, properties) {
140
- if (displayFormat === void 0) { displayFormat = DateTimeFieldFormatType.DateOnly; }
141
- if (calendarType === void 0) { calendarType = CalendarType.Gregorian; }
142
- if (friendlyDisplayFormat === void 0) { friendlyDisplayFormat = DateTimeFieldFriendlyFormatType.Unspecified; }
143
- var props = {
144
- DateTimeCalendarType: calendarType,
145
- DisplayFormat: displayFormat,
146
- FieldTypeKind: 4,
147
- FriendlyDisplayFormat: friendlyDisplayFormat,
148
- };
149
- return this.add(title, "SP.FieldDateTime", assign(props, properties));
150
- };
151
- /**
152
- * Adds a new SP.FieldNumber to the collection
153
- *
154
- * @param title The field title
155
- * @param minValue The field's minimum value
156
- * @param maxValue The field's maximum value
157
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
158
- */
159
- _Fields.prototype.addNumber = function (title, minValue, maxValue, properties) {
160
- var props = { FieldTypeKind: 9 };
161
- if (minValue !== undefined) {
162
- props = assign({ MinimumValue: minValue }, props);
163
- }
164
- if (maxValue !== undefined) {
165
- props = assign({ MaximumValue: maxValue }, props);
166
- }
167
- return this.add(title, "SP.FieldNumber", assign(props, properties));
168
- };
169
- /**
170
- * Adds a new SP.FieldCurrency to the collection
171
- *
172
- * @param title The field title
173
- * @param minValue The field's minimum value
174
- * @param maxValue The field's maximum value
175
- * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field
176
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
177
- */
178
- _Fields.prototype.addCurrency = function (title, minValue, maxValue, currencyLocalId, properties) {
179
- if (currencyLocalId === void 0) { currencyLocalId = 1033; }
180
- var props = {
181
- CurrencyLocaleId: currencyLocalId,
182
- FieldTypeKind: 10,
183
- };
184
- if (minValue !== undefined) {
185
- props = assign({ MinimumValue: minValue }, props);
186
- }
187
- if (maxValue !== undefined) {
188
- props = assign({ MaximumValue: maxValue }, props);
189
- }
190
- return this.add(title, "SP.FieldCurrency", assign(props, properties));
191
- };
192
- /**
193
- * Adds a new SP.FieldMultiLineText to the collection
194
- *
195
- * @param title The field title
196
- * @param numberOfLines Specifies the number of lines of text to display for the field.
197
- * @param richText Specifies whether the field supports rich formatting.
198
- * @param restrictedMode Specifies whether the field supports a subset of rich formatting.
199
- * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.
200
- * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.
201
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
202
- *
203
- */
204
- _Fields.prototype.addMultilineText = function (title, numberOfLines, richText, restrictedMode, appendOnly, allowHyperlink, properties) {
205
- if (numberOfLines === void 0) { numberOfLines = 6; }
206
- if (richText === void 0) { richText = true; }
207
- if (restrictedMode === void 0) { restrictedMode = false; }
208
- if (appendOnly === void 0) { appendOnly = false; }
209
- if (allowHyperlink === void 0) { allowHyperlink = true; }
210
- var props = {
211
- AllowHyperlink: allowHyperlink,
212
- AppendOnly: appendOnly,
213
- FieldTypeKind: 3,
214
- NumberOfLines: numberOfLines,
215
- RestrictedMode: restrictedMode,
216
- RichText: richText,
217
- };
218
- return this.add(title, "SP.FieldMultiLineText", assign(props, properties));
219
- };
220
- /**
221
- * Adds a new SP.FieldUrl to the collection
222
- *
223
- * @param title The field title
224
- */
225
- _Fields.prototype.addUrl = function (title, displayFormat, properties) {
226
- if (displayFormat === void 0) { displayFormat = UrlFieldFormatType.Hyperlink; }
227
- var props = {
228
- DisplayFormat: displayFormat,
229
- FieldTypeKind: 11,
230
- };
231
- return this.add(title, "SP.FieldUrl", assign(props, properties));
232
- };
233
- /** Adds a user field to the colleciton
234
- *
235
- * @param title The new field's title
236
- * @param selectionMode The selection mode of the field
237
- * @param selectionGroup Value that specifies the identifier of the SharePoint group whose members can be selected as values of the field
238
- * @param properties
239
- */
240
- _Fields.prototype.addUser = function (title, selectionMode, properties) {
241
- var props = {
242
- FieldTypeKind: 20,
243
- SelectionMode: selectionMode,
244
- };
245
- return this.add(title, "SP.FieldUser", assign(props, properties));
246
- };
247
- /**
248
- * Adds a SP.FieldLookup to the collection
249
- *
250
- * @param title The new field's title
251
- * @param lookupListId The guid id of the list where the source of the lookup is found
252
- * @param lookupFieldName The internal name of the field in the source list
253
- * @param properties Set of additional properties to set on the new field
254
- */
255
- _Fields.prototype.addLookup = function (title, lookupListId, lookupFieldName, properties) {
256
- return __awaiter(this, void 0, void 0, function () {
257
- var props, postBody, data;
258
- return __generator(this, function (_a) {
259
- switch (_a.label) {
260
- case 0:
261
- props = assign({
262
- FieldTypeKind: 7,
263
- LookupFieldName: lookupFieldName,
264
- LookupListId: lookupListId,
265
- Title: title,
266
- }, properties);
267
- postBody = body({
268
- "parameters": assign(metadata("SP.FieldCreationInformation"), props),
269
- });
270
- return [4 /*yield*/, spPost(this.clone(Fields, "addfield"), postBody)];
271
- case 1:
272
- data = _a.sent();
273
- return [2 /*return*/, {
274
- data: data,
275
- field: this.getById(data.Id),
276
- }];
277
- }
278
- });
279
- });
280
- };
281
- /**
282
- * Adds a new SP.FieldChoice to the collection
283
- *
284
- * @param title The field title.
285
- * @param choices The choices for the field.
286
- * @param format The display format of the available options for the field.
287
- * @param fillIn Specifies whether the field allows fill-in values.
288
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
289
- */
290
- _Fields.prototype.addChoice = function (title, choices, format, fillIn, properties) {
291
- if (format === void 0) { format = ChoiceFieldFormatType.Dropdown; }
292
- var props = {
293
- Choices: {
294
- results: choices,
295
- },
296
- EditFormat: format,
297
- FieldTypeKind: 6,
298
- FillInChoice: fillIn,
299
- };
300
- return this.add(title, "SP.FieldChoice", assign(props, properties));
301
- };
302
- /**
303
- * Adds a new SP.FieldMultiChoice to the collection
304
- *
305
- * @param title The field title.
306
- * @param choices The choices for the field.
307
- * @param fillIn Specifies whether the field allows fill-in values.
308
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
309
- */
310
- _Fields.prototype.addMultiChoice = function (title, choices, fillIn, properties) {
311
- var props = {
312
- Choices: {
313
- results: choices,
314
- },
315
- FieldTypeKind: 15,
316
- FillInChoice: fillIn,
317
- };
318
- return this.add(title, "SP.FieldMultiChoice", assign(props, properties));
319
- };
320
- /**
321
- * Adds a new SP.FieldBoolean to the collection
322
- *
323
- * @param title The field title.
324
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
325
- */
326
- _Fields.prototype.addBoolean = function (title, properties) {
327
- var props = {
328
- FieldTypeKind: 8,
329
- };
330
- return this.add(title, "SP.Field", assign(props, properties));
331
- };
332
- /**
333
- * Creates a secondary (dependent) lookup field, based on the Id of the primary lookup field.
334
- *
335
- * @param displayName The display name of the new field.
336
- * @param primaryLookupFieldId The guid of the primary Lookup Field.
337
- * @param showField Which field to show from the lookup list.
338
- */
339
- _Fields.prototype.addDependentLookupField = function (displayName, primaryLookupFieldId, showField) {
340
- return __awaiter(this, void 0, void 0, function () {
341
- var path, data;
342
- return __generator(this, function (_a) {
343
- switch (_a.label) {
344
- case 0:
345
- path = "adddependentlookupfield(displayName='" + displayName + "', primarylookupfieldid='" + primaryLookupFieldId + "', showfield='" + showField + "')";
346
- return [4 /*yield*/, spPost(this.clone(Fields, path))];
347
- case 1:
348
- data = _a.sent();
349
- return [2 /*return*/, {
350
- data: data,
351
- field: this.getById(data.Id),
352
- }];
353
- }
354
- });
355
- });
356
- };
357
- /**
358
- * Adds a new SP.FieldLocation to the collection
359
- *
360
- * @param title The field title.
361
- * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
362
- */
363
- _Fields.prototype.addLocation = function (title, properties) {
364
- var props = { FieldTypeKind: 33 };
365
- return this.add(title, "SP.FieldLocation", assign(props, properties));
366
- };
367
- __decorate([
368
- tag("fs.createFieldAsXml")
369
- ], _Fields.prototype, "createFieldAsXml", null);
370
- __decorate([
371
- tag("fs.addText")
372
- ], _Fields.prototype, "addText", null);
373
- __decorate([
374
- tag("fs.addCalculated")
375
- ], _Fields.prototype, "addCalculated", null);
376
- __decorate([
377
- tag("fs.addDateTime")
378
- ], _Fields.prototype, "addDateTime", null);
379
- __decorate([
380
- tag("fs.addNumber")
381
- ], _Fields.prototype, "addNumber", null);
382
- __decorate([
383
- tag("fs.addCurrency")
384
- ], _Fields.prototype, "addCurrency", null);
385
- __decorate([
386
- tag("fs.addMultilineText")
387
- ], _Fields.prototype, "addMultilineText", null);
388
- __decorate([
389
- tag("fs.addUrl")
390
- ], _Fields.prototype, "addUrl", null);
391
- __decorate([
392
- tag("fs.addUser")
393
- ], _Fields.prototype, "addUser", null);
394
- __decorate([
395
- tag("fs.addLookup")
396
- ], _Fields.prototype, "addLookup", null);
397
- __decorate([
398
- tag("fs.addChoice")
399
- ], _Fields.prototype, "addChoice", null);
400
- __decorate([
401
- tag("fs.addMultiChoice")
402
- ], _Fields.prototype, "addMultiChoice", null);
403
- __decorate([
404
- tag("fs.addBoolean")
405
- ], _Fields.prototype, "addBoolean", null);
406
- __decorate([
407
- tag("fs.addDependentLookupField")
408
- ], _Fields.prototype, "addDependentLookupField", null);
409
- __decorate([
410
- tag("fs.addLocation")
411
- ], _Fields.prototype, "addLocation", null);
412
- _Fields = __decorate([
413
- defaultPath("fields")
414
- ], _Fields);
415
- return _Fields;
416
- }(_SharePointQueryableCollection));
417
- export { _Fields };
418
- export var Fields = spInvokableFactory(_Fields);
419
- var _Field = /** @class */ (function (_super) {
420
- __extends(_Field, _super);
421
- function _Field() {
422
- var _this = _super !== null && _super.apply(this, arguments) || this;
423
- _this.delete = deleteable("f");
424
- return _this;
425
- }
426
- /**
427
- * Updates this field instance with the supplied properties
428
- *
429
- * @param properties A plain object hash of values to update for the list
430
- * @param fieldType The type value such as SP.FieldLookup. Optional, looked up from the field if not provided
431
- */
432
- _Field.prototype.update = function (properties, fieldType) {
433
- return __awaiter(this, void 0, void 0, function () {
434
- var info, req, data;
435
- return __generator(this, function (_a) {
436
- switch (_a.label) {
437
- case 0:
438
- if (!(typeof fieldType === "undefined" || fieldType === null)) return [3 /*break*/, 2];
439
- return [4 /*yield*/, Field(this).select("FieldTypeKind").configure({
440
- headers: {
441
- "Accept": "application/json",
442
- },
443
- })()];
444
- case 1:
445
- info = _a.sent();
446
- fieldType = info["odata.type"];
447
- _a.label = 2;
448
- case 2:
449
- req = body(assign(metadata(fieldType), properties), headers({ "X-HTTP-Method": "MERGE" }));
450
- return [4 /*yield*/, spPost(this, req)];
451
- case 3:
452
- data = _a.sent();
453
- return [2 /*return*/, {
454
- data: data,
455
- field: this,
456
- }];
457
- }
458
- });
459
- });
460
- };
461
- /**
462
- * Sets the value of the ShowInDisplayForm property for this field.
463
- */
464
- _Field.prototype.setShowInDisplayForm = function (show) {
465
- return spPost(this.clone(Field, "setshowindisplayform(" + show + ")"));
466
- };
467
- /**
468
- * Sets the value of the ShowInEditForm property for this field.
469
- */
470
- _Field.prototype.setShowInEditForm = function (show) {
471
- return spPost(this.clone(Field, "setshowineditform(" + show + ")"));
472
- };
473
- /**
474
- * Sets the value of the ShowInNewForm property for this field.
475
- */
476
- _Field.prototype.setShowInNewForm = function (show) {
477
- return spPost(this.clone(Field, "setshowinnewform(" + show + ")"));
478
- };
479
- __decorate([
480
- tag("f.update")
481
- ], _Field.prototype, "update", null);
482
- __decorate([
483
- tag("f.setShowInDisplayForm")
484
- ], _Field.prototype, "setShowInDisplayForm", null);
485
- __decorate([
486
- tag("f.setShowInEditForm")
487
- ], _Field.prototype, "setShowInEditForm", null);
488
- __decorate([
489
- tag("f.setShowInNewForm")
490
- ], _Field.prototype, "setShowInNewForm", null);
491
- return _Field;
492
- }(_SharePointQueryableInstance));
493
- export { _Field };
494
- export var Field = spInvokableFactory(_Field);
495
- /**
496
- * Specifies the type of the field.
497
- */
498
- export var FieldTypes;
499
- (function (FieldTypes) {
500
- FieldTypes[FieldTypes["Invalid"] = 0] = "Invalid";
501
- FieldTypes[FieldTypes["Integer"] = 1] = "Integer";
502
- FieldTypes[FieldTypes["Text"] = 2] = "Text";
503
- FieldTypes[FieldTypes["Note"] = 3] = "Note";
504
- FieldTypes[FieldTypes["DateTime"] = 4] = "DateTime";
505
- FieldTypes[FieldTypes["Counter"] = 5] = "Counter";
506
- FieldTypes[FieldTypes["Choice"] = 6] = "Choice";
507
- FieldTypes[FieldTypes["Lookup"] = 7] = "Lookup";
508
- FieldTypes[FieldTypes["Boolean"] = 8] = "Boolean";
509
- FieldTypes[FieldTypes["Number"] = 9] = "Number";
510
- FieldTypes[FieldTypes["Currency"] = 10] = "Currency";
511
- FieldTypes[FieldTypes["URL"] = 11] = "URL";
512
- FieldTypes[FieldTypes["Computed"] = 12] = "Computed";
513
- FieldTypes[FieldTypes["Threading"] = 13] = "Threading";
514
- FieldTypes[FieldTypes["Guid"] = 14] = "Guid";
515
- FieldTypes[FieldTypes["MultiChoice"] = 15] = "MultiChoice";
516
- FieldTypes[FieldTypes["GridChoice"] = 16] = "GridChoice";
517
- FieldTypes[FieldTypes["Calculated"] = 17] = "Calculated";
518
- FieldTypes[FieldTypes["File"] = 18] = "File";
519
- FieldTypes[FieldTypes["Attachments"] = 19] = "Attachments";
520
- FieldTypes[FieldTypes["User"] = 20] = "User";
521
- FieldTypes[FieldTypes["Recurrence"] = 21] = "Recurrence";
522
- FieldTypes[FieldTypes["CrossProjectLink"] = 22] = "CrossProjectLink";
523
- FieldTypes[FieldTypes["ModStat"] = 23] = "ModStat";
524
- FieldTypes[FieldTypes["Error"] = 24] = "Error";
525
- FieldTypes[FieldTypes["ContentTypeId"] = 25] = "ContentTypeId";
526
- FieldTypes[FieldTypes["PageSeparator"] = 26] = "PageSeparator";
527
- FieldTypes[FieldTypes["ThreadIndex"] = 27] = "ThreadIndex";
528
- FieldTypes[FieldTypes["WorkflowStatus"] = 28] = "WorkflowStatus";
529
- FieldTypes[FieldTypes["AllDayEvent"] = 29] = "AllDayEvent";
530
- FieldTypes[FieldTypes["WorkflowEventType"] = 30] = "WorkflowEventType";
531
- })(FieldTypes || (FieldTypes = {}));
532
- export var DateTimeFieldFormatType;
533
- (function (DateTimeFieldFormatType) {
534
- DateTimeFieldFormatType[DateTimeFieldFormatType["DateOnly"] = 0] = "DateOnly";
535
- DateTimeFieldFormatType[DateTimeFieldFormatType["DateTime"] = 1] = "DateTime";
536
- })(DateTimeFieldFormatType || (DateTimeFieldFormatType = {}));
537
- export var DateTimeFieldFriendlyFormatType;
538
- (function (DateTimeFieldFriendlyFormatType) {
539
- DateTimeFieldFriendlyFormatType[DateTimeFieldFriendlyFormatType["Unspecified"] = 0] = "Unspecified";
540
- DateTimeFieldFriendlyFormatType[DateTimeFieldFriendlyFormatType["Disabled"] = 1] = "Disabled";
541
- DateTimeFieldFriendlyFormatType[DateTimeFieldFriendlyFormatType["Relative"] = 2] = "Relative";
542
- })(DateTimeFieldFriendlyFormatType || (DateTimeFieldFriendlyFormatType = {}));
543
- /**
544
- * Specifies the control settings while adding a field.
545
- */
546
- export var AddFieldOptions;
547
- (function (AddFieldOptions) {
548
- /**
549
- * Specify that a new field added to the list must also be added to the default content type in the site collection
550
- */
551
- AddFieldOptions[AddFieldOptions["DefaultValue"] = 0] = "DefaultValue";
552
- /**
553
- * Specify that a new field added to the list must also be added to the default content type in the site collection.
554
- */
555
- AddFieldOptions[AddFieldOptions["AddToDefaultContentType"] = 1] = "AddToDefaultContentType";
556
- /**
557
- * Specify that a new field must not be added to any other content type
558
- */
559
- AddFieldOptions[AddFieldOptions["AddToNoContentType"] = 2] = "AddToNoContentType";
560
- /**
561
- * Specify that a new field that is added to the specified list must also be added to all content types in the site collection
562
- */
563
- AddFieldOptions[AddFieldOptions["AddToAllContentTypes"] = 4] = "AddToAllContentTypes";
564
- /**
565
- * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations
566
- */
567
- AddFieldOptions[AddFieldOptions["AddFieldInternalNameHint"] = 8] = "AddFieldInternalNameHint";
568
- /**
569
- * Specify that a new field that is added to the specified list must also be added to the default list view
570
- */
571
- AddFieldOptions[AddFieldOptions["AddFieldToDefaultView"] = 16] = "AddFieldToDefaultView";
572
- /**
573
- * Specify to confirm that no other field has the same display name
574
- */
575
- AddFieldOptions[AddFieldOptions["AddFieldCheckDisplayName"] = 32] = "AddFieldCheckDisplayName";
576
- })(AddFieldOptions || (AddFieldOptions = {}));
577
- export var CalendarType;
578
- (function (CalendarType) {
579
- CalendarType[CalendarType["Gregorian"] = 1] = "Gregorian";
580
- CalendarType[CalendarType["Japan"] = 3] = "Japan";
581
- CalendarType[CalendarType["Taiwan"] = 4] = "Taiwan";
582
- CalendarType[CalendarType["Korea"] = 5] = "Korea";
583
- CalendarType[CalendarType["Hijri"] = 6] = "Hijri";
584
- CalendarType[CalendarType["Thai"] = 7] = "Thai";
585
- CalendarType[CalendarType["Hebrew"] = 8] = "Hebrew";
586
- CalendarType[CalendarType["GregorianMEFrench"] = 9] = "GregorianMEFrench";
587
- CalendarType[CalendarType["GregorianArabic"] = 10] = "GregorianArabic";
588
- CalendarType[CalendarType["GregorianXLITEnglish"] = 11] = "GregorianXLITEnglish";
589
- CalendarType[CalendarType["GregorianXLITFrench"] = 12] = "GregorianXLITFrench";
590
- CalendarType[CalendarType["KoreaJapanLunar"] = 14] = "KoreaJapanLunar";
591
- CalendarType[CalendarType["ChineseLunar"] = 15] = "ChineseLunar";
592
- CalendarType[CalendarType["SakaEra"] = 16] = "SakaEra";
593
- CalendarType[CalendarType["UmAlQura"] = 23] = "UmAlQura";
594
- })(CalendarType || (CalendarType = {}));
595
- export var UrlFieldFormatType;
596
- (function (UrlFieldFormatType) {
597
- UrlFieldFormatType[UrlFieldFormatType["Hyperlink"] = 0] = "Hyperlink";
598
- UrlFieldFormatType[UrlFieldFormatType["Image"] = 1] = "Image";
599
- })(UrlFieldFormatType || (UrlFieldFormatType = {}));
600
- export var FieldUserSelectionMode;
601
- (function (FieldUserSelectionMode) {
602
- FieldUserSelectionMode[FieldUserSelectionMode["PeopleAndGroups"] = 1] = "PeopleAndGroups";
603
- FieldUserSelectionMode[FieldUserSelectionMode["PeopleOnly"] = 0] = "PeopleOnly";
604
- })(FieldUserSelectionMode || (FieldUserSelectionMode = {}));
605
- export var ChoiceFieldFormatType;
606
- (function (ChoiceFieldFormatType) {
607
- ChoiceFieldFormatType[ChoiceFieldFormatType["Dropdown"] = 0] = "Dropdown";
608
- ChoiceFieldFormatType[ChoiceFieldFormatType["RadioButtons"] = 1] = "RadioButtons";
609
- })(ChoiceFieldFormatType || (ChoiceFieldFormatType = {}));
1
+ import { __awaiter, __decorate, __extends, __generator } from "tslib";
2
+ import { _SharePointQueryableInstance, _SharePointQueryableCollection, spInvokableFactory, deleteable, } from "../sharepointqueryable.js";
3
+ import { assign } from "@pnp/common";
4
+ import { metadata } from "../utils/metadata.js";
5
+ import { body, headers } from "@pnp/odata";
6
+ import { defaultPath } from "../decorators.js";
7
+ import { spPost } from "../operations.js";
8
+ import { tag } from "../telemetry.js";
9
+ var _Fields = /** @class */ (function (_super) {
10
+ __extends(_Fields, _super);
11
+ function _Fields() {
12
+ return _super !== null && _super.apply(this, arguments) || this;
13
+ }
14
+ /**
15
+ * Creates a field based on the specified schema
16
+ *
17
+ * @param xml A string or XmlSchemaFieldCreationInformation instance descrbing the field to create
18
+ */
19
+ _Fields.prototype.createFieldAsXml = function (xml) {
20
+ return __awaiter(this, void 0, void 0, function () {
21
+ var postBody, data;
22
+ return __generator(this, function (_a) {
23
+ switch (_a.label) {
24
+ case 0:
25
+ if (typeof xml === "string") {
26
+ xml = { SchemaXml: xml };
27
+ }
28
+ postBody = body({
29
+ "parameters": assign(metadata("SP.XmlSchemaFieldCreationInformation"), xml),
30
+ });
31
+ return [4 /*yield*/, spPost(this.clone(Fields, "createfieldasxml"), postBody)];
32
+ case 1:
33
+ data = _a.sent();
34
+ return [2 /*return*/, {
35
+ data: data,
36
+ field: this.getById(data.Id),
37
+ }];
38
+ }
39
+ });
40
+ });
41
+ };
42
+ /**
43
+ * Gets a field from the collection by id
44
+ *
45
+ * @param id The Id of the list
46
+ */
47
+ _Fields.prototype.getById = function (id) {
48
+ return tag.configure(Field(this).concat("('" + id + "')"), "fs.getById");
49
+ };
50
+ /**
51
+ * Gets a field from the collection by title
52
+ *
53
+ * @param title The case-sensitive title of the field
54
+ */
55
+ _Fields.prototype.getByTitle = function (title) {
56
+ return tag.configure(Field(this, "getByTitle('" + title + "')"), "fs.getByTitle");
57
+ };
58
+ /**
59
+ * Gets a field from the collection by using internal name or title
60
+ *
61
+ * @param name The case-sensitive internal name or title of the field
62
+ */
63
+ _Fields.prototype.getByInternalNameOrTitle = function (name) {
64
+ return tag.configure(Field(this, "getByInternalNameOrTitle('" + name + "')"), "fs.getByInternalNameOrTitle");
65
+ };
66
+ /**
67
+ * Adds a new field to the collection
68
+ *
69
+ * @param title The new field's title
70
+ * @param fieldType The new field's type (ex: SP.FieldText)
71
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
72
+ */
73
+ _Fields.prototype.add = function (title, fieldType, properties) {
74
+ return __awaiter(this, void 0, void 0, function () {
75
+ var postBody, data;
76
+ return __generator(this, function (_a) {
77
+ switch (_a.label) {
78
+ case 0:
79
+ postBody = body(Object.assign(metadata(fieldType), {
80
+ "Title": title,
81
+ }, properties));
82
+ if (!tag.isTagged(this)) {
83
+ tag.configure(this, "fs.add");
84
+ }
85
+ return [4 /*yield*/, spPost(this.clone(Fields, null), postBody)];
86
+ case 1:
87
+ data = _a.sent();
88
+ return [2 /*return*/, {
89
+ data: data,
90
+ field: this.getById(data.Id),
91
+ }];
92
+ }
93
+ });
94
+ });
95
+ };
96
+ /**
97
+ * Adds a new SP.FieldText to the collection
98
+ *
99
+ * @param title The field title
100
+ * @param maxLength The maximum number of characters allowed in the value of the field.
101
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
102
+ */
103
+ _Fields.prototype.addText = function (title, maxLength, properties) {
104
+ if (maxLength === void 0) { maxLength = 255; }
105
+ var props = {
106
+ FieldTypeKind: 2,
107
+ MaxLength: maxLength,
108
+ };
109
+ return this.add(title, "SP.FieldText", assign(props, properties));
110
+ };
111
+ /**
112
+ * Adds a new SP.FieldCalculated to the collection
113
+ *
114
+ * @param title The field title.
115
+ * @param formula The formula for the field.
116
+ * @param dateFormat The date and time format that is displayed in the field.
117
+ * @param outputType Specifies the output format for the field. Represents a FieldType value.
118
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
119
+ */
120
+ _Fields.prototype.addCalculated = function (title, formula, dateFormat, outputType, properties) {
121
+ if (outputType === void 0) { outputType = FieldTypes.Text; }
122
+ var props = {
123
+ DateFormat: dateFormat,
124
+ FieldTypeKind: 17,
125
+ Formula: formula,
126
+ OutputType: outputType,
127
+ };
128
+ return this.add(title, "SP.FieldCalculated", assign(props, properties));
129
+ };
130
+ /**
131
+ * Adds a new SP.FieldDateTime to the collection
132
+ *
133
+ * @param title The field title
134
+ * @param displayFormat The format of the date and time that is displayed in the field.
135
+ * @param calendarType Specifies the calendar type of the field.
136
+ * @param friendlyDisplayFormat The type of friendly display format that is used in the field.
137
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
138
+ */
139
+ _Fields.prototype.addDateTime = function (title, displayFormat, calendarType, friendlyDisplayFormat, properties) {
140
+ if (displayFormat === void 0) { displayFormat = DateTimeFieldFormatType.DateOnly; }
141
+ if (calendarType === void 0) { calendarType = CalendarType.Gregorian; }
142
+ if (friendlyDisplayFormat === void 0) { friendlyDisplayFormat = DateTimeFieldFriendlyFormatType.Unspecified; }
143
+ var props = {
144
+ DateTimeCalendarType: calendarType,
145
+ DisplayFormat: displayFormat,
146
+ FieldTypeKind: 4,
147
+ FriendlyDisplayFormat: friendlyDisplayFormat,
148
+ };
149
+ return this.add(title, "SP.FieldDateTime", assign(props, properties));
150
+ };
151
+ /**
152
+ * Adds a new SP.FieldNumber to the collection
153
+ *
154
+ * @param title The field title
155
+ * @param minValue The field's minimum value
156
+ * @param maxValue The field's maximum value
157
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
158
+ */
159
+ _Fields.prototype.addNumber = function (title, minValue, maxValue, properties) {
160
+ var props = { FieldTypeKind: 9 };
161
+ if (minValue !== undefined) {
162
+ props = assign({ MinimumValue: minValue }, props);
163
+ }
164
+ if (maxValue !== undefined) {
165
+ props = assign({ MaximumValue: maxValue }, props);
166
+ }
167
+ return this.add(title, "SP.FieldNumber", assign(props, properties));
168
+ };
169
+ /**
170
+ * Adds a new SP.FieldCurrency to the collection
171
+ *
172
+ * @param title The field title
173
+ * @param minValue The field's minimum value
174
+ * @param maxValue The field's maximum value
175
+ * @param currencyLocalId Specifies the language code identifier (LCID) used to format the value of the field
176
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
177
+ */
178
+ _Fields.prototype.addCurrency = function (title, minValue, maxValue, currencyLocalId, properties) {
179
+ if (currencyLocalId === void 0) { currencyLocalId = 1033; }
180
+ var props = {
181
+ CurrencyLocaleId: currencyLocalId,
182
+ FieldTypeKind: 10,
183
+ };
184
+ if (minValue !== undefined) {
185
+ props = assign({ MinimumValue: minValue }, props);
186
+ }
187
+ if (maxValue !== undefined) {
188
+ props = assign({ MaximumValue: maxValue }, props);
189
+ }
190
+ return this.add(title, "SP.FieldCurrency", assign(props, properties));
191
+ };
192
+ /**
193
+ * Adds a new SP.FieldMultiLineText to the collection
194
+ *
195
+ * @param title The field title
196
+ * @param numberOfLines Specifies the number of lines of text to display for the field.
197
+ * @param richText Specifies whether the field supports rich formatting.
198
+ * @param restrictedMode Specifies whether the field supports a subset of rich formatting.
199
+ * @param appendOnly Specifies whether all changes to the value of the field are displayed in list forms.
200
+ * @param allowHyperlink Specifies whether a hyperlink is allowed as a value of the field.
201
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
202
+ *
203
+ */
204
+ _Fields.prototype.addMultilineText = function (title, numberOfLines, richText, restrictedMode, appendOnly, allowHyperlink, properties) {
205
+ if (numberOfLines === void 0) { numberOfLines = 6; }
206
+ if (richText === void 0) { richText = true; }
207
+ if (restrictedMode === void 0) { restrictedMode = false; }
208
+ if (appendOnly === void 0) { appendOnly = false; }
209
+ if (allowHyperlink === void 0) { allowHyperlink = true; }
210
+ var props = {
211
+ AllowHyperlink: allowHyperlink,
212
+ AppendOnly: appendOnly,
213
+ FieldTypeKind: 3,
214
+ NumberOfLines: numberOfLines,
215
+ RestrictedMode: restrictedMode,
216
+ RichText: richText,
217
+ };
218
+ return this.add(title, "SP.FieldMultiLineText", assign(props, properties));
219
+ };
220
+ /**
221
+ * Adds a new SP.FieldUrl to the collection
222
+ *
223
+ * @param title The field title
224
+ */
225
+ _Fields.prototype.addUrl = function (title, displayFormat, properties) {
226
+ if (displayFormat === void 0) { displayFormat = UrlFieldFormatType.Hyperlink; }
227
+ var props = {
228
+ DisplayFormat: displayFormat,
229
+ FieldTypeKind: 11,
230
+ };
231
+ return this.add(title, "SP.FieldUrl", assign(props, properties));
232
+ };
233
+ /** Adds a user field to the colleciton
234
+ *
235
+ * @param title The new field's title
236
+ * @param selectionMode The selection mode of the field
237
+ * @param selectionGroup Value that specifies the identifier of the SharePoint group whose members can be selected as values of the field
238
+ * @param properties
239
+ */
240
+ _Fields.prototype.addUser = function (title, selectionMode, properties) {
241
+ var props = {
242
+ FieldTypeKind: 20,
243
+ SelectionMode: selectionMode,
244
+ };
245
+ return this.add(title, "SP.FieldUser", assign(props, properties));
246
+ };
247
+ /**
248
+ * Adds a SP.FieldLookup to the collection
249
+ *
250
+ * @param title The new field's title
251
+ * @param lookupListId The guid id of the list where the source of the lookup is found
252
+ * @param lookupFieldName The internal name of the field in the source list
253
+ * @param properties Set of additional properties to set on the new field
254
+ */
255
+ _Fields.prototype.addLookup = function (title, lookupListId, lookupFieldName, properties) {
256
+ return __awaiter(this, void 0, void 0, function () {
257
+ var props, postBody, data;
258
+ return __generator(this, function (_a) {
259
+ switch (_a.label) {
260
+ case 0:
261
+ props = assign({
262
+ FieldTypeKind: 7,
263
+ LookupFieldName: lookupFieldName,
264
+ LookupListId: lookupListId,
265
+ Title: title,
266
+ }, properties);
267
+ postBody = body({
268
+ "parameters": assign(metadata("SP.FieldCreationInformation"), props),
269
+ });
270
+ return [4 /*yield*/, spPost(this.clone(Fields, "addfield"), postBody)];
271
+ case 1:
272
+ data = _a.sent();
273
+ return [2 /*return*/, {
274
+ data: data,
275
+ field: this.getById(data.Id),
276
+ }];
277
+ }
278
+ });
279
+ });
280
+ };
281
+ /**
282
+ * Adds a new SP.FieldChoice to the collection
283
+ *
284
+ * @param title The field title.
285
+ * @param choices The choices for the field.
286
+ * @param format The display format of the available options for the field.
287
+ * @param fillIn Specifies whether the field allows fill-in values.
288
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
289
+ */
290
+ _Fields.prototype.addChoice = function (title, choices, format, fillIn, properties) {
291
+ if (format === void 0) { format = ChoiceFieldFormatType.Dropdown; }
292
+ var props = {
293
+ Choices: {
294
+ results: choices,
295
+ },
296
+ EditFormat: format,
297
+ FieldTypeKind: 6,
298
+ FillInChoice: fillIn,
299
+ };
300
+ return this.add(title, "SP.FieldChoice", assign(props, properties));
301
+ };
302
+ /**
303
+ * Adds a new SP.FieldMultiChoice to the collection
304
+ *
305
+ * @param title The field title.
306
+ * @param choices The choices for the field.
307
+ * @param fillIn Specifies whether the field allows fill-in values.
308
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
309
+ */
310
+ _Fields.prototype.addMultiChoice = function (title, choices, fillIn, properties) {
311
+ var props = {
312
+ Choices: {
313
+ results: choices,
314
+ },
315
+ FieldTypeKind: 15,
316
+ FillInChoice: fillIn,
317
+ };
318
+ return this.add(title, "SP.FieldMultiChoice", assign(props, properties));
319
+ };
320
+ /**
321
+ * Adds a new SP.FieldBoolean to the collection
322
+ *
323
+ * @param title The field title.
324
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
325
+ */
326
+ _Fields.prototype.addBoolean = function (title, properties) {
327
+ var props = {
328
+ FieldTypeKind: 8,
329
+ };
330
+ return this.add(title, "SP.Field", assign(props, properties));
331
+ };
332
+ /**
333
+ * Creates a secondary (dependent) lookup field, based on the Id of the primary lookup field.
334
+ *
335
+ * @param displayName The display name of the new field.
336
+ * @param primaryLookupFieldId The guid of the primary Lookup Field.
337
+ * @param showField Which field to show from the lookup list.
338
+ */
339
+ _Fields.prototype.addDependentLookupField = function (displayName, primaryLookupFieldId, showField) {
340
+ return __awaiter(this, void 0, void 0, function () {
341
+ var path, data;
342
+ return __generator(this, function (_a) {
343
+ switch (_a.label) {
344
+ case 0:
345
+ path = "adddependentlookupfield(displayName='" + displayName + "', primarylookupfieldid='" + primaryLookupFieldId + "', showfield='" + showField + "')";
346
+ return [4 /*yield*/, spPost(this.clone(Fields, path))];
347
+ case 1:
348
+ data = _a.sent();
349
+ return [2 /*return*/, {
350
+ data: data,
351
+ field: this.getById(data.Id),
352
+ }];
353
+ }
354
+ });
355
+ });
356
+ };
357
+ /**
358
+ * Adds a new SP.FieldLocation to the collection
359
+ *
360
+ * @param title The field title.
361
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
362
+ */
363
+ _Fields.prototype.addLocation = function (title, properties) {
364
+ var props = { FieldTypeKind: 33 };
365
+ return this.add(title, "SP.FieldLocation", assign(props, properties));
366
+ };
367
+ /**
368
+ * Adds a new SP.FieldLocation to the collection
369
+ *
370
+ * @param title The field title.
371
+ * @param properties Differ by type of field being created (see: https://msdn.microsoft.com/en-us/library/office/dn600182.aspx)
372
+ */
373
+ _Fields.prototype.addImageField = function (title, properties) {
374
+ var props = {
375
+ FieldTypeKind: 34,
376
+ };
377
+ return this.add(title, "SP.FieldMultiLineText", assign(props, properties));
378
+ };
379
+ __decorate([
380
+ tag("fs.createFieldAsXml")
381
+ ], _Fields.prototype, "createFieldAsXml", null);
382
+ __decorate([
383
+ tag("fs.addText")
384
+ ], _Fields.prototype, "addText", null);
385
+ __decorate([
386
+ tag("fs.addCalculated")
387
+ ], _Fields.prototype, "addCalculated", null);
388
+ __decorate([
389
+ tag("fs.addDateTime")
390
+ ], _Fields.prototype, "addDateTime", null);
391
+ __decorate([
392
+ tag("fs.addNumber")
393
+ ], _Fields.prototype, "addNumber", null);
394
+ __decorate([
395
+ tag("fs.addCurrency")
396
+ ], _Fields.prototype, "addCurrency", null);
397
+ __decorate([
398
+ tag("fs.addMultilineText")
399
+ ], _Fields.prototype, "addMultilineText", null);
400
+ __decorate([
401
+ tag("fs.addUrl")
402
+ ], _Fields.prototype, "addUrl", null);
403
+ __decorate([
404
+ tag("fs.addUser")
405
+ ], _Fields.prototype, "addUser", null);
406
+ __decorate([
407
+ tag("fs.addLookup")
408
+ ], _Fields.prototype, "addLookup", null);
409
+ __decorate([
410
+ tag("fs.addChoice")
411
+ ], _Fields.prototype, "addChoice", null);
412
+ __decorate([
413
+ tag("fs.addMultiChoice")
414
+ ], _Fields.prototype, "addMultiChoice", null);
415
+ __decorate([
416
+ tag("fs.addBoolean")
417
+ ], _Fields.prototype, "addBoolean", null);
418
+ __decorate([
419
+ tag("fs.addDependentLookupField")
420
+ ], _Fields.prototype, "addDependentLookupField", null);
421
+ __decorate([
422
+ tag("fs.addLocation")
423
+ ], _Fields.prototype, "addLocation", null);
424
+ __decorate([
425
+ tag("fs.addImage")
426
+ ], _Fields.prototype, "addImageField", null);
427
+ _Fields = __decorate([
428
+ defaultPath("fields")
429
+ ], _Fields);
430
+ return _Fields;
431
+ }(_SharePointQueryableCollection));
432
+ export { _Fields };
433
+ export var Fields = spInvokableFactory(_Fields);
434
+ var _Field = /** @class */ (function (_super) {
435
+ __extends(_Field, _super);
436
+ function _Field() {
437
+ var _this = _super !== null && _super.apply(this, arguments) || this;
438
+ _this.delete = deleteable("f");
439
+ return _this;
440
+ }
441
+ /**
442
+ * Updates this field instance with the supplied properties
443
+ *
444
+ * @param properties A plain object hash of values to update for the list
445
+ * @param fieldType The type value such as SP.FieldLookup. Optional, looked up from the field if not provided
446
+ */
447
+ _Field.prototype.update = function (properties, fieldType) {
448
+ return __awaiter(this, void 0, void 0, function () {
449
+ var info, req, data;
450
+ return __generator(this, function (_a) {
451
+ switch (_a.label) {
452
+ case 0:
453
+ if (!(typeof fieldType === "undefined" || fieldType === null)) return [3 /*break*/, 2];
454
+ return [4 /*yield*/, Field(this).select("FieldTypeKind").configure({
455
+ headers: {
456
+ "Accept": "application/json",
457
+ },
458
+ })()];
459
+ case 1:
460
+ info = _a.sent();
461
+ fieldType = info["odata.type"];
462
+ _a.label = 2;
463
+ case 2:
464
+ req = body(assign(metadata(fieldType), properties), headers({ "X-HTTP-Method": "MERGE" }));
465
+ return [4 /*yield*/, spPost(this, req)];
466
+ case 3:
467
+ data = _a.sent();
468
+ return [2 /*return*/, {
469
+ data: data,
470
+ field: this,
471
+ }];
472
+ }
473
+ });
474
+ });
475
+ };
476
+ /**
477
+ * Sets the value of the ShowInDisplayForm property for this field.
478
+ */
479
+ _Field.prototype.setShowInDisplayForm = function (show) {
480
+ return spPost(this.clone(Field, "setshowindisplayform(" + show + ")"));
481
+ };
482
+ /**
483
+ * Sets the value of the ShowInEditForm property for this field.
484
+ */
485
+ _Field.prototype.setShowInEditForm = function (show) {
486
+ return spPost(this.clone(Field, "setshowineditform(" + show + ")"));
487
+ };
488
+ /**
489
+ * Sets the value of the ShowInNewForm property for this field.
490
+ */
491
+ _Field.prototype.setShowInNewForm = function (show) {
492
+ return spPost(this.clone(Field, "setshowinnewform(" + show + ")"));
493
+ };
494
+ __decorate([
495
+ tag("f.update")
496
+ ], _Field.prototype, "update", null);
497
+ __decorate([
498
+ tag("f.setShowInDisplayForm")
499
+ ], _Field.prototype, "setShowInDisplayForm", null);
500
+ __decorate([
501
+ tag("f.setShowInEditForm")
502
+ ], _Field.prototype, "setShowInEditForm", null);
503
+ __decorate([
504
+ tag("f.setShowInNewForm")
505
+ ], _Field.prototype, "setShowInNewForm", null);
506
+ return _Field;
507
+ }(_SharePointQueryableInstance));
508
+ export { _Field };
509
+ export var Field = spInvokableFactory(_Field);
510
+ /**
511
+ * Specifies the type of the field.
512
+ */
513
+ export var FieldTypes;
514
+ (function (FieldTypes) {
515
+ FieldTypes[FieldTypes["Invalid"] = 0] = "Invalid";
516
+ FieldTypes[FieldTypes["Integer"] = 1] = "Integer";
517
+ FieldTypes[FieldTypes["Text"] = 2] = "Text";
518
+ FieldTypes[FieldTypes["Note"] = 3] = "Note";
519
+ FieldTypes[FieldTypes["DateTime"] = 4] = "DateTime";
520
+ FieldTypes[FieldTypes["Counter"] = 5] = "Counter";
521
+ FieldTypes[FieldTypes["Choice"] = 6] = "Choice";
522
+ FieldTypes[FieldTypes["Lookup"] = 7] = "Lookup";
523
+ FieldTypes[FieldTypes["Boolean"] = 8] = "Boolean";
524
+ FieldTypes[FieldTypes["Number"] = 9] = "Number";
525
+ FieldTypes[FieldTypes["Currency"] = 10] = "Currency";
526
+ FieldTypes[FieldTypes["URL"] = 11] = "URL";
527
+ FieldTypes[FieldTypes["Computed"] = 12] = "Computed";
528
+ FieldTypes[FieldTypes["Threading"] = 13] = "Threading";
529
+ FieldTypes[FieldTypes["Guid"] = 14] = "Guid";
530
+ FieldTypes[FieldTypes["MultiChoice"] = 15] = "MultiChoice";
531
+ FieldTypes[FieldTypes["GridChoice"] = 16] = "GridChoice";
532
+ FieldTypes[FieldTypes["Calculated"] = 17] = "Calculated";
533
+ FieldTypes[FieldTypes["File"] = 18] = "File";
534
+ FieldTypes[FieldTypes["Attachments"] = 19] = "Attachments";
535
+ FieldTypes[FieldTypes["User"] = 20] = "User";
536
+ FieldTypes[FieldTypes["Recurrence"] = 21] = "Recurrence";
537
+ FieldTypes[FieldTypes["CrossProjectLink"] = 22] = "CrossProjectLink";
538
+ FieldTypes[FieldTypes["ModStat"] = 23] = "ModStat";
539
+ FieldTypes[FieldTypes["Error"] = 24] = "Error";
540
+ FieldTypes[FieldTypes["ContentTypeId"] = 25] = "ContentTypeId";
541
+ FieldTypes[FieldTypes["PageSeparator"] = 26] = "PageSeparator";
542
+ FieldTypes[FieldTypes["ThreadIndex"] = 27] = "ThreadIndex";
543
+ FieldTypes[FieldTypes["WorkflowStatus"] = 28] = "WorkflowStatus";
544
+ FieldTypes[FieldTypes["AllDayEvent"] = 29] = "AllDayEvent";
545
+ FieldTypes[FieldTypes["WorkflowEventType"] = 30] = "WorkflowEventType";
546
+ })(FieldTypes || (FieldTypes = {}));
547
+ export var DateTimeFieldFormatType;
548
+ (function (DateTimeFieldFormatType) {
549
+ DateTimeFieldFormatType[DateTimeFieldFormatType["DateOnly"] = 0] = "DateOnly";
550
+ DateTimeFieldFormatType[DateTimeFieldFormatType["DateTime"] = 1] = "DateTime";
551
+ })(DateTimeFieldFormatType || (DateTimeFieldFormatType = {}));
552
+ export var DateTimeFieldFriendlyFormatType;
553
+ (function (DateTimeFieldFriendlyFormatType) {
554
+ DateTimeFieldFriendlyFormatType[DateTimeFieldFriendlyFormatType["Unspecified"] = 0] = "Unspecified";
555
+ DateTimeFieldFriendlyFormatType[DateTimeFieldFriendlyFormatType["Disabled"] = 1] = "Disabled";
556
+ DateTimeFieldFriendlyFormatType[DateTimeFieldFriendlyFormatType["Relative"] = 2] = "Relative";
557
+ })(DateTimeFieldFriendlyFormatType || (DateTimeFieldFriendlyFormatType = {}));
558
+ /**
559
+ * Specifies the control settings while adding a field.
560
+ */
561
+ export var AddFieldOptions;
562
+ (function (AddFieldOptions) {
563
+ /**
564
+ * Specify that a new field added to the list must also be added to the default content type in the site collection
565
+ */
566
+ AddFieldOptions[AddFieldOptions["DefaultValue"] = 0] = "DefaultValue";
567
+ /**
568
+ * Specify that a new field added to the list must also be added to the default content type in the site collection.
569
+ */
570
+ AddFieldOptions[AddFieldOptions["AddToDefaultContentType"] = 1] = "AddToDefaultContentType";
571
+ /**
572
+ * Specify that a new field must not be added to any other content type
573
+ */
574
+ AddFieldOptions[AddFieldOptions["AddToNoContentType"] = 2] = "AddToNoContentType";
575
+ /**
576
+ * Specify that a new field that is added to the specified list must also be added to all content types in the site collection
577
+ */
578
+ AddFieldOptions[AddFieldOptions["AddToAllContentTypes"] = 4] = "AddToAllContentTypes";
579
+ /**
580
+ * Specify adding an internal field name hint for the purpose of avoiding possible database locking or field renaming operations
581
+ */
582
+ AddFieldOptions[AddFieldOptions["AddFieldInternalNameHint"] = 8] = "AddFieldInternalNameHint";
583
+ /**
584
+ * Specify that a new field that is added to the specified list must also be added to the default list view
585
+ */
586
+ AddFieldOptions[AddFieldOptions["AddFieldToDefaultView"] = 16] = "AddFieldToDefaultView";
587
+ /**
588
+ * Specify to confirm that no other field has the same display name
589
+ */
590
+ AddFieldOptions[AddFieldOptions["AddFieldCheckDisplayName"] = 32] = "AddFieldCheckDisplayName";
591
+ })(AddFieldOptions || (AddFieldOptions = {}));
592
+ export var CalendarType;
593
+ (function (CalendarType) {
594
+ CalendarType[CalendarType["Gregorian"] = 1] = "Gregorian";
595
+ CalendarType[CalendarType["Japan"] = 3] = "Japan";
596
+ CalendarType[CalendarType["Taiwan"] = 4] = "Taiwan";
597
+ CalendarType[CalendarType["Korea"] = 5] = "Korea";
598
+ CalendarType[CalendarType["Hijri"] = 6] = "Hijri";
599
+ CalendarType[CalendarType["Thai"] = 7] = "Thai";
600
+ CalendarType[CalendarType["Hebrew"] = 8] = "Hebrew";
601
+ CalendarType[CalendarType["GregorianMEFrench"] = 9] = "GregorianMEFrench";
602
+ CalendarType[CalendarType["GregorianArabic"] = 10] = "GregorianArabic";
603
+ CalendarType[CalendarType["GregorianXLITEnglish"] = 11] = "GregorianXLITEnglish";
604
+ CalendarType[CalendarType["GregorianXLITFrench"] = 12] = "GregorianXLITFrench";
605
+ CalendarType[CalendarType["KoreaJapanLunar"] = 14] = "KoreaJapanLunar";
606
+ CalendarType[CalendarType["ChineseLunar"] = 15] = "ChineseLunar";
607
+ CalendarType[CalendarType["SakaEra"] = 16] = "SakaEra";
608
+ CalendarType[CalendarType["UmAlQura"] = 23] = "UmAlQura";
609
+ })(CalendarType || (CalendarType = {}));
610
+ export var UrlFieldFormatType;
611
+ (function (UrlFieldFormatType) {
612
+ UrlFieldFormatType[UrlFieldFormatType["Hyperlink"] = 0] = "Hyperlink";
613
+ UrlFieldFormatType[UrlFieldFormatType["Image"] = 1] = "Image";
614
+ })(UrlFieldFormatType || (UrlFieldFormatType = {}));
615
+ export var FieldUserSelectionMode;
616
+ (function (FieldUserSelectionMode) {
617
+ FieldUserSelectionMode[FieldUserSelectionMode["PeopleAndGroups"] = 1] = "PeopleAndGroups";
618
+ FieldUserSelectionMode[FieldUserSelectionMode["PeopleOnly"] = 0] = "PeopleOnly";
619
+ })(FieldUserSelectionMode || (FieldUserSelectionMode = {}));
620
+ export var ChoiceFieldFormatType;
621
+ (function (ChoiceFieldFormatType) {
622
+ ChoiceFieldFormatType[ChoiceFieldFormatType["Dropdown"] = 0] = "Dropdown";
623
+ ChoiceFieldFormatType[ChoiceFieldFormatType["RadioButtons"] = 1] = "RadioButtons";
624
+ })(ChoiceFieldFormatType || (ChoiceFieldFormatType = {}));
610
625
  //# sourceMappingURL=types.js.map