@devizovaburza/mdm-sdk 0.0.8 → 0.0.10

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/dist/v1/index.mjs CHANGED
@@ -7,7 +7,6 @@ import * as z from 'zod/v4/core';
7
7
  import 'node:fs';
8
8
  import 'node:crypto';
9
9
  import 'node:path';
10
- import require$$0 from 'buffer';
11
10
 
12
11
  const createMdmClient = (baseUrl, options) => {
13
12
  return hc(baseUrl, options);
@@ -110,74 +109,99 @@ const GenderZod = ["M", "F", "OTHER"];
110
109
 
111
110
  const individualInsertSchema = z$1.object({
112
111
  partyId: z$1.uuid().optional(),
113
- internalId: z$1.string().optional().nullable(),
112
+ internalId: z$1.string().optional(),
114
113
  name: z$1.string(),
115
114
  surname: z$1.string(),
116
- email: z$1.string().optional().nullable(),
117
- phone: z$1.string().optional().nullable(),
118
- birthDate: z$1.string().optional().nullable(),
115
+ email: z$1.string().optional(),
116
+ phone: z$1.string().optional(),
117
+ birthDate: z$1.string().optional(),
119
118
  birthPlace: z$1.string(),
120
- countryOfBirth: z$1.enum(COUNTRY_CODES_2).optional().nullable(),
119
+ countryOfBirth: z$1.enum(COUNTRY_CODES_2).optional(),
121
120
  personalId: z$1.uuid(),
122
121
  gender: z$1.enum(GenderZod),
123
122
  citizenship: z$1.enum(COUNTRY_CODES_2),
124
- citizenshipOther: z$1.enum(COUNTRY_CODES_2).optional().nullable(),
125
- employer: z$1.string().optional().nullable(),
126
- employerCountry: z$1.enum(COUNTRY_CODES_2).optional().nullable(),
123
+ citizenshipOther: z$1.enum(COUNTRY_CODES_2).optional(),
124
+ employer: z$1.string().optional(),
125
+ employerCountry: z$1.enum(COUNTRY_CODES_2).optional(),
127
126
  registeredNumber: z$1.string(),
128
127
  isPep: z$1.boolean(),
129
- titleBefore: z$1.string().optional().nullable(),
130
- titleAfter: z$1.string().optional().nullable(),
131
- birthSurname: z$1.string().optional().nullable(),
132
- vocativeTitle: z$1.string().optional().nullable(),
133
- deathDate: z$1.date().optional().nullable(),
134
- deathNotification: z$1.date().optional().nullable(),
135
- pin: z$1.string().optional().nullable(),
136
- stayAbroad: z$1.boolean().optional().nullable(),
137
- stayAbroadCountries: z$1.enum(COUNTRY_CODES_2).optional().nullable()
128
+ titleBefore: z$1.string().optional(),
129
+ titleAfter: z$1.string().optional(),
130
+ birthSurname: z$1.string().optional(),
131
+ vocativeTitle: z$1.string().optional(),
132
+ deathDate: z$1.date().optional(),
133
+ deathNotification: z$1.date().optional(),
134
+ pin: z$1.string().optional(),
135
+ stayAbroad: z$1.boolean().optional(),
136
+ stayAbroadCountries: z$1.enum(COUNTRY_CODES_2).optional()
138
137
  });
139
138
  const individualUpdateSchema = z$1.object({
140
139
  id: z$1.uuid(),
141
140
  partyId: z$1.uuid(),
142
- internalId: z$1.string().optional().nullable(),
141
+ internalId: z$1.string().optional(),
143
142
  name: z$1.string().optional(),
144
143
  surname: z$1.string().optional(),
145
- email: z$1.string().optional().nullable(),
146
- phone: z$1.string().optional().nullable(),
147
- birthDate: z$1.string().optional().nullable(),
144
+ email: z$1.string().optional(),
145
+ phone: z$1.string().optional(),
146
+ birthDate: z$1.string().optional(),
148
147
  birthPlace: z$1.string().optional(),
149
- countryOfBirth: z$1.enum(COUNTRY_CODES_2).optional().nullable(),
148
+ countryOfBirth: z$1.enum(COUNTRY_CODES_2).optional(),
150
149
  personalId: z$1.uuid().optional(),
151
150
  gender: z$1.enum(GenderZod).optional(),
152
151
  citizenship: z$1.enum(COUNTRY_CODES_2).optional(),
153
- citizenshipOther: z$1.enum(COUNTRY_CODES_2).optional().nullable(),
154
- employer: z$1.string().optional().nullable(),
155
- employerCountry: z$1.enum(COUNTRY_CODES_2).optional().nullable(),
152
+ citizenshipOther: z$1.enum(COUNTRY_CODES_2).optional(),
153
+ employer: z$1.string().optional(),
154
+ employerCountry: z$1.enum(COUNTRY_CODES_2).optional(),
156
155
  registeredNumber: z$1.string().optional(),
157
156
  isPep: z$1.boolean().optional(),
158
- titleBefore: z$1.string().optional().nullable(),
159
- titleAfter: z$1.string().optional().nullable(),
160
- birthSurname: z$1.string().optional().nullable(),
161
- vocativeTitle: z$1.string().optional().nullable(),
162
- deathDate: z$1.date().optional().nullable(),
163
- deathNotification: z$1.date().optional().nullable(),
164
- pin: z$1.string().optional().nullable(),
165
- stayAbroad: z$1.boolean().optional().nullable(),
166
- stayAbroadCountries: z$1.enum(COUNTRY_CODES_2).optional().nullable()
157
+ titleBefore: z$1.string().optional(),
158
+ titleAfter: z$1.string().optional(),
159
+ birthSurname: z$1.string().optional(),
160
+ vocativeTitle: z$1.string().optional(),
161
+ deathDate: z$1.date().optional(),
162
+ deathNotification: z$1.date().optional(),
163
+ pin: z$1.string().optional(),
164
+ stayAbroad: z$1.boolean().optional(),
165
+ stayAbroadCountries: z$1.enum(COUNTRY_CODES_2).optional()
167
166
  });
168
- const individualOutputSchema = individualUpdateSchema.extend({
167
+ const individualOutputSchema = z$1.object({
168
+ id: z$1.uuid(),
169
169
  partyId: z$1.uuid().nullable(),
170
- internalId: z$1.string().optional().nullable(),
170
+ internalId: z$1.string().nullable(),
171
+ name: z$1.string().nullable(),
172
+ surname: z$1.string().nullable(),
173
+ email: z$1.string().nullable(),
174
+ phone: z$1.string().nullable(),
175
+ birthDate: z$1.string().nullable(),
176
+ birthPlace: z$1.string().nullable(),
177
+ countryOfBirth: z$1.enum(COUNTRY_CODES_2).nullable(),
178
+ personalId: z$1.uuid().nullable(),
179
+ gender: z$1.enum(GenderZod).nullable(),
180
+ citizenship: z$1.enum(COUNTRY_CODES_2).nullable(),
181
+ citizenshipOther: z$1.enum(COUNTRY_CODES_2).nullable(),
182
+ employer: z$1.string().nullable(),
183
+ employerCountry: z$1.enum(COUNTRY_CODES_2).nullable(),
184
+ registeredNumber: z$1.string().nullable(),
185
+ isPep: z$1.boolean().nullable(),
186
+ titleBefore: z$1.string().nullable(),
187
+ titleAfter: z$1.string().nullable(),
188
+ birthSurname: z$1.string().nullable(),
189
+ vocativeTitle: z$1.string().nullable(),
190
+ deathDate: z$1.coerce.date().nullable(),
191
+ deathNotification: z$1.coerce.date().nullable(),
192
+ pin: z$1.string().nullable(),
193
+ stayAbroad: z$1.boolean().nullable(),
194
+ stayAbroadCountries: z$1.enum(COUNTRY_CODES_2).nullable(),
171
195
  createdAt: z$1.coerce.date().nullable(),
172
196
  updatedAt: z$1.coerce.date().nullable()
173
197
  });
174
198
 
175
199
  z$1.object({
176
200
  partyId: z$1.uuid().optional(),
177
- internalId: z$1.string().optional().nullable(),
201
+ internalId: z$1.string().optional(),
178
202
  businessName: z$1.string(),
179
- email: z$1.email("Invalid email format").optional().nullable(),
180
- phone: z$1.string().optional().nullable(),
203
+ email: z$1.email("Invalid email format").optional(),
204
+ phone: z$1.string().optional(),
181
205
  registeredNumber: z$1.string(),
182
206
  registeredIn: z$1.enum(COUNTRY_CODES_2),
183
207
  operatesIn: z$1.enum(COUNTRY_CODES_2),
@@ -187,24 +211,24 @@ z$1.object({
187
211
  ownedBy: z$1.string(),
188
212
  companyObjects: z$1.string(),
189
213
  annualTurnover: z$1.number(),
190
- numberOfEmployees: z$1.number().optional().nullable(),
191
- prosecuted: z$1.string().optional().nullable(),
192
- location: z$1.string().optional().nullable(),
193
- fileNumber: z$1.string().optional().nullable(),
194
- websiteUrl: z$1.url("Invalid website URL").optional().nullable(),
214
+ numberOfEmployees: z$1.number().optional(),
215
+ prosecuted: z$1.string().optional(),
216
+ location: z$1.string().optional(),
217
+ fileNumber: z$1.string().optional(),
218
+ websiteUrl: z$1.url("Invalid website URL").optional(),
195
219
  vatPayer: z$1.boolean(),
196
220
  companyObjectsDescription: z$1.string(),
197
221
  turnover3years: z$1.number(),
198
222
  operationCountries: z$1.string(),
199
- riskyBusinessTypes: z$1.string().optional().nullable()
223
+ riskyBusinessTypes: z$1.string().optional()
200
224
  });
201
225
  const organizationUpdateSchema = z$1.object({
202
226
  id: z$1.uuid(),
203
227
  partyId: z$1.uuid().optional(),
204
- internalId: z$1.string().optional().nullable(),
228
+ internalId: z$1.string().optional(),
205
229
  businessName: z$1.string().optional(),
206
- email: z$1.email("Invalid email format").optional().nullable(),
207
- phone: z$1.string().optional().nullable(),
230
+ email: z$1.email("Invalid email format").optional(),
231
+ phone: z$1.string().optional(),
208
232
  registeredNumber: z$1.string().optional(),
209
233
  registeredIn: z$1.enum(COUNTRY_CODES_2).optional(),
210
234
  operatesIn: z$1.enum(COUNTRY_CODES_2).optional(),
@@ -214,29 +238,52 @@ const organizationUpdateSchema = z$1.object({
214
238
  ownedBy: z$1.string().optional(),
215
239
  companyObjects: z$1.string().optional(),
216
240
  annualTurnover: z$1.number().optional(),
217
- numberOfEmployees: z$1.number().optional().nullable(),
218
- prosecuted: z$1.string().optional().nullable(),
219
- location: z$1.string().optional().nullable(),
220
- fileNumber: z$1.string().optional().nullable(),
221
- websiteUrl: z$1.url("Invalid website URL").optional().nullable(),
241
+ numberOfEmployees: z$1.number().optional(),
242
+ prosecuted: z$1.string().optional(),
243
+ location: z$1.string().optional(),
244
+ fileNumber: z$1.string().optional(),
245
+ websiteUrl: z$1.url("Invalid website URL").optional(),
222
246
  vatPayer: z$1.boolean().optional(),
223
247
  companyObjectsDescription: z$1.string(),
224
248
  turnover3years: z$1.number(),
225
249
  operationCountries: z$1.string(),
226
- riskyBusinessTypes: z$1.string().optional().nullable()
250
+ riskyBusinessTypes: z$1.string().optional()
227
251
  });
228
- organizationUpdateSchema.extend({
229
- partyId: z$1.uuid(),
230
- internalId: z$1.string().optional().nullable(),
252
+ z$1.object({
253
+ id: z$1.uuid(),
254
+ partyId: z$1.uuid().nullable(),
255
+ internalId: z$1.string().nullable(),
256
+ businessName: z$1.string().nullable(),
257
+ email: z$1.string().nullable(),
258
+ phone: z$1.string().nullable(),
259
+ registeredNumber: z$1.string().nullable(),
260
+ registeredIn: z$1.enum(COUNTRY_CODES_2).nullable(),
261
+ operatesIn: z$1.enum(COUNTRY_CODES_2).nullable(),
262
+ presentIn: z$1.enum(COUNTRY_CODES_2).nullable(),
263
+ monthlyVolumeIn: z$1.number().nullable(),
264
+ monthlyVolumeOut: z$1.number().nullable(),
265
+ ownedBy: z$1.string().nullable(),
266
+ companyObjects: z$1.string().nullable(),
267
+ annualTurnover: z$1.number().nullable(),
268
+ numberOfEmployees: z$1.number().nullable(),
269
+ prosecuted: z$1.string().nullable(),
270
+ location: z$1.string().nullable(),
271
+ fileNumber: z$1.string().nullable(),
272
+ websiteUrl: z$1.string().nullable(),
273
+ vatPayer: z$1.boolean().nullable(),
274
+ companyObjectsDescription: z$1.string().nullable(),
275
+ turnover3years: z$1.number().nullable(),
276
+ operationCountries: z$1.string().nullable(),
277
+ riskyBusinessTypes: z$1.string().nullable(),
231
278
  createdAt: z$1.coerce.date().nullable(),
232
279
  updatedAt: z$1.coerce.date().nullable()
233
280
  });
234
281
  const createOrganizationInputSchema = z$1.object({
235
282
  partyId: z$1.uuid().optional(),
236
- internalId: z$1.string().optional().nullable(),
283
+ internalId: z$1.string().optional(),
237
284
  businessName: z$1.string(),
238
- email: z$1.string().nullable(),
239
- phone: z$1.string().nullable(),
285
+ email: z$1.string().optional(),
286
+ phone: z$1.string().optional(),
240
287
  registeredNumber: z$1.string(),
241
288
  registeredIn: z$1.enum(COUNTRY_CODES_2),
242
289
  operatesIn: z$1.enum(COUNTRY_CODES_2),
@@ -247,20 +294,43 @@ const createOrganizationInputSchema = z$1.object({
247
294
  companyObjects: z$1.string(),
248
295
  annualTurnover: z$1.number(),
249
296
  numberOfEmployees: z$1.number(),
250
- prosecuted: z$1.string().nullable(),
251
- location: z$1.string().nullable(),
252
- fileNumber: z$1.string().nullable(),
253
- websiteUrl: z$1.string().nullable(),
297
+ prosecuted: z$1.string().optional(),
298
+ location: z$1.string().optional(),
299
+ fileNumber: z$1.string().optional(),
300
+ websiteUrl: z$1.string().optional(),
254
301
  vatPayer: z$1.boolean(),
255
302
  message: z$1.string(),
256
303
  companyObjectsDescription: z$1.string(),
257
304
  turnover3years: z$1.number(),
258
305
  operationCountries: z$1.string(),
259
- riskyBusinessTypes: z$1.string().optional().nullable()
306
+ riskyBusinessTypes: z$1.string().optional()
260
307
  });
261
- const createOrganizationOutputSchema = createOrganizationInputSchema.partial().extend({
308
+ const createOrganizationOutputSchema = z$1.object({
262
309
  partyId: z$1.uuid().nullable(),
263
- numberOfEmployees: z$1.number().nullable()
310
+ internalId: z$1.string().nullable(),
311
+ businessName: z$1.string().nullable(),
312
+ email: z$1.string().nullable(),
313
+ phone: z$1.string().nullable(),
314
+ registeredNumber: z$1.string().nullable(),
315
+ registeredIn: z$1.enum(COUNTRY_CODES_2).nullable(),
316
+ operatesIn: z$1.enum(COUNTRY_CODES_2).nullable(),
317
+ presentIn: z$1.enum(COUNTRY_CODES_2).nullable(),
318
+ monthlyVolumeIn: z$1.number().nullable(),
319
+ monthlyVolumeOut: z$1.number().nullable(),
320
+ ownedBy: z$1.string().nullable(),
321
+ companyObjects: z$1.string().nullable(),
322
+ annualTurnover: z$1.number().nullable(),
323
+ numberOfEmployees: z$1.number().nullable(),
324
+ prosecuted: z$1.string().nullable(),
325
+ location: z$1.string().nullable(),
326
+ fileNumber: z$1.string().nullable(),
327
+ websiteUrl: z$1.string().nullable(),
328
+ vatPayer: z$1.boolean().nullable(),
329
+ message: z$1.string().nullable(),
330
+ companyObjectsDescription: z$1.string().nullable(),
331
+ turnover3years: z$1.number().nullable(),
332
+ operationCountries: z$1.string().nullable(),
333
+ riskyBusinessTypes: z$1.string().nullable()
264
334
  });
265
335
 
266
336
  const disponentSchema = z$1.discriminatedUnion("partyType", [
@@ -286,11 +356,11 @@ const disponentUpdateSchema = z$1.discriminatedUnion("partyType", [
286
356
  const disponentOutputSchema = z$1.discriminatedUnion("partyType", [
287
357
  z$1.object({
288
358
  partyType: z$1.literal("INDIVIDUAL"),
289
- data: individualOutputSchema.partial().nullable()
359
+ data: individualOutputSchema.nullable()
290
360
  }),
291
361
  z$1.object({
292
362
  partyType: z$1.literal("ORGANIZATION"),
293
- data: createOrganizationOutputSchema.partial().nullable()
363
+ data: createOrganizationOutputSchema.nullable()
294
364
  })
295
365
  ]);
296
366
 
@@ -7883,123 +7953,6 @@ function requireEsprima () {
7883
7953
  return esprima$1.exports;
7884
7954
  }
7885
7955
 
7886
- var util = {};
7887
-
7888
- var hasRequiredUtil;
7889
-
7890
- function requireUtil () {
7891
- if (hasRequiredUtil) return util;
7892
- hasRequiredUtil = 1;
7893
- // Copyright Joyent, Inc. and other Node contributors.
7894
- //
7895
- // Permission is hereby granted, free of charge, to any person obtaining a
7896
- // copy of this software and associated documentation files (the
7897
- // "Software"), to deal in the Software without restriction, including
7898
- // without limitation the rights to use, copy, modify, merge, publish,
7899
- // distribute, sublicense, and/or sell copies of the Software, and to permit
7900
- // persons to whom the Software is furnished to do so, subject to the
7901
- // following conditions:
7902
- //
7903
- // The above copyright notice and this permission notice shall be included
7904
- // in all copies or substantial portions of the Software.
7905
- //
7906
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
7907
- // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7908
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
7909
- // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
7910
- // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
7911
- // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
7912
- // USE OR OTHER DEALINGS IN THE SOFTWARE.
7913
-
7914
- // NOTE: These type checking functions intentionally don't use `instanceof`
7915
- // because it is fragile and can be easily faked with `Object.create()`.
7916
-
7917
- function isArray(arg) {
7918
- if (Array.isArray) {
7919
- return Array.isArray(arg);
7920
- }
7921
- return objectToString(arg) === '[object Array]';
7922
- }
7923
- util.isArray = isArray;
7924
-
7925
- function isBoolean(arg) {
7926
- return typeof arg === 'boolean';
7927
- }
7928
- util.isBoolean = isBoolean;
7929
-
7930
- function isNull(arg) {
7931
- return arg === null;
7932
- }
7933
- util.isNull = isNull;
7934
-
7935
- function isNullOrUndefined(arg) {
7936
- return arg == null;
7937
- }
7938
- util.isNullOrUndefined = isNullOrUndefined;
7939
-
7940
- function isNumber(arg) {
7941
- return typeof arg === 'number';
7942
- }
7943
- util.isNumber = isNumber;
7944
-
7945
- function isString(arg) {
7946
- return typeof arg === 'string';
7947
- }
7948
- util.isString = isString;
7949
-
7950
- function isSymbol(arg) {
7951
- return typeof arg === 'symbol';
7952
- }
7953
- util.isSymbol = isSymbol;
7954
-
7955
- function isUndefined(arg) {
7956
- return arg === void 0;
7957
- }
7958
- util.isUndefined = isUndefined;
7959
-
7960
- function isRegExp(re) {
7961
- return objectToString(re) === '[object RegExp]';
7962
- }
7963
- util.isRegExp = isRegExp;
7964
-
7965
- function isObject(arg) {
7966
- return typeof arg === 'object' && arg !== null;
7967
- }
7968
- util.isObject = isObject;
7969
-
7970
- function isDate(d) {
7971
- return objectToString(d) === '[object Date]';
7972
- }
7973
- util.isDate = isDate;
7974
-
7975
- function isError(e) {
7976
- return (objectToString(e) === '[object Error]' || e instanceof Error);
7977
- }
7978
- util.isError = isError;
7979
-
7980
- function isFunction(arg) {
7981
- return typeof arg === 'function';
7982
- }
7983
- util.isFunction = isFunction;
7984
-
7985
- function isPrimitive(arg) {
7986
- return arg === null ||
7987
- typeof arg === 'boolean' ||
7988
- typeof arg === 'number' ||
7989
- typeof arg === 'string' ||
7990
- typeof arg === 'symbol' || // ES6 symbol
7991
- typeof arg === 'undefined';
7992
- }
7993
- util.isPrimitive = isPrimitive;
7994
-
7995
- util.isBuffer = require$$0.Buffer.isBuffer;
7996
-
7997
- function objectToString(o) {
7998
- return Object.prototype.toString.call(o);
7999
- }
8000
- return util;
8001
- }
8002
-
8003
7956
  /**
8004
7957
  * Default minimum size of a run.
8005
7958
  */
@@ -9096,14 +9049,6 @@ var hasRequiredCommon;
9096
9049
  function requireCommon () {
9097
9050
  if (hasRequiredCommon) return common;
9098
9051
  hasRequiredCommon = 1;
9099
- const {
9100
- isObject,
9101
- isArray,
9102
- isString,
9103
- isNumber,
9104
- isFunction
9105
- } = requireUtil();
9106
-
9107
9052
  const PREFIX_BEFORE = 'before';
9108
9053
  const PREFIX_AFTER_PROP = 'after-prop';
9109
9054
  const PREFIX_AFTER_COLON = 'after-colon';
@@ -9141,6 +9086,57 @@ function requireCommon () {
9141
9086
  const COLON = ':';
9142
9087
  const UNDEFINED = undefined;
9143
9088
 
9089
+ const LINE_BREAKS_BEFORE = new WeakMap();
9090
+ const LINE_BREAKS_AFTER = new WeakMap();
9091
+ const RAW_STRING_LITERALS = new WeakMap();
9092
+
9093
+ const is_string = subject => typeof subject === 'string';
9094
+ const is_number = subject => typeof subject === 'number';
9095
+ /**
9096
+ * @param {unknown} v
9097
+ * @returns {v is NonNullable<object>}
9098
+ */
9099
+ const is_object = v => typeof v === 'object' && v !== null;
9100
+
9101
+ const normalize_key = key => is_string(key) || is_number(key)
9102
+ ? String(key)
9103
+ : null;
9104
+
9105
+ const set_raw_string_literal = (host, key, raw) => {
9106
+ if (!is_object(host) || !is_string(raw)) {
9107
+ return
9108
+ }
9109
+
9110
+ const normalized = normalize_key(key);
9111
+ if (normalized === null) {
9112
+ return
9113
+ }
9114
+
9115
+ let map = RAW_STRING_LITERALS.get(host);
9116
+ if (!map) {
9117
+ map = new Map();
9118
+ RAW_STRING_LITERALS.set(host, map);
9119
+ }
9120
+
9121
+ map.set(normalized, raw);
9122
+ };
9123
+
9124
+ const get_raw_string_literal = (host, key) => {
9125
+ if (!is_object(host)) {
9126
+ return
9127
+ }
9128
+
9129
+ const normalized = normalize_key(key);
9130
+ if (normalized === null) {
9131
+ return
9132
+ }
9133
+
9134
+ const map = RAW_STRING_LITERALS.get(host);
9135
+ return map
9136
+ ? map.get(normalized)
9137
+ : undefined
9138
+ };
9139
+
9144
9140
  const symbol = (prefix, key) => Symbol.for(prefix + COLON + key);
9145
9141
  const symbol_checked = (prefix, key) => {
9146
9142
  if (key) {
@@ -9228,7 +9224,7 @@ function requireCommon () {
9228
9224
  // Assign keys and comments
9229
9225
  const assign = (target, source, keys) => {
9230
9226
  keys.forEach(key => {
9231
- if (!isString(key) && !isNumber(key)) {
9227
+ if (typeof key !== 'string' && typeof key !== 'number') {
9232
9228
  return
9233
9229
  }
9234
9230
 
@@ -9243,13 +9239,26 @@ function requireCommon () {
9243
9239
  return target
9244
9240
  };
9245
9241
 
9246
- const is_raw_json = isFunction(JSON.isRawJSON)
9242
+ const is_raw_json = typeof JSON.isRawJSON === 'function'
9247
9243
  // For backward compatibility,
9248
9244
  // since JSON.isRawJSON is not supported in node < 21
9249
9245
  ? JSON.isRawJSON
9250
9246
  // istanbul ignore next
9251
9247
  : () => false;
9252
9248
 
9249
+ const set_comment_line_breaks = (comment, before, after) => {
9250
+ if (is_number(before) && before >= 0) {
9251
+ LINE_BREAKS_BEFORE.set(comment, before);
9252
+ }
9253
+
9254
+ if (is_number(after) && after >= 0) {
9255
+ LINE_BREAKS_AFTER.set(comment, after);
9256
+ }
9257
+ };
9258
+
9259
+ const get_comment_line_breaks_before = comment => LINE_BREAKS_BEFORE.get(comment);
9260
+ const get_comment_line_breaks_after = comment => LINE_BREAKS_AFTER.get(comment);
9261
+
9253
9262
  common = {
9254
9263
  PROP_SYMBOL_PREFIXES,
9255
9264
 
@@ -9280,7 +9289,16 @@ function requireCommon () {
9280
9289
  swap_comments,
9281
9290
  assign_non_prop_comments,
9282
9291
 
9292
+ is_string,
9293
+ is_number,
9294
+ is_object,
9295
+
9283
9296
  is_raw_json,
9297
+ set_raw_string_literal,
9298
+ get_raw_string_literal,
9299
+ set_comment_line_breaks,
9300
+ get_comment_line_breaks_before,
9301
+ get_comment_line_breaks_after,
9284
9302
 
9285
9303
  /**
9286
9304
  * Assign properties and comments from source to target object.
@@ -9311,11 +9329,11 @@ function requireCommon () {
9311
9329
  * assign(target, source, [])
9312
9330
  */
9313
9331
  assign (target, source, keys) {
9314
- if (!isObject(target)) {
9332
+ if (!is_object(target)) {
9315
9333
  throw new TypeError('Cannot convert undefined or null to object')
9316
9334
  }
9317
9335
 
9318
- if (!isObject(source)) {
9336
+ if (!is_object(source)) {
9319
9337
  return target
9320
9338
  }
9321
9339
 
@@ -9328,7 +9346,7 @@ function requireCommon () {
9328
9346
  // We assign non-property comments
9329
9347
  // if argument `keys` is not specified
9330
9348
  assign_non_prop_comments(target, source);
9331
- } else if (!isArray(keys)) {
9349
+ } else if (!Array.isArray(keys)) {
9332
9350
  throw new TypeError('keys must be array or undefined')
9333
9351
  } else if (keys.length === 0) {
9334
9352
  // Copy all non-property comments from source to target
@@ -9386,7 +9404,7 @@ function requireCommon () {
9386
9404
  where: to_where,
9387
9405
  key: to_key
9388
9406
  }, override = false) {
9389
- if (!isObject(source)) {
9407
+ if (!is_object(source)) {
9390
9408
  throw new TypeError('source must be an object')
9391
9409
  }
9392
9410
 
@@ -9394,7 +9412,7 @@ function requireCommon () {
9394
9412
  target = source;
9395
9413
  }
9396
9414
 
9397
- if (!isObject(target)) {
9415
+ if (!is_object(target)) {
9398
9416
  // No target to move to
9399
9417
  return
9400
9418
  }
@@ -9449,7 +9467,7 @@ function requireCommon () {
9449
9467
  where,
9450
9468
  key
9451
9469
  }) {
9452
- if (!isObject(target)) {
9470
+ if (!is_object(target)) {
9453
9471
  throw new TypeError('target must be an object')
9454
9472
  }
9455
9473
 
@@ -9470,7 +9488,6 @@ var hasRequiredArray;
9470
9488
  function requireArray () {
9471
9489
  if (hasRequiredArray) return array;
9472
9490
  hasRequiredArray = 1;
9473
- const {isArray} = requireUtil();
9474
9491
  const {sort} = requireSrc$1();
9475
9492
 
9476
9493
  const {
@@ -9720,7 +9737,7 @@ function requireArray () {
9720
9737
 
9721
9738
  items.forEach(item => {
9722
9739
  const prev = length;
9723
- length += isArray(item)
9740
+ length += Array.isArray(item)
9724
9741
  ? item.length
9725
9742
  : 1;
9726
9743
 
@@ -9828,7 +9845,10 @@ function requireParse () {
9828
9845
 
9829
9846
  UNDEFINED,
9830
9847
 
9848
+ is_object,
9831
9849
  define,
9850
+ set_raw_string_literal,
9851
+ set_comment_line_breaks,
9832
9852
  assign_non_prop_comments
9833
9853
  } = requireCommon();
9834
9854
 
@@ -10018,17 +10038,41 @@ function requireParse () {
10018
10038
  inline
10019
10039
  };
10020
10040
 
10041
+ const previous_line = last
10042
+ ? last.loc.end.line
10043
+ : 1;
10044
+
10045
+ set_comment_line_breaks(
10046
+ comment,
10047
+ Math.max(0, comment.loc.start.line - previous_line)
10048
+ );
10049
+
10021
10050
  // delete comment.loc
10022
10051
  comments.push(comment);
10023
10052
 
10024
10053
  next();
10025
10054
  }
10026
10055
 
10056
+ const {length} = comments;
10057
+
10058
+ if (length) {
10059
+ const comment = comments[length - 1];
10060
+ const current_line = current
10061
+ ? current.loc.start.line
10062
+ : comment.loc.end.line;
10063
+
10064
+ set_comment_line_breaks(
10065
+ comment,
10066
+ undefined,
10067
+ Math.max(0, current_line - comment.loc.end.line)
10068
+ );
10069
+ }
10070
+
10027
10071
  if (remove_comments) {
10028
10072
  return
10029
10073
  }
10030
10074
 
10031
- if (!comments.length) {
10075
+ if (!length) {
10032
10076
  return
10033
10077
  }
10034
10078
 
@@ -10207,6 +10251,8 @@ function requireParse () {
10207
10251
 
10208
10252
  switch (tt) {
10209
10253
  case 'String':
10254
+ set_raw_string_literal(comments_host, last_prop, current.value);
10255
+ // falls through
10210
10256
  case 'Boolean':
10211
10257
  case 'Null':
10212
10258
  case 'Numeric':
@@ -10226,8 +10272,6 @@ function requireParse () {
10226
10272
  }
10227
10273
  }
10228
10274
 
10229
- const isObject = subject => Object(subject) === subject;
10230
-
10231
10275
  /**
10232
10276
  * Converts a JavaScript Object Notation (JSON) string with comments into an
10233
10277
  * object.
@@ -10291,7 +10335,7 @@ function requireParse () {
10291
10335
  // We should run reviver before the checks below,
10292
10336
  // otherwise the comment info will be lost
10293
10337
  if (!no_comments && result !== null) {
10294
- if (!isObject(result)) {
10338
+ if (!is_object(result)) {
10295
10339
  // 1 -> new Number(1)
10296
10340
  // true -> new Boolean(1)
10297
10341
  // "foo" -> new String("foo")
@@ -10323,10 +10367,6 @@ var hasRequiredStringify;
10323
10367
  function requireStringify () {
10324
10368
  if (hasRequiredStringify) return stringify_1;
10325
10369
  hasRequiredStringify = 1;
10326
- const {
10327
- isArray, isObject, isFunction, isNumber, isString
10328
- } = requireUtil();
10329
-
10330
10370
  const {
10331
10371
  PREFIX_BEFORE_ALL,
10332
10372
  PREFIX_BEFORE,
@@ -10346,12 +10386,17 @@ function requireStringify () {
10346
10386
 
10347
10387
  UNDEFINED,
10348
10388
 
10389
+ is_string,
10390
+ is_number,
10391
+ is_object,
10392
+
10393
+ get_raw_string_literal,
10394
+ get_comment_line_breaks_before,
10395
+ get_comment_line_breaks_after,
10396
+
10349
10397
  is_raw_json
10350
10398
  } = requireCommon();
10351
10399
 
10352
- // eslint-disable-next-line no-control-regex, no-misleading-character-class
10353
- const ESCAPABLE = /[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
10354
-
10355
10400
  // String constants
10356
10401
  const SPACE = ' ';
10357
10402
  const LF = '\n';
@@ -10364,39 +10409,54 @@ function requireStringify () {
10364
10409
  const AFTER_VALUE = prop => `${PREFIX_AFTER_VALUE}:${prop}`;
10365
10410
  const AFTER = prop => `${PREFIX_AFTER}:${prop}`;
10366
10411
 
10367
- // table of character substitutions
10368
- const meta = {
10369
- '\b': '\\b',
10370
- '\t': '\\t',
10371
- '\n': '\\n',
10372
- '\f': '\\f',
10373
- '\r': '\\r',
10374
- '"': '\\"',
10375
- '\\': '\\\\'
10376
- };
10412
+ const quote = JSON.stringify;
10413
+ const comment_stringify = (value, line) => line
10414
+ ? `//${value}`
10415
+ : `/*${value}*/`;
10416
+ const repeat_line_breaks = (line_breaks, gap) => (LF + gap).repeat(line_breaks);
10417
+ const read_line_breaks = line_breaks => is_number(line_breaks) && line_breaks >= 0
10418
+ ? line_breaks
10419
+ : null;
10420
+ const read_line_breaks_from_loc = (previous_comment, comment) => {
10421
+ if (
10422
+ !previous_comment
10423
+ || !previous_comment.loc
10424
+ || !comment.loc
10425
+ ) {
10426
+ return null
10427
+ }
10377
10428
 
10378
- const escape = string => {
10379
- ESCAPABLE.lastIndex = 0;
10429
+ const {end} = previous_comment.loc;
10430
+ const {start} = comment.loc;
10380
10431
 
10381
- if (!ESCAPABLE.test(string)) {
10382
- return string
10432
+ if (
10433
+ !end
10434
+ || !start
10435
+ || !is_number(end.line)
10436
+ || !is_number(start.line)
10437
+ ) {
10438
+ return null
10383
10439
  }
10384
10440
 
10385
- return string.replace(ESCAPABLE, a => {
10386
- const c = meta[a];
10387
- return typeof c === 'string'
10388
- ? c
10389
- : a
10390
- })
10441
+ const line_breaks = start.line - end.line;
10442
+
10443
+ return line_breaks >= 0
10444
+ ? line_breaks
10445
+ : null
10391
10446
  };
10447
+ const count_trailing_line_breaks = (str, gap) => {
10448
+ const unit = LF + gap;
10449
+ const {length} = unit;
10450
+ let i = str.length;
10451
+ let count = 0;
10452
+
10453
+ while (i >= length && str.slice(i - length, i) === unit) {
10454
+ i -= length;
10455
+ count ++;
10456
+ }
10392
10457
 
10393
- // Escape no control characters, no quote characters,
10394
- // and no backslash characters,
10395
- // then we can safely slap some quotes around it.
10396
- const quote = string => `"${escape(string)}"`;
10397
- const comment_stringify = (value, line) => line
10398
- ? `//${value}`
10399
- : `/*${value}*/`;
10458
+ return count
10459
+ };
10400
10460
 
10401
10461
  // display_block `boolean` whether the
10402
10462
  // WHOLE block of comments is always a block group
@@ -10406,27 +10466,58 @@ function requireStringify () {
10406
10466
  return EMPTY
10407
10467
  }
10408
10468
 
10409
- let is_line_comment = false;
10469
+ let str = EMPTY;
10470
+ let last_comment = null;
10410
10471
 
10411
- const str = comments.reduce((prev, {
10412
- inline,
10413
- type,
10414
- value
10415
- }) => {
10416
- const delimiter = inline
10417
- ? SPACE
10418
- : LF + deeper_gap;
10472
+ comments.forEach((comment, i) => {
10473
+ const {
10474
+ inline,
10475
+ type,
10476
+ value
10477
+ } = comment;
10419
10478
 
10420
- is_line_comment = type === 'LineComment';
10479
+ let line_breaks_before = read_line_breaks(
10480
+ get_comment_line_breaks_before(comment)
10481
+ );
10421
10482
 
10422
- return prev + delimiter + comment_stringify(value, is_line_comment)
10423
- }, EMPTY);
10483
+ if (line_breaks_before === null) {
10484
+ line_breaks_before = read_line_breaks_from_loc(last_comment, comment);
10485
+ }
10424
10486
 
10425
- return display_block
10426
- // line comment should always end with a LF
10427
- || is_line_comment
10428
- ? str + LF + deeper_gap
10429
- : str
10487
+ if (line_breaks_before === null) {
10488
+ line_breaks_before = inline
10489
+ ? 0
10490
+ : 1;
10491
+ }
10492
+
10493
+ const delimiter = line_breaks_before > 0
10494
+ ? repeat_line_breaks(line_breaks_before, deeper_gap)
10495
+ : inline
10496
+ ? SPACE
10497
+ // The first comment at the very beginning of the source.
10498
+ : i === 0
10499
+ ? EMPTY
10500
+ : LF + deeper_gap;
10501
+
10502
+ const is_line_comment = type === 'LineComment';
10503
+
10504
+ str += delimiter + comment_stringify(value, is_line_comment);
10505
+
10506
+ last_comment = comment;
10507
+ });
10508
+
10509
+ const default_line_breaks_after = display_block
10510
+ // line comment should always end with a LF
10511
+ || last_comment.type === 'LineComment'
10512
+ ? 1
10513
+ : 0;
10514
+
10515
+ const line_breaks_after = Math.max(
10516
+ default_line_breaks_after,
10517
+ read_line_breaks(get_comment_line_breaks_after(last_comment)) || 0
10518
+ );
10519
+
10520
+ return str + repeat_line_breaks(line_breaks_after, deeper_gap)
10430
10521
  };
10431
10522
 
10432
10523
  let replacer = null;
@@ -10445,9 +10536,15 @@ function requireStringify () {
10445
10536
  // and make a mistake.
10446
10537
  // SO, we are not to only trimRight but trim for both sides
10447
10538
  ? one + two.trim() + LF + gap
10448
- : one.trimRight() + LF + gap
10539
+ : one.trimRight() + repeat_line_breaks(
10540
+ Math.max(1, count_trailing_line_breaks(one, gap)),
10541
+ gap
10542
+ )
10449
10543
  : two
10450
- ? two.trimRight() + LF + gap
10544
+ ? two.trimRight() + repeat_line_breaks(
10545
+ Math.max(1, count_trailing_line_breaks(two, gap)),
10546
+ gap
10547
+ )
10451
10548
  : EMPTY;
10452
10549
 
10453
10550
  const join_content = (inside, value, gap) => {
@@ -10456,6 +10553,21 @@ function requireStringify () {
10456
10553
  return join(comment, inside, gap)
10457
10554
  };
10458
10555
 
10556
+ const stringify_string = (holder, key, value) => {
10557
+ const raw = get_raw_string_literal(holder, key);
10558
+ if (is_string(raw)) {
10559
+ try {
10560
+ if (JSON.parse(raw) === value) {
10561
+ return raw
10562
+ }
10563
+ } catch (e) {
10564
+ // ignore invalid raw string literals and fallback to native behavior
10565
+ }
10566
+ }
10567
+
10568
+ return quote(value)
10569
+ };
10570
+
10459
10571
  // | deeper_gap |
10460
10572
  // | gap | indent |
10461
10573
  // [
@@ -10525,7 +10637,7 @@ function requireStringify () {
10525
10637
  let after_comma = EMPTY;
10526
10638
  let first = true;
10527
10639
 
10528
- const keys = isArray(replacer)
10640
+ const keys = Array.isArray(replacer)
10529
10641
  ? replacer
10530
10642
  : Object.keys(value);
10531
10643
 
@@ -10590,19 +10702,19 @@ function requireStringify () {
10590
10702
  let value = holder[key];
10591
10703
 
10592
10704
  // If the value has a toJSON method, call it to obtain a replacement value.
10593
- if (isObject(value) && isFunction(value.toJSON)) {
10705
+ if (is_object(value) && typeof value.toJSON === 'function') {
10594
10706
  value = value.toJSON(key);
10595
10707
  }
10596
10708
 
10597
10709
  // If we were called with a replacer function, then call the replacer to
10598
10710
  // obtain a replacement value.
10599
- if (isFunction(replacer)) {
10711
+ if (typeof replacer === 'function') {
10600
10712
  value = replacer.call(holder, key, value);
10601
10713
  }
10602
10714
 
10603
10715
  switch (typeof value) {
10604
10716
  case 'string':
10605
- return quote(value)
10717
+ return stringify_string(holder, key, value)
10606
10718
 
10607
10719
  case 'number':
10608
10720
  // JSON numbers must be finite. Encode non-finite numbers as null.
@@ -10623,7 +10735,7 @@ function requireStringify () {
10623
10735
  return value.rawJSON
10624
10736
  }
10625
10737
 
10626
- return isArray(value)
10738
+ return Array.isArray(value)
10627
10739
  ? array_stringify(value, gap)
10628
10740
  : object_stringify(value, gap)
10629
10741
  // JSON.stringify(undefined) === undefined
@@ -10631,10 +10743,10 @@ function requireStringify () {
10631
10743
  }
10632
10744
  }
10633
10745
 
10634
- const get_indent = space => isString(space)
10746
+ const get_indent = space => typeof space === 'string'
10635
10747
  // If the space parameter is a string, it will be used as the indent string.
10636
10748
  ? space
10637
- : isNumber(space)
10749
+ : typeof space === 'number'
10638
10750
  ? SPACE.repeat(space)
10639
10751
  : EMPTY;
10640
10752
 
@@ -10697,7 +10809,7 @@ function requireStringify () {
10697
10809
  }
10698
10810
 
10699
10811
  // vanilla `JSON.parse` allow invalid replacer
10700
- if (!isFunction(replacer_) && !isArray(replacer_)) {
10812
+ if (typeof replacer_ !== 'function' && !Array.isArray(replacer_)) {
10701
10813
  replacer_ = null;
10702
10814
  }
10703
10815
 
@@ -10710,7 +10822,7 @@ function requireStringify () {
10710
10822
 
10711
10823
  clean();
10712
10824
 
10713
- return isObject(value)
10825
+ return is_object(value)
10714
10826
  ? process_comments(value, PREFIX_BEFORE_ALL, EMPTY, true).trimLeft()
10715
10827
  + str
10716
10828
  + process_comments(value, PREFIX_AFTER_ALL, EMPTY).trimRight()
@@ -11791,22 +11903,12 @@ new z.$ZodObject({
11791
11903
  const updateBankAccountSchema = z$1.object({
11792
11904
  ...bankAccountMetadataSchema.shape,
11793
11905
  partyId: z$1.uuid(),
11794
- internalId: z$1.string().optional().nullable(),
11906
+ internalId: z$1.string().optional(),
11795
11907
  holderName: z$1.string(),
11796
- number: z$1.string().nullable(),
11797
- bankCode: bankAccountMetadataSchema.shape.bankCode.nullish(),
11908
+ number: z$1.string().optional(),
11798
11909
  currency: bankAccountMetadataSchema.shape.currency.nonoptional(),
11799
11910
  countryCode: bankAccountMetadataSchema.shape.countryCode.nonoptional(),
11800
- id: bankAccountMetadataSchema.shape.id.nonoptional(),
11801
- iban: bankAccountMetadataSchema.shape.iban.nullable().optional(),
11802
- address: bankAccountMetadataSchema.shape.address.nullable().optional(),
11803
- swiftBic: bankAccountMetadataSchema.shape.swiftBic.nullable().optional(),
11804
- bicCor: bankAccountMetadataSchema.shape.bicCor.nullable().optional(),
11805
- routingNumber: bankAccountMetadataSchema.shape.routingNumber.nullable().optional(),
11806
- sortCode: bankAccountMetadataSchema.shape.sortCode.nullable().optional(),
11807
- clabe: bankAccountMetadataSchema.shape.clabe.nullable().optional(),
11808
- bsb: bankAccountMetadataSchema.shape.bsb.nullable().optional(),
11809
- brBankNumber: bankAccountMetadataSchema.shape.brBankNumber.nullable().optional()
11911
+ id: bankAccountMetadataSchema.shape.id.nonoptional()
11810
11912
  });
11811
11913
  const bankAccountInputSchema = updateBankAccountSchema.required({
11812
11914
  holderName: true,
@@ -11814,66 +11916,68 @@ const bankAccountInputSchema = updateBankAccountSchema.required({
11814
11916
  countryCode: true
11815
11917
  }).omit({ id: true, partyId: true });
11816
11918
  const bankAccountOutputSchema = z$1.object({
11817
- ...bankAccountMetadataSchema.shape,
11919
+ id: z$1.string(),
11818
11920
  partyId: z$1.uuid().nullable(),
11819
- internalId: z$1.string().optional().nullable(),
11921
+ internalId: z$1.string().nullable(),
11820
11922
  holderName: z$1.string(),
11821
- number: z$1.string().optional().nullable(),
11822
- updatedAt: z$1.coerce.date().optional().nullable(),
11823
- bankCode: bankAccountMetadataSchema.shape.bankCode.nullish(),
11824
- iban: bankAccountMetadataSchema.shape.iban.nullable().optional(),
11825
- address: bankAccountMetadataSchema.shape.address.nullable().optional(),
11826
- swiftBic: bankAccountMetadataSchema.shape.swiftBic.nullable().optional(),
11827
- bicCor: bankAccountMetadataSchema.shape.bicCor.nullable().optional(),
11828
- routingNumber: bankAccountMetadataSchema.shape.routingNumber.nullable().optional(),
11829
- sortCode: bankAccountMetadataSchema.shape.sortCode.nullable().optional(),
11830
- clabe: bankAccountMetadataSchema.shape.clabe.nullable().optional(),
11831
- bsb: bankAccountMetadataSchema.shape.bsb.nullable().optional(),
11832
- brBankNumber: bankAccountMetadataSchema.shape.brBankNumber.nullable().optional()
11923
+ number: z$1.string().nullable(),
11924
+ bankCode: z$1.string().nullable(),
11925
+ currency: z$1.string(),
11926
+ countryCode: z$1.string(),
11927
+ iban: z$1.string().nullable(),
11928
+ address: z$1.string().nullable(),
11929
+ swiftBic: z$1.string().nullable(),
11930
+ bicCor: z$1.string().nullable(),
11931
+ routingNumber: z$1.string().nullable(),
11932
+ sortCode: z$1.string().nullable(),
11933
+ clabe: z$1.string().nullable(),
11934
+ bsb: z$1.string().nullable(),
11935
+ brBankNumber: z$1.string().nullable(),
11936
+ updatedAt: z$1.coerce.date().nullable()
11833
11937
  });
11834
11938
 
11835
11939
  const createAmlInputSchema = z$1.object({
11836
- partyId: z$1.uuid().optional().nullable(),
11837
- internalId: z$1.string().optional().nullable(),
11940
+ partyId: z$1.uuid().optional(),
11941
+ internalId: z$1.string().optional(),
11838
11942
  sourceOfWealth: z$1.string(),
11839
11943
  yearlyIncome: z$1.string(),
11840
- tradesPurpose: z$1.string().optional().nullable(),
11944
+ tradesPurpose: z$1.string().optional(),
11841
11945
  sourceOfIncome: z$1.string(),
11842
- transactionType: z$1.string().optional().nullable(),
11843
- transactionTypeExpiry: z$1.date().optional().nullable(),
11946
+ transactionType: z$1.string().optional(),
11947
+ transactionTypeExpiry: z$1.date().optional(),
11844
11948
  isDistraint: z$1.boolean().default(false),
11845
11949
  estTxsVolumeMonth: z$1.string(),
11846
11950
  estTxsVolumeYear: z$1.string(),
11847
11951
  tradingCountries: z$1.string(),
11848
11952
  tradingSide: z$1.string(),
11849
11953
  acceptedAMLTermsAndConditions: z$1.boolean(),
11850
- signatureMethod: z$1.string().nullable().optional(),
11851
- existencePeriod: z$1.string().nullable().optional(),
11852
- reputation: z$1.string().nullable().optional(),
11853
- riskLevel: z$1.enum(AmlScoreTypeZod).nullable().optional(),
11854
- kycStatus: z$1.enum(KycStatusZod).nullable().optional()
11954
+ signatureMethod: z$1.string().optional(),
11955
+ existencePeriod: z$1.string().optional(),
11956
+ reputation: z$1.string().optional(),
11957
+ riskLevel: z$1.enum(AmlScoreTypeZod).optional(),
11958
+ kycStatus: z$1.enum(KycStatusZod).optional()
11855
11959
  });
11856
11960
  const updateAmlInputSchema = z$1.object({
11857
11961
  id: z$1.uuid(),
11858
- partyId: z$1.uuid().optional().nullable(),
11859
- internalId: z$1.string().optional().nullable(),
11962
+ partyId: z$1.uuid().optional(),
11963
+ internalId: z$1.string().optional(),
11860
11964
  sourceOfWealth: z$1.string().optional(),
11861
11965
  yearlyIncome: z$1.string().optional(),
11862
- tradesPurpose: z$1.string().optional().nullable(),
11966
+ tradesPurpose: z$1.string().optional(),
11863
11967
  sourceOfIncome: z$1.string().optional(),
11864
- transactionType: z$1.string().optional().nullable(),
11865
- transactionTypeExpiry: z$1.date().optional().nullable(),
11968
+ transactionType: z$1.string().optional(),
11969
+ transactionTypeExpiry: z$1.date().optional(),
11866
11970
  isDistraint: z$1.boolean().optional(),
11867
11971
  estTxsVolumeMonth: z$1.string(),
11868
11972
  estTxsVolumeYear: z$1.string(),
11869
11973
  tradingCountries: z$1.string(),
11870
11974
  tradingSide: z$1.string(),
11871
11975
  acceptedAMLTermsAndConditions: z$1.boolean(),
11872
- signatureMethod: z$1.string().nullable().optional(),
11873
- existencePeriod: z$1.string().nullable().optional(),
11874
- reputation: z$1.string().nullable().optional(),
11875
- riskLevel: z$1.enum(AmlScoreTypeZod).nullable().optional(),
11876
- kycStatus: z$1.enum(KycStatusZod).nullable().optional()
11976
+ signatureMethod: z$1.string().optional(),
11977
+ existencePeriod: z$1.string().optional(),
11978
+ reputation: z$1.string().optional(),
11979
+ riskLevel: z$1.enum(AmlScoreTypeZod).optional(),
11980
+ kycStatus: z$1.enum(KycStatusZod).optional()
11877
11981
  });
11878
11982
  const createAmlOutputSchema = z$1.object({
11879
11983
  id: z$1.uuid(),
@@ -11902,17 +12006,17 @@ const createAmlOutputSchema = z$1.object({
11902
12006
 
11903
12007
  const createAddressInputSchema = z$1.object({
11904
12008
  addressType: z$1.enum(AddressTypeZod),
11905
- internalId: z$1.string().optional().nullable(),
12009
+ internalId: z$1.string().optional(),
11906
12010
  street: z$1.string(),
11907
- orientationNumber: z$1.string().nullable(),
11908
- descriptiveNumber: z$1.string().nullable(),
12011
+ orientationNumber: z$1.string().optional(),
12012
+ descriptiveNumber: z$1.string().optional(),
11909
12013
  municipality: z$1.string().max(255),
11910
- municipalityPart: z$1.string().nullable(),
12014
+ municipalityPart: z$1.string().optional(),
11911
12015
  zipCode: z$1.string().max(20),
11912
12016
  district: z$1.string().max(255),
11913
12017
  region: z$1.string().max(255),
11914
12018
  countryCode: z$1.enum(COUNTRY_CODES_2),
11915
- ruianCode: z$1.string().nullable()
12019
+ ruianCode: z$1.string().optional()
11916
12020
  });
11917
12021
  const createAddressOutputSchema = z$1.object({
11918
12022
  id: z$1.uuid(),
@@ -11936,38 +12040,38 @@ const createAddressOutputSchema = z$1.object({
11936
12040
  const updateAddressInputSchema = z$1.object({
11937
12041
  id: z$1.uuid(),
11938
12042
  partyId: z$1.uuid(),
11939
- internalId: z$1.string().optional().nullable(),
12043
+ internalId: z$1.string().optional(),
11940
12044
  addressType: z$1.enum(AddressTypeZod),
11941
12045
  street: z$1.string(),
11942
- orientationNumber: z$1.string().nullable(),
11943
- descriptiveNumber: z$1.string().nullable(),
12046
+ orientationNumber: z$1.string().optional(),
12047
+ descriptiveNumber: z$1.string().optional(),
11944
12048
  municipality: z$1.string().max(255),
11945
- municipalityPart: z$1.string().nullable(),
12049
+ municipalityPart: z$1.string().optional(),
11946
12050
  zipCode: z$1.string().max(20),
11947
12051
  district: z$1.string().max(255),
11948
12052
  region: z$1.string().max(255),
11949
12053
  countryCode: z$1.enum(COUNTRY_CODES_2),
11950
- ruianCode: z$1.string().nullable()
12054
+ ruianCode: z$1.string().optional()
11951
12055
  });
11952
12056
 
11953
12057
  const partySchema = z$1.object({
11954
12058
  partyType: z$1.enum(PartyTypeZod),
11955
12059
  language: z$1.enum(LANGUAGE_CODES),
11956
12060
  id: z$1.uuid(),
11957
- internalId: z$1.string().optional().nullable(),
11958
- note: z$1.string().nullable(),
11959
- countryCode: z$1.enum(COUNTRY_CODES_2).nullable()
12061
+ internalId: z$1.string().optional(),
12062
+ note: z$1.string().optional(),
12063
+ countryCode: z$1.enum(COUNTRY_CODES_2).optional()
11960
12064
  });
11961
12065
  const partyCreateOutputSchema = z$1.object({
11962
12066
  customerStatus: z$1.enum(CustomerStatusZod),
11963
12067
  partyType: z$1.enum(PartyTypeZod),
11964
12068
  language: z$1.enum(LANGUAGE_CODES),
11965
- id: z$1.uuid().nullable().optional(),
11966
- internalId: z$1.string().optional().nullable(),
11967
- note: z$1.string().nullable().optional(),
11968
- countryCode: z$1.enum(COUNTRY_CODES_2).nullable().optional(),
11969
- createdAt: z$1.date().nullable().optional(),
11970
- updatedAt: z$1.date().nullable().optional()
12069
+ id: z$1.uuid().nullable(),
12070
+ internalId: z$1.string().nullable(),
12071
+ note: z$1.string().nullable(),
12072
+ countryCode: z$1.enum(COUNTRY_CODES_2).nullable(),
12073
+ createdAt: z$1.date().nullable(),
12074
+ updatedAt: z$1.date().nullable()
11971
12075
  });
11972
12076
  partyCreateOutputSchema.partial({
11973
12077
  customerStatus: true,
@@ -11989,8 +12093,8 @@ const partyOutputSchema = z$1.object({
11989
12093
  id: z$1.uuid(),
11990
12094
  isClient: z$1.boolean()
11991
12095
  }).nullable(),
11992
- personalData: individualOutputSchema.partial().nullable(),
11993
- organizationData: createOrganizationOutputSchema.partial().nullable(),
12096
+ personalData: individualOutputSchema.nullable(),
12097
+ organizationData: createOrganizationOutputSchema.nullable(),
11994
12098
  bankAccounts: z$1.array(bankAccountOutputSchema).nullable(),
11995
12099
  disponents: z$1.array(disponentOutputSchema).nullable(),
11996
12100
  addresses: z$1.array(createAddressOutputSchema).nullable(),
@@ -12006,7 +12110,7 @@ const partyUpdateInputSchema = z$1.object({
12006
12110
  disponents: z$1.array(disponentUpdateSchema).optional(),
12007
12111
  addresses: z$1.array(updateAddressInputSchema),
12008
12112
  recipients: z$1.array(updateBankAccountSchema).nullable(),
12009
- aml: updateAmlInputSchema.nullable().optional()
12113
+ aml: updateAmlInputSchema.optional()
12010
12114
  });
12011
12115
  const updatePartyOuputSchema = z$1.object({
12012
12116
  id: z$1.uuid(),