@deliverart/sdk-js-company 0.1.1 → 0.1.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @deliverart/sdk-js-company
2
2
 
3
+ ## 0.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 90a4505: update version pkg
8
+
9
+ ## 0.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - 575341f: expose adminby for editable field
14
+
3
15
  ## 0.1.1
4
16
 
5
17
  ### Patch Changes
package/dist/index.cjs CHANGED
@@ -68,7 +68,9 @@ var writableCompanySchema = companyDetailsSchema.pick({
68
68
  taxCode: true,
69
69
  billingAddress: true,
70
70
  operationalAddress: true,
71
- billingData: true
71
+ billingData: true,
72
+ adminBy: true
73
+ // Only Admin can set this
72
74
  });
73
75
  var companiesQuerySchema = import_zod.z.object({
74
76
  businessName: import_zod.z.string().optional(),
package/dist/index.d.cts CHANGED
@@ -133,7 +133,7 @@ declare const companyDetailsSchema: z.ZodObject<{
133
133
  sdi?: string | null | undefined;
134
134
  pec?: string | null | undefined;
135
135
  }>;
136
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
136
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
137
137
  }, "strip", z.ZodTypeAny, {
138
138
  id: string;
139
139
  businessName: string;
@@ -189,7 +189,7 @@ declare const companyDetailsSchema: z.ZodObject<{
189
189
  sdi?: string | null | undefined;
190
190
  pec?: string | null | undefined;
191
191
  };
192
- adminBy: string;
192
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
193
193
  }>;
194
194
  type CompanyDetails = z.infer<typeof companyDetailsSchema>;
195
195
  declare const writableCompanySchema: z.ZodObject<Pick<{
@@ -260,8 +260,8 @@ declare const writableCompanySchema: z.ZodObject<Pick<{
260
260
  sdi?: string | null | undefined;
261
261
  pec?: string | null | undefined;
262
262
  }>;
263
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
264
- }, "businessName" | "vat" | "taxCode" | "operationalAddress" | "billingAddress" | "billingData">, "strip", z.ZodTypeAny, {
263
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
264
+ }, "businessName" | "vat" | "taxCode" | "operationalAddress" | "billingAddress" | "billingData" | "adminBy">, "strip", z.ZodTypeAny, {
265
265
  businessName: string;
266
266
  vat: string;
267
267
  taxCode: string | null;
@@ -285,6 +285,7 @@ declare const writableCompanySchema: z.ZodObject<Pick<{
285
285
  sdi?: string | null | undefined;
286
286
  pec?: string | null | undefined;
287
287
  };
288
+ adminBy: _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
288
289
  }, {
289
290
  businessName: string;
290
291
  vat: string;
@@ -309,6 +310,7 @@ declare const writableCompanySchema: z.ZodObject<Pick<{
309
310
  sdi?: string | null | undefined;
310
311
  pec?: string | null | undefined;
311
312
  };
313
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
312
314
  }>;
313
315
  declare const companiesQuerySchema: z.ZodObject<{
314
316
  businessName: z.ZodOptional<z.ZodString>;
@@ -413,6 +415,7 @@ declare const createCompanyInputSchema: z.ZodObject<{
413
415
  sdi?: string | null | undefined;
414
416
  pec?: string | null | undefined;
415
417
  }>;
418
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
416
419
  }, "strip", z.ZodTypeAny, {
417
420
  businessName: string;
418
421
  vat: string;
@@ -437,6 +440,7 @@ declare const createCompanyInputSchema: z.ZodObject<{
437
440
  sdi?: string | null | undefined;
438
441
  pec?: string | null | undefined;
439
442
  };
443
+ adminBy: _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
440
444
  }, {
441
445
  businessName: string;
442
446
  vat: string;
@@ -461,6 +465,7 @@ declare const createCompanyInputSchema: z.ZodObject<{
461
465
  sdi?: string | null | undefined;
462
466
  pec?: string | null | undefined;
463
467
  };
468
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
464
469
  }>;
465
470
  type CreateCompanyInput = z.input<typeof createCompanyInputSchema>;
466
471
  declare const createCompanyResponseSchema: z.ZodObject<{
@@ -531,7 +536,7 @@ declare const createCompanyResponseSchema: z.ZodObject<{
531
536
  sdi?: string | null | undefined;
532
537
  pec?: string | null | undefined;
533
538
  }>;
534
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
539
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
535
540
  }, "strip", z.ZodTypeAny, {
536
541
  id: string;
537
542
  businessName: string;
@@ -587,7 +592,7 @@ declare const createCompanyResponseSchema: z.ZodObject<{
587
592
  sdi?: string | null | undefined;
588
593
  pec?: string | null | undefined;
589
594
  };
590
- adminBy: string;
595
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
591
596
  }>;
592
597
  type CreateCompanyResponse = z.infer<typeof createCompanyResponseSchema>;
593
598
  declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInputSchema, typeof createCompanyResponseSchema> {
@@ -658,6 +663,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
658
663
  sdi?: string | null | undefined;
659
664
  pec?: string | null | undefined;
660
665
  }>;
666
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
661
667
  }, "strip", z.ZodTypeAny, {
662
668
  businessName: string;
663
669
  vat: string;
@@ -682,6 +688,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
682
688
  sdi?: string | null | undefined;
683
689
  pec?: string | null | undefined;
684
690
  };
