@greensecurity/javascript-sdk 0.44.0-beta.59 → 0.44.0-beta.60

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 (58) hide show
  1. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  2. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  3. package/dist/commonjs/__tests__/webhooks.test.js +1 -1
  4. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  5. package/dist/commonjs/__tests__/zones.test.js +24 -2
  6. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  7. package/dist/commonjs/funcs/invoicesListInvoices.d.ts +1 -0
  8. package/dist/commonjs/funcs/invoicesListInvoices.d.ts.map +1 -1
  9. package/dist/commonjs/funcs/invoicesListInvoices.js +1 -0
  10. package/dist/commonjs/funcs/invoicesListInvoices.js.map +1 -1
  11. package/dist/commonjs/lib/config.d.ts +3 -3
  12. package/dist/commonjs/lib/config.js +3 -3
  13. package/dist/commonjs/models/components/invoice.d.ts +8 -0
  14. package/dist/commonjs/models/components/invoice.d.ts.map +1 -1
  15. package/dist/commonjs/models/components/invoice.js +4 -0
  16. package/dist/commonjs/models/components/invoice.js.map +1 -1
  17. package/dist/commonjs/react-query/invoicesListInvoices.d.ts +4 -0
  18. package/dist/commonjs/react-query/invoicesListInvoices.d.ts.map +1 -1
  19. package/dist/commonjs/react-query/invoicesListInvoices.js +4 -0
  20. package/dist/commonjs/react-query/invoicesListInvoices.js.map +1 -1
  21. package/dist/commonjs/sdk/invoices.d.ts +1 -0
  22. package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
  23. package/dist/commonjs/sdk/invoices.js +1 -0
  24. package/dist/commonjs/sdk/invoices.js.map +1 -1
  25. package/dist/esm/__tests__/vendors.test.js +1 -1
  26. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  27. package/dist/esm/__tests__/webhooks.test.js +1 -1
  28. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  29. package/dist/esm/__tests__/zones.test.js +24 -2
  30. package/dist/esm/__tests__/zones.test.js.map +1 -1
  31. package/dist/esm/funcs/invoicesListInvoices.d.ts +1 -0
  32. package/dist/esm/funcs/invoicesListInvoices.d.ts.map +1 -1
  33. package/dist/esm/funcs/invoicesListInvoices.js +1 -0
  34. package/dist/esm/funcs/invoicesListInvoices.js.map +1 -1
  35. package/dist/esm/lib/config.d.ts +3 -3
  36. package/dist/esm/lib/config.js +3 -3
  37. package/dist/esm/models/components/invoice.d.ts +8 -0
  38. package/dist/esm/models/components/invoice.d.ts.map +1 -1
  39. package/dist/esm/models/components/invoice.js +4 -0
  40. package/dist/esm/models/components/invoice.js.map +1 -1
  41. package/dist/esm/react-query/invoicesListInvoices.d.ts +4 -0
  42. package/dist/esm/react-query/invoicesListInvoices.d.ts.map +1 -1
  43. package/dist/esm/react-query/invoicesListInvoices.js +4 -0
  44. package/dist/esm/react-query/invoicesListInvoices.js.map +1 -1
  45. package/dist/esm/sdk/invoices.d.ts +1 -0
  46. package/dist/esm/sdk/invoices.d.ts.map +1 -1
  47. package/dist/esm/sdk/invoices.js +1 -0
  48. package/dist/esm/sdk/invoices.js.map +1 -1
  49. package/jsr.json +1 -1
  50. package/package.json +1 -1
  51. package/src/__tests__/vendors.test.ts +1 -1
  52. package/src/__tests__/webhooks.test.ts +1 -1
  53. package/src/__tests__/zones.test.ts +24 -2
  54. package/src/funcs/invoicesListInvoices.ts +1 -0
  55. package/src/lib/config.ts +3 -3
  56. package/src/models/components/invoice.ts +12 -0
  57. package/src/react-query/invoicesListInvoices.ts +4 -0
  58. package/src/sdk/invoices.ts +1 -0
@@ -20,7 +20,7 @@ test("Webhooks List All Webhook Endpoints", async () => {
20
20
  const testWebhookListForVendorUserResult = await greenSecurity.webhooks
21
21
  .listAllWebhookEndpoints({
22
22
  itemsPerPage: 25,
23
- desc: 0,
23
+ desc: true,
24
24
  sort: "",
25
25
  });
26
26
  expect(testWebhookListForVendorUserResult).toBeDefined();
@@ -39,7 +39,29 @@ test("Zones List Or Search Security Zones", async () => {
39
39
  facility: {},
40
40
  },
41
41
  {
42
- facility: {},
42
+ facility: {
43
+ contacts: {
44
+ contact: {
45
+ status: "Inactive",
46
+ department: 123,
47
+ },
48
+ adminContact: null,
49
+ techContact: {
50
+ status: "Active",
51
+ department: 123,
52
+ },
53
+ greenSecurityCsm: null,
54
+ accountManager: {
55
+ status: "Deleted",
56
+ department: 123,
57
+ },
58
+ },
59
+ vendorGuestPolicy: {
60
+ enabled: true,
61
+ vendorGuestLimitAndOr: "and",
62
+ vendorGuestRequireEmail: false,
63
+ },
64
+ },
43
65
  },
44
66
  ],
45
67
  });
