@greensecurity/javascript-sdk 0.43.1-beta.72 → 0.43.1-beta.74

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 (201) hide show
  1. package/README.md +6 -0
  2. package/dist/commonjs/__tests__/paymentprofile.test.d.ts +2 -0
  3. package/dist/commonjs/__tests__/paymentprofile.test.d.ts.map +1 -0
  4. package/dist/commonjs/__tests__/paymentprofile.test.js +25 -0
  5. package/dist/commonjs/__tests__/paymentprofile.test.js.map +1 -0
  6. package/dist/commonjs/funcs/invoicesListInvoices.d.ts +2 -0
  7. package/dist/commonjs/funcs/invoicesListInvoices.d.ts.map +1 -1
  8. package/dist/commonjs/funcs/invoicesListInvoices.js +2 -0
  9. package/dist/commonjs/funcs/invoicesListInvoices.js.map +1 -1
  10. package/dist/commonjs/funcs/paymentProfileGetPaymentProfile.d.ts +21 -0
  11. package/dist/commonjs/funcs/paymentProfileGetPaymentProfile.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/paymentProfileGetPaymentProfile.js +110 -0
  13. package/dist/commonjs/funcs/paymentProfileGetPaymentProfile.js.map +1 -0
  14. package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.d.ts +1 -0
  15. package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
  16. package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.js +1 -0
  17. package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.js.map +1 -1
  18. package/dist/commonjs/funcs/vendorsListVendorInvoices.d.ts +1 -0
  19. package/dist/commonjs/funcs/vendorsListVendorInvoices.d.ts.map +1 -1
  20. package/dist/commonjs/funcs/vendorsListVendorInvoices.js +1 -0
  21. package/dist/commonjs/funcs/vendorsListVendorInvoices.js.map +1 -1
  22. package/dist/commonjs/lib/config.d.ts +2 -2
  23. package/dist/commonjs/lib/config.js +2 -2
  24. package/dist/commonjs/models/components/expand.d.ts +2 -0
  25. package/dist/commonjs/models/components/expand.d.ts.map +1 -1
  26. package/dist/commonjs/models/components/expand.js +2 -0
  27. package/dist/commonjs/models/components/expand.js.map +1 -1
  28. package/dist/commonjs/models/components/feed.d.ts +6 -0
  29. package/dist/commonjs/models/components/feed.d.ts.map +1 -1
  30. package/dist/commonjs/models/components/feed.js.map +1 -1
  31. package/dist/commonjs/models/components/index.d.ts +1 -0
  32. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  33. package/dist/commonjs/models/components/index.js +1 -0
  34. package/dist/commonjs/models/components/index.js.map +1 -1
  35. package/dist/commonjs/models/components/invoice.d.ts +47 -0
  36. package/dist/commonjs/models/components/invoice.d.ts.map +1 -1
  37. package/dist/commonjs/models/components/invoice.js +22 -1
  38. package/dist/commonjs/models/components/invoice.js.map +1 -1
  39. package/dist/commonjs/models/components/paymentprofileinfo.d.ts +46 -0
  40. package/dist/commonjs/models/components/paymentprofileinfo.d.ts.map +1 -0
  41. package/dist/commonjs/models/components/paymentprofileinfo.js +113 -0
  42. package/dist/commonjs/models/components/paymentprofileinfo.js.map +1 -0
  43. package/dist/commonjs/models/components/pendinginvitation.d.ts +6 -0
  44. package/dist/commonjs/models/components/pendinginvitation.d.ts.map +1 -1
  45. package/dist/commonjs/models/components/pendinginvitation.js.map +1 -1
  46. package/dist/commonjs/models/components/standingappointment.d.ts +6 -0
  47. package/dist/commonjs/models/components/standingappointment.d.ts.map +1 -1
  48. package/dist/commonjs/models/components/standingappointment.js.map +1 -1
  49. package/dist/commonjs/react-query/index.d.ts +1 -0
  50. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  51. package/dist/commonjs/react-query/index.js +1 -0
  52. package/dist/commonjs/react-query/index.js.map +1 -1
  53. package/dist/commonjs/react-query/invoicesListInvoices.d.ts +8 -0
  54. package/dist/commonjs/react-query/invoicesListInvoices.d.ts.map +1 -1
  55. package/dist/commonjs/react-query/invoicesListInvoices.js +8 -0
  56. package/dist/commonjs/react-query/invoicesListInvoices.js.map +1 -1
  57. package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.core.d.ts +12 -0
  58. package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.core.d.ts.map +1 -0
  59. package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.core.js +38 -0
  60. package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.core.js.map +1 -0
  61. package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.d.ts +27 -0
  62. package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.d.ts.map +1 -0
  63. package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.js +63 -0
  64. package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.js.map +1 -0
  65. package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.d.ts +2 -0
  66. package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
  67. package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.js +2 -0
  68. package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -1
  69. package/dist/commonjs/react-query/vendorsListVendorInvoices.d.ts +4 -0
  70. package/dist/commonjs/react-query/vendorsListVendorInvoices.d.ts.map +1 -1
  71. package/dist/commonjs/react-query/vendorsListVendorInvoices.js +4 -0
  72. package/dist/commonjs/react-query/vendorsListVendorInvoices.js.map +1 -1
  73. package/dist/commonjs/sdk/invoices.d.ts +2 -0
  74. package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
  75. package/dist/commonjs/sdk/invoices.js +2 -0
  76. package/dist/commonjs/sdk/invoices.js.map +1 -1
  77. package/dist/commonjs/sdk/paymentprofile.d.ts +15 -0
  78. package/dist/commonjs/sdk/paymentprofile.d.ts.map +1 -0
  79. package/dist/commonjs/sdk/paymentprofile.js +25 -0
  80. package/dist/commonjs/sdk/paymentprofile.js.map +1 -0
  81. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  82. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  83. package/dist/commonjs/sdk/sdk.js +4 -0
  84. package/dist/commonjs/sdk/sdk.js.map +1 -1
  85. package/dist/commonjs/sdk/vendors.d.ts +2 -0
  86. package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
  87. package/dist/commonjs/sdk/vendors.js +2 -0
  88. package/dist/commonjs/sdk/vendors.js.map +1 -1
  89. package/dist/esm/__tests__/paymentprofile.test.d.ts +2 -0
  90. package/dist/esm/__tests__/paymentprofile.test.d.ts.map +1 -0
  91. package/dist/esm/__tests__/paymentprofile.test.js +23 -0
  92. package/dist/esm/__tests__/paymentprofile.test.js.map +1 -0
  93. package/dist/esm/funcs/invoicesListInvoices.d.ts +2 -0
  94. package/dist/esm/funcs/invoicesListInvoices.d.ts.map +1 -1
  95. package/dist/esm/funcs/invoicesListInvoices.js +2 -0
  96. package/dist/esm/funcs/invoicesListInvoices.js.map +1 -1
  97. package/dist/esm/funcs/paymentProfileGetPaymentProfile.d.ts +21 -0
  98. package/dist/esm/funcs/paymentProfileGetPaymentProfile.d.ts.map +1 -0
  99. package/dist/esm/funcs/paymentProfileGetPaymentProfile.js +74 -0
  100. package/dist/esm/funcs/paymentProfileGetPaymentProfile.js.map +1 -0
  101. package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.d.ts +1 -0
  102. package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
  103. package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.js +1 -0
  104. package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.js.map +1 -1
  105. package/dist/esm/funcs/vendorsListVendorInvoices.d.ts +1 -0
  106. package/dist/esm/funcs/vendorsListVendorInvoices.d.ts.map +1 -1
  107. package/dist/esm/funcs/vendorsListVendorInvoices.js +1 -0
  108. package/dist/esm/funcs/vendorsListVendorInvoices.js.map +1 -1
  109. package/dist/esm/lib/config.d.ts +2 -2
  110. package/dist/esm/lib/config.js +2 -2
  111. package/dist/esm/models/components/expand.d.ts +2 -0
  112. package/dist/esm/models/components/expand.d.ts.map +1 -1
  113. package/dist/esm/models/components/expand.js +2 -0
  114. package/dist/esm/models/components/expand.js.map +1 -1
  115. package/dist/esm/models/components/feed.d.ts +6 -0
  116. package/dist/esm/models/components/feed.d.ts.map +1 -1
  117. package/dist/esm/models/components/feed.js.map +1 -1
  118. package/dist/esm/models/components/index.d.ts +1 -0
  119. package/dist/esm/models/components/index.d.ts.map +1 -1
  120. package/dist/esm/models/components/index.js +1 -0
  121. package/dist/esm/models/components/index.js.map +1 -1
  122. package/dist/esm/models/components/invoice.d.ts +47 -0
  123. package/dist/esm/models/components/invoice.d.ts.map +1 -1
  124. package/dist/esm/models/components/invoice.js +19 -0
  125. package/dist/esm/models/components/invoice.js.map +1 -1
  126. package/dist/esm/models/components/paymentprofileinfo.d.ts +46 -0
  127. package/dist/esm/models/components/paymentprofileinfo.d.ts.map +1 -0
  128. package/dist/esm/models/components/paymentprofileinfo.js +72 -0
  129. package/dist/esm/models/components/paymentprofileinfo.js.map +1 -0
  130. package/dist/esm/models/components/pendinginvitation.d.ts +6 -0
  131. package/dist/esm/models/components/pendinginvitation.d.ts.map +1 -1
  132. package/dist/esm/models/components/pendinginvitation.js.map +1 -1
  133. package/dist/esm/models/components/standingappointment.d.ts +6 -0
  134. package/dist/esm/models/components/standingappointment.d.ts.map +1 -1
  135. package/dist/esm/models/components/standingappointment.js.map +1 -1
  136. package/dist/esm/react-query/index.d.ts +1 -0
  137. package/dist/esm/react-query/index.d.ts.map +1 -1
  138. package/dist/esm/react-query/index.js +1 -0
  139. package/dist/esm/react-query/index.js.map +1 -1
  140. package/dist/esm/react-query/invoicesListInvoices.d.ts +8 -0
  141. package/dist/esm/react-query/invoicesListInvoices.d.ts.map +1 -1
  142. package/dist/esm/react-query/invoicesListInvoices.js +8 -0
  143. package/dist/esm/react-query/invoicesListInvoices.js.map +1 -1
  144. package/dist/esm/react-query/paymentProfileGetPaymentProfile.core.d.ts +12 -0
  145. package/dist/esm/react-query/paymentProfileGetPaymentProfile.core.d.ts.map +1 -0
  146. package/dist/esm/react-query/paymentProfileGetPaymentProfile.core.js +33 -0
  147. package/dist/esm/react-query/paymentProfileGetPaymentProfile.core.js.map +1 -0
  148. package/dist/esm/react-query/paymentProfileGetPaymentProfile.d.ts +27 -0
  149. package/dist/esm/react-query/paymentProfileGetPaymentProfile.d.ts.map +1 -0
  150. package/dist/esm/react-query/paymentProfileGetPaymentProfile.js +54 -0
  151. package/dist/esm/react-query/paymentProfileGetPaymentProfile.js.map +1 -0
  152. package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.d.ts +2 -0
  153. package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
  154. package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.js +2 -0
  155. package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -1
  156. package/dist/esm/react-query/vendorsListVendorInvoices.d.ts +4 -0
  157. package/dist/esm/react-query/vendorsListVendorInvoices.d.ts.map +1 -1
  158. package/dist/esm/react-query/vendorsListVendorInvoices.js +4 -0
  159. package/dist/esm/react-query/vendorsListVendorInvoices.js.map +1 -1
  160. package/dist/esm/sdk/invoices.d.ts +2 -0
  161. package/dist/esm/sdk/invoices.d.ts.map +1 -1
  162. package/dist/esm/sdk/invoices.js +2 -0
  163. package/dist/esm/sdk/invoices.js.map +1 -1
  164. package/dist/esm/sdk/paymentprofile.d.ts +15 -0
  165. package/dist/esm/sdk/paymentprofile.d.ts.map +1 -0
  166. package/dist/esm/sdk/paymentprofile.js +21 -0
  167. package/dist/esm/sdk/paymentprofile.js.map +1 -0
  168. package/dist/esm/sdk/sdk.d.ts +3 -0
  169. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  170. package/dist/esm/sdk/sdk.js +4 -0
  171. package/dist/esm/sdk/sdk.js.map +1 -1
  172. package/dist/esm/sdk/vendors.d.ts +2 -0
  173. package/dist/esm/sdk/vendors.d.ts.map +1 -1
  174. package/dist/esm/sdk/vendors.js +2 -0
  175. package/dist/esm/sdk/vendors.js.map +1 -1
  176. package/examples/package-lock.json +1 -1
  177. package/jsr.json +1 -1
  178. package/package.json +1 -1
  179. package/src/__tests__/paymentprofile.test.ts +26 -0
  180. package/src/funcs/invoicesListInvoices.ts +2 -0
  181. package/src/funcs/paymentProfileGetPaymentProfile.ts +153 -0
  182. package/src/funcs/vendorsGetVendorInvoiceDetails.ts +1 -0
  183. package/src/funcs/vendorsListVendorInvoices.ts +1 -0
  184. package/src/lib/config.ts +2 -2
  185. package/src/models/components/expand.ts +2 -0
  186. package/src/models/components/feed.ts +6 -0
  187. package/src/models/components/index.ts +1 -0
  188. package/src/models/components/invoice.ts +86 -0
  189. package/src/models/components/paymentprofileinfo.ts +182 -0
  190. package/src/models/components/pendinginvitation.ts +6 -0
  191. package/src/models/components/standingappointment.ts +6 -0
  192. package/src/react-query/index.ts +1 -0
  193. package/src/react-query/invoicesListInvoices.ts +8 -0
  194. package/src/react-query/paymentProfileGetPaymentProfile.core.ts +71 -0
  195. package/src/react-query/paymentProfileGetPaymentProfile.ts +96 -0
  196. package/src/react-query/vendorsGetVendorInvoiceDetails.ts +2 -0
  197. package/src/react-query/vendorsListVendorInvoices.ts +4 -0
  198. package/src/sdk/invoices.ts +2 -0
  199. package/src/sdk/paymentprofile.ts +28 -0
  200. package/src/sdk/sdk.ts +6 -0
  201. package/src/sdk/vendors.ts +2 -0
