@fluid-experimental/property-common 0.49.0 → 0.50.0-41540

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 (130) hide show
  1. package/dist/constants.d.ts +4 -0
  2. package/dist/constants.d.ts.map +1 -1
  3. package/dist/constants.js +4 -0
  4. package/dist/constants.js.map +1 -1
  5. package/dist/packageVersion.d.ts +1 -1
  6. package/dist/packageVersion.d.ts.map +1 -1
  7. package/dist/packageVersion.js +1 -1
  8. package/dist/packageVersion.js.map +1 -1
  9. package/lib/chronometer.d.ts +55 -0
  10. package/lib/chronometer.d.ts.map +1 -0
  11. package/lib/chronometer.js +185 -0
  12. package/lib/chronometer.js.map +1 -0
  13. package/lib/consoleUtils.d.ts +16 -0
  14. package/lib/consoleUtils.d.ts.map +1 -0
  15. package/lib/consoleUtils.js +20 -0
  16. package/lib/consoleUtils.js.map +1 -0
  17. package/lib/constants.d.ts +1219 -0
  18. package/lib/constants.d.ts.map +1 -0
  19. package/lib/constants.js +1274 -0
  20. package/lib/constants.js.map +1 -0
  21. package/lib/datastructures/collection.d.ts +203 -0
  22. package/lib/datastructures/collection.d.ts.map +1 -0
  23. package/lib/datastructures/collection.js +377 -0
  24. package/lib/datastructures/collection.js.map +1 -0
  25. package/lib/datastructures/dataArray.d.ts +275 -0
  26. package/lib/datastructures/dataArray.d.ts.map +1 -0
  27. package/lib/datastructures/dataArray.js +497 -0
  28. package/lib/datastructures/dataArray.js.map +1 -0
  29. package/lib/datastructures/index.d.ts +9 -0
  30. package/lib/datastructures/index.d.ts.map +1 -0
  31. package/lib/datastructures/index.js +9 -0
  32. package/lib/datastructures/index.js.map +1 -0
  33. package/lib/datastructures/integer64.d.ts +47 -0
  34. package/lib/datastructures/integer64.d.ts.map +1 -0
  35. package/lib/datastructures/integer64.js +140 -0
  36. package/lib/datastructures/integer64.js.map +1 -0
  37. package/lib/datastructures/sortedCollection.d.ts +77 -0
  38. package/lib/datastructures/sortedCollection.d.ts.map +1 -0
  39. package/lib/datastructures/sortedCollection.js +140 -0
  40. package/lib/datastructures/sortedCollection.js.map +1 -0
  41. package/lib/deferredPromise.d.ts +28 -0
  42. package/lib/deferredPromise.d.ts.map +1 -0
  43. package/lib/deferredPromise.js +43 -0
  44. package/lib/deferredPromise.js.map +1 -0
  45. package/lib/deterministicRandomGenerator.d.ts +39 -0
  46. package/lib/deterministicRandomGenerator.d.ts.map +1 -0
  47. package/lib/deterministicRandomGenerator.js +83 -0
  48. package/lib/deterministicRandomGenerator.js.map +1 -0
  49. package/lib/error_objects/flaggedError.d.ts +29 -0
  50. package/lib/error_objects/flaggedError.d.ts.map +1 -0
  51. package/lib/error_objects/flaggedError.js +45 -0
  52. package/lib/error_objects/flaggedError.js.map +1 -0
  53. package/lib/error_objects/httpError.d.ts +31 -0
  54. package/lib/error_objects/httpError.d.ts.map +1 -0
  55. package/lib/error_objects/httpError.js +58 -0
  56. package/lib/error_objects/httpError.js.map +1 -0
  57. package/lib/error_objects/httpErrorNoStack.d.ts +25 -0
  58. package/lib/error_objects/httpErrorNoStack.d.ts.map +1 -0
  59. package/lib/error_objects/httpErrorNoStack.js +29 -0
  60. package/lib/error_objects/httpErrorNoStack.js.map +1 -0
  61. package/lib/error_objects/index.d.ts +9 -0
  62. package/lib/error_objects/index.d.ts.map +1 -0
  63. package/lib/error_objects/index.js +9 -0
  64. package/lib/error_objects/index.js.map +1 -0
  65. package/lib/error_objects/operationError.d.ts +32 -0
  66. package/lib/error_objects/operationError.d.ts.map +1 -0
  67. package/lib/error_objects/operationError.js +73 -0
  68. package/lib/error_objects/operationError.js.map +1 -0
  69. package/lib/guidUtils.d.ts +16 -0
  70. package/lib/guidUtils.d.ts.map +1 -0
  71. package/lib/guidUtils.js +297 -0
  72. package/lib/guidUtils.js.map +1 -0
  73. package/lib/hashCalculator.d.ts +6 -0
  74. package/lib/hashCalculator.d.ts.map +1 -0
  75. package/lib/hashCalculator.js +14 -0
  76. package/lib/hashCalculator.js.map +1 -0
  77. package/lib/index.d.ts +16 -0
  78. package/lib/index.d.ts.map +1 -0
  79. package/lib/index.js +16 -0
  80. package/lib/index.js.map +1 -0
  81. package/lib/joinPaths.d.ts +19 -0
  82. package/lib/joinPaths.d.ts.map +1 -0
  83. package/lib/joinPaths.js +28 -0
  84. package/lib/joinPaths.js.map +1 -0
  85. package/lib/packageVersion.d.ts +9 -0
  86. package/lib/packageVersion.d.ts.map +1 -0
  87. package/lib/packageVersion.js +9 -0
  88. package/lib/packageVersion.js.map +1 -0
  89. package/package.json +22 -2
  90. package/platform-dependent/package.json +1 -1
  91. package/src/constants.ts +5 -0
  92. package/src/packageVersion.ts +1 -1
  93. package/dist/test/chronometer.spec.js +0 -90
  94. package/dist/test/chronometer.spec.js.map +0 -1
  95. package/dist/test/datastructures/collection.spec.js +0 -401
  96. package/dist/test/datastructures/collection.spec.js.map +0 -1
  97. package/dist/test/datastructures/dataArray.spec.js +0 -79
  98. package/dist/test/datastructures/dataArray.spec.js.map +0 -1
  99. package/dist/test/datastructures/sortedCollection.spec.js +0 -106
  100. package/dist/test/datastructures/sortedCollection.spec.js.map +0 -1
  101. package/dist/test/deterministicRandomGenerator.spec.js +0 -18
  102. package/dist/test/deterministicRandomGenerator.spec.js.map +0 -1
  103. package/dist/test/error_objects/flaggedError.spec.js +0 -23
  104. package/dist/test/error_objects/flaggedError.spec.js.map +0 -1
  105. package/dist/test/error_objects/httpError.spec.js +0 -61
  106. package/dist/test/error_objects/httpError.spec.js.map +0 -1
  107. package/dist/test/error_objects/httpErrorNoStack.spec.js +0 -55
  108. package/dist/test/error_objects/httpErrorNoStack.spec.js.map +0 -1
  109. package/dist/test/error_objects/operationError.spec.js +0 -132
  110. package/dist/test/error_objects/operationError.spec.js.map +0 -1
  111. package/dist/test/guidUtils.spec.js +0 -184
  112. package/dist/test/guidUtils.spec.js.map +0 -1
  113. package/dist/test/strings/joinPaths.spec.js +0 -18
  114. package/dist/test/strings/joinPaths.spec.js.map +0 -1
  115. package/dist/test/tsconfig.tsbuildinfo +0 -2278
  116. package/nyc/mocha-junit-report.xml +0 -175
  117. package/src/test/chronometer.spec.ts +0 -99
  118. package/src/test/datastructures/collection.spec.ts +0 -567
  119. package/src/test/datastructures/dataArray.spec.ts +0 -81
  120. package/src/test/datastructures/sortedCollection.spec.ts +0 -128
  121. package/src/test/deterministicRandomGenerator.spec.ts +0 -18
  122. package/src/test/error_objects/flaggedError.spec.ts +0 -22
  123. package/src/test/error_objects/httpError.spec.ts +0 -68
  124. package/src/test/error_objects/httpErrorNoStack.spec.ts +0 -64
  125. package/src/test/error_objects/operationError.spec.ts +0 -152
  126. package/src/test/guidUtils.spec.ts +0 -213
  127. package/src/test/strings/joinPaths.spec.ts +0 -17
  128. package/src/test/tsconfig.json +0 -21
  129. package/tsconfig.esnext.tsbuildinfo +0 -824
  130. package/tsconfig.tsbuildinfo +0 -823
