@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.
- package/README.md +6 -0
- package/dist/commonjs/__tests__/paymentprofile.test.d.ts +2 -0
- package/dist/commonjs/__tests__/paymentprofile.test.d.ts.map +1 -0
- package/dist/commonjs/__tests__/paymentprofile.test.js +25 -0
- package/dist/commonjs/__tests__/paymentprofile.test.js.map +1 -0
- package/dist/commonjs/funcs/invoicesListInvoices.d.ts +2 -0
- package/dist/commonjs/funcs/invoicesListInvoices.d.ts.map +1 -1
- package/dist/commonjs/funcs/invoicesListInvoices.js +2 -0
- package/dist/commonjs/funcs/invoicesListInvoices.js.map +1 -1
- package/dist/commonjs/funcs/paymentProfileGetPaymentProfile.d.ts +21 -0
- package/dist/commonjs/funcs/paymentProfileGetPaymentProfile.d.ts.map +1 -0
- package/dist/commonjs/funcs/paymentProfileGetPaymentProfile.js +110 -0
- package/dist/commonjs/funcs/paymentProfileGetPaymentProfile.js.map +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.d.ts +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.js +1 -0
- package/dist/commonjs/funcs/vendorsGetVendorInvoiceDetails.js.map +1 -1
- package/dist/commonjs/funcs/vendorsListVendorInvoices.d.ts +1 -0
- package/dist/commonjs/funcs/vendorsListVendorInvoices.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsListVendorInvoices.js +1 -0
- package/dist/commonjs/funcs/vendorsListVendorInvoices.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/components/expand.d.ts +2 -0
- package/dist/commonjs/models/components/expand.d.ts.map +1 -1
- package/dist/commonjs/models/components/expand.js +2 -0
- package/dist/commonjs/models/components/expand.js.map +1 -1
- package/dist/commonjs/models/components/feed.d.ts +6 -0
- package/dist/commonjs/models/components/feed.d.ts.map +1 -1
- package/dist/commonjs/models/components/feed.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +1 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +1 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/invoice.d.ts +47 -0
- package/dist/commonjs/models/components/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/components/invoice.js +22 -1
- package/dist/commonjs/models/components/invoice.js.map +1 -1
- package/dist/commonjs/models/components/paymentprofileinfo.d.ts +46 -0
- package/dist/commonjs/models/components/paymentprofileinfo.d.ts.map +1 -0
- package/dist/commonjs/models/components/paymentprofileinfo.js +113 -0
- package/dist/commonjs/models/components/paymentprofileinfo.js.map +1 -0
- package/dist/commonjs/models/components/pendinginvitation.d.ts +6 -0
- package/dist/commonjs/models/components/pendinginvitation.d.ts.map +1 -1
- package/dist/commonjs/models/components/pendinginvitation.js.map +1 -1
- package/dist/commonjs/models/components/standingappointment.d.ts +6 -0
- package/dist/commonjs/models/components/standingappointment.d.ts.map +1 -1
- package/dist/commonjs/models/components/standingappointment.js.map +1 -1
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/invoicesListInvoices.d.ts +8 -0
- package/dist/commonjs/react-query/invoicesListInvoices.d.ts.map +1 -1
- package/dist/commonjs/react-query/invoicesListInvoices.js +8 -0
- package/dist/commonjs/react-query/invoicesListInvoices.js.map +1 -1
- package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.core.d.ts +12 -0
- package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.core.js +38 -0
- package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.core.js.map +1 -0
- package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.d.ts +27 -0
- package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.d.ts.map +1 -0
- package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.js +63 -0
- package/dist/commonjs/react-query/paymentProfileGetPaymentProfile.js.map +1 -0
- package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.d.ts +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.js +2 -0
- package/dist/commonjs/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorInvoices.d.ts +4 -0
- package/dist/commonjs/react-query/vendorsListVendorInvoices.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsListVendorInvoices.js +4 -0
- package/dist/commonjs/react-query/vendorsListVendorInvoices.js.map +1 -1
- package/dist/commonjs/sdk/invoices.d.ts +2 -0
- package/dist/commonjs/sdk/invoices.d.ts.map +1 -1
- package/dist/commonjs/sdk/invoices.js +2 -0
- package/dist/commonjs/sdk/invoices.js.map +1 -1
- package/dist/commonjs/sdk/paymentprofile.d.ts +15 -0
- package/dist/commonjs/sdk/paymentprofile.d.ts.map +1 -0
- package/dist/commonjs/sdk/paymentprofile.js +25 -0
- package/dist/commonjs/sdk/paymentprofile.js.map +1 -0
- package/dist/commonjs/sdk/sdk.d.ts +3 -0
- package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
- package/dist/commonjs/sdk/sdk.js +4 -0
- package/dist/commonjs/sdk/sdk.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +2 -0
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +2 -0
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/paymentprofile.test.d.ts +2 -0
- package/dist/esm/__tests__/paymentprofile.test.d.ts.map +1 -0
- package/dist/esm/__tests__/paymentprofile.test.js +23 -0
- package/dist/esm/__tests__/paymentprofile.test.js.map +1 -0
- package/dist/esm/funcs/invoicesListInvoices.d.ts +2 -0
- package/dist/esm/funcs/invoicesListInvoices.d.ts.map +1 -1
- package/dist/esm/funcs/invoicesListInvoices.js +2 -0
- package/dist/esm/funcs/invoicesListInvoices.js.map +1 -1
- package/dist/esm/funcs/paymentProfileGetPaymentProfile.d.ts +21 -0
- package/dist/esm/funcs/paymentProfileGetPaymentProfile.d.ts.map +1 -0
- package/dist/esm/funcs/paymentProfileGetPaymentProfile.js +74 -0
- package/dist/esm/funcs/paymentProfileGetPaymentProfile.js.map +1 -0
- package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.d.ts +1 -0
- package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.js +1 -0
- package/dist/esm/funcs/vendorsGetVendorInvoiceDetails.js.map +1 -1
- package/dist/esm/funcs/vendorsListVendorInvoices.d.ts +1 -0
- package/dist/esm/funcs/vendorsListVendorInvoices.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsListVendorInvoices.js +1 -0
- package/dist/esm/funcs/vendorsListVendorInvoices.js.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/components/expand.d.ts +2 -0
- package/dist/esm/models/components/expand.d.ts.map +1 -1
- package/dist/esm/models/components/expand.js +2 -0
- package/dist/esm/models/components/expand.js.map +1 -1
- package/dist/esm/models/components/feed.d.ts +6 -0
- package/dist/esm/models/components/feed.d.ts.map +1 -1
- package/dist/esm/models/components/feed.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +1 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +1 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/invoice.d.ts +47 -0
- package/dist/esm/models/components/invoice.d.ts.map +1 -1
- package/dist/esm/models/components/invoice.js +19 -0
- package/dist/esm/models/components/invoice.js.map +1 -1
- package/dist/esm/models/components/paymentprofileinfo.d.ts +46 -0
- package/dist/esm/models/components/paymentprofileinfo.d.ts.map +1 -0
- package/dist/esm/models/components/paymentprofileinfo.js +72 -0
- package/dist/esm/models/components/paymentprofileinfo.js.map +1 -0
- package/dist/esm/models/components/pendinginvitation.d.ts +6 -0
- package/dist/esm/models/components/pendinginvitation.d.ts.map +1 -1
- package/dist/esm/models/components/pendinginvitation.js.map +1 -1
- package/dist/esm/models/components/standingappointment.d.ts +6 -0
- package/dist/esm/models/components/standingappointment.d.ts.map +1 -1
- package/dist/esm/models/components/standingappointment.js.map +1 -1
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/invoicesListInvoices.d.ts +8 -0
- package/dist/esm/react-query/invoicesListInvoices.d.ts.map +1 -1
- package/dist/esm/react-query/invoicesListInvoices.js +8 -0
- package/dist/esm/react-query/invoicesListInvoices.js.map +1 -1
- package/dist/esm/react-query/paymentProfileGetPaymentProfile.core.d.ts +12 -0
- package/dist/esm/react-query/paymentProfileGetPaymentProfile.core.d.ts.map +1 -0
- package/dist/esm/react-query/paymentProfileGetPaymentProfile.core.js +33 -0
- package/dist/esm/react-query/paymentProfileGetPaymentProfile.core.js.map +1 -0
- package/dist/esm/react-query/paymentProfileGetPaymentProfile.d.ts +27 -0
- package/dist/esm/react-query/paymentProfileGetPaymentProfile.d.ts.map +1 -0
- package/dist/esm/react-query/paymentProfileGetPaymentProfile.js +54 -0
- package/dist/esm/react-query/paymentProfileGetPaymentProfile.js.map +1 -0
- package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.d.ts +2 -0
- package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.js +2 -0
- package/dist/esm/react-query/vendorsGetVendorInvoiceDetails.js.map +1 -1
- package/dist/esm/react-query/vendorsListVendorInvoices.d.ts +4 -0
- package/dist/esm/react-query/vendorsListVendorInvoices.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsListVendorInvoices.js +4 -0
- package/dist/esm/react-query/vendorsListVendorInvoices.js.map +1 -1
- package/dist/esm/sdk/invoices.d.ts +2 -0
- package/dist/esm/sdk/invoices.d.ts.map +1 -1
- package/dist/esm/sdk/invoices.js +2 -0
- package/dist/esm/sdk/invoices.js.map +1 -1
- package/dist/esm/sdk/paymentprofile.d.ts +15 -0
- package/dist/esm/sdk/paymentprofile.d.ts.map +1 -0
- package/dist/esm/sdk/paymentprofile.js +21 -0
- package/dist/esm/sdk/paymentprofile.js.map +1 -0
- package/dist/esm/sdk/sdk.d.ts +3 -0
- package/dist/esm/sdk/sdk.d.ts.map +1 -1
- package/dist/esm/sdk/sdk.js +4 -0
- package/dist/esm/sdk/sdk.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +2 -0
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +2 -0
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/paymentprofile.test.ts +26 -0
- package/src/funcs/invoicesListInvoices.ts +2 -0
- package/src/funcs/paymentProfileGetPaymentProfile.ts +153 -0
- package/src/funcs/vendorsGetVendorInvoiceDetails.ts +1 -0
- package/src/funcs/vendorsListVendorInvoices.ts +1 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/expand.ts +2 -0
- package/src/models/components/feed.ts +6 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/invoice.ts +86 -0
- package/src/models/components/paymentprofileinfo.ts +182 -0
- package/src/models/components/pendinginvitation.ts +6 -0
- package/src/models/components/standingappointment.ts +6 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/invoicesListInvoices.ts +8 -0
- package/src/react-query/paymentProfileGetPaymentProfile.core.ts +71 -0
- package/src/react-query/paymentProfileGetPaymentProfile.ts +96 -0
- package/src/react-query/vendorsGetVendorInvoiceDetails.ts +2 -0
- package/src/react-query/vendorsListVendorInvoices.ts +4 -0
- package/src/sdk/invoices.ts +2 -0
- package/src/sdk/paymentprofile.ts +28 -0
- package/src/sdk/sdk.ts +6 -0
- 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;
|
package/src/react-query/index.ts
CHANGED
|
@@ -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,
|
package/src/sdk/invoices.ts
CHANGED
|
@@ -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));
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -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,
|