691
+ adminBy: _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
685
692
  }, {
686
693
  businessName: string;
687
694
  vat: string;
@@ -706,6 +713,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
706
713
  sdi?: string | null | undefined;
707
714
  pec?: string | null | undefined;
708
715
  };
716
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
709
717
  }>;
710
718
  readonly outputSchema: z.ZodObject<{
711
719
  id: z.ZodString;
@@ -775,7 +783,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
775
783
  sdi?: string | null | undefined;
776
784
  pec?: string | null | undefined;
777
785
  }>;
778
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
786
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
779
787
  }, "strip", z.ZodTypeAny, {
780
788
  id: string;
781
789
  businessName: string;
@@ -831,7 +839,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
831
839
  sdi?: string | null | undefined;
832
840
  pec?: string | null | undefined;
833
841
  };
834
- adminBy: string;
842
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
835
843
  }>;
836
844
  readonly querySchema: undefined;
837
845
  readonly headersSchema: undefined;
@@ -1283,7 +1291,7 @@ declare const getCompanyDetailsResponseSchema: z.ZodObject<{
1283
1291
  sdi?: string | null | undefined;
1284
1292
  pec?: string | null | undefined;
1285
1293
  }>;
1286
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
1294
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
1287
1295
  }, "strip", z.ZodTypeAny, {
1288
1296
  id: string;
1289
1297
  businessName: string;
@@ -1339,7 +1347,7 @@ declare const getCompanyDetailsResponseSchema: z.ZodObject<{
1339
1347
  sdi?: string | null | undefined;
1340
1348
  pec?: string | null | undefined;
1341
1349
  };
1342
- adminBy: string;
1350
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
1343
1351
  }>;
1344
1352
  type GetCompanyDetailsResponse = CompanyDetails;
1345
1353
  declare class GetCompanyDetails extends AbstractApiRequest<typeof getCompanyDetailsInputSchema, typeof getCompanyDetailsResponseSchema> {
@@ -1415,7 +1423,7 @@ declare class GetCompanyDetails extends AbstractApiRequest<typeof getCompanyDeta
1415
1423
  sdi?: string | null | undefined;
1416
1424
  pec?: string | null | undefined;
1417
1425
  }>;
1418
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
1426
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
1419
1427
  }, "strip", z.ZodTypeAny, {
1420
1428
  id: string;
1421
1429
  businessName: string;
@@ -1471,7 +1479,7 @@ declare class GetCompanyDetails extends AbstractApiRequest<typeof getCompanyDeta
1471
1479
  sdi?: string | null | undefined;
1472
1480
  pec?: string | null | undefined;
1473
1481
  };