@@ -0,0 +1,182 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { Result as SafeParseResult } from "../../types/fp.js";
9
+ import * as types from "../../types/primitives.js";
10
+ import { smartUnion } from "../../types/smartUnion.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ export type PaymentProfileInfo22 = {};
14
+
15
+ export type PaymentProfileInfoPaymentProfile2 = number | PaymentProfileInfo22;
16
+
17
+ export type PaymentProfileInfoPaymentProfile1 = {
18
+ id?: number | undefined;
19
+ isValid?: boolean | null | undefined;
20
+ cardType?: string | null | undefined;
21
+ cardLast4?: string | null | undefined;
22
+ isDummy?: boolean | null | undefined;
23
+ profileType?: string | null | undefined;
24
+ };
25
+
26
+ /**
27
+ * Reduced list of attributes of the Payment Profile record
28
+ */
29
+ export type PaymentProfileInfoPaymentProfilePaymentProfile =
30
+ | PaymentProfileInfoPaymentProfile1
31
+ | number
32
+ | PaymentProfileInfo22;
33
+
34
+ /**
35
+ * Payment profile information for the logged-in user. This is account-level data, not invoice-specific.
36
+ */
37
+ export type PaymentProfileInfo = {
38
+ /**
39
+ * Credit balance for the logged in user (vendor or company manager)
40
+ */
41
+ creditBalance: number | null;
42
+ /**
43
+ * Payment profile for the logged in user (vendor or company manager)
44
+ */
45
+ paymentProfile:
46
+ | PaymentProfileInfoPaymentProfile1
47
+ | number
48
+ | PaymentProfileInfo22
49
+ | null;
50
+ };
51
+
52
+ /** @internal */
53
+ export const PaymentProfileInfo22$inboundSchema: z.ZodType<
54
+ PaymentProfileInfo22,
55
+ z.ZodTypeDef,
56
+ unknown
57
+ > = z.object({});
58
+
59
+ export function paymentProfileInfo22FromJSON(
60
+ jsonString: string,
61
+ ): SafeParseResult<PaymentProfileInfo22, SDKValidationError> {
62
+ return safeParse(
63
+ jsonString,
64
+ (x) => PaymentProfileInfo22$inboundSchema.parse(JSON.parse(x)),
65
+ `Failed to parse 'PaymentProfileInfo22' from JSON`,
66
+ );
67
+ }
68
+
69
+ /** @internal */
70
+ export const PaymentProfileInfoPaymentProfile2$inboundSchema: z.ZodType<
71
+ PaymentProfileInfoPaymentProfile2,
72
+ z.ZodTypeDef,
73
+ unknown
74
+ > = smartUnion([
75
+ types.number(),
76
+ z.lazy(() => PaymentProfileInfo22$inboundSchema),
77
+ ]);
78
+
79
+ export function paymentProfileInfoPaymentProfile2FromJSON(
80
+ jsonString: string,
81
+ ): SafeParseResult<PaymentProfileInfoPaymentProfile2, SDKValidationError> {
82
+ return safeParse(
83
+ jsonString,
84
+ (x) => PaymentProfileInfoPaymentProfile2$inboundSchema.parse(JSON.parse(x)),
85
+ `Failed to parse 'PaymentProfileInfoPaymentProfile2' from JSON`,
86
+ );
87
+ }
88
+
89
+ /** @internal */
90
+ export const PaymentProfileInfoPaymentProfile1$inboundSchema: z.ZodType<
91
+ PaymentProfileInfoPaymentProfile1,
92
+ z.ZodTypeDef,
93
+ unknown
94
+ > = z.object({
95
+ id: types.optional(types.number()),
96
+ is_valid: z.nullable(types.boolean()).optional(),
97
+ card_type: z.nullable(types.string()).optional(),
98
+ card_last4: z.nullable(types.string()).optional(),
99
+ is_dummy: z.nullable(types.boolean()).optional(),
100
+ profile_type: z.nullable(types.string()).optional(),
101
+ }).transform((v) => {
102
+ return remap$(v, {
103
+ "is_valid": "isValid",
104
+ "card_type": "cardType",
105
+ "card_last4": "cardLast4",
106
+ "is_dummy": "isDummy",
107
+ "profile_type": "profileType",
108
+ });
109
+ });
110
+
111
+ export function paymentProfileInfoPaymentProfile1FromJSON(
112
+ jsonString: string,
113
+ ): SafeParseResult<PaymentProfileInfoPaymentProfile1, SDKValidationError> {
114
+ return safeParse(
115
+ jsonString,
116
+ (x) => PaymentProfileInfoPaymentProfile1$inboundSchema.parse(JSON.parse(x)),
117
+ `Failed to parse 'PaymentProfileInfoPaymentProfile1' from JSON`,
118
+ );
119
+ }
120
+
121
+ /** @internal */
122
+ export const PaymentProfileInfoPaymentProfilePaymentProfile$inboundSchema:
123
+ z.ZodType<
124
+ PaymentProfileInfoPaymentProfilePaymentProfile,
125
+ z.ZodTypeDef,
126
+ unknown
127
+ > = smartUnion([
128
+ z.lazy(() => PaymentProfileInfoPaymentProfile1$inboundSchema),
129
+ smartUnion([
130
+ types.number(),
131
+ z.lazy(() => PaymentProfileInfo22$inboundSchema),
132
+ ]),
133
+ ]);
134
+
135
+ export function paymentProfileInfoPaymentProfilePaymentProfileFromJSON(
136
+ jsonString: string,
137
+ ): SafeParseResult<
138
+ PaymentProfileInfoPaymentProfilePaymentProfile,
139
+ SDKValidationError
140
+ > {
141
+ return safeParse(
142
+ jsonString,
143
+ (x) =>
144
+ PaymentProfileInfoPaymentProfilePaymentProfile$inboundSchema.parse(
145
+ JSON.parse(x),
146
+ ),
147
+ `Failed to parse 'PaymentProfileInfoPaymentProfilePaymentProfile' from JSON`,
148
+ );
149
+ }
150
+
151
+ /** @internal */
152
+ export const PaymentProfileInfo$inboundSchema: z.ZodType<
153
+ PaymentProfileInfo,
154
+ z.ZodTypeDef,
155
+ unknown
156
+ > = z.object({
157
+ credit_balance: types.nullable(types.number()),
158
+ payment_profile: types.nullable(
159
+ smartUnion([
160
+ z.lazy(() => PaymentProfileInfoPaymentProfile1$inboundSchema),
161
+ smartUnion([
162
+ types.number(),
163
+ z.lazy(() => PaymentProfileInfo22$inboundSchema),
164
+ ]),
165
+ ]),
166
+ ),
167
+ }).transform((v) => {
168
+ return remap$(v, {
169
+ "credit_balance": "creditBalance",
170
+ "payment_profile": "paymentProfile",
171
+ });
172
+ });
173
+
174
+ export function paymentProfileInfoFromJSON(
175
+ jsonString: string,
176
+ ): SafeParseResult<PaymentProfileInfo, SDKValidationError> {
177
+ return safeParse(
178
+ jsonString,
179
+ (x) => PaymentProfileInfo$inboundSchema.parse(JSON.parse(x)),
180
+ `Failed to parse 'PaymentProfileInfo' from JSON`,
181
+ );
182
+ }
@@ -17,7 +17,13 @@ export type Event = {
17
17
  userId?: number | undefined;
18
18
  title?: string | null | undefined;
19
19
  location?: string | null | undefined;
20
+ /**
21
+ * Start date and time in UTC (ISO 8601 format, e.g. 2026-02-23T14:00:00Z).
22
+ */
20
23
  start?: string | undefined;
24
+ /**
25
+ * End date and time in UTC (ISO 8601 format, e.g. 2026-02-23T15:00:00Z).
26
+ */
21
27
  end?: string | undefined;
22
28
  allDay?: boolean | undefined;
23
29
  standingAppt?: boolean | undefined;
@@ -18,7 +18,13 @@ export type StandingAppointment = {
18
18
  title?: string | null | undefined;
19
19
  location?: string | null | undefined;
20
20
  attendees?: Array<string> | undefined;
21
+ /**
22
+ * Start date and time in UTC (ISO 8601 format, e.g. 2026-02-23T14:00:00Z). Null if not set.
23
+ */
21
24
  start?: string | null | undefined;
25
+ /**
26
+ * End date and time in UTC (ISO 8601 format, e.g. 2026-02-23T15:00:00Z). Null if not set.
27
+ */
22
28
  end?: string | null | undefined;
23
29
  status?: string | null | undefined;
24
30
  standingAppt?: boolean | undefined;
@@ -36,6 +36,7 @@ export * from "./organizationsGetFacility.js";
36
36
  export * from "./organizationsListOrSearchDepartmentContacts.js";
37
37
  export * from "./organizationsListOrSearchDepartments.js";
38
38
  export * from "./organizationsListOrSearchFacilities.js";
39
+ export * from "./paymentProfileGetPaymentProfile.js";
39
40
  export * from "./supportArticlesGetSupportArticle.js";
40
41
  export * from "./supportArticlesListOrSearchSupportArticles.js";
41
42
  export * from "./systemsListSystems.js";
@@ -66,7 +66,9 @@ export {
66
66
  * - invoice.line_items
67
67
  * - invoice.invoice_transactions
68
68
  * - invoice.representative
69
+ * - invoice.custom_fields
69
70
  * - invoice.invoice_type
71
+ * - invoice.may_pay_invoice
70
72
  */
71
73
  export function useInvoicesListInvoices(
72
74
  request: operations.ListInvoicesRequest,
@@ -100,7 +102,9 @@ export function useInvoicesListInvoices(
100
102
  * - invoice.line_items
101
103
  * - invoice.invoice_transactions
102
104
  * - invoice.representative
105
+ * - invoice.custom_fields
103
106
  * - invoice.invoice_type
107
+ * - invoice.may_pay_invoice
104
108
  */
105
109
  export function useInvoicesListInvoicesSuspense(
106
110
  request: operations.ListInvoicesRequest,
@@ -134,7 +138,9 @@ export function useInvoicesListInvoicesSuspense(
134
138
  * - invoice.line_items
135
139
  * - invoice.invoice_transactions
136
140
  * - invoice.representative
141
+ * - invoice.custom_fields
137
142
  * - invoice.invoice_type
143
+ * - invoice.may_pay_invoice
138
144
  */
139
145
  export function useInvoicesListInvoicesInfinite(
140
146
  request: operations.ListInvoicesRequest,
@@ -185,7 +191,9 @@ export function useInvoicesListInvoicesInfinite(
185
191
  * - invoice.line_items
186
192
  * - invoice.invoice_transactions
187
193
  * - invoice.representative
194
+ * - invoice.custom_fields
188
195
  * - invoice.invoice_type
196
+ * - invoice.may_pay_invoice
189
197
  */
190
198
  export function useInvoicesListInvoicesInfiniteSuspense(
191
199
  request: operations.ListInvoicesRequest,
@@ -0,0 +1,71 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ QueryClient,
7
+ QueryFunctionContext,
8
+ QueryKey,
9
+ } from "@tanstack/react-query";
10
+ import { GreenSecurityCore } from "../core.js";
11
+ import { paymentProfileGetPaymentProfile } from "../funcs/paymentProfileGetPaymentProfile.js";
12
+ import { combineSignals } from "../lib/primitives.js";
13
+ import { RequestOptions } from "../lib/sdks.js";
14
+ import * as components from "../models/components/index.js";
15
+ import { unwrapAsync } from "../types/fp.js";
16
+ export type PaymentProfileGetPaymentProfileQueryData =
17
+ components.PaymentProfileInfo;
18
+
19
+ export function prefetchPaymentProfileGetPaymentProfile(
20
+ queryClient: QueryClient,
21
+ client$: GreenSecurityCore,
22
+ options?: RequestOptions,
23
+ ): Promise<void> {
24
+ return queryClient.prefetchQuery({
25
+ ...buildPaymentProfileGetPaymentProfileQuery(
26
+ client$,
27
+ options,
28
+ ),
29
+ });
30
+ }
31
+
32
+ export function buildPaymentProfileGetPaymentProfileQuery(
33
+ client$: GreenSecurityCore,
34
+ options?: RequestOptions,
35
+ ): {
36
+ queryKey: QueryKey;
37
+ queryFn: (
38
+ context: QueryFunctionContext,
39
+ ) => Promise<PaymentProfileGetPaymentProfileQueryData>;
40
+ } {
41
+ return {
42
+ queryKey: queryKeyPaymentProfileGetPaymentProfile(),
43
+ queryFn: async function paymentProfileGetPaymentProfileQueryFn(
44
+ ctx,
45
+ ): Promise<PaymentProfileGetPaymentProfileQueryData> {
46
+ const sig = combineSignals(
47
+ ctx.signal,
48
+ options?.signal,
49
+ options?.fetchOptions?.signal,
50
+ );
51
+ const mergedOptions = {
52
+ ...options?.fetchOptions,
53
+ ...options,
54
+ signal: sig,
55
+ };
56
+
57
+ return unwrapAsync(paymentProfileGetPaymentProfile(
58
+ client$,
59
+ mergedOptions,
60
+ ));
61
+ },
62
+ };
63
+ }
64
+
65
+ export function queryKeyPaymentProfileGetPaymentProfile(): QueryKey {
66
+ return [
67
+ "@greensecurity/javascript-sdk",
68
+ "payment-profile",
69
+ "getPaymentProfile",
70
+ ];
71
+ }
@@ -0,0 +1,96 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import {
6
+ InvalidateQueryFilters,
7
+ QueryClient,
8
+ useQuery,
9
+ UseQueryResult,
10
+ useSuspenseQuery,
11
+ UseSuspenseQueryResult,
12
+ } from "@tanstack/react-query";
13
+ import { useGreenSecurityContext } from "./_context.js";
14
+ import { QueryHookOptions, SuspenseQueryHookOptions } from "./_types.js";
15
+ import {
16
+ buildPaymentProfileGetPaymentProfileQuery,
17
+ PaymentProfileGetPaymentProfileQueryData,
18
+ prefetchPaymentProfileGetPaymentProfile,
19
+ queryKeyPaymentProfileGetPaymentProfile,
20
+ } from "./paymentProfileGetPaymentProfile.core.js";
21
+ export {
22
+ buildPaymentProfileGetPaymentProfileQuery,
23
+ type PaymentProfileGetPaymentProfileQueryData,
24
+ prefetchPaymentProfileGetPaymentProfile,
25
+ queryKeyPaymentProfileGetPaymentProfile,
26
+ };
27
+
28
+ /**
29
+ * Get payment profile information
30
+ *
31
+ * @remarks
32
+ * Returns payment profile information for the logged-in user (vendor or company manager).
33
+ * This includes credit_balance and payment_profile which are account-level data, not invoice-specific.
34
+ *
35
+ * Only vendors and company managers can access this endpoint.
36
+ */
37
+ export function usePaymentProfileGetPaymentProfile(
38
+ options?: QueryHookOptions<PaymentProfileGetPaymentProfileQueryData>,
39
+ ): UseQueryResult<PaymentProfileGetPaymentProfileQueryData, Error> {
40
+ const client = useGreenSecurityContext();
41
+ return useQuery({
42
+ ...buildPaymentProfileGetPaymentProfileQuery(
43
+ client,
44
+ options,
45
+ ),
46
+ ...options,
47
+ });
48
+ }
49
+
50
+ /**
51
+ * Get payment profile information
52
+ *
53
+ * @remarks
54
+ * Returns payment profile information for the logged-in user (vendor or company manager).
55
+ * This includes credit_balance and payment_profile which are account-level data, not invoice-specific.
56
+ *
57
+ * Only vendors and company managers can access this endpoint.
58
+ */
59
+ export function usePaymentProfileGetPaymentProfileSuspense(
60
+ options?: SuspenseQueryHookOptions<PaymentProfileGetPaymentProfileQueryData>,
61
+ ): UseSuspenseQueryResult<PaymentProfileGetPaymentProfileQueryData, Error> {
62
+ const client = useGreenSecurityContext();
63
+ return useSuspenseQuery({
64
+ ...buildPaymentProfileGetPaymentProfileQuery(
65
+ client,
66
+ options,
67
+ ),
68
+ ...options,
69
+ });
70
+ }
71
+
72
+ export function setPaymentProfileGetPaymentProfileData(
73
+ client: QueryClient,
74
+ data: PaymentProfileGetPaymentProfileQueryData,
75
+ ): PaymentProfileGetPaymentProfileQueryData | undefined {
76
+ const key = queryKeyPaymentProfileGetPaymentProfile();
77
+
78
+ return client.setQueryData<PaymentProfileGetPaymentProfileQueryData>(
79
+ key,
80
+ data,
81
+ );
82
+ }
83
+
84
+ export function invalidateAllPaymentProfileGetPaymentProfile(
85
+ client: QueryClient,
86
+ filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
87
+ ): Promise<void> {
88
+ return client.invalidateQueries({
89
+ ...filters,
90
+ queryKey: [
91
+ "@greensecurity/javascript-sdk",
92
+ "payment-profile",
93
+ "getPaymentProfile",
94
+ ],
95
+ });
96
+ }
@@ -41,6 +41,7 @@ export {
41
41
  *
42
42
  * invoice.line_items
43
43
  * invoice.invoice_transactions
44
+ * invoice.may_pay_invoice
44
45
  */
45
46
  export function useVendorsGetVendorInvoiceDetails(
46
47
  request: operations.GetVendorInvoiceDetailsRequest,
@@ -67,6 +68,7 @@ export function useVendorsGetVendorInvoiceDetails(
67
68
  *
68
69
  * invoice.line_items
69
70
  * invoice.invoice_transactions
71
+ * invoice.may_pay_invoice
70
72
  */
71
73
  export function useVendorsGetVendorInvoiceDetailsSuspense(
72
74
  request: operations.GetVendorInvoiceDetailsRequest,
@@ -58,6 +58,7 @@ export {
58
58
  * Available `expand` scopes are:
59
59
  *
60
60
  * invoice.line_items
61
+ * invoice.may_pay_invoice
61
62
  */
62
63
  export function useVendorsListVendorInvoices(
63
64
  request: operations.ListVendorInvoicesRequest,
@@ -83,6 +84,7 @@ export function useVendorsListVendorInvoices(
83
84
  * Available `expand` scopes are:
84
85
  *
85
86
  * invoice.line_items
87
+ * invoice.may_pay_invoice
86
88
  */
87
89
  export function useVendorsListVendorInvoicesSuspense(
88
90
  request: operations.ListVendorInvoicesRequest,
@@ -108,6 +110,7 @@ export function useVendorsListVendorInvoicesSuspense(
108
110
  * Available `expand` scopes are:
109
111
  *
110
112
  * invoice.line_items
113
+ * invoice.may_pay_invoice
111
114
  */
112
115
  export function useVendorsListVendorInvoicesInfinite(
113
116
  request: operations.ListVendorInvoicesRequest,
@@ -152,6 +155,7 @@ export function useVendorsListVendorInvoicesInfinite(
152
155
  * Available `expand` scopes are:
153
156
  *
154
157
  * invoice.line_items
158
+ * invoice.may_pay_invoice
155
159
  */
156
160
  export function useVendorsListVendorInvoicesInfiniteSuspense(
157
161
  request: operations.ListVendorInvoicesRequest,
@@ -29,7 +29,9 @@ export class Invoices extends ClientSDK {
29
29
  * - invoice.line_items
30
30
  * - invoice.invoice_transactions
31
31
  * - invoice.representative
32
+ * - invoice.custom_fields
32
33
  * - invoice.invoice_type
34
+ * - invoice.may_pay_invoice
33
35
  */
34
36
  async listInvoices(
35
37
  request: operations.ListInvoicesRequest,
@@ -0,0 +1,28 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { paymentProfileGetPaymentProfile } from "../funcs/paymentProfileGetPaymentProfile.js";
6
+ import { ClientSDK, RequestOptions } from "../lib/sdks.js";
7
+ import * as components from "../models/components/index.js";
8
+ import { unwrapAsync } from "../types/fp.js";
9
+
10
+ export class PaymentProfile extends ClientSDK {
11
+ /**
12
+ * Get payment profile information
13
+ *
14
+ * @remarks
15
+ * Returns payment profile information for the logged-in user (vendor or company manager).
16
+ * This includes credit_balance and payment_profile which are account-level data, not invoice-specific.
17
+ *
18
+ * Only vendors and company managers can access this endpoint.
19
+ */
20
+ async getPaymentProfile(
21
+ options?: RequestOptions,
22
+ ): Promise<components.PaymentProfileInfo> {
23
+ return unwrapAsync(paymentProfileGetPaymentProfile(
24
+ this,
25
+ options,
26
+ ));
27
+ }
28
+ }
package/src/sdk/sdk.ts CHANGED
@@ -11,6 +11,7 @@ import { FhirConfigs } from "./fhirconfigs.js";
11
11
  import { Invoices } from "./invoices.js";
12
12
  import { MobileDevices } from "./mobiledevices.js";
13
13
  import { Organizations } from "./organizations.js";
14
+ import { PaymentProfile } from "./paymentprofile.js";
14
15
  import { SupportArticles } from "./supportarticles.js";
15
16
  import { Systems } from "./systems.js";
16
17
  import { Users } from "./users.js";
@@ -70,6 +71,11 @@ export class GreenSecurity extends ClientSDK {
70
71
  return (this._invoices ??= new Invoices(this._options));
71
72
  }
72
73
 
74
+ private _paymentProfile?: PaymentProfile;
75
+ get paymentProfile(): PaymentProfile {
76
+ return (this._paymentProfile ??= new PaymentProfile(this._options));
77
+ }
78
+
73
79
  private _events?: Events;
74
80
  get events(): Events {
75
81
  return (this._events ??= new Events(this._options));
@@ -529,6 +529,7 @@ export class Vendors extends ClientSDK {
529
529
  * Available `expand` scopes are:
530
530
  *
531
531
  * invoice.line_items
532
+ * invoice.may_pay_invoice
532
533
  */
533
534
  async listVendorInvoices(
534
535
  request: operations.ListVendorInvoicesRequest,
@@ -570,6 +571,7 @@ export class Vendors extends ClientSDK {
570
571
  *
571
572
  * invoice.line_items
572
573
  * invoice.invoice_transactions
574
+ * invoice.may_pay_invoice
573
575
  */
574
576
  async getVendorInvoiceDetails(
575
577
  request: operations.GetVendorInvoiceDetailsRequest,