@greensecurity/javascript-sdk 0.44.0-beta.67 → 0.44.0-beta.69

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.
Files changed (65) hide show
  1. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  2. package/dist/commonjs/__tests__/webhooks.test.js +6 -5
  3. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  4. package/dist/commonjs/__tests__/zones.test.js +14 -13
  5. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  6. package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.d.ts +1 -0
  7. package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.js +1 -0
  9. package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.js.map +1 -1
  10. package/dist/commonjs/lib/config.d.ts +2 -2
  11. package/dist/commonjs/lib/config.js +2 -2
  12. package/dist/commonjs/models/components/expand.d.ts +1 -0
  13. package/dist/commonjs/models/components/expand.d.ts.map +1 -1
  14. package/dist/commonjs/models/components/expand.js +1 -0
  15. package/dist/commonjs/models/components/expand.js.map +1 -1
  16. package/dist/commonjs/models/components/invoicetransaction.d.ts +10 -0
  17. package/dist/commonjs/models/components/invoicetransaction.d.ts.map +1 -1
  18. package/dist/commonjs/models/components/invoicetransaction.js +6 -0
  19. package/dist/commonjs/models/components/invoicetransaction.js.map +1 -1
  20. package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.d.ts +2 -0
  21. package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
  22. package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.js +2 -0
  23. package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -1
  24. package/dist/commonjs/sdk/vendors.d.ts +1 -0
  25. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  26. package/dist/commonjs/sdk/vendors.js +1 -0
  27. package/dist/commonjs/sdk/vendors.js.map +1 -1
  28. package/dist/esm/__tests__/vendors.test.js +1 -1
  29. package/dist/esm/__tests__/webhooks.test.js +6 -5
  30. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  31. package/dist/esm/__tests__/zones.test.js +14 -13
  32. package/dist/esm/__tests__/zones.test.js.map +1 -1
  33. package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.d.ts +1 -0
  34. package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
  35. package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.js +1 -0
  36. package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.js.map +1 -1
  37. package/dist/esm/lib/config.d.ts +2 -2
  38. package/dist/esm/lib/config.js +2 -2
  39. package/dist/esm/models/components/expand.d.ts +1 -0
  40. package/dist/esm/models/components/expand.d.ts.map +1 -1
  41. package/dist/esm/models/components/expand.js +1 -0
  42. package/dist/esm/models/components/expand.js.map +1 -1
  43. package/dist/esm/models/components/invoicetransaction.d.ts +10 -0
  44. package/dist/esm/models/components/invoicetransaction.d.ts.map +1 -1
  45. package/dist/esm/models/components/invoicetransaction.js +6 -0
  46. package/dist/esm/models/components/invoicetransaction.js.map +1 -1
  47. package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.d.ts +2 -0
  48. package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
  49. package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.js +2 -0
  50. package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -1
  51. package/dist/esm/sdk/vendors.d.ts +1 -0
  52. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  53. package/dist/esm/sdk/vendors.js +1 -0
  54. package/dist/esm/sdk/vendors.js.map +1 -1
  55. package/jsr.json +1 -1
  56. package/package.json +1 -1
  57. package/src/__tests__/vendors.test.ts +1 -1
  58. package/src/__tests__/webhooks.test.ts +6 -5
  59. package/src/__tests__/zones.test.ts +14 -13
  60. package/src/funcs/vendorsGetVendorInvoiceDetails.ts +1 -0
  61. package/src/lib/config.ts +2 -2
  62. package/src/models/components/expand.ts +1 -0
  63. package/src/models/components/invoicetransaction.ts +16 -0
  64. package/src/react-query/vendorsGetVendorInvoiceDetails.ts +2 -0
  65. package/src/sdk/vendors.ts +1 -0
@@ -28,6 +28,14 @@ export type InvoiceTransaction = {
28
28
  creditId?: number | null | undefined;
29
29
  transactionId?: string | null | undefined;
30
30
  success?: boolean | null | undefined;
31
+ /**
32
+ * Email of who the transaction is attributed to — the credit's performer for credit-paid transactions, or the payment profile's owner for card payments. Only populated when `invoice_transactions.payee` is included in `expand`; `null` otherwise.
33
+ */
34
+ payee?: string | null | undefined;
35
+ /**
36
+ * Last four digits of the card used to pay, when applicable. `null` for credit-paid transactions.
37
+ */
38
+ cardLast4?: string | null | undefined;
31
39
  };
32
40
 
33
41
  /** @internal */
@@ -81,12 +89,15 @@ export const InvoiceTransaction$inboundSchema: z.ZodType<
81
89
  credit_id: z.nullable(types.number()).optional(),
82
90
  transaction_id: z.nullable(types.string()).optional(),
83
91
  success: z.nullable(types.boolean()).optional(),
92
+ payee: z.nullable(types.string()).optional(),
93
+ card_last4: z.nullable(types.string()).optional(),
84
94
  }).transform((v) => {
85
95
  return remap$(v, {
86
96
  "date_processed": "dateProcessed",
87
97
  "payment_profile": "paymentProfile",
88
98
  "credit_id": "creditId",
89
99
  "transaction_id": "transactionId",
100
+ "card_last4": "cardLast4",
90
101
  });
91
102
  });
92
103
  /** @internal */
@@ -97,6 +108,8 @@ export type InvoiceTransaction$Outbound = {
97
108
  credit_id?: number | null | undefined;
98
109
  transaction_id?: string | null | undefined;
99
110
  success?: boolean | null | undefined;
111
+ payee?: string | null | undefined;
112
+ card_last4?: string | null | undefined;
100
113
  };
101
114
 
102
115
  /** @internal */
@@ -113,12 +126,15 @@ export const InvoiceTransaction$outboundSchema: z.ZodType<
113
126
  creditId: z.nullable(z.number().int()).optional(),
114
127
  transactionId: z.nullable(z.string()).optional(),
115
128
  success: z.nullable(z.boolean()).optional(),
129
+ payee: z.nullable(z.string()).optional(),
130
+ cardLast4: z.nullable(z.string()).optional(),
116
131
  }).transform((v) => {
117
132
  return remap$(v, {
118
133
  dateProcessed: "date_processed",
119
134
  paymentProfile: "payment_profile",
120
135
  creditId: "credit_id",
121
136
  transactionId: "transaction_id",
137
+ cardLast4: "card_last4",
122
138
  });
123
139
  });
124
140
 
@@ -64,6 +64,7 @@ export type VendorsGetVendorInvoiceDetailsQueryError =
64
64
  * invoice.line_items
65
65
  * invoice.invoice_transactions
66
66
  * invoice.may_pay_invoice
67
+ * invoice_transactions.payee
67
68
  */
68
69
  export function useVendorsGetVendorInvoiceDetails(
69
70
  request: operations.GetVendorInvoiceDetailsRequest,
@@ -97,6 +98,7 @@ export function useVendorsGetVendorInvoiceDetails(
97
98
  * invoice.line_items
98
99
  * invoice.invoice_transactions
99
100
  * invoice.may_pay_invoice
101
+ * invoice_transactions.payee
100
102
  */
101
103
  export function useVendorsGetVendorInvoiceDetailsSuspense(
102
104
  request: operations.GetVendorInvoiceDetailsRequest,
@@ -718,6 +718,7 @@ export class Vendors extends ClientSDK {
718
718
  * invoice.line_items
719
719
  * invoice.invoice_transactions
720
720
  * invoice.may_pay_invoice
721
+ * invoice_transactions.payee
721
722
  */
722
723
  async getVendorInvoiceDetails(
723
724
  request: operations.GetVendorInvoiceDetailsRequest,