@greensecurity/javascript-sdk 0.40.8-beta.0 → 0.40.8-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (165) hide show
  1. package/README.md +9 -0
  2. package/dist/commonjs/__tests__/alerts.test.d.ts +2 -0
  3. package/dist/commonjs/__tests__/alerts.test.d.ts.map +1 -0
  4. package/dist/commonjs/__tests__/alerts.test.js +51 -0
  5. package/dist/commonjs/__tests__/alerts.test.js.map +1 -0
  6. package/dist/commonjs/__tests__/webhooks.test.js +1 -1
  7. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  8. package/dist/commonjs/__tests__/zones.test.js +2 -5
  9. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  10. package/dist/commonjs/funcs/alertsListAlerts.d.ts +21 -0
  11. package/dist/commonjs/funcs/alertsListAlerts.d.ts.map +1 -0
  12. package/dist/commonjs/funcs/alertsListAlerts.js +154 -0
  13. package/dist/commonjs/funcs/alertsListAlerts.js.map +1 -0
  14. package/dist/commonjs/funcs/alertsUpdateUserAlerts.d.ts +18 -0
  15. package/dist/commonjs/funcs/alertsUpdateUserAlerts.d.ts.map +1 -0
  16. package/dist/commonjs/funcs/alertsUpdateUserAlerts.js +117 -0
  17. package/dist/commonjs/funcs/alertsUpdateUserAlerts.js.map +1 -0
  18. package/dist/commonjs/lib/config.d.ts +3 -3
  19. package/dist/commonjs/lib/config.js +3 -3
  20. package/dist/commonjs/lib/config.js.map +1 -1
  21. package/dist/commonjs/models/components/alert.d.ts +79 -0
  22. package/dist/commonjs/models/components/alert.d.ts.map +1 -0
  23. package/dist/commonjs/models/components/alert.js +123 -0
  24. package/dist/commonjs/models/components/alert.js.map +1 -0
  25. package/dist/commonjs/models/components/facilitycalendarsummary.d.ts +66 -0
  26. package/dist/commonjs/models/components/facilitycalendarsummary.d.ts.map +1 -0
  27. package/dist/commonjs/models/components/facilitycalendarsummary.js +126 -0
  28. package/dist/commonjs/models/components/facilitycalendarsummary.js.map +1 -0
  29. package/dist/commonjs/models/components/index.d.ts +2 -0
  30. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/index.js +2 -0
  32. package/dist/commonjs/models/components/index.js.map +1 -1
  33. package/dist/commonjs/models/components/vendor.d.ts +3 -2
  34. package/dist/commonjs/models/components/vendor.d.ts.map +1 -1
  35. package/dist/commonjs/models/components/vendor.js +3 -2
  36. package/dist/commonjs/models/components/vendor.js.map +1 -1
  37. package/dist/commonjs/models/operations/index.d.ts +2 -0
  38. package/dist/commonjs/models/operations/index.d.ts.map +1 -1
  39. package/dist/commonjs/models/operations/index.js +2 -0
  40. package/dist/commonjs/models/operations/index.js.map +1 -1
  41. package/dist/commonjs/models/operations/listalerts.d.ts +106 -0
  42. package/dist/commonjs/models/operations/listalerts.d.ts.map +1 -0
  43. package/dist/commonjs/models/operations/listalerts.js +149 -0
  44. package/dist/commonjs/models/operations/listalerts.js.map +1 -0
  45. package/dist/commonjs/models/operations/securityzonecheckin.d.ts +12 -0
  46. package/dist/commonjs/models/operations/securityzonecheckin.d.ts.map +1 -1
  47. package/dist/commonjs/models/operations/securityzonecheckin.js +8 -0
  48. package/dist/commonjs/models/operations/securityzonecheckin.js.map +1 -1
  49. package/dist/commonjs/models/operations/updateuseralerts.d.ts +57 -0
  50. package/dist/commonjs/models/operations/updateuseralerts.d.ts.map +1 -0
  51. package/dist/commonjs/models/operations/updateuseralerts.js +105 -0
  52. package/dist/commonjs/models/operations/updateuseralerts.js.map +1 -0
  53. package/dist/commonjs/react-query/alertsListAlerts.d.ts +75 -0
  54. package/dist/commonjs/react-query/alertsListAlerts.d.ts.map +1 -0
  55. package/dist/commonjs/react-query/alertsListAlerts.js +150 -0
  56. package/dist/commonjs/react-query/alertsListAlerts.js.map +1 -0
  57. package/dist/commonjs/react-query/alertsUpdateUserAlerts.d.ts +23 -0
  58. package/dist/commonjs/react-query/alertsUpdateUserAlerts.d.ts.map +1 -0
  59. package/dist/commonjs/react-query/alertsUpdateUserAlerts.js +47 -0
  60. package/dist/commonjs/react-query/alertsUpdateUserAlerts.js.map +1 -0
  61. package/dist/commonjs/react-query/index.d.ts +2 -0
  62. package/dist/commonjs/react-query/index.d.ts.map +1 -1
  63. package/dist/commonjs/react-query/index.js +2 -0
  64. package/dist/commonjs/react-query/index.js.map +1 -1
  65. package/dist/commonjs/sdk/alerts.d.ts +22 -0
  66. package/dist/commonjs/sdk/alerts.d.ts.map +1 -0
  67. package/dist/commonjs/sdk/alerts.js +33 -0
  68. package/dist/commonjs/sdk/alerts.js.map +1 -0
  69. package/dist/commonjs/sdk/sdk.d.ts +3 -0
  70. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  71. package/dist/commonjs/sdk/sdk.js +4 -0
  72. package/dist/commonjs/sdk/sdk.js.map +1 -1
  73. package/dist/esm/__tests__/alerts.test.d.ts +2 -0
  74. package/dist/esm/__tests__/alerts.test.d.ts.map +1 -0
  75. package/dist/esm/__tests__/alerts.test.js +49 -0
  76. package/dist/esm/__tests__/alerts.test.js.map +1 -0
  77. package/dist/esm/__tests__/webhooks.test.js +1 -1
  78. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  79. package/dist/esm/__tests__/zones.test.js +2 -5
  80. package/dist/esm/__tests__/zones.test.js.map +1 -1
  81. package/dist/esm/funcs/alertsListAlerts.d.ts +21 -0
  82. package/dist/esm/funcs/alertsListAlerts.d.ts.map +1 -0
  83. package/dist/esm/funcs/alertsListAlerts.js +118 -0
  84. package/dist/esm/funcs/alertsListAlerts.js.map +1 -0
  85. package/dist/esm/funcs/alertsUpdateUserAlerts.d.ts +18 -0
  86. package/dist/esm/funcs/alertsUpdateUserAlerts.d.ts.map +1 -0
  87. package/dist/esm/funcs/alertsUpdateUserAlerts.js +81 -0
  88. package/dist/esm/funcs/alertsUpdateUserAlerts.js.map +1 -0
  89. package/dist/esm/lib/config.d.ts +3 -3
  90. package/dist/esm/lib/config.js +3 -3
  91. package/dist/esm/lib/config.js.map +1 -1
  92. package/dist/esm/models/components/alert.d.ts +79 -0
  93. package/dist/esm/models/components/alert.d.ts.map +1 -0
  94. package/dist/esm/models/components/alert.js +85 -0
  95. package/dist/esm/models/components/alert.js.map +1 -0
  96. package/dist/esm/models/components/facilitycalendarsummary.d.ts +66 -0
  97. package/dist/esm/models/components/facilitycalendarsummary.d.ts.map +1 -0
  98. package/dist/esm/models/components/facilitycalendarsummary.js +86 -0
  99. package/dist/esm/models/components/facilitycalendarsummary.js.map +1 -0
  100. package/dist/esm/models/components/index.d.ts +2 -0
  101. package/dist/esm/models/components/index.d.ts.map +1 -1
  102. package/dist/esm/models/components/index.js +2 -0
  103. package/dist/esm/models/components/index.js.map +1 -1
  104. package/dist/esm/models/components/vendor.d.ts +3 -2
  105. package/dist/esm/models/components/vendor.d.ts.map +1 -1
  106. package/dist/esm/models/components/vendor.js +3 -2
  107. package/dist/esm/models/components/vendor.js.map +1 -1
  108. package/dist/esm/models/operations/index.d.ts +2 -0
  109. package/dist/esm/models/operations/index.d.ts.map +1 -1
  110. package/dist/esm/models/operations/index.js +2 -0
  111. package/dist/esm/models/operations/index.js.map +1 -1
  112. package/dist/esm/models/operations/listalerts.d.ts +106 -0
  113. package/dist/esm/models/operations/listalerts.d.ts.map +1 -0
  114. package/dist/esm/models/operations/listalerts.js +107 -0
  115. package/dist/esm/models/operations/listalerts.js.map +1 -0
  116. package/dist/esm/models/operations/securityzonecheckin.d.ts +12 -0
  117. package/dist/esm/models/operations/securityzonecheckin.d.ts.map +1 -1
  118. package/dist/esm/models/operations/securityzonecheckin.js +8 -0
  119. package/dist/esm/models/operations/securityzonecheckin.js.map +1 -1
  120. package/dist/esm/models/operations/updateuseralerts.d.ts +57 -0
  121. package/dist/esm/models/operations/updateuseralerts.d.ts.map +1 -0
  122. package/dist/esm/models/operations/updateuseralerts.js +65 -0
  123. package/dist/esm/models/operations/updateuseralerts.js.map +1 -0
  124. package/dist/esm/react-query/alertsListAlerts.d.ts +75 -0
  125. package/dist/esm/react-query/alertsListAlerts.d.ts.map +1 -0
  126. package/dist/esm/react-query/alertsListAlerts.js +137 -0
  127. package/dist/esm/react-query/alertsListAlerts.js.map +1 -0
  128. package/dist/esm/react-query/alertsUpdateUserAlerts.d.ts +23 -0
  129. package/dist/esm/react-query/alertsUpdateUserAlerts.d.ts.map +1 -0
  130. package/dist/esm/react-query/alertsUpdateUserAlerts.js +42 -0
  131. package/dist/esm/react-query/alertsUpdateUserAlerts.js.map +1 -0
  132. package/dist/esm/react-query/index.d.ts +2 -0
  133. package/dist/esm/react-query/index.d.ts.map +1 -1
  134. package/dist/esm/react-query/index.js +2 -0
  135. package/dist/esm/react-query/index.js.map +1 -1
  136. package/dist/esm/sdk/alerts.d.ts +22 -0
  137. package/dist/esm/sdk/alerts.d.ts.map +1 -0
  138. package/dist/esm/sdk/alerts.js +29 -0
  139. package/dist/esm/sdk/alerts.js.map +1 -0
  140. package/dist/esm/sdk/sdk.d.ts +3 -0
  141. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  142. package/dist/esm/sdk/sdk.js +4 -0
  143. package/dist/esm/sdk/sdk.js.map +1 -1
  144. package/examples/package-lock.json +1 -1
  145. package/jsr.json +1 -1
  146. package/package.json +1 -1
  147. package/src/__tests__/alerts.test.ts +55 -0
  148. package/src/__tests__/webhooks.test.ts +1 -1
  149. package/src/__tests__/zones.test.ts +2 -5
  150. package/src/funcs/alertsListAlerts.ts +245 -0
  151. package/src/funcs/alertsUpdateUserAlerts.ts +170 -0
  152. package/src/lib/config.ts +3 -3
  153. package/src/models/components/alert.ts +141 -0
  154. package/src/models/components/facilitycalendarsummary.ts +182 -0
  155. package/src/models/components/index.ts +2 -0
  156. package/src/models/components/vendor.ts +13 -4
  157. package/src/models/operations/index.ts +2 -0
  158. package/src/models/operations/listalerts.ts +234 -0
  159. package/src/models/operations/securityzonecheckin.ts +20 -0
  160. package/src/models/operations/updateuseralerts.ts +140 -0
  161. package/src/react-query/alertsListAlerts.ts +308 -0
  162. package/src/react-query/alertsUpdateUserAlerts.ts +89 -0
  163. package/src/react-query/index.ts +2 -0
  164. package/src/sdk/alerts.ts +46 -0
  165. package/src/sdk/sdk.ts +6 -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";
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 { SDKValidationError } from "../errors/sdkvalidationerror.js";
10
+ import {
11
+ FacilityVendorType,
12
+ FacilityVendorType$inboundSchema,
13
+ FacilityVendorType$Outbound,
14
+ FacilityVendorType$outboundSchema,
15
+ } from "./facilityvendortype.js";
16
+
17
+ export type FacilityCalendarSummaryVendorPolicy = {
18
+ vendorTypes?: Array<FacilityVendorType> | undefined;
19
+ };
20
+
21
+ /**
22
+ * FacilitySummary extended with appointment options for calendaring.
23
+ */
24
+ export type FacilityCalendarSummary = {
25
+ id?: number | undefined;
26
+ name?: string | undefined;
27
+ vendorPolicy?: FacilityCalendarSummaryVendorPolicy | null | undefined;
28
+ allowUserAppointments?: boolean | undefined;
29
+ allowDeptAppointments?: boolean | undefined;
30
+ };
31
+
32
+ /** @internal */
33
+ export const FacilityCalendarSummaryVendorPolicy$inboundSchema: z.ZodType<
34
+ FacilityCalendarSummaryVendorPolicy,
35
+ z.ZodTypeDef,
36
+ unknown
37
+ > = z.object({
38
+ vendor_types: z.array(FacilityVendorType$inboundSchema).optional(),
39
+ }).transform((v) => {
40
+ return remap$(v, {
41
+ "vendor_types": "vendorTypes",
42
+ });
43
+ });
44
+
45
+ /** @internal */
46
+ export type FacilityCalendarSummaryVendorPolicy$Outbound = {
47
+ vendor_types?: Array<FacilityVendorType$Outbound> | undefined;
48
+ };
49
+
50
+ /** @internal */
51
+ export const FacilityCalendarSummaryVendorPolicy$outboundSchema: z.ZodType<
52
+ FacilityCalendarSummaryVendorPolicy$Outbound,
53
+ z.ZodTypeDef,
54
+ FacilityCalendarSummaryVendorPolicy
55
+ > = z.object({
56
+ vendorTypes: z.array(FacilityVendorType$outboundSchema).optional(),
57
+ }).transform((v) => {
58
+ return remap$(v, {
59
+ vendorTypes: "vendor_types",
60
+ });
61
+ });
62
+
63
+ /**
64
+ * @internal
65
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
66
+ */
67
+ export namespace FacilityCalendarSummaryVendorPolicy$ {
68
+ /** @deprecated use `FacilityCalendarSummaryVendorPolicy$inboundSchema` instead. */
69
+ export const inboundSchema =
70
+ FacilityCalendarSummaryVendorPolicy$inboundSchema;
71
+ /** @deprecated use `FacilityCalendarSummaryVendorPolicy$outboundSchema` instead. */
72
+ export const outboundSchema =
73
+ FacilityCalendarSummaryVendorPolicy$outboundSchema;
74
+ /** @deprecated use `FacilityCalendarSummaryVendorPolicy$Outbound` instead. */
75
+ export type Outbound = FacilityCalendarSummaryVendorPolicy$Outbound;
76
+ }
77
+
78
+ export function facilityCalendarSummaryVendorPolicyToJSON(
79
+ facilityCalendarSummaryVendorPolicy: FacilityCalendarSummaryVendorPolicy,
80
+ ): string {
81
+ return JSON.stringify(
82
+ FacilityCalendarSummaryVendorPolicy$outboundSchema.parse(
83
+ facilityCalendarSummaryVendorPolicy,
84
+ ),
85
+ );
86
+ }
87
+
88
+ export function facilityCalendarSummaryVendorPolicyFromJSON(
89
+ jsonString: string,
90
+ ): SafeParseResult<FacilityCalendarSummaryVendorPolicy, SDKValidationError> {
91
+ return safeParse(
92
+ jsonString,
93
+ (x) =>
94
+ FacilityCalendarSummaryVendorPolicy$inboundSchema.parse(JSON.parse(x)),
95
+ `Failed to parse 'FacilityCalendarSummaryVendorPolicy' from JSON`,
96
+ );
97
+ }
98
+
99
+ /** @internal */
100
+ export const FacilityCalendarSummary$inboundSchema: z.ZodType<
101
+ FacilityCalendarSummary,
102
+ z.ZodTypeDef,
103
+ unknown
104
+ > = z.object({
105
+ id: z.number().int().optional(),
106
+ name: z.string().optional(),
107
+ vendor_policy: z.nullable(
108
+ z.lazy(() => FacilityCalendarSummaryVendorPolicy$inboundSchema),
109
+ ).optional(),
110
+ allow_user_appointments: z.boolean().optional(),
111
+ allow_dept_appointments: z.boolean().optional(),
112
+ }).transform((v) => {
113
+ return remap$(v, {
114
+ "vendor_policy": "vendorPolicy",
115
+ "allow_user_appointments": "allowUserAppointments",
116
+ "allow_dept_appointments": "allowDeptAppointments",
117
+ });
118
+ });
119
+
120
+ /** @internal */
121
+ export type FacilityCalendarSummary$Outbound = {
122
+ id?: number | undefined;
123
+ name?: string | undefined;
124
+ vendor_policy?:
125
+ | FacilityCalendarSummaryVendorPolicy$Outbound
126
+ | null
127
+ | undefined;
128
+ allow_user_appointments?: boolean | undefined;
129
+ allow_dept_appointments?: boolean | undefined;
130
+ };
131
+
132
+ /** @internal */
133
+ export const FacilityCalendarSummary$outboundSchema: z.ZodType<
134
+ FacilityCalendarSummary$Outbound,
135
+ z.ZodTypeDef,
136
+ FacilityCalendarSummary
137
+ > = z.object({
138
+ id: z.number().int().optional(),
139
+ name: z.string().optional(),
140
+ vendorPolicy: z.nullable(
141
+ z.lazy(() => FacilityCalendarSummaryVendorPolicy$outboundSchema),
142
+ ).optional(),
143
+ allowUserAppointments: z.boolean().optional(),
144
+ allowDeptAppointments: z.boolean().optional(),
145
+ }).transform((v) => {
146
+ return remap$(v, {
147
+ vendorPolicy: "vendor_policy",
148
+ allowUserAppointments: "allow_user_appointments",
149
+ allowDeptAppointments: "allow_dept_appointments",
150
+ });
151
+ });
152
+
153
+ /**
154
+ * @internal
155
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
156
+ */
157
+ export namespace FacilityCalendarSummary$ {
158
+ /** @deprecated use `FacilityCalendarSummary$inboundSchema` instead. */
159
+ export const inboundSchema = FacilityCalendarSummary$inboundSchema;
160
+ /** @deprecated use `FacilityCalendarSummary$outboundSchema` instead. */
161
+ export const outboundSchema = FacilityCalendarSummary$outboundSchema;
162
+ /** @deprecated use `FacilityCalendarSummary$Outbound` instead. */
163
+ export type Outbound = FacilityCalendarSummary$Outbound;
164
+ }
165
+
166
+ export function facilityCalendarSummaryToJSON(
167
+ facilityCalendarSummary: FacilityCalendarSummary,
168
+ ): string {
169
+ return JSON.stringify(
170
+ FacilityCalendarSummary$outboundSchema.parse(facilityCalendarSummary),
171
+ );
172
+ }
173
+
174
+ export function facilityCalendarSummaryFromJSON(
175
+ jsonString: string,
176
+ ): SafeParseResult<FacilityCalendarSummary, SDKValidationError> {
177
+ return safeParse(
178
+ jsonString,
179
+ (x) => FacilityCalendarSummary$inboundSchema.parse(JSON.parse(x)),
180
+ `Failed to parse 'FacilityCalendarSummary' from JSON`,
181
+ );
182
+ }
@@ -3,6 +3,7 @@
3
3
  */