1474
- adminBy: string;
1482
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
1475
1483
  }>;
1476
1484
  readonly querySchema: undefined;
1477
1485
  readonly headersSchema: undefined;
@@ -1544,6 +1552,7 @@ declare const updateCompanyInputSchema: z.ZodObject<{
1544
1552
  sdi?: string | null | undefined;
1545
1553
  pec?: string | null | undefined;
1546
1554
  }>>;
1555
+ adminBy: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>>;
1547
1556
  }, "strip", z.ZodTypeAny, {
1548
1557
  businessName?: string | undefined;
1549
1558
  vat?: string | undefined;
@@ -1568,6 +1577,7 @@ declare const updateCompanyInputSchema: z.ZodObject<{
1568
1577
  sdi?: string | null | undefined;
1569
1578
  pec?: string | null | undefined;
1570
1579
  } | undefined;
1580
+ adminBy?: _deliverart_sdk_js_global_types.IriObject<"/users/:id"> | undefined;
1571
1581
  }, {
1572
1582
  businessName?: string | undefined;
1573
1583
  vat?: string | undefined;
@@ -1592,6 +1602,7 @@ declare const updateCompanyInputSchema: z.ZodObject<{
1592
1602
  sdi?: string | null | undefined;
1593
1603
  pec?: string | null | undefined;
1594
1604
  } | undefined;
1605
+ adminBy?: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id"> | undefined;
1595
1606
  }>;
1596
1607
  type UpdateCompanyInput = z.input<typeof updateCompanyInputSchema>;
1597
1608
  declare const updateCompanyResponseSchema: z.ZodObject<{
@@ -1662,7 +1673,7 @@ declare const updateCompanyResponseSchema: z.ZodObject<{
1662
1673
  sdi?: string | null | undefined;
1663
1674
  pec?: string | null | undefined;
1664
1675
  }>;
1665
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
1676
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
1666
1677
  }, "strip", z.ZodTypeAny, {
1667
1678
  id: string;
1668
1679
  businessName: string;
@@ -1718,7 +1729,7 @@ declare const updateCompanyResponseSchema: z.ZodObject<{
1718
1729
  sdi?: string | null | undefined;
1719
1730
  pec?: string | null | undefined;
1720
1731
  };
1721
- adminBy: string;
1732
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
1722
1733
  }>;
1723
1734
  type UpdateCompanyResponse = z.infer<typeof updateCompanyResponseSchema>;
1724
1735
  declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInputSchema, typeof updateCompanyResponseSchema> {
@@ -1789,6 +1800,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1789
1800
  sdi?: string | null | undefined;
1790
1801
  pec?: string | null | undefined;
1791
1802
  }>>;
1803
+ adminBy: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>>;
1792
1804
  }, "strip", z.ZodTypeAny, {
1793
1805
  businessName?: string | undefined;
1794
1806
  vat?: string | undefined;
@@ -1813,6 +1825,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1813
1825
  sdi?: string | null | undefined;
1814
1826
  pec?: string | null | undefined;
1815
1827
  } | undefined;
1828
+ adminBy?: _deliverart_sdk_js_global_types.IriObject<"/users/:id"> | undefined;
1816
1829
  }, {
1817
1830
  businessName?: string | undefined;
1818
1831
  vat?: string | undefined;
@@ -1837,6 +1850,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1837
1850
  sdi?: string | null | undefined;
1838
1851
  pec?: string | null | undefined;
1839
1852
  } | undefined;
1853
+ adminBy?: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id"> | undefined;
1840
1854
  }>;
1841
1855
  readonly outputSchema: z.ZodObject<{
1842
1856
  id: z.ZodString;
@@ -1906,7 +1920,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1906
1920
  sdi?: string | null | undefined;
1907
1921
  pec?: string | null | undefined;
1908
1922
  }>;
