@greensecurity/javascript-sdk 0.45.0-beta.15 → 0.45.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.
Files changed (238) hide show
  1. package/dist/commonjs/__tests__/vendors.test.js +1 -1
  2. package/dist/commonjs/__tests__/vendors.test.js.map +1 -1
  3. package/dist/commonjs/__tests__/webhooks.test.js +5 -6
  4. package/dist/commonjs/__tests__/webhooks.test.js.map +1 -1
  5. package/dist/commonjs/__tests__/zones.test.js +2 -27
  6. package/dist/commonjs/__tests__/zones.test.js.map +1 -1
  7. package/dist/commonjs/funcs/reportsGetFullReport.d.ts +3 -3
  8. package/dist/commonjs/funcs/reportsGetFullReport.js +3 -3
  9. package/dist/commonjs/funcs/usersPostAuthenticate.d.ts +37 -0
  10. package/dist/commonjs/funcs/usersPostAuthenticate.d.ts.map +1 -1
  11. package/dist/commonjs/funcs/usersPostAuthenticate.js +37 -0
  12. package/dist/commonjs/funcs/usersPostAuthenticate.js.map +1 -1
  13. package/dist/commonjs/funcs/validateWebhook.d.ts +1 -1
  14. package/dist/commonjs/funcs/validateWebhook.d.ts.map +1 -1
  15. package/dist/commonjs/funcs/validateWebhook.js +3 -0
  16. package/dist/commonjs/funcs/validateWebhook.js.map +1 -1
  17. package/dist/commonjs/funcs/vendorsSendDownloadCode.js +1 -1
  18. package/dist/commonjs/funcs/vendorsSendDownloadCode.js.map +1 -1
  19. package/dist/commonjs/lib/config.d.ts +2 -2
  20. package/dist/commonjs/lib/config.js +2 -2
  21. package/dist/commonjs/models/components/authenticatesuccessresponse.d.ts +91 -0
  22. package/dist/commonjs/models/components/authenticatesuccessresponse.d.ts.map +1 -0
  23. package/dist/commonjs/models/components/authenticatesuccessresponse.js +100 -0
  24. package/dist/commonjs/models/components/authenticatesuccessresponse.js.map +1 -0
  25. package/dist/commonjs/models/components/fullreport.d.ts +107 -0
  26. package/dist/commonjs/models/components/fullreport.d.ts.map +1 -0
  27. package/dist/commonjs/models/components/fullreport.js +125 -0
  28. package/dist/commonjs/models/components/fullreport.js.map +1 -0
  29. package/dist/commonjs/models/components/index.d.ts +3 -0
  30. package/dist/commonjs/models/components/index.d.ts.map +1 -1
  31. package/dist/commonjs/models/components/index.js +3 -0
  32. package/dist/commonjs/models/components/index.js.map +1 -1
  33. package/dist/commonjs/models/components/loginemailandpassword.d.ts +34 -0
  34. package/dist/commonjs/models/components/loginemailandpassword.d.ts.map +1 -1
  35. package/dist/commonjs/models/components/loginemailandpassword.js +2 -0
  36. package/dist/commonjs/models/components/loginemailandpassword.js.map +1 -1
  37. package/dist/commonjs/models/components/loginrequirementsfromemail.d.ts +34 -0
  38. package/dist/commonjs/models/components/loginrequirementsfromemail.d.ts.map +1 -1
  39. package/dist/commonjs/models/components/loginrequirementsfromemail.js +2 -0
  40. package/dist/commonjs/models/components/loginrequirementsfromemail.js.map +1 -1
  41. package/dist/commonjs/models/components/mfarequiredresponse.d.ts +33 -0
  42. package/dist/commonjs/models/components/mfarequiredresponse.d.ts.map +1 -1
  43. package/dist/commonjs/models/components/mfarequiredresponse.js +2 -0
  44. package/dist/commonjs/models/components/mfarequiredresponse.js.map +1 -1
  45. package/dist/commonjs/models/components/passwordnotsetresponse.d.ts +34 -1
  46. package/dist/commonjs/models/components/passwordnotsetresponse.d.ts.map +1 -1
  47. package/dist/commonjs/models/components/passwordnotsetresponse.js +2 -0
  48. package/dist/commonjs/models/components/passwordnotsetresponse.js.map +1 -1
  49. package/dist/commonjs/models/components/passwordrequiredresponse.d.ts +33 -0
  50. package/dist/commonjs/models/components/passwordrequiredresponse.d.ts.map +1 -1
  51. package/dist/commonjs/models/components/passwordrequiredresponse.js +6 -0
  52. package/dist/commonjs/models/components/passwordrequiredresponse.js.map +1 -1
  53. package/dist/commonjs/models/components/samlloginrequiredresponse.d.ts +33 -0
  54. package/dist/commonjs/models/components/samlloginrequiredresponse.d.ts.map +1 -1
  55. package/dist/commonjs/models/components/samlloginrequiredresponse.js +2 -0
  56. package/dist/commonjs/models/components/samlloginrequiredresponse.js.map +1 -1
  57. package/dist/commonjs/models/components/ssocontinuation.d.ts +44 -0
  58. package/dist/commonjs/models/components/ssocontinuation.d.ts.map +1 -0
  59. package/dist/commonjs/models/components/ssocontinuation.js +56 -0
  60. package/dist/commonjs/models/components/ssocontinuation.js.map +1 -0
  61. package/dist/commonjs/models/components/webhooksubscription.d.ts +3 -0
  62. package/dist/commonjs/models/components/webhooksubscription.d.ts.map +1 -1
  63. package/dist/commonjs/models/components/webhooksubscription.js +3 -0
  64. package/dist/commonjs/models/components/webhooksubscription.js.map +1 -1
  65. package/dist/commonjs/models/components/webhooksubscriptiondetail.d.ts +1 -0
  66. package/dist/commonjs/models/components/webhooksubscriptiondetail.d.ts.map +1 -1
  67. package/dist/commonjs/models/components/webhooksubscriptiondetail.js +1 -0
  68. package/dist/commonjs/models/components/webhooksubscriptiondetail.js.map +1 -1
  69. package/dist/commonjs/models/operations/postauthenticate.d.ts +1 -1
  70. package/dist/commonjs/models/operations/postauthenticate.d.ts.map +1 -1
  71. package/dist/commonjs/models/operations/postauthenticate.js +1 -1
  72. package/dist/commonjs/models/operations/postauthenticate.js.map +1 -1
  73. package/dist/commonjs/models/webhooks/index.d.ts +3 -0
  74. package/dist/commonjs/models/webhooks/index.d.ts.map +1 -1
  75. package/dist/commonjs/models/webhooks/index.js +3 -0
  76. package/dist/commonjs/models/webhooks/index.js.map +1 -1
  77. package/dist/commonjs/models/webhooks/sendfullreportcreated.d.ts +42 -0
  78. package/dist/commonjs/models/webhooks/sendfullreportcreated.d.ts.map +1 -0
  79. package/dist/commonjs/models/webhooks/sendfullreportcreated.js +85 -0
  80. package/dist/commonjs/models/webhooks/sendfullreportcreated.js.map +1 -0
  81. package/dist/commonjs/models/webhooks/sendfullreportdestroyed.d.ts +42 -0
  82. package/dist/commonjs/models/webhooks/sendfullreportdestroyed.d.ts.map +1 -0
  83. package/dist/commonjs/models/webhooks/sendfullreportdestroyed.js +85 -0
  84. package/dist/commonjs/models/webhooks/sendfullreportdestroyed.js.map +1 -0
  85. package/dist/commonjs/models/webhooks/sendfullreportupdated.d.ts +42 -0
  86. package/dist/commonjs/models/webhooks/sendfullreportupdated.d.ts.map +1 -0
  87. package/dist/commonjs/models/webhooks/sendfullreportupdated.js +85 -0
  88. package/dist/commonjs/models/webhooks/sendfullreportupdated.js.map +1 -0
  89. package/dist/commonjs/react-query/reportsGetFullReport.d.ts +6 -6
  90. package/dist/commonjs/react-query/reportsGetFullReport.js +6 -6
  91. package/dist/commonjs/react-query/usersPostAuthenticate.d.ts +37 -0
  92. package/dist/commonjs/react-query/usersPostAuthenticate.d.ts.map +1 -1
  93. package/dist/commonjs/react-query/usersPostAuthenticate.js +37 -0
  94. package/dist/commonjs/react-query/usersPostAuthenticate.js.map +1 -1
  95. package/dist/commonjs/sdk/reports.d.ts +3 -3
  96. package/dist/commonjs/sdk/reports.js +3 -3
  97. package/dist/commonjs/sdk/sdk.d.ts +1 -1
  98. package/dist/commonjs/sdk/sdk.d.ts.map +1 -1
  99. package/dist/commonjs/sdk/sdk.js.map +1 -1
  100. package/dist/commonjs/sdk/users.d.ts +37 -0
  101. package/dist/commonjs/sdk/users.d.ts.map +1 -1
  102. package/dist/commonjs/sdk/users.js +37 -0
  103. package/dist/commonjs/sdk/users.js.map +1 -1
  104. package/dist/esm/__tests__/vendors.test.js +1 -1
  105. package/dist/esm/__tests__/vendors.test.js.map +1 -1
  106. package/dist/esm/__tests__/webhooks.test.js +5 -6
  107. package/dist/esm/__tests__/webhooks.test.js.map +1 -1
  108. package/dist/esm/__tests__/zones.test.js +2 -27
  109. package/dist/esm/__tests__/zones.test.js.map +1 -1
  110. package/dist/esm/funcs/reportsGetFullReport.d.ts +3 -3
  111. package/dist/esm/funcs/reportsGetFullReport.js +3 -3
  112. package/dist/esm/funcs/usersPostAuthenticate.d.ts +37 -0
  113. package/dist/esm/funcs/usersPostAuthenticate.d.ts.map +1 -1
  114. package/dist/esm/funcs/usersPostAuthenticate.js +37 -0
  115. package/dist/esm/funcs/usersPostAuthenticate.js.map +1 -1
  116. package/dist/esm/funcs/validateWebhook.d.ts +1 -1
  117. package/dist/esm/funcs/validateWebhook.d.ts.map +1 -1
  118. package/dist/esm/funcs/validateWebhook.js +3 -0
  119. package/dist/esm/funcs/validateWebhook.js.map +1 -1
  120. package/dist/esm/funcs/vendorsSendDownloadCode.js +1 -1
  121. package/dist/esm/funcs/vendorsSendDownloadCode.js.map +1 -1
  122. package/dist/esm/lib/config.d.ts +2 -2
  123. package/dist/esm/lib/config.js +2 -2
  124. package/dist/esm/models/components/authenticatesuccessresponse.d.ts +91 -0
  125. package/dist/esm/models/components/authenticatesuccessresponse.d.ts.map +1 -0
  126. package/dist/esm/models/components/authenticatesuccessresponse.js +61 -0
  127. package/dist/esm/models/components/authenticatesuccessresponse.js.map +1 -0
  128. package/dist/esm/models/components/fullreport.d.ts +107 -0
  129. package/dist/esm/models/components/fullreport.d.ts.map +1 -0
  130. package/dist/esm/models/components/fullreport.js +87 -0
  131. package/dist/esm/models/components/fullreport.js.map +1 -0
  132. package/dist/esm/models/components/index.d.ts +3 -0
  133. package/dist/esm/models/components/index.d.ts.map +1 -1
  134. package/dist/esm/models/components/index.js +3 -0
  135. package/dist/esm/models/components/index.js.map +1 -1
  136. package/dist/esm/models/components/loginemailandpassword.d.ts +34 -0
  137. package/dist/esm/models/components/loginemailandpassword.d.ts.map +1 -1
  138. package/dist/esm/models/components/loginemailandpassword.js +2 -0
  139. package/dist/esm/models/components/loginemailandpassword.js.map +1 -1
  140. package/dist/esm/models/components/loginrequirementsfromemail.d.ts +34 -0
  141. package/dist/esm/models/components/loginrequirementsfromemail.d.ts.map +1 -1
  142. package/dist/esm/models/components/loginrequirementsfromemail.js +2 -0
  143. package/dist/esm/models/components/loginrequirementsfromemail.js.map +1 -1
  144. package/dist/esm/models/components/mfarequiredresponse.d.ts +33 -0
  145. package/dist/esm/models/components/mfarequiredresponse.d.ts.map +1 -1
  146. package/dist/esm/models/components/mfarequiredresponse.js +2 -0
  147. package/dist/esm/models/components/mfarequiredresponse.js.map +1 -1
  148. package/dist/esm/models/components/passwordnotsetresponse.d.ts +34 -1
  149. package/dist/esm/models/components/passwordnotsetresponse.d.ts.map +1 -1
  150. package/dist/esm/models/components/passwordnotsetresponse.js +2 -0
  151. package/dist/esm/models/components/passwordnotsetresponse.js.map +1 -1
  152. package/dist/esm/models/components/passwordrequiredresponse.d.ts +33 -0
  153. package/dist/esm/models/components/passwordrequiredresponse.d.ts.map +1 -1
  154. package/dist/esm/models/components/passwordrequiredresponse.js +6 -0
  155. package/dist/esm/models/components/passwordrequiredresponse.js.map +1 -1
  156. package/dist/esm/models/components/samlloginrequiredresponse.d.ts +33 -0
  157. package/dist/esm/models/components/samlloginrequiredresponse.d.ts.map +1 -1
  158. package/dist/esm/models/components/samlloginrequiredresponse.js +2 -0
  159. package/dist/esm/models/components/samlloginrequiredresponse.js.map +1 -1
  160. package/dist/esm/models/components/ssocontinuation.d.ts +44 -0
  161. package/dist/esm/models/components/ssocontinuation.d.ts.map +1 -0
  162. package/dist/esm/models/components/ssocontinuation.js +19 -0
  163. package/dist/esm/models/components/ssocontinuation.js.map +1 -0
  164. package/dist/esm/models/components/webhooksubscription.d.ts +3 -0
  165. package/dist/esm/models/components/webhooksubscription.d.ts.map +1 -1
  166. package/dist/esm/models/components/webhooksubscription.js +3 -0
  167. package/dist/esm/models/components/webhooksubscription.js.map +1 -1
  168. package/dist/esm/models/components/webhooksubscriptiondetail.d.ts +1 -0
  169. package/dist/esm/models/components/webhooksubscriptiondetail.d.ts.map +1 -1
  170. package/dist/esm/models/components/webhooksubscriptiondetail.js +1 -0
  171. package/dist/esm/models/components/webhooksubscriptiondetail.js.map +1 -1
  172. package/dist/esm/models/operations/postauthenticate.d.ts +1 -1
  173. package/dist/esm/models/operations/postauthenticate.d.ts.map +1 -1
  174. package/dist/esm/models/operations/postauthenticate.js +1 -1
  175. package/dist/esm/models/operations/postauthenticate.js.map +1 -1
  176. package/dist/esm/models/webhooks/index.d.ts +3 -0
  177. package/dist/esm/models/webhooks/index.d.ts.map +1 -1
  178. package/dist/esm/models/webhooks/index.js +3 -0
  179. package/dist/esm/models/webhooks/index.js.map +1 -1
  180. package/dist/esm/models/webhooks/sendfullreportcreated.d.ts +42 -0
  181. package/dist/esm/models/webhooks/sendfullreportcreated.d.ts.map +1 -0
  182. package/dist/esm/models/webhooks/sendfullreportcreated.js +47 -0
  183. package/dist/esm/models/webhooks/sendfullreportcreated.js.map +1 -0
  184. package/dist/esm/models/webhooks/sendfullreportdestroyed.d.ts +42 -0
  185. package/dist/esm/models/webhooks/sendfullreportdestroyed.d.ts.map +1 -0
  186. package/dist/esm/models/webhooks/sendfullreportdestroyed.js +47 -0
  187. package/dist/esm/models/webhooks/sendfullreportdestroyed.js.map +1 -0
  188. package/dist/esm/models/webhooks/sendfullreportupdated.d.ts +42 -0
  189. package/dist/esm/models/webhooks/sendfullreportupdated.d.ts.map +1 -0
  190. package/dist/esm/models/webhooks/sendfullreportupdated.js +47 -0
  191. package/dist/esm/models/webhooks/sendfullreportupdated.js.map +1 -0
  192. package/dist/esm/react-query/reportsGetFullReport.d.ts +6 -6
  193. package/dist/esm/react-query/reportsGetFullReport.js +6 -6
  194. package/dist/esm/react-query/usersPostAuthenticate.d.ts +37 -0
  195. package/dist/esm/react-query/usersPostAuthenticate.d.ts.map +1 -1
  196. package/dist/esm/react-query/usersPostAuthenticate.js +37 -0
  197. package/dist/esm/react-query/usersPostAuthenticate.js.map +1 -1
  198. package/dist/esm/sdk/reports.d.ts +3 -3
  199. package/dist/esm/sdk/reports.js +3 -3
  200. package/dist/esm/sdk/sdk.d.ts +1 -1
  201. package/dist/esm/sdk/sdk.d.ts.map +1 -1
  202. package/dist/esm/sdk/sdk.js.map +1 -1
  203. package/dist/esm/sdk/users.d.ts +37 -0
  204. package/dist/esm/sdk/users.d.ts.map +1 -1
  205. package/dist/esm/sdk/users.js +37 -0
  206. package/dist/esm/sdk/users.js.map +1 -1
  207. package/jsr.json +1 -1
  208. package/package.json +1 -1
  209. package/src/__tests__/vendors.test.ts +1 -1
  210. package/src/__tests__/webhooks.test.ts +5 -6
  211. package/src/__tests__/zones.test.ts +2 -27
  212. package/src/funcs/reportsGetFullReport.ts +3 -3
  213. package/src/funcs/usersPostAuthenticate.ts +37 -0
  214. package/src/funcs/validateWebhook.ts +6 -0
  215. package/src/funcs/vendorsSendDownloadCode.ts +1 -0
  216. package/src/lib/config.ts +2 -2
  217. package/src/models/components/authenticatesuccessresponse.ts +189 -0
  218. package/src/models/components/fullreport.ts +193 -0
  219. package/src/models/components/index.ts +3 -0
  220. package/src/models/components/loginemailandpassword.ts +36 -0
  221. package/src/models/components/loginrequirementsfromemail.ts +36 -0
  222. package/src/models/components/mfarequiredresponse.ts +35 -0
  223. package/src/models/components/passwordnotsetresponse.ts +36 -1
  224. package/src/models/components/passwordrequiredresponse.ts +39 -0
  225. package/src/models/components/samlloginrequiredresponse.ts +35 -0
  226. package/src/models/components/ssocontinuation.ts +71 -0
  227. package/src/models/components/webhooksubscription.ts +3 -0
  228. package/src/models/components/webhooksubscriptiondetail.ts +1 -0
  229. package/src/models/operations/postauthenticate.ts +2 -2
  230. package/src/models/webhooks/index.ts +3 -0
  231. package/src/models/webhooks/sendfullreportcreated.ts +104 -0
  232. package/src/models/webhooks/sendfullreportdestroyed.ts +104 -0
  233. package/src/models/webhooks/sendfullreportupdated.ts +104 -0
  234. package/src/react-query/reportsGetFullReport.ts +6 -6
  235. package/src/react-query/usersPostAuthenticate.ts +37 -0
  236. package/src/sdk/reports.ts +3 -3
  237. package/src/sdk/sdk.ts +3 -0
  238. package/src/sdk/users.ts +37 -0