4
4
 
5
5
  export * from "./activestatus.js";
6
+ export * from "./alert.js";
6
7
  export * from "./backgroundcheckresult.js";
7
8
  export * from "./company.js";
8
9
  export * from "./companyvendortyperestriction.js";
@@ -20,6 +21,7 @@ export * from "./departmentsummary.js";
20
21
  export * from "./desc.js";
21
22
  export * from "./expand.js";
22
23
  export * from "./facility.js";
24
+ export * from "./facilitycalendarsummary.js";
23
25
  export * from "./facilitystatus.js";
24
26
  export * from "./facilitysummary.js";
25
27
  export * from "./facilityvendortype.js";
@@ -25,6 +25,12 @@ import {
25
25
  Facility$Outbound,
26
26
  Facility$outboundSchema,
27
27
  } from "./facility.js";
28
+ import {
29
+ FacilityCalendarSummary,
30
+ FacilityCalendarSummary$inboundSchema,
31
+ FacilityCalendarSummary$Outbound,
32
+ FacilityCalendarSummary$outboundSchema,
33
+ } from "./facilitycalendarsummary.js";
28
34
  import {
29
35
  FacilitySummary,
30
36
  FacilitySummary$inboundSchema,
@@ -220,7 +226,10 @@ export type Vendor = {
220
226
  backgroundCheckDateExpires?: string | null | undefined;
221
227
  creditBalance?: number | null | undefined;
222
228
  targetFacilities?: Array<FacilitySummary> | null | undefined;
223
- approvedCalendaringFacilities?: Array<FacilitySummary> | null | undefined;
229
+ approvedCalendaringFacilities?:
230
+ | Array<FacilityCalendarSummary>
231
+ | null
232
+ | undefined;
224
233
  pendingInvoice?: Invoice | number | null | undefined;
225
234
  vendorGroups?: Array<VendorGroup | null> | null | undefined;
226
235
  hasCredentialedFacilities?: boolean | null | undefined;
@@ -1089,7 +1098,7 @@ export const Vendor$inboundSchema: z.ZodType<Vendor, z.ZodTypeDef, unknown> = z
1089
1098
  target_facilities: z.nullable(z.array(FacilitySummary$inboundSchema))
1090
1099
  .optional(),
1091
1100
  approved_calendaring_facilities: z.nullable(
1092
- z.array(FacilitySummary$inboundSchema),
1101
+ z.array(FacilityCalendarSummary$inboundSchema),
1093
1102
  ).optional(),
1094
1103
  pending_invoice: z.nullable(
1095
1104
  z.union([Invoice$inboundSchema, z.number().int()]),
@@ -1158,7 +1167,7 @@ export type Vendor$Outbound = {
1158
1167
  credit_balance?: number | null | undefined;
1159
1168
  target_facilities?: Array<FacilitySummary$Outbound> | null | undefined;
1160
1169
  approved_calendaring_facilities?:
1161
- | Array<FacilitySummary$Outbound>
1170
+ | Array<FacilityCalendarSummary$Outbound>
1162
1171
  | null
1163
1172
  | undefined;
1164
1173
  pending_invoice?: Invoice$Outbound | number | null | undefined;
@@ -1217,7 +1226,7 @@ export const Vendor$outboundSchema: z.ZodType<
1217
1226
  targetFacilities: z.nullable(z.array(FacilitySummary$outboundSchema))
1218
1227
  .optional(),
1219
1228
  approvedCalendaringFacilities: z.nullable(
1220
- z.array(FacilitySummary$outboundSchema),
1229
+ z.array(FacilityCalendarSummary$outboundSchema),
1221
1230
  ).optional(),
1222
1231
  pendingInvoice: z.nullable(
1223
1232
  z.union([Invoice$outboundSchema, z.number().int()]),
@@ -39,6 +39,7 @@ export * from "./getvendorinvoicereceipt.js";
39
39
  export * from "./getvendorlegalname.js";
40
40
  export * from "./getvendorsdetails.js";
41
41
  export * from "./getwebhookendpoint.js";
42
+ export * from "./listalerts.js";
42
43
  export * from "./listallwebhookendpoints.js";
43
44
  export * from "./listfeed.js";
44
45
  export * from "./listlocations.js";
@@ -82,6 +83,7 @@ export * from "./updateevent.js";
82
83
  export * from "./updatefhirconfigbyid.js";
83
84
  export * from "./updateinvoice.js";
84
85
  export * from "./updatesthewebhookendpointwiththegivenid.js";
86
+ export * from "./updateuseralerts.js";
85
87
  export * from "./updatevendorcredentialdata.js";
86
88
  export * from "./updatevendorcredentialfile.js";
87
89
  export * from "./updatevendordetails.js";
@@ -0,0 +1,234 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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 components from "../components/index.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type ListAlertsRequest = {
13
+ /**
14
+ * A comma-separated list of object attributes to sort on.
15
+ */
16
+ sort?: string | null | undefined;
17
+ /**
18
+ * Sort desc
19
+ */
20
+ desc?: components.Desc | undefined;
21
+ /**
22
+ * A 1-based offset for which page to request (defaults to 1)
23
+ */
24
+ page?: number | undefined;
25
+ /**
26
+ * Number of items to show in a given page
27
+ */
28
+ itemsPerPage?: number | undefined;
29
+ };
30
+
31
+ /**
32
+ * The request was successful, and the server has returned the requested resource in the response body.
33
+ */
34
+ export type ListAlertsResponseBody = {
35
+ /**
36
+ * Pagination information for a pageable list
37
+ */
38
+ pager: components.Pager;
39
+ items: Array<components.Alert>;
40
+ };
41
+
42
+ export type ListAlertsResponse = {
43
+ result: ListAlertsResponseBody;
44
+ };
45
+
46
+ /** @internal */
47
+ export const ListAlertsRequest$inboundSchema: z.ZodType<
48
+ ListAlertsRequest,
49
+ z.ZodTypeDef,
50
+ unknown
51
+ > = z.object({
52
+ sort: z.nullable(z.string()).optional(),
53
+ desc: components.Desc$inboundSchema.optional(),
54
+ page: z.number().int().optional(),
55
+ items_per_page: z.number().int().optional(),
56
+ }).transform((v) => {
57
+ return remap$(v, {
58
+ "items_per_page": "itemsPerPage",
59
+ });
60
+ });
61
+
62
+ /** @internal */
63
+ export type ListAlertsRequest$Outbound = {
64
+ sort?: string | null | undefined;
65
+ desc?: components.Desc$Outbound | undefined;
66
+ page?: number | undefined;
67
+ items_per_page?: number | undefined;
68
+ };
69
+
70
+ /** @internal */
71
+ export const ListAlertsRequest$outboundSchema: z.ZodType<
72
+ ListAlertsRequest$Outbound,
73
+ z.ZodTypeDef,
74
+ ListAlertsRequest
75
+ > = z.object({
76
+ sort: z.nullable(z.string()).optional(),
77
+ desc: components.Desc$outboundSchema.optional(),
78
+ page: z.number().int().optional(),
79
+ itemsPerPage: z.number().int().optional(),
80
+ }).transform((v) => {
81
+ return remap$(v, {
82
+ itemsPerPage: "items_per_page",
83
+ });
84
+ });
85
+
86
+ /**
87
+ * @internal
88
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
89
+ */
90
+ export namespace ListAlertsRequest$ {
91
+ /** @deprecated use `ListAlertsRequest$inboundSchema` instead. */
92
+ export const inboundSchema = ListAlertsRequest$inboundSchema;
93
+ /** @deprecated use `ListAlertsRequest$outboundSchema` instead. */
94
+ export const outboundSchema = ListAlertsRequest$outboundSchema;
95
+ /** @deprecated use `ListAlertsRequest$Outbound` instead. */
96
+ export type Outbound = ListAlertsRequest$Outbound;
97
+ }
98
+
99
+ export function listAlertsRequestToJSON(
100
+ listAlertsRequest: ListAlertsRequest,
101
+ ): string {
102
+ return JSON.stringify(
103
+ ListAlertsRequest$outboundSchema.parse(listAlertsRequest),
104
+ );
105
+ }
106
+
107
+ export function listAlertsRequestFromJSON(
108
+ jsonString: string,
109
+ ): SafeParseResult<ListAlertsRequest, SDKValidationError> {
110
+ return safeParse(
111
+ jsonString,
112
+ (x) => ListAlertsRequest$inboundSchema.parse(JSON.parse(x)),
113
+ `Failed to parse 'ListAlertsRequest' from JSON`,
114
+ );
115
+ }
116
+
117
+ /** @internal */
118
+ export const ListAlertsResponseBody$inboundSchema: z.ZodType<
119
+ ListAlertsResponseBody,
120
+ z.ZodTypeDef,
121
+ unknown
122
+ > = z.object({
123
+ pager: components.Pager$inboundSchema,
124
+ items: z.array(components.Alert$inboundSchema),
125
+ });
126
+
127
+ /** @internal */
128
+ export type ListAlertsResponseBody$Outbound = {
129
+ pager: components.Pager$Outbound;
130
+ items: Array<components.Alert$Outbound>;
131
+ };
132
+
133
+ /** @internal */
134
+ export const ListAlertsResponseBody$outboundSchema: z.ZodType<
135
+ ListAlertsResponseBody$Outbound,
136
+ z.ZodTypeDef,
137
+ ListAlertsResponseBody
138
+ > = z.object({
139
+ pager: components.Pager$outboundSchema,
140
+ items: z.array(components.Alert$outboundSchema),
141
+ });
142
+
143
+ /**
144
+ * @internal
145
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
146
+ */
147
+ export namespace ListAlertsResponseBody$ {
148
+ /** @deprecated use `ListAlertsResponseBody$inboundSchema` instead. */
149
+ export const inboundSchema = ListAlertsResponseBody$inboundSchema;
150
+ /** @deprecated use `ListAlertsResponseBody$outboundSchema` instead. */
151
+ export const outboundSchema = ListAlertsResponseBody$outboundSchema;
152
+ /** @deprecated use `ListAlertsResponseBody$Outbound` instead. */
153
+ export type Outbound = ListAlertsResponseBody$Outbound;
154
+ }
155
+
156
+ export function listAlertsResponseBodyToJSON(
157
+ listAlertsResponseBody: ListAlertsResponseBody,
158
+ ): string {
159
+ return JSON.stringify(
160
+ ListAlertsResponseBody$outboundSchema.parse(listAlertsResponseBody),
161
+ );
162
+ }
163
+
164
+ export function listAlertsResponseBodyFromJSON(
165
+ jsonString: string,
166
+ ): SafeParseResult<ListAlertsResponseBody, SDKValidationError> {
167
+ return safeParse(
168
+ jsonString,
169
+ (x) => ListAlertsResponseBody$inboundSchema.parse(JSON.parse(x)),
170
+ `Failed to parse 'ListAlertsResponseBody' from JSON`,
171
+ );
172
+ }
173
+
174
+ /** @internal */
175
+ export const ListAlertsResponse$inboundSchema: z.ZodType<
176
+ ListAlertsResponse,
177
+ z.ZodTypeDef,
178
+ unknown
179
+ > = z.object({
180
+ Result: z.lazy(() => ListAlertsResponseBody$inboundSchema),
181
+ }).transform((v) => {
182
+ return remap$(v, {
183
+ "Result": "result",
184
+ });
185
+ });
186
+
187
+ /** @internal */
188
+ export type ListAlertsResponse$Outbound = {
189
+ Result: ListAlertsResponseBody$Outbound;
190
+ };
191
+
192
+ /** @internal */
193
+ export const ListAlertsResponse$outboundSchema: z.ZodType<
194
+ ListAlertsResponse$Outbound,
195
+ z.ZodTypeDef,
196
+ ListAlertsResponse
197
+ > = z.object({
198
+ result: z.lazy(() => ListAlertsResponseBody$outboundSchema),
199
+ }).transform((v) => {
200
+ return remap$(v, {
201
+ result: "Result",
202
+ });
203
+ });
204
+
205
+ /**
206
+ * @internal
207
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
208
+ */
209
+ export namespace ListAlertsResponse$ {
210
+ /** @deprecated use `ListAlertsResponse$inboundSchema` instead. */
211
+ export const inboundSchema = ListAlertsResponse$inboundSchema;
212
+ /** @deprecated use `ListAlertsResponse$outboundSchema` instead. */
213
+ export const outboundSchema = ListAlertsResponse$outboundSchema;
214
+ /** @deprecated use `ListAlertsResponse$Outbound` instead. */
215
+ export type Outbound = ListAlertsResponse$Outbound;
216
+ }
217
+
218
+ export function listAlertsResponseToJSON(
219
+ listAlertsResponse: ListAlertsResponse,
220
+ ): string {
221
+ return JSON.stringify(
222
+ ListAlertsResponse$outboundSchema.parse(listAlertsResponse),
223
+ );
224
+ }
225
+
226
+ export function listAlertsResponseFromJSON(
227
+ jsonString: string,
228
+ ): SafeParseResult<ListAlertsResponse, SDKValidationError> {
229
+ return safeParse(
230
+ jsonString,
231
+ (x) => ListAlertsResponse$inboundSchema.parse(JSON.parse(x)),
232
+ `Failed to parse 'ListAlertsResponse' from JSON`,
233
+ );
234
+ }
@@ -11,6 +11,14 @@ import * as components from "../components/index.js";
11
11
  import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
12
 
13
13
  export type Two = {
14
+ /**
15
+ * The longitude of the current Geo coordinates
16
+ */
17
+ longitude?: any | undefined;
18
+ /**
19
+ * The latitude of the current Geo coordinates
20
+ */
21
+ latitude?: any | undefined;
14
22
  qrCode: string;
15
23
  zoneId: number;
16
24
  handoffId?: number | undefined;
@@ -42,6 +50,7 @@ export type One = {
42
50
  * The latitude of the current Geo coordinates
43
51
  */
44
52
  latitude?: any | undefined;
53
+ qrCode?: string | undefined;
45
54
  zoneId: number;
46
55
  handoffId?: number | undefined;
47
56
  vendorId?: number | undefined;
@@ -109,6 +118,8 @@ export type SecurityZoneCheckinResponseBody = {
109
118
  /** @internal */
110
119
  export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
111
120
  .object({
121
+ longitude: z.any().optional(),
122
+ latitude: z.any().optional(),
112
123
  qr_code: z.string(),
113
124
  zone_id: z.number().int(),
114
125
  handoff_id: z.number().int().optional(),
@@ -145,6 +156,8 @@ export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
145
156
 
146
157
  /** @internal */
147
158
  export type Two$Outbound = {
159
+ longitude?: any | undefined;
160
+ latitude?: any | undefined;
148
161
  qr_code: string;
149
162
  zone_id: number;
150
163
  handoff_id?: number | undefined;
@@ -167,6 +180,8 @@ export type Two$Outbound = {
167
180
  /** @internal */
168
181
  export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
169
182
  .object({
183
+ longitude: z.any().optional(),
184
+ latitude: z.any().optional(),
170
185
  qrCode: z.string(),
171
186
  zoneId: z.number().int(),
172
187
  handoffId: z.number().int().optional(),
@@ -233,6 +248,7 @@ export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
233
248
  .object({
234
249
  longitude: z.any().optional(),
235
250
  latitude: z.any().optional(),
251
+ qr_code: z.string().optional(),
236
252
  zone_id: z.number().int(),
237
253
  handoff_id: z.number().int().optional(),
238
254
  vendor_id: z.number().int().optional(),
@@ -251,6 +267,7 @@ export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
251
267
  temperature: z.number().optional(),
252
268
  }).transform((v) => {
253
269
  return remap$(v, {
270
+ "qr_code": "qrCode",
254
271
  "zone_id": "zoneId",
255
272
  "handoff_id": "handoffId",
256
273
  "vendor_id": "vendorId",
@@ -269,6 +286,7 @@ export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
269
286
  export type One$Outbound = {
270
287
  longitude?: any | undefined;
271
288
  latitude?: any | undefined;
289
+ qr_code?: string | undefined;
272
290
  zone_id: number;
273
291
  handoff_id?: number | undefined;
274
292
  vendor_id?: number | undefined;
@@ -292,6 +310,7 @@ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
292
310
  .object({
293
311
  longitude: z.any().optional(),
294
312
  latitude: z.any().optional(),
313
+ qrCode: z.string().optional(),
295
314
  zoneId: z.number().int(),
296
315
  handoffId: z.number().int().optional(),
297
316
  vendorId: z.number().int().optional(),
@@ -310,6 +329,7 @@ export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
310
329
  temperature: z.number().optional(),
311
330
  }).transform((v) => {
312
331
  return remap$(v, {
332
+ qrCode: "qr_code",
313
333
  zoneId: "zone_id",
314
334
  handoffId: "handoff_id",
315
335
  vendorId: "vendor_id",