1909
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
1923
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
1910
1924
  }, "strip", z.ZodTypeAny, {
1911
1925
  id: string;
1912
1926
  businessName: string;
@@ -1962,7 +1976,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1962
1976
  sdi?: string | null | undefined;
1963
1977
  pec?: string | null | undefined;
1964
1978
  };
1965
- adminBy: string;
1979
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
1966
1980
  }>;
1967
1981
  readonly querySchema: undefined;
1968
1982
  readonly headersSchema: undefined;
@@ -1971,7 +1985,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1971
1985
  getPath(): string;
1972
1986
  }
1973
1987
 
1974
- declare const companyIriSchema: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/companies/:id">, string>;
1988
+ declare const companyIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
1975
1989
  type CompanyIri = z.infer<typeof companyIriSchema>;
1976
1990
 
1977
1991
  export { type CompaniesQueryParams, type Company, type CompanyDetails, type CompanyIri, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesInput, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsInput, type GetCompanyDetailsResponse, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companiesQuerySchema, companyDetailsSchema, companyIriSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
package/dist/index.d.ts CHANGED
@@ -133,7 +133,7 @@ declare const companyDetailsSchema: z.ZodObject<{
133
133
  sdi?: string | null | undefined;
134
134
  pec?: string | null | undefined;
135
135
  }>;
136
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
136
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
137
137
  }, "strip", z.ZodTypeAny, {
138
138
  id: string;
139
139
  businessName: string;
@@ -189,7 +189,7 @@ declare const companyDetailsSchema: z.ZodObject<{
189
189
  sdi?: string | null | undefined;
190
190
  pec?: string | null | undefined;
191
191
  };
192
- adminBy: string;
192
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
193
193
  }>;
194
194
  type CompanyDetails = z.infer<typeof companyDetailsSchema>;
195
195
  declare const writableCompanySchema: z.ZodObject<Pick<{
@@ -260,8 +260,8 @@ declare const writableCompanySchema: z.ZodObject<Pick<{
260
260
  sdi?: string | null | undefined;
261
261
  pec?: string | null | undefined;
262
262
  }>;
263
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
264
- }, "businessName" | "vat" | "taxCode" | "operationalAddress" | "billingAddress" | "billingData">, "strip", z.ZodTypeAny, {
263
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
264
+ }, "businessName" | "vat" | "taxCode" | "operationalAddress" | "billingAddress" | "billingData" | "adminBy">, "strip", z.ZodTypeAny, {
265
265
  businessName: string;
266
266
  vat: string;
267
267
  taxCode: string | null;
@@ -285,6 +285,7 @@ declare const writableCompanySchema: z.ZodObject<Pick<{
285
285
  sdi?: string | null | undefined;
286
286
  pec?: string | null | undefined;
287
287
  };
288
+ adminBy: _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
288
289
  }, {
289
290
  businessName: string;
290
291
  vat: string;
@@ -309,6 +310,7 @@ declare const writableCompanySchema: z.ZodObject<Pick<{
309
310
  sdi?: string | null | undefined;
310
311
  pec?: string | null | undefined;
311
312
  };
313
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
312
314
  }>;
313
315
  declare const companiesQuerySchema: z.ZodObject<{
314
316
  businessName: z.ZodOptional<z.ZodString>;
@@ -413,6 +415,7 @@ declare const createCompanyInputSchema: z.ZodObject<{
413
415
  sdi?: string | null | undefined;
414
416
  pec?: string | null | undefined;
415
417
  }>;
418
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
416
419
  }, "strip", z.ZodTypeAny, {
417
420
  businessName: string;
418
421
  vat: string;
@@ -437,6 +440,7 @@ declare const createCompanyInputSchema: z.ZodObject<{
437
440
  sdi?: string | null | undefined;
438
441
  pec?: string | null | undefined;
439
442
  };
443
+ adminBy: _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
440
444
  }, {
441
445
  businessName: string;
442
446
  vat: string;
@@ -461,6 +465,7 @@ declare const createCompanyInputSchema: z.ZodObject<{
461
465
  sdi?: string | null | undefined;
462
466
  pec?: string | null | undefined;
463
467
  };
468
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
464
469
  }>;
