@timbro/invoices 0.10.1-next.0 → 0.10.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.
@@ -2985,6 +2985,36 @@ export const zBuyerDeliveryReadinessResource = z.union([
2985
2985
  terminal_result_code: zBuyerDeliveryTerminalResultCode,
2986
2986
  }),
2987
2987
  ]);
2988
+ /**
2989
+ * The identified party a fiscal document names opposite its issuer: the buyer of a sale, the
2990
+ * supplier of a Type 41 purchase, or the payee of a Type 47 payment abroad.
2991
+ *
2992
+ * An anonymous consumer and a Type 43 minor expense name no counterparty.
2993
+ */
2994
+ export const zFiscalCounterparty = z.union([
2995
+ z.strictObject({
2996
+ identity_kind: z.enum(["domestic"]),
2997
+ legal_name: z
2998
+ .string()
2999
+ .refine((text) => Array.from(text).length >= 1)
3000
+ .refine((text) => Array.from(text).length <= 150)
3001
+ .regex(/\S/),
3002
+ tax_id: z.string().regex(/^[0-9]{9}([0-9]{2})?$/),
3003
+ }),
3004
+ z.strictObject({
3005
+ foreign_identifier: z
3006
+ .string()
3007
+ .refine((text) => Array.from(text).length >= 1)
3008
+ .refine((text) => Array.from(text).length <= 20)
3009
+ .regex(/\S/),
3010
+ identity_kind: z.enum(["foreign"]),
3011
+ legal_name: z
3012
+ .string()
3013
+ .refine((text) => Array.from(text).length >= 1)
3014
+ .refine((text) => Array.from(text).length <= 150)
3015
+ .regex(/\S/),
3016
+ }),
3017
+ ]);
2988
3018
  /**
2989
3019
  * Counterparty class that selects the legal e-CF type set.
2990
3020
  */
@@ -3383,6 +3413,7 @@ export const zFiscalLineWithLegalTip = z.strictObject({
3383
3413
  .refine((text) => Array.from(text).length >= 1)
3384
3414
  .refine((text) => Array.from(text).length <= 128)
3385
3415
  .regex(/^(?=.*[^\p{White_Space}])[\s\S]+$/u),
3416
+ tax_exclusive_unit_price: z.enum(["1"]).optional(),
3386
3417
  unit_price: z.string().regex(/^[0-9]{1,16}(\.[0-9]{1,4})?$/),
3387
3418
  });
3388
3419
  /**
@@ -3813,9 +3844,6 @@ export const zInvoiceExpectedTotals = z.strictObject({
3813
3844
  tax: z.string().regex(/^[0-9]{1,16}\.[0-9]{2}$/),
3814
3845
  total: z.string().regex(/^[0-9]{1,16}\.[0-9]{2}$/),
3815
3846
  });
3816
- /**
3817
- * ForeignBuyer
3818
- */
3819
3847
  export const zInvoiceExportBuyer = z.strictObject({
3820
3848
  foreignId: z
3821
3849
  .string()
@@ -5854,6 +5882,7 @@ export const zPrintedRepresentationPagePlan = z.strictObject({
5854
5882
  .int()
5855
5883
  .gte(0)
5856
5884
  .max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }),
5885
+ line_itbis: z.array(z.string()),
5857
5886
  non_billable_subtotal: z.string(),
5858
5887
  page_number: z
5859
5888
  .int()
@@ -6178,6 +6207,12 @@ export const zReceivedDocumentResource = z.strictObject({
6178
6207
  eNcf: z.string(),
6179
6208
  environment: zFiscalEnvironment,
6180
6209
  id: z.uuid(),
6210
+ issuerLegalName: z
6211
+ .string()
6212
+ .refine((text) => Array.from(text).length >= 1)
6213
+ .refine((text) => Array.from(text).length <= 150)
6214
+ .regex(/\S/)
6215
+ .nullable(),
6181
6216
  issuerTaxId: z.string(),
6182
6217
  notReceivedReason: zReceivedDocumentNotReceivedReasonResource.nullable(),
6183
6218
  receivedAt: z.iso.datetime(),
@@ -6190,6 +6225,12 @@ export const zReceivedDocumentSummary = z.strictObject({
6190
6225
  eNcf: z.string(),
6191
6226
  environment: zFiscalEnvironment,
6192
6227
  id: z.uuid(),
6228
+ issuerLegalName: z
6229
+ .string()
6230
+ .refine((text) => Array.from(text).length >= 1)
6231
+ .refine((text) => Array.from(text).length <= 150)
6232
+ .regex(/\S/)
6233
+ .nullable(),
6193
6234
  issuerTaxId: z.string(),
6194
6235
  receivedAt: z.iso.datetime(),
6195
6236
  state: zReceivedDocumentStateResource,
@@ -29130,11 +29171,13 @@ export const zWorkspaceEvidenceAccessActor = z.union([
29130
29171
  ]);
29131
29172
  export const zWorkspaceFiscalOperationSummary = z.strictObject({
29132
29173
  action: zSourceFiscalAction,
29174
+ counterparty: zFiscalCounterparty.nullable(),
29133
29175
  created_at: z.iso.datetime(),
29134
29176
  environment: zFiscalEnvironment,
29135
29177
  operation_id: z.uuid(),
29136
29178
  outcome: zFiscalOperationOutcomeResource,
29137
29179
  source: zFiscalOperationSource,
29180
+ totals: zFiscalOperationAmountsResource.nullable(),
29138
29181
  updated_at: z.iso.datetime(),
29139
29182
  });
29140
29183
  export const zWorkspaceFiscalOperationPage = z.strictObject({
@@ -29287,6 +29330,7 @@ export const zWorkspaceFiscalTimelinePage = z.strictObject({
29287
29330
  });
29288
29331
  export const zWorkspaceFiscalOperationResource = z.strictObject({
29289
29332
  commercial_response: zCommercialResponseProjection.nullable(),
29333
+ counterparty: zFiscalCounterparty.nullable(),
29290
29334
  operation: zFiscalOperationResource,
29291
29335
  timeline: zWorkspaceFiscalTimelinePage,
29292
29336
  });
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timbro/invoices",
3
- "version": "0.10.1-next.0",
3
+ "version": "0.10.2",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "private": false,
6
6
  "type": "module",