@@ -0,0 +1,1274 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ /* eslint-disable max-len */
6
+ /**
7
+ * Error messages for the Schema Validator
8
+ */
9
+ const SchemaValidatorError = {
10
+ /**
11
+ * methods: PropertyFactory.register
12
+ * The context ‘set’ is only valid for properties that are instances of NamedProperties. If you want to
13
+ * use a context of ‘set’, make sure your template includes:
14
+ * Inherits: ‘NamedProperty’
15
+ * Or
16
+ * Inherits: [‘NamedProperty’, …]
17
+ */
18
+ SET_ONLY_NAMED_PROPS: 'SV-001: Only properties that inherit from NamedProperty can have a context of "set". typeid: ',
19
+ /**
20
+ * You updated an existing template but the change to the version number was not as expected.
21
+ * Make sure you updated your version number correctly. You may have violated one of the following rules:
22
+ * - Adding one or more template attributes is a MINOR change.
23
+ * - Removing one or more template attributes is a MAJOR change.
24
+ */
25
+ CHANGE_LEVEL_TOO_LOW_1: "SV-002: Template mutation requires a higher version change level: ",
26
+ /**
27
+ * methods: PropertyFactory.register
28
+ * The template version number is not valid. A valid version number should look like: ‘1.0.0’
29
+ */
30
+ INVALID_VERSION_1: "SV-003: Invalid template version in 'typeid' attribute: ",
31
+ /**
32
+ * methods: PropertyFactory.register
33
+ * Your property template should include a typeid attribute.
34
+ * @example
35
+ *```json
36
+ * {
37
+ * "typeid": "my.example:point2d-1.0.0",
38
+ * "properties": [
39
+ * {"id": "x", "typeid": "Float64"},
40
+ * {"id": "y", "typeid": "Float64"}
41
+ * ]
42
+ *}
43
+ *```
44
+ */
45
+ MISSING_TYPE_ID: "SV-004: Template is missing the mandatory 'typeid' attribute. This is not a valid template: ",
46
+ /**
47
+ * methods: PropertyFactory.register
48
+ * Typeid should contain a template version number.
49
+ * @example
50
+ * “typeid: my.example:point2d-1.0.0”
51
+ */
52
+ MISSING_VERSION: "SV-005: Missing template version in 'typeid' attribute: ",
53
+ /**
54
+ * methods: PropertyFactory.register
55
+ * The template you are using is different from the previous version and you did not update the version number.
56
+ * If any changes were made to the template, you should update the version number to a higher number.
57
+ * - Major change: removing one or more attribute (e.g. 1.0.0 -\> 2.0.0)
58
+ * - Minor change: adding one or more attribute (e.g. 1.0.0 -\> 1.1.0)
59
+ * - Patch: template description changes (e.g. 1.0.0 -\> 1.0.1)
60
+ */
61
+ MODIFIED_TEMPLATE_1: "SV-006: Template has changed at path: ",
62
+ /**
63
+ * methods: PropertyFactory.register
64
+ * When changing your template, you need to increase its version number. For example, if the previous version
65
+ * number was 1.0.0, it should increase to 1.0.1 for a patch (if the template description has changed),
66
+ * to 1.1.0 for a minor change (if you added one or more attributes) or to 2.0.0 for a major change (if you
67
+ * removed one or more attributes).
68
+ */
69
+ MODIFIED_TEMPLATE_SAME_VERSION_1: "SV-007: Template has changed but its version was not increased. Path: ",
70
+ /**
71
+ * methods: PropertyFactory.register
72
+ * PropertyFactory.register requires a template as a parameter.
73
+ */
74
+ NO_TEMPLATE: "SV-008: Template cannot be null or undefined.",
75
+ /**
76
+ * methods: PropertyFactory.register
77
+ * When updating a template’s version number, the version number can only increase, never decrease.
78
+ */
79
+ VERSION_REGRESSION_1: "SV-009: New template version is older than the previously registered version: ",
80
+ /**
81
+ * Your template contains a typeid that is not a string.
82
+ */
83
+ TYPEID_MUST_BE_STRING: "SV-010: typeid must be a string. This is not valid: ",
84
+ /**
85
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
86
+ * The TemplateValidator constructor should have in its parameters param.inheritsFrom and params.hasSchema.
87
+ * Neither of them can be undefined.
88
+ */
89
+ MISSING_INHERITSFROM_OR_HASSCHEMA: "SV-011: Internal error: TemplateValidator constructor missing one of inheritsFrom or hasSchema function",
90
+ /**
91
+ * Your template has an invalid key for the kind of map it is.
92
+ */
93
+ KEY_MUST_BE_TYPEID: "SV-012: A key of a typeid key map must be a valid typeids. Key: ",
94
+ /**
95
+ * Your template has an invalid contextKeyType parameter.
96
+ */
97
+ INVALID_OPTION_NONE_CONSTANTS: "SV-013: A map with typeids as keys must be constant",
98
+ /**
99
+ * You tried to use draft as a versoin when it is not enabled.
100
+ */
101
+ DRAFT_AS_VERSION_TYPEID: "SV-014: By default, draft is not a valid version for a typeId. Set allowDraft to true to support this.",
102
+ };
103
+ const TypeidHelperError = {
104
+ /**
105
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
106
+ */
107
+ TYPEID_NOT_DEFINED: "TH-001: extractVersion requires a typeid parameter",
108
+ };
109
+ const PropertyError = {
110
+ TYPEID_NOT_NATIVE: "TYPEID_NOT_NATIVE",
111
+ /**
112
+ * methods: ArrayProperty.length.set, StringProperty.length.set
113
+ * Cannot directly set the array.length or string.length. This is a read-only property.
114
+ */
115
+ MODIFY_READ_ONLY: "PR-001: Trying to modify read only property value (array.length).",
116
+ /**
117
+ * methods: Property.getRelativePath
118
+ * There is no path between the property and the ancestor you passed in to .getRelativePath.
119
+ */
120
+ NO_PATH_BETWEEN: "PR-002: No path between ",
121
+ /**
122
+ * methods: Property.applyChangeSet
123
+ * One of the paths included in your changeSet is not valid for this property.
124
+ * Check that the modifications in the changeSet match the structure of the template.
125
+ */
126
+ INVALID_PATH: "PR-003: Invalid path in ChangeSet: ",
127
+ /**
128
+ * methods: NodeProperty.insert
129
+ * The property you inserted into a NodeProperty has a parent.
130
+ * If your property has a parent, changing the property’s id will break the parent.
131
+ * Make the change to the parent first.
132
+ */
133
+ ID_CHANGE_FOR_PROPERTY_WITH_PARENT: "PR-004: Cannot change the ID of a property that has a parent. Could not change id: ",
134
+ /**
135
+ * methods: Property.resolvePath
136
+ * Part of the path entered to Property.resolvePath was not valid.
137
+ */
138
+ INVALID_PATH_TOKEN: "PR-005: ResolvePath error: accessed a child via an invalid path syntax: ",
139
+ /**
140
+ * methods: MapProperty.insert, NodeProperty.insert, ReferenceMapProperty.insert, Workspace.insert,
141
+ * SetProperty.insert
142
+ * Your map, set or nodeproperty already contains an entry under in_key.
143
+ */
144
+ PROPERTY_ALREADY_EXISTS: "PR-006: The property already exists in this collection: ",
145
+ /**
146
+ * methods: MapProperty.applyChangeset, NodeProperty.applyChangeset, SetProperty.applyChangeset
147
+ * The changeset you applied contains properties that have already been inserted.
148
+ * Check the ‘insert’ fields in your changeSet for properties that might already exist.
149
+ */
150
+ INSERTED_EXISTING_ENTRY: "PR-007: Inserted an already existing entry: ",
151
+ /**
152
+ * methods: MapProperty.remove, SetProperty.remove
153
+ * Tried to remove an entry that does not exist.
154
+ * This can be caused indirectly by deserialize / applyChangeset methods.
155
+ * One of the ‘remove’ fields in your changeSet must contain a property that does not exist.
156
+ */
157
+ REMOVED_NON_EXISTING_ENTRY: "PR-008: Trying to remove a non-existing entry: ",
158
+ /**
159
+ * methods: MapProperty.applyChangeset, NodeProperty.applyChangeset, SetProperty.applyChangeset
160
+ * One of the key you are trying to modify in your changeSet does not exist.
161
+ * One of the ‘modify’ fields in your changeSet refers to a property that does not exist.
162
+ */
163
+ MODIFY_NON_EXISTING_ENTRY: "PR-009: Trying to modify a not existing entry: ",
164
+ /**
165
+ * methods: MapProperty.insert, MapProperty.set, SetProperty.insert, NodeProperty.insert
166
+ * The value you are trying to insert in your map property, set property or node property has a parent.
167
+ * You cannot insert a property that has a parent.
168
+ */
169
+ INSERTED_ENTRY_WITH_PARENT: "PR-010: Trying to insert into a collection a property that already has " +
170
+ "a parent.",
171
+ /**
172
+ * methods: Property.resolvePath, Workspace.resolvePath
173
+ * Paths should not contain empty sections such as ‘..’, ‘//’ or ‘[], etc.
174
+ * Sections in the path are delimited by ‘.’ ‘[ ]’, ‘/’ .
175
+ * There should always be a path between any two delimiters.
176
+ */
177
+ EMPTY_TOKEN: "PR-011: ResolvePath error: Encountered empty token in path: ",
178
+ /**
179
+ * methods: Property.resolvePath, Workspace.resolvePath
180
+ * Paths should not contain quotes except at the beginning and end of the path.
181
+ * For example: resolvePath('my"path.nested".other') is not valid because the first quote is in front of ‘path’
182
+ * but after the ‘.nested’ which is part of the subsequent path.
183
+ */
184
+ QUOTES_WITHIN_TOKEN: "PR-012: ResolvePath error: Quotes must only be at the start and the " +
185
+ "end of a path. Error in path: ",
186
+ /**
187
+ * methods: Property.resolvePath, Workspace.resolvePath
188
+ * Paths should not end with a ‘.’
189
+ */
190
+ DOT_AT_END: "PR-013: ResolvePath error: Encountered a dot at the end of path: ",
191
+ /**
192
+ * methods: Property.resolvePath, Workspace.resolvePath
193
+ * Paths using square brackets should not contain ‘.’ within those square brackets.
194
+ * If your path contains any dots, these should be escaped e.g. [my\.path] instead of [my.path].
195
+ */
196
+ DOTS_IN_SQUARE_BRACKETS: "PR-014: ResolvePath error: Encountered a dot within a square bracket. " +
197
+ "These have to be escaped. Error in path: ",
198
+ /**
199
+ * methods: Property.resolvePath, Workspace.resolvePath
200
+ * resolvePath error while parsing your string.
201
+ * It encountered an end to a path segment that was not
202
+ * followed by a “.” or a “[“ indicating the beginning of a new segment.
203
+ */
204
+ MISSING_DOT_AT_SEGMENT_START: "PR-015: Missing . or [ at segment start in path: ",
205
+ /**
206
+ * methods: Property.resolvePath, Workspace.resolvePath
207
+ * Closing square bracket not followed by the correct character (., [ or *).
208
+ * For example, this is not valid: resolvePath(myArray[2]nested).
209
+ * This is valid: resolvePath(myArray[2].nested).
210
+ */
211
+ INVALID_END_OF_SQUARE_BRACKETS: "PR-016: ResolvePath error: Square brackets have to be followed either " +
212
+ 'by "." or by "[" or by "*". Error in path: ',
213
+ /**
214
+ * methods: Property.resolvePath, Workspace.resolvePath
215
+ * Every opening bracket ([) needs a matching closing bracket (])
216
+ */
217
+ UNCLOSED_BRACKETS: "PR-017: ResolvePath error: Unclosed brackets at the end of path: ",
218
+ /**
219
+ * methods: Property.resolvePath, Workspace.resolvePath
220
+ * Any closing bracket (]) must be preceded by a matching opening bracket ([).
221
+ */
222
+ CLOSING_BRACKET_WITHOUT_OPENING: "PR-018: ResolvePath error: Encountered closing bracket without " +
223
+ "corresponding opening one in path: ",
224
+ /**
225
+ * methods: Property.resolvePath, Workspace.resolvePath
226
+ */
227
+ INVALID_ESCAPE_SEQUENCE: "PR-019: Encountered an invalid escape sequence in path: ",
228
+ /**
229
+ * methods: Property.resolvePath, Workspace.resolvePath
230
+ * A quotation mark at the beginning of a path must have a matching closing quotation mark
231
+ * at the end of the same path.
232
+ */
233
+ UNCLOSED_QUOTATION_MARKS: "PR-020: ResolvePath error: Encountered unclosed quotation marks in path: ",
234
+ /**
235
+ * methods: SetProperty.insert, SetProperty.set, SetProperty.setValues
236
+ * The property you insert in a setProperty must be an instance of NamedProperty.
237
+ * When creating the property to be inserted, make sure it inherits from NamedProperty.
238
+ * @example
239
+ * #Creating a property that inherits from NamedProperty
240
+ * ```json
241
+ * {
242
+ * typeid:”my.example:myprop-1.0.0”,
243
+ * inherits:’NamedProperty’ (or [‘NamedProperty’, …]
244
+ * ...
245
+ * }
246
+ *```
247
+ */
248
+ CANT_INSERT_NON_NAMED_PROPERTIES: "PR-021: Set can only contain named properties",
249
+ /**
250
+ * methods: NodeProperty.insert, Workspace.insert
251
+ * The property you inserted does not have an id.
252
+ * Unless the property is an instance of NamedProperty, you must pass in an id as the first parameter
253
+ * (and the property second)
254
+ */
255
+ ADDED_CHILD_WITHOUT_ID: "PR-022: Added child without id.",
256
+ /**
257
+ * methods: ArrayProperty.resolvePath
258
+ * Cannot use .resolvePath on a primitive array, only on a Custom type array.
259
+ * For a primitive array, use .getValue instead.
260
+ * For example, instead of MyValueArray.resolvePath(1), use MyValueArray.getValue(1)
261
+ */
262
+ NO_PATHS_FOR_NON_PRIMITIVE_ARRAYS: "PR-023: Path resolution is not supported for primitive type arrays.",
263
+ /**
264
+ * methods: ArrayProperty.resolvePath
265
+ * When using an array index as part of your path, it needs to have a numeric value.
266
+ */
267
+ INVALID_NON_NUMERIC_SEGMENT_IN_PATH: "PR-024: ResolvePath error: Accessed an array via an non numeric index: ",
268
+ /**
269
+ * methods: ArrayProperty.getRelativePath, ArrayProperty.getAbsolutePath
270
+ * INTERNAL ERROR
271
+ * If you encounter this error, please contact the development team.
272
+ * Part of the path you are trying to find points to a non-existing array item.
273
+ */
274
+ GET_PATH_SEGMENT_CALLED_FOR_NON_ENTRY: "PR-025: Internal error: _getPathSegmentForChildNode has been called " +
275
+ "for an entry that is not an entry of the collection. ",
276
+ /**
277
+ * methods:
278
+ * The changeSet passed to .deserialize was not a valid non-normalized changeset.
279
+ */
280
+ NO_NORMALIZED_CHANGESET: "PR-026: deserialize was called with a non-normalized ChangeSet.",
281
+ /**
282
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
283
+ * One of your changesets contained a NamedProperty without a GUID.
284
+ * This should not happen and should have been validated already.
285
+ */
286
+ MISSING_GUID_IN_NORMALIZED_CHANGESET: "PR-027: Missing GUID in a normalized ChangeSet with named properties",
287
+ /**
288
+ * methods: EnumProperty.getEnumString, EnumProperty.setValue, EnumProperty.setEnumByString,
289
+ * EnumProperty.getEnumString, EnumArrayProperty.getEnumStrings
290
+ * This Enum Property does not have any entry with that value.
291
+ * EnumProperty.getEnumByString -\> the EnumProperty you used to pass this function does not have an entry.
292
+ * EnumProperty.setValue -\> no entry exists for in_value
293
+ * EnumProperty.setEnumByString -\> no entry exists for in_stringId
294
+ * EnumArrayProperty.getEnumString -\> the value found at in_position does not correspond to an entry.
295
+ * EnumArrayProperty.getEnumStrings -\> one of the values found at one of the positions sought does
296
+ * not correspond to an entry.
297
+ */
298
+ UNKNOWN_ENUM: "PR-028: enum value unknown: ",
299
+ /**
300
+ * methods: Property.applyChangeSet
301
+ * Changeset contains an operation that is unknown.
302
+ * Valid operations are insert, modify and remove.
303
+ */
304
+ UNKNOWN_OPERATION: "PR-029: Unknown ChangeSet operation: ",
305
+ /**
306
+ * methods: Workspace.remove, NodeProperty.remove
307
+ * The property you passed to workspace.remove or nodeProperty.remove does not exist.
308
+ * Check that you passed the correct property, and that it has not yet been removed.
309
+ */
310
+ REMOVING_NON_EXISTING_KEY: "PR-033: Trying to remove something that does not exist: ",
311
+ /**
312
+ * methods: Workspace.get, Property.get
313
+ * Workspace.get and Property.get take in an id (string or number) or an array of ids.
314
+ * @example
315
+ * ```ts
316
+ *.get(‘position’).get(‘x’) or .get([‘property’, ‘x’])
317
+ * ```
318
+ */
319
+ STRING_OR_ARRAY_STRINGS: "PR-034: in_id must be a string, a number or an array of these. This is not valid: ",
320
+ /**
321
+ * methods: Property.serialize
322
+ * Property.serialize only takes in one parameter: an options object. That parameter is optional.
323
+ */
324
+ SERIALIZE_TAKES_OBJECT: "PR-035: Argument of serialize() should be an object.",
325
+ /**
326
+ * ArrayProperty.insert, ArrayProperty.insertRange
327
+ * The in_position (for .insert) or in_offset (for .insertRange) should not be smaller than 0
328
+ * or larger than the length of the array.
329
+ */
330
+ START_OFFSET_INVALID: "PR-036: ArrayProperty: insert range - Start offset is invalid: ",
331
+ // PR-037 removed
332
+ /**
333
+ * ArrayProperty.remove, ArrayProperty.removeRange, ArrayProperty.pop
334
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
335
+ * The item (or one of the items) you are trying to remove from the array has a parent that is not the array.
336
+ * This should not happen because you should not have been able to insert the item in the array in the first place.
337
+ */
338
+ CANNOT_REMOVE_WITH_DIFFERENT_PARENT: "PR-038: Internal error: Trying to remove from an array a property that " +
339
+ "has not the array as parent.",
340
+ /**
341
+ * methods ArrayProperty.set, ArrayProperty.setRange
342
+ * Your first parameter: in_position (for .set) and in_offset (for .setRange) cannot have a negative value.
343
+ */
344
+ START_OFFSET_NEGATIVE: "PR-039: ArrayProperty: Modify range - Start offset cannot be negative: ",
345
+ /**
346
+ * methods: ArrayProperty.removeRange, ArrayProperty.setRange, ArrayProperty.insertRange,
347
+ * ArrayProperty.insert, EnumArrayProperty.getEnumStrings
348
+ * The parameter needs to be a number.
349
+ * For .removeRange: in_offset and in_deleteCount
350
+ * For .setRange: in_offset
351
+ * For .insertRange: in_offset
352
+ * For .getEnumStrings: in_offset, in_length
353
+ * For StringProperty.insert: in_position
354
+ */
355
+ NOT_NUMBER: "PR-049: This parameter must be a number: parameter: ",
356
+ /**
357
+ * methods: Property.traverseUp, Property.traverseDown
358
+ * Property.traverseUp and Property.traverseDown take one parameter: a callback function
359
+ */
360
+ CALLBACK_NOT_FCT: "PR-050: traverseUp / traverseDown parameter: in_callback must " +
361
+ "be a function.",
362
+ /**
363
+ * methods: ArrayProperty.insertRange
364
+ * Array.insertRange takes two parameters. The second one (in_array) must be an array.
365
+ * To pass in only one item, either use .insert(index, item)
366
+ * or put that item into an array: .insertRange(index, [item])
367
+ */
368
+ IN_ARRAY_NOT_ARRAY: "PR-051: Parameter error: in_array must be an array for method: ",
369
+ /**
370
+ * methods: EnumProperty.setEnumByString
371
+ * EnumProperty.setEnumByString takes one parameter: a string id. It must be a string.
372
+ */
373
+ STRING_ID_MUST_BE_STRING: "PR-052: EnumProperty.setEnumByString parameter: in_stringId must " +
374
+ "be a string. This is not valid: ",
375
+ /**
376
+ * methods: Integer64Property.setValueHigh
377
+ * Integer64Property.setValueHigh takes one parameter: a number.
378
+ */
379
+ IN_HIGH_MUST_BE_NUMBER: "PR-053: Integer64Property.setValueHigh parameter: in_high must " +
380
+ "be a number. This is not valid: ",
381
+ /**
382
+ * methods: Integer64Property.setValueLow
383
+ * Integer64Property.setValueLow takes one parameter: a number.
384
+ */
385
+ IN_LOW_MUST_BE_NUMBER: "PR-054: Integer64Property.setValueLow parameter: in_low must " +
386
+ "be a number. This is not valid: ",
387
+ /**
388
+ * methods: IntegerProperty.toString
389
+ * Integer64Property.toString takes one optional parameter: a number (in_radix).
390
+ * If no value is passed, will default to 10.
391
+ */
392
+ IN_RADIX_MUST_BE_NUMBER: "PR-055: Integer64Property.toString parameter: in_radix must be a number. This is not valid: ",
393
+ /**
394
+ * methods: IntegerProperty.fromString
395
+ * Integer64Property.fromString takes two parameters. The first parameter (in_string) must be a string.
396
+ * (the second parameter is in_radix, a number. It is optional: defaults to 10).
397
+ */
398
+ IN_STRING_MUST_BE_STRING: "PR-056: Integer64Property.fromString parameter: in_string must " +
399
+ "be a string. This is not valid: ",
400
+ /**
401
+ * methods: Integer64Property.fromString
402
+ * Integer64Property.fromString takes two parameters. The second parameter is optional but if passed,
403
+ * it must be a number between 2 and 36. If not passed, it defaults to 10. (the first parameter is
404
+ * in_string and must be a string).
405
+ */
406
+ IN_RADIX_BETWEEN_2_36: "PR-057: Integer64Property.fromString parameter: in_radix must be a " +
407
+ "number between 2 and 36. This is not valid: ",
408
+ /**
409
+ * methods MapProperty.insert, ReferenceMapProperty.set
410
+ * MapProperty.insert and ReferenceMapProperty.set both take two parameters.
411
+ * The first parameter (in_key) must be a string.
412
+ */
413
+ KEY_NOT_STRING: "PR-058: MapProperty.insert / ReferenceMapProperty.set parameter: " +
414
+ "in_key must be a string. This is not valid: ",
415
+ /**
416
+ * methods: NodeProperty.insert, Workspace.insert
417
+ * he second parameter (in_property) must be a valid property (it must be an instance of BaseProperty).
418
+ */
419
+ NOT_A_PROPERTY: "PR-059: NodeProperty.insert parameter in_property is not a property. " +
420
+ "The property you passed is not a valid property.",
421
+ /**
422
+ * methods: ReferenceProperty.set / setValue, ReferenceMapProperty.insert / set / setValue / setValues,
423
+ * ReferenceArrayProperty.enqueue / push / unshift / insert / insertRange / set / setRange / setValue / setValues
424
+ * The provided value (or values) must be a valid property (an instance of BaseProperty), be undefined or a string (a path).
425
+ */
426
+ PROPERTY_OR_UNDEFINED: "PR-060: Parameter for setting a Reference should be a path to a property, a property or undefined. This is not valid: ",
427
+ /**
428
+ * ArrayProperty.insertRange, ArrayProperty.insert, ArrayProperty.push
429
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
430
+ * The item (or one of the items) you are trying to insert in this array has a parent that is not the array.
431
+ */
432
+ NO_INSERT_WITH_PARENT: "PR-088: Internal error: Trying to insert a property into an array or " +
433
+ "string that already has a parent.",
434
+ /**
435
+ * methods: ArrayProperty.get
436
+ * ArrayProperty.get takes in one parameter: in_position, which can a single position or an array.
437
+ * If it is a single position, it is the numerical position of the item in the array.
438
+ * It must be a number or a string that parses into a number (e.g. '2').
439
+ * If you pass in an array, the first item of the array must be a number or a string that parses into a number.
440
+ * (other items in the array are child paths within the array item at this position).
441
+ * This error happens only when in_position is an array.
442
+ */
443
+ FIRST_ITEM_MUST_BE_NUMBER: "PR-092: The first item in the in_position array must be an array " +
444
+ "position (a number). This is not valid: ",
445
+ /**
446
+ * methods: ArrayProperty.get
447
+ * ArrayProperty.get takes in one parameter: in_position, which can a single position or an array.
448
+ * If it is a single position, it is the numerical position of the item in the array.
449
+ * It must be a number or a string that parses into a number (e.g. '2').
450
+ * If you pass in an array, the first item of the array must be a number or a string that parses into a number
451
+ * (other items in the array are child paths within the array item at this position).
452
+ * This error happens only when in_position is a single position.
453
+ */
454
+ IN_POSITION_MUST_BE_NUMBER: "PR-093: in_position must be a number. This is not valid: ",
455
+ /**
456
+ * methods: Property.getValue
457
+ * Property.getValue takes one parameter: in_id.
458
+ * It can either be a string or an array of strings. It cannot be an empty array.
459
+ */
460
+ CANNOT_BE_EMPTY_ARRAY: "PR-095: Property.getValue parameter: in_id cannot be an empty array.",
461
+ /**
462
+ * methods: EnumArrayProperty.set
463
+ * EnumArrayProperty.set takes two parameters: in_index and in_value.
464
+ * In_value should be a number. setValue cannot be used to set enum by string.
465
+ * Use .setEnumByString instead.
466
+ */
467
+ VALUE_SHOULD_BE_NUMBER: "PR-096: EnumArrayProperty.set parameter: in_value should be " +
468
+ "a number. To set the value of an enum string, use .setEnumByString " +
469
+ "instead.",
470
+ /**
471
+ * methods: EnumArrayProperty.setEnumByString
472
+ * EnumArrayProperty.setEnumByString cannot be use to set enum by number. Use .set instead.
473
+ */
474
+ VALUE_SHOULD_BE_STRING: "PR-098: EnumArrayProperty.setEnumByString parameter: in_value should be " +
475
+ "a string. To set a number, use .set instead.",
476
+ /**
477
+ * methods: ArrayProperty.get
478
+ * In_position or in_offset is either lower than 0 or higher than the length of the array.
479
+ * Make sure that the property you are trying to get from the array exists and that the position is correct.
480
+ */
481
+ GET_OUT_OF_RANGE: "PR-106: Trying to access out of bounds at index: ",
482
+ /**
483
+ * methods: ArrayProperty.setRange, ArrayProperty.set
484
+ * setRange: Either in_offset is lower than zero or in_offset + length of in_array is higher than
485
+ * the length of the array. If you need to add items that were not there before, add those using
486
+ * .push, .insert or .insertRange.
487
+ */
488
+ SET_OUT_OF_BOUNDS: "PR-107: Trying to set out of bounds. ",
489
+ /**
490
+ * methods: ArrayProperty.removeRange, ArrayProperty.remove
491
+ * RemoveRange: Either in_offset is smaller than zero or in_offset + in_deleteCount is higher than
492
+ * the length of the array. Make sure that the properties you are trying to remove exist in that
493
+ * array and that you entered the positions correctly.
494
+ * Remove: in_offset is either smaller than zero or larger than the length of the array.
495
+ */
496
+ REMOVE_OUT_OF_BOUNDS: "PR-110: Trying to remove out of bounds. ",
497
+ /**
498
+ * methods: PropertyFactory.create
499
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
500
+ * Warning: Something went wrong when creating your property: it did not successfully create
501
+ * the property and then tried to set its value.
502
+ */
503
+ NON_EXISTING_PROPERTY_REPOSITORY_REFERENCE: "PR-111: Internal error: PropertyFactory.create failed to create " +
504
+ "this property.",
505
+ /**
506
+ * methods: Property.setValues
507
+ * One of the path you used in .setValues leads to a property.
508
+ * When passing an object to setValues, make sure that all paths lead to a primitive value.
509
+ */
510
+ SET_VALUES_PATH_PROPERTY: "PR-115: trying to set value to a path leading to a property: ",
511
+ /**
512
+ * methods: Property.setValues
513
+ * One of the path in the object you passed to .setValues does not match the structure of this property.
514
+ */
515
+ SET_VALUES_PATH_INVALID: "PR-116: trying to set value to an invalid path: ",
516
+ /**
517
+ * methods: Property.setValues
518
+ * .setValues takes one parameter: an object containing paths to the values to be changed.
519
+ * It should be an object (or in the case of ArrayProperty, an array)
520
+ */
521
+ SET_VALUES_PARAM_NOT_OBJECT: "PR-117: setValues parameter: in_properties must be an object.",
522
+ /**
523
+ * methods: PropertyFactory.create
524
+ * The array you tried to create had a typeid that was no recognized.
525
+ * It was not a custom type array or one of the following: ‘String’, ‘Int64’, ‘Uint64’ or ‘Bool’.
526
+ */
527
+ UNKNOWN_ARRAY_TYPEID: "PR-118: Unknown typeid in array: ",
528
+ /**
529
+ * methods: MapProperty.insert, MapProperty.set
530
+ * .insert and .set take two parameters. The first one is in_id (or in_key), which is the id under
531
+ * which the property is added. It can only be a string or a number. Only in the case of named
532
+ * property can it be omitted.
533
+ */
534
+ ID_STRING_OR_NUMBER: "PR-119: id should be a string or a number. This is not valid: ",
535
+ /**
536
+ * methods: ValueProperty.deserialize
537
+ * .deserialize takes on parameter: a serialized object. It cannot be undefined.
538
+ */
539
+ DESERIALIZE_EMPTY_CHANGESET: "PR-121: ValueProperty.deserialize() called on an empty changeset",
540
+ /**
541
+ * methods: IntMapProperty.insert, UintMapProperty.insert
542
+ * You tried to insert into a (u)Int64MapProperty or (u)Int64ArrayProperty properties that
543
+ * were not Int64 or UInt64 properties or properties that can be casted to the correct type.
544
+ */
545
+ INT_64_NON_INT64_TYPE: "PR-122: Tried to use (u)Int64MapProperty or (u)Int64ArrayProperty with an invalid type.",
546
+ /**
547
+ * methods: Integer64.toString, Integer64.fromString
548
+ */
549
+ BASE_OUT_OF_RANGE: "PR-123: Base is out of range. Base should be in range [2,36]. This is not valid: ",
550
+ /**
551
+ * methods: Integer64.fromString
552
+ * If your property is an instance of Uint64, you cannot set it to a negative number.
553
+ * Uint64 does not support negative numbers. Use Int64 if you need to support negative numbers.
554
+ */
555
+ CANNOT_UPDATE_TO_NEGATIVE: "PR-124: Cannot update value to negative: ",
556
+ /**
557
+ * methods: Integer64.fromString
558
+ * The string you passed as a first parameter to .fromString contains non-numerical characters.
559
+ */
560
+ CANNOT_PARSE_INVALID_CHARACTERS: "PR-125: Cannot parse. String contains invalid characters: ",
561
+ /**
562
+ * methods: Property constructor
563
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
564
+ * Something went wrong while the property constructor was creating a property.
565
+ * The parameters it received were not objects.
566
+ */
567
+ PROP_CONSTRUCTOR_EXPECTS_OBJECTS: "PR-126: Internal error: Object expected as parameters to " +
568
+ "BaseProperty constructor",
569
+ /**
570
+ * methods: Property.applyChangeSet
571
+ * One of the ‘modify’ field in your changeset points to an index in the array that does not exist.
572
+ * Check that the changeset you passed to applyChangeSet is valid. If you did not enter the changeSet yourself,
573
+ * this is an internal error and you should contact the development team.
574
+ */
575
+ INDEX_INVALID: "PR-131: modified property - index invalid: ",
576
+ /**
577
+ * methods: Property.isAncestorOf, Property.isDescendantOf
578
+ * Property.isAncestorOf and .isDescendantOf take one parameter: a property. It cannot be undefined.
579
+ */
580
+ MISSING_IN_OTHERPROP: "PR-132: isAncestorOf parameter: in_otherProperty must be specified.",
581
+ /**
582
+ * methods: StringProperty.insert, StringProperty.push
583
+ * StringProperty.insert takes two parameters: in_position and in_value.
584
+ * The second one (in_value) must be a string.
585
+ * StringProperty.push takes only one parameter (in_value), which must be a string.
586
+ */
587
+ IN_VALUE_MUST_BE_STRING: "PR-133: parameter error: in_value must be a string. This is not valid: ",
588
+ /**
589
+ * methods: ValueProperty.getValues
590
+ * You cannot use the method .getValues on value properties. getValues is used to get multiple nested
591
+ * values from a custom property. To get the value of a primitive property, use .getValue instead.
592
+ */
593
+ NO_VALUE_PROPERTY_GETVALUES: "PR-134: Cannot use .getValues on value properties or strings. " +
594
+ "Use .getValue instead.",
595
+ /**
596
+ * methods: Property.setValues, ArrayProperty.insertRange, ArrayProperty.removeRange,
597
+ * ArrayProperty.setRange, EnumArrayProperty.setEnumByString, ArrayProperty.insert, ArrayProperty.set,
598
+ * ArrayProperty.clear
599
+ * If a property is created as a constant, it cannot be changed.
600
+ */
601
+ MODIFICATION_OF_CONSTANT_PROPERTY: "PR-140: Modifications of constants are not allowed.",
602
+ /**
603
+ * methods: ArrayProperty.insert, ArrayProperty.insertRange
604
+ * In a non-primitive array, you can only insert instances of properties. You should use PropertyFactory.create
605
+ * to create an instance of your property before inserting it into the array.
606
+ */
607
+ INSERT_NOT_A_PROP: "PR-141: In an array of properties, you can only insert instances of " +
608
+ "properties. This value is not valid: ",
609
+ /**
610
+ * If a property is a reference, it cannot be changed.
611
+ */
612
+ MODIFICATION_OF_REFERENCED_PROPERTY: "PR-142: Modifications of referenced properties are not allowed.",
613
+ /**
614
+ * methods: Property.getValue
615
+ * Property.getValue(in_ids) is a shortcut for Property.get(in_ids).getValue().
616
+ * Property.get(in_ids) must resolve to a ValueProperty.
617
+ */
618
+ GET_VALUE_NOT_A_VALUE: "PR-160: in_ids does not resolve to a ValueProperty: ",
619
+ /**
620
+ * methods: MapProperty.insert
621
+ * If your map is not a ValueMap, in_property must be an instance of BaseProperty.
622
+ * Use PropertyFactory.create to create an instance of a property.
623
+ */
624
+ NONVALUE_MAP_INSERT_PROP: "PR-161: In a map of properties, you can only insert properties.",
625
+ /**
626
+ * methods: PropertyFactory.create
627
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
628
+ * This error is thrown while creating a Property, when the actual context
629
+ * ('array', 'map', 'set' or 'single') is different than what was expected.
630
+ */
631
+ CONTEXT_NOT_AS_EXPECTED: "PR-163: Property context is different than expected: ",
632
+ /**
633
+ * methods: Property.deserialize
634
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
635
+ * This error is thrown by .deserialize but is caused by an invalid changeSet. A serialized ChangeSet for an
636
+ * Integer64Property must be an array of 2 integers: the low and the high values. Since users cannot yet supply
637
+ * their changesets directly, this should not happen.
638
+ */
639
+ INVALID_INT64_CHANGESET: "PR-164: Cannot deserialize invalid change set for Int64 property",
640
+ /**
641
+ * methods: StringProperty.set
642
+ * StringProperty.set takes two parameters: in_index (a number, the index of the string that you wish to change)
643
+ * and in_string (the string you want to insert at that index). To set the value of the whole string, use
644
+ * setValue.
645
+ */
646
+ STRING_SET_NEEDS_INDEX: "PR-165: String.set first parameter should be an index (number). This is not valid: ",
647
+ /**
648
+ * methods: Property.get
649
+ * The token DEREFERENCE_TOKEN should only be used with .get when the in_ids passed to .get is an array.
650
+ * the DEREFERENCE_TOKEN should follow a path to a reference.
651
+ * @example <caption>valid: </caption>
652
+ * myProp.get(['myReference', TOKENS.DEREFERENCE_TOKEN])
653
+ * @example <caption>not valid: </caption>
654
+ * myProp.get('myReference').get(TOKENS.DEREFERENCE_TOKEN)
655
+ */
656
+ NO_GET_DEREFERENCE_ONLY: "PR-166: Cannot use a dereference token only with .get",
657
+ /**
658
+ * methods: StringProperty.setValues
659
+ * You cannot call .setValues on a StringProperty. To set the value of the string, use .setValue
660
+ * instead.
661
+ */
662
+ NO_VALUE_PROPERTY_SETVALUES: "PR-167: setValues is not a valid method for String Properties",
663
+ /**
664
+ * methods: Property.getRelativePath
665
+ * In cases where you have more than one repository reference property pointing to the same repository, finding a path
666
+ * between a properties in different repositories can lead to more than one valid results. In that case, .getRelativePath
667
+ * will return the first valid path it finds. If you want to control how which path is used, you should construct the
668
+ * string path by concatenating the absolute path for the prop in the nested repository and the relative path between your
669
+ * repository reference and the target property.
670
+ */
671
+ MORE_THAN_ONE_PATH: "PR-169: More than one paths exist between ",
672
+ /**
673
+ * methods: Property.getRelativePath
674
+ * getRelativePath takes one parameter: the property from which the path will start. This must be an instance of
675
+ * BaseProperty. The method will return the path from that property to the property on which it was called ('this')
676
+ */
677
+ IN_FROMPROPERTY_MUST_BE_PROPERTY: "PR-170: getRelativePath parameter error: in_fromProperty must be a property",
678
+ /**
679
+ * methods: Property.getRelativePath
680
+ * getRelativePath does not return a path between a property that is inside a child repository to one that is in
681
+ * a parent repository. A path like this could not be used with .resolvePath or be used in a reference property
682
+ * because neither method can go from the root of a referenced repository to a reference property.
683
+ */
684
+ NO_PATH_FROM_CHILD_REPO: "PR-171: cannot get a path from a child repository to a parent repository",
685
+ /**
686
+ * methods: getReferencedWorkspace
687
+ * This repository reference is in read-only mode. Call enableWrite() to access the workspace.
688
+ */
689
+ REPOSITORY_REFERENCE_WORKSPACE_READ_ONLY: "PR-173: This repository reference is in read-only mode. Call enableWrite() to access the workspace.",
690
+ /**
691
+ * methods: Property.enableWrite
692
+ * Repository reference is already in writable mode.
693
+ */
694
+ REPOSITORY_REFERENCE_WORKSPACE_EXIST_ALREADY: "PR-174: Repository reference is already in writable mode",
695
+ /**
696
+ * methods: Property.enableWrite
697
+ * Can't enable write on an empty repository reference without at least a repositoryGUID and branchGUID.
698
+ */
699
+ WRITABLE_REPOSITORY_REFERENCE_NEED_GUIDS: "PR-176: Can't enable write on an empty repository reference without at least a repositoryGUID and branchGUID",
700
+ /**
701
+ * methods: Property.enableWrite
702
+ * Repository reference failed to automatically commit the new commitGUID.
703
+ */
704
+ WRITABLE_REPOSITORY_AUTO_COMMIT_FAIL: "PR-177: Repository reference failed to automatically commit the new commitGUID",
705
+ /**
706
+ * methods: Property._setFollowBranch
707
+ * An unexpected error occurred while trying to switch a repository reference followBranch property
708
+ */
709
+ WRITABLE_REPOSITORY_SET_FOLLOW_BRANCH_FAILED: "PR-178: An unexpected error occurred while trying to switch a repository reference followBranch property to ",
710
+ /**
711
+ * methods: MapProperty.insert, MapProperty.set
712
+ * .insert and .set take two parameters. The first one is in_id (or in_key), which is the id under
713
+ * which the property is added. It can not be an empty string.
714
+ */
715
+ ID_SHOULD_NOT_BE_EMPTY_STRING: "PR-179: id should not be an empty string.",
716
+ /**
717
+ * methods: StringProperty.set
718
+ * StringProperty.set: in_character must have a length of 1.
719
+ */
720
+ STRING_SET_ONE_CHAR: "PR-180: String.set, only one character can be set (in_character must have a length of 1).",
721
+ /**
722
+ * methods: EnumArrayProperty.set
723
+ * EnumArrayProperty.set only accepts a string or number as input for in_value
724
+ */
725
+ VALUE_STRING_OR_NUMBER: "PR-181: in_value should be a string or a number. This is not valid: ",
726
+ /**
727
+ * methods: ArrayProperty.set
728
+ * The in_value input of ArrayProperty.set should not be an array.
729
+ */
730
+ ARRAY_SET_ONE_ELEMENT: "PR-182: in_value should be a single element. This is not valid: ",
731
+ CANT_DIRTY_MISSING_PROPERTY: "PR-183: Can't dirty missing property: ",
732
+ /**
733
+ * methods: MapProperty.insert, MapProperty.set, SetProperty.insert, NodeProperty.insert
734
+ * The property you are trying to insert in your map property, set property or node property is a root.
735
+ */
736
+ INSERTED_ROOT_ENTRY: "PR-184: Trying to insert a root property into a collection.",
737
+ /**
738
+ * methods: MapProperty.insert, MapProperty.set, SetProperty.insert, NodeProperty.insert
739
+ * The property you are trying to insert in your map property, set property or node property is already
740
+ * a parent of the map, set, or node property. You cannot insert this property there or you would create
741
+ * a cycle in your data tree.
742
+ */
743
+ INSERTED_IN_OWN_CHILDREN: "PR-185: Trying to insert a property in itself or in one of its children.",
744
+ /**
745
+ * methods: MapProperty.insert, MapProperty.set, SetProperty.insert, NodeProperty.insert
746
+ * The property you are trying to insert (or at least one if its children) in your map property, set
747
+ * property or node property is not covered by the paths of the partial checkout.
748
+ * You cannot insert this property because you would not receive updates for this path after the
749
+ * insertion and you could corrupt your data by doing subsequent modifications.
750
+ */
751
+ INSERTED_OUTSIDE_PATHS: "PR-186: Trying to insert a property outside the paths covered by the partial checkout.",
752
+ SHARED_BEFORE_INSERTED: "PR-187: Property must be inserted in the workspace before sharing.",
753
+ CUSTOM_ID_NOT_ALLOWED: "PR-188: The following property does not support custom id: ",
754
+ };
755
+ const PropertyFactoryError = {
756
+ /**
757
+ * methods: PropertyFactory.create
758
+ * Each property created with PropertyFactory.create should have a unique id. You should make sure your
759
+ * code generates a unique id for each property created, or make your property an instanced of NamedProperties
760
+ * (which are identified by a unique Urn)
761
+ */
762
+ OVERWRITING_ID: "PF-001: Id already exists: ",
763
+ /**
764
+ * methods: PropertyFactory.register
765
+ * Warning: The template passed into the register method does not match the expected structure for this type.
766
+ */
767
+ TEMPLATE_MISMATCH: "PF-004: Template structures do not match for typeid: ",
768
+ /**
769
+ * methods: PropertyFactory.register
770
+ * The typeid assigned to your property template should include a version.
771
+ * E.g. 1.0.0 - an example of a valid typeid: “my.example:point2d-1.0.0”
772
+ */
773
+ UNVERSIONED_TEMPLATE: "PF-005: Templates must be versioned.",
774
+ /**
775
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
776
+ * Error occurs when a template has been inserted into the branch without a SEMVER version.
777
+ * This can occur when registering templates through the commit REST interface. At this point
778
+ * the data is corrupted and should be reported to the development team
779
+ */
780
+ UNVERSIONED_REMOTE_TEMPLATE: "PF-006: Internal error: Remote template is not versioned.",
781
+ /**
782
+ * methods: PropertyFactory.create
783
+ * RepositoryReferences are not yet fully implemented. They will be soon.
784
+ */
785
+ REPOSITORY_REF_NOT_FULLY_IMPLEMENTED: "PF-007: Repository references are not yet fully implemented and may not " +
786
+ "yet be used",
787
+ /**
788
+ * methods: PropertyFactory.create
789
+ * When using ‘inherits’ in your property template, it must be a string or an array.
790
+ * @example
791
+ * ```json
792
+ * {
793
+ * typeid:'my.example:point2d-1.0.0',
794
+ * inherits: ‘ another property’
795
+ * }
796
+ * ```
797
+ * or :
798
+ * ```json
799
+ * {
800
+ * typeid:'my.example:point2d-1.0.0',
801
+ * inherits: [‘another property’, ‘property2’]
802
+ * }
803
+ * ```
804
+ */
805
+ INHERITS_ARRAY_OR_STRING: "PF-008: Internal error: Inherits must be an Array or a String. This is not valid: ",
806
+ /**
807
+ * methods: PropertyFactory.create
808
+ * Context can be ‘array, ‘set’, ‘map’, ‘enum’ or ‘single’. If not specified, will default to ‘single’.
809
+ */
810
+ UNKNOWN_CONTEXT_SPECIFIED: "PF-009: Unknown context specified: ",
811
+ /**
812
+ * methods: PropertyFactory.create
813
+ * The property you entered into PropertyFactory.create has a typeid that is not registered.
814
+ * Make sure you register the template before creating an instance of that property. This could
815
+ * also be caused by a failure in the registration process.
816
+ */
817
+ UNKNOWN_TYPEID_SPECIFIED: "PF-010: Unknown typeid specified: ",
818
+ /**
819
+ * methods: PropertyFactory.getAllParentsForTemplate, PropertyFactory.inheritsFrom
820
+ * Cannot find a template for this typeid. Make sure you registered the template and that the typeid
821
+ * is entered correctly. This can be an error with the template you are trying to insert or one of the
822
+ * templates it inherits from.
823
+ */
824
+ NON_EXISTING_TYPEID: "PF-011: Missing template for the property you entered or one of the templates it inherits from: ",
825
+ /**
826
+ * methods: PropertyFactory.register
827
+ * The property you passed in to .register is a primitive property. These do not need to be registered with a
828
+ * typeid. It can be created without being registered. E.g. PropertyFactory.create(‘String’)
829
+ */
830
+ CANNOT_REGISTER_PRIMITIVE: "PF-012: Cannot register a primitive property with the public `register` " +
831
+ "function typeid = ",
832
+ /**
833
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
834
+ * Your template’s id field must be a string.
835
+ */
836
+ DEFINITION_ID_MUST_BE_STRING: 'PF-024: Value "id" of a definition should be a string. "',
837
+ /**
838
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
839
+ * The "$ref" keyword is used to reference a schema, and provides the ability to validate recursive structures
840
+ * through self-reference.
841
+ * An object schema with a "$ref" property MUST be interpreted as a "$ref" reference. The value of the "$ref"
842
+ * property MUST be a URI Reference (a string)
843
+ */
844
+ REF_SHOULD_BE_STRING: 'PF-025: Value of "$ref" should be a string. "',
845
+ /**
846
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
847
+ * The identifier passed to $ref does not point to any schema.
848
+ */
849
+ COULD_NOT_FIND_REFERENCE: 'PF-026: Couldn\'t find reference "',
850
+ /**
851
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
852
+ * The identifier passed to $ref does not point to an object.
853
+ */
854
+ REFERENCED_DEFINITION_SHOULD_BE_OBJECT: 'PF-027: A referenced definition should be an object. "',
855
+ /**
856
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
857
+ * In a JSON schema, the properties field must be an object.
858
+ */
859
+ PROPERTIES_SHOULD_BE_OBJECT: 'PF-028: The "properties" value should be an object. "',
860
+ /**
861
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
862
+ * oneOf’s value MUST be a non-empty array. Each item of the array MUST be a valid JSON Schema.
863
+ * An instance validates successfully against this keyword if it validates successfully against exactly one
864
+ * schema defined by this keyword's value.
865
+ */
866
+ ONE_OF_ONLY_FOR_ARRAYS_OF_ONE_OBJECT: 'PF-029: The "oneOf" object is supported only for arrays of one object.',
867
+ /**
868
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
869
+ * oneOf’s value MUST be a non-empty array. Each item of the array MUST be a valid JSON Schema.
870
+ */
871
+ ONE_OF_SHOULD_CONTAIN_OBJECTS: 'PF-030: The "oneOf" array should contain objects. "',
872
+ /**
873
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
874
+ * This keyword's value MUST be a non-empty array. Each item of the array MUST be a valid JSON Schema.
875
+ */
876
+ ALL_OF_SHOULD_BE_ARRAY: 'PF-031: The "allOf" object should be an array.',
877
+ /**
878
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
879
+ * This keyword's value MUST be a non-empty array. Each item of the array MUST be a valid JSON Schema.
880
+ */
881
+ ALL_OF_SHOULD_CONTAIN_OBJECTS: 'PF-032: The "allOf" array should contain objects. Element ',
882
+ /**
883
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
884
+ * Your schema definition contains infinite recursion. For example, if your definition ‘a’ refers to definition
885
+ * ‘b’ as being one of its children and ‘b’ refers to ‘a’ as one of its children.
886
+ */
887
+ INFINITE_RECURSION: "PF-033: Infinite recursion detected in path: ",
888
+ /**
889
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
890
+ * One part of your template object might contain something that is not of type ‘object’, ‘string’,
891
+ * ‘number’ or ‘integer’.
892
+ */
893
+ UNSUPPORTED_VALUE_TYPE: 'PF-034: Unsupported value of field "type": ',
894
+ REQUIRED_PROPERTY_NAME_NOT_STRING: 'PF-035: Required property name should be a string, "',
895
+ /**
896
+ * This property is required but it is not listed in the properties field.
897
+ */
898
+ PROPERTY_NAME_DOES_NOT_MATCH: "PF-036: Required property name does not match any property in object: ",
899
+ /**
900
+ * The ‘inherits’ field in your template object should be a string or an array of strings.
901
+ */
902
+ INHERITS_SHOULD_BE_STRING: 'PF-037: The "inherits" object should be a string or an array of strings. This is not valid: ',
903
+ /**
904
+ * The ‘context’ field in your template should be a string.
905
+ */
906
+ CONTEXT_SHOULD_BE_STRING: 'PF-038: The "context" value should be a string. This is not valid: ',
907
+ /**
908
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
909
+ * Warning: If you have a ‘length’ field in your template and the context is not set to ‘array’,
910
+ * ‘length’ will be ignored.
911
+ */
912
+ IGNORING_LENGTH_NOT_ARRAY: 'PF-039: ignoring "length" value since "context" is not "array".',
913
+ /**
914
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
915
+ * In your template, the field ‘length’ should be a number.
916
+ */
917
+ LENGTH_SHOULD_BE_NUMBER: 'PF-040: The "length" value should be a number. This is not valid: ',
918
+ /**
919
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
920
+ * Your template contains more than one definition field for this field.
921
+ */
922
+ DUPLICATE_DEFINITION: "PF-041: Duplicate definition for ",
923
+ /**
924
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
925
+ * The field ‘id’ is missing from your JSON schema.
926
+ */
927
+ FIELD_ID_IS_REQUIRED: 'PF-042: Field "id" is required.',
928
+ /**
929
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
930
+ * You need a ‘typeid’ field in your template schema.
931
+ * @example
932
+ * ```json
933
+ * {
934
+ * ‘typeid’: 'autodesk.test:set.set-1.0.0',
935
+ * ‘properties’: [
936
+ * {‘typeid’: 'String',
937
+ * ‘context’: 'set',
938
+ * ‘id’: 'DummySet',
939
+ * ‘inherits’:['NamedProperty']}
940
+ * ]
941
+ * }
942
+ *```
943
+ */
944
+ FIELD_TYPEID_IS_REQUIRED: 'PF-043: Field "typeid" is required. It is the "typeid" of the resulting ' +
945
+ "PropertySets Template.",
946
+ /**
947
+ * methods: PropertyFactory.register
948
+ * The ‘length’ field in your template must be a number.
949
+ */
950
+ LENGTH_MUST_BE_NUMBER: "PF-045: length must be a number. This is not valid: ",
951
+ /**
952
+ * methods: PropertyFactory.register
953
+ * Each entry in your enum property array must have an id.
954
+ * @example
955
+ * ```json
956
+ * {
957
+ * "typeid": "Adsk.Core:Units.Metric-1.0.0",
958
+ * "inherits": "Enum",
959
+ * "annotation": { "description": "The metric units" },
960
+ * "properties": [
961
+ * { "id": "m" , "value": 1, "annotation": { "description": "meter" }},
962
+ * { "id": "cm", "value": 2, "annotation": { "description": "centimeter" }},
963
+ * { "id": "mm", "value": 3, "annotation": { "description": "millimeter" }}
964
+ * ]
965
+ * }
966
+ * ```
967
+ */
968
+ ENUM_TYPEID_MISSING: "PF-046: Enum: typeid missing",
969
+ /**
970
+ * methods: PropertyTemplate constructor
971
+ * Each entry in your enum property must have a value that is a number.
972
+ * @example
973
+ * ```json
974
+ * {
975
+ * "typeid": "Adsk.Core:Units.Metric-1.0.0",
976
+ * "inherits": "Enum",
977
+ * "annotation": { "description": "The metric units" },
978
+ * "properties": [
979
+ * { "id": "m" , "value": 1, "annotation": { "description": "meter" }},
980
+ * { "id": "cm", "value": 2, "annotation": { "description": "centimeter" }},
981
+ * { "id": "mm", "value": 3, "annotation": { "description": "millimeter" }}
982
+ * ]
983
+ * }
984
+ * ```
985
+ */
986
+ ENUM_VALUE_NOT_NUMBER: "PF-047: Enum: value must be a number. This is not valid: ",
987
+ /**
988
+ * methods: PropertyTemplate.getVersion
989
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
990
+ * Warning: you that the template on which you are calling the .getVersion method is not versioned.
991
+ * The method will return undefined. This should not happen as we now validate that all templates are
992
+ * versioned when registering them.
993
+ */
994
+ TEMPLATE_NOT_VERSIONED: "PF-048: Internal error: Template is not versioned.",
995
+ /**
996
+ * methods: PropertyFactory.register
997
+ * Warning: Template already exists. The incoming template MUST match what is currently registered.
998
+ * If they do not match, an error will be thrown letting you know that the templates are incompatible.
999
+ * See error PF-004
1000
+ */
1001
+ REGISTERING_EXISTING_TYPEID: "PF-049: Registering a typeid that already exists typeid = ",
1002
+ /**
1003
+ * methods: PropertyFactory.register
1004
+ * There were errors validating the template you are trying to register. See detailed errors attached.
1005
+ */
1006
+ FAILED_TO_REGISTER: "PF-050: Failed to register typeid = ",
1007
+ /**
1008
+ * methods: PropertyFactory.convertToTemplates, PropertyFactory.registerFrom
1009
+ * So far, these methods can only convert from a JSON schema. The first parameter (in_fromType)
1010
+ * must be ‘JSONSchema’.
1011
+ */
1012
+ UNKNOWN_TYPE: "PF-051: Unknown type: ",
1013
+ /**
1014
+ * methods: PropertyTemplate.serializeCanonical
1015
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1016
+ * This error shouldn’t occur. The underlying private function that is called is a close cousin of the
1017
+ * deepCopy function which could have an arbitrary target specified. This doesn’t happen in the case of
1018
+ * the serializeCanonical.
1019
+ */
1020
+ INVALID_TARGET_PROPERTY_TEMPLATE: "PF-053 Copying into incompatible target property template: ",
1021
+ /**
1022
+ * methods: PropertyFactory.loadTemplate
1023
+ * In order for the PropertyFactory to retrieve templates from remote store it has to have at least one store
1024
+ * interface to interact with. This is accomplished by making the PropertyFactory.addStore call.
1025
+ */
1026
+ MISSING_CASE_IN_TEMPLATE_SERIALIZATION: "PF-054 Missing case in template canonical serialization: ",
1027
+ OVERRIDDING_INHERITED_TYPES: "PF-057: Overriding of inherited typed properties is not allowed: ",
1028
+ /**
1029
+ * methods: PropertyFactory.register
1030
+ * PropertyFactory.register takes one parameter, which can be a string (typeid), a json object (a template) or an
1031
+ * array of these.
1032
+ */
1033
+ ATTEMPT_TO_REGISTER_WITH_BAD_ARGUMENT: "PF-058: register only accepts strings, json structures or array of those",
1034
+ /**
1035
+ * methods: PropertyFactory.resolve
1036
+ * No store has been added yet to the PropertyFactory. A template store has to be instantiated then added with
1037
+ * propertyFactory.addStore()
1038
+ */
1039
+ NO_STORE_HAS_BEEN_INITIALIZED_YET: "PF-059: No store has been initialized yet to the PropertyFactory.",
1040
+ /**
1041
+ * methods: PropertyFactory.resolve
1042
+ * resolve cannot be called until previous call to resolve has completed.
1043
+ */
1044
+ DEPENDENCIES_RESOLUTION_IN_PROGRESS: "PF-060: Dependencies resolution already in progress",
1045
+ /**
1046
+ * methods: PropertyFactory.create
1047
+ * Typed values must contain properties that inherit from the base type.
1048
+ */
1049
+ TYPED_VALUES_MUST_DERIVE_FROM_BASE_TYPE: "PF-061: Typed values must be derived from base type: ",
1050
+ /**
1051
+ * methods: PropertyFactory.create
1052
+ * The field ‘value’ is missing from your JSON schema.
1053
+ */
1054
+ FIELD_VALUE_IS_REQUIRED: 'PF-062: Field "value" is required: ',
1055
+ /**
1056
+ * methods: PropertyFactory.register
1057
+ * Warning: The structure of the template passed into the register method does not match the structure of a remote template registered under the same typeid.
1058
+ */
1059
+ REMOTE_TEMPLATE_MISMATCH: "PF-064: Template structures do not match an already registered remote template with the same typeid for typeid: ",
1060
+ /**
1061
+ * methods: PropertyFactory.initializeSchemaStore
1062
+ * Warning: The initializeSchemaStore method must be provided with an options object
1063
+ containing a getBearerToken function and the url to the ForgeSchemaService.
1064
+ */
1065
+ MISSING_FSS_INIT_OPTIONS: "PF-065: The initializeSchemaStore method must be provided with an options object " +
1066
+ "containing a getBearerToken function and the url to the ForgeSchemaService.",
1067
+ /**
1068
+ * methods: PropertyFactory.initializeSchemaStore
1069
+ * Warning: The initializeSchemaStore method url option must be passed a valid base url.
1070
+ */
1071
+ FSS_BASEURL_WRONG: "PF-066: The initializeSchemaStore method url option must be passed a valid base url.",
1072
+ /**
1073
+ * methods: PropertyFactory.create
1074
+ * Overridden properties must have same context as the base type.
1075
+ */
1076
+ OVERRIDEN_PROP_MUST_HAVE_SAME_CONTEXT_AS_BASE_TYPE: "PF-067: Overridden properties must have same context as the base type: ",
1077
+ /**
1078
+ * methods: PropertyFactory.create
1079
+ * Primitive types does not support typedValues.
1080
+ */
1081
+ TYPED_VALUES_FOR_PRIMITIVES_NOT_SUPPORTED: "PF-068: Primitive types does not support typedValues: ",
1082
+ /**
1083
+ * methods: PropertyFactory.inheritsFrom
1084
+ */
1085
+ TYPEID_IS_NOT_ENUM: "PF-069: The provided type does not inherit from Enum: ",
1086
+ };
1087
+ const RepositoryError = {
1088
+ /**
1089
+ * methods: NodeProperty.remove
1090
+ * The property you tried to remove does not exist (its id was not found) - check that the id is correct
1091
+ * and that the property has not already been removed.
1092
+ */
1093
+ REMOVING_NON_EXISTING_ID: "RE-001: Removing non existing id: ",
1094
+ /**
1095
+ * methods: BranchNode.isEqual, CommitNode.isEqual
1096
+ * In_node parameter is required. In_node is the branch or commit you wish to compare to ‘this’ branch/commit
1097
+ * node to check for equality.
1098
+ */
1099
+ MISSING_IN_NODE_PARAM: "RE-004: BranchNode.isEqual / CommitNode.isEqual missing " +
1100
+ "parameter: in_node",
1101
+ /**
1102
+ * methods: BranchNode, CommitNode, Workspace.commit
1103
+ * The BranchNode or CommitNode constructor was called without in_params.guid or we tried to send a commit
1104
+ * without a guid.
1105
+ */
1106
+ MISSING_GUID_FIELD: "RE-006: Missing guid field",
1107
+ /**
1108
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1109
+ */
1110
+ LOCAL_AND_REMOTE_BRANCH_NOT_EQUAL: "RE-007: Remote branch urn must equal the local branch urn",
1111
+ /**
1112
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1113
+ */
1114
+ BRANCH_NOT_REMOTE_BRANCH: "RE-008: Branch is not a remote branch ",
1115
+ /**
1116
+ * now rebasing to \<commit guid\>'
1117
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1118
+ * A commit node already rebased has been rebased again.
1119
+ */
1120
+ COMMIT_ALREADY_REBASED: "RE-009: Should not rebase commit more than once: ",
1121
+ /**
1122
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1123
+ * A new commit has been received from the server but was not expected. See specific message for more details.
1124
+ */
1125
+ UNEXPECTED_COMMIT_FROM_SERVER: "RE-010: Adding commit to remote branch ",
1126
+ /**
1127
+ * This error will occur if the repository associated to a branch hasn't been found.
1128
+ */
1129
+ REPOSITORY_NOT_FOUND: "RE-011: Internal Error: The repository hasn't been found.",
1130
+ /**
1131
+ * This error will occur if the branch within a repository hasn't been found.
1132
+ */
1133
+ BRANCH_NOT_FOUND: "RE-012: The branch hasn't been found.",
1134
+ };
1135
+ const ServerError = {
1136
+ /**
1137
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1138
+ */
1139
+ URL_MUST_BE_STRING: "SE-001: Url must be a string.",
1140
+ /**
1141
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1142
+ */
1143
+ PORT_MUST_BE_NUMBER: "SE-002: Port must be a number",
1144
+ };
1145
+ const ChangeSetError = {
1146
+ /**
1147
+ * Context can only be ‘single’, ‘array’, ‘map’, ‘set’ or ‘enum’. All other values are invalid.
1148
+ */
1149
+ UNKNOWN_CONTEXT: "CS-001: Unknown context: ",
1150
+ /**
1151
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1152
+ */
1153
+ ALREADY_EXISTING_ENTRY: "CS-003: Internal error: Added an already existing entry: ",
1154
+ /**
1155
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1156
+ * The ChangeSet did not include an oldValue member which is computed when making the ChangeSet reversible.
1157
+ */
1158
+ OLD_VALUE_NOT_FOUND: "CS-004: Internal error: Old value not found while inverting a change set. The change set is probably not reversible.",
1159
+ CONTEXT_VALIDATION_IN_PROGRESS: "CONTEXT_VALIDATION_IN_PROGRESS",
1160
+ NOT_A_VALID_CONTEXT: "NOT_A_VALID_CONTEXT",
1161
+ MISSING_PRE_POST_CALLBACK: "Missing callback. Either pre- or postcallback must be provided.",
1162
+ };
1163
+ const UtilsError = {
1164
+ INVALID_PATH_IN_REFERENCE: "UT-001: References may only contain absolute repository references " +
1165
+ "or empty strings",
1166
+ /**
1167
+ * methods: Utils.traverseChangesetRecursively
1168
+ * Your changeset contains an operator other than MODIFY, INSERT or REMOVE. If you created the changeset youserlf,
1169
+ * check that you only use valid operators. Otherwise, this is an internal error. Please contact the development team.
1170
+ */
1171
+ UNKNOWN_OPERATOR: "UT-004: ArrayChangeSetIterator: unknown operator ",
1172
+ /**
1173
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1174
+ */
1175
+ NON_PRIMITIVE_ARRAY_NO_TYPEID: "UT-005: Found a non primitive type array without typeids. " +
1176
+ "This should never happen.",
1177
+ /**
1178
+ * Filtering paths within arrays are not supported.
1179
+ */
1180
+ FILTER_PATH_WITHIN_ARRAY: "UT-006: Filtering paths within arrays are not supported",
1181
+ /**
1182
+ * INTERNAL ERROR - If you encounter this error, please contact the development team.
1183
+ * See specific message for more details.
1184
+ */
1185
+ ASSERTION_FAILED: "UT-007: INTERNAL ERROR. Failed assertion. ",
1186
+ /**
1187
+ * You used a deprecated function. It will likely be removed in the next major version.
1188
+ * See the custom information if provided.
1189
+ */
1190
+ DEPRECATED_FUNCTION: "UT-008: Deprecated function %s.",
1191
+ /**
1192
+ * You used a deprecated function parameter. It will likely be removed in the next major version.
1193
+ * See the custom information if provided.
1194
+ */
1195
+ DEPRECATED_PARAMETER: "UT-009: Deprecated function parameter %s of %s.",
1196
+ /**
1197
+ * You used an experimental feature. It will likely changed in future releases.
1198
+ * See the custom information if provided.
1199
+ */
1200
+ EXPERIMENTAL_FEATURE: "UT-010: Feature %s is experimental and subject to future changes.",
1201
+ };
1202
+ const PssClientError = {
1203
+ /**
1204
+ * This error message will be displayed when a repository creation fails
1205
+ */
1206
+ FAILED_REPOSITORY_CREATION: "PC-001: Server error: Failed to create a repository. ",
1207
+ /**
1208
+ * This error message will be displayed when the deletion of a repository fails
1209
+ */
1210
+ FAILED_REPOSITORY_DELETION: "PC-002: Server error: Failed to delete a repository. Repository guid: ",
1211
+ /**
1212
+ * This error message will be displayed when the undelete operation of a repository fails
1213
+ */
1214
+ FAILED_REPOSITORY_UNDELETION: "PC-003: Server error: Failed to undelete a repository. Repository guid: ",
1215
+ /**
1216
+ * This error message will be displayed when getting the expiry of a repository fails
1217
+ */
1218
+ FAILED_GET_EXPIRY_REQUEST: "PC-004: Server error: Failed to get the expiry of a repository. Repository guid: ",
1219
+ /**
1220
+ * This error message will be displayed when setting the expiry of a repository fails
1221
+ */
1222
+ FAILED_SET_EXPIRY_REQUEST: "PC-005: Server error: Failed to set the expiry of a repository. Repository guid: ",
1223
+ /**
1224
+ * This error message will be displayed when squashing commit history fails
1225
+ */
1226
+ FAILED_SQUASH_COMMIT_HISTORY: "PC-006: Server error: Failed to squash the commit history. Branch guid: ",
1227
+ /**
1228
+ * This error message will be displayed when fetching a commit fails
1229
+ */
1230
+ FAILED_FETCH_COMMIT: "PC-007: Server error: Failed to fetch a commit. Commit guid: ",
1231
+ /**
1232
+ * This error message will be displayed when containers creation fails
1233
+ */
1234
+ FAILED_CONTAINER_CREATION: "PC-008: Server error: Failed to create containers. ",
1235
+ /**
1236
+ * This error message will be displayed when a branch creation fails
1237
+ */
1238
+ FAILED_BRANCH_CREATION: "PC-009: Server error: Failed to create a branch. ",
1239
+ /**
1240
+ * This error message will be displayed when a commit fails
1241
+ */
1242
+ FAILED_TO_COMMIT: "PC-011: Server error: Failed to commit. ",
1243
+ /**
1244
+ * This error message will be displayed when a share operation fails
1245
+ */
1246
+ FAILED_SHARE: "PC-013: Server error: Failed to share or unshare resources. ",
1247
+ /**
1248
+ * This error message will be displayed when getting the branches of a repository fails
1249
+ */
1250
+ FAILED_GET_ENUMERATE_BRANCHES: "PC-014: Server error: Failed to get the branches of a repository. Repository guid: ",
1251
+ /**
1252
+ * This error message will be displayed when a request to get an lca fails
1253
+ */
1254
+ FAILED_GET_LCA: "PC-015: Server error: Failed to get the lca.",
1255
+ /**
1256
+ * This error message will be displayed when a commit fails because of an internal error while committing
1257
+ */
1258
+ FAILED_TO_COMMIT_INTERNAL: "PC-016: internal error: Failed to commit.",
1259
+ /**
1260
+ * This error message will be displayed when getting a feature flag fails
1261
+ */
1262
+ FAILED_TO_GET_FEATURE: "PC-017: Server error: Failed to get feature flag from PSS. ",
1263
+ /**
1264
+ * This error message will be displayed when getting squashed commit range fails
1265
+ */
1266
+ FAILED_TO_GET_SQUASHED_COMMIT_RANGE: "PC-018: Server error: Failed to get squashed commit range. Branch guid: ",
1267
+ };
1268
+ const PROPERTY_PATH_DELIMITER = ".";
1269
+ const MESSAGE_CONSTANTS = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, ChangeSetError), PropertyError), PropertyFactoryError), RepositoryError), SchemaValidatorError), PssClientError), UtilsError), TypeidHelperError), ServerError);
1270
+ export const constants = {
1271
+ MSG: MESSAGE_CONSTANTS,
1272
+ PROPERTY_PATH_DELIMITER,
1273
+ };
1274
+ //# sourceMappingURL=constants.js.map