@@ -1 +1 @@
1
- {"version":3,"file":"users.js","sourceRoot":"","sources":["../../../src/sdk/users.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,mBAAmB,EAAE,MAAM,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CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,oBAAoB,CACxB,OAAmD,EACnD,OAAwB;QAExB,OAAO,WAAW,CAAC,yBAAyB,CAC1C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;OAMG;IACH,KAAK,CAAC,QAAQ,CACZ,OAAuC,EACvC,OAAwB;QAExB,OAAO,WAAW,CAAC,aAAa,CAC9B,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,cAAc,CAClB,OAAyC,EACzC,OAAwB;QAExB,OAAO,WAAW,CAAC,mBAAmB,CACpC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,wBAAwB,CAC5B,OAAmD,EACnD,OAAwB;QAExB,OAAO,WAAW,CAAC,6BAA6B,CAC9C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "@greensecurity/javascript-sdk",
5
- "version": "0.45.0-beta.15",
5
+ "version": "0.45.0-beta.17",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greensecurity/javascript-sdk",
3
- "version": "0.45.0-beta.15",
3
+ "version": "0.45.0-beta.17",
4
4
  "author": "Green Security LLC",
5
5
  "type": "module",
6
6
  "tshy": {
@@ -121,7 +121,7 @@ test("Vendors List Vendor Credits", async () => {
121
121
  page: 1,
122
122
  useUrlParams: false,
123
123
  },
124
- creditBalance: 5264.18,
124
+ creditBalance: 473.87,
125
125
  });
126
126
  });
