@api-client/core 0.20.3 → 0.20.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@api-client/core",
3
3
  "description": "The API Client's core client library. Works in NodeJS and in a ES enabled browser.",
4
- "version": "0.20.3",
4
+ "version": "0.20.4",
5
5
  "license": "UNLICENSED",
6
6
  "exports": {
7
7
  "./browser.js": {
@@ -139,11 +139,11 @@
139
139
  "get-port": "^7.0.0",
140
140
  "globals": "^17.0.0",
141
141
  "husky": "^9.0.11",
142
- "lint-staged": "^16.0.0",
142
+ "lint-staged": "^17.0.2",
143
143
  "oauth2-mock-server": "^8.0.0",
144
144
  "prettier": "^3.5.1",
145
145
  "schema-org-json-schemas": "^2.1.4",
146
- "sinon": "^21.0.0",
146
+ "sinon": "^22.0.0",
147
147
  "ts-node-maintained": "^10.9.5",
148
148
  "typescript": "^6.0.2",
149
149
  "typescript-eslint": "^8.24.1"
@@ -127,6 +127,58 @@ export interface SchemaDefaultValue {
127
127
  * It is always a string and it has to be casted to the property's data type.
128
128
  */
129
129
  value: string | FunctionValue
130
+ /**
131
+ * When the `value` is a function, the `config` property is used to configure the function.
132
+ * The type of the config depends on the function and the property data type.
133
+ */
134
+ config?: FunctionGeneratorConfig
135
+ }
136
+
137
+ /**
138
+ * A union of all possible function generator configurations.
139
+ */
140
+ export type FunctionGeneratorConfig = StringDefaultRandomGenerator
141
+
142
+ /**
143
+ * Configuration for the `random` function for string properties.
144
+ */
145
+ export interface StringDefaultRandomGenerator {
146
+ /**
147
+ * When set the `max` and `min` are used.
148
+ * Otherwise a random string of fixed length (the `fixed` property) is generated.
149
+ */
150
+ varyingLength?: boolean
151
+ /**
152
+ * The minimum length of the random string.
153
+ *
154
+ * When not specified, it defaults to `10`.
155
+ * The `varyingLength` must be `true` to use this property.
156
+ */
157
+ min?: number
158
+ /**
159
+ * The maximum length of the random string.
160
+ *
161
+ * When not specified, it defaults to `30`.
162
+ * The `varyingLength` must be `true` to use this property.
163
+ */
164
+ max?: number
165
+ /**
166
+ * The fixed length of the random string.
167
+ *
168
+ * When not specified, it defaults to `10`.
169
+ * The `varyingLength` must be `false` to use this property.
170
+ */
171
+ fixed?: number
172
+ /**
173
+ * The prefix to add to the random string.
174
+ * The prefix adds to the length of the random string.
175
+ */
176
+ prefix?: string
177
+ /**
178
+ * The suffix to add to the random string.
179
+ * The suffix adds to the length of the random string.
180
+ */
181
+ suffix?: string
130
182
  }
131
183
 
132
184
  /**