@devizovaburza/mdm-sdk 1.2.1 → 1.2.2

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
@@ -418,16 +418,10 @@ const bankAccountInputSchema = updateBankAccountSchema.required({
418
418
  currency: true,
419
419
  countryCode: true
420
420
  }).omit({ id: true, partyId: true });
421
- const disponentSchema = z.discriminatedUnion("partyType", [
422
- z.object({
423
- partyType: z.literal("INDIVIDUAL"),
424
- data: individualInsertSchema
425
- }),
426
- z.object({
427
- partyType: z.literal("ORGANIZATION"),
428
- data: createOrganizationInputSchema
429
- })
430
- ]);
421
+ const disponentSchema = z.object({
422
+ partyType: z.literal("INDIVIDUAL"),
423
+ data: individualInsertSchema
424
+ });
431
425
  const zipCodeRegex = /^\d{3}\s?\d{2}$/;
432
426
  const createAddressInputSchema = z.object({
433
427
  addressType: z.enum(ADDRESS_TYPE),
@@ -970,42 +964,10 @@ const disponentIndividualSyncDataSchema = z.object({
970
964
  stayAbroadCountries: z.enum(COUNTRY_CODES_2).optional(),
971
965
  identityDocuments: z.array(idDocumentInputSchema).optional()
972
966
  });
973
- const disponentOrganizationSyncDataSchema = z.object({
974
- id: z.uuid().optional(),
975
- businessName: z.string(),
976
- email: z.email("Invalid email format").optional(),
977
- phone: z.string().optional(),
978
- registeredNumber: z.string(),
979
- registeredIn: z.enum(COUNTRY_CODES_2),
980
- operatesIn: z.enum(COUNTRY_CODES_2),
981
- presentIn: z.enum(COUNTRY_CODES_2),
982
- monthlyVolumeIn: z.number(),
983
- monthlyVolumeOut: z.number(),
984
- ownedBy: z.string(),
985
- companyObjects: z.array(z.enum(CZ_NACE_CODES)).min(1),
986
- annualTurnover: z.number(),
987
- numberOfEmployees: z.number().optional(),
988
- prosecuted: z.string().optional(),
989
- location: z.string().optional(),
990
- fileNumber: z.string().optional(),
991
- websiteUrl: z.url("Invalid website URL").optional(),
992
- vatPayer: z.boolean(),
993
- companyObjectsDescription: z.string(),
994
- turnover3years: z.number(),
995
- operationCountries: z.string(),
996
- riskyBusinessType: z.string().optional(),
997
- registerUri: z.string().optional()
967
+ const disponentSyncSchema = z.object({
968
+ partyType: z.literal("INDIVIDUAL"),
969
+ data: disponentIndividualSyncDataSchema
998
970
  });
999
- const disponentSyncSchema = z.discriminatedUnion("partyType", [
1000
- z.object({
1001
- partyType: z.literal("INDIVIDUAL"),
1002
- data: disponentIndividualSyncDataSchema
1003
- }),
1004
- z.object({
1005
- partyType: z.literal("ORGANIZATION"),
1006
- data: disponentOrganizationSyncDataSchema
1007
- })
1008
- ]);
1009
971
  const syncAddressInputSchema = z.object({
1010
972
  id: z.uuid().optional(),
1011
973
  partyId: z.uuid(),
@@ -1502,6 +1464,7 @@ const individualOutputSchema = z.object({
1502
1464
  identityDocuments: z.array(idDocumentOutputSchema).nullable()
1503
1465
  });
1504
1466
  const createOrganizationOutputSchema = z.object({
1467
+ id: z.uuid(),
1505
1468
  partyId: z.uuid(),
1506
1469
  internalId: z.string().nullable(),
1507
1470
  businessName: z.string(),
@@ -1551,16 +1514,10 @@ const bankAccountOutputSchema = z.object({
1551
1514
  updatedAt: z.iso.datetime().nullable(),
1552
1515
  statementUri: z.string().nullable()
1553
1516
  });
1554
- const disponentOutputSchema = z.discriminatedUnion("partyType", [
1555
- z.object({
1556
- partyType: z.literal("INDIVIDUAL"),
1557
- data: individualOutputSchema.nullable()
1558
- }),
1559
- z.object({
1560
- partyType: z.literal("ORGANIZATION"),
1561
- data: createOrganizationOutputSchema.nullable()
1562
- })
1563
- ]);
1517
+ const disponentOutputSchema = z.object({
1518
+ partyType: z.literal("INDIVIDUAL"),
1519
+ data: individualOutputSchema.nullable()
1520
+ });
1564
1521
  const createAddressOutputSchema = z.object({
1565
1522
  id: z.uuid(),
1566
1523
  partyId: z.uuid(),
@@ -1675,6 +1632,8 @@ const legalRepresentativeOutputSchema = z.object({
1675
1632
  isPep: z.boolean(),
1676
1633
  phone: z.string().nullable(),
1677
1634
  pin: z.string().nullable(),
1635
+ employer: z.string().nullable(),
1636
+ employerCountry: z.enum(COUNTRY_CODES_2).nullable(),
1678
1637
  dateOfEstablishment: z.string().nullable(),
1679
1638
  address: createAddressOutputSchema.nullable()
1680
1639
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devizovaburza/mdm-sdk",
3
- "version": "1.2.1",
3
+ "version": "1.2.2",
4
4
  "author": "Devizová burza a.s.",
5
5
  "license": "ISC",
6
6
  "type": "module",