@greensecurity/javascript-sdk 0.47.0-beta.15 → 0.47.0-beta.17
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 +1 -1
- package/dist/commonjs/__tests__/users.test.js +2 -0
- package/dist/commonjs/__tests__/users.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +1 -1
- package/dist/commonjs/__tests__/webhooks.test.js +5 -4
- package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
- package/dist/commonjs/__tests__/zones.test.js +15 -11
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/admin-funcs/clearVerifications.d.ts +24 -0
- package/dist/commonjs/admin-funcs/clearVerifications.d.ts.map +1 -0
- package/dist/commonjs/admin-funcs/clearVerifications.js +30 -0
- package/dist/commonjs/admin-funcs/clearVerifications.js.map +1 -0
- package/dist/commonjs/admin-funcs/registerGeneralInfo.d.ts +11 -6
- package/dist/commonjs/admin-funcs/registerGeneralInfo.d.ts.map +1 -1
- package/dist/commonjs/admin-funcs/registerGeneralInfo.js.map +1 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts +5 -2
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js +5 -2
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/commonjs/index.extras.d.ts +8 -0
- package/dist/commonjs/index.extras.d.ts.map +1 -1
- package/dist/commonjs/index.extras.js +8 -0
- package/dist/commonjs/index.extras.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/userdetails.d.ts +12 -0
- package/dist/commonjs/models/components/userdetails.d.ts.map +1 -1
- package/dist/commonjs/models/components/userdetails.js +4 -0
- package/dist/commonjs/models/components/userdetails.js.map +1 -1
- package/dist/commonjs/models/components/userlocation.d.ts +5 -0
- package/dist/commonjs/models/components/userlocation.d.ts.map +1 -1
- package/dist/commonjs/models/components/userlocation.js +4 -0
- package/dist/commonjs/models/components/userlocation.js.map +1 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts +5 -2
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js +4 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +4 -1
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +4 -1
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/users.test.js +2 -0
- package/dist/esm/__tests__/users.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +1 -1
- package/dist/esm/__tests__/webhooks.test.js +5 -4
- package/dist/esm/__tests__/webhooks.test.js.map +1 -1
- package/dist/esm/__tests__/zones.test.js +15 -11
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/admin-funcs/clearVerifications.d.ts +24 -0
- package/dist/esm/admin-funcs/clearVerifications.d.ts.map +1 -0
- package/dist/esm/admin-funcs/clearVerifications.js +23 -0
- package/dist/esm/admin-funcs/clearVerifications.js.map +1 -0
- package/dist/esm/admin-funcs/registerGeneralInfo.d.ts +11 -6
- package/dist/esm/admin-funcs/registerGeneralInfo.d.ts.map +1 -1
- package/dist/esm/admin-funcs/registerGeneralInfo.js.map +1 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts +5 -2
- package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.js +5 -2
- package/dist/esm/funcs/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/esm/index.extras.d.ts +8 -0
- package/dist/esm/index.extras.d.ts.map +1 -1
- package/dist/esm/index.extras.js +8 -0
- package/dist/esm/index.extras.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/userdetails.d.ts +12 -0
- package/dist/esm/models/components/userdetails.d.ts.map +1 -1
- package/dist/esm/models/components/userdetails.js +4 -0
- package/dist/esm/models/components/userdetails.js.map +1 -1
- package/dist/esm/models/components/userlocation.d.ts +5 -0
- package/dist/esm/models/components/userlocation.d.ts.map +1 -1
- package/dist/esm/models/components/userlocation.js +4 -0
- package/dist/esm/models/components/userlocation.js.map +1 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts +5 -2
- package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.js +4 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +4 -1
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +4 -1
- package/dist/esm/sdk/vendors.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/__tests__/users.test.ts +2 -0
- package/src/__tests__/vendors.test.ts +1 -1
- package/src/__tests__/webhooks.test.ts +5 -4
- package/src/__tests__/zones.test.ts +15 -11
- package/src/admin-funcs/clearVerifications.ts +42 -0
- package/src/admin-funcs/registerGeneralInfo.ts +11 -6
- package/src/funcs/vendorsUpdateVendorDetails.ts +8 -1
- package/src/index.extras.ts +15 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/userdetails.ts +16 -0
- package/src/models/components/userlocation.ts +9 -0
- package/src/react-query/vendorsUpdateVendorDetails.ts +5 -1
- package/src/sdk/vendors.ts +4 -1
|
@@ -35,9 +35,6 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
35
35
|
useUrlParams: false,
|
|
36
36
|
},
|
|
37
37
|
items: [
|
|
38
|
-
{
|
|
39
|
-
facility: {},
|
|
40
|
-
},
|
|
41
38
|
{
|
|
42
39
|
facility: {
|
|
43
40
|
contacts: {
|
|
@@ -46,26 +43,32 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
46
43
|
department: 123,
|
|
47
44
|
},
|
|
48
45
|
adminContact: {
|
|
49
|
-
status: "
|
|
46
|
+
status: "Active",
|
|
50
47
|
department: 123,
|
|
51
48
|
},
|
|
52
49
|
techContact: {
|
|
53
|
-
status: "
|
|
50
|
+
status: "Inactive",
|
|
54
51
|
department: 123,
|
|
55
52
|
},
|
|
56
53
|
greenSecurityCsm: {
|
|
57
|
-
status: "
|
|
54
|
+
status: "Deleted",
|
|
55
|
+
department: 123,
|
|
56
|
+
},
|
|
57
|
+
accountManager: {
|
|
58
|
+
status: "Inactive",
|
|
58
59
|
department: 123,
|
|
59
60
|
},
|
|
60
|
-
accountManager: null,
|
|
61
61
|
},
|
|
62
62
|
vendorGuestPolicy: {
|
|
63
|
-
enabled:
|
|
63
|
+
enabled: true,
|
|
64
64
|
vendorGuestLimitAndOr: "and",
|
|
65
|
-
vendorGuestRequireEmail:
|
|
65
|
+
vendorGuestRequireEmail: false,
|
|
66
66
|
},
|
|
67
67
|
},
|
|
68
68
|
},
|
|
69
|
+
{
|
|
70
|
+
facility: {},
|
|
71
|
+
},
|
|
69
72
|
],
|
|
70
73
|
});
|
|
71
74
|
});
|
|
@@ -82,8 +85,9 @@ test("Zones Security Zone Checkin", async () => {
|
|
|
82
85
|
});
|
|
83
86
|
|
|
84
87
|
const result = await greenSecurity.zones.securityZoneCheckin({
|
|
85
|
-
|
|
86
|
-
|
|
88
|
+
longitude: 8706.45,
|
|
89
|
+
latitude: 7315.87,
|
|
90
|
+
zoneId: 944641,
|
|
87
91
|
});
|
|
88
92
|
expect(result).toBeDefined();
|
|
89
93
|
expect(result).toEqual({});
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { APIPromise } from "../types/async.js";
|
|
2
|
+
import { $doGetSingle, $doPost, internalApiResult } from "./doAdmin.js";
|
|
3
|
+
|
|
4
|
+
export type ClearVerificationContext = "registration" | "account";
|
|
5
|
+
export type ClearVerificationPlatform = "web" | "native";
|
|
6
|
+
|
|
7
|
+
export type clearCreateSessionRequest = {
|
|
8
|
+
context: ClearVerificationContext;
|
|
9
|
+
platform: ClearVerificationPlatform;
|
|
10
|
+
/** Where CLEAR sends the vendor back; the server adds a `state` parameter. */
|
|
11
|
+
return_url: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export type clearCompleteRequest = {
|
|
15
|
+
/** The `state` CLEAR sent back on the return URL. */
|
|
16
|
+
state: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** Starts a CLEAR verification for the calling vendor. Resolves to `{ verify_url }`. */
|
|
20
|
+
export function clearCreateSession(request: clearCreateSessionRequest): internalApiResult {
|
|
21
|
+
return new APIPromise($doPost("/clear-verifications", request));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Reads the outcome of the session `state` belongs to. Resolves to the vendor's CLEAR summary plus `outcome` and `context`. */
|
|
25
|
+
export function clearComplete(request: clearCompleteRequest): internalApiResult {
|
|
26
|
+
return new APIPromise($doPost("/clear-verifications/complete", request));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** Records that the calling vendor continued without CLEAR. Resolves to the vendor's CLEAR summary. */
|
|
30
|
+
export function clearOptOut(): internalApiResult {
|
|
31
|
+
return new APIPromise($doPost("/clear-verifications/opt-out", {}));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/** The calling vendor's CLEAR summary: `{ status, prefilled_fields, personal_email }`. */
|
|
35
|
+
export function clearGetStatus(): internalApiResult {
|
|
36
|
+
return new APIPromise($doGetSingle("/clear-verifications/status", {}));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/** What the vendor's profile and CLEAR can fill on their background check, SSN included. */
|
|
40
|
+
export function clearGetBackgroundCheckPrefill(): internalApiResult {
|
|
41
|
+
return new APIPromise($doGetSingle("/clear-verifications/background-check-prefill", {}));
|
|
42
|
+
}
|
|
@@ -14,12 +14,17 @@ export type formInputs = {
|
|
|
14
14
|
supervisor_name: string;
|
|
15
15
|
supervisor_email: string;
|
|
16
16
|
supervisor_phone: string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
/** Becomes the login email when it differs from the one the vendor registered with. */
|
|
18
|
+
work_email?: string;
|
|
19
|
+
personal_email?: string;
|
|
20
|
+
work_phone?: string;
|
|
21
|
+
/** Registration no longer collects an address; these remain for older forms. */
|
|
22
|
+
country?: string;
|
|
23
|
+
address1?: string;
|
|
24
|
+
address2?: string;
|
|
25
|
+
city?: string;
|
|
26
|
+
state?: string;
|
|
27
|
+
zip?: string;
|
|
23
28
|
};
|
|
24
29
|
|
|
25
30
|
export function submitGeneralInfo(request: formInputs): internalApiResult {
|
|
@@ -36,12 +36,15 @@ import * as types$ from "../types/primitives.js";
|
|
|
36
36
|
* can also remove the vendor from their company by sending `company_id: null`.
|
|
37
37
|
*
|
|
38
38
|
* From `location` this endpoint reads only `timezone`, `address1`, `address2`,
|
|
39
|
-
* `city`, `state`, `zip`, `phone`, `mobile_phone` and `
|
|
39
|
+
* `city`, `state`, `zip`, `phone`, `mobile_phone`, `fax` and `personal_email`. The `address` and
|
|
40
40
|
* `country` properties of the shared `UserLocation` schema have no effect here, and
|
|
41
41
|
* updating them is not supported. `state` accepts a US state or a Canadian
|
|
42
42
|
* province—the vendor's country, set only at registration, is not editable
|
|
43
43
|
* through this endpoint.
|
|
44
44
|
*
|
|
45
|
+
* `location.personal_email` is stored lowercased, and a value that is not a valid
|
|
46
|
+
* email address, or is longer than 255 characters, gets a `422` response.
|
|
47
|
+
*
|
|
45
48
|
* Submitting `location.zip` or `location.state` cross-checks the postal code
|
|
46
49
|
* against the resulting state (using the vendor's existing value for whichever
|
|
47
50
|
* of the two you omit from the request). The server rejects a code that is not shaped like a real
|
|
@@ -66,6 +69,7 @@ export function vendorsUpdateVendorDetails(
|
|
|
66
69
|
Result<
|
|
67
70
|
boolean,
|
|
68
71
|
| errors.ApiErrorResponse
|
|
72
|
+
| errors.UnprocessableEntityOrValidationError
|
|
69
73
|
| GreenSecurityError
|
|
70
74
|
| ResponseValidationError
|
|
71
75
|
| ConnectionError
|
|
@@ -92,6 +96,7 @@ async function $do(
|
|
|
92
96
|
Result<
|
|
93
97
|
boolean,
|
|
94
98
|
| errors.ApiErrorResponse
|
|
99
|
+
| errors.UnprocessableEntityOrValidationError
|
|
95
100
|
| GreenSecurityError
|
|
96
101
|
| ResponseValidationError
|
|
97
102
|
| ConnectionError
|
|
@@ -181,6 +186,7 @@ async function $do(
|
|
|
181
186
|
const [result] = await M.match<
|
|
182
187
|
boolean,
|
|
183
188
|
| errors.ApiErrorResponse
|
|
189
|
+
| errors.UnprocessableEntityOrValidationError
|
|
184
190
|
| GreenSecurityError
|
|
185
191
|
| ResponseValidationError
|
|
186
192
|
| ConnectionError
|
|
@@ -192,6 +198,7 @@ async function $do(
|
|
|
192
198
|
>(
|
|
193
199
|
M.json(200, types$.boolean()),
|
|
194
200
|
M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
|
|
201
|
+
M.jsonErr(422, errors.UnprocessableEntityOrValidationError$inboundSchema),
|
|
195
202
|
M.fail("4XX"),
|
|
196
203
|
M.fail([500, "5XX"]),
|
|
197
204
|
)(response, req, { extraFields: responseFields });
|
package/src/index.extras.ts
CHANGED
|
@@ -33,6 +33,13 @@ import { submitEmailStep } from "./admin-funcs/registerEmail.js";
|
|
|
33
33
|
import { submitPassword } from "./admin-funcs/registerPassword.js";
|
|
34
34
|
import { submitGeneralInfo } from "./admin-funcs/registerGeneralInfo.js";
|
|
35
35
|
import { submitCompany } from "./admin-funcs/registerCompanies.js";
|
|
36
|
+
import {
|
|
37
|
+
clearComplete,
|
|
38
|
+
clearCreateSession,
|
|
39
|
+
clearGetBackgroundCheckPrefill,
|
|
40
|
+
clearGetStatus,
|
|
41
|
+
clearOptOut,
|
|
42
|
+
} from "./admin-funcs/clearVerifications.js";
|
|
36
43
|
|
|
37
44
|
import { smartBadgePairBadge } from "./admin-funcs/smartBadgePairBadge.js";
|
|
38
45
|
import { smartBadgeUnpairBadge } from "./admin-funcs/smartBadgeUnpairBadge.js";
|
|
@@ -126,6 +133,14 @@ export const __internal = {
|
|
|
126
133
|
submitCompany
|
|
127
134
|
},
|
|
128
135
|
|
|
136
|
+
clear: {
|
|
137
|
+
createSession: clearCreateSession,
|
|
138
|
+
complete: clearComplete,
|
|
139
|
+
optOut: clearOptOut,
|
|
140
|
+
getStatus: clearGetStatus,
|
|
141
|
+
getBackgroundCheckPrefill: clearGetBackgroundCheckPrefill
|
|
142
|
+
},
|
|
143
|
+
|
|
129
144
|
smartBadge: {
|
|
130
145
|
pairBadge: smartBadgePairBadge,
|
|
131
146
|
unpairBadge: smartBadgeUnpairBadge,
|
package/src/lib/config.ts
CHANGED
|
@@ -80,8 +80,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
80
80
|
export const SDK_METADATA = {
|
|
81
81
|
language: "typescript",
|
|
82
82
|
openapiDocVersion: "0.46.0",
|
|
83
|
-
sdkVersion: "0.47.0-beta.
|
|
83
|
+
sdkVersion: "0.47.0-beta.17",
|
|
84
84
|
genVersion: "2.948.4",
|
|
85
85
|
userAgent:
|
|
86
|
-
"speakeasy-sdk/typescript 0.47.0-beta.
|
|
86
|
+
"speakeasy-sdk/typescript 0.47.0-beta.17 2.948.4 0.46.0 @greensecurity/javascript-sdk",
|
|
87
87
|
} as const;
|
|
@@ -85,6 +85,10 @@ export type UserDetails = {
|
|
|
85
85
|
* First name of the user.
|
|
86
86
|
*/
|
|
87
87
|
firstName?: string | null | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Middle name of the user, or `null` if not set. Returned only in the full user record (`expand=user`).
|
|
90
|
+
*/
|
|
91
|
+
middleName?: string | null | undefined;
|
|
88
92
|
/**
|
|
89
93
|
* Last name of the user.
|
|
90
94
|
*/
|
|
@@ -93,6 +97,14 @@ export type UserDetails = {
|
|
|
93
97
|
* Email address (not always valid)
|
|
94
98
|
*/
|
|
95
99
|
email: string;
|
|
100
|
+
/**
|
|
101
|
+
* A vendor's personal email address, kept apart from `email`, which is
|
|
102
|
+
*
|
|
103
|
+
* @remarks
|
|
104
|
+
* the work email they sign in with. `null` if not set. Returned only in
|
|
105
|
+
* the full user record (`expand=user`).
|
|
106
|
+
*/
|
|
107
|
+
personalEmail?: string | null | undefined;
|
|
96
108
|
/**
|
|
97
109
|
* The user's landline phone number, or `null` if not set.
|
|
98
110
|
*/
|
|
@@ -253,8 +265,10 @@ export const UserDetails$inboundSchema: z.ZodType<
|
|
|
253
265
|
> = z.object({
|
|
254
266
|
id: types.number(),
|
|
255
267
|
first_name: z.nullable(types.string()).optional(),
|
|
268
|
+
middle_name: z.nullable(types.string()).optional(),
|
|
256
269
|
last_name: z.nullable(types.string()).optional(),
|
|
257
270
|
email: types.string(),
|
|
271
|
+
personal_email: z.nullable(types.string()).optional(),
|
|
258
272
|
phone: z.nullable(types.string()).optional(),
|
|
259
273
|
mobile_phone: z.nullable(types.string()).optional(),
|
|
260
274
|
fax: z.nullable(types.string()).optional(),
|
|
@@ -274,7 +288,9 @@ export const UserDetails$inboundSchema: z.ZodType<
|
|
|
274
288
|
}).transform((v) => {
|
|
275
289
|
return remap$(v, {
|
|
276
290
|
"first_name": "firstName",
|
|
291
|
+
"middle_name": "middleName",
|
|
277
292
|
"last_name": "lastName",
|
|
293
|
+
"personal_email": "personalEmail",
|
|
278
294
|
"mobile_phone": "mobilePhone",
|
|
279
295
|
"phone_confirmed": "phoneConfirmed",
|
|
280
296
|
"email_confirmed": "emailConfirmed",
|
|
@@ -212,6 +212,10 @@ export type UserLocation = {
|
|
|
212
212
|
* The fax number of the location. `null` if not set.
|
|
213
213
|
*/
|
|
214
214
|
fax?: string | null | undefined;
|
|
215
|
+
/**
|
|
216
|
+
* The vendor's personal email address. Only `PUT /vendors/{vendor_id_or_me}` reads it. `null` if not set.
|
|
217
|
+
*/
|
|
218
|
+
personalEmail?: string | null | undefined;
|
|
215
219
|
/**
|
|
216
220
|
* The country of the location. `null` if not set.
|
|
217
221
|
*/
|
|
@@ -250,11 +254,13 @@ export const UserLocation$inboundSchema: z.ZodType<
|
|
|
250
254
|
phone: z.nullable(types.string()).optional(),
|
|
251
255
|
mobile_phone: z.nullable(types.string()).optional(),
|
|
252
256
|
fax: z.nullable(types.string()).optional(),
|
|
257
|
+
personal_email: z.nullable(types.string()).optional(),
|
|
253
258
|
country: z.nullable(types.string()).optional(),
|
|
254
259
|
timezone: z.nullable(Timezone$inboundSchema).optional(),
|
|
255
260
|
}).transform((v) => {
|
|
256
261
|
return remap$(v, {
|
|
257
262
|
"mobile_phone": "mobilePhone",
|
|
263
|
+
"personal_email": "personalEmail",
|
|
258
264
|
});
|
|
259
265
|
});
|
|
260
266
|
/** @internal */
|
|
@@ -268,6 +274,7 @@ export type UserLocation$Outbound = {
|
|
|
268
274
|
phone?: string | null | undefined;
|
|
269
275
|
mobile_phone?: string | null | undefined;
|
|
270
276
|
fax?: string | null | undefined;
|
|
277
|
+
personal_email?: string | null | undefined;
|
|
271
278
|
country?: string | null | undefined;
|
|
272
279
|
timezone?: string | null | undefined;
|
|
273
280
|
};
|
|
@@ -287,11 +294,13 @@ export const UserLocation$outboundSchema: z.ZodType<
|
|
|
287
294
|
phone: z.nullable(z.string()).optional(),
|
|
288
295
|
mobilePhone: z.nullable(z.string()).optional(),
|
|
289
296
|
fax: z.nullable(z.string()).optional(),
|
|
297
|
+
personalEmail: z.nullable(z.string()).optional(),
|
|
290
298
|
country: z.nullable(z.string()).optional(),
|
|
291
299
|
timezone: z.nullable(Timezone$outboundSchema).optional(),
|
|
292
300
|
}).transform((v) => {
|
|
293
301
|
return remap$(v, {
|
|
294
302
|
mobilePhone: "mobile_phone",
|
|
303
|
+
personalEmail: "personal_email",
|
|
295
304
|
});
|
|
296
305
|
});
|
|
297
306
|
|
|
@@ -36,6 +36,7 @@ export type VendorsUpdateVendorDetailsMutationData = boolean;
|
|
|
36
36
|
|
|
37
37
|
export type VendorsUpdateVendorDetailsMutationError =
|
|
38
38
|
| errors.ApiErrorResponse
|
|
39
|
+
| errors.UnprocessableEntityOrValidationError
|
|
39
40
|
| GreenSecurityError
|
|
40
41
|
| ResponseValidationError
|
|
41
42
|
| ConnectionError
|
|
@@ -54,12 +55,15 @@ export type VendorsUpdateVendorDetailsMutationError =
|
|
|
54
55
|
* can also remove the vendor from their company by sending `company_id: null`.
|
|
55
56
|
*
|
|
56
57
|
* From `location` this endpoint reads only `timezone`, `address1`, `address2`,
|
|
57
|
-
* `city`, `state`, `zip`, `phone`, `mobile_phone` and `
|
|
58
|
+
* `city`, `state`, `zip`, `phone`, `mobile_phone`, `fax` and `personal_email`. The `address` and
|
|
58
59
|
* `country` properties of the shared `UserLocation` schema have no effect here, and
|
|
59
60
|
* updating them is not supported. `state` accepts a US state or a Canadian
|
|
60
61
|
* province—the vendor's country, set only at registration, is not editable
|
|
61
62
|
* through this endpoint.
|
|
62
63
|
*
|
|
64
|
+
* `location.personal_email` is stored lowercased, and a value that is not a valid
|
|
65
|
+
* email address, or is longer than 255 characters, gets a `422` response.
|
|
66
|
+
*
|
|
63
67
|
* Submitting `location.zip` or `location.state` cross-checks the postal code
|
|
64
68
|
* against the resulting state (using the vendor's existing value for whichever
|
|
65
69
|
* of the two you omit from the request). The server rejects a code that is not shaped like a real
|
package/src/sdk/vendors.ts
CHANGED
|
@@ -1026,12 +1026,15 @@ export class Vendors extends ClientSDK {
|
|
|
1026
1026
|
* can also remove the vendor from their company by sending `company_id: null`.
|
|
1027
1027
|
*
|
|
1028
1028
|
* From `location` this endpoint reads only `timezone`, `address1`, `address2`,
|
|
1029
|
-
* `city`, `state`, `zip`, `phone`, `mobile_phone` and `
|
|
1029
|
+
* `city`, `state`, `zip`, `phone`, `mobile_phone`, `fax` and `personal_email`. The `address` and
|
|
1030
1030
|
* `country` properties of the shared `UserLocation` schema have no effect here, and
|
|
1031
1031
|
* updating them is not supported. `state` accepts a US state or a Canadian
|
|
1032
1032
|
* province—the vendor's country, set only at registration, is not editable
|
|
1033
1033
|
* through this endpoint.
|
|
1034
1034
|
*
|
|
1035
|
+
* `location.personal_email` is stored lowercased, and a value that is not a valid
|
|
1036
|
+
* email address, or is longer than 255 characters, gets a `422` response.
|
|
1037
|
+
*
|
|
1035
1038
|
* Submitting `location.zip` or `location.state` cross-checks the postal code
|
|
1036
1039
|
* against the resulting state (using the vendor's existing value for whichever
|
|
1037
1040
|
* of the two you omit from the request). The server rejects a code that is not shaped like a real
|