diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f83b91aa..a29669bf 100755 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,25 +1,25 @@ lockVersion: 2.0.0 id: 1d22a5a4-8bac-42e3-b164-121fcacf66c9 management: - docChecksum: 981b09fde7b2fe79effa56242ae443b7 + docChecksum: 8f0f66d78d326a5f797e467310b68287 docVersion: "2025-11-10" - speakeasyVersion: 1.761.9 - generationVersion: 2.881.4 - releaseVersion: 4.1.5 - configChecksum: 8bc4434ccbac1ba85c00b5f9d501f8b3 + speakeasyVersion: 1.763.2 + generationVersion: 2.884.4 + releaseVersion: 4.1.6 + configChecksum: 01406de97492ddaf5290f9e62b24d5e1 repoURL: https://github.com/clerk/clerk-sdk-java.git installationURL: https://github.com/clerk/clerk-sdk-java published: true persistentEdits: - generation_id: d7d41f25-8718-4437-b425-89b9e2580854 - pristine_commit_hash: cfdd3a1032024a386753c80e4a4bf38d46c8fc60 - pristine_tree_hash: 50c3fc1e1891864bc5fb8f740826272b55646331 + generation_id: 4ccdcfcf-7a86-4134-9b8b-2b2477db3002 + pristine_commit_hash: 2281a308bc2eda61b9ce203b46ec2021ffe789f9 + pristine_tree_hash: 6345fbc5176d9a5d91810acebd58c7559495de0d features: java: additionalDependencies: 0.1.0 additionalProperties: 0.0.1 constsAndDefaults: 0.1.3 - core: 3.55.23 + core: 3.55.24 deprecations: 2.81.2 examples: 2.81.8 flattening: 2.81.1 @@ -552,6 +552,14 @@ trackedFiles: id: f86f8a3b26be last_write_checksum: sha1:ed26965915d3b0387b7ef70cd404e192718327df pristine_git_object: c0940739ec5ab3ca0b794369de43170c34245e67 + docs/models/components/InstanceCommunication.md: + id: ae2fcd0b0421 + last_write_checksum: sha1:90887cc51da342698824535ac2aafccbc26107dd + pristine_git_object: cba4bb031888445562608683bcc4229d380148d1 + docs/models/components/InstanceCommunicationObject.md: + id: 9a7dab693847 + last_write_checksum: sha1:5f7611d6960dc8f4684ad5d2c103dccd83b03ff3 + pristine_git_object: feae6d066310a81c40da827fe28402f6e20ced86 docs/models/components/InstanceObject.md: id: de94cef74ac2 last_write_checksum: sha1:59c220d9ce7e60e7ce2d27dc816c7f60d90d3f81 @@ -746,8 +754,8 @@ trackedFiles: pristine_git_object: fc9a4f20ead259d9bdfd2571c700d73922c6adaa docs/models/components/OauthConfig.md: id: 7f06dd2c127c - last_write_checksum: sha1:271151e99d6e73d47efb02a63f61f6434ff32157 - pristine_git_object: cd78c4bd22d8450d3962e912dd3f4f1d7af4d81f + last_write_checksum: sha1:8e68a5780387bc70466c0690ac648da08ed70689 + pristine_git_object: 32114f8b98e339ad7b01ddb3fa1b00c2d882c186 docs/models/components/Object.md: id: 664819da5a69 last_write_checksum: sha1:a0e5f161012608cc440979fcb370ddf62032e6af @@ -1180,10 +1188,14 @@ trackedFiles: id: 2eea7e58babc last_write_checksum: sha1:d217a0f4ff4d23fc8c26f1b14c464278feeaf9ce pristine_git_object: aa0095ba3ce275489bd563c6802a922cee70717d + docs/models/components/Scim.md: + id: 15d999cacc52 + last_write_checksum: sha1:6a0a6366f85e04f554d553575766c849043f65a2 + pristine_git_object: 13c4087101ffe926f65ac6626a8bf739c8e4be48 docs/models/components/Seats.md: id: ca6ade4bd7ea - last_write_checksum: sha1:f08a6969c936bdefa126d124c73aa245f01470f2 - pristine_git_object: d828213427f269e4556bbbdb71fca75d5dea76b9 + last_write_checksum: sha1:93314b679dddaa2d7b444eef1daaf7faa6b3d2bc + pristine_git_object: 89d2ab9d3b18b6a33e098c370b8f4b7d45767d6e docs/models/components/Security.md: id: 3878f0f84029 last_write_checksum: sha1:10ed49e1ccadf80fc08408c46bd326e0df89c317 @@ -1310,8 +1322,8 @@ trackedFiles: pristine_git_object: 5005e4a5864ce390660dd60e17fbc12f456e9f4b docs/models/components/User.md: id: 8f2722ab45f3 - last_write_checksum: sha1:f82920445c3fbde50fcd85395321ef3ca81e9dd7 - pristine_git_object: bb0b5f3323d2411a90af1069e0216c31c5049fc0 + last_write_checksum: sha1:bb506ff030d95d4b6b4cf1103f130b38485c4fae + pristine_git_object: c4d1972d7954b5686ea6a89b6de1aaf09f17863d docs/models/components/UserObject.md: id: 9d7bc67de5a8 last_write_checksum: sha1:93d67bda70a564f58c319ddbc99a5443182d2207 @@ -2074,8 +2086,8 @@ trackedFiles: pristine_git_object: da244a637d90dcff5ea40a9c9c2671f51a708ee2 docs/models/operations/CreateM2MTokenRequestBody.md: id: 82ade54eb5f4 - last_write_checksum: sha1:a10a2429fbb2449a831c5938577cabda9c500dbb - pristine_git_object: 6e23fa3b4a865ebc012d0d3ef2bd6538b529fb0e + last_write_checksum: sha1:35db0ed276a533f846e3469d98ba58ecd5e4ac19 + pristine_git_object: 24ebb4ada29d4f17cb367e3c78d49fafd1a52f30 docs/models/operations/CreateM2MTokenResponse.md: id: f7dee6974a30 last_write_checksum: sha1:1b7e9477e85d4b0295129946cc70070551871de6 @@ -2692,10 +2704,18 @@ trackedFiles: id: 354731c6ff37 last_write_checksum: sha1:90d15f4055f599c0cf780f3315aad5e74753bbf5 pristine_git_object: 73f8a1dc10346a1e57dd64a29be62cd77ba7e298 + docs/models/operations/GetInstanceCommunicationResponse.md: + id: 45568e7a6ebe + last_write_checksum: sha1:2e3d9ba2de56cf4efbdc06dc72dff1a64b6cda68 + pristine_git_object: cf24a70f241459588614b10608ae96f55e477b74 docs/models/operations/GetInstanceOAuthApplicationSettingsResponse.md: id: d08c68a33a00 last_write_checksum: sha1:abdf4103f001669ed24686fd8c2d352c4b2c3845 pristine_git_object: 4e66d3477623a8039ff3a9839e9e32398e49f0f6 + docs/models/operations/GetInstanceOrganizationSettingsResponse.md: + id: c986bd876b82 + last_write_checksum: sha1:0a94bd19f1813b430570293e7afe6991811bf6dd + pristine_git_object: 4ed1697165aebb83537868d39af9b7ee53c7b587 docs/models/operations/GetInstanceProtectResponse.md: id: 73d8863519ad last_write_checksum: sha1:7e4e8d4dbe91ef8106b1e44410003d5bf7e55ee7 @@ -3584,6 +3604,14 @@ trackedFiles: id: 2bb9ec3dcb7a last_write_checksum: sha1:b666068a5bfa2d6d8ee53fbd4dad1f77d414811c pristine_git_object: 1f0408e74e2b700ce7ccc4d96d7a290228d35ad8 + docs/models/operations/UpdateInstanceCommunicationRequestBody.md: + id: 9a3c13d30e15 + last_write_checksum: sha1:56efdf96b3a8909f38214f66d7cd2fa99a23533a + pristine_git_object: 0582b6a5a87c673cf7f92f52d09dbca90f71a19a + docs/models/operations/UpdateInstanceCommunicationResponse.md: + id: 6e39fa47709e + last_write_checksum: sha1:8129b120f5841ffc3959ebf9bbef3bc3b9c8221e + pristine_git_object: fa9b397c10affd9ac6dedee0b17b00342ef22d26 docs/models/operations/UpdateInstanceOAuthApplicationSettingsRequestBody.md: id: bec8dec22ddd last_write_checksum: sha1:b11311c2b5b09d1ccb590317c5eec00ac9e4ec2b @@ -4062,12 +4090,12 @@ trackedFiles: pristine_git_object: a895c1617aab48ad91e5c706bacdc23e870311c5 docs/sdks/enterpriseconnections/README.md: id: 05389ef24544 - last_write_checksum: sha1:f473d288becbb96a999750afb04481a4218a33d8 - pristine_git_object: ce0dc21f6dc1cd2d2046331f00c96b03939af36b + last_write_checksum: sha1:63fafcb369c99507f601be5ecc038fd79deb1564 + pristine_git_object: 66c3211556ab9e0b53b0c96028b7257b23eaafb6 docs/sdks/instancesettings/README.md: id: 8c1dfa91ef03 - last_write_checksum: sha1:afd2be9c36f160f2681b310b04a475b27f58bd6d - pristine_git_object: 2b268e1865556cbb4c4973a3511d18337eb32f1a + last_write_checksum: sha1:416d03ee96396d4ec64ac33cd9c7d7067d904afc + pristine_git_object: 3c3d3d0215c01029f25f5462909104d708181300 docs/sdks/invitations/README.md: id: 4f20950f4cbf last_write_checksum: sha1:fba58eef75adc1a41957f4290bd37bcef586ba91 @@ -4082,8 +4110,8 @@ trackedFiles: pristine_git_object: 23afb43164414f326c0a2b17e73bf54a1b1eab63 docs/sdks/m2m/README.md: id: f747d3bd08a1 - last_write_checksum: sha1:c7f7888dc58447d4bec29742ac89ff651571f430 - pristine_git_object: 07f3232ed39c953e96bba846c4a4120dcc176f1b + last_write_checksum: sha1:c0612b513ca9493af2f95f871b79782221e4d5b9 + pristine_git_object: 079d20d94b1bb5d84d34728a1a0b670e54214db6 docs/sdks/machines/README.md: id: ab83178bf481 last_write_checksum: sha1:b1d911692c27a907f65f0a7ba1adf3272d39d953 @@ -4142,8 +4170,8 @@ trackedFiles: pristine_git_object: d90c91d1e42a23714aaf02547abb847140213fcd docs/sdks/samlconnections/README.md: id: c10bb4446e9b - last_write_checksum: sha1:d029e85f4405e619d3fd1928b9fe9e258c468c37 - pristine_git_object: ceda4f5c108751e4f214e893a9b0ecb1b1154b68 + last_write_checksum: sha1:99ec17cadfdcbf3094ba745a0bbc9642d8e144dc + pristine_git_object: 906b17e8f133dae3f515076698621ecd19445194 docs/sdks/sessions/README.md: id: 57ad62844f79 last_write_checksum: sha1:2f49edccab12e69d351ada28016c854c007cdb2e @@ -4178,8 +4206,8 @@ trackedFiles: pristine_git_object: 45f47ee13644598aaf91efff776b5e331d062373 gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:8fe0db64c9e5d1ac6521bde2a28e972df708d222 - pristine_git_object: cd8513aa7a42796f98c4cd9cc532a2f16dbefdf3 + last_write_checksum: sha1:6f0d453a038093b4c6704539880b4717adc87bfa + pristine_git_object: f600b02a31ba8ca3f5b90d0e1fbafeaf18ddff8f gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -4290,8 +4318,8 @@ trackedFiles: pristine_git_object: 8854cd6a08b96ce9eff13dd6256e5c9dea97643f src/main/java/com/clerk/backend_api/InstanceSettings.java: id: e2ec95c97f57 - last_write_checksum: sha1:89063a167b2f020a47999988c45c1c2bae9784bc - pristine_git_object: bac846fc1104e5c4d0425a67816158116675a4a6 + last_write_checksum: sha1:1bcd17fd7d91322f554c0d6039c6fa077040cd94 + pristine_git_object: 87efcf77f06979095087e025802a92e14597b3ec src/main/java/com/clerk/backend_api/Invitations.java: id: 7c74b8fd223e last_write_checksum: sha1:5bad7ab87d69d49cfae8760e040d32770f2df3cb @@ -4366,8 +4394,8 @@ trackedFiles: pristine_git_object: 40597c8205e6e12003fcdad6e1d4f084c674effd src/main/java/com/clerk/backend_api/SDKConfiguration.java: id: 02084533ec5b - last_write_checksum: sha1:821683143fccaa3ec3457de59f4387a304798f95 - pristine_git_object: 03adfd4b92b8f2fbd2a51ffe476152a137d65951 + last_write_checksum: sha1:392bffa51285ee5461ce7389ddff5c8a8b4f09f5 + pristine_git_object: 0a7ad50ef013d516fec814d19153068604403212 src/main/java/com/clerk/backend_api/SamlConnections.java: id: 4bbf4e5d0a3c last_write_checksum: sha1:2e48c2a616261bcc34ae98b7f96b9eacfa8cdee6 @@ -4920,6 +4948,14 @@ trackedFiles: id: e4cae529c4e4 last_write_checksum: sha1:b1e4a42fdafb68e07365bd4370836c31514e541c pristine_git_object: 56d7ea42be0666211c2fbff215d330a10297ce6a + src/main/java/com/clerk/backend_api/models/components/InstanceCommunication.java: + id: bbf15f4ec646 + last_write_checksum: sha1:3780f73f12dde38e936e41dcaf45ce6dd1c7c177 + pristine_git_object: 83252beaa63acf1cb2ef2f8291ef776a89e558d3 + src/main/java/com/clerk/backend_api/models/components/InstanceCommunicationObject.java: + id: 50a1abf445b9 + last_write_checksum: sha1:70d5468ce08caa61d3d5df6f2d0015d5fa380c7b + pristine_git_object: 641bf41fe756b76becea275487216fcc2a76616a src/main/java/com/clerk/backend_api/models/components/InstanceObject.java: id: 4415b78ee245 last_write_checksum: sha1:5e3de7ea37fde1fa59740c5b328dc36c7fb06769 @@ -5114,8 +5150,8 @@ trackedFiles: pristine_git_object: 53da109f4db230e5d3d9daef8a6a700985f0de1c src/main/java/com/clerk/backend_api/models/components/OauthConfig.java: id: 9caf84269364 - last_write_checksum: sha1:c044a8dcd54e94cb493b603434b1a09aa615f95c - pristine_git_object: dd8711fec3e472b331658832551dafe3610a54d7 + last_write_checksum: sha1:bfac57ec70016339ab85b8d948090225820363b3 + pristine_git_object: 6d4f09ffaa2fc63d4730e56fb0883d22e48eefbe src/main/java/com/clerk/backend_api/models/components/Object.java: id: 2b57f2909baa last_write_checksum: sha1:030ea1239c0b660db08963a118606b3e96ffe96b @@ -5560,10 +5596,14 @@ trackedFiles: id: bb857764be22 last_write_checksum: sha1:3f1f7b767a9917139b7a692f4b934053cf327442 pristine_git_object: 0a20ffc71a06ff214b49df5adcce99c405f76aba + src/main/java/com/clerk/backend_api/models/components/Scim.java: + id: 602a309b40a5 + last_write_checksum: sha1:dadc2ed92b51d6bc03450db9fc34556c59575aaf + pristine_git_object: 33344e519e7f3d4db7aa1dc2505bcfc0c057c07f src/main/java/com/clerk/backend_api/models/components/Seats.java: id: a2587836532d - last_write_checksum: sha1:8737cf122af5efe4cec8bd0d5cfaa8701bbff391 - pristine_git_object: 340c82c7c8bad791820abb8739bcb65e153d5b57 + last_write_checksum: sha1:e3acd77fdf4f57ddef5ccabd30821ab7bf71a6da + pristine_git_object: 8bce3d7a40cbba24243d43459a821648fa241b4b src/main/java/com/clerk/backend_api/models/components/Security.java: id: f5c22fa96300 last_write_checksum: sha1:cccd86e428763a6d05632a797fedc1952ae7945b @@ -5718,8 +5758,8 @@ trackedFiles: pristine_git_object: 8d6abfb9306f4b8f50140816f566e9994c0f8fd0 src/main/java/com/clerk/backend_api/models/components/User.java: id: e0ba80043def - last_write_checksum: sha1:70cb46a44f31b547bfbcd84e881da71e2d2c3fd8 - pristine_git_object: 1c915fdb7248ca97638ff796c89e1b0cbd75d37a + last_write_checksum: sha1:17ba0d0df46f795b4422335a916aacb61a1bef0a + pristine_git_object: e9466480a3c00607d2ae1c7a8436bb5d98762587 src/main/java/com/clerk/backend_api/models/components/UserObject.java: id: 5efb9fe49895 last_write_checksum: sha1:3817019cf8043dcfae4bc45dc5a9d18da776a69a @@ -6590,8 +6630,8 @@ trackedFiles: pristine_git_object: d2d0da40f6e8655a6a823f2c51679f077030999f src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java: id: 72027b5018dc - last_write_checksum: sha1:e59cfad317d519d48bd1b1a3d07286ff6df98499 - pristine_git_object: 52b43cab26bed4c81183b5b46da02ca4b8db469f + last_write_checksum: sha1:c1f443d32e089f4a05a7a280c85d1f7c991923f5 + pristine_git_object: 1297084e1c3c61ac6fd0996f0ef84b47150e5ec2 src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBuilder.java: id: 9230de2eb228 last_write_checksum: sha1:8de6f8f6bb3a9834919414fd207b107d2b320dcd @@ -7468,6 +7508,14 @@ trackedFiles: id: 5540bb9f76dc last_write_checksum: sha1:4cebc54b528772a997bf91ace52fdb4e7c09e707 pristine_git_object: d2087d350fa785c63d05c8cd49534686373553e1 + src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationRequestBuilder.java: + id: 24fa4f53db87 + last_write_checksum: sha1:3219967e3177da65422c0225d3659845622232d3 + pristine_git_object: 722c157ef0018ddc30f82863dbd912c04f0cca75 + src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationResponse.java: + id: 2e538645c0af + last_write_checksum: sha1:1bd3957d99f313a8a9ba9152cbafa6ecee5b1620 + pristine_git_object: ed750777fcb94c5b7a025063c5ca54a0c3a44df7 src/main/java/com/clerk/backend_api/models/operations/GetInstanceOAuthApplicationSettingsRequestBuilder.java: id: 02d07b6d2923 last_write_checksum: sha1:cb92d8baca6072c1a2361cc2db397205b18611c6 @@ -7476,6 +7524,14 @@ trackedFiles: id: 17a0aa1bb1bb last_write_checksum: sha1:4b5ab513e92f860ed2ebcbe0e9fbdd26847328cf pristine_git_object: 3f32477adf9669a8536b9b2b7dc4dc9a62b2e22b + src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsRequestBuilder.java: + id: 3ca323ed9c5a + last_write_checksum: sha1:8cf6dba7a15ce7a6e0bba5e4680f1fd25a3acdab + pristine_git_object: 7a7eb50ffac7cc9125b1d5efdbf1e0bdc8470fce + src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsResponse.java: + id: 76af919b5c33 + last_write_checksum: sha1:45a19ba72d2ba7a9e876c45e1ef15a6c55feca54 + pristine_git_object: 23dd2fade7d0a8e885bee543ed176b08e93f3bbf src/main/java/com/clerk/backend_api/models/operations/GetInstanceProtectRequestBuilder.java: id: 86ff433995f5 last_write_checksum: sha1:546802a8506286526cb22dbaa081ef45841acac0 @@ -8696,6 +8752,18 @@ trackedFiles: id: b86706e7439d last_write_checksum: sha1:85a6e68bb42d6fb90f7ce090b47eb10dee4b10e1 pristine_git_object: cd40f47d7fcd2f6440cb42b5798ea68250ca1a79 + src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBody.java: + id: 419d2db13832 + last_write_checksum: sha1:2b2256fc83b5ea960973377bdcbc8db53e492923 + pristine_git_object: 0bb61e83966beb9024b9de6df37e80363e80eb98 + src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBuilder.java: + id: 051d25dd8802 + last_write_checksum: sha1:1ce859a4e08fcbc2dc9ad047b75f17306c7c97dd + pristine_git_object: 7eb1aea561e6a1e0a043bb77969a9cb18dd25599 + src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationResponse.java: + id: d47ecbfae156 + last_write_checksum: sha1:8caa6541deaccbace1c71e7453d5b61de670fa29 + pristine_git_object: 5d0295d0a563908c4e8b18305b986ca6e15db446 src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceOAuthApplicationSettingsRequestBody.java: id: 0c961826415a last_write_checksum: sha1:6ac105dc58ad681e31df044f22f2256773e969e0 @@ -9346,8 +9414,8 @@ trackedFiles: pristine_git_object: 7f206a96afe1e2f69b607bc31261eb67ba382c53 src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java: id: 96674eb8e62f - last_write_checksum: sha1:d6410320cbcf9e87946d045bd0d8cf14eb271195 - pristine_git_object: 4a0164ae721c8328bbb0c1a54c0c81b4a8e2e108 + last_write_checksum: sha1:1ea95a8fffefefdc0b861ba314d228cd1c26f1e5 + pristine_git_object: 1d4a4d674b26e92b44c8db55514838d98b68dfb3 src/main/java/com/clerk/backend_api/operations/CreateInvitation.java: id: 97cebe0fa244 last_write_checksum: sha1:f6b8b24a6a5a4d3359233a17bf5f746c19df7af4 @@ -9414,8 +9482,8 @@ trackedFiles: pristine_git_object: d0dae146fe756fccc5854b6f721b1971bd006733 src/main/java/com/clerk/backend_api/operations/CreateSAMLConnection.java: id: 4edb673c888a - last_write_checksum: sha1:d57414596c3f68ad91d4fea4f6a8bca54fb3d0db - pristine_git_object: 623754d4771727a92391a52ebfe4f501975be1eb + last_write_checksum: sha1:beb5c82a48a32e3d5c5b1b9deb2352dc65c6276a + pristine_git_object: 1bab7eee553ad914096c00a83eeb7751d385cb1f src/main/java/com/clerk/backend_api/operations/CreateSession.java: id: f4ad9d6266da last_write_checksum: sha1:8009aa44276bc0ffa5919e5665f1140d9c8e214d @@ -9620,10 +9688,18 @@ trackedFiles: id: 268bbfa35c61 last_write_checksum: sha1:badb3be64ab2cfa24760a0ffde48d23ff41c1d67 pristine_git_object: c5caf082e39c0f4a5e5d1e1024111e32bafb69b4 + src/main/java/com/clerk/backend_api/operations/GetInstanceCommunication.java: + id: 0ee1fc8f066f + last_write_checksum: sha1:5fbd10600df5a2608c26d494ce2fb7f54d604228 + pristine_git_object: 73ff298caf4692b51513a3694ac7acae4ed626f7 src/main/java/com/clerk/backend_api/operations/GetInstanceOAuthApplicationSettings.java: id: 9190c4acc5c3 last_write_checksum: sha1:c0023280ca5badd5bbf59b8606a45a658bfa9497 pristine_git_object: bf55edb8221e6175179d8d763b92da81079aecc8 + src/main/java/com/clerk/backend_api/operations/GetInstanceOrganizationSettings.java: + id: f4b03b69a068 + last_write_checksum: sha1:52fad02cdb31d7cdeb8939133ee3a802c227e0f4 + pristine_git_object: 1732b684a236f5bf09791277cff513de49fce6be src/main/java/com/clerk/backend_api/operations/GetInstanceProtect.java: id: d45882257374 last_write_checksum: sha1:804459057dfec17fe8fc270b592c8d27aae88c6e @@ -9960,6 +10036,10 @@ trackedFiles: id: 7165c53d0764 last_write_checksum: sha1:73b1b61a6d3dc08b4796774854356361348352c6 pristine_git_object: ff1c052fb944885bf49556cc5b97d3ffe4e61ed4 + src/main/java/com/clerk/backend_api/operations/UpdateInstanceCommunication.java: + id: 67ab4c5891b7 + last_write_checksum: sha1:8600ea95f056c7b6dcd6eaef0d29f645b28ee10b + pristine_git_object: 4f46ef223994a974cd87f3a30ca6acc85f751ee7 src/main/java/com/clerk/backend_api/operations/UpdateInstanceOAuthApplicationSettings.java: id: 41c2e61e756c last_write_checksum: sha1:01c7ff228aae32350b5c3353ba81ff03aa4fa77a @@ -10026,8 +10106,8 @@ trackedFiles: pristine_git_object: be187aa2c2db202fd2e99b77394522b63f43e0bb src/main/java/com/clerk/backend_api/operations/UpdateSAMLConnection.java: id: 1f0aa6f8f36e - last_write_checksum: sha1:974d101693f306dbdd1e35359b80520e748af6fb - pristine_git_object: 6995f8d85765bd54e022ca9f65a1210592cc5043 + last_write_checksum: sha1:40e231380667d3e63066366197ef202b218a703f + pristine_git_object: 136c4d630c5b7049e513fca02390ad4341cf5017 src/main/java/com/clerk/backend_api/operations/UpdateSignUp.java: id: 991f1428a4c4 last_write_checksum: sha1:fd272bd8284f5159e5e868b188495ebb9f62fae3 @@ -11906,7 +11986,7 @@ examples: createM2MToken: speakeasy-default-create-m2-M-token: requestBody: - application/json: {"token_format": "opaque"} + application/json: {"token_format": "opaque", "min_remaining_ttl_seconds": 240} responses: "201": application/json: {"object": "machine_to_machine_token", "id": "mt_f7f0ba8c3b4843ce7d85fcdd5e71853e", "subject": "mch_2xhFjEI5X2qWRvtV13BzSj8H6Dk", "claims": {"important_metadata": "Some useful data"}, "scopes": ["mch_2xhFjEI5X2qWRvtV13BzSj8H6Dk", "mch_2yGkLpQ7Y3rXSwtU24CzTk9I7Em"], "token": "mt_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "revoked": false, "revocation_reason": "Revoked by user", "expired": false, "expiration": 1716883200, "last_used_at": 1716883200, "created_at": 1716883200, "updated_at": 1716883200} @@ -12570,9 +12650,28 @@ examples: application/json: {"object": "", "deleted": false} "402": application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} + GetInstanceCommunication: + speakeasy-default-get-instance-communication: + responses: + "200": + application/json: {"object": "instance_communication", "blocked_country_codes": [""]} + UpdateInstanceCommunication: + speakeasy-default-update-instance-communication: + responses: + "200": + application/json: {"object": "instance_communication", "blocked_country_codes": ["", "", ""]} + "422": + application/json: {"errors": []} + GetInstanceOrganizationSettings: + speakeasy-default-get-instance-organization-settings: + responses: + "200": + application/json: {"object": "organization_settings", "enabled": true, "max_allowed_memberships": 589671, "max_allowed_roles": 423763, "max_allowed_domains": 934682, "creator_role": "", "admin_delete_enabled": true, "domains_enabled": false, "domains_enrollment_modes": [], "domains_default_role": ""} + "402": + application/json: {"errors": [{"message": "", "long_message": "", "code": ""}]} examplesVersion: 1.0.2 generatedTests: {} -releaseNotes: "## Java SDK Changes:\n* `clerk.users.list()`: `response.[]` **Changed** (Breaking ⚠️)\n* `clerk.users.create()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.get()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.update()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.ban()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.billing.createPriceTransition()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.billing.extendSubscriptionItemFreeTrial()`: `response.plan` **Changed** (Breaking ⚠️)\n* `clerk.users.unban()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.bulkBan()`: `response.[]` **Changed** (Breaking ⚠️)\n* `clerk.users.bulkUnban()`: `response.[]` **Changed** (Breaking ⚠️)\n* `clerk.users.lock()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.unlock()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.setProfileImage()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.deleteProfileImage()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.updateMetadata()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.getBillingSubscription()`: `response.subscriptionItems[].plan.fee` **Changed** (Breaking ⚠️)\n* `clerk.billing.cancelSubscriptionItem()`: `response.plan.fee` **Changed** (Breaking ⚠️)\n* `clerk.billing.listSubscriptionItems()`: `response.data[].plan.fee` **Changed** (Breaking ⚠️)\n* `clerk.billing.createPrice()`: \n * `request` **Changed**\n * `response` **Changed** (Breaking ⚠️)\n* `clerk.billing.listPrices()`: `response.data[]` **Changed** (Breaking ⚠️)\n* `clerk.billing.listPlans()`: `response.data[].fee` **Changed** (Breaking ⚠️)\n* `clerk.organizations.getBillingSubscription()`: `response.subscriptionItems[].plan.fee` **Changed** (Breaking ⚠️)\n* `clerk.users.setPasswordCompromised()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.unsetPasswordCompromised()`: `response` **Changed** (Breaking ⚠️)\n* `clerk.users.getInstanceOrganizationMemberships()`: `response.data[].publicUserData.banned` **Added**\n* `clerk.samlConnections.get()`: `response` **Changed**\n* `clerk.users.getOrganizationMemberships()`: `response.data[].publicUserData.banned` **Added**\n* `clerk.organizationMemberships.create()`: `response.publicUserData.banned` **Added**\n* `clerk.organizationMemberships.list()`: `response.data[].publicUserData.banned` **Added**\n* `clerk.organizationMemberships.update()`: `response.publicUserData.banned` **Added**\n* `clerk.organizationMemberships.delete()`: `response.publicUserData.banned` **Added**\n* `clerk.organizationMemberships.updateMetadata()`: `response.publicUserData.banned` **Added**\n* `clerk.samlConnections.list()`: **Deprecated**\n* `clerk.samlConnections.list()`: `response.data[]` **Changed**\n* `clerk.samlConnections.create()`: **Deprecated**\n* `clerk.samlConnections.create()`: `response` **Changed**\n* `clerk.samlConnections.get()`: **Deprecated**\n* `clerk.instanceSettings.updateOrganizationSettings()`: `response.maxAllowedDomains` **Added**\n* `clerk.samlConnections.update()`: **Deprecated**\n* `clerk.samlConnections.update()`: \n * `requestBody.allowOrganizationAccountLinking` **Added**\n * `response` **Changed**\n* `clerk.samlConnections.delete()`: **Deprecated**\n* `clerk.agentTasks.create()`: `response.agentTaskId` **Added**\n* `clerk.agentTasks.revoke()`: `response.agentTaskId` **Added**\n* `clerk.emailAddresses.delete()`: `error.status[409]` **Added**\n* `clerk.enterpriseConnections.delete()`: **Added**\n* `clerk.enterpriseConnections.update()`: **Added**\n* `clerk.enterpriseConnections.get()`: **Added**\n* `clerk.enterpriseConnections.create()`: **Added**\n* `clerk.enterpriseConnections.list()`: **Added**\n* `clerk.oauthApplications.uploadLogo()`: **Added**\n" +releaseNotes: "## Java SDK Changes:\n* `clerk.instanceSettings.getCommunication()`: **Added**\n* `clerk.instanceSettings.updateCommunication()`: **Added**\n* `clerk.instanceSettings.getOrganizationSettings()`: **Added**\n* `clerk.users.list()`: `response.[]` **Changed**\n* `clerk.users.create()`: `response` **Changed**\n* `clerk.users.get()`: `response` **Changed**\n* `clerk.users.update()`: `response` **Changed**\n* `clerk.users.ban()`: `response` **Changed**\n* `clerk.users.unban()`: `response` **Changed**\n* `clerk.users.bulkBan()`: `response.[]` **Changed**\n* `clerk.users.bulkUnban()`: `response.[]` **Changed**\n* `clerk.users.lock()`: `response` **Changed**\n* `clerk.users.unlock()`: `response` **Changed**\n* `clerk.users.setProfileImage()`: `response` **Changed**\n* `clerk.users.deleteProfileImage()`: `response` **Changed**\n* `clerk.users.updateMetadata()`: `response` **Changed**\n* `clerk.users.getBillingSubscription()`: `response.subscriptionItems[].seats.tiers` **Added**\n* `clerk.users.setPasswordCompromised()`: `response` **Changed**\n* `clerk.users.unsetPasswordCompromised()`: `response` **Changed**\n* `clerk.organizations.getBillingSubscription()`: `response.subscriptionItems[].seats.tiers` **Added**\n* `clerk.samlConnections.create()`: `error.status[409]` **Added**\n* `clerk.samlConnections.update()`: `error.status[409]` **Added**\n* `clerk.enterpriseConnections.list()`: `response.data[].oauthConfig` **Changed**\n* `clerk.enterpriseConnections.create()`: \n * `response.oauthConfig` **Changed**\n * `error.status[409]` **Added**\n* `clerk.enterpriseConnections.get()`: `response.oauthConfig` **Changed**\n* `clerk.enterpriseConnections.update()`: `response.oauthConfig` **Changed**\n* `clerk.billing.listSubscriptionItems()`: `response.data[].seats.tiers` **Added**\n* `clerk.billing.cancelSubscriptionItem()`: `response.seats.tiers` **Added**\n* `clerk.m2m.createToken()`: \n * `request.minRemainingTtlSeconds` **Added**\n" generatedFiles: - .gitattributes - USAGE.md diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 05f302b6..9df2261d 100755 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -29,7 +29,7 @@ generation: generateNewTests: false skipResponseBodyAssertions: false java: - version: 4.1.5 + version: 4.1.6 additionalDependencies: [] additionalPlugins: [] artifactID: backend-api diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index d7872d86..e4bdcf80 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,9 +1,9 @@ -speakeasyVersion: 1.761.9 +speakeasyVersion: 1.763.2 sources: clerk-java-sdk: sourceNamespace: clerk-java-sdk - sourceRevisionDigest: sha256:e03f6d56009bfb224f266d3da9243c18c5d9f0b51f3e4be4c73c85156057379f - sourceBlobDigest: sha256:5af09101a437c8ff1fdeca198717f89e09f460c7c50bac24a236be2bb1033c5a + sourceRevisionDigest: sha256:7680a43e3e7ebf20de9561ce40260e030974d91904eca68f63bb7e5cbf3b92a2 + sourceBlobDigest: sha256:6bb0feadc63d80311317bf8ab5b69a13ab181957da87e2b49ce942238534be7b tags: - latest - "2025-11-10" @@ -11,10 +11,10 @@ targets: clerk-java: source: clerk-java-sdk sourceNamespace: clerk-java-sdk - sourceRevisionDigest: sha256:e03f6d56009bfb224f266d3da9243c18c5d9f0b51f3e4be4c73c85156057379f - sourceBlobDigest: sha256:5af09101a437c8ff1fdeca198717f89e09f460c7c50bac24a236be2bb1033c5a + sourceRevisionDigest: sha256:7680a43e3e7ebf20de9561ce40260e030974d91904eca68f63bb7e5cbf3b92a2 + sourceBlobDigest: sha256:6bb0feadc63d80311317bf8ab5b69a13ab181957da87e2b49ce942238534be7b codeSamplesNamespace: clerk-java-sdk-code-samples - codeSamplesRevisionDigest: sha256:7aa77e3187d4d1dc439a3fa9a88126a6b7b9e9d0ecb5879593d1bd95065e3f80 + codeSamplesRevisionDigest: sha256:ccf28798d624a25b18125ad027aa888582beac13210d8d054a62d6df80fc4564 my-first-target: source: clerk-java-sdk sourceNamespace: clerk-java-sdk diff --git a/README.md b/README.md index 117cc647..0400b5cd 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'com.clerk:backend-api:4.1.5' +implementation 'com.clerk:backend-api:4.1.6' ``` Maven: @@ -61,7 +61,7 @@ Maven: com.clerk backend-api - 4.1.5 + 4.1.6 ``` @@ -306,9 +306,12 @@ public class MachineAuthentication { * [get](docs/sdks/instancesettings/README.md#get) - Fetch the current instance * [update](docs/sdks/instancesettings/README.md#update) - Update instance settings * [updateRestrictions](docs/sdks/instancesettings/README.md#updaterestrictions) - Update instance restrictions +* [getCommunication](docs/sdks/instancesettings/README.md#getcommunication) - Get instance communication settings +* [updateCommunication](docs/sdks/instancesettings/README.md#updatecommunication) - Update instance communication settings * [getOAuthApplicationSettings](docs/sdks/instancesettings/README.md#getoauthapplicationsettings) - Get OAuth application settings * [updateOAuthApplicationSettings](docs/sdks/instancesettings/README.md#updateoauthapplicationsettings) - Update OAuth application settings * [changeDomain](docs/sdks/instancesettings/README.md#changedomain) - Update production instance domain +* [getOrganizationSettings](docs/sdks/instancesettings/README.md#getorganizationsettings) - Get instance organization settings * [updateOrganizationSettings](docs/sdks/instancesettings/README.md#updateorganizationsettings) - Update instance organization settings * [getInstanceProtect](docs/sdks/instancesettings/README.md#getinstanceprotect) - Get instance protect settings * [updateInstanceProtect](docs/sdks/instancesettings/README.md#updateinstanceprotect) - Update instance protect settings @@ -717,33 +720,33 @@ public class Application { many more subclasses in the JDK platform). **Inherit from [`ClerkError`](./src/main/java/models/errors/ClerkError.java)**: -* [`com.clerk.backend_api.models.errors.CreateApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetApiKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeysResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.UpdateApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.UpdateApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.DeleteApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.DeleteApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetApiKeySecretResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeySecretResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.RevokeApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.CreateM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetM2MTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.RevokeM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseBody.java): 403 Forbidden. Status code `403`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetAPIKeysAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeysAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.UpdateAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.UpdateAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.DeleteAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.DeleteAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetAPIKeySecretAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeySecretAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.RevokeAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.RevokeM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeM2MTokenM2mResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyM2MTokenM2mResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenOauthAccessTokensResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.CreateAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateAPIKeyAPIKeysResponseBody.java): 409 Conflict. Status code `409`. Applicable to 1 of 207 methods.* -* [`com.clerk.backend_api.models.errors.CreateM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateM2MTokenM2mResponseBody.java): 409 Conflict. Status code `409`. Applicable to 1 of 207 methods.* +* [`com.clerk.backend_api.models.errors.CreateApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.GetApiKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeysResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.GetApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.UpdateApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.UpdateApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.DeleteApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.DeleteApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.GetApiKeySecretResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetApiKeySecretResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.RevokeApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.VerifyApiKeyResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyApiKeyResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.CreateM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.GetM2MTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.RevokeM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.VerifyM2MTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyM2MTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenResponseBody.java): 400 Bad Request. Status code `400`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseBody.java): 403 Forbidden. Status code `403`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.GetAPIKeysAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeysAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.GetAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.UpdateAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.UpdateAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.DeleteAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.DeleteAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.GetAPIKeySecretAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetAPIKeySecretAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.RevokeAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.VerifyAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyAPIKeyAPIKeysResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.GetM2MTokensM2mResponseResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.RevokeM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.RevokeM2MTokenM2mResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.VerifyM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyM2MTokenM2mResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenOauthAccessTokensResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.VerifyOAuthAccessTokenOauthAccessTokensResponseBody.java): 404 Not Found. Status code `404`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.CreateAPIKeyAPIKeysResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateAPIKeyAPIKeysResponseBody.java): 409 Conflict. Status code `409`. Applicable to 1 of 210 methods.* +* [`com.clerk.backend_api.models.errors.CreateM2MTokenM2mResponseBody`](./src/main/java/models/errors/com.clerk.backend_api.models.errors.CreateM2MTokenM2mResponseBody.java): 409 Conflict. Status code `409`. Applicable to 1 of 210 methods.* diff --git a/RELEASES.md b/RELEASES.md index 26c4276b..1bb19ce5 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -418,4 +418,14 @@ Based on: ### Generated - [java v4.1.5] . ### Releases -- [Maven Central v4.1.5] https://central.sonatype.com/artifact/com.clerk/backend-api/4.1.5 - . \ No newline at end of file +- [Maven Central v4.1.5] https://central.sonatype.com/artifact/com.clerk/backend-api/4.1.5 - . + +## 2026-05-20 00:34:42 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.763.2 (2.884.4) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v4.1.6] . +### Releases +- [Maven Central v4.1.6] https://central.sonatype.com/artifact/com.clerk/backend-api/4.1.6 - . \ No newline at end of file diff --git a/docs/models/components/InstanceCommunication.md b/docs/models/components/InstanceCommunication.md new file mode 100644 index 00000000..cba4bb03 --- /dev/null +++ b/docs/models/components/InstanceCommunication.md @@ -0,0 +1,11 @@ +# InstanceCommunication + +Per-instance SMS communication settings, including the SMS country blocklist. + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `object` | [InstanceCommunicationObject](../../models/components/InstanceCommunicationObject.md) | :heavy_check_mark: | N/A | +| `blockedCountryCodes` | List\<*String*> | :heavy_check_mark: | ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that aren't recognized are silently dropped. | \ No newline at end of file diff --git a/docs/models/components/InstanceCommunicationObject.md b/docs/models/components/InstanceCommunicationObject.md new file mode 100644 index 00000000..feae6d06 --- /dev/null +++ b/docs/models/components/InstanceCommunicationObject.md @@ -0,0 +1,16 @@ +# InstanceCommunicationObject + +## Example Usage + +```java +import com.clerk.backend_api.models.components.InstanceCommunicationObject; + +InstanceCommunicationObject value = InstanceCommunicationObject.INSTANCE_COMMUNICATION; +``` + + +## Values + +| Name | Value | +| ------------------------ | ------------------------ | +| `INSTANCE_COMMUNICATION` | instance_communication | \ No newline at end of file diff --git a/docs/models/components/OauthConfig.md b/docs/models/components/OauthConfig.md index cd78c4bd..32114f8b 100644 --- a/docs/models/components/OauthConfig.md +++ b/docs/models/components/OauthConfig.md @@ -5,13 +5,17 @@ Present when the enterprise connection uses OIDC or EASIE ## Fields -| Field | Type | Required | Description | -| -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------- | -| `id` | *Optional\* | :heavy_minus_sign: | OAuth config ID | -| `name` | *Optional\* | :heavy_minus_sign: | Custom OIDC provider display name | -| `providerKey` | *Optional\* | :heavy_minus_sign: | OAuth provider key (e.g. oidc_custom, oidc_ghe_*, oidc_gitlab_ent_*) | -| `clientId` | *JsonNullable\* | :heavy_minus_sign: | OAuth client ID | -| `discoveryUrl` | *JsonNullable\* | :heavy_minus_sign: | OIDC discovery URL | -| `logoPublicUrl` | *JsonNullable\* | :heavy_minus_sign: | Logo URL for the provider | -| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp in milliseconds when the config was created | -| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp in milliseconds when the config was last updated | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | OAuth config ID | +| `name` | *Optional\* | :heavy_minus_sign: | Custom OIDC provider display name | +| `providerKey` | *Optional\* | :heavy_minus_sign: | OAuth provider key (e.g. oidc_custom, oidc_ghe_*, oidc_gitlab_ent_*) | +| `clientId` | *JsonNullable\* | :heavy_minus_sign: | OAuth client ID | +| `discoveryUrl` | *JsonNullable\* | :heavy_minus_sign: | OIDC discovery URL | +| `authUrl` | *JsonNullable\* | :heavy_minus_sign: | OAuth authorization endpoint URL (present when configured or resolved from discovery) | +| `tokenUrl` | *JsonNullable\* | :heavy_minus_sign: | OAuth token endpoint URL (present when configured or resolved from discovery) | +| `userInfoUrl` | *JsonNullable\* | :heavy_minus_sign: | OIDC userinfo endpoint URL (present when configured or resolved from discovery) | +| `requiresPkce` | *Optional\* | :heavy_minus_sign: | Whether PKCE is required for this OAuth client | +| `logoPublicUrl` | *JsonNullable\* | :heavy_minus_sign: | Logo URL for the provider | +| `createdAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp in milliseconds when the config was created | +| `updatedAt` | *Optional\* | :heavy_minus_sign: | Unix timestamp in milliseconds when the config was last updated | \ No newline at end of file diff --git a/docs/models/components/Scim.md b/docs/models/components/Scim.md new file mode 100644 index 00000000..13c40871 --- /dev/null +++ b/docs/models/components/Scim.md @@ -0,0 +1,13 @@ +# Scim + +Metadata describing a user's linkage to a SCIM directory. This object is only delivered on `user.created` and `user.updated` webhook events, and only when the user is provisioned through a SCIM directory. Its absence does not necessarily mean the user is not SCIM-managed. + + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | --------------------------------------------------------------------- | +| `directoryId` | *String* | :heavy_check_mark: | The ID of the SCIM directory the user is provisioned from.
| +| `directoryEnabled` | *Optional\* | :heavy_minus_sign: | Whether the SCIM directory is currently enabled. Omitted when false.
| +| `externalId` | *Optional\* | :heavy_check_mark: | The user's external ID as reported by the SCIM directory, if any.
| \ No newline at end of file diff --git a/docs/models/components/Seats.md b/docs/models/components/Seats.md index d8282134..89d2ab9d 100644 --- a/docs/models/components/Seats.md +++ b/docs/models/components/Seats.md @@ -5,6 +5,7 @@ Seat quantity for seat-based billing. ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | ------------------------------------------------ | -| `quantity` | *Optional\* | :heavy_check_mark: | Seat quantity being billed; null means unlimited | \ No newline at end of file +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `quantity` | *Optional\* | :heavy_check_mark: | Seat quantity being billed; null means unlimited | +| `tiers` | List\<[CommercePerUnitTotalTier](../../models/components/CommercePerUnitTotalTier.md)> | :heavy_minus_sign: | Per-unit cost breakdown by pricing tier | \ No newline at end of file diff --git a/docs/models/components/User.md b/docs/models/components/User.md index bb0b5f33..c4d1972d 100644 --- a/docs/models/components/User.md +++ b/docs/models/components/User.md @@ -41,6 +41,7 @@ Success | `lastSignInAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of last sign-in.
| | | `banned` | *boolean* | :heavy_check_mark: | Flag to denote whether user is banned or not.
| | | `locked` | *boolean* | :heavy_check_mark: | Flag to denote whether user is currently locked, i.e. restricted from signing in or not.
| | +| `deprovisioned` | *Optional\* | :heavy_minus_sign: | Flag to denote whether user has been deprovisioned and is restricted from signing in.
| | | `lockoutExpiresInSeconds` | *Optional\* | :heavy_check_mark: | The number of seconds remaining until the lockout period expires for a locked user. A null value for a locked user indicates that lockout never expires.
| | | `verificationAttemptsRemaining` | *Optional\* | :heavy_check_mark: | The number of verification attempts remaining until the user is locked. Null if account lockout is not enabled. Note: if a user is locked explicitly via the Backend API, they may still have verification attempts remaining.
| | | `updatedAt` | *long* | :heavy_check_mark: | Unix timestamp of last update.
| | @@ -50,4 +51,5 @@ Success | `createOrganizationsLimit` | *JsonNullable\* | :heavy_minus_sign: | The maximum number of organizations the user can create. 0 means unlimited.
| | | `lastActiveAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of the latest session activity, with day precision.
| 1700690400000 | | `legalAcceptedAt` | *Optional\* | :heavy_check_mark: | Unix timestamp of when the user accepted the legal requirements.
| 1700690400000 | -| `bypassClientTrust` | *Optional\* | :heavy_minus_sign: | When set to `true`, the user will bypass client trust checks during sign-in. | | \ No newline at end of file +| `bypassClientTrust` | *Optional\* | :heavy_minus_sign: | When set to `true`, the user will bypass client trust checks during sign-in. | | +| `scim` | [JsonNullable\](../../models/components/Scim.md) | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/CreateM2MTokenRequestBody.md b/docs/models/operations/CreateM2MTokenRequestBody.md index 6e23fa3b..24ebb4ad 100644 --- a/docs/models/operations/CreateM2MTokenRequestBody.md +++ b/docs/models/operations/CreateM2MTokenRequestBody.md @@ -3,8 +3,9 @@ ## Fields -| Field | Type | Required | Description | -| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `tokenFormat` | [Optional\](../../models/operations/TokenFormat.md) | :heavy_minus_sign: | N/A | -| `secondsUntilExpiration` | *JsonNullable\* | :heavy_minus_sign: | N/A | -| `claims` | *JsonNullable\* | :heavy_minus_sign: | N/A | \ No newline at end of file +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `tokenFormat` | [Optional\](../../models/operations/TokenFormat.md) | :heavy_minus_sign: | N/A | | +| `secondsUntilExpiration` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `claims` | *JsonNullable\* | :heavy_minus_sign: | N/A | | +| `minRemainingTtlSeconds` | *Optional\* | :heavy_minus_sign: | Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired M2M token already exists for this machine with identical `claims` and `scopes` and at least this many seconds of remaining lifetime, that existing token is returned and no new token is minted.