127
127
 
@@ -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: true,
23
+ desc: 0,
24
24
  sort: "",
25
25
  });
26
26
  expect(testWebhookListForVendorUserResult).toBeDefined();
@@ -62,11 +62,10 @@ test("Webhooks Updates The Webhook Endpoint With The Given Id", async () => {
62
62
  id: 220782,
63
63
  webhookEndpointUpdate: {
64
64
  webhookUrl: "https://example.com/webhook/incoming",
65
- subscriptions: {
66
- model: "Vendor",
67
- action: "updated",
68
- expands: "vendor.company,vendor.user",
69
- },
65
+ subscriptions: [
66
+ "Vendor.updated",
67
+ "Vendor.created",
68
+ ],
70
69
  consumers: {
71
70
  systemId: 1,
72
71
  facilityId: 1,
@@ -39,32 +39,7 @@ test("Zones List Or Search Security Zones", async () => {
39
39
  facility: {},
40
40
  },
41
41
  {
42
- facility: {
43
- contacts: {
44
- contact: {
45
- status: "Active",
46
- department: 123,
47
- },
48
- adminContact: {
49
- status: "Inactive",
50
- department: 123,
51
- },
52
- techContact: {
53
- status: "Active",
54
- department: 123,
55
- },
56
- greenSecurityCsm: {
57
- status: "Active",
58
- department: 123,
59
- },
60
- accountManager: null,
61
- },
62
- vendorGuestPolicy: {
63
- enabled: false,
64
- vendorGuestLimitAndOr: "and",
65
- vendorGuestRequireEmail: true,
66
- },
67
- },
42
+ facility: {},
68
43
  },
69
44
  ],
70
45
  });
@@ -83,7 +58,7 @@ test("Zones Security Zone Checkin", async () => {
83
58
 
84
59
  const result = await greenSecurity.zones.securityZoneCheckin({
85
60
  qrCode: "<value>",
86
- zoneId: 776072,
61
+ zoneId: 997849,
87
62
  });
88
63
  expect(result).toBeDefined();
89
64
  expect(result).toEqual({});
@@ -45,9 +45,9 @@ import { Result } from "../types/fp.js";
45
45
  * | `404` | No such run, or it is outside your access scope. | Stop. |
46
46
  * | `403` | Your account is locked, or lacks the `scheduled_reports` view permission. | Stop. |
47
47
  *
48
- * **Bound your polling.** A `409` is not a promise that the run will finish. Report
49
- * generation has no terminal failure state today, so a run whose generation crashed part way
50
- * through stays in `processing` and keeps answering `409` indefinitely. Apply your own
48
+ * **Bound your polling.** A `409` is not a promise that the run will finish. A run that fails
49
+ * while generating is now recorded as `failed` and answers `422`, but a run whose worker died
50
+ * outright still stays in `processing` and keeps answering `409` indefinitely. Apply your own
51
51
  * timeout or maximum attempt count and treat exhaustion as a failure; do not retry forever.
52
52
  *
53
53
  * Access control: the URL's `full_report_id` must be in the caller's read scope for
@@ -60,6 +60,43 @@ import { Result } from "../types/fp.js";
60
60
  * 3. Site redirects to your selected `return_url`
61
61
  * 4. The `user_token` will be appended as a query string parameter to your `return_url` - you must parse this token and store it
62
62
  * 5. Fetch the user object from `/users/me` using the token
63
+ *
64
+ * ## Finishing a "Login with Green Security" flow
65
+ *
66
+ * Green Security is also a SAML2 **identity provider**. When a third-party service provider sends a user to
67
+ * `/saml/idp/sso` to sign in with their Green Security account, the user lands on a Green Security login screen
68
+ * carrying an `sso_state` query string parameter. That parameter is a signed, five-minute record of which service
69
+ * provider is waiting, where its assertion consumer service lives, and what `RelayState` it sent.
70
+ *
71
+ * Authentication itself is unchanged - the user may still need a password, an MFA code, a magic link or a round trip
72
+ * to their own SAML IdP, and every `requires` value above applies as normal. The only difference is that you must
73
+ * echo `sso_state` back on **every** call in the sequence, unchanged, including the follow-up that carries the
74
+ * `mfa_code`.
75
+ *
76
+ * Each `202` response carries the verified blob back to you in its own top-level `sso_state` field. Send back the
77
+ * value from the response you just received rather than the one you started with. The two are normally the same
78
+ * string, but re-sending your original copy is how a blob the server has already rejected gets resent, and it forces
79
+ * you to hold login state you would otherwise not need.
80
+ *
81
+ * 1. Read `sso_state` from the query string of the login screen you were sent to
82
+ * 2. Run the login exactly as you would otherwise, adding `sso_state` to each request body and taking the value for
83
+ * the next request from the previous `202` response
84
+ * 3. On the `200` response, read `sso.continue_url`
85
+ * 4. Navigate the browser to `sso.continue_url` - a full page navigation, not a background fetch. It answers with a
86
+ * self-submitting form that delivers the signed `SAMLResponse` and the original `RelayState` to the service
87
+ * provider
88
+ * 5. The service provider validates the assertion and the user is signed in on their side
89
+ *
90
+ * On the `password_reset` leg the blob is **also** appended to `redirect_url` as a query parameter, alongside
91
+ * `return_url`. The browser follows that redirect and leaves the JSON body behind, so anything the remaining legs of
92
+ * the login still need has to ride the URL. Preserve the query string exactly as given.
93
+ *
94
+ * An invalid `sso_state` never fails a login. A forged, edited or expired blob is silently dropped and the request is
95
+ * then treated as an ordinary login, so valid credentials still return `200` - just with no `sso` object. Check for
96
+ * `sso` explicitly rather than reading `200` as proof the hand-off survived. When it is absent, do not retry with the
97
+ * same blob; the user has to start again from the service provider. See the
98
+ * [Login with Green Security](https://greensecurity.apidocumentation.com/guides/sso-login-with-green-security)
99
+ * guide for the service provider half of this flow.
63
100
  */
64
101
  export function usersPostAuthenticate(
65
102
  client: GreenSecurityCore,
@@ -21,6 +21,9 @@ export async function validateWebhook(client: GreenSecurityCore, {
21
21
  secret: string;
22
22
  }): Promise<
23
23
  Result<
24
+ | webhooks.SendFullReportCreatedRequest
25
+ | webhooks.SendFullReportUpdatedRequest
26
+ | webhooks.SendFullReportDestroyedRequest
24
27
  | webhooks.SendVendorCreatedRequest
25
28
  | webhooks.SendVendorUpdatedRequest
26
29
  | webhooks.SendVendorDestroyedRequest
@@ -43,6 +46,9 @@ export async function validateWebhook(client: GreenSecurityCore, {
43
46
  }
44
47
  const jsonString = await request.text();
45
48
  const knownSchemas = [
49
+ webhooks.sendFullReportCreatedRequestFromJSON,
50
+ webhooks.sendFullReportUpdatedRequestFromJSON,
51
+ webhooks.sendFullReportDestroyedRequestFromJSON,
46
52
  webhooks.sendVendorCreatedRequestFromJSON,
47
53
  webhooks.sendVendorUpdatedRequestFromJSON,
48
54
  webhooks.sendVendorDestroyedRequestFromJSON,
@@ -171,6 +171,7 @@ async function $do(
171
171
  >(
172
172
  M.json(200, types$.boolean()),
173
173
  M.jsonErr([400, 401, 403, 404], errors.ApiErrorResponse$inboundSchema),
174
+ M.jsonErr(503, errors.ApiErrorResponse$inboundSchema),
174
175
  M.fail("4XX"),
175
176
  M.fail([500, "5XX"]),
176
177
  )(response, req, { extraFields: responseFields });
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.45.0",
83
- sdkVersion: "0.45.0-beta.15",
83
+ sdkVersion: "0.45.0-beta.17",
84
84
  genVersion: "2.935.1",
85
85
  userAgent:
86
- "speakeasy-sdk/typescript 0.45.0-beta.15 2.935.1 0.45.0 @greensecurity/javascript-sdk",
86
+ "speakeasy-sdk/typescript 0.45.0-beta.17 2.935.1 0.45.0 @greensecurity/javascript-sdk",
87
87
  } as const;
@@ -0,0 +1,189 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import * as openEnums from "../../types/enums.js";
9
+ import { OpenEnum } from "../../types/enums.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
+ import { Company, Company$inboundSchema } from "./company.js";
14
+ import { Contact, Contact$inboundSchema } from "./contact.js";
15
+ import {
16
+ SsoContinuation,
17
+ SsoContinuation$inboundSchema,
18
+ } from "./ssocontinuation.js";
19
+ import { UserDetails, UserDetails$inboundSchema } from "./userdetails.js";
20
+ import { Vendor, Vendor$inboundSchema } from "./vendor.js";
21
+
22
+ /**
23
+ * A `permanent` user token can be used to access any API endpoint as the logged in user. A `one time` token is used to authenticate the user once.
24
+ */
25
+ export const AuthenticateSuccessResponseTokenType = {
26
+ Permanent: "permanent",
27
+ OneTime: "one time",
28
+ } as const;
29
+ /**
30
+ * A `permanent` user token can be used to access any API endpoint as the logged in user. A `one time` token is used to authenticate the user once.
31
+ */
32
+ export type AuthenticateSuccessResponseTokenType = OpenEnum<
33
+ typeof AuthenticateSuccessResponseTokenType
34
+ >;
35
+
36
+ export type AuthenticateSuccessResponseUserToken = {
37
+ /**
38
+ * This token can be passed in authorization headers for this user.
39
+ */
40
+ token: string;
41
+ /**
42
+ * A `permanent` user token can be used to access any API endpoint as the logged in user. A `one time` token is used to authenticate the user once.
43
+ */
44
+ tokenType: AuthenticateSuccessResponseTokenType;
45
+ };
46
+
47
+ export type AuthenticateSuccessResponseInventoryManager = {};
48
+
49
+ /**
50
+ * A completed login. Identical to the `User` object returned everywhere
51
+ *
52
+ * @remarks
53
+ * else, plus an `sso` object when the request carried a valid `sso_state`
54
+ * and the login therefore has a SAML flow waiting to be finished.
55
+ */
56
+ export type AuthenticateSuccessResponse = {
57
+ /**
58
+ * A `gatekeeper` is a special type of service user. This type of service user is assigned to Kiosks and Apps to verify Vendors using APIs that have some access to facility data.
59
+ */
60
+ isGatekeeper?: boolean | undefined;
61
+ success: boolean;
62
+ /**
63
+ * Core user profile fields returned by user detail and update endpoints.
64
+ */
65
+ user: UserDetails;
66
+ userToken: AuthenticateSuccessResponseUserToken;
67
+ /**
68
+ * Vendor details
69
+ */
70
+ vendor?: Vendor | undefined;
71
+ inventoryManager?: AuthenticateSuccessResponseInventoryManager | undefined;
72
+ /**
73
+ * This object represents a contact at the system or facility level. Use it to verify vendors, create appointments, or check in visitors.
74
+ */
75
+ contact?: Contact | null | undefined;
76
+ /**
77
+ * A simplified representation of a Company, typically used in list views.
78
+ */
79
+ company?: Company | null | undefined;
80
+ /**
81
+ * Where to send the browser to finish a "Login with Green Security" flow.
82
+ *
83
+ * @remarks
84
+ *
85
+ * Present on a `200` from `POST /users/authenticate` only when the request
86
+ * carried a valid, unexpired `sso_state`. Its absence means the login
87
+ * succeeded but the SAML flow did not resume — treat the login as an
88
+ * ordinary one rather than retrying.
89
+ *
90
+ * This object is additive. The login itself is unaffected by it: the
91
+ * caller's own permanent token is in `user_token` exactly as it would be on
92
+ * any other successful authentication, and it is not the token embedded in
93
+ * `continue_url`.
94
+ */
95
+ sso?: SsoContinuation | undefined;
96
+ };
97
+
98
+ /** @internal */
99
+ export const AuthenticateSuccessResponseTokenType$inboundSchema: z.ZodType<
100
+ AuthenticateSuccessResponseTokenType,
101
+ z.ZodTypeDef,
102
+ unknown
103
+ > = openEnums.inboundSchema(AuthenticateSuccessResponseTokenType);
104
+
105
+ /** @internal */
106
+ export const AuthenticateSuccessResponseUserToken$inboundSchema: z.ZodType<
107
+ AuthenticateSuccessResponseUserToken,
108
+ z.ZodTypeDef,
109
+ unknown
110
+ > = z.object({
111
+ token: types.string(),
112
+ token_type: AuthenticateSuccessResponseTokenType$inboundSchema.default(
113
+ "permanent",
114
+ ),
115
+ }).transform((v) => {
116
+ return remap$(v, {
117
+ "token_type": "tokenType",
118
+ });
119
+ });
120
+
121
+ export function authenticateSuccessResponseUserTokenFromJSON(
122
+ jsonString: string,
123
+ ): SafeParseResult<AuthenticateSuccessResponseUserToken, SDKValidationError> {
124
+ return safeParse(
125
+ jsonString,
126
+ (x) =>
127
+ AuthenticateSuccessResponseUserToken$inboundSchema.parse(JSON.parse(x)),
128
+ `Failed to parse 'AuthenticateSuccessResponseUserToken' from JSON`,
129
+ );
130
+ }
131
+
132
+ /** @internal */
133
+ export const AuthenticateSuccessResponseInventoryManager$inboundSchema:
134
+ z.ZodType<
135
+ AuthenticateSuccessResponseInventoryManager,
136
+ z.ZodTypeDef,
137
+ unknown
138
+ > = z.object({});
139
+
140
+ export function authenticateSuccessResponseInventoryManagerFromJSON(
141
+ jsonString: string,
142
+ ): SafeParseResult<
143
+ AuthenticateSuccessResponseInventoryManager,
144
+ SDKValidationError
145
+ > {
146
+ return safeParse(
147
+ jsonString,
148
+ (x) =>
149
+ AuthenticateSuccessResponseInventoryManager$inboundSchema.parse(
150
+ JSON.parse(x),
151
+ ),
152
+ `Failed to parse 'AuthenticateSuccessResponseInventoryManager' from JSON`,
153
+ );
154
+ }
155
+
156
+ /** @internal */
157
+ export const AuthenticateSuccessResponse$inboundSchema: z.ZodType<
158
+ AuthenticateSuccessResponse,
159
+ z.ZodTypeDef,
160
+ unknown
161
+ > = z.object({
162
+ is_gatekeeper: types.optional(types.boolean()),
163
+ success: types.boolean(),
164
+ user: UserDetails$inboundSchema,
165
+ user_token: z.lazy(() => AuthenticateSuccessResponseUserToken$inboundSchema),
166
+ vendor: types.optional(Vendor$inboundSchema),
167
+ inventory_manager: types.optional(
168
+ z.lazy(() => AuthenticateSuccessResponseInventoryManager$inboundSchema),
169
+ ),
170
+ contact: z.nullable(Contact$inboundSchema).optional(),
171
+ company: z.nullable(Company$inboundSchema).optional(),
172
+ sso: types.optional(SsoContinuation$inboundSchema),
173
+ }).transform((v) => {
174
+ return remap$(v, {
175
+ "is_gatekeeper": "isGatekeeper",
176
+ "user_token": "userToken",
177
+ "inventory_manager": "inventoryManager",
178
+ });
179
+ });
180
+
181
+ export function authenticateSuccessResponseFromJSON(
182
+ jsonString: string,
183
+ ): SafeParseResult<AuthenticateSuccessResponse, SDKValidationError> {
184
+ return safeParse(
185
+ jsonString,
186
+ (x) => AuthenticateSuccessResponse$inboundSchema.parse(JSON.parse(x)),
187
+ `Failed to parse 'AuthenticateSuccessResponse' from JSON`,
188
+ );
189
+ }
@@ -0,0 +1,193 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod/v3";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { ClosedEnum } from "../../types/enums.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import * as types from "../../types/primitives.js";
11
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
12
+
13
+ /**
14
+ * Where the run ended up. A delivery of `FullReport.created` only ever carries a
15
+ *
16
+ * @remarks
17
+ * terminal value; the others are states a run passes through.
18
+ */
19
+ export const FullReportStatus = {
20
+ Pending: "pending",
21
+ Processing: "processing",
22
+ Completed: "completed",
23
+ Canceled: "canceled",
24
+ Failed: "failed",
25
+ } as const;
26
+ /**
27
+ * Where the run ended up. A delivery of `FullReport.created` only ever carries a
28
+ *
29
+ * @remarks
30
+ * terminal value; the others are states a run passes through.
31
+ */
32
+ export type FullReportStatus = ClosedEnum<typeof FullReportStatus>;
33
+
34
+ /**
35
+ * One run of a report, generated on request or by a schedule. Carries the run's own state
36
+ *
37
+ * @remarks
38
+ * plus which report it was and a short-lived signed link to the file it produced.
39
+ */
40
+ export type FullReport = {
41
+ id: number;
42
+ /**
43
+ * Where the run ended up. A delivery of `FullReport.created` only ever carries a
44
+ *
45
+ * @remarks
46
+ * terminal value; the others are states a run passes through.
47
+ */
48
+ status: FullReportStatus;
49
+ /**
50
+ * The report that was run, e.g. `Reports::SqlQueryReport`.
51
+ */
52
+ reportClass: string;
53
+ /**
54
+ * The subject line of the schedule that produced this run. Null for a run that was
55
+ *
56
+ * @remarks
57
+ * generated on request rather than by a schedule.
58
+ */
59
+ name?: string | null | undefined;
60
+ /**
61
+ * Signed download link, valid for 2 hours from the moment the delivery was built and
62
+ *
63
+ * @remarks
64
+ * minted fresh for each delivery. Null when the run produced no file, which is every
65
+ * non-`completed` status.
66
+ */
67
+ reportUrl?: string | null | undefined;
68
+ dateSubmitted?: Date | null | undefined;
69
+ /**
70
+ * When the run started generating.
71
+ */
72
+ dateCreated?: Date | null | undefined;
73
+ /**
74
+ * When the run reached a terminal state. Stamping this is what delivers `created`.
75
+ */
76
+ dateCompleted?: Date | null | undefined;
77
+ /**
78
+ * Milliseconds spent generating.
79
+ */
80
+ durationMs?: number | null | undefined;
81
+ rowCount?: number | null | undefined;
82
+ /**
83
+ * Size of the generated file in bytes.
84
+ */
85
+ fileSize?: number | null | undefined;
86
+ /**
87
+ * Why a `failed` run failed. Null on every other status.
88
+ */
89
+ errorMessage?: string | null | undefined;
90
+ };
91
+
92
+ /** @internal */
93
+ export const FullReportStatus$inboundSchema: z.ZodNativeEnum<
94
+ typeof FullReportStatus
95
+ > = z.nativeEnum(FullReportStatus);
96
+ /** @internal */
97
+ export const FullReportStatus$outboundSchema: z.ZodNativeEnum<
98
+ typeof FullReportStatus
99
+ > = FullReportStatus$inboundSchema;
100
+
101
+ /** @internal */
102
+ export const FullReport$inboundSchema: z.ZodType<
103
+ FullReport,
104
+ z.ZodTypeDef,
105
+ unknown
106
+ > = z.object({
107
+ id: types.number(),
108
+ status: FullReportStatus$inboundSchema,
109
+ report_class: types.string(),
110
+ name: z.nullable(types.string()).optional(),
111
+ report_url: z.nullable(types.string()).optional(),
112
+ date_submitted: z.nullable(types.date()).optional(),
113
+ date_created: z.nullable(types.date()).optional(),
114
+ date_completed: z.nullable(types.date()).optional(),
115
+ duration_ms: z.nullable(types.number()).optional(),
116
+ row_count: z.nullable(types.number()).optional(),
117
+ file_size: z.nullable(types.number()).optional(),
118
+ error_message: z.nullable(types.string()).optional(),
119
+ }).transform((v) => {
120
+ return remap$(v, {
121
+ "report_class": "reportClass",
122
+ "report_url": "reportUrl",
123
+ "date_submitted": "dateSubmitted",
124
+ "date_created": "dateCreated",
125
+ "date_completed": "dateCompleted",
126
+ "duration_ms": "durationMs",
127
+ "row_count": "rowCount",
128
+ "file_size": "fileSize",
129
+ "error_message": "errorMessage",
130
+ });
131
+ });
132
+ /** @internal */
133
+ export type FullReport$Outbound = {
134
+ id: number;
135
+ status: string;
136
+ report_class: string;
137
+ name?: string | null | undefined;
138
+ report_url?: string | null | undefined;
139
+ date_submitted?: string | null | undefined;
140
+ date_created?: string | null | undefined;
141
+ date_completed?: string | null | undefined;
142
+ duration_ms?: number | null | undefined;
143
+ row_count?: number | null | undefined;
144
+ file_size?: number | null | undefined;
145
+ error_message?: string | null | undefined;
146
+ };
147
+
148
+ /** @internal */
149
+ export const FullReport$outboundSchema: z.ZodType<
150
+ FullReport$Outbound,
151
+ z.ZodTypeDef,
152
+ FullReport
153
+ > = z.object({
154
+ id: z.number().int(),
155
+ status: FullReportStatus$outboundSchema,
156
+ reportClass: z.string(),
157
+ name: z.nullable(z.string()).optional(),
158
+ reportUrl: z.nullable(z.string()).optional(),
159
+ dateSubmitted: z.nullable(z.date().transform(v => v.toISOString()))
160
+ .optional(),
161
+ dateCreated: z.nullable(z.date().transform(v => v.toISOString())).optional(),
162
+ dateCompleted: z.nullable(z.date().transform(v => v.toISOString()))
163
+ .optional(),
164
+ durationMs: z.nullable(z.number().int()).optional(),
165
+ rowCount: z.nullable(z.number().int()).optional(),
166
+ fileSize: z.nullable(z.number().int()).optional(),
167
+ errorMessage: z.nullable(z.string()).optional(),
168
+ }).transform((v) => {
169
+ return remap$(v, {
170
+ reportClass: "report_class",
171
+ reportUrl: "report_url",
172
+ dateSubmitted: "date_submitted",
173
+ dateCreated: "date_created",
174
+ dateCompleted: "date_completed",
175
+ durationMs: "duration_ms",
176
+ rowCount: "row_count",
177
+ fileSize: "file_size",
178
+ errorMessage: "error_message",
179
+ });
180
+ });
181
+
182
+ export function fullReportToJSON(fullReport: FullReport): string {
183
+ return JSON.stringify(FullReport$outboundSchema.parse(fullReport));
184
+ }
185
+ export function fullReportFromJSON(
186
+ jsonString: string,
187
+ ): SafeParseResult<FullReport, SDKValidationError> {
188
+ return safeParse(
189
+ jsonString,
190
+ (x) => FullReport$inboundSchema.parse(JSON.parse(x)),
191
+ `Failed to parse 'FullReport' from JSON`,
192
+ );
193
+ }
@@ -5,6 +5,7 @@
5
5
  export * from "./activestatus.js";
6
6
  export * from "./alert.js";
7
7
  export * from "./appointmentsummary.js";
8
+ export * from "./authenticatesuccessresponse.js";
8
9
  export * from "./backgroundcheckresult.js";
9
10
  export * from "./company.js";
10
11
  export * from "./companycredentiallistitem.js";
@@ -45,6 +46,7 @@ export * from "./fhirconfigcreate.js";
45
46
  export * from "./fhirconfigpartialupdate.js";
46
47
  export * from "./fhirextraentities.js";
47
48
  export * from "./financialstatus.js";
49
+ export * from "./fullreport.js";
48
50
  export * from "./handoff.js";
49
51
  export * from "./imageset.js";
50
52
  export * from "./invitee.js";
@@ -88,6 +90,7 @@ export * from "./screeningansweractionsummary.js";
88
90
  export * from "./screeningquestion.js";
89
91
  export * from "./screeningresponse.js";
90
92
  export * from "./security.js";
93
+ export * from "./ssocontinuation.js";
91
94
  export * from "./standingappointment.js";
92
95
  export * from "./state.js";
93
96
  export * from "./subscription.js";
@@ -21,6 +21,39 @@ export type LoginEmailAndPassword = {
21
21
  * Password as entered by the user
22
22
  */
23
23
  password: string;
24
+ /**
25
+ * Opaque, signed state that Green Security issues when a third-party service
26
+ *
27
+ * @remarks
28
+ * provider starts a "Login with Green Security" SAML flow at
29
+ * `/saml/idp/sso`. The login screen receives it as the `sso_state` query
30
+ * string parameter and must pass it back, byte for byte, on every call to
31
+ * this endpoint for the remainder of the login journey — including the
32
+ * second call that carries an `mfa_code`.
33
+ *
34
+ * The blob is signed, not encrypted, and it expires five minutes after the
35
+ * service provider's request arrives. Do not parse it, shorten it, decode
36
+ * it, or re-encode it.
37
+ *
38
+ * **An invalid blob does not fail the login.** This is the opposite of what
39
+ * most integrators assume, so it is worth stating plainly: a forged, edited
40
+ * or expired `sso_state` is silently discarded, and the request then
41
+ * proceeds as an ordinary login. Valid credentials still authenticate and
42
+ * still return `200` — just with no `sso` object, leaving the user signed in
43
+ * to Green Security with no way back to the service provider that sent them.
44
+ * Never treat a `200` as proof that the SSO hand-off survived; check for
45
+ * `sso` explicitly.
46
+ *
47
+ * Every `202` response echoes the *verified* blob back in its own
48
+ * `sso_state` field. Always send back the value from the response you just
49
+ * received rather than the one you started with, so that a blob the server
50
+ * has already rejected is never resent, and so a client does not have to
51
+ * hold state of its own across the login journey.
52
+ *
53
+ * Omit this field entirely for an ordinary login that did not originate
54
+ * from a service provider.
55
+ */
56
+ ssoState?: string | undefined;
24
57
  };
25
58
 
26
59
  /** @internal */
@@ -28,6 +61,7 @@ export type LoginEmailAndPassword$Outbound = {
28
61
  email: string;
29
62
  mfa_code?: string | undefined;
30
63
  password: string;
64
+ sso_state?: string | undefined;
31
65
  };
32
66
 
33
67
  /** @internal */
@@ -39,9 +73,11 @@ export const LoginEmailAndPassword$outboundSchema: z.ZodType<
39
73
  email: z.string(),
40
74
  mfaCode: z.string().optional(),
41
75
  password: z.string(),
76
+ ssoState: z.string().optional(),
42
77
  }).transform((v) => {
43
78
  return remap$(v, {
44
79
  mfaCode: "mfa_code",
80
+ ssoState: "sso_state",
45
81
  });
46
82
  });
47
83