@greensecurity/javascript-sdk 0.48.0-beta.4 → 0.48.0-beta.5
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__/users.test.js +0 -3
- package/dist/commonjs/__tests__/users.test.js.map +1 -1
- package/dist/commonjs/__tests__/vendors.test.js +1 -1
- 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 +9 -15
- package/dist/commonjs/__tests__/zones.test.js.map +1 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts +1 -7
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.js +1 -7
- package/dist/commonjs/funcs/vendorsUpdateVendorDetails.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 +0 -22
- package/dist/commonjs/models/components/userdetails.d.ts.map +1 -1
- package/dist/commonjs/models/components/userdetails.js +0 -6
- package/dist/commonjs/models/components/userdetails.js.map +1 -1
- package/dist/commonjs/models/components/userlocation.d.ts +0 -10
- package/dist/commonjs/models/components/userlocation.d.ts.map +1 -1
- package/dist/commonjs/models/components/userlocation.js +0 -8
- package/dist/commonjs/models/components/userlocation.js.map +1 -1
- package/dist/commonjs/models/operations/updateuser.d.ts +2 -0
- package/dist/commonjs/models/operations/updateuser.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updateuser.js +1 -0
- package/dist/commonjs/models/operations/updateuser.js.map +1 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts +1 -7
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js +1 -7
- package/dist/commonjs/react-query/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/commonjs/sdk/vendors.d.ts +1 -7
- package/dist/commonjs/sdk/vendors.d.ts.map +1 -1
- package/dist/commonjs/sdk/vendors.js +1 -7
- package/dist/commonjs/sdk/vendors.js.map +1 -1
- package/dist/esm/__tests__/users.test.js +0 -3
- package/dist/esm/__tests__/users.test.js.map +1 -1
- package/dist/esm/__tests__/vendors.test.js +1 -1
- 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 +9 -15
- package/dist/esm/__tests__/zones.test.js.map +1 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts +1 -7
- package/dist/esm/funcs/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/esm/funcs/vendorsUpdateVendorDetails.js +1 -7
- package/dist/esm/funcs/vendorsUpdateVendorDetails.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 +0 -22
- package/dist/esm/models/components/userdetails.d.ts.map +1 -1
- package/dist/esm/models/components/userdetails.js +0 -6
- package/dist/esm/models/components/userdetails.js.map +1 -1
- package/dist/esm/models/components/userlocation.d.ts +0 -10
- package/dist/esm/models/components/userlocation.d.ts.map +1 -1
- package/dist/esm/models/components/userlocation.js +0 -8
- package/dist/esm/models/components/userlocation.js.map +1 -1
- package/dist/esm/models/operations/updateuser.d.ts +2 -0
- package/dist/esm/models/operations/updateuser.d.ts.map +1 -1
- package/dist/esm/models/operations/updateuser.js +1 -0
- package/dist/esm/models/operations/updateuser.js.map +1 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts +1 -7
- package/dist/esm/react-query/vendorsUpdateVendorDetails.d.ts.map +1 -1
- package/dist/esm/react-query/vendorsUpdateVendorDetails.js +1 -7
- package/dist/esm/react-query/vendorsUpdateVendorDetails.js.map +1 -1
- package/dist/esm/sdk/vendors.d.ts +1 -7
- package/dist/esm/sdk/vendors.d.ts.map +1 -1
- package/dist/esm/sdk/vendors.js +1 -7
- 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 +0 -3
- package/src/__tests__/vendors.test.ts +1 -1
- package/src/__tests__/webhooks.test.ts +1 -1
- package/src/__tests__/zones.test.ts +9 -15
- package/src/funcs/vendorsUpdateVendorDetails.ts +1 -7
- package/src/lib/config.ts +2 -2
- package/src/models/components/userdetails.ts +0 -28
- package/src/models/components/userlocation.ts +0 -18
- package/src/models/operations/updateuser.ts +3 -0
- package/src/react-query/vendorsUpdateVendorDetails.ts +1 -7
- package/src/sdk/vendors.ts +1 -7
|
@@ -20,7 +20,7 @@ test("Webhooks List All Webhook Endpoints", async () => {
|
|
|
20
20
|
const testWebhookListForVendorUserResult = await greenSecurity.webhooks
|
|
21
21
|
.listAllWebhookEndpoints({
|
|
22
22
|
itemsPerPage: 25,
|
|
23
|
-
desc:
|
|
23
|
+
desc: true,
|
|
24
24
|
sort: "",
|
|
25
25
|
});
|
|
26
26
|
expect(testWebhookListForVendorUserResult).toBeDefined();
|
|
@@ -35,6 +35,9 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
35
35
|
useUrlParams: false,
|
|
36
36
|
},
|
|
37
37
|
items: [
|
|
38
|
+
{
|
|
39
|
+
facility: {},
|
|
40
|
+
},
|
|
38
41
|
{
|
|
39
42
|
facility: {
|
|
40
43
|
contacts: {
|
|
@@ -42,33 +45,24 @@ test("Zones List Or Search Security Zones", async () => {
|
|
|
42
45
|
status: "Deleted",
|
|
43
46
|
department: 123,
|
|
44
47
|
},
|
|
45
|
-
adminContact:
|
|
46
|
-
status: "Deleted",
|
|
47
|
-
department: 123,
|
|
48
|
-
},
|
|
48
|
+
adminContact: null,
|
|
49
49
|
techContact: {
|
|
50
|
-
status: "Deleted",
|
|
51
|
-
department: 123,
|
|
52
|
-
},
|
|
53
|
-
greenSecurityCsm: {
|
|
54
50
|
status: "Active",
|
|
55
51
|
department: null,
|
|
56
52
|
},
|
|
57
|
-
|
|
58
|
-
status: "
|
|
53
|
+
greenSecurityCsm: {
|
|
54
|
+
status: "Active",
|
|
59
55
|
department: 123,
|
|
60
56
|
},
|
|
57
|
+
accountManager: null,
|
|
61
58
|
},
|
|
62
59
|
vendorGuestPolicy: {
|
|
63
60
|
enabled: true,
|
|
64
61
|
vendorGuestLimitAndOr: "and",
|
|
65
|
-
vendorGuestRequireEmail:
|
|
62
|
+
vendorGuestRequireEmail: false,
|
|
66
63
|
},
|
|
67
64
|
},
|
|
68
65
|
},
|
|
69
|
-
{
|
|
70
|
-
facility: {},
|
|
71
|
-
},
|
|
72
66
|
],
|
|
73
67
|
});
|
|
74
68
|
});
|
|
@@ -86,7 +80,7 @@ test("Zones Security Zone Checkin", async () => {
|
|
|
86
80
|
|
|
87
81
|
const result = await greenSecurity.zones.securityZoneCheckin({
|
|
88
82
|
qrCode: "<value>",
|
|
89
|
-
zoneId:
|
|
83
|
+
zoneId: 542818,
|
|
90
84
|
});
|
|
91
85
|
expect(result).toBeDefined();
|
|
92
86
|
expect(result).toEqual({});
|
|
@@ -36,18 +36,12 @@ 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
|
|
39
|
+
* `city`, `state`, `zip`, `phone`, `mobile_phone` and `fax`. 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.work_email` and `location.personal_email` are stored lowercased, and a
|
|
46
|
-
* value that is not a valid email address, or is longer than 255 characters, gets a
|
|
47
|
-
* `422` response. They are contact fields: the login stays `email`, which this
|
|
48
|
-
* endpoint does not change. When an update sets either of them, one must be the
|
|
49
|
-
* vendor's `email` and the other a different address or empty, or it gets a `422`.
|
|
50
|
-
*
|
|
51
45
|
* Submitting `location.zip` or `location.state` cross-checks the postal code
|
|
52
46
|
* against the resulting state (using the vendor's existing value for whichever
|
|
53
47
|
* of the two you omit from the request). The server rejects a code that is not shaped like a real
|
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.47.0",
|
|
83
|
-
sdkVersion: "0.48.0-beta.
|
|
83
|
+
sdkVersion: "0.48.0-beta.5",
|
|
84
84
|
genVersion: "2.950.2",
|
|
85
85
|
userAgent:
|
|
86
|
-
"speakeasy-sdk/typescript 0.48.0-beta.
|
|
86
|
+
"speakeasy-sdk/typescript 0.48.0-beta.5 2.950.2 0.47.0 @greensecurity/javascript-sdk",
|
|
87
87
|
} as const;
|
|
@@ -85,10 +85,6 @@ 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;
|
|
92
88
|
/**
|
|
93
89
|
* Last name of the user.
|
|
94
90
|
*/
|
|
@@ -97,24 +93,6 @@ export type UserDetails = {
|
|
|
97
93
|
* Email address (not always valid)
|
|
98
94
|
*/
|
|
99
95
|
email: string;
|
|
100
|
-
/**
|
|
101
|
-
* A vendor's work email address, a contact field kept apart from `email`,
|
|
102
|
-
*
|
|
103
|
-
* @remarks
|
|
104
|
-
* which stays the login. When it is the same address as `email`, it follows
|
|
105
|
-
* any change to the login. `null` if not set. Returned only in the full user
|
|
106
|
-
* record (`expand=user`).
|
|
107
|
-
*/
|
|
108
|
-
workEmail?: string | null | undefined;
|
|
109
|
-
/**
|
|
110
|
-
* A vendor's personal email address, a contact field kept apart from `email`,
|
|
111
|
-
*
|
|
112
|
-
* @remarks
|
|
113
|
-
* which stays the login. When it is the same address as `email`, it follows
|
|
114
|
-
* any change to the login. `null` if not set. Returned only in the full user
|
|
115
|
-
* record (`expand=user`).
|
|
116
|
-
*/
|
|
117
|
-
personalEmail?: string | null | undefined;
|
|
118
96
|
/**
|
|
119
97
|
* The user's landline phone number, or `null` if not set.
|
|
120
98
|
*/
|
|
@@ -275,11 +253,8 @@ export const UserDetails$inboundSchema: z.ZodType<
|
|
|
275
253
|
> = z.object({
|
|
276
254
|
id: types.number(),
|
|
277
255
|
first_name: z.nullable(types.string()).optional(),
|
|
278
|
-
middle_name: z.nullable(types.string()).optional(),
|
|
279
256
|
last_name: z.nullable(types.string()).optional(),
|
|
280
257
|
email: types.string(),
|
|
281
|
-
work_email: z.nullable(types.string()).optional(),
|
|
282
|
-
personal_email: z.nullable(types.string()).optional(),
|
|
283
258
|
phone: z.nullable(types.string()).optional(),
|
|
284
259
|
mobile_phone: z.nullable(types.string()).optional(),
|
|
285
260
|
fax: z.nullable(types.string()).optional(),
|
|
@@ -299,10 +274,7 @@ export const UserDetails$inboundSchema: z.ZodType<
|
|
|
299
274
|
}).transform((v) => {
|
|
300
275
|
return remap$(v, {
|
|
301
276
|
"first_name": "firstName",
|
|
302
|
-
"middle_name": "middleName",
|
|
303
277
|
"last_name": "lastName",
|
|
304
|
-
"work_email": "workEmail",
|
|
305
|
-
"personal_email": "personalEmail",
|
|
306
278
|
"mobile_phone": "mobilePhone",
|
|
307
279
|
"phone_confirmed": "phoneConfirmed",
|
|
308
280
|
"email_confirmed": "emailConfirmed",
|
|
@@ -212,14 +212,6 @@ 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 work email address. Only `PUT /vendors/{vendor_id_or_me}` reads it. `null` if not set.
|
|
217
|
-
*/
|
|
218
|
-
workEmail?: string | null | undefined;
|
|
219
|
-
/**
|
|
220
|
-
* The vendor's personal email address. Only `PUT /vendors/{vendor_id_or_me}` reads it. `null` if not set.
|
|
221
|
-
*/
|
|
222
|
-
personalEmail?: string | null | undefined;
|
|
223
215
|
/**
|
|
224
216
|
* The country of the location. `null` if not set.
|
|
225
217
|
*/
|
|
@@ -258,15 +250,11 @@ export const UserLocation$inboundSchema: z.ZodType<
|
|
|
258
250
|
phone: z.nullable(types.string()).optional(),
|
|
259
251
|
mobile_phone: z.nullable(types.string()).optional(),
|
|
260
252
|
fax: z.nullable(types.string()).optional(),
|
|
261
|
-
work_email: z.nullable(types.string()).optional(),
|
|
262
|
-
personal_email: z.nullable(types.string()).optional(),
|
|
263
253
|
country: z.nullable(types.string()).optional(),
|
|
264
254
|
timezone: z.nullable(Timezone$inboundSchema).optional(),
|
|
265
255
|
}).transform((v) => {
|
|
266
256
|
return remap$(v, {
|
|
267
257
|
"mobile_phone": "mobilePhone",
|
|
268
|
-
"work_email": "workEmail",
|
|
269
|
-
"personal_email": "personalEmail",
|
|
270
258
|
});
|
|
271
259
|
});
|
|
272
260
|
/** @internal */
|
|
@@ -280,8 +268,6 @@ export type UserLocation$Outbound = {
|
|
|
280
268
|
phone?: string | null | undefined;
|
|
281
269
|
mobile_phone?: string | null | undefined;
|
|
282
270
|
fax?: string | null | undefined;
|
|
283
|
-
work_email?: string | null | undefined;
|
|
284
|
-
personal_email?: string | null | undefined;
|
|
285
271
|
country?: string | null | undefined;
|
|
286
272
|
timezone?: string | null | undefined;
|
|
287
273
|
};
|
|
@@ -301,15 +287,11 @@ export const UserLocation$outboundSchema: z.ZodType<
|
|
|
301
287
|
phone: z.nullable(z.string()).optional(),
|
|
302
288
|
mobilePhone: z.nullable(z.string()).optional(),
|
|
303
289
|
fax: z.nullable(z.string()).optional(),
|
|
304
|
-
workEmail: z.nullable(z.string()).optional(),
|
|
305
|
-
personalEmail: z.nullable(z.string()).optional(),
|
|
306
290
|
country: z.nullable(z.string()).optional(),
|
|
307
291
|
timezone: z.nullable(Timezone$outboundSchema).optional(),
|
|
308
292
|
}).transform((v) => {
|
|
309
293
|
return remap$(v, {
|
|
310
294
|
mobilePhone: "mobile_phone",
|
|
311
|
-
workEmail: "work_email",
|
|
312
|
-
personalEmail: "personal_email",
|
|
313
295
|
});
|
|
314
296
|
});
|
|
315
297
|
|
|
@@ -17,6 +17,7 @@ export type UpdateUserRequestBody = {
|
|
|
17
17
|
lastName?: string | undefined;
|
|
18
18
|
username?: string | undefined;
|
|
19
19
|
email?: string | undefined;
|
|
20
|
+
email2?: string | undefined;
|
|
20
21
|
phone?: string | undefined;
|
|
21
22
|
mobilePhone?: string | undefined;
|
|
22
23
|
fax?: string | undefined;
|
|
@@ -79,6 +80,7 @@ export type UpdateUserRequestBody$Outbound = {
|
|
|
79
80
|
last_name?: string | undefined;
|
|
80
81
|
username?: string | undefined;
|
|
81
82
|
email?: string | undefined;
|
|
83
|
+
email2?: string | undefined;
|
|
82
84
|
phone?: string | undefined;
|
|
83
85
|
mobile_phone?: string | undefined;
|
|
84
86
|
fax?: string | undefined;
|
|
@@ -104,6 +106,7 @@ export const UpdateUserRequestBody$outboundSchema: z.ZodType<
|
|
|
104
106
|
lastName: z.string().optional(),
|
|
105
107
|
username: z.string().optional(),
|
|
106
108
|
email: z.string().optional(),
|
|
109
|
+
email2: z.string().optional(),
|
|
107
110
|
phone: z.string().optional(),
|
|
108
111
|
mobilePhone: z.string().optional(),
|
|
109
112
|
fax: z.string().optional(),
|
|
@@ -55,18 +55,12 @@ export type VendorsUpdateVendorDetailsMutationError =
|
|
|
55
55
|
* can also remove the vendor from their company by sending `company_id: null`.
|
|
56
56
|
*
|
|
57
57
|
* From `location` this endpoint reads only `timezone`, `address1`, `address2`,
|
|
58
|
-
* `city`, `state`, `zip`, `phone`, `mobile_phone
|
|
58
|
+
* `city`, `state`, `zip`, `phone`, `mobile_phone` and `fax`. The `address` and
|
|
59
59
|
* `country` properties of the shared `UserLocation` schema have no effect here, and
|
|
60
60
|
* updating them is not supported. `state` accepts a US state or a Canadian
|
|
61
61
|
* province—the vendor's country, set only at registration, is not editable
|
|
62
62
|
* through this endpoint.
|
|
63
63
|
*
|
|
64
|
-
* `location.work_email` and `location.personal_email` are stored lowercased, and a
|
|
65
|
-
* value that is not a valid email address, or is longer than 255 characters, gets a
|
|
66
|
-
* `422` response. They are contact fields: the login stays `email`, which this
|
|
67
|
-
* endpoint does not change. When an update sets either of them, one must be the
|
|
68
|
-
* vendor's `email` and the other a different address or empty, or it gets a `422`.
|
|
69
|
-
*
|
|
70
64
|
* Submitting `location.zip` or `location.state` cross-checks the postal code
|
|
71
65
|
* against the resulting state (using the vendor's existing value for whichever
|
|
72
66
|
* 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,18 +1026,12 @@ 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
|
|
1029
|
+
* `city`, `state`, `zip`, `phone`, `mobile_phone` and `fax`. 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.work_email` and `location.personal_email` are stored lowercased, and a
|
|
1036
|
-
* value that is not a valid email address, or is longer than 255 characters, gets a
|
|
1037
|
-
* `422` response. They are contact fields: the login stays `email`, which this
|
|
1038
|
-
* endpoint does not change. When an update sets either of them, one must be the
|
|
1039
|
-
* vendor's `email` and the other a different address or empty, or it gets a `422`.
|
|
1040
|
-
*
|
|
1041
1035
|
* Submitting `location.zip` or `location.state` cross-checks the postal code
|
|
1042
1036
|
* against the resulting state (using the vendor's existing value for whichever
|
|
1043
1037
|
* of the two you omit from the request). The server rejects a code that is not shaped like a real
|