Use this when caching tokens in application memory across requests is impractical — for example, in serverless functions, short-lived job workers, or autoscaling containers that churn faster than the token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live token, which is the recommended pattern for high-volume M2M traffic.

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is rejected with a 400, since no freshly-minted token would ever satisfy the requirement.

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are stateless and are never deduplicated. | 240 | \ No newline at end of file diff --git a/docs/models/operations/GetInstanceCommunicationResponse.md b/docs/models/operations/GetInstanceCommunicationResponse.md new file mode 100644 index 00000000..cf24a70f --- /dev/null +++ b/docs/models/operations/GetInstanceCommunicationResponse.md @@ -0,0 +1,11 @@ +# GetInstanceCommunicationResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `instanceCommunication` | [Optional\](../../models/components/InstanceCommunication.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/GetInstanceOrganizationSettingsResponse.md b/docs/models/operations/GetInstanceOrganizationSettingsResponse.md new file mode 100644 index 00000000..4ed16971 --- /dev/null +++ b/docs/models/operations/GetInstanceOrganizationSettingsResponse.md @@ -0,0 +1,11 @@ +# GetInstanceOrganizationSettingsResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `organizationSettings` | [Optional\](../../models/components/OrganizationSettings.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/models/operations/UpdateInstanceCommunicationRequestBody.md b/docs/models/operations/UpdateInstanceCommunicationRequestBody.md new file mode 100644 index 00000000..0582b6a5 --- /dev/null +++ b/docs/models/operations/UpdateInstanceCommunicationRequestBody.md @@ -0,0 +1,8 @@ +# UpdateInstanceCommunicationRequestBody + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | +| `blockedCountryCodes` | List\<*String*> | :heavy_minus_sign: | ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be uppercase, 2-letter, and unique within the array. | \ No newline at end of file diff --git a/docs/models/operations/UpdateInstanceCommunicationResponse.md b/docs/models/operations/UpdateInstanceCommunicationResponse.md new file mode 100644 index 00000000..fa9b397c --- /dev/null +++ b/docs/models/operations/UpdateInstanceCommunicationResponse.md @@ -0,0 +1,11 @@ +# UpdateInstanceCommunicationResponse + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------ | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `instanceCommunication` | [Optional\](../../models/components/InstanceCommunication.md) | :heavy_minus_sign: | Success | \ No newline at end of file diff --git a/docs/sdks/enterpriseconnections/README.md b/docs/sdks/enterpriseconnections/README.md index ce0dc21f..66c32115 100644 --- a/docs/sdks/enterpriseconnections/README.md +++ b/docs/sdks/enterpriseconnections/README.md @@ -113,7 +113,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json | +| models/errors/ClerkErrors | 402, 403, 404, 409, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## get diff --git a/docs/sdks/instancesettings/README.md b/docs/sdks/instancesettings/README.md index 2b268e18..3c3d3d02 100644 --- a/docs/sdks/instancesettings/README.md +++ b/docs/sdks/instancesettings/README.md @@ -9,9 +9,12 @@ Modify the settings of your instance. * [get](#get) - Fetch the current instance * [update](#update) - Update instance settings * [updateRestrictions](#updaterestrictions) - Update instance restrictions +* [getCommunication](#getcommunication) - Get instance communication settings +* [updateCommunication](#updatecommunication) - Update instance communication settings * [getOAuthApplicationSettings](#getoauthapplicationsettings) - Get OAuth application settings * [updateOAuthApplicationSettings](#updateoauthapplicationsettings) - Update OAuth application settings * [changeDomain](#changedomain) - Update production instance domain +* [getOrganizationSettings](#getorganizationsettings) - Get instance organization settings * [updateOrganizationSettings](#updateorganizationsettings) - Update instance organization settings * [getInstanceProtect](#getinstanceprotect) - Get instance protect settings * [updateInstanceProtect](#updateinstanceprotect) - Update instance protect settings @@ -156,6 +159,102 @@ public class Application { | models/errors/ClerkErrors | 402, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## getCommunication + +Retrieves the per-instance SMS communication settings, including the SMS country blocklist. + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.operations.GetInstanceCommunicationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + GetInstanceCommunicationResponse res = sdk.instanceSettings().getCommunication() + .call(); + + if (res.instanceCommunication().isPresent()) { + System.out.println(res.instanceCommunication().get()); + } + } +} +``` + +### Response + +**[GetInstanceCommunicationResponse](../../models/operations/GetInstanceCommunicationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ---------------------- | ---------------------- | ---------------------- | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + +## updateCommunication + +Replaces the SMS country blocklist for this instance. Pass the full set of ISO 3166-1 +alpha-2 country codes that should be blocked; codes that aren't recognized as SMS-tier +countries are silently dropped from the persisted list. Omitting `blocked_country_codes` +is a no-op. + + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + UpdateInstanceCommunicationResponse res = sdk.instanceSettings().updateCommunication() + .call(); + + if (res.instanceCommunication().isPresent()) { + System.out.println(res.instanceCommunication().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | +| `request` | [UpdateInstanceCommunicationRequestBody](../../models/operations/UpdateInstanceCommunicationRequestBody.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[UpdateInstanceCommunicationResponse](../../models/operations/UpdateInstanceCommunicationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 422 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## getOAuthApplicationSettings Retrieves the settings for OAuth applications for the instance (dynamic client registration, JWT access tokens, etc.). @@ -300,6 +399,50 @@ public class Application { | models/errors/ClerkErrors | 400, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | +## getOrganizationSettings + +Retrieves the organization settings of the instance + +### Example Usage + + +```java +package hello.world; + +import com.clerk.backend_api.Clerk; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.operations.GetInstanceOrganizationSettingsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ClerkErrors, Exception { + + Clerk sdk = Clerk.builder() + .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", "")) + .build(); + + GetInstanceOrganizationSettingsResponse res = sdk.instanceSettings().getOrganizationSettings() + .call(); + + if (res.organizationSettings().isPresent()) { + System.out.println(res.organizationSettings().get()); + } + } +} +``` + +### Response + +**[GetInstanceOrganizationSettingsResponse](../../models/operations/GetInstanceOrganizationSettingsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------- | ------------------------- | ------------------------- | +| models/errors/ClerkErrors | 402, 404, 422 | application/json | +| models/errors/SDKError | 4XX, 5XX | \*/\* | + ## updateOrganizationSettings Updates the organization settings of the instance diff --git a/docs/sdks/m2m/README.md b/docs/sdks/m2m/README.md index 07f3232e..079d20d9 100644 --- a/docs/sdks/m2m/README.md +++ b/docs/sdks/m2m/README.md @@ -35,6 +35,7 @@ public class Application { .build(); CreateM2MTokenRequestBody req = CreateM2MTokenRequestBody.builder() + .minRemainingTtlSeconds(240L) .build(); CreateM2MTokenResponse res = sdk.m2m().createToken() diff --git a/docs/sdks/samlconnections/README.md b/docs/sdks/samlconnections/README.md index ceda4f5c..906b17e8 100644 --- a/docs/sdks/samlconnections/README.md +++ b/docs/sdks/samlconnections/README.md @@ -135,7 +135,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json | +| models/errors/ClerkErrors | 402, 403, 404, 409, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~get~~ @@ -271,7 +271,7 @@ public class Application { | Error Type | Status Code | Content Type | | ------------------------- | ------------------------- | ------------------------- | -| models/errors/ClerkErrors | 402, 403, 404, 422 | application/json | +| models/errors/ClerkErrors | 402, 403, 404, 409, 422 | application/json | | models/errors/SDKError | 4XX, 5XX | \*/\* | ## ~~delete~~ diff --git a/gradle.properties b/gradle.properties index cd8513aa..f600b02a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=com.clerk artifactId=backend-api -version=4.1.5 +version=4.1.6 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/src/main/java/com/clerk/backend_api/InstanceSettings.java b/src/main/java/com/clerk/backend_api/InstanceSettings.java index bac846fc..87efcf77 100644 --- a/src/main/java/com/clerk/backend_api/InstanceSettings.java +++ b/src/main/java/com/clerk/backend_api/InstanceSettings.java @@ -9,12 +9,19 @@ import com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainRequestBody; import com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainRequestBuilder; import com.clerk.backend_api.models.operations.ChangeProductionInstanceDomainResponse; +import com.clerk.backend_api.models.operations.GetInstanceCommunicationRequestBuilder; +import com.clerk.backend_api.models.operations.GetInstanceCommunicationResponse; import com.clerk.backend_api.models.operations.GetInstanceOAuthApplicationSettingsRequestBuilder; import com.clerk.backend_api.models.operations.GetInstanceOAuthApplicationSettingsResponse; +import com.clerk.backend_api.models.operations.GetInstanceOrganizationSettingsRequestBuilder; +import com.clerk.backend_api.models.operations.GetInstanceOrganizationSettingsResponse; import com.clerk.backend_api.models.operations.GetInstanceProtectRequestBuilder; import com.clerk.backend_api.models.operations.GetInstanceProtectResponse; import com.clerk.backend_api.models.operations.GetInstanceRequestBuilder; import com.clerk.backend_api.models.operations.GetInstanceResponse; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationRequestBody; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationRequestBuilder; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationResponse; import com.clerk.backend_api.models.operations.UpdateInstanceOAuthApplicationSettingsRequestBody; import com.clerk.backend_api.models.operations.UpdateInstanceOAuthApplicationSettingsRequestBuilder; import com.clerk.backend_api.models.operations.UpdateInstanceOAuthApplicationSettingsResponse; @@ -32,9 +39,12 @@ import com.clerk.backend_api.models.operations.UpdateInstanceRestrictionsResponse; import com.clerk.backend_api.operations.ChangeProductionInstanceDomain; import com.clerk.backend_api.operations.GetInstance; +import com.clerk.backend_api.operations.GetInstanceCommunication; import com.clerk.backend_api.operations.GetInstanceOAuthApplicationSettings; +import com.clerk.backend_api.operations.GetInstanceOrganizationSettings; import com.clerk.backend_api.operations.GetInstanceProtect; import com.clerk.backend_api.operations.UpdateInstance; +import com.clerk.backend_api.operations.UpdateInstanceCommunication; import com.clerk.backend_api.operations.UpdateInstanceOAuthApplicationSettings; import com.clerk.backend_api.operations.UpdateInstanceOrganizationSettings; import com.clerk.backend_api.operations.UpdateInstanceProtect; @@ -170,6 +180,92 @@ public UpdateInstanceRestrictionsResponse updateRestrictions(OptionalRetrieves the per-instance SMS communication settings, including the SMS country blocklist. + * + * @return The call builder + */ + public GetInstanceCommunicationRequestBuilder getCommunication() { + return new GetInstanceCommunicationRequestBuilder(sdkConfiguration); + } + + /** + * Get instance communication settings + * + *

