@timbro/invoices 0.10.1 → 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
  */
@@ -6177,6 +6207,12 @@ export const zReceivedDocumentResource = z.strictObject({
6177
6207
  eNcf: z.string(),
6178
6208
  environment: zFiscalEnvironment,
6179
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(),
6180
6216
  issuerTaxId: z.string(),
6181
6217
  notReceivedReason: zReceivedDocumentNotReceivedReasonResource.nullable(),
6182
6218
  receivedAt: z.iso.datetime(),
@@ -6189,6 +6225,12 @@ export const zReceivedDocumentSummary = z.strictObject({
6189
6225
  eNcf: z.string(),
6190
6226
  environment: zFiscalEnvironment,
6191
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(),
6192
6234
  issuerTaxId: z.string(),
6193
6235
  receivedAt: z.iso.datetime(),
6194
6236
  state: zReceivedDocumentStateResource,
@@ -29129,11 +29171,13 @@ export const zWorkspaceEvidenceAccessActor = z.union([
29129
29171
  ]);
29130
29172
  export const zWorkspaceFiscalOperationSummary = z.strictObject({
29131
29173
  action: zSourceFiscalAction,
29174
+ counterparty: zFiscalCounterparty.nullable(),
29132
29175
  created_at: z.iso.datetime(),
29133
29176
  environment: zFiscalEnvironment,
29134
29177
  operation_id: z.uuid(),
29135
29178
  outcome: zFiscalOperationOutcomeResource,
29136
29179
  source: zFiscalOperationSource,
29180
+ totals: zFiscalOperationAmountsResource.nullable(),
29137
29181
  updated_at: z.iso.datetime(),
29138
29182
  });
29139
29183
  export const zWorkspaceFiscalOperationPage = z.strictObject({
@@ -29286,6 +29330,7 @@ export const zWorkspaceFiscalTimelinePage = z.strictObject({
29286
29330
  });
29287
29331
  export const zWorkspaceFiscalOperationResource = z.strictObject({
29288
29332
  commercial_response: zCommercialResponseProjection.nullable(),
29333
+ counterparty: zFiscalCounterparty.nullable(),
29289
29334
  operation: zFiscalOperationResource,
29290
29335
  timeline: zWorkspaceFiscalTimelinePage,
29291
29336
  });
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.2",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "private": false,
6
6
  "type": "module",