465
470
  type CreateCompanyInput = z.input<typeof createCompanyInputSchema>;
466
471
  declare const createCompanyResponseSchema: z.ZodObject<{
@@ -531,7 +536,7 @@ declare const createCompanyResponseSchema: z.ZodObject<{
531
536
  sdi?: string | null | undefined;
532
537
  pec?: string | null | undefined;
533
538
  }>;
534
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
539
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
535
540
  }, "strip", z.ZodTypeAny, {
536
541
  id: string;
537
542
  businessName: string;
@@ -587,7 +592,7 @@ declare const createCompanyResponseSchema: z.ZodObject<{
587
592
  sdi?: string | null | undefined;
588
593
  pec?: string | null | undefined;
589
594
  };
590
- adminBy: string;
595
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
591
596
  }>;
592
597
  type CreateCompanyResponse = z.infer<typeof createCompanyResponseSchema>;
593
598
  declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInputSchema, typeof createCompanyResponseSchema> {
@@ -658,6 +663,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
658
663
  sdi?: string | null | undefined;
659
664
  pec?: string | null | undefined;
660
665
  }>;
666
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
661
667
  }, "strip", z.ZodTypeAny, {
662
668
  businessName: string;
663
669
  vat: string;
@@ -682,6 +688,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
682
688
  sdi?: string | null | undefined;
683
689
  pec?: string | null | undefined;
684
690
  };
691
+ adminBy: _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
685
692
  }, {
686
693
  businessName: string;
687
694
  vat: string;
@@ -706,6 +713,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
706
713
  sdi?: string | null | undefined;
707
714
  pec?: string | null | undefined;
708
715
  };
716
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
709
717
  }>;
710
718
  readonly outputSchema: z.ZodObject<{
711
719
  id: z.ZodString;
@@ -775,7 +783,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
775
783
  sdi?: string | null | undefined;
776
784
  pec?: string | null | undefined;
777
785
  }>;
778
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
786
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
779
787
  }, "strip", z.ZodTypeAny, {
780
788
  id: string;
781
789
  businessName: string;
@@ -831,7 +839,7 @@ declare class CreateCompany extends AbstractApiRequest<typeof createCompanyInput
831
839
  sdi?: string | null | undefined;
832
840
  pec?: string | null | undefined;
833
841
  };
834
- adminBy: string;
842
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
835
843
  }>;
836
844
  readonly querySchema: undefined;
837
845
  readonly headersSchema: undefined;
@@ -1283,7 +1291,7 @@ declare const getCompanyDetailsResponseSchema: z.ZodObject<{
1283
1291
  sdi?: string | null | undefined;
1284
1292
  pec?: string | null | undefined;
1285
1293
  }>;
1286
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
1294
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
1287
1295
  }, "strip", z.ZodTypeAny, {
1288
1296
  id: string;
1289
1297
  businessName: string;
@@ -1339,7 +1347,7 @@ declare const getCompanyDetailsResponseSchema: z.ZodObject<{
1339
1347
  sdi?: string | null | undefined;
1340
1348
  pec?: string | null | undefined;
1341
1349
  };
1342
- adminBy: string;
1350
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
1343
1351
  }>;
1344
1352
  type GetCompanyDetailsResponse = CompanyDetails;
1345
1353
  declare class GetCompanyDetails extends AbstractApiRequest<typeof getCompanyDetailsInputSchema, typeof getCompanyDetailsResponseSchema> {
@@ -1415,7 +1423,7 @@ declare class GetCompanyDetails extends AbstractApiRequest<typeof getCompanyDeta
1415
1423
  sdi?: string | null | undefined;
1416
1424
  pec?: string | null | undefined;
1417
1425
  }>;
