@greensecurity/javascript-sdk 0.44.0-beta.40 → 0.44.0-beta.41
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/dist/commonjs/__tests__/companies.test.js +1 -0
- package/dist/commonjs/__tests__/companies.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +1 -0
- package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +17 -14
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/usersGetCurrentUser.d.ts +1 -1
- package/dist/commonjs/funcs/usersGetCurrentUser.js +1 -1
- package/dist/commonjs/funcs/usersGetUserById.d.ts +1 -1
- package/dist/commonjs/funcs/usersGetUserById.js +1 -1
- package/dist/commonjs/funcs/vendorsListVendorCredits.d.ts +1 -1
- package/dist/commonjs/funcs/vendorsListVendorCredits.js +1 -1
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/http.d.ts +1 -1
- package/dist/commonjs/lib/http.d.ts.map +1 -1
- package/dist/commonjs/lib/http.js +1 -1
- package/dist/commonjs/lib/http.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts +5 -4
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js +6 -7
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/models/components/credit.d.ts +30 -4
- package/dist/commonjs/models/components/credit.d.ts.map +1 -1
- package/dist/commonjs/models/components/credit.js +33 -6
- package/dist/commonjs/models/components/credit.js.map +1 -1
- package/dist/commonjs/models/components/creditentitysummary.d.ts +17 -0
- package/dist/commonjs/models/components/creditentitysummary.d.ts.map +1 -0
- package/dist/commonjs/models/components/creditentitysummary.js +52 -0
- package/dist/commonjs/models/components/creditentitysummary.js.map +1 -0
- package/dist/commonjs/models/components/emailpreferences.d.ts +9 -0
- package/dist/commonjs/models/components/emailpreferences.d.ts.map +1 -1
- package/dist/commonjs/models/components/emailpreferences.js +4 -0
- package/dist/commonjs/models/components/emailpreferences.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/userdetails.d.ts +4 -0
- package/dist/commonjs/models/components/userdetails.d.ts.map +1 -1
- package/dist/commonjs/models/components/userdetails.js.map +1 -1
- package/dist/commonjs/models/components/vendor.d.ts +4 -0
- package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendor.js +2 -0
- package/dist/commonjs/models/components/vendor.js.map +1 -1
- package/dist/commonjs/models/components/vendorpaymentresponsibilityassignments.d.ts +0 -14
- package/dist/commonjs/models/components/vendorpaymentresponsibilityassignments.d.ts.map +1 -1
- package/dist/commonjs/models/components/vendorpaymentresponsibilityassignments.js +0 -4
- package/dist/commonjs/models/components/vendorpaymentresponsibilityassignments.js.map +1 -1
- package/dist/commonjs/models/operations/listcompanycredits.d.ts +6 -41
- package/dist/commonjs/models/operations/listcompanycredits.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listcompanycredits.js +6 -33
- package/dist/commonjs/models/operations/listcompanycredits.js.map +1 -1
- package/dist/commonjs/models/operations/listvendorcredits.d.ts +4 -0
- package/dist/commonjs/models/operations/listvendorcredits.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listvendorcredits.js +6 -0
- package/dist/commonjs/models/operations/listvendorcredits.js.map +1 -1
- package/dist/commonjs/models/operations/updateuser.d.ts +4 -0
- package/dist/commonjs/models/operations/updateuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateuser.js.map +1 -1
- package/dist/commonjs/models/operations/updatevendorpaymentresponsibility.d.ts +0 -10
- package/dist/commonjs/models/operations/updatevendorpaymentresponsibility.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatevendorpaymentresponsibility.js +0 -4
- package/dist/commonjs/models/operations/updatevendorpaymentresponsibility.js.map +1 -1
- package/dist/commonjs/react-query/usersGetCurrentUser.d.ts +2 -2
- package/dist/commonjs/react-query/usersGetCurrentUser.js +2 -2
- package/dist/commonjs/react-query/usersGetUserById.d.ts +2 -2
- package/dist/commonjs/react-query/usersGetUserById.js +2 -2
- package/dist/commonjs/react-query/vendorsListVendorCredits.d.ts +4 -4
- package/dist/commonjs/react-query/vendorsListVendorCredits.js +4 -4
- package/dist/commonjs/sdk/users.d.ts +2 -2
- package/dist/commonjs/sdk/users.js +2 -2
- package/dist/commonjs/sdk/vendors.d.ts +1 -1
- package/dist/commonjs/sdk/vendors.js +1 -1
- package/dist/esm/__tests__/companies.test.js +1 -0
- package/dist/esm/__tests__/companies.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +1 -0
- package/dist/esm/__tests__/vendors.test.js.map +1 -1
- package/dist/esm/__tests__/webhooks.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +17 -14
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/usersGetCurrentUser.d.ts +1 -1
- package/dist/esm/funcs/usersGetCurrentUser.js +1 -1
- package/dist/esm/funcs/usersGetUserById.d.ts +1 -1
- package/dist/esm/funcs/usersGetUserById.js +1 -1
- package/dist/esm/funcs/vendorsListVendorCredits.d.ts +1 -1
- package/dist/esm/funcs/vendorsListVendorCredits.js +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/http.d.ts +1 -1
- package/dist/esm/lib/http.d.ts.map +1 -1
- package/dist/esm/lib/http.js +1 -1
- package/dist/esm/lib/http.js.map +1 -1
- package/dist/esm/lib/security.d.ts +5 -4
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js +4 -5
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/models/components/credit.d.ts +30 -4
- package/dist/esm/models/components/credit.d.ts.map +1 -1
- package/dist/esm/models/components/credit.js +30 -5
- package/dist/esm/models/components/credit.js.map +1 -1
- package/dist/esm/models/components/creditentitysummary.d.ts +17 -0
- package/dist/esm/models/components/creditentitysummary.d.ts.map +1 -0
- package/dist/esm/models/components/creditentitysummary.js +15 -0
- package/dist/esm/models/components/creditentitysummary.js.map +1 -0
- package/dist/esm/models/components/emailpreferences.d.ts +9 -0
- package/dist/esm/models/components/emailpreferences.d.ts.map +1 -1
- package/dist/esm/models/components/emailpreferences.js +4 -0
- package/dist/esm/models/components/emailpreferences.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/userdetails.d.ts +4 -0
- package/dist/esm/models/components/userdetails.d.ts.map +1 -1
- package/dist/esm/models/components/userdetails.js.map +1 -1
- package/dist/esm/models/components/vendor.d.ts +4 -0
- package/dist/esm/models/components/vendor.d.ts.map +1 -1
- package/dist/esm/models/components/vendor.js +2 -0
- package/dist/esm/models/components/vendor.js.map +1 -1
- package/dist/esm/models/components/vendorpaymentresponsibilityassignments.d.ts +0 -14
- package/dist/esm/models/components/vendorpaymentresponsibilityassignments.d.ts.map +1 -1
- package/dist/esm/models/components/vendorpaymentresponsibilityassignments.js +0 -4
- package/dist/esm/models/components/vendorpaymentresponsibilityassignments.js.map +1 -1
- package/dist/esm/models/operations/listcompanycredits.d.ts +6 -41
- package/dist/esm/models/operations/listcompanycredits.d.ts.map +1 -1
- package/dist/esm/models/operations/listcompanycredits.js +5 -31
- package/dist/esm/models/operations/listcompanycredits.js.map +1 -1
- package/dist/esm/models/operations/listvendorcredits.d.ts +4 -0
- package/dist/esm/models/operations/listvendorcredits.d.ts.map +1 -1
- package/dist/esm/models/operations/listvendorcredits.js +6 -0
- package/dist/esm/models/operations/listvendorcredits.js.map +1 -1
- package/dist/esm/models/operations/updateuser.d.ts +4 -0
- package/dist/esm/models/operations/updateuser.d.ts.map +1 -1
- package/dist/esm/models/operations/updateuser.js.map +1 -1
- package/dist/esm/models/operations/updatevendorpaymentresponsibility.d.ts +0 -10
- package/dist/esm/models/operations/updatevendorpaymentresponsibility.d.ts.map +1 -1
- package/dist/esm/models/operations/updatevendorpaymentresponsibility.js +0 -4
- package/dist/esm/models/operations/updatevendorpaymentresponsibility.js.map +1 -1
- package/dist/esm/react-query/usersGetCurrentUser.d.ts +2 -2
- package/dist/esm/react-query/usersGetCurrentUser.js +2 -2
- package/dist/esm/react-query/usersGetUserById.d.ts +2 -2
- package/dist/esm/react-query/usersGetUserById.js +2 -2
- package/dist/esm/react-query/vendorsListVendorCredits.d.ts +4 -4
- package/dist/esm/react-query/vendorsListVendorCredits.js +4 -4
- package/dist/esm/sdk/users.d.ts +2 -2
- package/dist/esm/sdk/users.js +2 -2
- package/dist/esm/sdk/vendors.d.ts +1 -1
- package/dist/esm/sdk/vendors.js +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/companies.test.ts +1 -0
- package/src/__tests__/vendors.test.ts +1 -0
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +17 -14
- package/src/funcs/usersGetCurrentUser.ts +1 -1
- package/src/funcs/usersGetUserById.ts +1 -1
- package/src/funcs/vendorsListVendorCredits.ts +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/http.ts +3 -1
- package/src/lib/security.ts +10 -5
- package/src/models/components/credit.ts +84 -9
- package/src/models/components/creditentitysummary.ts +45 -0
- package/src/models/components/emailpreferences.ts +13 -0
- package/src/models/components/index.ts +1 -0
- package/src/models/components/userdetails.ts +4 -0
- package/src/models/components/vendor.ts +6 -0
- package/src/models/components/vendorpaymentresponsibilityassignments.ts +0 -18
- package/src/models/operations/listcompanycredits.ts +12 -73
- package/src/models/operations/listvendorcredits.ts +10 -0
- package/src/models/operations/updateuser.ts +4 -0
- package/src/models/operations/updatevendorpaymentresponsibility.ts +0 -14
- package/src/react-query/usersGetCurrentUser.ts +2 -2
- package/src/react-query/usersGetUserById.ts +2 -2
- package/src/react-query/vendorsListVendorCredits.ts +4 -4
- package/src/sdk/users.ts +2 -2
- package/src/sdk/vendors.ts +1 -1
package/src/lib/http.ts
CHANGED
|
@@ -45,8 +45,10 @@ export class HTTPClient {
|
|
|
45
45
|
private requestHooks: BeforeRequestHook[] = [];
|
|
46
46
|
private requestErrorHooks: RequestErrorHook[] = [];
|
|
47
47
|
private responseHooks: ResponseHook[] = [];
|
|
48
|
+
private options: HTTPClientOptions;
|
|
48
49
|
|
|
49
|
-
constructor(
|
|
50
|
+
constructor(options: HTTPClientOptions = {}) {
|
|
51
|
+
this.options = options;
|
|
50
52
|
this.fetcher = options.fetcher || DEFAULT_FETCHER;
|
|
51
53
|
}
|
|
52
54
|
|
package/src/lib/security.ts
CHANGED
|
@@ -13,17 +13,22 @@ type OAuth2PasswordFlow = {
|
|
|
13
13
|
tokenURL: string;
|
|
14
14
|
};
|
|
15
15
|
|
|
16
|
-
export
|
|
17
|
-
Incomplete
|
|
18
|
-
UnrecognisedSecurityType
|
|
19
|
-
}
|
|
16
|
+
export const SecurityErrorCode = {
|
|
17
|
+
Incomplete: "incomplete",
|
|
18
|
+
UnrecognisedSecurityType: "unrecognized_security_type",
|
|
19
|
+
} as const;
|
|
20
|
+
export type SecurityErrorCode =
|
|
21
|
+
(typeof SecurityErrorCode)[keyof typeof SecurityErrorCode];
|
|
20
22
|
|
|
21
23
|
export class SecurityError extends Error {
|
|
24
|
+
public code: SecurityErrorCode;
|
|
25
|
+
|
|
22
26
|
constructor(
|
|
23
|
-
|
|
27
|
+
code: SecurityErrorCode,
|
|
24
28
|
message: string,
|
|
25
29
|
) {
|
|
26
30
|
super(message);
|
|
31
|
+
this.code = code;
|
|
27
32
|
this.name = "SecurityError";
|
|
28
33
|
}
|
|
29
34
|
|
|
@@ -10,6 +10,10 @@ import { OpenEnum } from "../../types/enums.js";
|
|
|
10
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
11
|
import * as types from "../../types/primitives.js";
|
|
12
12
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
|
+
import {
|
|
14
|
+
CreditEntitySummary,
|
|
15
|
+
CreditEntitySummary$inboundSchema,
|
|
16
|
+
} from "./creditentitysummary.js";
|
|
13
17
|
|
|
14
18
|
export const Action = {
|
|
15
19
|
Credit: "credit",
|
|
@@ -18,21 +22,91 @@ export const Action = {
|
|
|
18
22
|
} as const;
|
|
19
23
|
export type Action = OpenEnum<typeof Action>;
|
|
20
24
|
|
|
25
|
+
export type CreditsAndDebits = {
|
|
26
|
+
/**
|
|
27
|
+
* Compact entity reference by default (`id`, `name`); becomes the entity's full payload when the corresponding `expand` value is requested.
|
|
28
|
+
*/
|
|
29
|
+
entity?: CreditEntitySummary | null | undefined;
|
|
30
|
+
invoiceNumber?: string | null | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type Transfers = {
|
|
34
|
+
/**
|
|
35
|
+
* Compact entity reference by default (`id`, `name`); becomes the entity's full payload when the corresponding `expand` value is requested.
|
|
36
|
+
*/
|
|
37
|
+
fromEntity?: CreditEntitySummary | null | undefined;
|
|
38
|
+
/**
|
|
39
|
+
* Compact entity reference by default (`id`, `name`); becomes the entity's full payload when the corresponding `expand` value is requested.
|
|
40
|
+
*/
|
|
41
|
+
toEntity?: CreditEntitySummary | null | undefined;
|
|
42
|
+
};
|
|
43
|
+
|
|
21
44
|
export type Credit = {
|
|
22
45
|
id?: number | undefined;
|
|
23
46
|
date?: string | null | undefined;
|
|
24
47
|
action?: Action | undefined;
|
|
25
48
|
amount?: number | undefined;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Account balance immediately after this transaction (running balance at this point in the ledger). Not the account's current overall balance — see `credit_balance` on the list response for that.
|
|
51
|
+
*/
|
|
52
|
+
balance?: number | null | undefined;
|
|
53
|
+
creditsAndDebits?: CreditsAndDebits | undefined;
|
|
54
|
+
transfers?: Transfers | undefined;
|
|
30
55
|
};
|
|
31
56
|
|
|
32
57
|
/** @internal */
|
|
33
58
|
export const Action$inboundSchema: z.ZodType<Action, z.ZodTypeDef, unknown> =
|
|
34
59
|
openEnums.inboundSchema(Action);
|
|
35
60
|
|
|
61
|
+
/** @internal */
|
|
62
|
+
export const CreditsAndDebits$inboundSchema: z.ZodType<
|
|
63
|
+
CreditsAndDebits,
|
|
64
|
+
z.ZodTypeDef,
|
|
65
|
+
unknown
|
|
66
|
+
> = z.object({
|
|
67
|
+
entity: z.nullable(CreditEntitySummary$inboundSchema).optional(),
|
|
68
|
+
invoice_number: z.nullable(types.string()).optional(),
|
|
69
|
+
}).transform((v) => {
|
|
70
|
+
return remap$(v, {
|
|
71
|
+
"invoice_number": "invoiceNumber",
|
|
72
|
+
});
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
export function creditsAndDebitsFromJSON(
|
|
76
|
+
jsonString: string,
|
|
77
|
+
): SafeParseResult<CreditsAndDebits, SDKValidationError> {
|
|
78
|
+
return safeParse(
|
|
79
|
+
jsonString,
|
|
80
|
+
(x) => CreditsAndDebits$inboundSchema.parse(JSON.parse(x)),
|
|
81
|
+
`Failed to parse 'CreditsAndDebits' from JSON`,
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/** @internal */
|
|
86
|
+
export const Transfers$inboundSchema: z.ZodType<
|
|
87
|
+
Transfers,
|
|
88
|
+
z.ZodTypeDef,
|
|
89
|
+
unknown
|
|
90
|
+
> = z.object({
|
|
91
|
+
from_entity: z.nullable(CreditEntitySummary$inboundSchema).optional(),
|
|
92
|
+
to_entity: z.nullable(CreditEntitySummary$inboundSchema).optional(),
|
|
93
|
+
}).transform((v) => {
|
|
94
|
+
return remap$(v, {
|
|
95
|
+
"from_entity": "fromEntity",
|
|
96
|
+
"to_entity": "toEntity",
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
export function transfersFromJSON(
|
|
101
|
+
jsonString: string,
|
|
102
|
+
): SafeParseResult<Transfers, SDKValidationError> {
|
|
103
|
+
return safeParse(
|
|
104
|
+
jsonString,
|
|
105
|
+
(x) => Transfers$inboundSchema.parse(JSON.parse(x)),
|
|
106
|
+
`Failed to parse 'Transfers' from JSON`,
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
36
110
|
/** @internal */
|
|
37
111
|
export const Credit$inboundSchema: z.ZodType<Credit, z.ZodTypeDef, unknown> = z
|
|
38
112
|
.object({
|
|
@@ -40,13 +114,14 @@ export const Credit$inboundSchema: z.ZodType<Credit, z.ZodTypeDef, unknown> = z
|
|
|
40
114
|
date: z.nullable(types.string()).optional(),
|
|
41
115
|
action: types.optional(Action$inboundSchema),
|
|
42
116
|
amount: types.optional(types.number()),
|
|
43
|
-
balance:
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
117
|
+
balance: z.nullable(types.number()).optional(),
|
|
118
|
+
credits_and_debits: types.optional(
|
|
119
|
+
z.lazy(() => CreditsAndDebits$inboundSchema),
|
|
120
|
+
),
|
|
121
|
+
transfers: types.optional(z.lazy(() => Transfers$inboundSchema)),
|
|
47
122
|
}).transform((v) => {
|
|
48
123
|
return remap$(v, {
|
|
49
|
-
"
|
|
124
|
+
"credits_and_debits": "creditsAndDebits",
|
|
50
125
|
});
|
|
51
126
|
});
|
|
52
127
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import {
|
|
7
|
+
collectExtraKeys as collectExtraKeys$,
|
|
8
|
+
safeParse,
|
|
9
|
+
} from "../../lib/schemas.js";
|
|
10
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
|
+
import * as types from "../../types/primitives.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Compact entity reference by default (`id`, `name`); becomes the entity's full payload when the corresponding `expand` value is requested.
|
|
16
|
+
*/
|
|
17
|
+
export type CreditEntitySummary = {
|
|
18
|
+
id?: number | undefined;
|
|
19
|
+
name?: string | null | undefined;
|
|
20
|
+
additionalProperties?: { [k: string]: any } | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const CreditEntitySummary$inboundSchema: z.ZodType<
|
|
25
|
+
CreditEntitySummary,
|
|
26
|
+
z.ZodTypeDef,
|
|
27
|
+
unknown
|
|
28
|
+
> = collectExtraKeys$(
|
|
29
|
+
z.object({
|
|
30
|
+
id: types.optional(types.number()),
|
|
31
|
+
name: z.nullable(types.string()).optional(),
|
|
32
|
+
}).catchall(z.any()),
|
|
33
|
+
"additionalProperties",
|
|
34
|
+
true,
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
export function creditEntitySummaryFromJSON(
|
|
38
|
+
jsonString: string,
|
|
39
|
+
): SafeParseResult<CreditEntitySummary, SDKValidationError> {
|
|
40
|
+
return safeParse(
|
|
41
|
+
jsonString,
|
|
42
|
+
(x) => CreditEntitySummary$inboundSchema.parse(JSON.parse(x)),
|
|
43
|
+
`Failed to parse 'CreditEntitySummary' from JSON`,
|
|
44
|
+
);
|
|
45
|
+
}
|
|
@@ -30,6 +30,10 @@ export type NotificationRecipients = OpenEnum<typeof NotificationRecipients>;
|
|
|
30
30
|
* Replaces the legacy vendor-side fields `email_recepient` and
|
|
31
31
|
* `send_weekly_summary_email`, which remain on the Vendor object during
|
|
32
32
|
* the migration window but are deprecated.
|
|
33
|
+
*
|
|
34
|
+
* `receive_vendor_emails` is company-manager-only and is stored on the
|
|
35
|
+
* CompanyManager record rather than the User, but is exposed here
|
|
36
|
+
* alongside the other preferences for a single read/write shape.
|
|
33
37
|
*/
|
|
34
38
|
export type EmailPreferences = {
|
|
35
39
|
/**
|
|
@@ -50,6 +54,10 @@ export type EmailPreferences = {
|
|
|
50
54
|
* Whether the user receives the weekly credentialing status summary email.
|
|
51
55
|
*/
|
|
52
56
|
sendWeeklyCredentialingStatusEmail?: boolean | undefined;
|
|
57
|
+
/**
|
|
58
|
+
* Company-manager-only preference: whether this manager receives a copy of vendor-related notification emails (credential approvals, declines, expirations, etc.) for their company's vendors. Omitted for non-company-manager users. Also depends on each individual vendor's own `notification_recipients` setting including the company manager as a recipient — both must be true for this manager to actually receive a given vendor's emails.
|
|
59
|
+
*/
|
|
60
|
+
receiveVendorEmails?: boolean | undefined;
|
|
53
61
|
};
|
|
54
62
|
|
|
55
63
|
/** @internal */
|
|
@@ -75,12 +83,14 @@ export const EmailPreferences$inboundSchema: z.ZodType<
|
|
|
75
83
|
.optional(),
|
|
76
84
|
send_weekly_summary_email: types.optional(types.boolean()),
|
|
77
85
|
send_weekly_credentialing_status_email: types.optional(types.boolean()),
|
|
86
|
+
receive_vendor_emails: types.optional(types.boolean()),
|
|
78
87
|
}).transform((v) => {
|
|
79
88
|
return remap$(v, {
|
|
80
89
|
"notification_recipients": "notificationRecipients",
|
|
81
90
|
"send_weekly_summary_email": "sendWeeklySummaryEmail",
|
|
82
91
|
"send_weekly_credentialing_status_email":
|
|
83
92
|
"sendWeeklyCredentialingStatusEmail",
|
|
93
|
+
"receive_vendor_emails": "receiveVendorEmails",
|
|
84
94
|
});
|
|
85
95
|
});
|
|
86
96
|
/** @internal */
|
|
@@ -88,6 +98,7 @@ export type EmailPreferences$Outbound = {
|
|
|
88
98
|
notification_recipients?: string | null | undefined;
|
|
89
99
|
send_weekly_summary_email?: boolean | undefined;
|
|
90
100
|
send_weekly_credentialing_status_email?: boolean | undefined;
|
|
101
|
+
receive_vendor_emails?: boolean | undefined;
|
|
91
102
|
};
|
|
92
103
|
|
|
93
104
|
/** @internal */
|
|
@@ -100,12 +111,14 @@ export const EmailPreferences$outboundSchema: z.ZodType<
|
|
|
100
111
|
.optional(),
|
|
101
112
|
sendWeeklySummaryEmail: z.boolean().optional(),
|
|
102
113
|
sendWeeklyCredentialingStatusEmail: z.boolean().optional(),
|
|
114
|
+
receiveVendorEmails: z.boolean().optional(),
|
|
103
115
|
}).transform((v) => {
|
|
104
116
|
return remap$(v, {
|
|
105
117
|
notificationRecipients: "notification_recipients",
|
|
106
118
|
sendWeeklySummaryEmail: "send_weekly_summary_email",
|
|
107
119
|
sendWeeklyCredentialingStatusEmail:
|
|
108
120
|
"send_weekly_credentialing_status_email",
|
|
121
|
+
receiveVendorEmails: "receive_vendor_emails",
|
|
109
122
|
});
|
|
110
123
|
});
|
|
111
124
|
|
|
@@ -19,6 +19,7 @@ export * from "./credential.js";
|
|
|
19
19
|
export * from "./credentialdocument.js";
|
|
20
20
|
export * from "./credentialstatus.js";
|
|
21
21
|
export * from "./credit.js";
|
|
22
|
+
export * from "./creditentitysummary.js";
|
|
22
23
|
export * from "./csvexportenqueuedresponse.js";
|
|
23
24
|
export * from "./csvexportstatusresponse.js";
|
|
24
25
|
export * from "./datarequest.js";
|
|
@@ -107,6 +107,10 @@ export type UserDetails = {
|
|
|
107
107
|
* Replaces the legacy vendor-side fields `email_recepient` and
|
|
108
108
|
* `send_weekly_summary_email`, which remain on the Vendor object during
|
|
109
109
|
* the migration window but are deprecated.
|
|
110
|
+
*
|
|
111
|
+
* `receive_vendor_emails` is company-manager-only and is stored on the
|
|
112
|
+
* CompanyManager record rather than the User, but is exposed here
|
|
113
|
+
* alongside the other preferences for a single read/write shape.
|
|
110
114
|
*/
|
|
111
115
|
emailPreferences?: EmailPreferences | undefined;
|
|
112
116
|
/**
|
|
@@ -131,6 +131,10 @@ export type Vendor = {
|
|
|
131
131
|
*/
|
|
132
132
|
sendWeeklySummaryEmail?: boolean | null | undefined;
|
|
133
133
|
title?: string | null | undefined;
|
|
134
|
+
/**
|
|
135
|
+
* The vendor's primary sales state as a 2-letter US state code (e.g. `TX`), sourced from the vendor's `territory` column.
|
|
136
|
+
*/
|
|
137
|
+
primarySalesState?: string | null | undefined;
|
|
134
138
|
hasEmeraldStatus?: boolean | null | undefined;
|
|
135
139
|
user?: One | number | undefined;
|
|
136
140
|
registrationData?: { [k: string]: any } | null | undefined;
|
|
@@ -440,6 +444,7 @@ export const Vendor$inboundSchema: z.ZodType<Vendor, z.ZodTypeDef, unknown> = z
|
|
|
440
444
|
email_recepient: z.nullable(types.string()).optional(),
|
|
441
445
|
send_weekly_summary_email: z.nullable(types.boolean()).optional(),
|
|
442
446
|
title: z.nullable(types.string()).optional(),
|
|
447
|
+
primary_sales_state: z.nullable(types.string()).optional(),
|
|
443
448
|
has_emerald_status: z.nullable(types.boolean()).optional(),
|
|
444
449
|
user: types.optional(
|
|
445
450
|
smartUnion([z.lazy(() => One$inboundSchema), types.number()]),
|
|
@@ -497,6 +502,7 @@ export const Vendor$inboundSchema: z.ZodType<Vendor, z.ZodTypeDef, unknown> = z
|
|
|
497
502
|
return remap$(v, {
|
|
498
503
|
"email_recepient": "emailRecepient",
|
|
499
504
|
"send_weekly_summary_email": "sendWeeklySummaryEmail",
|
|
505
|
+
"primary_sales_state": "primarySalesState",
|
|
500
506
|
"has_emerald_status": "hasEmeraldStatus",
|
|
501
507
|
"registration_data": "registrationData",
|
|
502
508
|
"registration_finished": "registrationFinished",
|
|
@@ -36,20 +36,6 @@ export type VendorPaymentResponsibilityAssignments = {
|
|
|
36
36
|
* payments. `null` means the vendor is responsible.
|
|
37
37
|
*/
|
|
38
38
|
credentialingSubscriptionUserId?: number | null | undefined;
|
|
39
|
-
/**
|
|
40
|
-
* User ID responsible for Scrubs Subscription payments.
|
|
41
|
-
*
|
|
42
|
-
* @remarks
|
|
43
|
-
* `null` means the vendor is responsible.
|
|
44
|
-
*/
|
|
45
|
-
scrubsSubscriptionUserId?: number | null | undefined;
|
|
46
|
-
/**
|
|
47
|
-
* User ID responsible for Scrub Credits payments.
|
|
48
|
-
*
|
|
49
|
-
* @remarks
|
|
50
|
-
* `null` means the vendor is responsible.
|
|
51
|
-
*/
|
|
52
|
-
scrubCreditsUserId?: number | null | undefined;
|
|
53
39
|
/**
|
|
54
40
|
* User ID responsible for Initial Hard Badge payments.
|
|
55
41
|
*
|
|
@@ -83,8 +69,6 @@ export const VendorPaymentResponsibilityAssignments$inboundSchema: z.ZodType<
|
|
|
83
69
|
vendor_id: types.number(),
|
|
84
70
|
company_id: z.nullable(types.number()).optional(),
|
|
85
71
|
credentialing_subscription_user_id: z.nullable(types.number()).optional(),
|
|
86
|
-
scrubs_subscription_user_id: z.nullable(types.number()).optional(),
|
|
87
|
-
scrub_credits_user_id: z.nullable(types.number()).optional(),
|
|
88
72
|
hard_badge_initial_user_id: z.nullable(types.number()).optional(),
|
|
89
73
|
hard_badge_extra_user_id: z.nullable(types.number()).optional(),
|
|
90
74
|
other_invoices_user_id: z.nullable(types.number()).optional(),
|
|
@@ -93,8 +77,6 @@ export const VendorPaymentResponsibilityAssignments$inboundSchema: z.ZodType<
|
|
|
93
77
|
"vendor_id": "vendorId",
|
|
94
78
|
"company_id": "companyId",
|
|
95
79
|
"credentialing_subscription_user_id": "credentialingSubscriptionUserId",
|
|
96
|
-
"scrubs_subscription_user_id": "scrubsSubscriptionUserId",
|
|
97
|
-
"scrub_credits_user_id": "scrubCreditsUserId",
|
|
98
80
|
"hard_badge_initial_user_id": "hardBadgeInitialUserId",
|
|
99
81
|
"hard_badge_extra_user_id": "hardBadgeExtraUserId",
|
|
100
82
|
"other_invoices_user_id": "otherInvoicesUserId",
|
|
@@ -5,8 +5,7 @@
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import
|
|
9
|
-
import { ClosedEnum, OpenEnum } from "../../types/enums.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
10
9
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
10
|
import * as types from "../../types/primitives.js";
|
|
12
11
|
import * as components from "../components/index.js";
|
|
@@ -57,36 +56,6 @@ export type ListCompanyCreditsRequest = {
|
|
|
57
56
|
expand?: Array<components.Expand> | undefined;
|
|
58
57
|
};
|
|
59
58
|
|
|
60
|
-
export const Action = {
|
|
61
|
-
Credit: "credit",
|
|
62
|
-
Debit: "debit",
|
|
63
|
-
Transfer: "transfer",
|
|
64
|
-
} as const;
|
|
65
|
-
export type Action = OpenEnum<typeof Action>;
|
|
66
|
-
|
|
67
|
-
export type ListCompanyCreditsItems = {
|
|
68
|
-
id?: number | undefined;
|
|
69
|
-
date?: string | null | undefined;
|
|
70
|
-
action?: Action | undefined;
|
|
71
|
-
amount?: number | undefined;
|
|
72
|
-
balance?: number | undefined;
|
|
73
|
-
from?: string | null | undefined;
|
|
74
|
-
to?: string | null | undefined;
|
|
75
|
-
invoiceNumber?: string | null | undefined;
|
|
76
|
-
/**
|
|
77
|
-
* Expanded entity payload when `expand=entity` is requested.
|
|
78
|
-
*/
|
|
79
|
-
entity?: { [k: string]: any } | undefined;
|
|
80
|
-
/**
|
|
81
|
-
* Expanded source entity payload when `expand=from_entity` is requested.
|
|
82
|
-
*/
|
|
83
|
-
fromEntity?: { [k: string]: any } | undefined;
|
|
84
|
-
/**
|
|
85
|
-
* Expanded destination entity payload when `expand=to_entity` is requested.
|
|
86
|
-
*/
|
|
87
|
-
toEntity?: { [k: string]: any } | undefined;
|
|
88
|
-
};
|
|
89
|
-
|
|
90
59
|
/**
|
|
91
60
|
* The request was successful, and the server has returned the requested resource in the response body.
|
|
92
61
|
*
|
|
@@ -103,7 +72,11 @@ export type ListCompanyCreditsListCompanyCreditsOk = {
|
|
|
103
72
|
* Pagination information for a pageable list
|
|
104
73
|
*/
|
|
105
74
|
pager: components.Pager;
|
|
106
|
-
items: Array<
|
|
75
|
+
items: Array<components.Credit>;
|
|
76
|
+
/**
|
|
77
|
+
* Current overall balance of the company's account (not tied to a specific transaction).
|
|
78
|
+
*/
|
|
79
|
+
creditBalance: number;
|
|
107
80
|
};
|
|
108
81
|
|
|
109
82
|
export type ListCompanyCreditsResponse = {
|
|
@@ -151,45 +124,6 @@ export function listCompanyCreditsRequestToJSON(
|
|
|
151
124
|
);
|
|
152
125
|
}
|
|
153
126
|
|
|
154
|
-
/** @internal */
|
|
155
|
-
export const Action$inboundSchema: z.ZodType<Action, z.ZodTypeDef, unknown> =
|
|
156
|
-
openEnums.inboundSchema(Action);
|
|
157
|
-
|
|
158
|
-
/** @internal */
|
|
159
|
-
export const ListCompanyCreditsItems$inboundSchema: z.ZodType<
|
|
160
|
-
ListCompanyCreditsItems,
|
|
161
|
-
z.ZodTypeDef,
|
|
162
|
-
unknown
|
|
163
|
-
> = z.object({
|
|
164
|
-
id: types.optional(types.number()),
|
|
165
|
-
date: z.nullable(types.string()).optional(),
|
|
166
|
-
action: types.optional(Action$inboundSchema),
|
|
167
|
-
amount: types.optional(types.number()),
|
|
168
|
-
balance: types.optional(types.number()),
|
|
169
|
-
from: z.nullable(types.string()).optional(),
|
|
170
|
-
to: z.nullable(types.string()).optional(),
|
|
171
|
-
invoice_number: z.nullable(types.string()).optional(),
|
|
172
|
-
entity: types.optional(z.record(z.any())),
|
|
173
|
-
from_entity: types.optional(z.record(z.any())),
|
|
174
|
-
to_entity: types.optional(z.record(z.any())),
|
|
175
|
-
}).transform((v) => {
|
|
176
|
-
return remap$(v, {
|
|
177
|
-
"invoice_number": "invoiceNumber",
|
|
178
|
-
"from_entity": "fromEntity",
|
|
179
|
-
"to_entity": "toEntity",
|
|
180
|
-
});
|
|
181
|
-
});
|
|
182
|
-
|
|
183
|
-
export function listCompanyCreditsItemsFromJSON(
|
|
184
|
-
jsonString: string,
|
|
185
|
-
): SafeParseResult<ListCompanyCreditsItems, SDKValidationError> {
|
|
186
|
-
return safeParse(
|
|
187
|
-
jsonString,
|
|
188
|
-
(x) => ListCompanyCreditsItems$inboundSchema.parse(JSON.parse(x)),
|
|
189
|
-
`Failed to parse 'ListCompanyCreditsItems' from JSON`,
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
|
|
193
127
|
/** @internal */
|
|
194
128
|
export const ListCompanyCreditsListCompanyCreditsOk$inboundSchema: z.ZodType<
|
|
195
129
|
ListCompanyCreditsListCompanyCreditsOk,
|
|
@@ -197,7 +131,12 @@ export const ListCompanyCreditsListCompanyCreditsOk$inboundSchema: z.ZodType<
|
|
|
197
131
|
unknown
|
|
198
132
|
> = z.object({
|
|
199
133
|
pager: components.Pager$inboundSchema,
|
|
200
|
-
items: z.array(
|
|
134
|
+
items: z.array(components.Credit$inboundSchema),
|
|
135
|
+
credit_balance: types.number(),
|
|
136
|
+
}).transform((v) => {
|
|
137
|
+
return remap$(v, {
|
|
138
|
+
"credit_balance": "creditBalance",
|
|
139
|
+
});
|
|
201
140
|
});
|
|
202
141
|
|
|
203
142
|
export function listCompanyCreditsListCompanyCreditsOkFromJSON(
|
|
@@ -6,6 +6,7 @@ import * as z from "zod/v3";
|
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
9
10
|
import * as components from "../components/index.js";
|
|
10
11
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
12
|
|
|
@@ -47,6 +48,10 @@ export type ListVendorCreditsListVendorCreditsOk = {
|
|
|
47
48
|
* Pagination information for a pageable list
|
|
48
49
|
*/
|
|
49
50
|
pager: components.Pager;
|
|
51
|
+
/**
|
|
52
|
+
* Current overall balance of the vendor's account (not tied to a specific transaction).
|
|
53
|
+
*/
|
|
54
|
+
creditBalance: number;
|
|
50
55
|
};
|
|
51
56
|
|
|
52
57
|
export type ListVendorCreditsResponse = {
|
|
@@ -96,6 +101,11 @@ export const ListVendorCreditsListVendorCreditsOk$inboundSchema: z.ZodType<
|
|
|
96
101
|
> = z.object({
|
|
97
102
|
items: z.array(components.Credit$inboundSchema),
|
|
98
103
|
pager: components.Pager$inboundSchema,
|
|
104
|
+
credit_balance: types.number(),
|
|
105
|
+
}).transform((v) => {
|
|
106
|
+
return remap$(v, {
|
|
107
|
+
"credit_balance": "creditBalance",
|
|
108
|
+
});
|
|
99
109
|
});
|
|
100
110
|
|
|
101
111
|
export function listVendorCreditsListVendorCreditsOkFromJSON(
|
|
@@ -38,6 +38,10 @@ export type UpdateUserRequestBody = {
|
|
|
38
38
|
* Replaces the legacy vendor-side fields `email_recepient` and
|
|
39
39
|
* `send_weekly_summary_email`, which remain on the Vendor object during
|
|
40
40
|
* the migration window but are deprecated.
|
|
41
|
+
*
|
|
42
|
+
* `receive_vendor_emails` is company-manager-only and is stored on the
|
|
43
|
+
* CompanyManager record rather than the User, but is exposed here
|
|
44
|
+
* alongside the other preferences for a single read/write shape.
|
|
41
45
|
*/
|
|
42
46
|
emailPreferences?: components.EmailPreferences | undefined;
|
|
43
47
|
};
|
|
@@ -15,14 +15,6 @@ export type UpdateVendorPaymentResponsibilityRequestBody = {
|
|
|
15
15
|
* User ID responsible for Credentialing Subscription & Expediting payments. Pass `null` to reset responsibility to the vendor.
|
|
16
16
|
*/
|
|
17
17
|
credentialingSubscriptionUserId?: number | null | undefined;
|
|
18
|
-
/**
|
|
19
|
-
* User ID responsible for Scrubs Subscription payments. Pass `null` to reset responsibility to the vendor.
|
|
20
|
-
*/
|
|
21
|
-
scrubsSubscriptionUserId?: number | null | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* User ID responsible for Scrub Credits payments. Pass `null` to reset responsibility to the vendor.
|
|
24
|
-
*/
|
|
25
|
-
scrubCreditsUserId?: number | null | undefined;
|
|
26
18
|
/**
|
|
27
19
|
* User ID responsible for Initial Hard Badge payments. Pass `null` to reset responsibility to the vendor.
|
|
28
20
|
*/
|
|
@@ -65,8 +57,6 @@ export type UpdateVendorPaymentResponsibilityUpdateVendorPaymentResponsibilityOk
|
|
|
65
57
|
/** @internal */
|
|
66
58
|
export type UpdateVendorPaymentResponsibilityRequestBody$Outbound = {
|
|
67
59
|
credentialing_subscription_user_id?: number | null | undefined;
|
|
68
|
-
scrubs_subscription_user_id?: number | null | undefined;
|
|
69
|
-
scrub_credits_user_id?: number | null | undefined;
|
|
70
60
|
hard_badge_initial_user_id?: number | null | undefined;
|
|
71
61
|
hard_badge_extra_user_id?: number | null | undefined;
|
|
72
62
|
other_invoices_user_id?: number | null | undefined;
|
|
@@ -80,16 +70,12 @@ export const UpdateVendorPaymentResponsibilityRequestBody$outboundSchema:
|
|
|
80
70
|
UpdateVendorPaymentResponsibilityRequestBody
|
|
81
71
|
> = z.object({
|
|
82
72
|
credentialingSubscriptionUserId: z.nullable(z.number().int()).optional(),
|
|
83
|
-
scrubsSubscriptionUserId: z.nullable(z.number().int()).optional(),
|
|
84
|
-
scrubCreditsUserId: z.nullable(z.number().int()).optional(),
|
|
85
73
|
hardBadgeInitialUserId: z.nullable(z.number().int()).optional(),
|
|
86
74
|
hardBadgeExtraUserId: z.nullable(z.number().int()).optional(),
|
|
87
75
|
otherInvoicesUserId: z.nullable(z.number().int()).optional(),
|
|
88
76
|
}).transform((v) => {
|
|
89
77
|
return remap$(v, {
|
|
90
78
|
credentialingSubscriptionUserId: "credentialing_subscription_user_id",
|
|
91
|
-
scrubsSubscriptionUserId: "scrubs_subscription_user_id",
|
|
92
|
-
scrubCreditsUserId: "scrub_credits_user_id",
|
|
93
79
|
hardBadgeInitialUserId: "hard_badge_initial_user_id",
|
|
94
80
|
hardBadgeExtraUserId: "hard_badge_extra_user_id",
|
|
95
81
|
otherInvoicesUserId: "other_invoices_user_id",
|
|
@@ -64,7 +64,7 @@ export type UsersGetCurrentUserQueryError =
|
|
|
64
64
|
*
|
|
65
65
|
* Supported `expand` values:
|
|
66
66
|
* - `user` — return the full user record, including all profile fields stored against the user (sensitive columns such as passwords, MFA codes, and payment-provider IDs are always omitted)
|
|
67
|
-
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients
|
|
67
|
+
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients, weekly email flags, and — for company managers — `receive_vendor_emails`)
|
|
68
68
|
* - `user.payment_profile` — include the user's `payment_profile` block (card type, last four digits, validity flags) when expanded; if no payment profile is associated with the user, the response returns `payment_profile: null`
|
|
69
69
|
* - `company.location`, `company.vendor_type_restrictions`, `company.vendor_fields` — only valid for Company Manager users; embed extra fields on the user's company
|
|
70
70
|
*
|
|
@@ -100,7 +100,7 @@ export function useUsersGetCurrentUser(
|
|
|
100
100
|
*
|
|
101
101
|
* Supported `expand` values:
|
|
102
102
|
* - `user` — return the full user record, including all profile fields stored against the user (sensitive columns such as passwords, MFA codes, and payment-provider IDs are always omitted)
|
|
103
|
-
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients
|
|
103
|
+
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients, weekly email flags, and — for company managers — `receive_vendor_emails`)
|
|
104
104
|
* - `user.payment_profile` — include the user's `payment_profile` block (card type, last four digits, validity flags) when expanded; if no payment profile is associated with the user, the response returns `payment_profile: null`
|
|
105
105
|
* - `company.location`, `company.vendor_type_restrictions`, `company.vendor_fields` — only valid for Company Manager users; embed extra fields on the user's company
|
|
106
106
|
*
|
|
@@ -65,7 +65,7 @@ export type UsersGetUserByIdQueryError =
|
|
|
65
65
|
*
|
|
66
66
|
* Supported `expand` values:
|
|
67
67
|
* - `user` — return the full user record (sensitive columns such as passwords and payment-provider IDs are always omitted)
|
|
68
|
-
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients
|
|
68
|
+
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients, weekly email flags, and — for company managers — `receive_vendor_emails`)
|
|
69
69
|
*/
|
|
70
70
|
export function useUsersGetUserById(
|
|
71
71
|
request: operations.GetUserByIdRequest,
|
|
@@ -97,7 +97,7 @@ export function useUsersGetUserById(
|
|
|
97
97
|
*
|
|
98
98
|
* Supported `expand` values:
|
|
99
99
|
* - `user` — return the full user record (sensitive columns such as passwords and payment-provider IDs are always omitted)
|
|
100
|
-
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients
|
|
100
|
+
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients, weekly email flags, and — for company managers — `receive_vendor_emails`)
|
|
101
101
|
*/
|
|
102
102
|
export function useUsersGetUserByIdSuspense(
|
|
103
103
|
request: operations.GetUserByIdRequest,
|
|
@@ -75,7 +75,7 @@ export type VendorsListVendorCreditsQueryError =
|
|
|
75
75
|
* List vendor credits
|
|
76
76
|
*
|
|
77
77
|
* @remarks
|
|
78
|
-
* List the credits for the vendor
|
|
78
|
+
* List the credits for the vendor. Defaults to chronological order (oldest first).
|
|
79
79
|
*/
|
|
80
80
|
export function useVendorsListVendorCredits(
|
|
81
81
|
request: operations.ListVendorCreditsRequest,
|
|
@@ -102,7 +102,7 @@ export function useVendorsListVendorCredits(
|
|
|
102
102
|
* List vendor credits
|
|
103
103
|
*
|
|
104
104
|
* @remarks
|
|
105
|
-
* List the credits for the vendor
|
|
105
|
+
* List the credits for the vendor. Defaults to chronological order (oldest first).
|
|
106
106
|
*/
|
|
107
107
|
export function useVendorsListVendorCreditsSuspense(
|
|
108
108
|
request: operations.ListVendorCreditsRequest,
|
|
@@ -129,7 +129,7 @@ export function useVendorsListVendorCreditsSuspense(
|
|
|
129
129
|
* List vendor credits
|
|
130
130
|
*
|
|
131
131
|
* @remarks
|
|
132
|
-
* List the credits for the vendor
|
|
132
|
+
* List the credits for the vendor. Defaults to chronological order (oldest first).
|
|
133
133
|
*/
|
|
134
134
|
export function useVendorsListVendorCreditsInfinite(
|
|
135
135
|
request: operations.ListVendorCreditsRequest,
|
|
@@ -170,7 +170,7 @@ export function useVendorsListVendorCreditsInfinite(
|
|
|
170
170
|
* List vendor credits
|
|
171
171
|
*
|
|
172
172
|
* @remarks
|
|
173
|
-
* List the credits for the vendor
|
|
173
|
+
* List the credits for the vendor. Defaults to chronological order (oldest first).
|
|
174
174
|
*/
|
|
175
175
|
export function useVendorsListVendorCreditsInfiniteSuspense(
|
|
176
176
|
request: operations.ListVendorCreditsRequest,
|
package/src/sdk/users.ts
CHANGED
|
@@ -31,7 +31,7 @@ export class Users extends ClientSDK {
|
|
|
31
31
|
*
|
|
32
32
|
* Supported `expand` values:
|
|
33
33
|
* - `user` — return the full user record, including all profile fields stored against the user (sensitive columns such as passwords, MFA codes, and payment-provider IDs are always omitted)
|
|
34
|
-
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients
|
|
34
|
+
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients, weekly email flags, and — for company managers — `receive_vendor_emails`)
|
|
35
35
|
* - `user.payment_profile` — include the user's `payment_profile` block (card type, last four digits, validity flags) when expanded; if no payment profile is associated with the user, the response returns `payment_profile: null`
|
|
36
36
|
* - `company.location`, `company.vendor_type_restrictions`, `company.vendor_fields` — only valid for Company Manager users; embed extra fields on the user's company
|
|
37
37
|
*
|
|
@@ -61,7 +61,7 @@ export class Users extends ClientSDK {
|
|
|
61
61
|
*
|
|
62
62
|
* Supported `expand` values:
|
|
63
63
|
* - `user` — return the full user record (sensitive columns such as passwords and payment-provider IDs are always omitted)
|
|
64
|
-
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients
|
|
64
|
+
* - `user.email_preferences` — include the user's `email_preferences` block (notification recipients, weekly email flags, and — for company managers — `receive_vendor_emails`)
|
|
65
65
|
*/
|
|
66
66
|
async getUserById(
|
|
67
67
|
request: operations.GetUserByIdRequest,
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -884,7 +884,7 @@ export class Vendors extends ClientSDK {
|
|
|
884
884
|
* List vendor credits
|
|
885
885
|
*
|
|
886
886
|
* @remarks
|
|
887
|
-
* List the credits for the vendor
|
|
887
|
+
* List the credits for the vendor. Defaults to chronological order (oldest first).
|
|
888
888
|
*/
|
|
889
889
|
async listVendorCredits(
|
|
890
890
|
request: operations.ListVendorCreditsRequest,
|