@@ -58,7 +80,7 @@ test("Zones Security Zone Checkin", async () => {
58
80
 
59
81
  const result = await greenSecurity.zones.securityZoneCheckin({
60
82
  qrCode: "<value>",
61
- zoneId: 544883,
83
+ zoneId: 145454,
62
84
  });
63
85
  expect(result).toBeDefined();
64
86
  expect(result).toEqual({});
@@ -57,6 +57,7 @@ import {
57
57
  * - id (default)
58
58
  * - invoice_number
59
59
  * - date (processed date)
60
+ * - date_paid
60
61
  * - financial_status
61
62
  * - amount
62
63
  *
package/src/lib/config.ts CHANGED
@@ -80,8 +80,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "0.43.5",
83
- sdkVersion: "0.44.0-beta.59",
84
- genVersion: "2.926.2",
83
+ sdkVersion: "0.44.0-beta.60",
84
+ genVersion: "2.926.8",
85
85
  userAgent:
86
- "speakeasy-sdk/typescript 0.44.0-beta.59 2.926.2 0.43.5 @greensecurity/javascript-sdk",
86
+ "speakeasy-sdk/typescript 0.44.0-beta.60 2.926.8 0.43.5 @greensecurity/javascript-sdk",
87
87
  } as const;
@@ -91,7 +91,14 @@ export type Invoice = {
91
91
  id: number;
92
92
  invoiceNumber?: string | null | undefined;
93
93
  trackingNumber?: string | null | undefined;
94
+ /**
95
+ * Date the invoice was marked fully processed. Only set for simulated/test-vendor charges or when an admin manually marks the invoice as processed — the normal payment flow never populates it, so this is usually `null`. Use `date_paid` to determine when an invoice was actually paid.
96
+ */
94
97
  dateProcessed?: string | null | undefined;
98
+ /**
99
+ * Date the invoice was paid. Backfilled automatically by a daily background job for every paid invoice, from the last successful payment transaction or, failing that, the invoice's line item start date or creation date. Unlike `date_processed`, this is reliably populated for real (non-test) payments — allow up to 24 hours for it to appear after payment.
100
+ */
101
+ datePaid?: string | null | undefined;
95
102
  dateDue?: string | null | undefined;
96
103
  amount?: number | null | undefined;
97
104
  status?: string | null | undefined;
@@ -243,6 +250,7 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
243
250
  invoice_number: z.nullable(types.string()).optional(),
244
251
  tracking_number: z.nullable(types.string()).optional(),
245
252
  date_processed: z.nullable(types.string()).optional(),
253
+ date_paid: z.nullable(types.string()).optional(),
246
254
  date_due: z.nullable(types.string()).optional(),
247
255
  amount: z.nullable(types.number()).optional(),
248
256
  status: z.nullable(types.string()).optional(),
@@ -266,6 +274,7 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
266
274
  "invoice_number": "invoiceNumber",
267
275
  "tracking_number": "trackingNumber",
268
276
  "date_processed": "dateProcessed",
277
+ "date_paid": "datePaid",
269
278
  "date_due": "dateDue",
270
279
  "financial_status": "financialStatus",
271
280
  "amount_not_paid": "amountNotPaid",
@@ -281,6 +290,7 @@ export type Invoice$Outbound = {
281
290
  invoice_number?: string | null | undefined;
282
291
  tracking_number?: string | null | undefined;
283
292
  date_processed?: string | null | undefined;
293
+ date_paid?: string | null | undefined;
284
294
  date_due?: string | null | undefined;
285
295
  amount?: number | null | undefined;
286
296
  status?: string | null | undefined;
@@ -307,6 +317,7 @@ export const Invoice$outboundSchema: z.ZodType<
307
317
  invoiceNumber: z.nullable(z.string()).optional(),
308
318
  trackingNumber: z.nullable(z.string()).optional(),
309
319
  dateProcessed: z.nullable(z.string()).optional(),
320
+ datePaid: z.nullable(z.string()).optional(),
310
321
  dateDue: z.nullable(z.string()).optional(),
311
322
  amount: z.nullable(z.number().int()).optional(),
312
323
  status: z.nullable(z.string()).optional(),
@@ -329,6 +340,7 @@ export const Invoice$outboundSchema: z.ZodType<
329
340
  invoiceNumber: "invoice_number",
330
341
  trackingNumber: "tracking_number",
331
342
  dateProcessed: "date_processed",
343
+ datePaid: "date_paid",
332
344
  dateDue: "date_due",
333
345
  financialStatus: "financial_status",
334
346
  amountNotPaid: "amount_not_paid",
@@ -96,6 +96,7 @@ export type InvoicesListInvoicesQueryError =
96
96
  * - id (default)
97
97
  * - invoice_number
98
98
  * - date (processed date)
99
+ * - date_paid
99
100
  * - financial_status
100
101
  * - amount
101
102
  */
@@ -145,6 +146,7 @@ export function useInvoicesListInvoices(
145
146
  * - id (default)
146
147
  * - invoice_number
147
148
  * - date (processed date)
149
+ * - date_paid
148
150
  * - financial_status
149
151
  * - amount
150
152
  */
@@ -194,6 +196,7 @@ export function useInvoicesListInvoicesSuspense(
194
196
  * - id (default)
195
197
  * - invoice_number
196
198
  * - date (processed date)
199
+ * - date_paid
197
200
  * - financial_status
198
201
  * - amount
199
202
  */
@@ -257,6 +260,7 @@ export function useInvoicesListInvoicesInfinite(
257
260
  * - id (default)
258
261
  * - invoice_number
259
262
  * - date (processed date)
263
+ * - date_paid
260
264
  * - financial_status
261
265
  * - amount
262
266
  */
@@ -68,6 +68,7 @@ export class Invoices extends ClientSDK {
68
68
  * - id (default)
69
69
  * - invoice_number
70
70
  * - date (processed date)
71
+ * - date_paid
71
72
  * - financial_status
72
73
  * - amount
73
74
  */