1418
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
1426
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
1419
1427
  }, "strip", z.ZodTypeAny, {
1420
1428
  id: string;
1421
1429
  businessName: string;
@@ -1471,7 +1479,7 @@ declare class GetCompanyDetails extends AbstractApiRequest<typeof getCompanyDeta
1471
1479
  sdi?: string | null | undefined;
1472
1480
  pec?: string | null | undefined;
1473
1481
  };
1474
- adminBy: string;
1482
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
1475
1483
  }>;
1476
1484
  readonly querySchema: undefined;
1477
1485
  readonly headersSchema: undefined;
@@ -1544,6 +1552,7 @@ declare const updateCompanyInputSchema: z.ZodObject<{
1544
1552
  sdi?: string | null | undefined;
1545
1553
  pec?: string | null | undefined;
1546
1554
  }>>;
1555
+ adminBy: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>>;
1547
1556
  }, "strip", z.ZodTypeAny, {
1548
1557
  businessName?: string | undefined;
1549
1558
  vat?: string | undefined;
@@ -1568,6 +1577,7 @@ declare const updateCompanyInputSchema: z.ZodObject<{
1568
1577
  sdi?: string | null | undefined;
1569
1578
  pec?: string | null | undefined;
1570
1579
  } | undefined;
1580
+ adminBy?: _deliverart_sdk_js_global_types.IriObject<"/users/:id"> | undefined;
1571
1581
  }, {
1572
1582
  businessName?: string | undefined;
1573
1583
  vat?: string | undefined;
@@ -1592,6 +1602,7 @@ declare const updateCompanyInputSchema: z.ZodObject<{
1592
1602
  sdi?: string | null | undefined;
1593
1603
  pec?: string | null | undefined;
1594
1604
  } | undefined;
1605
+ adminBy?: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id"> | undefined;
1595
1606
  }>;
1596
1607
  type UpdateCompanyInput = z.input<typeof updateCompanyInputSchema>;
1597
1608
  declare const updateCompanyResponseSchema: z.ZodObject<{
@@ -1662,7 +1673,7 @@ declare const updateCompanyResponseSchema: z.ZodObject<{
1662
1673
  sdi?: string | null | undefined;
1663
1674
  pec?: string | null | undefined;
1664
1675
  }>;
1665
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
1676
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
1666
1677
  }, "strip", z.ZodTypeAny, {
1667
1678
  id: string;
1668
1679
  businessName: string;
@@ -1718,7 +1729,7 @@ declare const updateCompanyResponseSchema: z.ZodObject<{
1718
1729
  sdi?: string | null | undefined;
1719
1730
  pec?: string | null | undefined;
1720
1731
  };
1721
- adminBy: string;
1732
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
1722
1733
  }>;
1723
1734
  type UpdateCompanyResponse = z.infer<typeof updateCompanyResponseSchema>;
1724
1735
  declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInputSchema, typeof updateCompanyResponseSchema> {
@@ -1789,6 +1800,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1789
1800
  sdi?: string | null | undefined;
1790
1801
  pec?: string | null | undefined;
1791
1802
  }>>;
1803
+ adminBy: z.ZodOptional<z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>>;
1792
1804
  }, "strip", z.ZodTypeAny, {
1793
1805
  businessName?: string | undefined;
1794
1806
  vat?: string | undefined;
@@ -1813,6 +1825,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1813
1825
  sdi?: string | null | undefined;
1814
1826
  pec?: string | null | undefined;
1815
1827
  } | undefined;
1828
+ adminBy?: _deliverart_sdk_js_global_types.IriObject<"/users/:id"> | undefined;
1816
1829
  }, {
1817
1830
  businessName?: string | undefined;
1818
1831
  vat?: string | undefined;
@@ -1837,6 +1850,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1837
1850
  sdi?: string | null | undefined;
1838
1851
  pec?: string | null | undefined;
1839
1852
  } | undefined;
1853
+ adminBy?: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id"> | undefined;
1840
1854
  }>;
1841
1855
  readonly outputSchema: z.ZodObject<{
1842
1856
  id: z.ZodString;
@@ -1906,7 +1920,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1906
1920
  sdi?: string | null | undefined;
1907
1921
  pec?: string | null | undefined;
1908
1922
  }>;
