@greensecurity/javascript-sdk 0.15.1 → 0.17.0
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/REACT_QUERY.md +68 -30
- package/README.md +74 -19
- package/bin/mcp-server.js +1494 -215
- package/bin/mcp-server.js.map +56 -34
- package/funcs/organizationsListOrSearchFacilities.d.ts +4 -1
- package/funcs/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/funcs/organizationsListOrSearchFacilities.js +47 -10
- package/funcs/organizationsListOrSearchFacilities.js.map +1 -1
- package/funcs/supportArticlesGetSupportArticle.d.ts +25 -0
- package/funcs/supportArticlesGetSupportArticle.d.ts.map +1 -0
- package/funcs/supportArticlesGetSupportArticle.js +132 -0
- package/funcs/supportArticlesGetSupportArticle.js.map +1 -0
- package/funcs/supportArticlesListOrSearchSupportArticles.d.ts +19 -0
- package/funcs/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -0
- package/funcs/supportArticlesListOrSearchSupportArticles.js +153 -0
- package/funcs/supportArticlesListOrSearchSupportArticles.js.map +1 -0
- package/funcs/{userGetCurrentUser.d.ts → usersGetCurrentUser.d.ts} +2 -2
- package/funcs/usersGetCurrentUser.d.ts.map +1 -0
- package/funcs/{userGetCurrentUser.js → usersGetCurrentUser.js} +3 -3
- package/funcs/usersGetCurrentUser.js.map +1 -0
- package/funcs/{userGetUserById.d.ts → usersGetUserById.d.ts} +2 -2
- package/funcs/usersGetUserById.d.ts.map +1 -0
- package/funcs/{userGetUserById.js → usersGetUserById.js} +3 -3
- package/funcs/usersGetUserById.js.map +1 -0
- package/funcs/{userLogsUserIntoTheSystem.d.ts → usersLogsUserIntoTheSystem.d.ts} +2 -2
- package/funcs/usersLogsUserIntoTheSystem.d.ts.map +1 -0
- package/funcs/{userLogsUserIntoTheSystem.js → usersLogsUserIntoTheSystem.js} +3 -3
- package/funcs/usersLogsUserIntoTheSystem.js.map +1 -0
- package/funcs/{userMagiclink.d.ts → usersMagiclink.d.ts} +2 -2
- package/funcs/usersMagiclink.d.ts.map +1 -0
- package/funcs/{userMagiclink.js → usersMagiclink.js} +4 -4
- package/funcs/usersMagiclink.js.map +1 -0
- package/funcs/{userPassword.d.ts → usersPassword.d.ts} +2 -2
- package/funcs/usersPassword.d.ts.map +1 -0
- package/funcs/{userPassword.js → usersPassword.js} +4 -4
- package/funcs/usersPassword.js.map +1 -0
- package/funcs/{userPasswordResetRequest.d.ts → usersPasswordResetRequest.d.ts} +2 -2
- package/funcs/usersPasswordResetRequest.d.ts.map +1 -0
- package/funcs/{userPasswordResetRequest.js → usersPasswordResetRequest.js} +4 -4
- package/funcs/usersPasswordResetRequest.js.map +1 -0
- package/funcs/vendorsCreateVendorRegistration.d.ts +1 -1
- package/funcs/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/funcs/vendorsCreateVendorRegistration.js +2 -1
- package/funcs/vendorsCreateVendorRegistration.js.map +1 -1
- package/funcs/vendorsExpediteTimeRemaining.d.ts +17 -0
- package/funcs/vendorsExpediteTimeRemaining.d.ts.map +1 -0
- package/funcs/vendorsExpediteTimeRemaining.js +120 -0
- package/funcs/vendorsExpediteTimeRemaining.js.map +1 -0
- package/funcs/vendorsListVendorCredentials.d.ts +16 -0
- package/funcs/vendorsListVendorCredentials.d.ts.map +1 -0
- package/funcs/vendorsListVendorCredentials.js +124 -0
- package/funcs/vendorsListVendorCredentials.js.map +1 -0
- package/funcs/vendorsListVendorInvoices.d.ts +24 -0
- package/funcs/vendorsListVendorInvoices.d.ts.map +1 -0
- package/funcs/vendorsListVendorInvoices.js +166 -0
- package/funcs/vendorsListVendorInvoices.js.map +1 -0
- package/funcs/vendorsListVendorJobTitles.d.ts +4 -1
- package/funcs/vendorsListVendorJobTitles.d.ts.map +1 -1
- package/funcs/vendorsListVendorJobTitles.js +39 -6
- package/funcs/vendorsListVendorJobTitles.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.d.ts.map +1 -1
- package/mcp-server/server.js +23 -13
- package/mcp-server/server.js.map +1 -1
- package/mcp-server/tools/organizationsListOrSearchFacilities.js +1 -1
- package/mcp-server/tools/organizationsListOrSearchFacilities.js.map +1 -1
- package/mcp-server/tools/supportArticlesGetSupportArticle.d.ts +8 -0
- package/mcp-server/tools/supportArticlesGetSupportArticle.d.ts.map +1 -0
- package/mcp-server/tools/supportArticlesGetSupportArticle.js +71 -0
- package/mcp-server/tools/supportArticlesGetSupportArticle.js.map +1 -0
- package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.d.ts +8 -0
- package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -0
- package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js +64 -0
- package/mcp-server/tools/supportArticlesListOrSearchSupportArticles.js.map +1 -0
- package/mcp-server/tools/usersGetCurrentUser.d.ts +3 -0
- package/mcp-server/tools/usersGetCurrentUser.d.ts.map +1 -0
- package/mcp-server/tools/usersGetCurrentUser.js +26 -0
- package/mcp-server/tools/usersGetCurrentUser.js.map +1 -0
- package/mcp-server/tools/usersGetUserById.d.ts +8 -0
- package/mcp-server/tools/usersGetUserById.d.ts.map +1 -0
- package/mcp-server/tools/usersGetUserById.js +64 -0
- package/mcp-server/tools/usersGetUserById.js.map +1 -0
- package/mcp-server/tools/usersLogsUserIntoTheSystem.d.ts +8 -0
- package/mcp-server/tools/usersLogsUserIntoTheSystem.d.ts.map +1 -0
- package/mcp-server/tools/usersLogsUserIntoTheSystem.js +94 -0
- package/mcp-server/tools/usersLogsUserIntoTheSystem.js.map +1 -0
- package/mcp-server/tools/usersMagiclink.d.ts +8 -0
- package/mcp-server/tools/usersMagiclink.d.ts.map +1 -0
- package/mcp-server/tools/usersMagiclink.js +64 -0
- package/mcp-server/tools/usersMagiclink.js.map +1 -0
- package/mcp-server/tools/usersPassword.d.ts +8 -0
- package/mcp-server/tools/usersPassword.d.ts.map +1 -0
- package/mcp-server/tools/usersPassword.js +65 -0
- package/mcp-server/tools/usersPassword.js.map +1 -0
- package/mcp-server/tools/usersPasswordResetRequest.d.ts +8 -0
- package/mcp-server/tools/usersPasswordResetRequest.d.ts.map +1 -0
- package/mcp-server/tools/usersPasswordResetRequest.js +64 -0
- package/mcp-server/tools/usersPasswordResetRequest.js.map +1 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.d.ts +8 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.d.ts.map +1 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.js +64 -0
- package/mcp-server/tools/vendorsExpediteTimeRemaining.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorCredentials.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorCredentials.d.ts.map +1 -0
- package/mcp-server/tools/vendorsListVendorCredentials.js +64 -0
- package/mcp-server/tools/vendorsListVendorCredentials.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorInvoices.d.ts +8 -0
- package/mcp-server/tools/vendorsListVendorInvoices.d.ts.map +1 -0
- package/mcp-server/tools/vendorsListVendorInvoices.js +68 -0
- package/mcp-server/tools/vendorsListVendorInvoices.js.map +1 -0
- package/mcp-server/tools/vendorsListVendorJobTitles.js +1 -1
- package/mcp-server/tools/vendorsListVendorJobTitles.js.map +1 -1
- package/models/components/{status.d.ts → activestatus.d.ts} +8 -8
- package/models/components/activestatus.d.ts.map +1 -0
- package/models/components/{status.js → activestatus.js} +12 -13
- package/models/components/activestatus.js.map +1 -0
- package/models/components/contact.d.ts +8 -8
- package/models/components/contact.d.ts.map +1 -1
- package/models/components/contact.js +14 -13
- package/models/components/contact.js.map +1 -1
- package/models/components/credentialstatus.d.ts +49 -0
- package/models/components/credentialstatus.d.ts.map +1 -0
- package/models/components/credentialstatus.js +68 -0
- package/models/components/credentialstatus.js.map +1 -0
- package/models/components/expand.d.ts +15 -0
- package/models/components/expand.d.ts.map +1 -1
- package/models/components/expand.js +5 -0
- package/models/components/expand.js.map +1 -1
- package/models/components/index.d.ts +7 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +7 -1
- package/models/components/index.js.map +1 -1
- package/models/components/invoice.d.ts +43 -0
- package/models/components/invoice.d.ts.map +1 -0
- package/models/components/invoice.js +91 -0
- package/models/components/invoice.js.map +1 -0
- package/models/components/invoiceitem.d.ts +40 -0
- package/models/components/invoiceitem.d.ts.map +1 -0
- package/models/components/invoiceitem.js +94 -0
- package/models/components/invoiceitem.js.map +1 -0
- package/models/components/supportarticle.d.ts +43 -0
- package/models/components/supportarticle.d.ts.map +1 -0
- package/models/components/supportarticle.js +92 -0
- package/models/components/supportarticle.js.map +1 -0
- package/models/components/vendorcredentialslim.d.ts +44 -0
- package/models/components/vendorcredentialslim.d.ts.map +1 -0
- package/models/components/vendorcredentialslim.js +94 -0
- package/models/components/vendorcredentialslim.js.map +1 -0
- package/models/components/vendorrequiredcredential.d.ts +42 -0
- package/models/components/vendorrequiredcredential.d.ts.map +1 -0
- package/models/components/vendorrequiredcredential.js +96 -0
- package/models/components/vendorrequiredcredential.js.map +1 -0
- package/models/operations/createvendorregistration.d.ts +13 -13
- package/models/operations/createvendorregistration.d.ts.map +1 -1
- package/models/operations/createvendorregistration.js +18 -16
- package/models/operations/createvendorregistration.js.map +1 -1
- package/models/operations/expeditetimeremaining.d.ts +60 -0
- package/models/operations/expeditetimeremaining.d.ts.map +1 -0
- package/models/operations/expeditetimeremaining.js +113 -0
- package/models/operations/expeditetimeremaining.js.map +1 -0
- package/models/operations/getsupportarticle.d.ts +38 -0
- package/models/operations/getsupportarticle.d.ts.map +1 -0
- package/models/operations/getsupportarticle.js +72 -0
- package/models/operations/getsupportarticle.js.map +1 -0
- package/models/operations/index.d.ts +5 -0
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -0
- package/models/operations/index.js.map +1 -1
- package/models/operations/listorsearchfacilities.d.ts +40 -15
- package/models/operations/listorsearchfacilities.d.ts.map +1 -1
- package/models/operations/listorsearchfacilities.js +55 -18
- package/models/operations/listorsearchfacilities.js.map +1 -1
- package/models/operations/listorsearchsupportarticles.d.ts +106 -0
- package/models/operations/listorsearchsupportarticles.d.ts.map +1 -0
- package/models/operations/listorsearchsupportarticles.js +149 -0
- package/models/operations/listorsearchsupportarticles.js.map +1 -0
- package/models/operations/listvendorcredentials.d.ts +122 -0
- package/models/operations/listvendorcredentials.d.ts.map +1 -0
- package/models/operations/listvendorcredentials.js +169 -0
- package/models/operations/listvendorcredentials.js.map +1 -0
- package/models/operations/listvendorinvoices.d.ts +116 -0
- package/models/operations/listvendorinvoices.d.ts.map +1 -0
- package/models/operations/listvendorinvoices.js +155 -0
- package/models/operations/listvendorinvoices.js.map +1 -0
- package/models/operations/listvendorjobtitles.d.ts +38 -13
- package/models/operations/listvendorjobtitles.d.ts.map +1 -1
- package/models/operations/listvendorjobtitles.js +51 -16
- package/models/operations/listvendorjobtitles.js.map +1 -1
- package/models/operations/magiclink.d.ts +13 -13
- package/models/operations/magiclink.d.ts.map +1 -1
- package/models/operations/magiclink.js +16 -16
- package/models/operations/magiclink.js.map +1 -1
- package/models/operations/password.d.ts +13 -13
- package/models/operations/password.d.ts.map +1 -1
- package/models/operations/password.js +16 -16
- package/models/operations/password.js.map +1 -1
- package/models/operations/passwordresetrequest.d.ts +13 -13
- package/models/operations/passwordresetrequest.d.ts.map +1 -1
- package/models/operations/passwordresetrequest.js +16 -16
- package/models/operations/passwordresetrequest.js.map +1 -1
- package/package.json +1 -1
- package/react-query/index.d.ts +11 -6
- package/react-query/index.d.ts.map +1 -1
- package/react-query/index.js +11 -6
- package/react-query/index.js.map +1 -1
- package/react-query/organizationsListOrSearchFacilities.d.ts +57 -6
- package/react-query/organizationsListOrSearchFacilities.d.ts.map +1 -1
- package/react-query/organizationsListOrSearchFacilities.js +90 -1
- package/react-query/organizationsListOrSearchFacilities.js.map +1 -1
- package/react-query/supportArticlesGetSupportArticle.d.ts +57 -0
- package/react-query/supportArticlesGetSupportArticle.d.ts.map +1 -0
- package/react-query/supportArticlesGetSupportArticle.js +113 -0
- package/react-query/supportArticlesGetSupportArticle.js.map +1 -0
- package/react-query/supportArticlesListOrSearchSupportArticles.d.ts +75 -0
- package/react-query/supportArticlesListOrSearchSupportArticles.d.ts.map +1 -0
- package/react-query/supportArticlesListOrSearchSupportArticles.js +159 -0
- package/react-query/supportArticlesListOrSearchSupportArticles.js.map +1 -0
- package/react-query/usersGetCurrentUser.d.ts +29 -0
- package/react-query/usersGetCurrentUser.d.ts.map +1 -0
- package/react-query/usersGetCurrentUser.js +75 -0
- package/react-query/usersGetCurrentUser.js.map +1 -0
- package/react-query/usersGetUserById.d.ts +31 -0
- package/react-query/usersGetUserById.d.ts.map +1 -0
- package/react-query/usersGetUserById.js +87 -0
- package/react-query/usersGetUserById.js.map +1 -0
- package/react-query/{userLogsUserIntoTheSystem.d.ts → usersLogsUserIntoTheSystem.d.ts} +7 -7
- package/react-query/usersLogsUserIntoTheSystem.d.ts.map +1 -0
- package/react-query/{userLogsUserIntoTheSystem.js → usersLogsUserIntoTheSystem.js} +13 -13
- package/react-query/usersLogsUserIntoTheSystem.js.map +1 -0
- package/react-query/usersMagiclink.d.ts +23 -0
- package/react-query/usersMagiclink.d.ts.map +1 -0
- package/react-query/{userMagiclink.js → usersMagiclink.js} +13 -13
- package/react-query/usersMagiclink.js.map +1 -0
- package/react-query/usersPassword.d.ts +24 -0
- package/react-query/usersPassword.d.ts.map +1 -0
- package/react-query/{userPassword.js → usersPassword.js} +13 -13
- package/react-query/usersPassword.js.map +1 -0
- package/react-query/usersPasswordResetRequest.d.ts +23 -0
- package/react-query/usersPasswordResetRequest.d.ts.map +1 -0
- package/react-query/{userPasswordResetRequest.js → usersPasswordResetRequest.js} +13 -13
- package/react-query/usersPasswordResetRequest.js.map +1 -0
- package/react-query/vendorsCreateVendorRegistration.d.ts +1 -1
- package/react-query/vendorsCreateVendorRegistration.d.ts.map +1 -1
- package/react-query/vendorsExpediteTimeRemaining.d.ts +30 -0
- package/react-query/vendorsExpediteTimeRemaining.d.ts.map +1 -0
- package/react-query/vendorsExpediteTimeRemaining.js +96 -0
- package/react-query/vendorsExpediteTimeRemaining.js.map +1 -0
- package/react-query/vendorsListVendorCredentials.d.ts +55 -0
- package/react-query/vendorsListVendorCredentials.d.ts.map +1 -0
- package/react-query/vendorsListVendorCredentials.js +103 -0
- package/react-query/vendorsListVendorCredentials.js.map +1 -0
- package/react-query/vendorsListVendorInvoices.d.ts +96 -0
- package/react-query/vendorsListVendorInvoices.d.ts.map +1 -0
- package/react-query/vendorsListVendorInvoices.js +178 -0
- package/react-query/vendorsListVendorInvoices.js.map +1 -0
- package/react-query/vendorsListVendorJobTitles.d.ts +28 -3
- package/react-query/vendorsListVendorJobTitles.d.ts.map +1 -1
- package/react-query/vendorsListVendorJobTitles.js +59 -0
- package/react-query/vendorsListVendorJobTitles.js.map +1 -1
- package/sdk/organizations.d.ts +4 -1
- package/sdk/organizations.d.ts.map +1 -1
- package/sdk/organizations.js +2 -1
- package/sdk/organizations.js.map +1 -1
- package/sdk/sdk.d.ts +6 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +7 -3
- package/sdk/sdk.js.map +1 -1
- package/sdk/supportarticles.d.ts +30 -0
- package/sdk/supportarticles.d.ts.map +1 -0
- package/sdk/supportarticles.js +40 -0
- package/sdk/supportarticles.js.map +1 -0
- package/sdk/{user.d.ts → users.d.ts} +5 -5
- package/sdk/users.d.ts.map +1 -0
- package/sdk/{user.js → users.js} +16 -16
- package/sdk/users.js.map +1 -0
- package/sdk/vendors.d.ts +32 -2
- package/sdk/vendors.d.ts.map +1 -1
- package/sdk/vendors.js +36 -1
- package/sdk/vendors.js.map +1 -1
- package/src/__tests__/organizations.test.ts +5 -175
- package/src/__tests__/supportarticles.test.ts +64 -0
- package/src/__tests__/user.test.ts +13 -7
- package/src/__tests__/vendors.test.ts +65 -2
- package/src/funcs/organizationsListOrSearchFacilities.ts +116 -39
- package/src/funcs/supportArticlesGetSupportArticle.ts +181 -0
- package/src/funcs/supportArticlesListOrSearchSupportArticles.ts +234 -0
- package/src/funcs/{userGetCurrentUser.ts → usersGetCurrentUser.ts} +1 -1
- package/src/funcs/{userGetUserById.ts → usersGetUserById.ts} +1 -1
- package/src/funcs/{userLogsUserIntoTheSystem.ts → usersLogsUserIntoTheSystem.ts} +1 -1
- package/src/funcs/{userMagiclink.ts → usersMagiclink.ts} +5 -5
- package/src/funcs/{userPassword.ts → usersPassword.ts} +5 -5
- package/src/funcs/{userPasswordResetRequest.ts → usersPasswordResetRequest.ts} +8 -5
- package/src/funcs/vendorsCreateVendorRegistration.ts +8 -4
- package/src/funcs/vendorsExpediteTimeRemaining.ts +171 -0
- package/src/funcs/vendorsListVendorCredentials.ts +169 -0
- package/src/funcs/vendorsListVendorInvoices.ts +255 -0
- package/src/funcs/vendorsListVendorJobTitles.ts +101 -30
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +23 -13
- package/src/mcp-server/tools/organizationsListOrSearchFacilities.ts +1 -1
- package/src/mcp-server/tools/supportArticlesGetSupportArticle.ts +46 -0
- package/src/mcp-server/tools/supportArticlesListOrSearchSupportArticles.ts +39 -0
- package/src/mcp-server/tools/{userGetCurrentUser.ts → usersGetCurrentUser.ts} +4 -4
- package/src/mcp-server/tools/{userGetUserById.ts → usersGetUserById.ts} +4 -4
- package/src/mcp-server/tools/{userLogsUserIntoTheSystem.ts → usersLogsUserIntoTheSystem.ts} +4 -4
- package/src/mcp-server/tools/{userMagiclink.ts → usersMagiclink.ts} +4 -4
- package/src/mcp-server/tools/{userPassword.ts → usersPassword.ts} +4 -4
- package/src/mcp-server/tools/{userPasswordResetRequest.ts → usersPasswordResetRequest.ts} +4 -4
- package/src/mcp-server/tools/vendorsExpediteTimeRemaining.ts +37 -0
- package/src/mcp-server/tools/vendorsListVendorCredentials.ts +37 -0
- package/src/mcp-server/tools/vendorsListVendorInvoices.ts +41 -0
- package/src/mcp-server/tools/vendorsListVendorJobTitles.ts +1 -1
- package/src/models/components/activestatus.ts +38 -0
- package/src/models/components/contact.ts +14 -16
- package/src/models/components/credentialstatus.ts +44 -0
- package/src/models/components/expand.ts +5 -0
- package/src/models/components/index.ts +7 -1
- package/src/models/components/invoice.ts +99 -0
- package/src/models/components/invoiceitem.ts +98 -0
- package/src/models/components/supportarticle.ts +99 -0
- package/src/models/components/vendorcredentialslim.ts +106 -0
- package/src/models/components/vendorrequiredcredential.ts +106 -0
- package/src/models/operations/createvendorregistration.ts +39 -32
- package/src/models/operations/expeditetimeremaining.ts +152 -0
- package/src/models/operations/getsupportarticle.ts +77 -0
- package/src/models/operations/index.ts +5 -0
- package/src/models/operations/listorsearchfacilities.ts +118 -34
- package/src/models/operations/listorsearchsupportarticles.ts +261 -0
- package/src/models/operations/listvendorcredentials.ts +281 -0
- package/src/models/operations/listvendorinvoices.ts +252 -0
- package/src/models/operations/listvendorjobtitles.ts +99 -22
- package/src/models/operations/magiclink.ts +21 -21
- package/src/models/operations/password.ts +21 -21
- package/src/models/operations/passwordresetrequest.ts +39 -31
- package/src/react-query/index.ts +11 -6
- package/src/react-query/organizationsListOrSearchFacilities.ts +183 -5
- package/src/react-query/supportArticlesGetSupportArticle.ts +192 -0
- package/src/react-query/supportArticlesListOrSearchSupportArticles.ts +349 -0
- package/src/react-query/{userGetCurrentUser.ts → usersGetCurrentUser.ts} +27 -27
- package/src/react-query/{userGetUserById.ts → usersGetUserById.ts} +31 -29
- package/src/react-query/{userLogsUserIntoTheSystem.ts → usersLogsUserIntoTheSystem.ts} +18 -18
- package/src/react-query/{userMagiclink.ts → usersMagiclink.ts} +18 -18
- package/src/react-query/{userPassword.ts → usersPassword.ts} +18 -18
- package/src/react-query/{userPasswordResetRequest.ts → usersPasswordResetRequest.ts} +19 -19
- package/src/react-query/vendorsCreateVendorRegistration.ts +1 -1
- package/src/react-query/vendorsExpediteTimeRemaining.ts +165 -0
- package/src/react-query/vendorsListVendorCredentials.ts +200 -0
- package/src/react-query/vendorsListVendorInvoices.ts +364 -0
- package/src/react-query/vendorsListVendorJobTitles.ts +149 -1
- package/src/sdk/organizations.ts +5 -2
- package/src/sdk/sdk.ts +10 -4
- package/src/sdk/supportarticles.ts +59 -0
- package/src/sdk/{user.ts → users.ts} +16 -16
- package/src/sdk/vendors.ts +68 -3
- package/funcs/userGetCurrentUser.d.ts.map +0 -1
- package/funcs/userGetCurrentUser.js.map +0 -1
- package/funcs/userGetUserById.d.ts.map +0 -1
- package/funcs/userGetUserById.js.map +0 -1
- package/funcs/userLogsUserIntoTheSystem.d.ts.map +0 -1
- package/funcs/userLogsUserIntoTheSystem.js.map +0 -1
- package/funcs/userMagiclink.d.ts.map +0 -1
- package/funcs/userMagiclink.js.map +0 -1
- package/funcs/userPassword.d.ts.map +0 -1
- package/funcs/userPassword.js.map +0 -1
- package/funcs/userPasswordResetRequest.d.ts.map +0 -1
- package/funcs/userPasswordResetRequest.js.map +0 -1
- package/models/components/status.d.ts.map +0 -1
- package/models/components/status.js.map +0 -1
- package/react-query/userGetCurrentUser.d.ts +0 -29
- package/react-query/userGetCurrentUser.d.ts.map +0 -1
- package/react-query/userGetCurrentUser.js +0 -75
- package/react-query/userGetCurrentUser.js.map +0 -1
- package/react-query/userGetUserById.d.ts +0 -31
- package/react-query/userGetUserById.d.ts.map +0 -1
- package/react-query/userGetUserById.js +0 -87
- package/react-query/userGetUserById.js.map +0 -1
- package/react-query/userLogsUserIntoTheSystem.d.ts.map +0 -1
- package/react-query/userLogsUserIntoTheSystem.js.map +0 -1
- package/react-query/userMagiclink.d.ts +0 -23
- package/react-query/userMagiclink.d.ts.map +0 -1
- package/react-query/userMagiclink.js.map +0 -1
- package/react-query/userPassword.d.ts +0 -24
- package/react-query/userPassword.d.ts.map +0 -1
- package/react-query/userPassword.js.map +0 -1
- package/react-query/userPasswordResetRequest.d.ts +0 -23
- package/react-query/userPasswordResetRequest.d.ts.map +0 -1
- package/react-query/userPasswordResetRequest.js.map +0 -1
- package/sdk/user.d.ts.map +0 -1
- package/sdk/user.js.map +0 -1
- package/src/models/components/status.ts +0 -38
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
UseSuspenseQueryResult,
|
|
14
14
|
} from "@tanstack/react-query";
|
|
15
15
|
import { GreenSecurityCore } from "../core.js";
|
|
16
|
-
import {
|
|
16
|
+
import { usersGetUserById } from "../funcs/usersGetUserById.js";
|
|
17
17
|
import { combineSignals } from "../lib/primitives.js";
|
|
18
18
|
import { RequestOptions } from "../lib/sdks.js";
|
|
19
19
|
import * as components from "../models/components/index.js";
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
TupleToPrefixes,
|
|
27
27
|
} from "./_types.js";
|
|
28
28
|
|
|
29
|
-
export type
|
|
29
|
+
export type UsersGetUserByIdQueryData = components.User;
|
|
30
30
|
|
|
31
31
|
/**
|
|
32
32
|
* Get user by id
|
|
@@ -34,13 +34,13 @@ export type UserGetUserByIdQueryData = components.User;
|
|
|
34
34
|
* @remarks
|
|
35
35
|
* Returns a user object for the user represented by the identifier in the path.
|
|
36
36
|
*/
|
|
37
|
-
export function
|
|
37
|
+
export function useUsersGetUserById(
|
|
38
38
|
request: operations.GetUserByIdRequest,
|
|
39
|
-
options?: QueryHookOptions<
|
|
40
|
-
): UseQueryResult<
|
|
39
|
+
options?: QueryHookOptions<UsersGetUserByIdQueryData>,
|
|
40
|
+
): UseQueryResult<UsersGetUserByIdQueryData, Error> {
|
|
41
41
|
const client = useGreenSecurityContext();
|
|
42
42
|
return useQuery({
|
|
43
|
-
...
|
|
43
|
+
...buildUsersGetUserByIdQuery(
|
|
44
44
|
client,
|
|
45
45
|
request,
|
|
46
46
|
options,
|
|
@@ -55,13 +55,13 @@ export function useUserGetUserById(
|
|
|
55
55
|
* @remarks
|
|
56
56
|
* Returns a user object for the user represented by the identifier in the path.
|
|
57
57
|
*/
|
|
58
|
-
export function
|
|
58
|
+
export function useUsersGetUserByIdSuspense(
|
|
59
59
|
request: operations.GetUserByIdRequest,
|
|
60
|
-
options?: SuspenseQueryHookOptions<
|
|
61
|
-
): UseSuspenseQueryResult<
|
|
60
|
+
options?: SuspenseQueryHookOptions<UsersGetUserByIdQueryData>,
|
|
61
|
+
): UseSuspenseQueryResult<UsersGetUserByIdQueryData, Error> {
|
|
62
62
|
const client = useGreenSecurityContext();
|
|
63
63
|
return useSuspenseQuery({
|
|
64
|
-
...
|
|
64
|
+
...buildUsersGetUserByIdQuery(
|
|
65
65
|
client,
|
|
66
66
|
request,
|
|
67
67
|
options,
|
|
@@ -70,30 +70,30 @@ export function useUserGetUserByIdSuspense(
|
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
export function
|
|
73
|
+
export function prefetchUsersGetUserById(
|
|
74
74
|
queryClient: QueryClient,
|
|
75
75
|
client$: GreenSecurityCore,
|
|
76
76
|
request: operations.GetUserByIdRequest,
|
|
77
77
|
): Promise<void> {
|
|
78
78
|
return queryClient.prefetchQuery({
|
|
79
|
-
...
|
|
79
|
+
...buildUsersGetUserByIdQuery(
|
|
80
80
|
client$,
|
|
81
81
|
request,
|
|
82
82
|
),
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
-
export function
|
|
86
|
+
export function setUsersGetUserByIdData(
|
|
87
87
|
client: QueryClient,
|
|
88
88
|
queryKeyBase: [id: number],
|
|
89
|
-
data:
|
|
90
|
-
):
|
|
91
|
-
const key =
|
|
89
|
+
data: UsersGetUserByIdQueryData,
|
|
90
|
+
): UsersGetUserByIdQueryData | undefined {
|
|
91
|
+
const key = queryKeyUsersGetUserById(...queryKeyBase);
|
|
92
92
|
|
|
93
|
-
return client.setQueryData<
|
|
93
|
+
return client.setQueryData<UsersGetUserByIdQueryData>(key, data);
|
|
94
94
|
}
|
|
95
95
|
|
|
96
|
-
export function
|
|
96
|
+
export function invalidateUsersGetUserById(
|
|
97
97
|
client: QueryClient,
|
|
98
98
|
queryKeyBase: TupleToPrefixes<[id: number]>,
|
|
99
99
|
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
@@ -102,43 +102,45 @@ export function invalidateUserGetUserById(
|
|
|
102
102
|
...filters,
|
|
103
103
|
queryKey: [
|
|
104
104
|
"@greensecurity/javascript-sdk",
|
|
105
|
-
"
|
|
105
|
+
"users",
|
|
106
106
|
"getUserById",
|
|
107
107
|
...queryKeyBase,
|
|
108
108
|
],
|
|
109
109
|
});
|
|
110
110
|
}
|
|
111
111
|
|
|
112
|
-
export function
|
|
112
|
+
export function invalidateAllUsersGetUserById(
|
|
113
113
|
client: QueryClient,
|
|
114
114
|
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
115
115
|
): Promise<void> {
|
|
116
116
|
return client.invalidateQueries({
|
|
117
117
|
...filters,
|
|
118
|
-
queryKey: ["@greensecurity/javascript-sdk", "
|
|
118
|
+
queryKey: ["@greensecurity/javascript-sdk", "users", "getUserById"],
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
-
export function
|
|
122
|
+
export function buildUsersGetUserByIdQuery(
|
|
123
123
|
client$: GreenSecurityCore,
|
|
124
124
|
request: operations.GetUserByIdRequest,
|
|
125
125
|
options?: RequestOptions,
|
|
126
126
|
): {
|
|
127
127
|
queryKey: QueryKey;
|
|
128
|
-
queryFn: (
|
|
128
|
+
queryFn: (
|
|
129
|
+
context: QueryFunctionContext,
|
|
130
|
+
) => Promise<UsersGetUserByIdQueryData>;
|
|
129
131
|
} {
|
|
130
132
|
return {
|
|
131
|
-
queryKey:
|
|
132
|
-
queryFn: async function
|
|
133
|
+
queryKey: queryKeyUsersGetUserById(request.id),
|
|
134
|
+
queryFn: async function usersGetUserByIdQueryFn(
|
|
133
135
|
ctx,
|
|
134
|
-
): Promise<
|
|
136
|
+
): Promise<UsersGetUserByIdQueryData> {
|
|
135
137
|
const sig = combineSignals(ctx.signal, options?.fetchOptions?.signal);
|
|
136
138
|
const mergedOptions = {
|
|
137
139
|
...options,
|
|
138
140
|
fetchOptions: { ...options?.fetchOptions, signal: sig },
|
|
139
141
|
};
|
|
140
142
|
|
|
141
|
-
return unwrapAsync(
|
|
143
|
+
return unwrapAsync(usersGetUserById(
|
|
142
144
|
client$,
|
|
143
145
|
request,
|
|
144
146
|
mergedOptions,
|
|
@@ -147,6 +149,6 @@ export function buildUserGetUserByIdQuery(
|
|
|
147
149
|
};
|
|
148
150
|
}
|
|
149
151
|
|
|
150
|
-
export function
|
|
151
|
-
return ["@greensecurity/javascript-sdk", "
|
|
152
|
+
export function queryKeyUsersGetUserById(id: number): QueryKey {
|
|
153
|
+
return ["@greensecurity/javascript-sdk", "users", "getUserById", id];
|
|
152
154
|
}
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
UseMutationResult,
|
|
9
9
|
} from "@tanstack/react-query";
|
|
10
10
|
import { GreenSecurityCore } from "../core.js";
|
|
11
|
-
import {
|
|
11
|
+
import { usersLogsUserIntoTheSystem } from "../funcs/usersLogsUserIntoTheSystem.js";
|
|
12
12
|
import { combineSignals } from "../lib/primitives.js";
|
|
13
13
|
import { RequestOptions } from "../lib/sdks.js";
|
|
14
14
|
import * as operations from "../models/operations/index.js";
|
|
@@ -16,12 +16,12 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
16
16
|
import { useGreenSecurityContext } from "./_context.js";
|
|
17
17
|
import { MutationHookOptions } from "./_types.js";
|
|
18
18
|
|
|
19
|
-
export type
|
|
19
|
+
export type UsersLogsUserIntoTheSystemMutationVariables = {
|
|
20
20
|
request: operations.LogsUserIntoTheSystemRequestBody;
|
|
21
21
|
options?: RequestOptions;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type UsersLogsUserIntoTheSystemMutationData =
|
|
25
25
|
operations.LogsUserIntoTheSystemResponse;
|
|
26
26
|
|
|
27
27
|
/**
|
|
@@ -60,43 +60,43 @@ export type UserLogsUserIntoTheSystemMutationData =
|
|
|
60
60
|
* 4. The `user_token` will be appended as a query string parameter to your `return_url` - you must parse this token and store it
|
|
61
61
|
* 5. Fetch the user object from `/users/me` using the token
|
|
62
62
|
*/
|
|
63
|
-
export function
|
|
63
|
+
export function useUsersLogsUserIntoTheSystemMutation(
|
|
64
64
|
options?: MutationHookOptions<
|
|
65
|
-
|
|
65
|
+
UsersLogsUserIntoTheSystemMutationData,
|
|
66
66
|
Error,
|
|
67
|
-
|
|
67
|
+
UsersLogsUserIntoTheSystemMutationVariables
|
|
68
68
|
>,
|
|
69
69
|
): UseMutationResult<
|
|
70
|
-
|
|
70
|
+
UsersLogsUserIntoTheSystemMutationData,
|
|
71
71
|
Error,
|
|
72
|
-
|
|
72
|
+
UsersLogsUserIntoTheSystemMutationVariables
|
|
73
73
|
> {
|
|
74
74
|
const client = useGreenSecurityContext();
|
|
75
75
|
return useMutation({
|
|
76
|
-
...
|
|
76
|
+
...buildUsersLogsUserIntoTheSystemMutation(client, options),
|
|
77
77
|
...options,
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
export function
|
|
82
|
-
return ["@greensecurity/javascript-sdk", "
|
|
81
|
+
export function mutationKeyUsersLogsUserIntoTheSystem(): MutationKey {
|
|
82
|
+
return ["@greensecurity/javascript-sdk", "users", "logsUserIntoTheSystem"];
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
export function
|
|
85
|
+
export function buildUsersLogsUserIntoTheSystemMutation(
|
|
86
86
|
client$: GreenSecurityCore,
|
|
87
87
|
hookOptions?: RequestOptions,
|
|
88
88
|
): {
|
|
89
89
|
mutationKey: MutationKey;
|
|
90
90
|
mutationFn: (
|
|
91
|
-
variables:
|
|
92
|
-
) => Promise<
|
|
91
|
+
variables: UsersLogsUserIntoTheSystemMutationVariables,
|
|
92
|
+
) => Promise<UsersLogsUserIntoTheSystemMutationData>;
|
|
93
93
|
} {
|
|
94
94
|
return {
|
|
95
|
-
mutationKey:
|
|
96
|
-
mutationFn: function
|
|
95
|
+
mutationKey: mutationKeyUsersLogsUserIntoTheSystem(),
|
|
96
|
+
mutationFn: function usersLogsUserIntoTheSystemMutationFn({
|
|
97
97
|
request,
|
|
98
98
|
options,
|
|
99
|
-
}): Promise<
|
|
99
|
+
}): Promise<UsersLogsUserIntoTheSystemMutationData> {
|
|
100
100
|
const mergedOptions = {
|
|
101
101
|
...hookOptions,
|
|
102
102
|
...options,
|
|
@@ -109,7 +109,7 @@ export function buildUserLogsUserIntoTheSystemMutation(
|
|
|
109
109
|
),
|
|
110
110
|
},
|
|
111
111
|
};
|
|
112
|
-
return unwrapAsync(
|
|
112
|
+
return unwrapAsync(usersLogsUserIntoTheSystem(
|
|
113
113
|
client$,
|
|
114
114
|
request,
|
|
115
115
|
mergedOptions,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
UseMutationResult,
|
|
9
9
|
} from "@tanstack/react-query";
|
|
10
10
|
import { GreenSecurityCore } from "../core.js";
|
|
11
|
-
import {
|
|
11
|
+
import { usersMagiclink } from "../funcs/usersMagiclink.js";
|
|
12
12
|
import { combineSignals } from "../lib/primitives.js";
|
|
13
13
|
import { RequestOptions } from "../lib/sdks.js";
|
|
14
14
|
import * as operations from "../models/operations/index.js";
|
|
@@ -16,12 +16,12 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
16
16
|
import { useGreenSecurityContext } from "./_context.js";
|
|
17
17
|
import { MutationHookOptions } from "./_types.js";
|
|
18
18
|
|
|
19
|
-
export type
|
|
19
|
+
export type UsersMagiclinkMutationVariables = {
|
|
20
20
|
request: operations.MagiclinkRequestBody;
|
|
21
21
|
options?: RequestOptions;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type UsersMagiclinkMutationData = operations.MagiclinkMagiclinkOk;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Magic link
|
|
@@ -29,43 +29,43 @@ export type UserMagiclinkMutationData = operations.MagiclinkResponseBody;
|
|
|
29
29
|
* @remarks
|
|
30
30
|
* It sends an email with a magic link to allow the user to log in.
|
|
31
31
|
*/
|
|
32
|
-
export function
|
|
32
|
+
export function useUsersMagiclinkMutation(
|
|
33
33
|
options?: MutationHookOptions<
|
|
34
|
-
|
|
34
|
+
UsersMagiclinkMutationData,
|
|
35
35
|
Error,
|
|
36
|
-
|
|
36
|
+
UsersMagiclinkMutationVariables
|
|
37
37
|
>,
|
|
38
38
|
): UseMutationResult<
|
|
39
|
-
|
|
39
|
+
UsersMagiclinkMutationData,
|
|
40
40
|
Error,
|
|
41
|
-
|
|
41
|
+
UsersMagiclinkMutationVariables
|
|
42
42
|
> {
|
|
43
43
|
const client = useGreenSecurityContext();
|
|
44
44
|
return useMutation({
|
|
45
|
-
...
|
|
45
|
+
...buildUsersMagiclinkMutation(client, options),
|
|
46
46
|
...options,
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
export function
|
|
51
|
-
return ["@greensecurity/javascript-sdk", "
|
|
50
|
+
export function mutationKeyUsersMagiclink(): MutationKey {
|
|
51
|
+
return ["@greensecurity/javascript-sdk", "users", "magiclink"];
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export function
|
|
54
|
+
export function buildUsersMagiclinkMutation(
|
|
55
55
|
client$: GreenSecurityCore,
|
|
56
56
|
hookOptions?: RequestOptions,
|
|
57
57
|
): {
|
|
58
58
|
mutationKey: MutationKey;
|
|
59
59
|
mutationFn: (
|
|
60
|
-
variables:
|
|
61
|
-
) => Promise<
|
|
60
|
+
variables: UsersMagiclinkMutationVariables,
|
|
61
|
+
) => Promise<UsersMagiclinkMutationData>;
|
|
62
62
|
} {
|
|
63
63
|
return {
|
|
64
|
-
mutationKey:
|
|
65
|
-
mutationFn: function
|
|
64
|
+
mutationKey: mutationKeyUsersMagiclink(),
|
|
65
|
+
mutationFn: function usersMagiclinkMutationFn({
|
|
66
66
|
request,
|
|
67
67
|
options,
|
|
68
|
-
}): Promise<
|
|
68
|
+
}): Promise<UsersMagiclinkMutationData> {
|
|
69
69
|
const mergedOptions = {
|
|
70
70
|
...hookOptions,
|
|
71
71
|
...options,
|
|
@@ -78,7 +78,7 @@ export function buildUserMagiclinkMutation(
|
|
|
78
78
|
),
|
|
79
79
|
},
|
|
80
80
|
};
|
|
81
|
-
return unwrapAsync(
|
|
81
|
+
return unwrapAsync(usersMagiclink(
|
|
82
82
|
client$,
|
|
83
83
|
request,
|
|
84
84
|
mergedOptions,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
UseMutationResult,
|
|
9
9
|
} from "@tanstack/react-query";
|
|
10
10
|
import { GreenSecurityCore } from "../core.js";
|
|
11
|
-
import {
|
|
11
|
+
import { usersPassword } from "../funcs/usersPassword.js";
|
|
12
12
|
import { combineSignals } from "../lib/primitives.js";
|
|
13
13
|
import { RequestOptions } from "../lib/sdks.js";
|
|
14
14
|
import * as operations from "../models/operations/index.js";
|
|
@@ -16,12 +16,12 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
16
16
|
import { useGreenSecurityContext } from "./_context.js";
|
|
17
17
|
import { MutationHookOptions } from "./_types.js";
|
|
18
18
|
|
|
19
|
-
export type
|
|
19
|
+
export type UsersPasswordMutationVariables = {
|
|
20
20
|
request: operations.PasswordRequestBody;
|
|
21
21
|
options?: RequestOptions;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export type
|
|
24
|
+
export type UsersPasswordMutationData = operations.PasswordPasswordOk;
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Password reset
|
|
@@ -30,43 +30,43 @@ export type UserPasswordMutationData = operations.PasswordResponseBody;
|
|
|
30
30
|
* Resets the a user's password using a password_reset_id that was sent to them via email.
|
|
31
31
|
* See /users/passwordresetrequest to initiate a password reset flow.
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function useUsersPasswordMutation(
|
|
34
34
|
options?: MutationHookOptions<
|
|
35
|
-
|
|
35
|
+
UsersPasswordMutationData,
|
|
36
36
|
Error,
|
|
37
|
-
|
|
37
|
+
UsersPasswordMutationVariables
|
|
38
38
|
>,
|
|
39
39
|
): UseMutationResult<
|
|
40
|
-
|
|
40
|
+
UsersPasswordMutationData,
|
|
41
41
|
Error,
|
|
42
|
-
|
|
42
|
+
UsersPasswordMutationVariables
|
|
43
43
|
> {
|
|
44
44
|
const client = useGreenSecurityContext();
|
|
45
45
|
return useMutation({
|
|
46
|
-
...
|
|
46
|
+
...buildUsersPasswordMutation(client, options),
|
|
47
47
|
...options,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export function
|
|
52
|
-
return ["@greensecurity/javascript-sdk", "
|
|
51
|
+
export function mutationKeyUsersPassword(): MutationKey {
|
|
52
|
+
return ["@greensecurity/javascript-sdk", "users", "password"];
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export function
|
|
55
|
+
export function buildUsersPasswordMutation(
|
|
56
56
|
client$: GreenSecurityCore,
|
|
57
57
|
hookOptions?: RequestOptions,
|
|
58
58
|
): {
|
|
59
59
|
mutationKey: MutationKey;
|
|
60
60
|
mutationFn: (
|
|
61
|
-
variables:
|
|
62
|
-
) => Promise<
|
|
61
|
+
variables: UsersPasswordMutationVariables,
|
|
62
|
+
) => Promise<UsersPasswordMutationData>;
|
|
63
63
|
} {
|
|
64
64
|
return {
|
|
65
|
-
mutationKey:
|
|
66
|
-
mutationFn: function
|
|
65
|
+
mutationKey: mutationKeyUsersPassword(),
|
|
66
|
+
mutationFn: function usersPasswordMutationFn({
|
|
67
67
|
request,
|
|
68
68
|
options,
|
|
69
|
-
}): Promise<
|
|
69
|
+
}): Promise<UsersPasswordMutationData> {
|
|
70
70
|
const mergedOptions = {
|
|
71
71
|
...hookOptions,
|
|
72
72
|
...options,
|
|
@@ -79,7 +79,7 @@ export function buildUserPasswordMutation(
|
|
|
79
79
|
),
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
|
-
return unwrapAsync(
|
|
82
|
+
return unwrapAsync(usersPassword(
|
|
83
83
|
client$,
|
|
84
84
|
request,
|
|
85
85
|
mergedOptions,
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
UseMutationResult,
|
|
9
9
|
} from "@tanstack/react-query";
|
|
10
10
|
import { GreenSecurityCore } from "../core.js";
|
|
11
|
-
import {
|
|
11
|
+
import { usersPasswordResetRequest } from "../funcs/usersPasswordResetRequest.js";
|
|
12
12
|
import { combineSignals } from "../lib/primitives.js";
|
|
13
13
|
import { RequestOptions } from "../lib/sdks.js";
|
|
14
14
|
import * as operations from "../models/operations/index.js";
|
|
@@ -16,13 +16,13 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
16
16
|
import { useGreenSecurityContext } from "./_context.js";
|
|
17
17
|
import { MutationHookOptions } from "./_types.js";
|
|
18
18
|
|
|
19
|
-
export type
|
|
19
|
+
export type UsersPasswordResetRequestMutationVariables = {
|
|
20
20
|
request: operations.PasswordResetRequestRequestBody;
|
|
21
21
|
options?: RequestOptions;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
export type
|
|
25
|
-
operations.
|
|
24
|
+
export type UsersPasswordResetRequestMutationData =
|
|
25
|
+
operations.PasswordResetRequestPasswordResetRequestOk;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Password reset request
|
|
@@ -30,43 +30,43 @@ export type UserPasswordResetRequestMutationData =
|
|
|
30
30
|
* @remarks
|
|
31
31
|
* It sends an email with a link for resetting a user's password.
|
|
32
32
|
*/
|
|
33
|
-
export function
|
|
33
|
+
export function useUsersPasswordResetRequestMutation(
|
|
34
34
|
options?: MutationHookOptions<
|
|
35
|
-
|
|
35
|
+
UsersPasswordResetRequestMutationData,
|
|
36
36
|
Error,
|
|
37
|
-
|
|
37
|
+
UsersPasswordResetRequestMutationVariables
|
|
38
38
|
>,
|
|
39
39
|
): UseMutationResult<
|
|
40
|
-
|
|
40
|
+
UsersPasswordResetRequestMutationData,
|
|
41
41
|
Error,
|
|
42
|
-
|
|
42
|
+
UsersPasswordResetRequestMutationVariables
|
|
43
43
|
> {
|
|
44
44
|
const client = useGreenSecurityContext();
|
|
45
45
|
return useMutation({
|
|
46
|
-
...
|
|
46
|
+
...buildUsersPasswordResetRequestMutation(client, options),
|
|
47
47
|
...options,
|
|
48
48
|
});
|
|
49
49
|
}
|
|
50
50
|
|
|
51
|
-
export function
|
|
52
|
-
return ["@greensecurity/javascript-sdk", "
|
|
51
|
+
export function mutationKeyUsersPasswordResetRequest(): MutationKey {
|
|
52
|
+
return ["@greensecurity/javascript-sdk", "users", "passwordResetRequest"];
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
export function
|
|
55
|
+
export function buildUsersPasswordResetRequestMutation(
|
|
56
56
|
client$: GreenSecurityCore,
|
|
57
57
|
hookOptions?: RequestOptions,
|
|
58
58
|
): {
|
|
59
59
|
mutationKey: MutationKey;
|
|
60
60
|
mutationFn: (
|
|
61
|
-
variables:
|
|
62
|
-
) => Promise<
|
|
61
|
+
variables: UsersPasswordResetRequestMutationVariables,
|
|
62
|
+
) => Promise<UsersPasswordResetRequestMutationData>;
|
|
63
63
|
} {
|
|
64
64
|
return {
|
|
65
|
-
mutationKey:
|
|
66
|
-
mutationFn: function
|
|
65
|
+
mutationKey: mutationKeyUsersPasswordResetRequest(),
|
|
66
|
+
mutationFn: function usersPasswordResetRequestMutationFn({
|
|
67
67
|
request,
|
|
68
68
|
options,
|
|
69
|
-
}): Promise<
|
|
69
|
+
}): Promise<UsersPasswordResetRequestMutationData> {
|
|
70
70
|
const mergedOptions = {
|
|
71
71
|
...hookOptions,
|
|
72
72
|
...options,
|
|
@@ -79,7 +79,7 @@ export function buildUserPasswordResetRequestMutation(
|
|
|
79
79
|
),
|
|
80
80
|
},
|
|
81
81
|
};
|
|
82
|
-
return unwrapAsync(
|
|
82
|
+
return unwrapAsync(usersPasswordResetRequest(
|
|
83
83
|
client$,
|
|
84
84
|
request,
|
|
85
85
|
mergedOptions,
|
|
@@ -22,7 +22,7 @@ export type VendorsCreateVendorRegistrationMutationVariables = {
|
|
|
22
22
|
};
|
|
23
23
|
|
|
24
24
|
export type VendorsCreateVendorRegistrationMutationData =
|
|
25
|
-
operations.
|
|
25
|
+
operations.CreateVendorRegistrationCreateVendorRegistrationCreated;
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Create vendor registration
|