@timbro/invoices 0.10.1 → 0.10.3-next.0

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
  */
@@ -3814,6 +3844,9 @@ export const zInvoiceExpectedTotals = z.strictObject({
3814
3844
  tax: z.string().regex(/^[0-9]{1,16}\.[0-9]{2}$/),
3815
3845
  total: z.string().regex(/^[0-9]{1,16}\.[0-9]{2}$/),
3816
3846
  });
3847
+ /**
3848
+ * ForeignBuyer
3849
+ */
3817
3850
  export const zInvoiceExportBuyer = z.strictObject({
3818
3851
  foreignId: z
3819
3852
  .string()
@@ -6177,6 +6210,12 @@ export const zReceivedDocumentResource = z.strictObject({
6177
6210
  eNcf: z.string(),
6178
6211
  environment: zFiscalEnvironment,
6179
6212
  id: z.uuid(),
6213
+ issuerLegalName: z
6214
+ .string()
6215
+ .refine((text) => Array.from(text).length >= 1)
6216
+ .refine((text) => Array.from(text).length <= 150)
6217
+ .regex(/\S/)
6218
+ .nullable(),
6180
6219
  issuerTaxId: z.string(),
6181
6220
  notReceivedReason: zReceivedDocumentNotReceivedReasonResource.nullable(),
6182
6221
  receivedAt: z.iso.datetime(),
@@ -6189,6 +6228,12 @@ export const zReceivedDocumentSummary = z.strictObject({
6189
6228
  eNcf: z.string(),
6190
6229
  environment: zFiscalEnvironment,
6191
6230
  id: z.uuid(),
6231
+ issuerLegalName: z
6232
+ .string()
6233
+ .refine((text) => Array.from(text).length >= 1)
6234
+ .refine((text) => Array.from(text).length <= 150)
6235
+ .regex(/\S/)
6236
+ .nullable(),
6192
6237
  issuerTaxId: z.string(),
6193
6238
  receivedAt: z.iso.datetime(),
6194
6239
  state: zReceivedDocumentStateResource,
@@ -29129,11 +29174,13 @@ export const zWorkspaceEvidenceAccessActor = z.union([
29129
29174
  ]);
29130
29175
  export const zWorkspaceFiscalOperationSummary = z.strictObject({
29131
29176
  action: zSourceFiscalAction,
29177
+ counterparty: zFiscalCounterparty.nullable(),
29132
29178
  created_at: z.iso.datetime(),
29133
29179
  environment: zFiscalEnvironment,
29134
29180
  operation_id: z.uuid(),
29135
29181
  outcome: zFiscalOperationOutcomeResource,
29136
29182
  source: zFiscalOperationSource,
29183
+ totals: zFiscalOperationAmountsResource.nullable(),
29137
29184
  updated_at: z.iso.datetime(),
29138
29185
  });
29139
29186
  export const zWorkspaceFiscalOperationPage = z.strictObject({
@@ -29286,6 +29333,7 @@ export const zWorkspaceFiscalTimelinePage = z.strictObject({
29286
29333
  });
29287
29334
  export const zWorkspaceFiscalOperationResource = z.strictObject({
29288
29335
  commercial_response: zCommercialResponseProjection.nullable(),
29336
+ counterparty: zFiscalCounterparty.nullable(),
29289
29337
  operation: zFiscalOperationResource,
29290
29338
  timeline: zWorkspaceFiscalTimelinePage,
29291
29339
  });
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@timbro/invoices",
3
- "version": "0.10.1",
3
+ "version": "0.10.3-next.0",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "private": false,
6
6
  "type": "module",