1909
- adminBy: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/users/:id">, string>;
1923
+ adminBy: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/users/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">>;
1910
1924
  }, "strip", z.ZodTypeAny, {
1911
1925
  id: string;
1912
1926
  businessName: string;
@@ -1962,7 +1976,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1962
1976
  sdi?: string | null | undefined;
1963
1977
  pec?: string | null | undefined;
1964
1978
  };
1965
- adminBy: string;
1979
+ adminBy: string | _deliverart_sdk_js_global_types.IriObject<"/users/:id">;
1966
1980
  }>;
1967
1981
  readonly querySchema: undefined;
1968
1982
  readonly headersSchema: undefined;
@@ -1971,7 +1985,7 @@ declare class UpdateCompany extends AbstractApiRequest<typeof updateCompanyInput
1971
1985
  getPath(): string;
1972
1986
  }
1973
1987
 
1974
- declare const companyIriSchema: z.ZodEffects<z.ZodString, _deliverart_sdk_js_global_types.IriObject<"/companies/:id">, string>;
1988
+ declare const companyIriSchema: z.ZodType<_deliverart_sdk_js_global_types.IriObject<"/companies/:id">, any, string | _deliverart_sdk_js_global_types.IriObject<"/companies/:id">>;
1975
1989
  type CompanyIri = z.infer<typeof companyIriSchema>;
1976
1990
 
1977
1991
  export { type CompaniesQueryParams, type Company, type CompanyDetails, type CompanyIri, CreateCompany, type CreateCompanyInput, type CreateCompanyResponse, DeleteCompany, GetCompanies, type GetCompaniesInput, type GetCompaniesQueryParams, type GetCompaniesResponse, GetCompanyDetails, type GetCompanyDetailsInput, type GetCompanyDetailsResponse, UpdateCompany, type UpdateCompanyInput, type UpdateCompanyResponse, companiesQuerySchema, companyDetailsSchema, companyIriSchema, companySchema, createCompanyInputSchema, createCompanyResponseSchema, deleteCompanyInputSchema, deleteCompanyResponseSchema, getCompaniesInputSchema, getCompaniesQuerySchema, getCompaniesResponseSchema, getCompanyDetailsInputSchema, getCompanyDetailsResponseSchema, updateCompanyInputSchema, updateCompanyResponseSchema, writableCompanySchema };
package/dist/index.js CHANGED
@@ -27,7 +27,9 @@ var writableCompanySchema = companyDetailsSchema.pick({
27
27
  taxCode: true,
28
28
  billingAddress: true,
29
29
  operationalAddress: true,
30
- billingData: true
30
+ billingData: true,
31
+ adminBy: true
32
+ // Only Admin can set this
31
33
  });
32
34
  var companiesQuerySchema = z.object({
33
35
  businessName: z.string().optional(),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deliverart/sdk-js-company",
3
3
  "description": "Deliverart JavaScript SDK for User Management",
4
- "version": "0.1.1",
4
+ "version": "0.1.3",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -13,8 +13,8 @@
13
13
  },
14
14
  "dependencies": {
15
15
  "@deliverart/sdk-js-core": "0.2.0",
16
- "@deliverart/sdk-js-global-types": "0.0.17",
17
- "@deliverart/sdk-js-user": "0.3.0",
16
+ "@deliverart/sdk-js-global-types": "0.0.18",
17
+ "@deliverart/sdk-js-user": "0.3.1",
18
18
  "axios": "1.9.0",
19
19
  "zod": "3.25.67"
20
20
  },
package/src/models.ts CHANGED
@@ -32,6 +32,7 @@ export const writableCompanySchema = companyDetailsSchema.pick({
32
32
  billingAddress: true,
33
33
  operationalAddress: true,
34
34
  billingData: true,
35
+ adminBy: true, // Only Admin can set this
35
36
  })
36
37
 
37
38
  export const companiesQuerySchema = z.object({