Retrieves the per-instance SMS communication settings, including the SMS country blocklist. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public GetInstanceCommunicationResponse getCommunicationDirect() { + return getCommunication(Optional.empty()); + } + + /** + * Get instance communication settings + * + *

Retrieves the per-instance SMS communication settings, including the SMS country blocklist. + * + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public GetInstanceCommunicationResponse getCommunication(Optional options) { + RequestlessOperation operation + = new GetInstanceCommunication.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest()); + } + + /** + * Update instance communication settings + * + *

Replaces the SMS country blocklist for this instance. Pass the full set of ISO 3166-1 + * alpha-2 country codes that should be blocked; codes that aren't recognized as SMS-tier + * countries are silently dropped from the persisted list. Omitting `blocked_country_codes` + * is a no-op. + * + * @return The call builder + */ + public UpdateInstanceCommunicationRequestBuilder updateCommunication() { + return new UpdateInstanceCommunicationRequestBuilder(sdkConfiguration); + } + + /** + * Update instance communication settings + * + *

Replaces the SMS country blocklist for this instance. Pass the full set of ISO 3166-1 + * alpha-2 country codes that should be blocked; codes that aren't recognized as SMS-tier + * countries are silently dropped from the persisted list. Omitting `blocked_country_codes` + * is a no-op. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public UpdateInstanceCommunicationResponse updateCommunicationDirect() { + return updateCommunication(Optional.empty(), Optional.empty()); + } + + /** + * Update instance communication settings + * + *

Replaces the SMS country blocklist for this instance. Pass the full set of ISO 3166-1 + * alpha-2 country codes that should be blocked; codes that aren't recognized as SMS-tier + * countries are silently dropped from the persisted list. Omitting `blocked_country_codes` + * is a no-op. + * + * @param request The request object containing all the parameters for the API call. + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public UpdateInstanceCommunicationResponse updateCommunication(Optional request, Optional options) { + RequestOperation, UpdateInstanceCommunicationResponse> operation + = new UpdateInstanceCommunication.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + /** * Get OAuth application settings * @@ -313,6 +409,44 @@ public ChangeProductionInstanceDomainResponse changeDomain(OptionalRetrieves the organization settings of the instance + * + * @return The call builder + */ + public GetInstanceOrganizationSettingsRequestBuilder getOrganizationSettings() { + return new GetInstanceOrganizationSettingsRequestBuilder(sdkConfiguration); + } + + /** + * Get instance organization settings + * + *

Retrieves the organization settings of the instance + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public GetInstanceOrganizationSettingsResponse getOrganizationSettingsDirect() { + return getOrganizationSettings(Optional.empty()); + } + + /** + * Get instance organization settings + * + *

Retrieves the organization settings of the instance + * + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public GetInstanceOrganizationSettingsResponse getOrganizationSettings(Optional options) { + RequestlessOperation operation + = new GetInstanceOrganizationSettings.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest()); + } + /** * Update instance organization settings * diff --git a/src/main/java/com/clerk/backend_api/SDKConfiguration.java b/src/main/java/com/clerk/backend_api/SDKConfiguration.java index 03adfd4b..0a7ad50e 100644 --- a/src/main/java/com/clerk/backend_api/SDKConfiguration.java +++ b/src/main/java/com/clerk/backend_api/SDKConfiguration.java @@ -16,8 +16,8 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; public static final String OPENAPI_DOC_VERSION = "2025-11-10"; - public static final String SDK_VERSION = "4.1.5"; - public static final String GEN_VERSION = "2.881.4"; + public static final String SDK_VERSION = "4.1.6"; + public static final String GEN_VERSION = "2.884.4"; private static final String BASE_PACKAGE = "com.clerk.backend_api"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/com/clerk/backend_api/models/components/InstanceCommunication.java b/src/main/java/com/clerk/backend_api/models/components/InstanceCommunication.java new file mode 100644 index 00000000..83252bea --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/InstanceCommunication.java @@ -0,0 +1,139 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.util.List; + +/** + * InstanceCommunication + * + *

Per-instance SMS communication settings, including the SMS country blocklist. + */ +public class InstanceCommunication { + + @JsonProperty("object") + private InstanceCommunicationObject object; + + /** + * ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that + * aren't recognized are silently dropped. + */ + @JsonProperty("blocked_country_codes") + private List blockedCountryCodes; + + @JsonCreator + public InstanceCommunication( + @JsonProperty("object") InstanceCommunicationObject object, + @JsonProperty("blocked_country_codes") List blockedCountryCodes) { + Utils.checkNotNull(object, "object"); + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.object = object; + this.blockedCountryCodes = blockedCountryCodes; + } + + @JsonIgnore + public InstanceCommunicationObject object() { + return object; + } + + /** + * ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that + * aren't recognized are silently dropped. + */ + @JsonIgnore + public List blockedCountryCodes() { + return blockedCountryCodes; + } + + public static Builder builder() { + return new Builder(); + } + + + public InstanceCommunication withObject(InstanceCommunicationObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + /** + * ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that + * aren't recognized are silently dropped. + */ + public InstanceCommunication withBlockedCountryCodes(List blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InstanceCommunication other = (InstanceCommunication) o; + return + Utils.enhancedDeepEquals(this.object, other.object) && + Utils.enhancedDeepEquals(this.blockedCountryCodes, other.blockedCountryCodes); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + object, blockedCountryCodes); + } + + @Override + public String toString() { + return Utils.toString(InstanceCommunication.class, + "object", object, + "blockedCountryCodes", blockedCountryCodes); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private InstanceCommunicationObject object; + + private List blockedCountryCodes; + + private Builder() { + // force use of static builder() method + } + + + public Builder object(InstanceCommunicationObject object) { + Utils.checkNotNull(object, "object"); + this.object = object; + return this; + } + + + /** + * ISO 3166-1 alpha-2 country codes that are blocked for SMS delivery on this instance. Codes that + * aren't recognized are silently dropped. + */ + public Builder blockedCountryCodes(List blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + return this; + } + + public InstanceCommunication build() { + + return new InstanceCommunication( + object, blockedCountryCodes); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/InstanceCommunicationObject.java b/src/main/java/com/clerk/backend_api/models/components/InstanceCommunicationObject.java new file mode 100644 index 00000000..641bf41f --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/InstanceCommunicationObject.java @@ -0,0 +1,34 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum InstanceCommunicationObject { + INSTANCE_COMMUNICATION("instance_communication"); + + @JsonValue + private final String value; + + InstanceCommunicationObject(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (InstanceCommunicationObject o: InstanceCommunicationObject.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/com/clerk/backend_api/models/components/OauthConfig.java b/src/main/java/com/clerk/backend_api/models/components/OauthConfig.java index dd8711fe..6d4f09ff 100644 --- a/src/main/java/com/clerk/backend_api/models/components/OauthConfig.java +++ b/src/main/java/com/clerk/backend_api/models/components/OauthConfig.java @@ -9,6 +9,7 @@ import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; import java.lang.Long; import java.lang.Override; import java.lang.String; @@ -56,6 +57,34 @@ public class OauthConfig { @JsonProperty("discovery_url") private JsonNullable discoveryUrl; + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("auth_url") + private JsonNullable authUrl; + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("token_url") + private JsonNullable tokenUrl; + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("user_info_url") + private JsonNullable userInfoUrl; + + /** + * Whether PKCE is required for this OAuth client + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("requires_pkce") + private Optional requiresPkce; + /** * Logo URL for the provider */ @@ -84,6 +113,10 @@ public OauthConfig( @JsonProperty("provider_key") Optional providerKey, @JsonProperty("client_id") JsonNullable clientId, @JsonProperty("discovery_url") JsonNullable discoveryUrl, + @JsonProperty("auth_url") JsonNullable authUrl, + @JsonProperty("token_url") JsonNullable tokenUrl, + @JsonProperty("user_info_url") JsonNullable userInfoUrl, + @JsonProperty("requires_pkce") Optional requiresPkce, @JsonProperty("logo_public_url") JsonNullable logoPublicUrl, @JsonProperty("created_at") Optional createdAt, @JsonProperty("updated_at") Optional updatedAt) { @@ -92,6 +125,10 @@ public OauthConfig( Utils.checkNotNull(providerKey, "providerKey"); Utils.checkNotNull(clientId, "clientId"); Utils.checkNotNull(discoveryUrl, "discoveryUrl"); + Utils.checkNotNull(authUrl, "authUrl"); + Utils.checkNotNull(tokenUrl, "tokenUrl"); + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + Utils.checkNotNull(requiresPkce, "requiresPkce"); Utils.checkNotNull(logoPublicUrl, "logoPublicUrl"); Utils.checkNotNull(createdAt, "createdAt"); Utils.checkNotNull(updatedAt, "updatedAt"); @@ -100,6 +137,10 @@ public OauthConfig( this.providerKey = providerKey; this.clientId = clientId; this.discoveryUrl = discoveryUrl; + this.authUrl = authUrl; + this.tokenUrl = tokenUrl; + this.userInfoUrl = userInfoUrl; + this.requiresPkce = requiresPkce; this.logoPublicUrl = logoPublicUrl; this.createdAt = createdAt; this.updatedAt = updatedAt; @@ -108,7 +149,8 @@ public OauthConfig( public OauthConfig() { this(Optional.empty(), Optional.empty(), Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), JsonNullable.undefined(), - Optional.empty(), Optional.empty()); + JsonNullable.undefined(), JsonNullable.undefined(), Optional.empty(), + JsonNullable.undefined(), Optional.empty(), Optional.empty()); } /** @@ -151,6 +193,38 @@ public JsonNullable discoveryUrl() { return discoveryUrl; } + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + @JsonIgnore + public JsonNullable authUrl() { + return authUrl; + } + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + @JsonIgnore + public JsonNullable tokenUrl() { + return tokenUrl; + } + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + @JsonIgnore + public JsonNullable userInfoUrl() { + return userInfoUrl; + } + + /** + * Whether PKCE is required for this OAuth client + */ + @JsonIgnore + public Optional requiresPkce() { + return requiresPkce; + } + /** * Logo URL for the provider */ @@ -273,6 +347,79 @@ public OauthConfig withDiscoveryUrl(JsonNullable discoveryUrl) { return this; } + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withAuthUrl(String authUrl) { + Utils.checkNotNull(authUrl, "authUrl"); + this.authUrl = JsonNullable.of(authUrl); + return this; + } + + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withAuthUrl(JsonNullable authUrl) { + Utils.checkNotNull(authUrl, "authUrl"); + this.authUrl = authUrl; + return this; + } + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withTokenUrl(String tokenUrl) { + Utils.checkNotNull(tokenUrl, "tokenUrl"); + this.tokenUrl = JsonNullable.of(tokenUrl); + return this; + } + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withTokenUrl(JsonNullable tokenUrl) { + Utils.checkNotNull(tokenUrl, "tokenUrl"); + this.tokenUrl = tokenUrl; + return this; + } + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withUserInfoUrl(String userInfoUrl) { + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + this.userInfoUrl = JsonNullable.of(userInfoUrl); + return this; + } + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + public OauthConfig withUserInfoUrl(JsonNullable userInfoUrl) { + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + this.userInfoUrl = userInfoUrl; + return this; + } + + /** + * Whether PKCE is required for this OAuth client + */ + public OauthConfig withRequiresPkce(boolean requiresPkce) { + Utils.checkNotNull(requiresPkce, "requiresPkce"); + this.requiresPkce = Optional.ofNullable(requiresPkce); + return this; + } + + + /** + * Whether PKCE is required for this OAuth client + */ + public OauthConfig withRequiresPkce(Optional requiresPkce) { + Utils.checkNotNull(requiresPkce, "requiresPkce"); + this.requiresPkce = requiresPkce; + return this; + } + /** * Logo URL for the provider */ @@ -344,6 +491,10 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.providerKey, other.providerKey) && Utils.enhancedDeepEquals(this.clientId, other.clientId) && Utils.enhancedDeepEquals(this.discoveryUrl, other.discoveryUrl) && + Utils.enhancedDeepEquals(this.authUrl, other.authUrl) && + Utils.enhancedDeepEquals(this.tokenUrl, other.tokenUrl) && + Utils.enhancedDeepEquals(this.userInfoUrl, other.userInfoUrl) && + Utils.enhancedDeepEquals(this.requiresPkce, other.requiresPkce) && Utils.enhancedDeepEquals(this.logoPublicUrl, other.logoPublicUrl) && Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); @@ -353,8 +504,9 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( id, name, providerKey, - clientId, discoveryUrl, logoPublicUrl, - createdAt, updatedAt); + clientId, discoveryUrl, authUrl, + tokenUrl, userInfoUrl, requiresPkce, + logoPublicUrl, createdAt, updatedAt); } @Override @@ -365,6 +517,10 @@ public String toString() { "providerKey", providerKey, "clientId", clientId, "discoveryUrl", discoveryUrl, + "authUrl", authUrl, + "tokenUrl", tokenUrl, + "userInfoUrl", userInfoUrl, + "requiresPkce", requiresPkce, "logoPublicUrl", logoPublicUrl, "createdAt", createdAt, "updatedAt", updatedAt); @@ -383,6 +539,14 @@ public final static class Builder { private JsonNullable discoveryUrl = JsonNullable.undefined(); + private JsonNullable authUrl = JsonNullable.undefined(); + + private JsonNullable tokenUrl = JsonNullable.undefined(); + + private JsonNullable userInfoUrl = JsonNullable.undefined(); + + private Optional requiresPkce = Optional.empty(); + private JsonNullable logoPublicUrl = JsonNullable.undefined(); private Optional createdAt = Optional.empty(); @@ -489,6 +653,82 @@ public Builder discoveryUrl(JsonNullable discoveryUrl) { } + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + public Builder authUrl(String authUrl) { + Utils.checkNotNull(authUrl, "authUrl"); + this.authUrl = JsonNullable.of(authUrl); + return this; + } + + /** + * OAuth authorization endpoint URL (present when configured or resolved from discovery) + */ + public Builder authUrl(JsonNullable authUrl) { + Utils.checkNotNull(authUrl, "authUrl"); + this.authUrl = authUrl; + return this; + } + + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + public Builder tokenUrl(String tokenUrl) { + Utils.checkNotNull(tokenUrl, "tokenUrl"); + this.tokenUrl = JsonNullable.of(tokenUrl); + return this; + } + + /** + * OAuth token endpoint URL (present when configured or resolved from discovery) + */ + public Builder tokenUrl(JsonNullable tokenUrl) { + Utils.checkNotNull(tokenUrl, "tokenUrl"); + this.tokenUrl = tokenUrl; + return this; + } + + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + public Builder userInfoUrl(String userInfoUrl) { + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + this.userInfoUrl = JsonNullable.of(userInfoUrl); + return this; + } + + /** + * OIDC userinfo endpoint URL (present when configured or resolved from discovery) + */ + public Builder userInfoUrl(JsonNullable userInfoUrl) { + Utils.checkNotNull(userInfoUrl, "userInfoUrl"); + this.userInfoUrl = userInfoUrl; + return this; + } + + + /** + * Whether PKCE is required for this OAuth client + */ + public Builder requiresPkce(boolean requiresPkce) { + Utils.checkNotNull(requiresPkce, "requiresPkce"); + this.requiresPkce = Optional.ofNullable(requiresPkce); + return this; + } + + /** + * Whether PKCE is required for this OAuth client + */ + public Builder requiresPkce(Optional requiresPkce) { + Utils.checkNotNull(requiresPkce, "requiresPkce"); + this.requiresPkce = requiresPkce; + return this; + } + + /** * Logo URL for the provider */ @@ -549,8 +789,9 @@ public OauthConfig build() { return new OauthConfig( id, name, providerKey, - clientId, discoveryUrl, logoPublicUrl, - createdAt, updatedAt); + clientId, discoveryUrl, authUrl, + tokenUrl, userInfoUrl, requiresPkce, + logoPublicUrl, createdAt, updatedAt); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/Scim.java b/src/main/java/com/clerk/backend_api/models/components/Scim.java new file mode 100644 index 00000000..33344e51 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/components/Scim.java @@ -0,0 +1,236 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.components; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + +/** + * Scim + * + *

Metadata describing a user's linkage to a SCIM directory. This object is only delivered on + * `user.created` and `user.updated` webhook events, and only when the user is provisioned through a + * SCIM directory. Its absence does not necessarily mean the user is not SCIM-managed. + */ +public class Scim { + /** + * The ID of the SCIM directory the user is provisioned from. + */ + @JsonProperty("directory_id") + private String directoryId; + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("directory_enabled") + private Optional directoryEnabled; + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + @JsonInclude(Include.ALWAYS) + @JsonProperty("external_id") + private Optional externalId; + + @JsonCreator + public Scim( + @JsonProperty("directory_id") String directoryId, + @JsonProperty("directory_enabled") Optional directoryEnabled, + @JsonProperty("external_id") Optional externalId) { + Utils.checkNotNull(directoryId, "directoryId"); + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + Utils.checkNotNull(externalId, "externalId"); + this.directoryId = directoryId; + this.directoryEnabled = directoryEnabled; + this.externalId = externalId; + } + + public Scim( + String directoryId) { + this(directoryId, Optional.empty(), Optional.empty()); + } + + /** + * The ID of the SCIM directory the user is provisioned from. + */ + @JsonIgnore + public String directoryId() { + return directoryId; + } + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + @JsonIgnore + public Optional directoryEnabled() { + return directoryEnabled; + } + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + @JsonIgnore + public Optional externalId() { + return externalId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The ID of the SCIM directory the user is provisioned from. + */ + public Scim withDirectoryId(String directoryId) { + Utils.checkNotNull(directoryId, "directoryId"); + this.directoryId = directoryId; + return this; + } + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + public Scim withDirectoryEnabled(boolean directoryEnabled) { + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + this.directoryEnabled = Optional.ofNullable(directoryEnabled); + return this; + } + + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + public Scim withDirectoryEnabled(Optional directoryEnabled) { + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + this.directoryEnabled = directoryEnabled; + return this; + } + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + public Scim withExternalId(String externalId) { + Utils.checkNotNull(externalId, "externalId"); + this.externalId = Optional.ofNullable(externalId); + return this; + } + + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + public Scim withExternalId(Optional externalId) { + Utils.checkNotNull(externalId, "externalId"); + this.externalId = externalId; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Scim other = (Scim) o; + return + Utils.enhancedDeepEquals(this.directoryId, other.directoryId) && + Utils.enhancedDeepEquals(this.directoryEnabled, other.directoryEnabled) && + Utils.enhancedDeepEquals(this.externalId, other.externalId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + directoryId, directoryEnabled, externalId); + } + + @Override + public String toString() { + return Utils.toString(Scim.class, + "directoryId", directoryId, + "directoryEnabled", directoryEnabled, + "externalId", externalId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String directoryId; + + private Optional directoryEnabled = Optional.empty(); + + private Optional externalId = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * The ID of the SCIM directory the user is provisioned from. + */ + public Builder directoryId(String directoryId) { + Utils.checkNotNull(directoryId, "directoryId"); + this.directoryId = directoryId; + return this; + } + + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + public Builder directoryEnabled(boolean directoryEnabled) { + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + this.directoryEnabled = Optional.ofNullable(directoryEnabled); + return this; + } + + /** + * Whether the SCIM directory is currently enabled. Omitted when false. + */ + public Builder directoryEnabled(Optional directoryEnabled) { + Utils.checkNotNull(directoryEnabled, "directoryEnabled"); + this.directoryEnabled = directoryEnabled; + return this; + } + + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + public Builder externalId(String externalId) { + Utils.checkNotNull(externalId, "externalId"); + this.externalId = Optional.ofNullable(externalId); + return this; + } + + /** + * The user's external ID as reported by the SCIM directory, if any. + */ + public Builder externalId(Optional externalId) { + Utils.checkNotNull(externalId, "externalId"); + this.externalId = externalId; + return this; + } + + public Scim build() { + + return new Scim( + directoryId, directoryEnabled, externalId); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/components/Seats.java b/src/main/java/com/clerk/backend_api/models/components/Seats.java index 340c82c7..8bce3d7a 100644 --- a/src/main/java/com/clerk/backend_api/models/components/Seats.java +++ b/src/main/java/com/clerk/backend_api/models/components/Seats.java @@ -12,6 +12,8 @@ import java.lang.Long; import java.lang.Override; import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; import java.util.Optional; /** @@ -27,15 +29,25 @@ public class Seats { @JsonProperty("quantity") private Optional quantity; + /** + * Per-unit cost breakdown by pricing tier + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tiers") + private Optional> tiers; + @JsonCreator public Seats( - @JsonProperty("quantity") Optional quantity) { + @JsonProperty("quantity") Optional quantity, + @JsonProperty("tiers") Optional> tiers) { Utils.checkNotNull(quantity, "quantity"); + Utils.checkNotNull(tiers, "tiers"); this.quantity = quantity; + this.tiers = tiers; } public Seats() { - this(Optional.empty()); + this(Optional.empty(), Optional.empty()); } /** @@ -46,6 +58,15 @@ public Optional quantity() { return quantity; } + /** + * Per-unit cost breakdown by pricing tier + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional> tiers() { + return (Optional>) tiers; + } + public static Builder builder() { return new Builder(); } @@ -70,6 +91,25 @@ public Seats withQuantity(Optional quantity) { return this; } + /** + * Per-unit cost breakdown by pricing tier + */ + public Seats withTiers(List tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = Optional.ofNullable(tiers); + return this; + } + + + /** + * Per-unit cost breakdown by pricing tier + */ + public Seats withTiers(Optional> tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = tiers; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -80,19 +120,21 @@ public boolean equals(java.lang.Object o) { } Seats other = (Seats) o; return - Utils.enhancedDeepEquals(this.quantity, other.quantity); + Utils.enhancedDeepEquals(this.quantity, other.quantity) && + Utils.enhancedDeepEquals(this.tiers, other.tiers); } @Override public int hashCode() { return Utils.enhancedHash( - quantity); + quantity, tiers); } @Override public String toString() { return Utils.toString(Seats.class, - "quantity", quantity); + "quantity", quantity, + "tiers", tiers); } @SuppressWarnings("UnusedReturnValue") @@ -100,6 +142,8 @@ public final static class Builder { private Optional quantity = Optional.empty(); + private Optional> tiers = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -123,10 +167,29 @@ public Builder quantity(Optional quantity) { return this; } + + /** + * Per-unit cost breakdown by pricing tier + */ + public Builder tiers(List tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = Optional.ofNullable(tiers); + return this; + } + + /** + * Per-unit cost breakdown by pricing tier + */ + public Builder tiers(Optional> tiers) { + Utils.checkNotNull(tiers, "tiers"); + this.tiers = tiers; + return this; + } + public Seats build() { return new Seats( - quantity); + quantity, tiers); } } diff --git a/src/main/java/com/clerk/backend_api/models/components/User.java b/src/main/java/com/clerk/backend_api/models/components/User.java index 1c915fdb..e9466480 100644 --- a/src/main/java/com/clerk/backend_api/models/components/User.java +++ b/src/main/java/com/clerk/backend_api/models/components/User.java @@ -202,6 +202,13 @@ public class User { @JsonProperty("locked") private boolean locked; + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deprovisioned") + private Optional deprovisioned; + /** * The number of seconds remaining until the lockout period expires for a locked user. A null value for * a locked user indicates that lockout never expires. @@ -271,6 +278,11 @@ public class User { @JsonProperty("bypass_client_trust") private Optional bypassClientTrust; + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("scim") + private JsonNullable scim; + @JsonCreator public User( @JsonProperty("id") String id, @@ -307,6 +319,7 @@ public User( @JsonProperty("last_sign_in_at") Optional lastSignInAt, @JsonProperty("banned") boolean banned, @JsonProperty("locked") boolean locked, + @JsonProperty("deprovisioned") Optional deprovisioned, @JsonProperty("lockout_expires_in_seconds") Optional lockoutExpiresInSeconds, @JsonProperty("verification_attempts_remaining") Optional verificationAttemptsRemaining, @JsonProperty("updated_at") long updatedAt, @@ -316,7 +329,8 @@ public User( @JsonProperty("create_organizations_limit") JsonNullable createOrganizationsLimit, @JsonProperty("last_active_at") Optional lastActiveAt, @JsonProperty("legal_accepted_at") Optional legalAcceptedAt, - @JsonProperty("bypass_client_trust") Optional bypassClientTrust) { + @JsonProperty("bypass_client_trust") Optional bypassClientTrust, + @JsonProperty("scim") JsonNullable scim) { Utils.checkNotNull(id, "id"); Utils.checkNotNull(object, "object"); Utils.checkNotNull(externalId, "externalId"); @@ -352,6 +366,7 @@ public User( Utils.checkNotNull(lastSignInAt, "lastSignInAt"); Utils.checkNotNull(banned, "banned"); Utils.checkNotNull(locked, "locked"); + Utils.checkNotNull(deprovisioned, "deprovisioned"); Utils.checkNotNull(lockoutExpiresInSeconds, "lockoutExpiresInSeconds"); Utils.checkNotNull(verificationAttemptsRemaining, "verificationAttemptsRemaining"); Utils.checkNotNull(updatedAt, "updatedAt"); @@ -362,6 +377,7 @@ public User( Utils.checkNotNull(lastActiveAt, "lastActiveAt"); Utils.checkNotNull(legalAcceptedAt, "legalAcceptedAt"); Utils.checkNotNull(bypassClientTrust, "bypassClientTrust"); + Utils.checkNotNull(scim, "scim"); this.id = id; this.object = object; this.externalId = externalId; @@ -396,6 +412,7 @@ public User( this.lastSignInAt = lastSignInAt; this.banned = banned; this.locked = locked; + this.deprovisioned = deprovisioned; this.lockoutExpiresInSeconds = lockoutExpiresInSeconds; this.verificationAttemptsRemaining = verificationAttemptsRemaining; this.updatedAt = updatedAt; @@ -406,6 +423,7 @@ public User( this.lastActiveAt = lastActiveAt; this.legalAcceptedAt = legalAcceptedAt; this.bypassClientTrust = bypassClientTrust; + this.scim = scim; } public User( @@ -442,9 +460,10 @@ public User( externalAccounts, samlAccounts, enterpriseAccounts, Optional.empty(), Optional.empty(), banned, locked, Optional.empty(), Optional.empty(), - updatedAt, createdAt, deleteSelfEnabled, - createOrganizationEnabled, JsonNullable.undefined(), Optional.empty(), - Optional.empty(), Optional.empty()); + Optional.empty(), updatedAt, createdAt, + deleteSelfEnabled, createOrganizationEnabled, JsonNullable.undefined(), + Optional.empty(), Optional.empty(), Optional.empty(), + JsonNullable.undefined()); } @JsonIgnore @@ -648,6 +667,14 @@ public boolean locked() { return locked; } + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + @JsonIgnore + public Optional deprovisioned() { + return deprovisioned; + } + /** * The number of seconds remaining until the lockout period expires for a locked user. A null value for * a locked user indicates that lockout never expires. @@ -731,6 +758,12 @@ public Optional bypassClientTrust() { return bypassClientTrust; } + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable scim() { + return (JsonNullable) scim; + } + public static Builder builder() { return new Builder(); } @@ -1103,6 +1136,25 @@ public User withLocked(boolean locked) { return this; } + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + public User withDeprovisioned(boolean deprovisioned) { + Utils.checkNotNull(deprovisioned, "deprovisioned"); + this.deprovisioned = Optional.ofNullable(deprovisioned); + return this; + } + + + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + public User withDeprovisioned(Optional deprovisioned) { + Utils.checkNotNull(deprovisioned, "deprovisioned"); + this.deprovisioned = deprovisioned; + return this; + } + /** * The number of seconds remaining until the lockout period expires for a locked user. A null value for * a locked user indicates that lockout never expires. @@ -1258,6 +1310,18 @@ public User withBypassClientTrust(Optional bypassClientTrust) { return this; } + public User withScim(Scim scim) { + Utils.checkNotNull(scim, "scim"); + this.scim = JsonNullable.of(scim); + return this; + } + + public User withScim(JsonNullable scim) { + Utils.checkNotNull(scim, "scim"); + this.scim = scim; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -1302,6 +1366,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.lastSignInAt, other.lastSignInAt) && Utils.enhancedDeepEquals(this.banned, other.banned) && Utils.enhancedDeepEquals(this.locked, other.locked) && + Utils.enhancedDeepEquals(this.deprovisioned, other.deprovisioned) && Utils.enhancedDeepEquals(this.lockoutExpiresInSeconds, other.lockoutExpiresInSeconds) && Utils.enhancedDeepEquals(this.verificationAttemptsRemaining, other.verificationAttemptsRemaining) && Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt) && @@ -1311,7 +1376,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.createOrganizationsLimit, other.createOrganizationsLimit) && Utils.enhancedDeepEquals(this.lastActiveAt, other.lastActiveAt) && Utils.enhancedDeepEquals(this.legalAcceptedAt, other.legalAcceptedAt) && - Utils.enhancedDeepEquals(this.bypassClientTrust, other.bypassClientTrust); + Utils.enhancedDeepEquals(this.bypassClientTrust, other.bypassClientTrust) && + Utils.enhancedDeepEquals(this.scim, other.scim); } @Override @@ -1328,10 +1394,11 @@ public int hashCode() { mfaEnabledAt, mfaDisabledAt, passwordLastUpdatedAt, externalAccounts, samlAccounts, enterpriseAccounts, organizationMemberships, lastSignInAt, banned, - locked, lockoutExpiresInSeconds, verificationAttemptsRemaining, - updatedAt, createdAt, deleteSelfEnabled, - createOrganizationEnabled, createOrganizationsLimit, lastActiveAt, - legalAcceptedAt, bypassClientTrust); + locked, deprovisioned, lockoutExpiresInSeconds, + verificationAttemptsRemaining, updatedAt, createdAt, + deleteSelfEnabled, createOrganizationEnabled, createOrganizationsLimit, + lastActiveAt, legalAcceptedAt, bypassClientTrust, + scim); } @Override @@ -1371,6 +1438,7 @@ public String toString() { "lastSignInAt", lastSignInAt, "banned", banned, "locked", locked, + "deprovisioned", deprovisioned, "lockoutExpiresInSeconds", lockoutExpiresInSeconds, "verificationAttemptsRemaining", verificationAttemptsRemaining, "updatedAt", updatedAt, @@ -1380,7 +1448,8 @@ public String toString() { "createOrganizationsLimit", createOrganizationsLimit, "lastActiveAt", lastActiveAt, "legalAcceptedAt", legalAcceptedAt, - "bypassClientTrust", bypassClientTrust); + "bypassClientTrust", bypassClientTrust, + "scim", scim); } @SuppressWarnings("UnusedReturnValue") @@ -1455,6 +1524,8 @@ public final static class Builder { private Boolean locked; + private Optional deprovisioned = Optional.empty(); + private Optional lockoutExpiresInSeconds = Optional.empty(); private Optional verificationAttemptsRemaining = Optional.empty(); @@ -1475,6 +1546,8 @@ public final static class Builder { private Optional bypassClientTrust; + private JsonNullable scim = JsonNullable.undefined(); + private Builder() { // force use of static builder() method } @@ -1867,6 +1940,25 @@ public Builder locked(boolean locked) { } + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + public Builder deprovisioned(boolean deprovisioned) { + Utils.checkNotNull(deprovisioned, "deprovisioned"); + this.deprovisioned = Optional.ofNullable(deprovisioned); + return this; + } + + /** + * Flag to denote whether user has been deprovisioned and is restricted from signing in. + */ + public Builder deprovisioned(Optional deprovisioned) { + Utils.checkNotNull(deprovisioned, "deprovisioned"); + this.deprovisioned = deprovisioned; + return this; + } + + /** * The number of seconds remaining until the lockout period expires for a locked user. A null value for * a locked user indicates that lockout never expires. @@ -2026,6 +2118,19 @@ public Builder bypassClientTrust(Optional bypassClientTrust) { return this; } + + public Builder scim(Scim scim) { + Utils.checkNotNull(scim, "scim"); + this.scim = JsonNullable.of(scim); + return this; + } + + public Builder scim(JsonNullable scim) { + Utils.checkNotNull(scim, "scim"); + this.scim = scim; + return this; + } + public User build() { if (bypassClientTrust == null) { bypassClientTrust = _SINGLETON_VALUE_BypassClientTrust.value(); @@ -2043,10 +2148,11 @@ public User build() { mfaEnabledAt, mfaDisabledAt, passwordLastUpdatedAt, externalAccounts, samlAccounts, enterpriseAccounts, organizationMemberships, lastSignInAt, banned, - locked, lockoutExpiresInSeconds, verificationAttemptsRemaining, - updatedAt, createdAt, deleteSelfEnabled, - createOrganizationEnabled, createOrganizationsLimit, lastActiveAt, - legalAcceptedAt, bypassClientTrust); + locked, deprovisioned, lockoutExpiresInSeconds, + verificationAttemptsRemaining, updatedAt, createdAt, + deleteSelfEnabled, createOrganizationEnabled, createOrganizationsLimit, + lastActiveAt, legalAcceptedAt, bypassClientTrust, + scim); } diff --git a/src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java index 52b43cab..1297084e 100644 --- a/src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java +++ b/src/main/java/com/clerk/backend_api/models/operations/CreateM2MTokenRequestBody.java @@ -12,6 +12,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.core.type.TypeReference; import java.lang.Double; +import java.lang.Long; import java.lang.Object; import java.lang.Override; import java.lang.String; @@ -36,21 +37,46 @@ public class CreateM2MTokenRequestBody { @JsonProperty("claims") private JsonNullable claims; + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("min_remaining_ttl_seconds") + private Optional minRemainingTtlSeconds; + @JsonCreator public CreateM2MTokenRequestBody( @JsonProperty("token_format") Optional tokenFormat, @JsonProperty("seconds_until_expiration") JsonNullable secondsUntilExpiration, - @JsonProperty("claims") JsonNullable claims) { + @JsonProperty("claims") JsonNullable claims, + @JsonProperty("min_remaining_ttl_seconds") Optional minRemainingTtlSeconds) { Utils.checkNotNull(tokenFormat, "tokenFormat"); Utils.checkNotNull(secondsUntilExpiration, "secondsUntilExpiration"); Utils.checkNotNull(claims, "claims"); + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); this.tokenFormat = tokenFormat; this.secondsUntilExpiration = secondsUntilExpiration; this.claims = claims; + this.minRemainingTtlSeconds = minRemainingTtlSeconds; } public CreateM2MTokenRequestBody() { - this(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined()); + this(Optional.empty(), JsonNullable.undefined(), JsonNullable.undefined(), + Optional.empty()); } @SuppressWarnings("unchecked") @@ -70,6 +96,28 @@ public JsonNullable claims() { return (JsonNullable) claims; } + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + @JsonIgnore + public Optional minRemainingTtlSeconds() { + return minRemainingTtlSeconds; + } + public static Builder builder() { return new Builder(); } @@ -112,6 +160,53 @@ public CreateM2MTokenRequestBody withClaims(JsonNullable claim return this; } + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + public CreateM2MTokenRequestBody withMinRemainingTtlSeconds(long minRemainingTtlSeconds) { + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); + this.minRemainingTtlSeconds = Optional.ofNullable(minRemainingTtlSeconds); + return this; + } + + + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + public CreateM2MTokenRequestBody withMinRemainingTtlSeconds(Optional minRemainingTtlSeconds) { + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); + this.minRemainingTtlSeconds = minRemainingTtlSeconds; + return this; + } + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -124,13 +219,15 @@ public boolean equals(java.lang.Object o) { return Utils.enhancedDeepEquals(this.tokenFormat, other.tokenFormat) && Utils.enhancedDeepEquals(this.secondsUntilExpiration, other.secondsUntilExpiration) && - Utils.enhancedDeepEquals(this.claims, other.claims); + Utils.enhancedDeepEquals(this.claims, other.claims) && + Utils.enhancedDeepEquals(this.minRemainingTtlSeconds, other.minRemainingTtlSeconds); } @Override public int hashCode() { return Utils.enhancedHash( - tokenFormat, secondsUntilExpiration, claims); + tokenFormat, secondsUntilExpiration, claims, + minRemainingTtlSeconds); } @Override @@ -138,7 +235,8 @@ public String toString() { return Utils.toString(CreateM2MTokenRequestBody.class, "tokenFormat", tokenFormat, "secondsUntilExpiration", secondsUntilExpiration, - "claims", claims); + "claims", claims, + "minRemainingTtlSeconds", minRemainingTtlSeconds); } @SuppressWarnings("UnusedReturnValue") @@ -150,6 +248,8 @@ public final static class Builder { private JsonNullable claims = JsonNullable.undefined(); + private Optional minRemainingTtlSeconds = Optional.empty(); + private Builder() { // force use of static builder() method } @@ -193,13 +293,61 @@ public Builder claims(JsonNullable claims) { return this; } + + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + public Builder minRemainingTtlSeconds(long minRemainingTtlSeconds) { + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); + this.minRemainingTtlSeconds = Optional.ofNullable(minRemainingTtlSeconds); + return this; + } + + /** + * Enables server-side token reuse for opaque-format tokens. When set, if a non-revoked, non-expired + * M2M token already exists for this machine with identical `claims` and `scopes` and at least this + * many seconds of remaining lifetime, that existing token is returned and no new token is minted. + * + *

Use this when caching tokens in application memory across requests is impractical — for example, in + * serverless functions, short-lived job workers, or autoscaling containers that churn faster than the + * token TTL. Pooling at the server collapses many redundant create calls into reuse of a single live + * token, which is the recommended pattern for high-volume M2M traffic. + * + *

Must be strictly less than the effective token lifetime — that is, `seconds_until_expiration` when + * provided, or the machine's default TTL otherwise. A value greater than or equal to the lifetime is + * rejected with a 400, since no freshly-minted token would ever satisfy the requirement. + * + *

Only applies to opaque-format tokens (`token_format` defaults to `opaque`). JWT-format tokens are + * stateless and are never deduplicated. + */ + public Builder minRemainingTtlSeconds(Optional minRemainingTtlSeconds) { + Utils.checkNotNull(minRemainingTtlSeconds, "minRemainingTtlSeconds"); + this.minRemainingTtlSeconds = minRemainingTtlSeconds; + return this; + } + public CreateM2MTokenRequestBody build() { if (tokenFormat == null) { tokenFormat = _SINGLETON_VALUE_TokenFormat.value(); } return new CreateM2MTokenRequestBody( - tokenFormat, secondsUntilExpiration, claims); + tokenFormat, secondsUntilExpiration, claims, + minRemainingTtlSeconds); } diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationRequestBuilder.java new file mode 100644 index 00000000..722c157e --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestlessOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.GetInstanceCommunication; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.util.Optional; + +public class GetInstanceCommunicationRequestBuilder { + + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public GetInstanceCommunicationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetInstanceCommunicationRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public GetInstanceCommunicationRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public GetInstanceCommunicationResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestlessOperation operation + = new GetInstanceCommunication.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationResponse.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationResponse.java new file mode 100644 index 00000000..ed750777 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceCommunicationResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.InstanceCommunication; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetInstanceCommunicationResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Success + */ + private Optional instanceCommunication; + + @JsonCreator + public GetInstanceCommunicationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional instanceCommunication) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.instanceCommunication = instanceCommunication; + } + + public GetInstanceCommunicationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional instanceCommunication() { + return (Optional) instanceCommunication; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetInstanceCommunicationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetInstanceCommunicationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetInstanceCommunicationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public GetInstanceCommunicationResponse withInstanceCommunication(InstanceCommunication instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = Optional.ofNullable(instanceCommunication); + return this; + } + + + /** + * Success + */ + public GetInstanceCommunicationResponse withInstanceCommunication(Optional instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = instanceCommunication; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetInstanceCommunicationResponse other = (GetInstanceCommunicationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.instanceCommunication, other.instanceCommunication); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + instanceCommunication); + } + + @Override + public String toString() { + return Utils.toString(GetInstanceCommunicationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "instanceCommunication", instanceCommunication); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional instanceCommunication = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Success + */ + public Builder instanceCommunication(InstanceCommunication instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = Optional.ofNullable(instanceCommunication); + return this; + } + + /** + * Success + */ + public Builder instanceCommunication(Optional instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = instanceCommunication; + return this; + } + + public GetInstanceCommunicationResponse build() { + + return new GetInstanceCommunicationResponse( + contentType, statusCode, rawResponse, + instanceCommunication); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsRequestBuilder.java new file mode 100644 index 00000000..7a7eb50f --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsRequestBuilder.java @@ -0,0 +1,48 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestlessOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.GetInstanceOrganizationSettings; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.util.Optional; + +public class GetInstanceOrganizationSettingsRequestBuilder { + + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public GetInstanceOrganizationSettingsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public GetInstanceOrganizationSettingsRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public GetInstanceOrganizationSettingsRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public GetInstanceOrganizationSettingsResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestlessOperation operation + = new GetInstanceOrganizationSettings.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest()); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsResponse.java b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsResponse.java new file mode 100644 index 00000000..23dd2fad --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/GetInstanceOrganizationSettingsResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.OrganizationSettings; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class GetInstanceOrganizationSettingsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Success + */ + private Optional organizationSettings; + + @JsonCreator + public GetInstanceOrganizationSettingsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional organizationSettings) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.organizationSettings = organizationSettings; + } + + public GetInstanceOrganizationSettingsResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional organizationSettings() { + return (Optional) organizationSettings; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public GetInstanceOrganizationSettingsResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public GetInstanceOrganizationSettingsResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public GetInstanceOrganizationSettingsResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public GetInstanceOrganizationSettingsResponse withOrganizationSettings(OrganizationSettings organizationSettings) { + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.organizationSettings = Optional.ofNullable(organizationSettings); + return this; + } + + + /** + * Success + */ + public GetInstanceOrganizationSettingsResponse withOrganizationSettings(Optional organizationSettings) { + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.organizationSettings = organizationSettings; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetInstanceOrganizationSettingsResponse other = (GetInstanceOrganizationSettingsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.organizationSettings, other.organizationSettings); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + organizationSettings); + } + + @Override + public String toString() { + return Utils.toString(GetInstanceOrganizationSettingsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "organizationSettings", organizationSettings); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional organizationSettings = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Success + */ + public Builder organizationSettings(OrganizationSettings organizationSettings) { + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.organizationSettings = Optional.ofNullable(organizationSettings); + return this; + } + + /** + * Success + */ + public Builder organizationSettings(Optional organizationSettings) { + Utils.checkNotNull(organizationSettings, "organizationSettings"); + this.organizationSettings = organizationSettings; + return this; + } + + public GetInstanceOrganizationSettingsResponse build() { + + return new GetInstanceOrganizationSettingsResponse( + contentType, statusCode, rawResponse, + organizationSettings); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBody.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBody.java new file mode 100644 index 00000000..0bb61e83 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBody.java @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.List; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class UpdateInstanceCommunicationRequestBody { + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("blocked_country_codes") + private JsonNullable> blockedCountryCodes; + + @JsonCreator + public UpdateInstanceCommunicationRequestBody( + @JsonProperty("blocked_country_codes") JsonNullable> blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + } + + public UpdateInstanceCommunicationRequestBody() { + this(JsonNullable.undefined()); + } + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public JsonNullable> blockedCountryCodes() { + return (JsonNullable>) blockedCountryCodes; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + public UpdateInstanceCommunicationRequestBody withBlockedCountryCodes(List blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = JsonNullable.of(blockedCountryCodes); + return this; + } + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + public UpdateInstanceCommunicationRequestBody withBlockedCountryCodes(JsonNullable> blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateInstanceCommunicationRequestBody other = (UpdateInstanceCommunicationRequestBody) o; + return + Utils.enhancedDeepEquals(this.blockedCountryCodes, other.blockedCountryCodes); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + blockedCountryCodes); + } + + @Override + public String toString() { + return Utils.toString(UpdateInstanceCommunicationRequestBody.class, + "blockedCountryCodes", blockedCountryCodes); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable> blockedCountryCodes = JsonNullable.undefined(); + + private Builder() { + // force use of static builder() method + } + + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + public Builder blockedCountryCodes(List blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = JsonNullable.of(blockedCountryCodes); + return this; + } + + /** + * ISO 3166-1 alpha-2 country codes to block for SMS delivery. Whole-list replacement. Codes must be + * uppercase, 2-letter, and unique within the array. + */ + public Builder blockedCountryCodes(JsonNullable> blockedCountryCodes) { + Utils.checkNotNull(blockedCountryCodes, "blockedCountryCodes"); + this.blockedCountryCodes = blockedCountryCodes; + return this; + } + + public UpdateInstanceCommunicationRequestBody build() { + + return new UpdateInstanceCommunicationRequestBody( + blockedCountryCodes); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBuilder.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBuilder.java new file mode 100644 index 00000000..7eb1aea5 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationRequestBuilder.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.operations.UpdateInstanceCommunication; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import java.util.Optional; + +public class UpdateInstanceCommunicationRequestBuilder { + + private Optional request = Optional.empty(); + private Optional retryConfig = Optional.empty(); + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + + public UpdateInstanceCommunicationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + } + + public UpdateInstanceCommunicationRequestBuilder request(UpdateInstanceCommunicationRequestBody request) { + Utils.checkNotNull(request, "request"); + this.request = Optional.of(request); + return this; + } + + public UpdateInstanceCommunicationRequestBuilder request(Optional request) { + Utils.checkNotNull(request, "request"); + this.request = request; + return this; + } + + public UpdateInstanceCommunicationRequestBuilder retryConfig(RetryConfig retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = Optional.of(retryConfig); + return this; + } + + public UpdateInstanceCommunicationRequestBuilder retryConfig(Optional retryConfig) { + Utils.checkNotNull(retryConfig, "retryConfig"); + this.retryConfig = retryConfig; + return this; + } + + public UpdateInstanceCommunicationResponse call() { + Optional options = Optional.of(Options.builder() + .retryConfig(retryConfig) + .build()); + + RequestOperation, UpdateInstanceCommunicationResponse> operation + = new UpdateInstanceCommunication.Sync(sdkConfiguration, options, _headers); + + return operation.handleResponse(operation.doRequest(request)); + } +} diff --git a/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationResponse.java b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationResponse.java new file mode 100644 index 00000000..5d0295d0 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/models/operations/UpdateInstanceCommunicationResponse.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.models.operations; + +import com.clerk.backend_api.models.components.InstanceCommunication; +import com.clerk.backend_api.utils.Response; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.io.InputStream; +import java.lang.Integer; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.net.http.HttpResponse; +import java.util.Optional; + + +public class UpdateInstanceCommunicationResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Success + */ + private Optional instanceCommunication; + + @JsonCreator + public UpdateInstanceCommunicationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse, + Optional instanceCommunication) { + Utils.checkNotNull(contentType, "contentType"); + Utils.checkNotNull(statusCode, "statusCode"); + Utils.checkNotNull(rawResponse, "rawResponse"); + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.contentType = contentType; + this.statusCode = statusCode; + this.rawResponse = rawResponse; + this.instanceCommunication = instanceCommunication; + } + + public UpdateInstanceCommunicationResponse( + String contentType, + int statusCode, + HttpResponse rawResponse) { + this(contentType, statusCode, rawResponse, + Optional.empty()); + } + + /** + * HTTP response content type for this operation + */ + @JsonIgnore + public String contentType() { + return contentType; + } + + /** + * HTTP response status code for this operation + */ + @JsonIgnore + public int statusCode() { + return statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + @JsonIgnore + public HttpResponse rawResponse() { + return rawResponse; + } + + /** + * Success + */ + @SuppressWarnings("unchecked") + @JsonIgnore + public Optional instanceCommunication() { + return (Optional) instanceCommunication; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public UpdateInstanceCommunicationResponse withContentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + /** + * HTTP response status code for this operation + */ + public UpdateInstanceCommunicationResponse withStatusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public UpdateInstanceCommunicationResponse withRawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + /** + * Success + */ + public UpdateInstanceCommunicationResponse withInstanceCommunication(InstanceCommunication instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = Optional.ofNullable(instanceCommunication); + return this; + } + + + /** + * Success + */ + public UpdateInstanceCommunicationResponse withInstanceCommunication(Optional instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = instanceCommunication; + return this; + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateInstanceCommunicationResponse other = (UpdateInstanceCommunicationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.instanceCommunication, other.instanceCommunication); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + instanceCommunication); + } + + @Override + public String toString() { + return Utils.toString(UpdateInstanceCommunicationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "instanceCommunication", instanceCommunication); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private Integer statusCode; + + private HttpResponse rawResponse; + + private Optional instanceCommunication = Optional.empty(); + + private Builder() { + // force use of static builder() method + } + + + /** + * HTTP response content type for this operation + */ + public Builder contentType(String contentType) { + Utils.checkNotNull(contentType, "contentType"); + this.contentType = contentType; + return this; + } + + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + Utils.checkNotNull(statusCode, "statusCode"); + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(HttpResponse rawResponse) { + Utils.checkNotNull(rawResponse, "rawResponse"); + this.rawResponse = rawResponse; + return this; + } + + + /** + * Success + */ + public Builder instanceCommunication(InstanceCommunication instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = Optional.ofNullable(instanceCommunication); + return this; + } + + /** + * Success + */ + public Builder instanceCommunication(Optional instanceCommunication) { + Utils.checkNotNull(instanceCommunication, "instanceCommunication"); + this.instanceCommunication = instanceCommunication; + return this; + } + + public UpdateInstanceCommunicationResponse build() { + + return new UpdateInstanceCommunicationResponse( + contentType, statusCode, rawResponse, + instanceCommunication); + } + + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java b/src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java index 4a0164ae..1d4a4d67 100644 --- a/src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java +++ b/src/main/java/com/clerk/backend_api/operations/CreateEnterpriseConnection.java @@ -203,7 +203,7 @@ public CreateEnterpriseConnectionResponse handleResponse(HttpResponse res throw SDKError.from("Unexpected content-type received: " + contentType, response); } } - if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404", "422")) { + if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404", "409", "422")) { if (Utils.contentTypeMatches(contentType, "application/json")) { throw ClerkErrors.from(response); } else { diff --git a/src/main/java/com/clerk/backend_api/operations/GetInstanceCommunication.java b/src/main/java/com/clerk/backend_api/operations/GetInstanceCommunication.java new file mode 100644 index 00000000..73ff298c --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/GetInstanceCommunication.java @@ -0,0 +1,202 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestlessOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.InstanceCommunication; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.GetInstanceCommunicationResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class GetInstanceCommunication { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("5XX"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/instance/communication"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public GetInstanceCommunicationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetInstanceCommunicationResponse.Builder resBuilder = + GetInstanceCommunicationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetInstanceCommunicationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInstanceCommunication(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/GetInstanceOrganizationSettings.java b/src/main/java/com/clerk/backend_api/operations/GetInstanceOrganizationSettings.java new file mode 100644 index 00000000..1732b684 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/GetInstanceOrganizationSettings.java @@ -0,0 +1,210 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestlessOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.OrganizationSettings; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.GetInstanceOrganizationSettingsResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class GetInstanceOrganizationSettings { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("5XX"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceOrganizationSettings", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceOrganizationSettings", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "GetInstanceOrganizationSettings", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest() throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/instance/organization_settings"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestlessOperation { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest() throws Exception { + HttpRequest req = buildRequest(); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest() { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public GetInstanceOrganizationSettingsResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + GetInstanceOrganizationSettingsResponse.Builder resBuilder = + GetInstanceOrganizationSettingsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + GetInstanceOrganizationSettingsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withOrganizationSettings(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "402", "404", "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/UpdateInstanceCommunication.java b/src/main/java/com/clerk/backend_api/operations/UpdateInstanceCommunication.java new file mode 100644 index 00000000..4f46ef22 --- /dev/null +++ b/src/main/java/com/clerk/backend_api/operations/UpdateInstanceCommunication.java @@ -0,0 +1,224 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package com.clerk.backend_api.operations; + +import static com.clerk.backend_api.operations.Operations.RequestOperation; +import static com.clerk.backend_api.utils.Retries.NonRetryableException; +import static com.clerk.backend_api.utils.Exceptions.unchecked; + +import com.clerk.backend_api.SDKConfiguration; +import com.clerk.backend_api.SecuritySource; +import com.clerk.backend_api.models.components.InstanceCommunication; +import com.clerk.backend_api.models.errors.ClerkErrors; +import com.clerk.backend_api.models.errors.SDKError; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationRequestBody; +import com.clerk.backend_api.models.operations.UpdateInstanceCommunicationResponse; +import com.clerk.backend_api.utils.BackoffStrategy; +import com.clerk.backend_api.utils.HTTPClient; +import com.clerk.backend_api.utils.HTTPRequest; +import com.clerk.backend_api.utils.Headers; +import com.clerk.backend_api.utils.Hook.AfterErrorContextImpl; +import com.clerk.backend_api.utils.Hook.AfterSuccessContextImpl; +import com.clerk.backend_api.utils.Hook.BeforeRequestContextImpl; +import com.clerk.backend_api.utils.Options; +import com.clerk.backend_api.utils.Retries; +import com.clerk.backend_api.utils.RetryConfig; +import com.clerk.backend_api.utils.SerializedBody; +import com.clerk.backend_api.utils.Utils.JsonShape; +import com.clerk.backend_api.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.Object; +import java.lang.String; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.TimeUnit; + + +public class UpdateInstanceCommunication { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + options + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("5XX"); + this.retryConfig = options + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(500, TimeUnit.MILLISECONDS) + .maxInterval(60000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "UpdateInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "UpdateInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "UpdateInstanceCommunication", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/instance/communication"); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "", + "json", + false); + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation, UpdateInstanceCommunicationResponse> { + public Sync( + SDKConfiguration sdkConfiguration, Optional options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(Optional request) throws Exception { + HttpRequest req = buildRequest(request, new TypeReference>() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(Optional request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "4XX", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public UpdateInstanceCommunicationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + UpdateInstanceCommunicationResponse.Builder resBuilder = + UpdateInstanceCommunicationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + UpdateInstanceCommunicationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInstanceCommunication(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ClerkErrors.from(response); + } else { + throw SDKError.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw SDKError.from("API error occurred", response); + } + throw SDKError.from("Unexpected status code received: " + response.statusCode(), response); + } + } +} diff --git a/src/main/java/com/clerk/backend_api/operations/UpdateSAMLConnection.java b/src/main/java/com/clerk/backend_api/operations/UpdateSAMLConnection.java index 6995f8d8..136c4d63 100644 --- a/src/main/java/com/clerk/backend_api/operations/UpdateSAMLConnection.java +++ b/src/main/java/com/clerk/backend_api/operations/UpdateSAMLConnection.java @@ -209,7 +209,7 @@ public UpdateSAMLConnectionResponse handleResponse(HttpResponse res throw SDKError.from("Unexpected content-type received: " + contentType, response); } } - if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404", "422")) { + if (Utils.statusCodeMatches(response.statusCode(), "402", "403", "404", "409", "422")) { if (Utils.contentTypeMatches(contentType, "application/json")) { throw ClerkErrors.from(response); } else {