diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index 8e2c09e..3dee999 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,24 +1,24 @@ lockVersion: 2.0.0 id: 0c8d1667-2710-4860-aee3-7d221dbc0a60 management: - docChecksum: 7091a1b5028975d9e1b1854fa2705091 + docChecksum: 5e7317da13f3a525c8f51d109f07fbd6 docVersion: 1.0.0 - speakeasyVersion: 1.682.0 - generationVersion: 2.791.1 - releaseVersion: 0.2.3 - configChecksum: 1187f3055b7e75da4cf8e1bc3b7b0423 + speakeasyVersion: 1.716.0 + generationVersion: 2.823.1 + releaseVersion: 0.3.0 + configChecksum: 3f3d68213096f3be609c22f877e6fe8c repoURL: https://github.com/kombohq/python-sdk.git installationURL: https://github.com/kombohq/python-sdk.git published: true persistentEdits: - generation_id: b2f8393a-de65-46e5-a044-57a7523272a2 - pristine_commit_hash: c983a0595910ddf5ba359182726ef29fd6b68130 - pristine_tree_hash: 1c996a1a6ba57641ec015999e42ce73555e94dcf + generation_id: bee6198c-7808-462a-b6a7-b04f80a1aece + pristine_commit_hash: ef2e2d081a8c80716446b02ff7f6c4641181ca53 + pristine_tree_hash: dfa2cfae249ed6b9660a4b5b3f4cf9e8b4b513a7 features: python: additionalDependencies: 1.0.0 - constsAndDefaults: 1.0.5 - core: 5.23.16 + constsAndDefaults: 1.0.6 + core: 6.0.5 defaultEnabledRetries: 0.2.0 deprecations: 3.0.2 enumUnions: 0.1.0 @@ -26,7 +26,7 @@ features: errors: 3.3.5 flatRequests: 1.0.1 flattening: 3.1.1 - globalSecurity: 3.0.4 + globalSecurity: 3.0.5 globalSecurityCallbacks: 1.0.0 globalSecurityFlattening: 1.0.0 globalServerURLs: 3.2.0 @@ -36,14 +36,14 @@ features: ignores: 3.0.1 methodArguments: 1.0.2 nameOverrides: 3.0.1 - nullables: 1.0.1 - openEnums: 1.0.2 + nullables: 1.0.2 + openEnums: 1.0.3 pagination: 3.0.7 - responseFormat: 1.0.1 + responseFormat: 1.1.0 retries: 3.0.3 - sdkHooks: 1.2.0 + sdkHooks: 1.2.1 serverIDs: 3.0.0 - unions: 3.1.1 + unions: 3.1.3 webhooks: 2.0.0 trackedFiles: .gitattributes: @@ -96,8 +96,8 @@ trackedFiles: pristine_git_object: 836f1251eb6431e70ffda0f91dc8f9395fca8f29 docs/models/assessmentorderreceivedwebhookpayloadjob.md: id: 6760706f4880 - last_write_checksum: sha1:05a2fed023b374ea99bd198dafb448132d002b85 - pristine_git_object: 20a1e33926fb8efa91dd6979e7767fbbbbe10281 + last_write_checksum: sha1:e20447e1131756ca934d220a552a38f44d9d3b18 + pristine_git_object: e3cce9ea2d207ede710525d5180079c0e2de95ed docs/models/assessmentorderreceivedwebhookpayloadlocation.md: id: d9a52bff1165 last_write_checksum: sha1:cfec0d42b8bed07d433cdb856bdb262439a45a21 @@ -408,8 +408,8 @@ trackedFiles: pristine_git_object: 8864c3549e9dda68bf1a10cabf0c2881c88b9b1f docs/models/getassessmentordersopenpositiveresponsejob.md: id: 899ca16a7cd0 - last_write_checksum: sha1:1335adf50eb21964ed6840eb2f5fb36b8559bb5f - pristine_git_object: fb986ab9e069a6f9218eee12546e96ad160240b1 + last_write_checksum: sha1:8e0640fadcd7e3bcbf756866e773771023d96741 + pristine_git_object: db9f8ca18d4c168a376e4fd323623905a7a0c517 docs/models/getassessmentordersopenpositiveresponselocation.md: id: 5414d58a4d6f last_write_checksum: sha1:ab4738c89502e1f47b8571539972b0bd7b9cfd68 @@ -748,8 +748,8 @@ trackedFiles: pristine_git_object: 16f7dda917fb4d13803c85c36465992954c99110 docs/models/getatsinterviewspositiveresponse.md: id: adb40adb3667 - last_write_checksum: sha1:533b2ab04b577b0adc543f8ae97f6fff9cf028c4 - pristine_git_object: 9b7ddc08af711d1985b9888b63951e96f108482d + last_write_checksum: sha1:be3516bafe076ebf61868115ef314a402a50752d + pristine_git_object: 62d0a1afd18802918f223eba3228a0acc36af6e5 docs/models/getatsinterviewspositiveresponseapplication.md: id: eca2febe40d6 last_write_checksum: sha1:bbc615cff84bc5299dee6bb556fd383c55aa22f2 @@ -780,8 +780,8 @@ trackedFiles: pristine_git_object: 4d990de8be4eb0f90b7cebd8576ae81ecd03b503 docs/models/getatsinterviewspositiveresponseresult.md: id: 8206a3473b8a - last_write_checksum: sha1:e68353ee0df2bcb7b2736500032e13a06694c806 - pristine_git_object: 105526eba0bfc50a937106ca5e379b9403877362 + last_write_checksum: sha1:b83f26e92a2e9d7c129451c35a45c40827ace795 + pristine_git_object: fd6cd14e7d4ef522d46a29c2851fe8f7404454d2 docs/models/getatsinterviewsrequest.md: id: 67fe26327e8d last_write_checksum: sha1:382957521fdfc5f391ea4d06e36c162d050c2d4d @@ -1376,8 +1376,8 @@ trackedFiles: pristine_git_object: 88b18505843e69f8ba2234d7e9d5151aa0660987 docs/models/gethrisperformancereviewspositiveresponseresult.md: id: 90abd899faae - last_write_checksum: sha1:0d7e1dc44b23a57e8b97ae454473ac6fbdf59224 - pristine_git_object: 68c495da79494159cac3c26a23762b046729140a + last_write_checksum: sha1:6987d7309a8414a0c1bafcb83fc26a769498c26a + pristine_git_object: a914ac65d6f8f6b6fc06d3ca34b346ce5b7c190c docs/models/gethrisperformancereviewspositiveresponsetype.md: id: 30c2c844ef80 last_write_checksum: sha1:33ce953a7190e3f5631d46965d7418c449a5ab5b @@ -1668,8 +1668,8 @@ trackedFiles: pristine_git_object: 34fbbfc534e4ed3db7bd9cc0b7d535427f645583 docs/models/inlineassessmentorderreceivedwebhookpayloadjob.md: id: f5d1ecd70f2b - last_write_checksum: sha1:1062b387ea574cced2e0db514a392f50c4d0dc8f - pristine_git_object: fa5527db7a669720f9633762cd71702bc5a29ec3 + last_write_checksum: sha1:f438b71fa740493d51d8253dfd3201e91d32bbf5 + pristine_git_object: 509c8dd7943a7aed3976e1d9f486a3cc69c39685 docs/models/inlineassessmentorderreceivedwebhookpayloadlocation.md: id: 589791c2d4ca last_write_checksum: sha1:e2d923d1d6ed1e56e3190c923d971ed31e078404 @@ -1728,8 +1728,8 @@ trackedFiles: pristine_git_object: 2fc49a2a716aa5ee60ed1e924f5546066b9caa54 docs/models/integrationstatechangedwebhookpayloaddata.md: id: 7aa3254575e1 - last_write_checksum: sha1:89697b3276f01c1351cca77d67d1fdcfbb114ce7 - pristine_git_object: dbfe41997da3a2ddc4d17439921fa895968683cf + last_write_checksum: sha1:173baec7e9234f4839d3b83bead948ce827a9f69 + pristine_git_object: ae458e3530b124a14edc72af80eb0c7405ebe980 docs/models/integrationstatechangedwebhookpayloadenduser.md: id: 092ce7f6ad2e last_write_checksum: sha1:330db8639234d946fb7a6837fdba19ff1ff76487 @@ -1738,14 +1738,18 @@ trackedFiles: id: a539d5cc7ee3 last_write_checksum: sha1:d848e6f24bedcf68ba3dae961695904b11313291 pristine_git_object: 43883b6d6a268f1288d2c7b63abc2bed40bd3de4 + docs/models/integrationstatechangedwebhookpayloadsetupstatus.md: + id: 584dd0f76323 + last_write_checksum: sha1:bc49b966a1c6605368f13606031c37e67e31cf49 + pristine_git_object: c2afdf30912af84034cef17b3446bbb6723d4eaf docs/models/integrationstatechangedwebhookpayloadtype.md: id: 13992705fce5 last_write_checksum: sha1:beb3dcea1579c5e090d9a78148f817e3d058feb5 pristine_git_object: 1b44fd372a1b5113087190b3328e0e11317349f3 docs/models/integrationtool.md: id: 59f82e2d180c - last_write_checksum: sha1:8c7ffc5b00e77654925028cce4c12adf6a32d96d - pristine_git_object: 542a4faedad5bebffa1af771912199fef3423a54 + last_write_checksum: sha1:6d45064d699e2564e87be4deba44f562a527bbd2 + pristine_git_object: 732b1f92c8f09f25944a096887656e22b6fd6cac docs/models/internal/globals.md: id: 9c173b87f41f last_write_checksum: sha1:3969d44e1ad9258f466c40b241681eb82c1ac29a @@ -1768,8 +1772,8 @@ trackedFiles: pristine_git_object: cf12765b651dc1f77fb6359737a16e0f5c86026b docs/models/komboatserrorcode.md: id: 2b4592ce54d4 - last_write_checksum: sha1:8b5562a648a44f7a52eb6275d9c2ca8c11dde20f - pristine_git_object: fc5671163dec77702ec9d29be707c82c0acc32d3 + last_write_checksum: sha1:6f2674725a151a1b38e411a26fd9845f642c0442 + pristine_git_object: 486560be093774ee0539cda05eb916037ecc1574 docs/models/komboatserrorerror.md: id: 46c986bf9419 last_write_checksum: sha1:3714cda2c11445680580212e3a077a93fa70185e @@ -1780,8 +1784,8 @@ trackedFiles: pristine_git_object: 98a936d339d031f87fb72193a87bb2b9ad28445b docs/models/kombogeneralerrorcode.md: id: 685c8a146875 - last_write_checksum: sha1:157b0753607791c60498b6f13d1fc16026810e2c - pristine_git_object: 0d3858e6d9a60ac91b2f4c0cfe3a8e61185f075a + last_write_checksum: sha1:b8929bce98c045c87be33a2b9ef9336a5bd30183 + pristine_git_object: 3e4cb5b65e1e9786e066104cffe35e493c0d9e09 docs/models/kombogeneralerrorerror.md: id: 32ae0641afd5 last_write_checksum: sha1:20ce1842296909e3b9670f815a293cbf97020e99 @@ -1792,8 +1796,8 @@ trackedFiles: pristine_git_object: 3151c2ebe7a5d8770c5446a435a0ffd2376ee3d6 docs/models/kombohriserrorcode.md: id: 9d2d92047e17 - last_write_checksum: sha1:6849a4e4601e7427a0f3071743af0b331170bc22 - pristine_git_object: 8ea26304a229098f7f852a8477afb0ff5856fab2 + last_write_checksum: sha1:bab9d9ec470070c712864316e836ec3afa964b0e + pristine_git_object: bb834f011a97b8927324fff4b38f4e5fb0d11865 docs/models/kombohriserrorerror.md: id: d6f64101e2d2 last_write_checksum: sha1:dfc510521590ac86059158a1c349ff52e8747567 @@ -1832,8 +1836,8 @@ trackedFiles: pristine_git_object: 61484b6897a799eaefce5b61a74f6bc7a1371218 docs/models/name.md: id: 6ee802922293 - last_write_checksum: sha1:70d729d31020d9b6d793f033a668603a59c28ab5 - pristine_git_object: 6658ee2fe18639bdf842e70a6c9df998924d99dc + last_write_checksum: sha1:56c696f1e5e12da08d4739e2925eaf8cdfbd246f + pristine_git_object: 1142aa48cc7b27ced697b97c41b64f3920f17f68 docs/models/offer.md: id: e20e1bb1fed4 last_write_checksum: sha1:bcc00146d8b5e5498314dda3c71ccc3839531f38 @@ -3518,6 +3522,22 @@ trackedFiles: id: 0b4a43df5303 last_write_checksum: sha1:dd9cbc993fa25add8c34ccf46b70e8a714e64f0d pristine_git_object: b7bf0ca6524040ee99a57250c0b419af822f3127 + docs/models/putintegrationsintegrationidenabledpositiveresponse.md: + id: ce83cb6e0544 + last_write_checksum: sha1:15771009c5922c4807a8af5685567663cb5071b1 + pristine_git_object: a1a3c57b838df6de5663681cfe5dc835f53f0320 + docs/models/putintegrationsintegrationidenabledpositiveresponsedata.md: + id: 5722f840006f + last_write_checksum: sha1:72a7f8228f51410ec5307fb0fd16654c208a2b91 + pristine_git_object: ab9d8e8d94b8183d1d16f43cba80326643e65967 + docs/models/putintegrationsintegrationidenabledrequest.md: + id: ba64f53d956a + last_write_checksum: sha1:bd7e3b46214df15f28903d273c2e301f33ad183a + pristine_git_object: 180ae5af18d9342956c6c3e0f620b7990d5e6c8e + docs/models/putintegrationsintegrationidenabledrequestbody.md: + id: 5bc90756a2d4 + last_write_checksum: sha1:a188575b97b907cc5159ecaf1d934bfd85ed1e71 + pristine_git_object: 7306e91bed6b603c8b9d3441ab5f4d9927cf7df7 docs/models/qastatus.md: id: 8de18332544f last_write_checksum: sha1:8b16027b1a3ebfe77207719f251a10e801bbf5cc @@ -3932,36 +3952,36 @@ trackedFiles: pristine_git_object: e713131861cc3c8b07125ccbe8cef48b378b277f docs/sdks/assessment/README.md: id: 54c8061fbed1 - last_write_checksum: sha1:fc724f9d311153ff48aa4da69a9b946c04faeb90 - pristine_git_object: 42278cc853bff0ffe31e50b1c4b0aa0b4f9a7049 + last_write_checksum: sha1:942693ff8ccc407b124df6166cd71da807d4b37e + pristine_git_object: 668241a57ce1310dd84240c6883eccaf11cdb8b0 docs/sdks/ats/README.md: id: 24fafa267f6c - last_write_checksum: sha1:c663ec5942f3eee65e20485394868968bc275a95 - pristine_git_object: 9e4ec5f11d6dec07d58c864d36a90f9c7216e749 + last_write_checksum: sha1:f0f38036d00ee4bb2803d17f49552b8798f11148 + pristine_git_object: 61576e7d6bc7d019fc50dc2dcce84b172eed7d7a docs/sdks/connect/README.md: id: 074a4658c86b - last_write_checksum: sha1:4dd577e4ffe52310000017c37bdc1b4db36994e2 - pristine_git_object: 813f107e12643bbfadeffac84a7deee6b43b656a + last_write_checksum: sha1:bd6fbc64f979f12a97cfffa056093f5b27fada0c + pristine_git_object: cb268794ca5a2389305a908323d1585a0c88d9c4 docs/sdks/general/README.md: id: ce0ada6fa2e1 - last_write_checksum: sha1:74240fcc1b43601ebac5250a8ba46810b51ef370 - pristine_git_object: 78867b237c7a48cab9467e7174d67084a26e6ac1 + last_write_checksum: sha1:3cdd867db1d8d9373f098ae8045d9f15b7f8d7e0 + pristine_git_object: 6bd8c9268c773bf58e6fa8fe7b918de110e058c2 docs/sdks/hris/README.md: id: 0baa868a038c - last_write_checksum: sha1:de79c98ebe9c20021681466af6b91b5f873c9d63 - pristine_git_object: 29ae7f00a3f836b558e140c910ed61bf6555ed62 + last_write_checksum: sha1:c16c5df676d2c0189ba8c89bca6d34c8d63f1e45 + pristine_git_object: cdedc6a5ceb90a78cd4ac665edbc0e2773fdbd04 py.typed: id: 258c3ed47ae4 last_write_checksum: sha1:8efc425ffe830805ffcc0f3055871bdcdc542c60 pristine_git_object: 3e38f1a929f7d6b1d6de74604aa87e3d8f010544 pylintrc: id: 7ce8b9f946e6 - last_write_checksum: sha1:f24e0b43d3e3461208ccec7ecb543f79662d01c4 - pristine_git_object: 000d9930f874a1b01cda74f245fc00e1b6eae49e + last_write_checksum: sha1:e5a329bfb307f0d3345bd9b607e7d15cd5fbead1 + pristine_git_object: 24e7c7e3823711ee8105b0c215275acc7bab7f0a pyproject.toml: id: 5d07e7d72637 - last_write_checksum: sha1:f2e75a89f17075b7aa8136148b2a5cd3a7884608 - pristine_git_object: c158ed59cb25f38fa6a4636f8e10e5c6affb0ad3 + last_write_checksum: sha1:093e6a8b902f39ac106a9569c55ea1a46fb35245 + pristine_git_object: 685880ef87a8e851d4279465d98d2a9f0645dfac scripts/prepare_readme.py: id: e0c5957a6035 last_write_checksum: sha1:b6ad6f0515a952d7cb052befddb6a117d4f627d8 @@ -3988,20 +4008,20 @@ trackedFiles: pristine_git_object: e589e541e5fc70d336de44780721f301d754ed72 src/kombo/_version.py: id: 45cf440ad1df - last_write_checksum: sha1:60aa12bf89a08213d494010752059417618279d8 - pristine_git_object: ed8c398266d1a35fc4ed3d6e1a24aa4f081f278e + last_write_checksum: sha1:2f47cf01acebf66c3cc4572981be0cfc7227de0f + pristine_git_object: 8857f12384877e724dc7b7f9314667c38f9f98ed src/kombo/assessment.py: id: aec6e8a7589f last_write_checksum: sha1:1406e437a55541ba21ab8a76696b092238678670 pristine_git_object: cefc8da0d5425357182f67a16b6d2a3a1e1e32cf src/kombo/ats.py: id: a9839762f5c3 - last_write_checksum: sha1:51e767b49f23e552119b7037f769b3324162c1af - pristine_git_object: b6e9b4d6727526cfb47d204f5de49542c19f32a0 + last_write_checksum: sha1:f71f75ca21e2fffcd8626b8d437d48c3fe522695 + pristine_git_object: a03357a9ae2ae2b0e66a88d1a513e282b62f2847 src/kombo/basesdk.py: id: 8f30a0bd36ff - last_write_checksum: sha1:0161e74290bb9dcc311a8481865ab2b2e5908244 - pristine_git_object: 07d26f4c15b4916e1e11359c1166db926e7b098f + last_write_checksum: sha1:01906c49f2f8c40e2139e3c96250493c08a76dd2 + pristine_git_object: 1b1fc99cd41bd967c331579210b68a59c3d4d2f9 src/kombo/connect.py: id: 057799091fa5 last_write_checksum: sha1:4eef80e104823cfaf4160fc76f529b4cc6a33c12 @@ -4040,8 +4060,8 @@ trackedFiles: pristine_git_object: 16ac2977e80b6eabe4020aa8a21dd28e83032f9a src/kombo/general.py: id: 107ecb9f3651 - last_write_checksum: sha1:0e82e3dca43cf6cc935212d4b66d9427a1b53e96 - pristine_git_object: ceb57a92ccda9b136ba726dc29c41307c413f12b + last_write_checksum: sha1:7222627ef0c206a81016e16054119abfc08700bf + pristine_git_object: 693bafdfb99ca4ae42cbbab202b86c53d07922d6 src/kombo/hris.py: id: 9ba1b37ab10a last_write_checksum: sha1:02e56fc1424f2c437b285c6eff92c05a5f58d100 @@ -4052,300 +4072,300 @@ trackedFiles: pristine_git_object: 89560b566073785535643e694c112bedbd3db13d src/kombo/models/__init__.py: id: 45e6e8c7f07f - last_write_checksum: sha1:53c7b59bd9070ea47044dc976fa762eeb5a29958 - pristine_git_object: eff439e77d42db2380a0ce41dbad70bb0a4b2a26 + last_write_checksum: sha1:a58db12697ff3cea7225893ad9ff9525323539eb + pristine_git_object: 60d2be6e2f8e513d78ddc867b483e534147beeb1 src/kombo/models/assessmentorderreceivedwebhookpayload.py: id: 532c2db2ee93 - last_write_checksum: sha1:3db270cb35ada7386c7942f2673ac350115527bc - pristine_git_object: 3efcd314eb89e92d45947384cdd8cf588e860d3c + last_write_checksum: sha1:d33dfff9c40d2ac57c9d7afb30f9f580d47be9c2 + pristine_git_object: 2b4694939ac0719af5c7713820f7010e1b26cb3c src/kombo/models/connectionflowfailedwebhookpayload.py: id: bc2f80279ec9 - last_write_checksum: sha1:70b2b4549b6a317d59a36897a7e606a31237b295 - pristine_git_object: 261679d26b672de4038c829b5859a668d98455c3 + last_write_checksum: sha1:420e81c12a03972746f37a59018ce50550664e49 + pristine_git_object: 8300d3ea804167ce5a61f499aca116e327ca1235 src/kombo/models/datachangedwebhookpayload.py: id: a4be1cf7f915 - last_write_checksum: sha1:8bdb7113db9afeb3f521b2878e02b880e44f1297 - pristine_git_object: 820594ad421af17154c0261695be077ba4016992 + last_write_checksum: sha1:6a89eda5cb9a53415145f1ee10ce0cf724110d03 + pristine_git_object: a49141234eebb52e46ae4a2828c28e114d28d46f src/kombo/models/deleteatscandidatescandidateidtagsop.py: id: e636f19f3437 - last_write_checksum: sha1:76ee3bb576ef27d2afa30c04d7b111ddf9d0666c - pristine_git_object: f98b7037bf3b4e7a68e4bec18d40af84e0a26f5f + last_write_checksum: sha1:ac739e46e5cb3739467df9dd8a9b79573febf15f + pristine_git_object: 26736fc931ae725630978be512ca20c88d22c657 src/kombo/models/deleteatscandidatescandidateidtagspositiveresponse.py: id: 081f465ef05a - last_write_checksum: sha1:85ccdb7ba2a0c6b23bcb2bfb80ed6bd4eb6ff5a7 - pristine_git_object: 575e1124e2c0602f29917cfb97c20def6b7a67c4 + last_write_checksum: sha1:1893284778fc22b282eb7f4e5a454fa73b849d16 + pristine_git_object: 4a57904b55aa3065d618a921df7b7b9f220e4c41 src/kombo/models/deleteatscandidatescandidateidtagsrequestbody.py: id: be84ae9dd77b - last_write_checksum: sha1:41efa8f4fa8f77bf15ab53dbfb51e5ebcf6492cd - pristine_git_object: c7fadb83e2fb3428bc8c4114e3da5db4799511cd + last_write_checksum: sha1:07da626f6ce9819b65ac1fa4c26ee7a87bcacbe5 + pristine_git_object: 84694eeeb030cd88af964617881be2a8853016ad src/kombo/models/deletehrisabsencesabsenceidop.py: id: 0c1cb6b7339e - last_write_checksum: sha1:eaf193f0a4359705cd28bd3b5d428596172f6ae1 - pristine_git_object: cb783a8826e13fac00f4a5cdc7b9e6c9c9cc44fa + last_write_checksum: sha1:62057afbb651d047221be5e97693b697761a66cc + pristine_git_object: 35000bbc842f7a4bb55a077a1ab9a8af90eb4683 src/kombo/models/deletehrisabsencesabsenceidpositiveresponse.py: id: f92003c6f1a5 - last_write_checksum: sha1:32efed1419f7ec2fd027b9b1197a53eeda711f86 - pristine_git_object: 501d527f4b4d2ad857dae1dcff417493200e330d + last_write_checksum: sha1:3bd55e7c9e3c29b9ba67d29e9c5c126a6afea285 + pristine_git_object: ceffa70afcb8b73539283b188e11a99bc81f235f src/kombo/models/deletehrisabsencesabsenceidrequestbody.py: id: 416d7ecacd29 - last_write_checksum: sha1:574aa613bb6ed374beec7b0966c304151e8e2ba3 - pristine_git_object: 341b68cf8e35b39c9ed276b03cb724465ec0a14d + last_write_checksum: sha1:9b9a50949a5c48bc752a5c2a9fdf386c813ae068 + pristine_git_object: 0064e0688f3a7f3192330c2e7c4bd289f64a168c src/kombo/models/deleteintegrationsintegrationidop.py: id: a9b3a868f56f last_write_checksum: sha1:1d340452c33601634342c0185a63beb9f31d8be8 pristine_git_object: 90a604c24db4d29a2085d624c00533f5bda19043 src/kombo/models/deleteintegrationsintegrationidpositiveresponse.py: id: c8b8443d5d66 - last_write_checksum: sha1:d464b14f8130b2af9990bdad57420319204ac608 - pristine_git_object: cc4c1cb30bbf11fe4206fa8176532a107bc7d44e + last_write_checksum: sha1:a76e25f709b8c971a049086d731b5e23c901083b + pristine_git_object: dd38d67ba306a56432fe8060b2a818adfd792847 src/kombo/models/deleteintegrationsintegrationidrequestbody.py: id: 8455bcb2ad15 last_write_checksum: sha1:bb9a5a64645a7df55f53bd2bfb8bc9264e8b249d pristine_git_object: e1b2190eaddba44878760d005c5aa2f99f39de1b src/kombo/models/getassessmentordersopenop.py: id: 762323de2351 - last_write_checksum: sha1:ebc7a1418158030c9569f6e68318331bf4359046 - pristine_git_object: 646ee809c46ae91bc0f1ff0d6033780cb46857e1 + last_write_checksum: sha1:bb6b5b2222c73ecae33ffdf9602b14599e608a61 + pristine_git_object: c11f495745be38ea367d54a4b848fac962c58dd1 src/kombo/models/getassessmentordersopenpositiveresponse.py: id: db5505c19e5f - last_write_checksum: sha1:1f29e8db0759a07eaf303d675effad0d84999f94 - pristine_git_object: e9497be0e7afedf9f83a02cf1d432eb90fbc5eee + last_write_checksum: sha1:335dfa8672299fb1b849a682f847bc9ee62780bd + pristine_git_object: 6f36238ed45ded54dcc59187b9240bf4e7a7d813 src/kombo/models/getassessmentpackagesop.py: id: 457cf143d459 - last_write_checksum: sha1:629e01c2efdafc26d365f182a3dc39356feac2c9 - pristine_git_object: 27eb8dbcbd8d019f6d35f9cf9f4b2ab6209034ed + last_write_checksum: sha1:a2e7fc83d1877be91ba5a0f7973177647c5c479e + pristine_git_object: b27557cf41780e6afcbd16ae7a38ff055160bc68 src/kombo/models/getassessmentpackagespositiveresponse.py: id: b5f893857139 - last_write_checksum: sha1:c45071997cfcd768a8e22ed39995d5c3f196d415 - pristine_git_object: 6d4dc22bf42b529b94178757c368e112bf875a95 + last_write_checksum: sha1:d89c7656e4400f42e073db203355e57d560b99f1 + pristine_git_object: abffea9ecb80b6f6fbc85608c1081595bf4775a7 src/kombo/models/getatsapplicationsapplicationidattachmentsop.py: id: 5e26f3fd68e2 - last_write_checksum: sha1:5d6e4f4d9fddf24e3053b9ac2eab26f3c6f1d52a - pristine_git_object: 1c4a8682d48ed7ebca91b8c1022c0854826587f2 + last_write_checksum: sha1:1b28b041f6a24254edc2e19eb75e869382357b39 + pristine_git_object: dc378887a804748f9a4d008e678f0b64aea20001 src/kombo/models/getatsapplicationsapplicationidattachmentspositiveresponse.py: id: b5513715d598 - last_write_checksum: sha1:295dbfc99d59524c9fc848719a0f3232c0793e30 - pristine_git_object: dd129f907d2c81fded0682133cb1984c9ab50242 + last_write_checksum: sha1:291422a18872e7de22c06116d4c83cd8544965a0 + pristine_git_object: ab120c9aadb45dbf6dc9f31a90f2c9a47ec91069 src/kombo/models/getatsapplicationsop.py: id: 871cae4f97d6 - last_write_checksum: sha1:a25f7a1cccfee4df8fb26fcf6e473096633c71dd - pristine_git_object: 416e1384eae71b7df5a4e4224994d2440980bf98 + last_write_checksum: sha1:13bce5f29494029fa0ac7773ea72fff37ae90c92 + pristine_git_object: d4433dd91bae5ebcc290a49cb4d3e7781f662902 src/kombo/models/getatsapplicationspositiveresponse.py: id: a63a51b4fa00 - last_write_checksum: sha1:f4ccdca356da50eb01defb0e02d68ad6fd1c05c4 - pristine_git_object: 786f6ad9a8523445787800945cf126b277b86a02 + last_write_checksum: sha1:dac3e1cffcda4a0f09338ed725237d9189271800 + pristine_git_object: 7664893afa2ffb6b76259f7660334eb83ce1762e src/kombo/models/getatsapplicationstagesop.py: id: 9af8d74e7860 - last_write_checksum: sha1:5fecdc20d6c69731a7aae907de5878f32bb71299 - pristine_git_object: 352227668007cd7e15f7a9e56231fd640beb4727 + last_write_checksum: sha1:ea23af28dffbd8eb9b67579c9c878067cbd5adf1 + pristine_git_object: 4999e1d165536d67229cbd3b0e8337b99e43fdac src/kombo/models/getatsapplicationstagespositiveresponse.py: id: 1526a6f6fffe - last_write_checksum: sha1:37cabbdd5a91015e42d15fa22d3ef51a01f7059f - pristine_git_object: de1e5b5a22dbc8a9e782e9a4639fce38d6126782 + last_write_checksum: sha1:ad6c565c4cc19ed806655747c7529a90c7dfafb5 + pristine_git_object: 132e31437ecf423812d02a90321da3b6f7b363e8 src/kombo/models/getatscandidatescandidateidattachmentsop.py: id: 0cd2685524a8 - last_write_checksum: sha1:d2ee21a150af407a79f333a9971d84046e202cdd - pristine_git_object: debb68cd6fc42ebc900a28a3f539c56ed07dbfb8 + last_write_checksum: sha1:6ed1eb6ba7a4a662042b143d2c074adfb588478a + pristine_git_object: 78aaf3974dd57e11336d1d34c79e8c5e3c6a775c src/kombo/models/getatscandidatescandidateidattachmentspositiveresponse.py: id: 95278f59f51c - last_write_checksum: sha1:2de827274fc55fb57ce6999b938a34434a1a7d15 - pristine_git_object: feeb575441a1d629842769f2f72353d8900f3fc6 + last_write_checksum: sha1:2540aff37b14e872c43181ff02c9f2ea865899ed + pristine_git_object: 948ff44cd4be21d54bd226141a4a40e36e8f229e src/kombo/models/getatscandidatesop.py: id: fe3b46f57904 - last_write_checksum: sha1:b6a8e62521e5bc350f1d605e837e26171d21e65f - pristine_git_object: a1ea1729c929399534e6f6f32494c7dff65a39c5 + last_write_checksum: sha1:47287848fc146ca3a5bc52a277e9393136454e55 + pristine_git_object: a3a6290e583a532f09aec11752f1c2a674586db1 src/kombo/models/getatscandidatespositiveresponse.py: id: 55c347e74a19 - last_write_checksum: sha1:4a7c4bb4a33822c35d528f99d3156670de106cb8 - pristine_git_object: b46795ab6a5022ca330b4ae5b45a0c2abdfa4e96 + last_write_checksum: sha1:83b0741767d53302f6369ce725c709704dbb3870 + pristine_git_object: 50b44b4dedc8fce58147ac9875879b4a0e803446 src/kombo/models/getatsinterviewsop.py: id: f2e589cff331 - last_write_checksum: sha1:13cfd3a64d803919f7ede8cd97cc9e452264c0c4 - pristine_git_object: e31ffb567a1140134759cb54e6c87bd891d3f130 + last_write_checksum: sha1:1ad7544861923d2e87066492d1ada8e844466d10 + pristine_git_object: 3229d37a426ce5ff5c6bff9ed04c74c851d38303 src/kombo/models/getatsinterviewspositiveresponse.py: id: 05922b6fb21b - last_write_checksum: sha1:35ca3d913a99f59762fc3662878f0a1eb65103af - pristine_git_object: e104d6249b4b5c09518003aed79fd4515aa2ca6e + last_write_checksum: sha1:2d110e4a52a2d0a31771df14e3c2efa154451650 + pristine_git_object: fb8b1b6f3e35cdb92809ab3e627e4795435f06b3 src/kombo/models/getatsjobsop.py: id: 2c486ae8aa94 - last_write_checksum: sha1:fd6de6c0cbd30d6d5b7277a3f906c48b5619db48 - pristine_git_object: a33071601439c293245541b15e409491a393e6fb + last_write_checksum: sha1:21beb89555c906af8cd32d090c4f1d95f94269e0 + pristine_git_object: 4fe1bb9c97d874f7dfed1ef0b6c78807f3c37996 src/kombo/models/getatsjobspositiveresponse.py: id: 99a8e27010c9 - last_write_checksum: sha1:d97718a915f40b153dccb7821f1ca9660b91f349 - pristine_git_object: 7e202d8f5794a279a80202733273e1f8f8c65470 + last_write_checksum: sha1:f7f6bed1c33508e8fe75e3685a0789061fb69f39 + pristine_git_object: 40e343755a224cca864dae1757b7a8151fb3f158 src/kombo/models/getatsoffersop.py: id: e7ea828aed53 - last_write_checksum: sha1:18162a88a613409cdfb75db2fb1c2bdabd30745e - pristine_git_object: e12ef14edf0d59905a06d04c3c452cebf92459c3 + last_write_checksum: sha1:7de6285b5c010c149cfadd1ec1c52769ee7203e9 + pristine_git_object: a3b740779ca1fe5063ee4d96dfb470466136c709 src/kombo/models/getatsofferspositiveresponse.py: id: 1178a0958495 - last_write_checksum: sha1:93eef5619c5be866cac977d2391ec9a02e57c3de - pristine_git_object: 9136457aaa724d6a34b5a9c0b92f387270d08b44 + last_write_checksum: sha1:1f34bd72029c5e971ab47c583f7a3cb365036aca + pristine_git_object: 0a5d85e0cf2deef6f3a4610b4e3332515db6cecb src/kombo/models/getatsrejectionreasonsop.py: id: adfc8d8e1b63 - last_write_checksum: sha1:04cf7580cf2a66394db68aeac28eb3039d454a39 - pristine_git_object: 9b5d80a3ff74e7873e2a74ead9b998794680dc2f + last_write_checksum: sha1:092d24c0589b79fa82b9855b3b6487a98af08129 + pristine_git_object: a8e7066fcb55193279eb9c438622334cb9d8acb6 src/kombo/models/getatsrejectionreasonspositiveresponse.py: id: 09e9b8202dd7 - last_write_checksum: sha1:c006bae95dd532262534290b395e8d935cb9591f - pristine_git_object: 05f3d8b6f50a1770a82fb1e4654aa80d0c1dc4ca + last_write_checksum: sha1:03bcf83275cc9f580ff33e2e7ff8dc08f2511c56 + pristine_git_object: 1294292859e847aa7c65fecc2bd99c013072d4ea src/kombo/models/getatstagsop.py: id: 106922ec5228 - last_write_checksum: sha1:5ebd3d082c21d105da1fb451f39ade98d6558b10 - pristine_git_object: e430d508bc0677e2bbf357aa81ce1f3e68f21a5b + last_write_checksum: sha1:3171ea7c1ce03be26b2c64940766e14901e088dc + pristine_git_object: 847be46cfe0567d07bc76d0de391355d27689911 src/kombo/models/getatstagspositiveresponse.py: id: caf3f9029964 - last_write_checksum: sha1:7890a7cc92c6816aa5373b5fa77986bfeb22e579 - pristine_git_object: 9b626706c32e846adb001a2b626ec9a3c16fa55b + last_write_checksum: sha1:557e1fb741c37c7fd08efce33a9dd8cca4d2fa03 + pristine_git_object: 6c0dcb162871c1466819cec37f60971eabba88ef src/kombo/models/getatsusersop.py: id: 3dea73611e1e - last_write_checksum: sha1:299ec572496f430bd240b39425653ec293b50b90 - pristine_git_object: 302833a1e6f46a636867479268f943a895367cf9 + last_write_checksum: sha1:104dfdd004b740e1ee99420038e7b0cd27b03f0b + pristine_git_object: 4eee01472c8541d3e0f489fb0dc1155d0f92cac6 src/kombo/models/getatsuserspositiveresponse.py: id: 957d5988d11c - last_write_checksum: sha1:daead5b3b9ce32b8c9bd5a5dbcb0b95713ddd7f7 - pristine_git_object: e2776dc60ea2553d081310042e50f974f3e9c18e + last_write_checksum: sha1:1372e66f5972a0bcf1377fac242e214a690fa99f + pristine_git_object: 5ae08480a82216eb8df991a1947b4a7492d46269 src/kombo/models/getcheckapikeypositiveresponse.py: id: 46cbd25e47ae - last_write_checksum: sha1:c512b42f9d2c16cb5a6eaa98902cd02dd46c8d5d - pristine_git_object: 191e3169ccfecea6b212f4e7229d2779cdb03817 + last_write_checksum: sha1:735e8b0dc716944910db0ef85efba874ee7daeba + pristine_git_object: 979eadc3f5b5f061034e9bb71e912c42296a71ef src/kombo/models/getconnectintegrationbytokentokenop.py: id: 9de78f02c7d9 last_write_checksum: sha1:3496b76ce5e035637b204a35187c6b097eb5fdf8 pristine_git_object: 84e9889fe258f3e69cbad45f9401f1b6758f8e6a src/kombo/models/getconnectintegrationbytokentokenpositiveresponse.py: id: 579e09f0854b - last_write_checksum: sha1:6d3dd8a2785051a8a5dcc82eb7f8deacefd2f9cc - pristine_git_object: 4cee930a63a55681cc728ed448a806efe1a2e1ce + last_write_checksum: sha1:cb57b54333b2deca410cd667951b1f2900307767 + pristine_git_object: 4760ac9744ba79bb0be52f4cbc4db7648d462a7b src/kombo/models/gethrisabsencesop.py: id: 0906c126338e - last_write_checksum: sha1:c50b54c84d0cebf0f6ed6cf19c801dd4ed752bb0 - pristine_git_object: e3a11f00624eef99ffb76d965eacb33f16f971c1 + last_write_checksum: sha1:e50340d8decfa4d9cfc29c1dd2f5227b3c084290 + pristine_git_object: 55b7925cd59fde9e8883c86956e675844e408d2c src/kombo/models/gethrisabsencespositiveresponse.py: id: 7976db3c6ae3 - last_write_checksum: sha1:b0cb5371e3ad8ac50e77f7b152d096231162ee3c - pristine_git_object: e99975378282445d7be9c941785f147a81759b76 + last_write_checksum: sha1:b79171f48b6cb4669625c5f61c79010911e4ec08 + pristine_git_object: a2015364f7471c8041537b71e92417ee1582e2a6 src/kombo/models/gethrisabsencetypesop.py: id: 79cfb4ccaf3e - last_write_checksum: sha1:dbc3579ef453a29a7cbff8b28521ec88b43b2262 - pristine_git_object: 145f6667e3614b46a2fcaf355564ef920ec4c3b6 + last_write_checksum: sha1:06cbbda25209022a7809278773e844c234df6c14 + pristine_git_object: 1ae1f0c751324c026cb44bc229f1f8af5e358b71 src/kombo/models/gethrisabsencetypespositiveresponse.py: id: 7297a0379493 - last_write_checksum: sha1:1a9f1251cf1acafb37f0a51d0b2694c57c1115f7 - pristine_git_object: e4b0c0f4daf9d9021528ab122a425bcd4872c5fc + last_write_checksum: sha1:c7199e08ec570a9d362f68cc941bc55d4492df11 + pristine_git_object: 74c745c7dd28f094bec240a86f34746908359767 src/kombo/models/gethrisemployeedocumentcategoriesop.py: id: "576619816e15" - last_write_checksum: sha1:64dd9dc7b29b568a65076ff895965bbbc303fc97 - pristine_git_object: e161453e9fa7e432d3e31ef97eb7093dfcd7a0b0 + last_write_checksum: sha1:0836872a5d9f73218c28d2eae9196676b250b1dc + pristine_git_object: 935078031fa08b099261943ef6f40cf30ad90b61 src/kombo/models/gethrisemployeedocumentcategoriespositiveresponse.py: id: 7cc03e59b5cc - last_write_checksum: sha1:939fb84febcf3a4f3fad70c0ca35c4358cf21aa5 - pristine_git_object: 9d61ad25650a30637e1ff718a87def60c255345e + last_write_checksum: sha1:a44130113cdf401df7f075c416c788e28fabe66e + pristine_git_object: b4e1e7c9dd030bd558ac2a8d81467b61847a63e1 src/kombo/models/gethrisemployeesformop.py: id: 72906084d85b - last_write_checksum: sha1:f479dca8696ea67e9634656fd5b8a314a4bff132 - pristine_git_object: d857d0f6ae5bdff04c8a93409004ab66b8d7fd5b + last_write_checksum: sha1:fe47d7fd0f040628a237096a57682538d3227c0f + pristine_git_object: 2eac9d0ea1212c3f580a17929f52325e0df68318 src/kombo/models/gethrisemployeesformpositiveresponse.py: id: 7f0cb7fe0d3c - last_write_checksum: sha1:525bdbef37ea33f4faec4a7d3b3b368f10c2bffd - pristine_git_object: 05e2379e1967ce40bc5ad7939ef038c8c16bc045 + last_write_checksum: sha1:8f2c1dc5de6ae2aa57c3739da93704bc93842069 + pristine_git_object: 6d0584f85ff9f1080e19db1f971fed3e6bec661a src/kombo/models/gethrisemployeesop.py: id: 84d84ea0468f - last_write_checksum: sha1:b21390ce92fb38a1bd565391fefeac7e4cb9763f - pristine_git_object: aec7d0ba289ec47dd880fa34a1f500b9e562fd9c + last_write_checksum: sha1:2b8ed8bd5b98ea982928782ff21baaf7d129fd0b + pristine_git_object: 53f14a430c7f838cde6978ad30b719b727b97072 src/kombo/models/gethrisemployeespositiveresponse.py: id: 346e2acc9925 - last_write_checksum: sha1:58c035a0b3e63f50da7839ec9a05691d5ee2d6ad - pristine_git_object: 3f669bd18f8419fe8d1af860118c0321b7ed6148 + last_write_checksum: sha1:3c64e515eb508becd431b46129e7c034e05a5389 + pristine_git_object: 6c35df38f5f4f63d739e10b074ce030c29c14e00 src/kombo/models/gethrisemploymentsop.py: id: e4fe2d1565d8 - last_write_checksum: sha1:08c2004109b0f69727bdf8193edcea8444dfc2f7 - pristine_git_object: a8a305237b48252af009f64a100aeb732c6e8d75 + last_write_checksum: sha1:63ee1dae0c8806622798132c8e0d8ab2b5d93305 + pristine_git_object: 4532c9616d4cf27c591ab08a46b4d9ec5458ed8e src/kombo/models/gethrisemploymentspositiveresponse.py: id: 76dbda44512b - last_write_checksum: sha1:83479d8424711561eac788de84f4599b0f1d166b - pristine_git_object: 972325d917d544177dc708b6890bf0126f8ff66d + last_write_checksum: sha1:358c49496ceca84ab878121d20558006d1eba040 + pristine_git_object: 500a0a65b7e4a2a73bd35a4b712dc3e1efd9ede4 src/kombo/models/gethrisgroupsop.py: id: 65d838c3f3f7 - last_write_checksum: sha1:555d69fbb516f675cbf6ccf53ca48583f4cda896 - pristine_git_object: 294654655564c9a54df6648b29d291437ec8a236 + last_write_checksum: sha1:355b432d7704feadd380e4a2f64320e3a1f96ae5 + pristine_git_object: ad828ab55ae65e18c2fb51ff04df0a6751222d6a src/kombo/models/gethrisgroupspositiveresponse.py: id: a564834ff533 - last_write_checksum: sha1:969085b4dcac9584901a031e5d5422a54a1e3ade - pristine_git_object: 9f6a3cbd9c6c16fb2180a50d454965b939e7364c + last_write_checksum: sha1:38c7e6b8b253045c68052913cdecccd104a68fbe + pristine_git_object: d068c29966c2dd54eaa8bc913a837fdb7ee6378c src/kombo/models/gethrislegalentitiesop.py: id: 1248ce2860f7 - last_write_checksum: sha1:f9e58fa73d1ed03a158ff03d9074c40d650c3712 - pristine_git_object: 6b3ee559608a0ed129a9909ee5496308070bf620 + last_write_checksum: sha1:f263a210c40184227899b1cc9ea7e403bb83d2e4 + pristine_git_object: 7434fbf6947da0e15c1df9b94589ce5c2b6f2d66 src/kombo/models/gethrislegalentitiespositiveresponse.py: id: 1c4fda736245 - last_write_checksum: sha1:c132324c6ec069e306c60ee1bfb1c807c089f622 - pristine_git_object: 146ee15140da2065a8766fac021b2d095530d05b + last_write_checksum: sha1:d425166302ce5e59db51edcd3f1cae78e8b98b29 + pristine_git_object: 3d9897d8aa3baba288c8dfedee33e21a156399f2 src/kombo/models/gethrislocationsop.py: id: f91bef57a525 - last_write_checksum: sha1:a5be00c17e7e1800319bb502bfe3f7ad89c06ad5 - pristine_git_object: 1da746c566ede856c5c4e7c2bfc7d9dbcf99affa + last_write_checksum: sha1:26101d592a6773bc169aa97b1fc55c2e580b0f51 + pristine_git_object: 655ab8c77cbf0f1b36271ec456a7558c94488aaf src/kombo/models/gethrislocationspositiveresponse.py: id: 3556e7b1020c - last_write_checksum: sha1:0dbdc3e16b69fe90f84818cf73298562cb079260 - pristine_git_object: eaa22328a9ae635072489d2d54d1060d1a7d4597 + last_write_checksum: sha1:17cbc35eaef7b94dbca70112c796fb8990dd8e4b + pristine_git_object: 228b0f18e828ce23384ccecd2e32c90b53683cda src/kombo/models/gethrisperformancereviewcyclesop.py: id: 531d13c1919b - last_write_checksum: sha1:ec5241802a9d1987e4ee8f7875e7777d7d5d1104 - pristine_git_object: 3ac2feb3c11791a6e00caeb41eb0429a40153a98 + last_write_checksum: sha1:388867e01c17f50b5164b280afd3478f91c1cf2f + pristine_git_object: 88afcf89235e53517ddc57724d16488f5f460719 src/kombo/models/gethrisperformancereviewcyclespositiveresponse.py: id: f89eef88f951 - last_write_checksum: sha1:b9e7b0cd07201d1b5a96c4f954a105fd3354c91b - pristine_git_object: bab55c695f3c8948521b9f4f2f2c521ffc630507 + last_write_checksum: sha1:2573d168a5c6c96f948a0a7bb0373ffaf02e73df + pristine_git_object: a9abbada5878ea84eff54f2bff33193b8be8cd5d src/kombo/models/gethrisperformancereviewsop.py: id: d94f4f049afb - last_write_checksum: sha1:9fc391d0ab1b645556bebd6b1d31b7f89f4335dc - pristine_git_object: d75324ea2e958f861e591c434d8ee8ba4fa7121e + last_write_checksum: sha1:1699585b0782f597dcf15ced36f29c44db650391 + pristine_git_object: 88d29cd2653ecd90d6c32ac52b9a69941f0cc0a2 src/kombo/models/gethrisperformancereviewspositiveresponse.py: id: 44962807cdec - last_write_checksum: sha1:9e2bea892b084969889b1d20dc9cabdef696bf02 - pristine_git_object: c39833ddb4d778095169fc2000f7e84e8d7f6b97 + last_write_checksum: sha1:8f3c391289c1a693ae99a561d140783b31404bda + pristine_git_object: f2ccbc63f6f3a31c30311bf9671a8ed899dbaac5 src/kombo/models/gethristimeoffbalancesop.py: id: c5a6da4c41fd - last_write_checksum: sha1:c7450c286880b24cb132e8b70f3fdadd439df9c5 - pristine_git_object: e3fd29f5dc09cba3ddd651c0bc9404f0b4f2f9bf + last_write_checksum: sha1:8af6f9e6d8687a9def8201cf37e42e2933fd034f + pristine_git_object: 4688caec8fc9eb0fb7ee347df8c8cb84297d0042 src/kombo/models/gethristimeoffbalancespositiveresponse.py: id: 3d3404082bef - last_write_checksum: sha1:3a8e46da39b6a8d218f9e0eaad8a3c50e2aa5bca - pristine_git_object: c5690aa6945abf23d4d4171c065f99b041cf2da8 + last_write_checksum: sha1:8cc98eae07dbebc916afaf08a6b0965c37c1073a + pristine_git_object: 26f0ba4c25107a8fb02205be6e1f24421f4d0102 src/kombo/models/gethristimesheetsop.py: id: 52b574c1096b - last_write_checksum: sha1:add3f533158d07ac8d15f73a6342e674e373725d - pristine_git_object: 38b6380b150edeb9ece66cdb24642e8002e07d85 + last_write_checksum: sha1:4dd632f7477ccce8b1104380d4b6676382d11711 + pristine_git_object: 3c80ca6b9886d1a11af221c7264c958d46308078 src/kombo/models/gethristimesheetspositiveresponse.py: id: cc9ce3094f9e - last_write_checksum: sha1:d623ae1e3cf7d1863e5e08389a5ade07a1e59d3c - pristine_git_object: 3a14365891a03577dae8e79ddaa047ec8a5c3fdc + last_write_checksum: sha1:6b3d8883c19861a99957baedef3a457279d7f8a2 + pristine_git_object: c890ea6a3b4b0972d29153d6a73900ad92882ddf src/kombo/models/getintegrationsintegrationidcustomfieldsop.py: id: 33942052f982 - last_write_checksum: sha1:87fd74beaeda6a6ec4b8b32e409a913f2e5a0d93 - pristine_git_object: 360e388b5684c59cb1bebfce75b2bd007ddaf3cc + last_write_checksum: sha1:01286f14ec648d2bee6a311e09da56c6f9633f4c + pristine_git_object: cb71bfd007aa27e15deb8ba374e1cf2e8c0e94d2 src/kombo/models/getintegrationsintegrationidcustomfieldspositiveresponse.py: id: 142ff4169074 - last_write_checksum: sha1:73c90bff81547d54efe5913f9cd894f894d9b0a2 - pristine_git_object: a544926dbaea182b1e1b4ba4e51968c6529571e9 + last_write_checksum: sha1:d39c4f820c3044fb70a259d62d68651f59cb3ce3 + pristine_git_object: e1fad717ee2faf27c4511453b93270bf9f642695 src/kombo/models/getintegrationsintegrationidintegrationfieldsop.py: id: e5ca6b183dee - last_write_checksum: sha1:1a974b35efca751f83df7463c2b98d304d16d52c - pristine_git_object: 9ef9dc30c61ebdf4d70f66a9a3587c311019a157 + last_write_checksum: sha1:d51d9f3c46fc66fe8f295377eb531b98339217d0 + pristine_git_object: 02d966040f583c08c9cadfe9778ab6fa6bd918ee src/kombo/models/getintegrationsintegrationidintegrationfieldspositiveresponse.py: id: b8bbc50cf1b4 - last_write_checksum: sha1:c6b852702126d135ad31807aae74898a32b34d58 - pristine_git_object: b9adba94910ba600e939033b9ab93a29445874ba + last_write_checksum: sha1:7c5fc45d14bc30e3e545895d0021eb1d0df7aa92 + pristine_git_object: 31de1056ae671e4d385855d269624bcaab639d77 src/kombo/models/getintegrationsintegrationidop.py: id: dca70077e1cf last_write_checksum: sha1:06775a7924d30c62733200373cae42ea44062640 pristine_git_object: f2f5a4d8e857df7bbef8e871d416bf359b421f6c src/kombo/models/getintegrationsintegrationidpositiveresponse.py: id: d98c984b435b - last_write_checksum: sha1:500210eee34400883b16d9025ac3d5a803016112 - pristine_git_object: 719e23e8dac574059f82f31b8b3192efdb128e30 + last_write_checksum: sha1:1f1ea87a9401a74087fe059c426e8cbf8aa660f1 + pristine_git_object: 7433eef2cceff305c4bd718b8739fb583926a859 src/kombo/models/gettoolscategoryop.py: id: 26e5fd68cadb last_write_checksum: sha1:40f5144d6d44d03ec0d298558d41fd988436c1e7 @@ -4356,228 +4376,228 @@ trackedFiles: pristine_git_object: 0b4dd2d58d983b8c775360d4fc2181c5b1029f95 src/kombo/models/gettoolscategorypositiveresponse.py: id: ce0006faad82 - last_write_checksum: sha1:3f33f80b72b76b18c31cc893b84e130af8e6c856 - pristine_git_object: 7912999964c4ce26fec382c71b1187095f4f05b8 + last_write_checksum: sha1:b89bd298d22986aea6057b78447120ec74e94a64 + pristine_git_object: ee7c16d1442d015be9bab8d724411178f3682491 src/kombo/models/inlineassessmentorderreceivedwebhookpayload.py: id: b5dd4cffd7be - last_write_checksum: sha1:c69e53b4e920ba3d54bc4a7f27e24a77530046d9 - pristine_git_object: 04495e93ebb316dffdd3412938202c52b75ed955 + last_write_checksum: sha1:460fed301a1ff2676a1579ad42f96aa365799b22 + pristine_git_object: dd994ec0b08f0bc2598f1b0f7457faafd0268f40 src/kombo/models/integrationcreatedwebhookpayload.py: id: 091570d52f9a - last_write_checksum: sha1:c111227bf87d6d0f4435262ed3731c1c31f0de1b - pristine_git_object: 577421a6b6e24a7ddcf31ee8700e3318a5f85901 + last_write_checksum: sha1:85ed6d912bb9c97ed3e9bda66c133f796296fd35 + pristine_git_object: cdbc260ddfd360fb571610afcbd0b163af0815ad src/kombo/models/integrationdeletedwebhookpayload.py: id: 226850a6b541 - last_write_checksum: sha1:5f6e52eccb76cb7f1a1c491a2b6ac22b13255d3b - pristine_git_object: 22b1861180f6692a7b2a5e1d6a9b2ccc0e24109c + last_write_checksum: sha1:b4fb07c278065811bb567914f3c309632cec9942 + pristine_git_object: 2923017a48b03e64719bf6be004e2f3e62143a26 src/kombo/models/integrationstatechangedwebhookpayload.py: id: f46156a4c581 - last_write_checksum: sha1:46a5ef53534373d8b73467c2eac46aa178c75236 - pristine_git_object: d164702611ec6bd456da6f2ecacba25a3c0a9229 + last_write_checksum: sha1:c4fe834e29b728ffc80a475d569e072e7e656309 + pristine_git_object: aa2f19dc4b017518e976d29da85485bd75d800ca src/kombo/models/internal/__init__.py: id: 65ac4aa2c6a3 last_write_checksum: sha1:5beaf7e5a713d3eead465c6edcfdeb7f8076175c pristine_git_object: e7070a1222c2ed3fa3f6f54e6f122cae7ff9a449 src/kombo/models/internal/globals.py: id: 182df04d8a5a - last_write_checksum: sha1:1034395ba56e26b1eea95651c1b36154c3dfc98c - pristine_git_object: d1cdf47758f825c5bc56a1e54f663d8344310c09 + last_write_checksum: sha1:3e6b3c43d300eb9ba94abe25799399e5b10381d3 + pristine_git_object: a98e34e3384665ed40f0e34cdde6baedd328cd7d src/kombo/models/komboatserror.py: id: 5ab918f31c61 - last_write_checksum: sha1:d4e9ebc1ea7d594c66183297cfc3a9031d5d4294 - pristine_git_object: 8a0c81a4b40ae4d4d659064de949c3304f87a864 + last_write_checksum: sha1:d41984e9ef5654ff8cd85bae4d62f20988b78b1b + pristine_git_object: bebf21a7ef23a5f27154ee876b7830ac89b3126a src/kombo/models/kombogeneralerror.py: id: d6bcd40e2b8b - last_write_checksum: sha1:3697efc9a509f8607bd12420c494fb4d0d989074 - pristine_git_object: 195bcd5dba9fe0bb2d69b8fa8185950bb41c22a5 + last_write_checksum: sha1:a4b583c7ff9b13b09442f0b9c1132e4b567e7006 + pristine_git_object: 45015a3e81e133b36dc2435f961ccbdef1861bfa src/kombo/models/kombohriserror.py: id: 5e562dfd3678 - last_write_checksum: sha1:5d99c03a4ec7e37796f6f6426e528200730db4f4 - pristine_git_object: 93d41e3717a2e83f6a1bce85f4bfd962ec7cba0f + last_write_checksum: sha1:67d57cb9b1186e9898f892e7de34a6b711ea48ff + pristine_git_object: 51ec4fc447a0ee2ca15cfd12cb9d26adde2f7939 src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidop.py: id: 68196467a356 last_write_checksum: sha1:56945e8f4f74bd29fae5594c7b138e753dbf32d0 pristine_git_object: 60cc1c79b3a97c17c27a6d3144be0ce28cc8a1d3 src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidpositiveresponse.py: id: 83d72adc4530 - last_write_checksum: sha1:3b9297f912453cdfa68d4ecaa140609ea45ddc4b - pristine_git_object: aef0ebffcf1c802ef5a58fcb70db41dc5085c3da + last_write_checksum: sha1:9d0af98e80462cafdc9956fc6a9a4daea958fbe5 + pristine_git_object: 18c509b99f48c8e9dbe870e6e5ae3e03d52273fb src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidrequestbody.py: id: bb08a8758d4e - last_write_checksum: sha1:a9bc2adfc543a8326667aee0bb57860cfc74278f - pristine_git_object: 9d176cfd2bd981882bd2f11c6e5f41562d1a008b + last_write_checksum: sha1:f5d41a4d7ece941cb7a2d1e2bf0099e4d68c5513 + pristine_git_object: 4c06f7d865b624f029c5cee4fa461b0c5a6b90d1 src/kombo/models/postatsapplicationsapplicationidattachmentsop.py: id: 19702f697982 - last_write_checksum: sha1:3af52ced91771e5adc1732b605d06e6dc8565b5c - pristine_git_object: 04e77478130ae0ce004e404a6d7ac4e1a4057baa + last_write_checksum: sha1:6c2839d2ab0b6b8a2026cc495534893dd0a41519 + pristine_git_object: 6ef7a3a053b09d52017fcfc6b0afb0544d308bfd src/kombo/models/postatsapplicationsapplicationidattachmentspositiveresponse.py: id: b8a80dd3e0a4 - last_write_checksum: sha1:a0c3ab247572fd2f2d4a9e4963023cf893e3c524 - pristine_git_object: d630cc17ceefcdfb20b5c29c79f912d66b88d67c + last_write_checksum: sha1:cbc0e4d395f6b02a72c5c5ccc6a5dc35143a996c + pristine_git_object: 7411af70014283c52063e2bb01354cbaf016c185 src/kombo/models/postatsapplicationsapplicationidattachmentsrequestbody.py: id: c1ccccb52c52 - last_write_checksum: sha1:7ff24cc216734647faa46c3275db82ea92055628 - pristine_git_object: f95640332628a9d6913e265bf2b64f7c263ee618 + last_write_checksum: sha1:1120902952a1ab6f5e5bd055f0762fe7817277ec + pristine_git_object: 35dae4fa5462bebd9465635f981a7a43d3206efa src/kombo/models/postatsapplicationsapplicationidnotesop.py: id: eb40d379d56c - last_write_checksum: sha1:91caebde952d1f4d0579561bccc972227b75ba4b - pristine_git_object: 51a876cb7808a16db0c786e4490028d212dca519 + last_write_checksum: sha1:2c5603a94420b9746fd92cb3e734ae8b0a00193e + pristine_git_object: 667b0176d5c2a575fdd68552dd3728f572447c5c src/kombo/models/postatsapplicationsapplicationidnotespositiveresponse.py: id: a0f80eb91ac2 - last_write_checksum: sha1:aba01b812c0476fa97b6df454768b0461f318b3f - pristine_git_object: 6949d0d1b01b8748394f0138208d95e6e8c7a12f + last_write_checksum: sha1:a584f58d1de6882793592f6d7755989a2686a0af + pristine_git_object: 5a56d68268d640ec3f8f2f9003c111979fa83642 src/kombo/models/postatsapplicationsapplicationidnotesrequestbody.py: id: 44497b08cf43 - last_write_checksum: sha1:7dea30d64d6052ed3d45354f40f1fb5c24f3cc09 - pristine_git_object: 0d6f74a2542aef87331ddacb06a14bbf773c62f2 + last_write_checksum: sha1:07e40de31be6d8246c821d58197a33dedd33feff + pristine_git_object: ecffabfcfc5f23a76c33a18544dfb793e4286cb6 src/kombo/models/postatsapplicationsapplicationidrejectop.py: id: 53d6e1ff7e85 - last_write_checksum: sha1:2a3bbb5e9d1a7bfc8de398097e183dd6e792b0ff - pristine_git_object: e5e7c96a922f780c7bad5a3334e486fe50f14335 + last_write_checksum: sha1:45b0fc1c0936a4aba7a7b00eb32c95f425be9ed1 + pristine_git_object: f9f74bccf00aa367b73c25d133b6bc01a05d9efd src/kombo/models/postatsapplicationsapplicationidrejectpositiveresponse.py: id: 9302d72b2447 - last_write_checksum: sha1:693d64d2890adee5336990c02e05e76583412b68 - pristine_git_object: 8eac2b7fb582a468d3a085332c5496f45d4a34d8 + last_write_checksum: sha1:351e0aaadcdeaaa1687dd9d0aa91e436b7b6e022 + pristine_git_object: a6a347ce18cc008fd1e97d457887390c15756d2d src/kombo/models/postatsapplicationsapplicationidrejectrequestbody.py: id: a9d3440eecda - last_write_checksum: sha1:aa84292f6279e7ce2250c1c7359417f933b1bfe3 - pristine_git_object: 7c5e3b496e02cc029e33e1d462e3be9595bc7003 + last_write_checksum: sha1:0a7df45fdfc7d264a6fa05e1fce0e2ba355b4690 + pristine_git_object: a14f2a51cc7e149228835ac813ecadac27ba85df src/kombo/models/postatsapplicationsapplicationidresultlinksop.py: id: f6e134bb53b4 - last_write_checksum: sha1:b04120e61a29fa1509e0e789dc5715ba4f8d72c4 - pristine_git_object: 119e7b058fba265aea07416e988a0b0f1458300a + last_write_checksum: sha1:150cf5dc565c786195a0ae5badeb6ea6fce63b8e + pristine_git_object: b8d562046066410b9259eb3e6d6a96a33f6f5f65 src/kombo/models/postatsapplicationsapplicationidresultlinkspositiveresponse.py: id: 03fa95854a57 - last_write_checksum: sha1:9ca53b20f74fc3c9fab57d0496f86fb9007f493d - pristine_git_object: 6a4517d14fe97897b1e23eb4b3682a16bf1fa900 + last_write_checksum: sha1:d52b9274462266a14d5ebb346f0a18a58a94705a + pristine_git_object: 03be529dc77e6da68aaac5403f4491f25229a8f1 src/kombo/models/postatsapplicationsapplicationidresultlinksrequestbody.py: id: 15e34c668fd7 - last_write_checksum: sha1:acb1e037171a4f55d06ddffc62179781faa48eb7 - pristine_git_object: 054883c86bda106ff8f34a2e5cc8364ab7f134ca + last_write_checksum: sha1:1018e681e84a2f4c10a86efbf5a573c70dea10ec + pristine_git_object: 9422d2c48e75579fbcdd75e0f3b136e0121f5532 src/kombo/models/postatscandidatescandidateidattachmentsop.py: id: 7c6984e982a3 - last_write_checksum: sha1:44d8d6dc7adda5e4a727af3994486511e6531c51 - pristine_git_object: 7257f443a25c2baccd71f0147a0090fbe2cd9312 + last_write_checksum: sha1:08b2b1e3c6feff8b5379e4ef6a5c145aa2587e45 + pristine_git_object: 3a35c572bbb06865424e39855738e6e85f4bf84b src/kombo/models/postatscandidatescandidateidattachmentspositiveresponse.py: id: 7e6bc6c5251d - last_write_checksum: sha1:1ec50a1e29dfa75170f064a69f8688867077da76 - pristine_git_object: cf46289bcc279242ad6126c0d81d038f6b1bf3e3 + last_write_checksum: sha1:eee0cbdaa67f4b95d64eebcb22ca65635d38052a + pristine_git_object: 080f16a0eba46f1510d327afac05410925de53b6 src/kombo/models/postatscandidatescandidateidattachmentsrequestbody.py: id: 2450f91c21e1 - last_write_checksum: sha1:74939adedc3f4d6bdce11bc81e3bf5f5b8d9f9e9 - pristine_git_object: a1f7bf6ee3dd5b048dd3eb20bfbc0cf2a4183150 + last_write_checksum: sha1:5d7e3d7930edf7f60efd0f713868c05802cec3e0 + pristine_git_object: 10e97944ac0a6a55c3a8c63f509ad0d040c52976 src/kombo/models/postatscandidatescandidateidresultlinksop.py: id: d2c063e27c94 - last_write_checksum: sha1:236ba09f3269b698e7d45e2481533897cb726080 - pristine_git_object: 6cb6f539d16163fea256961ebd25d1ee41ce1ea6 + last_write_checksum: sha1:ced01006bb9bd5a8136be1307f8d1103cfa113c9 + pristine_git_object: ecab21c35279307f9078787e897e46b3279eb35d src/kombo/models/postatscandidatescandidateidresultlinkspositiveresponse.py: id: 1b8d28ba8fe6 - last_write_checksum: sha1:7239eefb47cfda8ecb3d374a29d17920c3be0811 - pristine_git_object: 7470a92109ee2a6eb14275291b559baa8a74b1f4 + last_write_checksum: sha1:e34b306068726209b4466ca021057a0431470bef + pristine_git_object: 1910122477d1088243d2c088ca1e0fd03346c6cb src/kombo/models/postatscandidatescandidateidresultlinksrequestbody.py: id: 872b369e52c5 - last_write_checksum: sha1:df1ebc8a79525c4c0f8d86a090d5faad4535003f - pristine_git_object: 03fc182b4223b2cf9ba74ec86afea080bbdf447d + last_write_checksum: sha1:79d68acc970325991fab0fa8980984a661330de3 + pristine_git_object: 780bdd7615a10f0dbbe0de07a068b07a18f428b9 src/kombo/models/postatscandidatescandidateidtagsop.py: id: 2fea2f5a65f9 - last_write_checksum: sha1:8dfdc43191ced38c81a8e832e388954c071e2f34 - pristine_git_object: 33c15953d54e0834c7a55996f84e0ced3c9340c2 + last_write_checksum: sha1:8f70d30f09444ce566ed07a02f67097c128b2b78 + pristine_git_object: 784581e61e6fe131817b0db1a6b8e100d0fc2781 src/kombo/models/postatscandidatescandidateidtagspositiveresponse.py: id: 3c85a3c7d677 - last_write_checksum: sha1:8ea6687e147014d0e935033b63d35f1c8833ea36 - pristine_git_object: 40ed46c96261708feed43dbb0a10878ea723d4fc + last_write_checksum: sha1:5cba7566f0e70d76f9cb85ce9354987e4d44ab33 + pristine_git_object: 312ef84775125e8d2ba7e72c5fe9ce625ab65cd1 src/kombo/models/postatscandidatescandidateidtagsrequestbody.py: id: b7125fca0157 - last_write_checksum: sha1:8145001b3a00a7ca06c5c91aeb54db6abd8e451a - pristine_git_object: 5c35194dcfa13cc1bbc25d5c5e3f749df0e96e8d + last_write_checksum: sha1:18e3d019fce02d87638e4db5ad1ae7c9a54d6a19 + pristine_git_object: 2fe3911413868b0bce03bf8861ae53f96bc71457 src/kombo/models/postatscandidatesop.py: id: bc8d4ec54a70 - last_write_checksum: sha1:433af0a56db7b7edca7a8440c121974f9e2f6bd9 - pristine_git_object: e0e93255c1b55823af0a97d5f469c30b8041ca2d + last_write_checksum: sha1:1a8e40fcb21cb468bfc73dae897ca8ddbe1f129e + pristine_git_object: 88828240edacfffaa8204cded1316176dac459db src/kombo/models/postatscandidatespositiveresponse.py: id: 9c14571088e1 - last_write_checksum: sha1:0e5442172e2955a4e9077ab64df7a55ad5aead8b - pristine_git_object: 429ec6552c1b09ae271e71aa779dfbb4c067d0dc + last_write_checksum: sha1:acf4af5153c84ab65abeda208c9d7518717825cb + pristine_git_object: baaea6ccf5482dc22ec831d852a90f9bbc8e5bab src/kombo/models/postatscandidatesrequestbody.py: id: ac6e98f043e9 - last_write_checksum: sha1:196eaa0779ef9367adb35db5ef538007b460cbe6 - pristine_git_object: 37eb4101f57f191cf9a73a35185f3a9bd23bb9a0 + last_write_checksum: sha1:fc1294020c90883fa9e8fe9182f7aa5d426d64ae + pristine_git_object: 5e24dc55f5be691eabe65418101654094b5f6c6f src/kombo/models/postatsimporttrackedapplicationop.py: id: d36d9960022a - last_write_checksum: sha1:02cfd2ebff78e9c688c49b67ff2ab1b657356e78 - pristine_git_object: 17dabde8a455e3ff6cb6559c7b99ce9819a6552c + last_write_checksum: sha1:c4c4913ec1ea226b5a6664cd3f5395dcb4abbe0b + pristine_git_object: 675bacb6a7f9dc1012ce9a50ed3acbb7e294d506 src/kombo/models/postatsimporttrackedapplicationpositiveresponse.py: id: 347cb97d0d44 - last_write_checksum: sha1:1cace073e5779ca32b4ba7c3627d1610e3d7240a - pristine_git_object: a790e91cdbcab0f3106d4f9689daffef22b764aa + last_write_checksum: sha1:ad89d5542e719cd3bae00190e79906fd7ab27c77 + pristine_git_object: a16b93b987e6ef7e082dea8c08eda7a7056c033a src/kombo/models/postatsimporttrackedapplicationrequestbody.py: id: e346d429375d - last_write_checksum: sha1:36b57656404b20d51a7a86b48d889073d0163020 - pristine_git_object: 5183b7b71137a9be85141b40de8e578f4053f6a6 + last_write_checksum: sha1:6ced285a4c980512a7d69ac608582cdaa901b56f + pristine_git_object: 62dad871c1cff82ffb5565bad114c65f8ff3b22a src/kombo/models/postatsjobsjobidapplicationsop.py: id: 6888f681bfce - last_write_checksum: sha1:a8078262090c7f531ae8949b760727a2322cca5f - pristine_git_object: f3ac0ecd286a0c3041d9c51574e478bf96b1bc7f + last_write_checksum: sha1:6b37dc276b84a4ad70a496acf3d36d2c75bc8c20 + pristine_git_object: bacea684acffe0178563700295ef5e93fc0b6dbc src/kombo/models/postatsjobsjobidapplicationspositiveresponse.py: id: 1179f9a0a488 - last_write_checksum: sha1:f42226f7df3a2e963919778debd5b6bdaf1a2881 - pristine_git_object: 10df4096c92c64540e275dd5ad77ea7bf47dfd69 + last_write_checksum: sha1:46540f346ce1b6f97f4eb09f33075a3338b64322 + pristine_git_object: cbe1666a84b173f8619890e865d3e01ca2ed3531 src/kombo/models/postatsjobsjobidapplicationsrequestbody.py: id: a451a5e6b515 - last_write_checksum: sha1:4f6c6adcc18d50b341e14633c92df106f2c7e767 - pristine_git_object: 34abf3d556ef6201e3b2e3f77f548f4b000caff3 + last_write_checksum: sha1:59d3d3abc4bcf9e615048d4e850c84abf5bce5fe + pristine_git_object: a3401040991a0a91b02384db239f74eabf9292d8 src/kombo/models/postconnectcreatelinkpositiveresponse.py: id: a3271239a82f - last_write_checksum: sha1:db7ae512920d425bba4b82473a1c1a17c448f7ce - pristine_git_object: 6c5648df0294b43614f8cfbaa454ced94face4f5 + last_write_checksum: sha1:db8f52f9bed614766c9bd4c0f1286ee5859b38f8 + pristine_git_object: 91e8d75513c8015aeb3f8dd2e38e2ec090b0770c src/kombo/models/postconnectcreatelinkrequestbody.py: id: 8ae6871fd392 - last_write_checksum: sha1:ec2f11bc42c42955014926e8a6c7c84e91023f67 - pristine_git_object: 095331b376a4f9656c089650a18471636c9ee1d4 + last_write_checksum: sha1:976f14f56445acd85c552d45fa3414fad4a9f818 + pristine_git_object: 652e3457ca0665f4dfdb339f868132d85327322d src/kombo/models/postforcesyncop.py: id: 695738b0e4fb - last_write_checksum: sha1:722010d0ff5865307fcebadd780c674a2279b863 - pristine_git_object: f45ea8048a4eb2a217eed9442707bf9827cd2bed + last_write_checksum: sha1:5805dd4762a6eaee7ecb2ea766fc39eca9f97bc3 + pristine_git_object: ac0f2c64acbdcc754be2edc8aa09f2f7cf1f70e7 src/kombo/models/postforcesyncpositiveresponse.py: id: e2b5a2fd4ed7 - last_write_checksum: sha1:1ed0a5f7015781cb25bb0f9ec32419dbe63da160 - pristine_git_object: 4ed90967ee4a3170bc0a781e9f7e4f192498bdbc + last_write_checksum: sha1:0e6428ae481f0759d9a683aa2f5f7f515410f5d6 + pristine_git_object: f81f791747e7e05ff139015082ef36ab25925320 src/kombo/models/postforcesyncrequestbody.py: id: 6d2f18d9f10e - last_write_checksum: sha1:5019b6e955f0afb3fa5b540921937b01404e3161 - pristine_git_object: 725656f9654a9bd14986b607f5578847859c1bac + last_write_checksum: sha1:dc3a675b70b392243db8b0691265e1eb5a786db8 + pristine_git_object: d23abaaa9951db33a4fb081b21cc8ba3053c5243 src/kombo/models/posthrisabsencesop.py: id: 8710d4eb55b3 - last_write_checksum: sha1:d0960afdd787144877443982959071977c62f458 - pristine_git_object: ba8e75a1b2419d6ec67cf4db80ca2de14beb4bf9 + last_write_checksum: sha1:0aab380588f635957d3fd007f50409102568f370 + pristine_git_object: 9201fbf3f52a65e3e33190ed4bf0be14a1989b6c src/kombo/models/posthrisabsencespositiveresponse.py: id: d61aff36a38b - last_write_checksum: sha1:023fbcf69af3c6f487e545cc427680bb9303a92e - pristine_git_object: a8e9dfa696084df3f663a317841bc4d9375bab4c + last_write_checksum: sha1:9d87c26f18426607c7138fda4dc69287ca2f689d + pristine_git_object: fb3d4d87573468fa4364851ddcc77017def5e144 src/kombo/models/posthrisabsencesrequestbody.py: id: 6af28f32b693 - last_write_checksum: sha1:bfbd130c35fcd1c85d10c29d40f0b02a7b50f6fd - pristine_git_object: cf06165dfb1b6c19e6657d630712c1e22ac2f6b7 + last_write_checksum: sha1:7f0fb16e15ac47f007a0f8e6d28158a07af026d2 + pristine_git_object: 98d1d55d40775988f902fc2e6583a7d26d04279a src/kombo/models/posthrisemployeesemployeeiddocumentsop.py: id: 4059a1ca18bb - last_write_checksum: sha1:8bb501663722d980db3f782384accf9cad4bce06 - pristine_git_object: 40ed8c53f1a8f2d4304deca0082f4106fe902f8d + last_write_checksum: sha1:ca1d1202231f58ccb531a69e3dad74baab8369e7 + pristine_git_object: e341b425f09a49fbb5cde4d4c95204db888baacf src/kombo/models/posthrisemployeesemployeeiddocumentspositiveresponse.py: id: 01873f49d788 - last_write_checksum: sha1:d832678b781c61fe0b4e83452cff186e6babe1c9 - pristine_git_object: b0325a7342c64589e65c63aaaed5d0e1b2da41a6 + last_write_checksum: sha1:cb5c457b9b823722e66c388b312898756b4bd251 + pristine_git_object: 520fce8b64b787c7105b78cfa557e181df2307a9 src/kombo/models/posthrisemployeesemployeeiddocumentsrequestbody.py: id: 86f398f647ff - last_write_checksum: sha1:c566202fb1ebe0872f78a65755431eb047db9d80 - pristine_git_object: 6db75a8c5ff80ea813157cc396052781dac1d34d + last_write_checksum: sha1:458a94a8676dc9268726b666db49859c6fbc3f18 + pristine_git_object: b421b14e2159b8dffce977dc06a2c53c5183bbfd src/kombo/models/posthrisemployeesformop.py: id: 03b363d3974d - last_write_checksum: sha1:757ec01d9f578a1245edb582c67644f1245cabca - pristine_git_object: 0555fef4f2cc5c3033a43f3d2221f75fff3a8e97 + last_write_checksum: sha1:7d5b287d8d7dd16e451316d67ac1ecd5098220f2 + pristine_git_object: f642545aa975f394a7d97f962fbf03f404f26e3f src/kombo/models/posthrisemployeesformpositiveresponse.py: id: 8fcfa622d725 - last_write_checksum: sha1:a4a2a8c4ce9b8ff642c852dda2b135b38d853790 - pristine_git_object: 8c1275e361f7d38c470568227caa4e72366c80ed + last_write_checksum: sha1:03776bb13076828d647e145da467c0d91ec9d127 + pristine_git_object: 252914864b967622b9735afbe606f02cc1799809 src/kombo/models/posthrisemployeesformrequestbody.py: id: cea1d0099ef3 last_write_checksum: sha1:8e080a50a46cd22639e1bcf579e4fe1d1fe7eb03 @@ -4588,92 +4608,104 @@ trackedFiles: pristine_git_object: 1b368c82e3cfb676d676193391b549dc0f55d18a src/kombo/models/postintegrationsintegrationidrelinkpositiveresponse.py: id: 180e68f6d32d - last_write_checksum: sha1:d8223dbadeab448679f87ab0e6321f1e13d0f4bf - pristine_git_object: affff38783927060a876c461fd3c5add5ae92bcf + last_write_checksum: sha1:895c66848b38ca7f5160db150886cc6434103042 + pristine_git_object: 93c22a17910cbb890f5a6ac3d79ab6a81d6c904c src/kombo/models/postintegrationsintegrationidrelinkrequestbody.py: id: dfa481c1c118 - last_write_checksum: sha1:4d12ca8bf0b77f7c514f5ef5658a7a4034c032e2 - pristine_git_object: 8bcb38bd802ae3b2e9e4196cd65794c7d79a0651 + last_write_checksum: sha1:ba644794de0930b7d74a1e1dcc1dd2fe2d7ef90a + pristine_git_object: 17604a8d0e4ebd4fd8415b0774e5b756735fbd41 src/kombo/models/postpassthroughtoolapiop.py: id: 85a5a54ec09d - last_write_checksum: sha1:48b481b37f3a484e33b1610cdd815218e2fa27b9 - pristine_git_object: 9fad6ab0d589141f3041815ae632cad4f66617ac + last_write_checksum: sha1:175f0872269f0eeeced4af6b5c5f1364fdcb7b08 + pristine_git_object: b025bbe5e7bc2f65b2de5cf23074cdb8453b2e57 src/kombo/models/postpassthroughtoolapipositiveresponse.py: id: 013f22e4f188 - last_write_checksum: sha1:ec1e17220ca64ba3dbf9120aa96b4e755824c8a4 - pristine_git_object: 3374e0cd15442e25513e0d687791de2c5f744c63 + last_write_checksum: sha1:c969eebfe6e3e05f27b0fe915c91279bcebc50d8 + pristine_git_object: 475235b1b820a828976c0207fe86fd120f933879 src/kombo/models/postpassthroughtoolapirequestbody.py: id: b2daa32824c5 - last_write_checksum: sha1:c7c7353fed450601e9c9a4bc5bb2a9ad83a52a54 - pristine_git_object: fc7b364828cd2202f2acb2a3b5cf858955dd1d37 + last_write_checksum: sha1:6f83e80798fa6cde867b08ddd3e3f0443220b14b + pristine_git_object: a7b54b454d73577e62abd790e12a2d57893fc594 src/kombo/models/putassessmentordersassessmentorderidresultop.py: id: 0dc0f67b26d7 - last_write_checksum: sha1:fd62948f7f741d8ae206885c343be11f913596d7 - pristine_git_object: 62753a8a81d1227c49d83c6ef2f0e702c7b5d837 + last_write_checksum: sha1:d7e89055cc16e4c09882568cfa981af1be18cd39 + pristine_git_object: e2c72cac77b1d5917616e836f07c466769d85ce0 src/kombo/models/putassessmentordersassessmentorderidresultpositiveresponse.py: id: 29c75277d3bf - last_write_checksum: sha1:571396ac72b360fedd90e027f7e21f8e5d6e3c37 - pristine_git_object: 6de8024caa2e7f0b69993ff236980c633c846dde + last_write_checksum: sha1:b5164cd8df0e9297676740dfc51e810876d139cf + pristine_git_object: b34ea0de9602c887e0e0354fe501e917e9ac179e src/kombo/models/putassessmentordersassessmentorderidresultrequestbody.py: id: 9752de46be3c - last_write_checksum: sha1:8ed828765c977734d31b8969dfdb95252913daf6 - pristine_git_object: ff302b1a2bbd219fb75aad498ac57c1d00e19ab4 + last_write_checksum: sha1:1a756e66731d8c94526696c30df775eaafa2adb5 + pristine_git_object: 493dffd9630183c840377e56ee9fb03f4050c823 src/kombo/models/putassessmentpackagesop.py: id: b33421f2efc8 - last_write_checksum: sha1:ff0ad859c476b1b82848a690d9f18e31a0c05ea8 - pristine_git_object: 52a99f8140455578379bb479033074624e908b18 + last_write_checksum: sha1:2adaf7aa1eac694e57806832a00db85af1f90c25 + pristine_git_object: 57db7e9602641385af148291ab57562e1bc71021 src/kombo/models/putassessmentpackagespositiveresponse.py: id: 05d8be16d757 - last_write_checksum: sha1:dbfd259badc42b0ef5e40c0a474912450f8d1c42 - pristine_git_object: 03019cbda82759858b16e11621fc501fc9c21b22 + last_write_checksum: sha1:e58e922b73243b2464f20c7cc53472556b3d5718 + pristine_git_object: 4412ec568bdb11db8f1e17c9dbcfd5ee3b80cca6 src/kombo/models/putassessmentpackagesrequestbody.py: id: 1a5ad090b978 last_write_checksum: sha1:00f6fb0c33c79dcc4d61c4ab7466d5e634451dc0 pristine_git_object: c9b704e59efc5308fbe78733b5a9d71a4a5a6947 src/kombo/models/putatsapplicationsapplicationidstageop.py: id: 0a5b706930d9 - last_write_checksum: sha1:eddbd1f591541eec91d06f1e2eab21e67701f74c - pristine_git_object: 27e0a33afb0f6385e35b825b332098835a7ffc16 + last_write_checksum: sha1:7881c0d39923a65a3fa81902e5cc7b9e6ee6da24 + pristine_git_object: 2142134bc130029befa9fa275b7961868fc6f6ef src/kombo/models/putatsapplicationsapplicationidstagepositiveresponse.py: id: 35a435e0b5d0 - last_write_checksum: sha1:94de215f71a560ee78677a7f86870c03bc3af1ac - pristine_git_object: ba139dfb3cfec778ab2996963c76414839c9c043 + last_write_checksum: sha1:7f22b134151ebee024e8c005416b2e98f7815777 + pristine_git_object: 43a73b99099baf273eae5f17b02bf79782da61b8 src/kombo/models/putatsapplicationsapplicationidstagerequestbody.py: id: eaea7fd23cea - last_write_checksum: sha1:570fa1de189df5335be5c2290c367cb04227d061 - pristine_git_object: a68884d7df54069c95938ed397234782d02e12a7 + last_write_checksum: sha1:b1d8ca24068848d929bccaabdb25f4aa8367581b + pristine_git_object: cefafccedaf30cd78a0970a9d1ff914df5a83e76 src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidop.py: id: 30c04c98682e last_write_checksum: sha1:027a950f81923ef7b1274fb65cebb43b53fbce8a pristine_git_object: 6b3a68de1786cce0f75fcde7cd6a3af3f4362345 src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidpositiveresponse.py: id: 88117f6adcae - last_write_checksum: sha1:f0914f6793066a36b8c95acb5b013a07c833dd2b - pristine_git_object: 06ce9cf180fda197e2f3aa55194817605d498444 + last_write_checksum: sha1:095c662a0bcf76cfbb95cacc60bcff09afb88abc + pristine_git_object: 7ab620093d824ba4bbef2d786587024bbc3ac05e src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidrequestbody.py: id: 55311185c306 - last_write_checksum: sha1:6c098257c8ad6b52fdf87010c7f31287586543f8 - pristine_git_object: f0910650e3b48b0f72af2a12a78a803f994acfb3 + last_write_checksum: sha1:b2b1867d7953065b19f84e519d0d70bb1f62f00f + pristine_git_object: 07944b0815adab798fe212f9908ee3c7aeb576e6 + src/kombo/models/putintegrationsintegrationidenabledop.py: + id: 545629a8b4e0 + last_write_checksum: sha1:4a36d0016591cdcee9e32f5ee75f1d34654cba9b + pristine_git_object: 389fd2e55261ff538b346db4fa679bb68de73e25 + src/kombo/models/putintegrationsintegrationidenabledpositiveresponse.py: + id: f3d7275d0a33 + last_write_checksum: sha1:57cc87e9b865bba7276f6d36ae67ef0349040291 + pristine_git_object: a067e8acf0d4082da036e80600e533ef17c71aec + src/kombo/models/putintegrationsintegrationidenabledrequestbody.py: + id: 4e9d4abec5b8 + last_write_checksum: sha1:bb7a1ae7336b0f493b4d311e447cc5dbfd4d217a + pristine_git_object: 3e7d6ac827420db4eecf6c19deb38cd6ac1f3fcb src/kombo/models/schema1.py: id: aa1694dd6e0c last_write_checksum: sha1:531a2acbe61e87a1ba3680333ad37ab84d530fc7 pristine_git_object: 92026982dffdaab2b30a256e175a465dcac11eea src/kombo/models/schema1_union_1.py: id: ec9b08a4abeb - last_write_checksum: sha1:b35e67818d5f1e05f3f8d6d617580c202dd3ce99 - pristine_git_object: b9d908db449be467eb620546a5534bd90210a11e + last_write_checksum: sha1:afb94abee0ed571412ebdf51bca0434b584303e5 + pristine_git_object: 52cc2765d3210e63c9ec00129209a254470cd43e src/kombo/models/schema1_union_2.py: id: cc44c81efa74 - last_write_checksum: sha1:65cc19e424a285c9ecc303fad74b242ac0af1b08 - pristine_git_object: 9580dd7a59ac89914d8943700b586f0463daded6 + last_write_checksum: sha1:cfbe1b0a15a217ac1768c9217e3655dfec27f46b + pristine_git_object: 5dbedfdcf756e8fc241d0909cc45154976690e92 src/kombo/models/schema2_union_1.py: id: a79c728ce55f - last_write_checksum: sha1:c50d70a3cfcc3b1d6e92d35022f6417667794d2f - pristine_git_object: 584bfb325eed789eab16c9dfa86a1e1d55044ce1 + last_write_checksum: sha1:adba7ad705bf114ac882215e0e9933bb29b5085d + pristine_git_object: 360eb506a79e7968d2951a8874a40b8b5fd8809e src/kombo/models/schema2_union_2.py: id: a3bceed79adb - last_write_checksum: sha1:70ea6cfa9c41bad61bf39aa1105a7362a617dc25 - pristine_git_object: bba2c89eb5e93256a0201ab01d36dd834ded9975 + last_write_checksum: sha1:4802a2fb7b44a7b21f957a19eff1ce18eead6c52 + pristine_git_object: b3474587845a1ef4e7e71c1428c0cce1b575e26f src/kombo/models/schema4.py: id: eaa7465473c1 last_write_checksum: sha1:bede6532d50689253cc6c2e99d42bf313648f8bd @@ -4684,8 +4716,8 @@ trackedFiles: pristine_git_object: 3538231d0fe0780405672a144202123d7b7ef9da src/kombo/models/syncfinishedwebhookpayload.py: id: 5590d922cba7 - last_write_checksum: sha1:b3b863e377126915bb7fa982b9c2e722ac4adc9f - pristine_git_object: ba329f3ebb5e58248ba185c0ace4542638e0ab7d + last_write_checksum: sha1:85cd8de8caad18984d490f513e8950d4c569318c + pristine_git_object: 383770fd490d9687b7e7c7a2921cedc4078d7a54 src/kombo/models/webhookassessmentorderreceivedwebhookpayloadop.py: id: ecd51c42c941 last_write_checksum: sha1:26d7e1fac2b33d99e774273dcf4e9bea36ebac88 @@ -4740,8 +4772,8 @@ trackedFiles: pristine_git_object: a9a640a1a7048736383f96c67c6290c86bf536ee src/kombo/utils/__init__.py: id: cc48ef24cece - last_write_checksum: sha1:81e0385b93362e0f3f6911b65bd4cc601ebc11e1 - pristine_git_object: 56164cf3a86399ee7a8e1a68d19fb494689d77c3 + last_write_checksum: sha1:a1f6ae620fb6a3ccc30e99b427e49a0c8be463af + pristine_git_object: 15394a08a7e30033d319e44dd5734664ddb587e5 src/kombo/utils/annotations.py: id: ef5c87c1f451 last_write_checksum: sha1:a4824ad65f730303e4e1e3ec1febf87b4eb46dbc @@ -4752,12 +4784,12 @@ trackedFiles: pristine_git_object: a6c52cd61bbe2d459046c940ce5e8c469f2f0664 src/kombo/utils/enums.py: id: 62e6b0e2b881 - last_write_checksum: sha1:786ba597f79dca6fbc0d87c591752bb8d775ecb7 - pristine_git_object: c3bc13cfc48794c143a64667f02e7949a8ce3fcc + last_write_checksum: sha1:bc8c3c1285ae09ba8a094ee5c3d9c7f41fa1284d + pristine_git_object: 3324e1bc2668c54c4d5f5a1a845675319757a828 src/kombo/utils/eventstreaming.py: id: 5014efc778bb - last_write_checksum: sha1:bababae5d54b7efc360db701daa49e18a92c2f3b - pristine_git_object: 0969899bfc491e5e408d05643525f347ea95e4fc + last_write_checksum: sha1:ffa870a25a7e4e2015bfd7a467ccd3aa1de97f0e + pristine_git_object: f2052fc22d9fd6c663ba3dce019fe234ca37108b src/kombo/utils/forms.py: id: 99d47e485fec last_write_checksum: sha1:15fa7e9ab1611e062a9984cf06cb20969713d295 @@ -4780,20 +4812,20 @@ trackedFiles: pristine_git_object: c04e0db82b68eca041f2cb2614d748fbac80fd41 src/kombo/utils/requestbodies.py: id: 31996a9936a3 - last_write_checksum: sha1:e0a3a78158eba39880475d62d61be906625676b8 - pristine_git_object: d5240dd5f5efffabbd9aefa2f4a349511a9c75b4 + last_write_checksum: sha1:41e2d2d2d3ecc394c8122ca4d4b85e1c3e03f054 + pristine_git_object: 1de32b6d26f46590232f398fdba6ce0072f1659c src/kombo/utils/retries.py: id: bc594ff11adc last_write_checksum: sha1:5b97ac4f59357d70c2529975d50364c88bcad607 pristine_git_object: 88a91b10cd2076b4a2c6cff2ac6bfaa5e3c5ad13 src/kombo/utils/security.py: id: acd4ded0aa8d - last_write_checksum: sha1:a17130ace2c0db6394f38dd941ad2b700cc755c8 - pristine_git_object: 295a3f40031dbb40073ad227fd4a355660f97ab2 + last_write_checksum: sha1:435dd8b180cefcd733e635b9fa45512da091d9c0 + pristine_git_object: 17996bd54b8624009802fbbdf30bcb4225b8dfed src/kombo/utils/serializers.py: id: 5d7d8c5e2d73 - last_write_checksum: sha1:a0d184ace7371a14a7d005cca7f358a03e3d4b07 - pristine_git_object: 378a14c0f86a867ca7b0eb7e620da82234c0ccc4 + last_write_checksum: sha1:ce1d8d7f500a9ccba0aeca5057cee9c271f4dfd7 + pristine_git_object: 14321eb479de81d0d9580ec8291e0ff91bf29e57 src/kombo/utils/unmarshal_json_response.py: id: 78f7ac328026 last_write_checksum: sha1:e2ea836c8f9063fbf985278bb705dec1a077ca25 @@ -4985,6 +5017,17 @@ examples: responses: default: application/json: {"status": "error", "error": {"code": null, "title": null, "message": "The message is always in the response.", "log_url": null}} + speakeasy-default-delete-integrations-integration-id: + parameters: + path: + integration_id: "" + requestBody: + application/json: {} + responses: + "200": + application/json: {"status": "success", "data": {}} + default: + application/json: {"status": "error", "error": {"code": "PLATFORM.RATE_LIMIT_EXCEEDED", "title": "", "message": "", "log_url": "https://old-fashioned-sonar.net/"}} GetIntegrationsIntegrationId: example1: parameters: @@ -5037,6 +5080,17 @@ examples: responses: default: application/json: {"status": "error", "error": {"code": null, "title": null, "message": "The message is always in the response.", "log_url": null}} + speakeasy-default-post-integrations-integration-id-relink: + parameters: + path: + integration_id: "" + requestBody: + application/json: {"language": "en", "link_type": "EMBEDDED"} + responses: + "200": + application/json: {"status": "success", "data": {"link": "https://able-daughter.net"}} + default: + application/json: {"status": "error", "error": {"code": "PLATFORM.RATE_LIMIT_EXCEEDED", "title": "", "message": "", "log_url": "https://ecstatic-drug.com"}} GetIntegrationsIntegrationIdIntegrationFields: example1: parameters: @@ -6733,7 +6787,7 @@ examples: header: X-Integration-Id: "workday:HWUTwvyx2wLoSUHphiWVrp28" requestBody: - application/json: {"stage_id": "8x3YKRDcuRnwShdh96ShBNn1", "candidate": {"first_name": "Frank", "last_name": "Doe", "email_address": "frank.doe@example.com", "company": "Acme Inc.", "title": "Head of Integrations", "phone_number": "+1-541-754-3010", "location": {"city": "New York", "country": "US"}, "gender": "MALE", "availability_date": "2021-01-01T00:00:00Z", "salary_expectations": {"period": "YEAR", "amount": 100000}}, "attachments": [{"name": "Frank Doe CV.txt", "content_type": "text/plain", "data": "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=", "type": "CV"}], "screening_question_answers": [{"question_id": "3phFBNXRweGnDmsU9o2vdPuQ", "answer": "Yes"}, {"question_id": "EYJjhMQT3LtVKXnTbnRT8s6U", "answer": ["GUzE666zfyjeoCJX6A8n7wh6", "5WPHzzKAv8cx97KtHRUV96U8", "7yZfKGzWigXxxRTygqAfHvyE"]}]} + application/json: {"stage_id": "8x3YKRDcuRnwShdh96ShBNn1", "candidate": {"first_name": "Frank", "last_name": "Doe", "email_address": "frank.doe@example.com", "company": "Acme Inc.", "title": "Head of Integrations", "phone_number": "+1-541-754-3010", "location": {"city": "New York", "country": "US", "state": "NY", "zip_code": "10016"}, "gender": "MALE", "availability_date": "2021-01-01T00:00:00Z", "salary_expectations": {"period": "YEAR", "amount": 100000}}, "attachments": [{"name": "Frank Doe CV.txt", "content_type": "text/plain", "data": "SGkgdGhlcmUsIEtvbWJvIGlzIGN1cnJlbnRseSBoaXJpbmcgZW5naW5lZXJzIHRoYXQgbG92ZSB0byB3b3JrIG9uIGRldmVsb3BlciBwcm9kdWN0cy4=", "type": "CV"}], "screening_question_answers": [{"question_id": "3phFBNXRweGnDmsU9o2vdPuQ", "answer": "Yes"}, {"question_id": "EYJjhMQT3LtVKXnTbnRT8s6U", "answer": ["GUzE666zfyjeoCJX6A8n7wh6", "5WPHzzKAv8cx97KtHRUV96U8", "7yZfKGzWigXxxRTygqAfHvyE"]}]} responses: "200": application/json: {"status": "success", "data": {"id": "H77fDF8uvEzGNPRubiz5DvQ7", "remote_id": "32", "outcome": "PENDING", "rejection_reason_name": null, "rejected_at": null, "current_stage_id": "5J7L4b48wBfffYwek9Az9pkM", "job_id": "H5daSm8e85Dmvmne3wLeCPhX", "candidate_id": "26vafvWSRmbhNcxJYqjCzuJg", "screening_question_answers": [], "custom_fields": {}, "remote_url": "https://example.com/applications/32", "changed_at": "2022-08-07T14:01:29.196Z", "remote_deleted_at": null, "remote_created_at": "2022-04-02T00:00:00Z", "remote_updated_at": "2022-04-04T00:00:00Z", "current_stage": {"id": "5J7L4b48wBfffYwek9Az9pkM", "name": "Interview", "remote_id": "5", "index": 2}, "job": {"id": "H5daSm8e85Dmvmne3wLeCPhX", "name": "Head of Integrations", "remote_id": "1"}, "candidate": {"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "first_name": "John", "last_name": "Doe", "company": "Acme, Inc.", "title": "Head of Marketing", "confidential": false, "source": "Employee Referral", "phone_numbers": [{"phone_number": "+1-541-754-3010", "type": "HOME"}], "email_addresses": [{"email_address": "john.doe@example.com", "type": "PRIVATE"}], "social_media": [{"link": "https://www.youtube.com/watch?v=dQw4w9WgXcQ", "type": "YOUTUBE", "username": null}], "location": {"city": "Berlin", "country": "DE", "raw": "Berlin, Germany", "state": "Berlin", "street_1": "Lohmühlenstraße 65", "street_2": null, "zip_code": "12435"}, "custom_fields": {}, "remote_url": "https://example.com/candidates/32", "remote_created_at": "2022-04-02T00:00:00Z", "remote_updated_at": "2022-04-04T00:00:00Z", "changed_at": "2022-04-04T00:00:00Z", "remote_deleted_at": null, "tags": [{"id": "7DHDky9zk4qnWkycuuQjFXNh", "name": "Fast Learner", "remote_id": "1"}]}}, "warnings": [{"message": "This is an example warning!"}]} @@ -6924,7 +6978,7 @@ examples: X-Integration-Id: "workday:HWUTwvyx2wLoSUHphiWVrp28" responses: "200": - application/json: {"status": "success", "data": {"next": "eyJwYWdlIjoxMiwibm90ZSI6InRoaXMgaXMganVzdCBhbiBleGFtcGxlIGFuZCBub3QgcmVwcmVzZW50YXRpdmUgZm9yIGEgcmVhbCBjdXJzb3IhIn0=", "results": [{"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "title": "Interview with John Doe", "starting_at": "2023-06-26T14:30:00Z", "ending_at": "2023-06-26T15:30:00Z", "location": {"city": "Berlin", "country": "DE", "raw": "Berlin, Germany", "state": "Berlin", "street_1": "Lohmühlenstraße 65", "street_2": null, "zip_code": "12435"}, "application_id": "H77fDF8uvEzGNPRubiz5DvQ7", "stage_id": "H5daSm8e85Dmvmne3wLeCPhX", "canceled": false, "remote_created_at": "2022-08-07T14:01:29.196Z", "remote_updated_at": "2022-08-07T14:01:29.196Z", "changed_at": "2022-08-07T14:01:29.196Z", "remote_deleted_at": null, "users": [{"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "first_name": "John", "last_name": "Doe", "email": "john.doe@kombo.dev"}], "application": {"id": "H77fDF8uvEzGNPRubiz5DvQ7", "remote_id": "32", "outcome": "HIRED", "rejection_reason_name": null, "candidate": {"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "first_name": "John", "last_name": "Doe", "email_addresses": [{"email_address": "john.doe@example.com", "type": "PRIVATE"}]}, "job": {"id": "H5daSm8e85Dmvmne3wLeCPhX", "remote_id": "32", "name": "Backend Engineer"}}}]}} + application/json: {"status": "success", "data": {"next": "eyJwYWdlIjoxMiwibm90ZSI6InRoaXMgaXMganVzdCBhbiBleGFtcGxlIGFuZCBub3QgcmVwcmVzZW50YXRpdmUgZm9yIGEgcmVhbCBjdXJzb3IhIn0=", "results": [{"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "title": "Interview with John Doe", "starting_at": "2023-06-26T14:30:00Z", "ending_at": "2023-06-26T15:30:00Z", "location": {"city": "Berlin", "country": "DE", "raw": "Berlin, Germany", "state": "Berlin", "street_1": "Lohmühlenstraße 65", "street_2": null, "zip_code": "12435"}, "video_conferencing_url": "https://meet.example.com/interview-abc123", "application_id": "H77fDF8uvEzGNPRubiz5DvQ7", "stage_id": "H5daSm8e85Dmvmne3wLeCPhX", "canceled": false, "remote_created_at": "2022-08-07T14:01:29.196Z", "remote_updated_at": "2022-08-07T14:01:29.196Z", "changed_at": "2022-08-07T14:01:29.196Z", "remote_deleted_at": null, "users": [{"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "first_name": "John", "last_name": "Doe", "email": "john.doe@kombo.dev"}], "application": {"id": "H77fDF8uvEzGNPRubiz5DvQ7", "remote_id": "32", "outcome": "HIRED", "rejection_reason_name": null, "candidate": {"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "first_name": "John", "last_name": "Doe", "email_addresses": [{"email_address": "john.doe@example.com", "type": "PRIVATE"}]}, "job": {"id": "H5daSm8e85Dmvmne3wLeCPhX", "remote_id": "32", "name": "Backend Engineer"}}}]}} default: application/json: {"status": "error", "error": {"code": "ATS.JOB_CLOSED", "title": "", "message": "", "log_url": "https://lustrous-designation.info/"}} example1: @@ -6937,7 +6991,7 @@ examples: X-Integration-Id: "workday:HWUTwvyx2wLoSUHphiWVrp28" responses: "200": - application/json: {"status": "success", "data": {"next": "eyJwYWdlIjoxMiwibm90ZSI6InRoaXMgaXMganVzdCBhbiBleGFtcGxlIGFuZCBub3QgcmVwcmVzZW50YXRpdmUgZm9yIGEgcmVhbCBjdXJzb3IhIn0=", "results": [{"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "title": "Interview with John Doe", "starting_at": "2023-06-26T14:30:00Z", "ending_at": "2023-06-26T15:30:00Z", "location": {"city": "Berlin", "country": "DE", "raw": "Berlin, Germany", "state": "Berlin", "street_1": "Lohmühlenstraße 65", "street_2": null, "zip_code": "12435"}, "application_id": "H77fDF8uvEzGNPRubiz5DvQ7", "stage_id": "H5daSm8e85Dmvmne3wLeCPhX", "canceled": false, "remote_created_at": "2022-08-07T14:01:29.196Z", "remote_updated_at": "2022-08-07T14:01:29.196Z", "changed_at": "2022-08-07T14:01:29.196Z", "remote_deleted_at": null, "users": [{"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "first_name": "John", "last_name": "Doe", "email": "john.doe@kombo.dev"}], "application": {"id": "H77fDF8uvEzGNPRubiz5DvQ7", "remote_id": "32", "outcome": "HIRED", "rejection_reason_name": null, "candidate": {"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "first_name": "John", "last_name": "Doe", "email_addresses": [{"email_address": "john.doe@example.com", "type": "PRIVATE"}]}, "job": {"id": "H5daSm8e85Dmvmne3wLeCPhX", "remote_id": "32", "name": "Backend Engineer"}}}]}} + application/json: {"status": "success", "data": {"next": "eyJwYWdlIjoxMiwibm90ZSI6InRoaXMgaXMganVzdCBhbiBleGFtcGxlIGFuZCBub3QgcmVwcmVzZW50YXRpdmUgZm9yIGEgcmVhbCBjdXJzb3IhIn0=", "results": [{"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "title": "Interview with John Doe", "starting_at": "2023-06-26T14:30:00Z", "ending_at": "2023-06-26T15:30:00Z", "location": {"city": "Berlin", "country": "DE", "raw": "Berlin, Germany", "state": "Berlin", "street_1": "Lohmühlenstraße 65", "street_2": null, "zip_code": "12435"}, "video_conferencing_url": "https://meet.example.com/interview-abc123", "application_id": "H77fDF8uvEzGNPRubiz5DvQ7", "stage_id": "H5daSm8e85Dmvmne3wLeCPhX", "canceled": false, "remote_created_at": "2022-08-07T14:01:29.196Z", "remote_updated_at": "2022-08-07T14:01:29.196Z", "changed_at": "2022-08-07T14:01:29.196Z", "remote_deleted_at": null, "users": [{"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "first_name": "John", "last_name": "Doe", "email": "john.doe@kombo.dev"}], "application": {"id": "H77fDF8uvEzGNPRubiz5DvQ7", "remote_id": "32", "outcome": "HIRED", "rejection_reason_name": null, "candidate": {"id": "26vafvWSRmbhNcxJYqjCzuJg", "remote_id": "32", "first_name": "John", "last_name": "Doe", "email_addresses": [{"email_address": "john.doe@example.com", "type": "PRIVATE"}]}, "job": {"id": "H5daSm8e85Dmvmne3wLeCPhX", "remote_id": "32", "name": "Backend Engineer"}}}]}} Error Response: parameters: query: @@ -7191,7 +7245,38 @@ examples: responses: default: application/json: {"status": "error", "error": {"code": null, "title": null, "message": "The message is always in the response.", "log_url": null}} + PutIntegrationsIntegrationIdEnabled: + Error Response: + parameters: + path: + integration_id: "" + requestBody: + application/json: {"value": false} + responses: + default: + application/json: {"status": "error", "error": {"code": "PLATFORM.TASK_TIMED_OUT", "title": "This data model isn't supported for the selected integration.", "message": "The \"employees\" model is not yet available for Greenhouse. Please reach out to Kombo if you need this functionality.", "log_url": "https://app.kombo.dev/my-prod/logs?interactionId=123456"}} + Minimal Error Response: + parameters: + path: + integration_id: "" + requestBody: + application/json: {"value": false} + responses: + default: + application/json: {"status": "error", "error": {"code": null, "title": null, "message": "The message is always in the response.", "log_url": null}} + speakeasy-default-put-integrations-integration-id-enabled: + parameters: + path: + integration_id: "" + requestBody: + application/json: {"value": false} + responses: + "200": + application/json: {"status": "success", "data": {}} + default: + application/json: {"status": "error", "error": {"code": "PLATFORM.RATE_LIMIT_EXCEEDED", "title": "", "message": "", "log_url": "https://enchanting-barracks.biz/"}} examplesVersion: 1.0.2 +releaseNotes: "## Python SDK Changes:\n* `kombo.general.check_api_key()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.trigger_sync()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.send_passthrough_request()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.delete_integration()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.get_integration_details()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.create_reconnection_link()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.get_integration_fields()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.update_integration_field()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.get_custom_fields()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.update_custom_field_mapping()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.get_tools()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_employees()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_employee_form()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.create_employee_with_form()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.add_employee_document()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_employee_document_categories()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_groups()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_employments()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_locations()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_absence_types()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_time_off_balances()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_absences()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.create_absence()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.delete_absence()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_legal_entities()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_timesheets()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_performance_review_cycles()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.hris.get_performance_reviews()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_applications()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.move_application_to_stage()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.add_application_result_link()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.add_application_note()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_application_attachments()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.add_application_attachment()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.reject_application()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_candidates()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.create_candidate()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_candidate_attachments()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.add_candidate_attachment()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.add_candidate_result_link()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.add_candidate_tag()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.remove_candidate_tag()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_tags()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_application_stages()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_jobs()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.create_application()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_users()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_offers()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_rejection_reasons()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.get_interviews()`: \n * `response.data.results[].video_conferencing_url` **Added**\n * `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.ats.import_tracked_application()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.assessment.get_packages()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.assessment.set_packages()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.assessment.get_open_orders()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.assessment.update_order_result()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.connect.create_connection_link()`: \n * `request.integration_tool` **Changed**\n * `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.connect.get_integration_by_token()`: `error.code.enum(platform.task_timed_out)` **Added** (Breaking ⚠️)\n* `kombo.general.set_integration_enabled()`: **Added**\n" generatedFiles: - .gitattributes - .vscode/settings.json diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 4c661fa..e0447ee 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -13,6 +13,7 @@ generation: requestResponseComponentNamesFeb2024: true securityFeb2025: true sharedErrorComponentsApr2025: true + sharedNestedComponentsJan2026: false auth: oAuth2ClientCredentialsEnabled: true oAuth2PasswordEnabled: true @@ -22,13 +23,14 @@ generation: schemas: allOfMergeStrategy: shallowMerge requestBodyFieldName: body + versioningStrategy: automatic persistentEdits: {} tests: generateTests: false generateNewTests: true skipResponseBodyAssertions: false python: - version: 0.2.3 + version: 0.3.0 additionalDependencies: dev: inline-snapshot: '>=0.13.0' @@ -55,6 +57,8 @@ python: flattenGlobalSecurity: true flattenRequests: true flatteningOrder: parameters-first + forwardCompatibleEnumsByDefault: false + forwardCompatibleUnionsByDefault: "false" imports: option: openapi paths: @@ -80,3 +84,4 @@ python: responseFormat: flat sseFlatResponse: false templateVersion: v2 + useAsyncHooks: false diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index 9efe1b3..9530892 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,21 +1,21 @@ -speakeasyVersion: 1.682.0 +speakeasyVersion: 1.716.0 sources: kombo-prepared-spec: sourceNamespace: kombo-api - sourceRevisionDigest: sha256:48c654f9286267719d593eebbf8a3fe507e5f4a7efa7bd1a7f858085d2a44b82 - sourceBlobDigest: sha256:38b8e0461d7bfad0d8988a4c6e1b5c8edd92e8bd2c33d307e6e7d8dc14fe5096 + sourceRevisionDigest: sha256:2103456dac6ca5fc544377e3a3f1f0586a8a99bf7688cb5b681c7cd3d1da1f90 + sourceBlobDigest: sha256:8068fcb5b56104843223604fcfb5980c6643edd44c47d7f6c75862654cd6951d tags: - latest - - speakeasy-sdk-regen-1767807463 + - speakeasy-sdk-regen-1768004735 - 1.0.0 targets: kombo-python: source: kombo-prepared-spec sourceNamespace: kombo-api - sourceRevisionDigest: sha256:48c654f9286267719d593eebbf8a3fe507e5f4a7efa7bd1a7f858085d2a44b82 - sourceBlobDigest: sha256:38b8e0461d7bfad0d8988a4c6e1b5c8edd92e8bd2c33d307e6e7d8dc14fe5096 + sourceRevisionDigest: sha256:2103456dac6ca5fc544377e3a3f1f0586a8a99bf7688cb5b681c7cd3d1da1f90 + sourceBlobDigest: sha256:8068fcb5b56104843223604fcfb5980c6643edd44c47d7f6c75862654cd6951d codeSamplesNamespace: kombo-api-python-code-samples - codeSamplesRevisionDigest: sha256:7682bd17cea291d385362e948d60c5298d8041512c565f5fa3e864eac979e802 + codeSamplesRevisionDigest: sha256:970a58bb1e910e491aa584532e5b1df80b4ee436a711b68e223e42d32b690801 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README-PYPI.md b/README-PYPI.md index 26bba97..4296379 100644 --- a/README-PYPI.md +++ b/README-PYPI.md @@ -85,7 +85,7 @@ It's also possible to write a standalone Python script without needing to set up ```python #!/usr/bin/env -S uv run --script # /// script -# requires-python = ">=3.9" +# requires-python = ">=3.10" # dependencies = [ # "kombo", # ] @@ -214,6 +214,7 @@ with SDK( * [send_passthrough_request](https://github.com/kombohq/python-sdk/blob/master/docs/sdks/general/README.md#send_passthrough_request) - Send passthrough request * [delete_integration](https://github.com/kombohq/python-sdk/blob/master/docs/sdks/general/README.md#delete_integration) - Delete integration * [get_integration_details](https://github.com/kombohq/python-sdk/blob/master/docs/sdks/general/README.md#get_integration_details) - Get integration details +* [set_integration_enabled](https://github.com/kombohq/python-sdk/blob/master/docs/sdks/general/README.md#set_integration_enabled) - Set integration enabled * [create_reconnection_link](https://github.com/kombohq/python-sdk/blob/master/docs/sdks/general/README.md#create_reconnection_link) - Create reconnection link * [get_integration_fields](https://github.com/kombohq/python-sdk/blob/master/docs/sdks/general/README.md#get_integration_fields) - Get integration fields * [update_integration_field](https://github.com/kombohq/python-sdk/blob/master/docs/sdks/general/README.md#update_integration_field) - Updates an integration fields passthrough setting @@ -330,9 +331,9 @@ with Kombo( **Inherit from [`SDKError`](https://github.com/kombohq/python-sdk/blob/master/./src/kombo/errors/sdkerror.py)**: -* [`KomboAtsError`](https://github.com/kombohq/python-sdk/blob/master/./src/kombo/errors/komboatserror.py): The standard error response with the error codes for the ATS use case. Applicable to 27 of 57 methods.* -* [`KomboHrisError`](https://github.com/kombohq/python-sdk/blob/master/./src/kombo/errors/kombohriserror.py): The standard error response with the error codes for the HRIS use case. Applicable to 17 of 57 methods.* -* [`KomboGeneralError`](https://github.com/kombohq/python-sdk/blob/master/./src/kombo/errors/kombogeneralerror.py): The standard error response with just the platform error codes. Applicable to 13 of 57 methods.* +* [`KomboAtsError`](https://github.com/kombohq/python-sdk/blob/master/./src/kombo/errors/komboatserror.py): The standard error response with the error codes for the ATS use case. Applicable to 27 of 58 methods.* +* [`KomboHrisError`](https://github.com/kombohq/python-sdk/blob/master/./src/kombo/errors/kombohriserror.py): The standard error response with the error codes for the HRIS use case. Applicable to 17 of 58 methods.* +* [`KomboGeneralError`](https://github.com/kombohq/python-sdk/blob/master/./src/kombo/errors/kombogeneralerror.py): The standard error response with just the platform error codes. Applicable to 14 of 58 methods.* * [`ResponseValidationError`](https://github.com/kombohq/python-sdk/blob/master/./src/kombo/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/README.md b/README.md index 2b8aefc..45c6f99 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,7 @@ It's also possible to write a standalone Python script without needing to set up ```python #!/usr/bin/env -S uv run --script # /// script -# requires-python = ">=3.9" +# requires-python = ">=3.10" # dependencies = [ # "kombo", # ] @@ -214,6 +214,7 @@ with SDK( * [send_passthrough_request](docs/sdks/general/README.md#send_passthrough_request) - Send passthrough request * [delete_integration](docs/sdks/general/README.md#delete_integration) - Delete integration * [get_integration_details](docs/sdks/general/README.md#get_integration_details) - Get integration details +* [set_integration_enabled](docs/sdks/general/README.md#set_integration_enabled) - Set integration enabled * [create_reconnection_link](docs/sdks/general/README.md#create_reconnection_link) - Create reconnection link * [get_integration_fields](docs/sdks/general/README.md#get_integration_fields) - Get integration fields * [update_integration_field](docs/sdks/general/README.md#update_integration_field) - Updates an integration fields passthrough setting @@ -330,9 +331,9 @@ with Kombo( **Inherit from [`SDKError`](./src/kombo/errors/sdkerror.py)**: -* [`KomboAtsError`](./src/kombo/errors/komboatserror.py): The standard error response with the error codes for the ATS use case. Applicable to 27 of 57 methods.* -* [`KomboHrisError`](./src/kombo/errors/kombohriserror.py): The standard error response with the error codes for the HRIS use case. Applicable to 17 of 57 methods.* -* [`KomboGeneralError`](./src/kombo/errors/kombogeneralerror.py): The standard error response with just the platform error codes. Applicable to 13 of 57 methods.* +* [`KomboAtsError`](./src/kombo/errors/komboatserror.py): The standard error response with the error codes for the ATS use case. Applicable to 27 of 58 methods.* +* [`KomboHrisError`](./src/kombo/errors/kombohriserror.py): The standard error response with the error codes for the HRIS use case. Applicable to 17 of 58 methods.* +* [`KomboGeneralError`](./src/kombo/errors/kombogeneralerror.py): The standard error response with just the platform error codes. Applicable to 14 of 58 methods.* * [`ResponseValidationError`](./src/kombo/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute. diff --git a/RELEASES.md b/RELEASES.md index b7fe23d..fbae77a 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -98,4 +98,14 @@ Based on: ### Generated - [python v0.2.3] . ### Releases -- [PyPI v0.2.3] https://pypi.org/project/kombo/0.2.3 - . \ No newline at end of file +- [PyPI v0.2.3] https://pypi.org/project/kombo/0.2.3 - . + +## 2026-02-14 00:31:40 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.716.0 (2.823.1) https://github.com/speakeasy-api/speakeasy +### Generated +- [python v0.3.0] . +### Releases +- [PyPI v0.3.0] https://pypi.org/project/kombo/0.3.0 - . \ No newline at end of file diff --git a/docs/models/assessmentorderreceivedwebhookpayloadjob.md b/docs/models/assessmentorderreceivedwebhookpayloadjob.md index 20a1e33..e3cce9e 100644 --- a/docs/models/assessmentorderreceivedwebhookpayloadjob.md +++ b/docs/models/assessmentorderreceivedwebhookpayloadjob.md @@ -10,4 +10,4 @@ Information about the job posting. | `remote_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The job's identifier in the integrated system. | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title. | | `location` | [OptionalNullable[models.AssessmentOrderReceivedWebhookPayloadLocation]](../models/assessmentorderreceivedwebhookpayloadlocation.md) | :heavy_minus_sign: | The job location information. | -| `hiring_team` | List[[models.AssessmentOrderReceivedWebhookPayloadHiringTeam](../models/assessmentorderreceivedwebhookpayloadhiringteam.md)] | :heavy_check_mark: | The hiring team allows you to sync users into your system who can access the job and its applications. | \ No newline at end of file +| `hiring_team` | List[[models.AssessmentOrderReceivedWebhookPayloadHiringTeam](../models/assessmentorderreceivedwebhookpayloadhiringteam.md)] | :heavy_check_mark: | The hiring team allows you to provision users into your system who can access the job and its applications. | \ No newline at end of file diff --git a/docs/models/getassessmentordersopenpositiveresponsejob.md b/docs/models/getassessmentordersopenpositiveresponsejob.md index fb986ab..db9f8ca 100644 --- a/docs/models/getassessmentordersopenpositiveresponsejob.md +++ b/docs/models/getassessmentordersopenpositiveresponsejob.md @@ -10,4 +10,4 @@ Information about the job posting. | `remote_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The job's identifier in the integrated system. | 67890 | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title. | Engineering Manager | | `location` | [OptionalNullable[models.GetAssessmentOrdersOpenPositiveResponseLocation]](../models/getassessmentordersopenpositiveresponselocation.md) | :heavy_minus_sign: | The job location information. | | -| `hiring_team` | List[[models.GetAssessmentOrdersOpenPositiveResponseHiringTeam](../models/getassessmentordersopenpositiveresponsehiringteam.md)] | :heavy_check_mark: | The hiring team allows you to sync users into your system who can access the job and its applications. | | \ No newline at end of file +| `hiring_team` | List[[models.GetAssessmentOrdersOpenPositiveResponseHiringTeam](../models/getassessmentordersopenpositiveresponsehiringteam.md)] | :heavy_check_mark: | The hiring team allows you to provision users into your system who can access the job and its applications. | | \ No newline at end of file diff --git a/docs/models/getatsinterviewspositiveresponse.md b/docs/models/getatsinterviewspositiveresponse.md index 9b7ddc0..62d0a1a 100644 --- a/docs/models/getatsinterviewspositiveresponse.md +++ b/docs/models/getatsinterviewspositiveresponse.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | Example | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `status` | *Literal["success"]* | :heavy_check_mark: | N/A | | -| `data` | [models.GetAtsInterviewsPositiveResponseData](../models/getatsinterviewspositiveresponsedata.md) | :heavy_check_mark: | N/A | {
"next": "eyJwYWdlIjoxMiwibm90ZSI6InRoaXMgaXMganVzdCBhbiBleGFtcGxlIGFuZCBub3QgcmVwcmVzZW50YXRpdmUgZm9yIGEgcmVhbCBjdXJzb3IhIn0=",
"results": [
{
"id": "26vafvWSRmbhNcxJYqjCzuJg",
"remote_id": "32",
"title": "Interview with John Doe",
"starting_at": "2023-06-26T14:30:00Z",
"ending_at": "2023-06-26T15:30:00Z",
"location": {
"city": "Berlin",
"country": "DE",
"raw": "Berlin, Germany",
"state": "Berlin",
"street_1": "Lohmühlenstraße 65",
"street_2": null,
"zip_code": "12435"
},
"application_id": "H77fDF8uvEzGNPRubiz5DvQ7",
"stage_id": "H5daSm8e85Dmvmne3wLeCPhX",
"canceled": false,
"remote_created_at": "2022-08-07T14:01:29.196Z",
"remote_updated_at": "2022-08-07T14:01:29.196Z",
"remote_data": null,
"changed_at": "2022-08-07T14:01:29.196Z",
"remote_deleted_at": null,
"users": [
{
"id": "26vafvWSRmbhNcxJYqjCzuJg",
"remote_id": "32",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@kombo.dev"
}
],
"application": {
"id": "H77fDF8uvEzGNPRubiz5DvQ7",
"remote_id": "32",
"outcome": "HIRED",
"rejection_reason_name": null,
"candidate": {
"id": "26vafvWSRmbhNcxJYqjCzuJg",
"remote_id": "32",
"first_name": "John",
"last_name": "Doe",
"email_addresses": [
{
"email_address": "john.doe@example.com",
"type": "PRIVATE"
}
]
},
"job": {
"id": "H5daSm8e85Dmvmne3wLeCPhX",
"remote_id": "32",
"name": "Backend Engineer"
}
}
}
]
} | \ No newline at end of file +| Field | Type | Required | Description | Example | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| `status` | *Literal["success"]* | :heavy_check_mark: | N/A | | +| `data` | [models.GetAtsInterviewsPositiveResponseData](../models/getatsinterviewspositiveresponsedata.md) | :heavy_check_mark: | N/A | {
"next": "eyJwYWdlIjoxMiwibm90ZSI6InRoaXMgaXMganVzdCBhbiBleGFtcGxlIGFuZCBub3QgcmVwcmVzZW50YXRpdmUgZm9yIGEgcmVhbCBjdXJzb3IhIn0=",
"results": [
{
"id": "26vafvWSRmbhNcxJYqjCzuJg",
"remote_id": "32",
"title": "Interview with John Doe",
"starting_at": "2023-06-26T14:30:00Z",
"ending_at": "2023-06-26T15:30:00Z",
"location": {
"city": "Berlin",
"country": "DE",
"raw": "Berlin, Germany",
"state": "Berlin",
"street_1": "Lohmühlenstraße 65",
"street_2": null,
"zip_code": "12435"
},
"video_conferencing_url": "https://meet.example.com/interview-abc123",
"application_id": "H77fDF8uvEzGNPRubiz5DvQ7",
"stage_id": "H5daSm8e85Dmvmne3wLeCPhX",
"canceled": false,
"remote_created_at": "2022-08-07T14:01:29.196Z",
"remote_updated_at": "2022-08-07T14:01:29.196Z",
"remote_data": null,
"changed_at": "2022-08-07T14:01:29.196Z",
"remote_deleted_at": null,
"users": [
{
"id": "26vafvWSRmbhNcxJYqjCzuJg",
"remote_id": "32",
"first_name": "John",
"last_name": "Doe",
"email": "john.doe@kombo.dev"
}
],
"application": {
"id": "H77fDF8uvEzGNPRubiz5DvQ7",
"remote_id": "32",
"outcome": "HIRED",
"rejection_reason_name": null,
"candidate": {
"id": "26vafvWSRmbhNcxJYqjCzuJg",
"remote_id": "32",
"first_name": "John",
"last_name": "Doe",
"email_addresses": [
{
"email_address": "john.doe@example.com",
"type": "PRIVATE"
}
]
},
"job": {
"id": "H5daSm8e85Dmvmne3wLeCPhX",
"remote_id": "32",
"name": "Backend Engineer"
}
}
}
]
} | \ No newline at end of file diff --git a/docs/models/getatsinterviewspositiveresponseresult.md b/docs/models/getatsinterviewspositiveresponseresult.md index 105526e..fd6cd14 100644 --- a/docs/models/getatsinterviewspositiveresponseresult.md +++ b/docs/models/getatsinterviewspositiveresponseresult.md @@ -11,6 +11,7 @@ | `starting_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The start time of the interview.

[](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) | | `ending_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The end time of the interview.

[](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) | | `location` | [OptionalNullable[models.GetAtsInterviewsPositiveResponseLocation]](../models/getatsinterviewspositiveresponselocation.md) | :heavy_minus_sign: | Location of the interview. | +| `video_conferencing_url` | *Nullable[str]* | :heavy_check_mark: | The URL of the video conferencing platform used for the interview. | | `application_id` | *Nullable[str]* | :heavy_check_mark: | The Kombo ID of the application this interview belongs to. The ID can be used to retrieve the application from the `get applications` endpoint. | | `stage_id` | *Nullable[str]* | :heavy_check_mark: | If a system specifies to which stage this interview belongs to, this field will be the Kombo ID of the application stage. The ID can be used to retrieve the stage from the `get application stages` endpoint. | | `canceled` | *Nullable[bool]* | :heavy_check_mark: | Whether the interview was canceled or not. If we have no information, this field will be `null`. | diff --git a/docs/models/gethrisperformancereviewspositiveresponseresult.md b/docs/models/gethrisperformancereviewspositiveresponseresult.md index 68c495d..a914ac6 100644 --- a/docs/models/gethrisperformancereviewspositiveresponseresult.md +++ b/docs/models/gethrisperformancereviewspositiveresponseresult.md @@ -12,6 +12,6 @@ | `summary_rating` | [OptionalNullable[models.SummaryRating]](../models/summaryrating.md) | :heavy_minus_sign: | The summary rating of the performance review. | | | `changed_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The timestamp when this specific record was last modified. This field only updates when properties directly on this record change, NOT when related or nested models change. For filtering that considers nested data changes, use the `updated_after` parameter which will return records when either the record itself OR its related models have been updated.

[](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) | | | `remote_deleted_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | The date and time the object was deleted in the remote system. Objects are automatically marked as deleted when Kombo can't retrieve them from the remote system anymore. Kombo will also anonymize entries 14 days after they disappear.

[](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) | | -| `reviewee` | [models.Reviewee](../models/reviewee.md) | :heavy_check_mark: | The employee receiving the review. | {
"id": "26vafvWSRmbhNcxJYqjCzuJg",
"remote_id": "32",
"first_name": "John",
"last_name": "Doe",
"display_full_name": "John Doe",
"work_email": "john.doe@acme.com",
"remote_deleted_at": null
} | +| `reviewee` | [models.Reviewee](../models/reviewee.md) | :heavy_check_mark: | The employee receiving the review. | **Example 1:** {
"id": "26vafvWSRmbhNcxJYqjCzuJg",
"remote_id": "32",
"first_name": "John",
"last_name": "Doe",
"display_full_name": "John Doe",
"work_email": "john.doe@acme.com",
"remote_deleted_at": null
}
**Example 2:** {
"id": "26vafvWSRmbhNcxJYqjCzuJg",
"remote_id": "32",
"first_name": "John",
"last_name": "Doe",
"display_full_name": "John Doe",
"work_email": "john.doe@acme.com",
"remote_deleted_at": null
} | | `reviewer` | [Nullable[models.Reviewer]](../models/reviewer.md) | :heavy_check_mark: | The employee giving/writing the review. | {
"id": "4EeSSSd9Fr8iiW9mPKmjEVWK",
"remote_id": "1024",
"first_name": "Peter",
"last_name": "Doe",
"display_full_name": "Peter Doe",
"work_email": "peter.doe@acme.com",
"remote_deleted_at": null
} | | `review_cycle` | [Nullable[models.ReviewCycle]](../models/reviewcycle.md) | :heavy_check_mark: | N/A | {
"id": "4B9bKBpX5tnwjiG93TAqF7ci",
"remote_id": "1",
"name": "2025 Annual Performance Review Cycle",
"review_period_start_date": "2025-01-01T00:00:00Z",
"changed_at": "2022-08-07T14:01:29.196Z",
"remote_deleted_at": null,
"remote_data": null
} | \ No newline at end of file diff --git a/docs/models/getintegrationsintegrationidpositiveresponsecoveragestatus.md b/docs/models/getintegrationsintegrationidpositiveresponsecoveragestatus.md deleted file mode 100644 index 822b5cc..0000000 --- a/docs/models/getintegrationsintegrationidpositiveresponsecoveragestatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetIntegrationsIntegrationIDPositiveResponseCoverageStatus - -The status of a datapoint of an integrated tool: - -- `SUPPORTED`: the tool supports the datapoint and it can be used through Kombo. -- `UNSUPPORTED`: the tool does not support the datapoint. -- `NOT_IMPLEMENTED`: tool supports the datapoint but it was not integrated by Kombo for a given reason (see coverage grid). -- `UNKNOWN`: the datapoint is not integrated yet and Kombo has no information about it's availability in the tool. - - -## Values - -| Name | Value | -| ----------------- | ----------------- | -| `SUPPORTED` | SUPPORTED | -| `UNSUPPORTED` | UNSUPPORTED | -| `NOT_IMPLEMENTED` | NOT_IMPLEMENTED | -| `UNKNOWN` | UNKNOWN | \ No newline at end of file diff --git a/docs/models/getintegrationsintegrationidpositiveresponsefield.md b/docs/models/getintegrationsintegrationidpositiveresponsefield.md deleted file mode 100644 index b8ee8ab..0000000 --- a/docs/models/getintegrationsintegrationidpositiveresponsefield.md +++ /dev/null @@ -1,12 +0,0 @@ -# GetIntegrationsIntegrationIDPositiveResponseField - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Key of the field in the API (e.g. first_name). | -| `is_available` | *bool* | :heavy_check_mark: | Whether the datapoint is available and enabled and not opted out of. | -| `coverage_status` | [models.GetIntegrationsIntegrationIDPositiveResponseFieldCoverageStatus](../models/getintegrationsintegrationidpositiveresponsefieldcoveragestatus.md) | :heavy_check_mark: | The status of a datapoint of an integrated tool:

- `SUPPORTED`: the tool supports the datapoint and it can be used through Kombo.
- `UNSUPPORTED`: the tool does not support the datapoint.
- `NOT_IMPLEMENTED`: tool supports the datapoint but it was not integrated by Kombo for a given reason (see coverage grid).
- `UNKNOWN`: the datapoint is not integrated yet and Kombo has no information about it's availability in the tool. | -| `scope_config_setting` | [models.FieldScopeConfigSetting](../models/fieldscopeconfigsetting.md) | :heavy_check_mark: | The setting of the datapoint in the scope config that you configured in the Kombo dashboard. | -| `opted_out_by_customer` | *bool* | :heavy_check_mark: | Whether the datapoint is opted out by your customer in the connection flow. | \ No newline at end of file diff --git a/docs/models/getintegrationsintegrationidpositiveresponsefieldcoveragestatus.md b/docs/models/getintegrationsintegrationidpositiveresponsefieldcoveragestatus.md deleted file mode 100644 index 31c3ac1..0000000 --- a/docs/models/getintegrationsintegrationidpositiveresponsefieldcoveragestatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetIntegrationsIntegrationIDPositiveResponseFieldCoverageStatus - -The status of a datapoint of an integrated tool: - -- `SUPPORTED`: the tool supports the datapoint and it can be used through Kombo. -- `UNSUPPORTED`: the tool does not support the datapoint. -- `NOT_IMPLEMENTED`: tool supports the datapoint but it was not integrated by Kombo for a given reason (see coverage grid). -- `UNKNOWN`: the datapoint is not integrated yet and Kombo has no information about it's availability in the tool. - - -## Values - -| Name | Value | -| ----------------- | ----------------- | -| `SUPPORTED` | SUPPORTED | -| `UNSUPPORTED` | UNSUPPORTED | -| `NOT_IMPLEMENTED` | NOT_IMPLEMENTED | -| `UNKNOWN` | UNKNOWN | \ No newline at end of file diff --git a/docs/models/gettoolscategorypositiveresponsefield.md b/docs/models/gettoolscategorypositiveresponsefield.md deleted file mode 100644 index 6b4a49c..0000000 --- a/docs/models/gettoolscategorypositiveresponsefield.md +++ /dev/null @@ -1,9 +0,0 @@ -# GetToolsCategoryPositiveResponseField - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | Key of the field in the model (e.g. first_name). | -| `coverage_status` | [models.GetToolsCategoryPositiveResponseFieldCoverageStatus](../models/gettoolscategorypositiveresponsefieldcoveragestatus.md) | :heavy_check_mark: | The status of a datapoint of an integrated tool:

- `SUPPORTED`: the tool supports the datapoint and it can be used through Kombo.
- `UNSUPPORTED`: the tool does not support the datapoint.
- `NOT_IMPLEMENTED`: tool supports the datapoint but it was not integrated by Kombo for a given reason (see coverage grid).
- `UNKNOWN`: the datapoint is not integrated yet and Kombo has no information about it's availability in the tool. | \ No newline at end of file diff --git a/docs/models/gettoolscategorypositiveresponsefieldcoveragestatus.md b/docs/models/gettoolscategorypositiveresponsefieldcoveragestatus.md deleted file mode 100644 index 25524a3..0000000 --- a/docs/models/gettoolscategorypositiveresponsefieldcoveragestatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# GetToolsCategoryPositiveResponseFieldCoverageStatus - -The status of a datapoint of an integrated tool: - -- `SUPPORTED`: the tool supports the datapoint and it can be used through Kombo. -- `UNSUPPORTED`: the tool does not support the datapoint. -- `NOT_IMPLEMENTED`: tool supports the datapoint but it was not integrated by Kombo for a given reason (see coverage grid). -- `UNKNOWN`: the datapoint is not integrated yet and Kombo has no information about it's availability in the tool. - - -## Values - -| Name | Value | -| ----------------- | ----------------- | -| `SUPPORTED` | SUPPORTED | -| `UNSUPPORTED` | UNSUPPORTED | -| `NOT_IMPLEMENTED` | NOT_IMPLEMENTED | -| `UNKNOWN` | UNKNOWN | \ No newline at end of file diff --git a/docs/models/inlineassessmentorderreceivedwebhookpayloadjob.md b/docs/models/inlineassessmentorderreceivedwebhookpayloadjob.md index fa5527d..509c8dd 100644 --- a/docs/models/inlineassessmentorderreceivedwebhookpayloadjob.md +++ b/docs/models/inlineassessmentorderreceivedwebhookpayloadjob.md @@ -10,4 +10,4 @@ Information about the job posting. | `remote_id` | *OptionalNullable[str]* | :heavy_minus_sign: | The job's identifier in the integrated system. | | `name` | *OptionalNullable[str]* | :heavy_minus_sign: | The job title. | | `location` | [OptionalNullable[models.InlineAssessmentOrderReceivedWebhookPayloadLocation]](../models/inlineassessmentorderreceivedwebhookpayloadlocation.md) | :heavy_minus_sign: | The job location information. | -| `hiring_team` | List[[models.InlineAssessmentOrderReceivedWebhookPayloadHiringTeam](../models/inlineassessmentorderreceivedwebhookpayloadhiringteam.md)] | :heavy_check_mark: | The hiring team allows you to sync users into your system who can access the job and its applications. | \ No newline at end of file +| `hiring_team` | List[[models.InlineAssessmentOrderReceivedWebhookPayloadHiringTeam](../models/inlineassessmentorderreceivedwebhookpayloadhiringteam.md)] | :heavy_check_mark: | The hiring team allows you to provision users into your system who can access the job and its applications. | \ No newline at end of file diff --git a/docs/models/integrationstatechangedwebhookpayloaddata.md b/docs/models/integrationstatechangedwebhookpayloaddata.md index dbfe419..ae458e3 100644 --- a/docs/models/integrationstatechangedwebhookpayloaddata.md +++ b/docs/models/integrationstatechangedwebhookpayloaddata.md @@ -10,5 +10,6 @@ | `integration_category` | [models.IntegrationStateChangedWebhookPayloadIntegrationCategory](../models/integrationstatechangedwebhookpayloadintegrationcategory.md) | :heavy_check_mark: | The category of the integration (HRIS, ATS, ASSESSMENT, or LMS). | | `end_user` | [models.IntegrationStateChangedWebhookPayloadEndUser](../models/integrationstatechangedwebhookpayloadenduser.md) | :heavy_check_mark: | Information about the end user who created the integration. | | `qa_status` | [models.QaStatus](../models/qastatus.md) | :heavy_check_mark: | The quality assurance status of the integration. | +| `setup_status` | [models.IntegrationStateChangedWebhookPayloadSetupStatus](../models/integrationstatechangedwebhookpayloadsetupstatus.md) | :heavy_check_mark: | The current status of an integration that has filtering, field mapping features or required setup steps. | | `state` | [models.State](../models/state.md) | :heavy_check_mark: | The current state of the integration. | | `updated_at` | [date](https://docs.python.org/3/library/datetime.html#date-objects) | :heavy_check_mark: | ISO 8601 timestamp when the integration state was last updated. | \ No newline at end of file diff --git a/docs/models/integrationstatechangedwebhookpayloadsetupstatus.md b/docs/models/integrationstatechangedwebhookpayloadsetupstatus.md new file mode 100644 index 0000000..c2afdf3 --- /dev/null +++ b/docs/models/integrationstatechangedwebhookpayloadsetupstatus.md @@ -0,0 +1,12 @@ +# IntegrationStateChangedWebhookPayloadSetupStatus + +The current status of an integration that has filtering, field mapping features or required setup steps. + + +## Values + +| Name | Value | +| -------------------- | -------------------- | +| `INCOMPLETE` | INCOMPLETE | +| `FINAL_SYNC_PENDING` | FINAL_SYNC_PENDING | +| `COMPLETED` | COMPLETED | \ No newline at end of file diff --git a/docs/models/integrationtool.md b/docs/models/integrationtool.md index 542a4fa..732b1f9 100644 --- a/docs/models/integrationtool.md +++ b/docs/models/integrationtool.md @@ -5,178 +5,184 @@ Pre-define a tool this integration link can be used for. ## Values -| Name | Value | -| ------------------------- | ------------------------- | -| `WORKDAY` | workday | -| `SUCCESSFACTORS` | successfactors | -| `SMARTRECRUITERS` | smartrecruiters | -| `FACTORIAL` | factorial | -| `ORACLERECRUITING` | oraclerecruiting | -| `LEVER` | lever | -| `ICIMS` | icims | -| `CORNERSTONETALENTLINK` | cornerstonetalentlink | -| `RECRUITEE` | recruitee | -| `RECRUITERFLOW` | recruiterflow | -| `GREENHOUSE` | greenhouse | -| `GREENHOUSEJOBBOARD` | greenhousejobboard | -| `TEAMTAILOR` | teamtailor | -| `TEAMTAILORJOBBOARDS` | teamtailorjobboards | -| `ASHBY` | ashby | -| `TALENTSOFT` | talentsoft | -| `TALENTSOFTCUSTOMER` | talentsoftcustomer | -| `CONCLUDIS` | concludis | -| `TALENTION` | talention | -| `PILOGA` | piloga | -| `ONLYFY` | onlyfy | -| `PERSONIO` | personio | -| `UKGPRO` | ukgpro | -| `UKGREADY` | ukgready | -| `ADPWORKFORCENOW` | adpworkforcenow | -| `TALEO` | taleo | -| `REXX` | rexx | -| `AFAS` | afas | -| `BAMBOOHR` | bamboohr | -| `BULLHORN` | bullhorn | -| `BULLHORNLOGIN` | bullhornlogin | -| `WORKABLE` | workable | -| `JOBVITE` | jobvite | -| `FOUNTAIN` | fountain | -| `SOFTGARDEN` | softgarden | -| `SOFTGARDENPARTNER` | softgardenpartner | -| `PINPOINT` | pinpoint | -| `WELCOMETOTHEJUNGLE` | welcometothejungle | -| `DVINCI` | dvinci | -| `DVINCIADMIN` | dvinciadmin | -| `JOIN` | join | -| `SAGEHR` | sagehr | -| `TRAFFIT` | traffit | -| `ERECRUITER` | erecruiter | -| `ABACUSUMANTIS` | abacusumantis | -| `UMANTIS` | umantis | -| `JOBYLON` | jobylon | -| `TALEEZ` | taleez | -| `HRWORKS` | hrworks | -| `OTYS` | otys | -| `ZOHORECRUIT` | zohorecruit | -| `CEIPAL` | ceipal | -| `EPLOY` | eploy | -| `JOBDIVA` | jobdiva | -| `CAREERPLUG` | careerplug | -| `PERVIEW` | perview | -| `EIGHTFOLD` | eightfold | -| `PAYLOCITY` | paylocity | -| `PAYCOR` | paycor | -| `AVATURE` | avature | -| `APPLOI` | apploi | -| `PHENOM` | phenom | -| `PARADOX` | paradox | -| `HEYRECRUIT` | heyrecruit | -| `RECRUHR` | recruhr | -| `JAZZHR` | jazzhr | -| `BITE` | bite | -| `HOMERUN` | homerun | -| `MYSOLUTION` | mysolution | -| `CARERIX` | carerix | -| `HROFFICE` | hroffice | -| `TALENTCLUE` | talentclue | -| `INRECRUITING` | inrecruiting | -| `UBEEO` | ubeeo | -| `CONNEXYS` | connexys | -| `HR4YOU` | hr4you | -| `CORNERSTONEONDEMAND` | cornerstoneondemand | -| `ZVOOVERECRUIT` | zvooverecruit | -| `COMEET` | comeet | -| `COMPLEET` | compleet | -| `COMPLEETPITCHER` | compleetpitcher | -| `GEM` | gem | -| `LAURA` | laura | -| `COVETOREST` | covetorest | -| `COVETO` | coveto | -| `CRELATE` | crelate | -| `MANATAL` | manatal | -| `AVIONTE` | avionte | -| `MHMHR` | mhmhr | -| `ASYMBL` | asymbl | -| `BREEZYHR` | breezyhr | -| `FLATCHR` | flatchr | -| `APPLICANTSTACK` | applicantstack | -| `REACHMEE` | reachmee | -| `TALENTADORE` | talentadore | -| `SANDBOX` | sandbox | -| `GUIDECOM` | guidecom | -| `WORKDAYCUSTOMREPORT` | workdaycustomreport | -| `WORKDAYCUSTOMREPORTSFTP` | workdaycustomreportsftp | -| `PAYFITCUSTOMER` | payfitcustomer | -| `PAYFITPARTNER` | payfitpartner | -| `PAYFIT` | payfit | -| `EMPLOYMENTHERO` | employmenthero | -| `FOURTH` | fourth | -| `KENJO` | kenjo | -| `HEAVENHR` | heavenhr | -| `HIBOB` | hibob | -| `CEZANNEHR` | cezannehr | -| `ENTRAID` | entraid | -| `AZUREAD` | azuread | -| `GOOGLEWORKSPACE` | googleworkspace | -| `NMBRS` | nmbrs | -| `DEEL` | deel | -| `REMOTECOM` | remotecom | -| `IRISCASCADE` | iriscascade | -| `OKTA` | okta | -| `SAGEPEOPLE` | sagepeople | -| `HUMAANS` | humaans | -| `EURECIA` | eurecia | -| `ORACLEHCM` | oraclehcm | -| `OFFICIENT` | officient | -| `SESAMEHR` | sesamehr | -| `CHARLIEHR` | charliehr | -| `ABACUS` | abacus | -| `ZOHOPEOPLE` | zohopeople | -| `GUSTO` | gusto | -| `BREATHEHR` | breathehr | -| `CATALYSTONE` | catalystone | -| `MIRUS` | mirus | -| `ALEXISHR` | alexishr | -| `SIMPLOYER` | simployer | -| `PEPLE` | peple | -| `YOUSERVE` | youserve | -| `DAYFORCE` | dayforce | -| `HANSALOG` | hansalog | -| `LATTICE` | lattice | -| `HOORAYHR` | hoorayhr | -| `TRINET` | trinet | -| `NAMELY` | namely | -| `PAYCOM` | paycom | -| `INSPERITY` | insperity | -| `PAYCHEX` | paychex | -| `RIPPLING` | rippling | -| `SAPLING` | sapling | -| `PEOPLEHR` | peoplehr | -| `LUCCA` | lucca | -| `ZELT` | zelt | -| `PLANDAY` | planday | -| `BOONDMANAGER` | boondmanager | -| `HAILEYHR` | haileyhr | -| `SILAE` | silae | -| `OYSTERHR` | oysterhr | -| `KIWIHR` | kiwihr | -| `SQUARE` | square | -| `PERBILITYHELIX` | perbilityhelix | -| `LEAPSOME` | leapsome | -| `LOKET` | loket | -| `WORKFORCECOM` | workforcecom | -| `PEOPLEFIRST` | peoplefirst | -| `SDWORX` | sdworx | -| `ITRENT` | itrent | -| `ABSENCEIO` | absenceio | -| `A3INNUVANOMINA` | a3innuvanomina | -| `SCIM` | scim | -| `DATEVHR` | datevhr | -| `DATEV` | datev | -| `DATEVLUG` | datevlug | -| `SYMPA` | sympa | -| `YOUFORCE` | youforce | -| `NIBELIS` | nibelis | -| `PEOPLEXD` | peoplexd | -| `SFTP` | sftp | -| `SFTPFETCH` | sftpfetch | \ No newline at end of file +| Name | Value | +| --------------------------------- | --------------------------------- | +| `WORKDAY` | workday | +| `SUCCESSFACTORS` | successfactors | +| `SMARTRECRUITERS` | smartrecruiters | +| `FACTORIAL` | factorial | +| `ORACLERECRUITING` | oraclerecruiting | +| `LEVER` | lever | +| `ICIMS` | icims | +| `CORNERSTONETALENTLINK` | cornerstonetalentlink | +| `RECRUITEE` | recruitee | +| `RECRUITERFLOW` | recruiterflow | +| `GREENHOUSE` | greenhouse | +| `GREENHOUSEJOBBOARD` | greenhousejobboard | +| `TEAMTAILOR` | teamtailor | +| `TEAMTAILORJOBBOARDS` | teamtailorjobboards | +| `ASHBY` | ashby | +| `TALENTSOFT` | talentsoft | +| `TALENTSOFTCUSTOMER` | talentsoftcustomer | +| `CONCLUDIS` | concludis | +| `TALENTION` | talention | +| `PILOGA` | piloga | +| `ONLYFY` | onlyfy | +| `PERSONIO` | personio | +| `UKGPRO` | ukgpro | +| `UKGREADY` | ukgready | +| `ADPWORKFORCENOW` | adpworkforcenow | +| `TALEO` | taleo | +| `REXX` | rexx | +| `AFAS` | afas | +| `BAMBOOHR` | bamboohr | +| `BULLHORN` | bullhorn | +| `BULLHORNLOGIN` | bullhornlogin | +| `WORKABLE` | workable | +| `JOBVITE` | jobvite | +| `FOUNTAIN` | fountain | +| `SOFTGARDEN` | softgarden | +| `SOFTGARDENPARTNER` | softgardenpartner | +| `PINPOINT` | pinpoint | +| `WELCOMETOTHEJUNGLE` | welcometothejungle | +| `DVINCI` | dvinci | +| `DVINCIADMIN` | dvinciadmin | +| `JOIN` | join | +| `SAGEHR` | sagehr | +| `TRAFFIT` | traffit | +| `ERECRUITER` | erecruiter | +| `ABACUSUMANTIS` | abacusumantis | +| `UMANTIS` | umantis | +| `JOBYLON` | jobylon | +| `TALEEZ` | taleez | +| `HRWORKS` | hrworks | +| `OTYS` | otys | +| `ZOHORECRUIT` | zohorecruit | +| `CEIPAL` | ceipal | +| `EPLOY` | eploy | +| `JOBDIVA` | jobdiva | +| `CAREERPLUG` | careerplug | +| `PERVIEW` | perview | +| `EIGHTFOLD` | eightfold | +| `PAYLOCITY` | paylocity | +| `PAYCOR` | paycor | +| `AVATURE` | avature | +| `APPLOI` | apploi | +| `PHENOM` | phenom | +| `PARADOX` | paradox | +| `HEYRECRUIT` | heyrecruit | +| `RECRUHR` | recruhr | +| `JAZZHR` | jazzhr | +| `BITE` | bite | +| `HOMERUN` | homerun | +| `MYSOLUTION` | mysolution | +| `CARERIX` | carerix | +| `HROFFICE` | hroffice | +| `TALENTCLUE` | talentclue | +| `INRECRUITING` | inrecruiting | +| `UBEEO` | ubeeo | +| `CONNEXYS` | connexys | +| `HR4YOU` | hr4you | +| `CORNERSTONEONDEMAND` | cornerstoneondemand | +| `ZVOOVERECRUIT` | zvooverecruit | +| `ODOO` | odoo | +| `COMEET` | comeet | +| `COMPLEET` | compleet | +| `COMPLEETPITCHER` | compleetpitcher | +| `GEM` | gem | +| `LAURA` | laura | +| `COVETOREST` | covetorest | +| `COVETO` | coveto | +| `CRELATE` | crelate | +| `MANATAL` | manatal | +| `AVIONTE` | avionte | +| `MHMHR` | mhmhr | +| `ASYMBL` | asymbl | +| `BREEZYHR` | breezyhr | +| `FLATCHR` | flatchr | +| `DAYFORCE` | dayforce | +| `APPLICANTSTACK` | applicantstack | +| `REACHMEE` | reachmee | +| `TALENTADORE` | talentadore | +| `SANDBOX` | sandbox | +| `GUIDECOM` | guidecom | +| `SPOTT` | spott | +| `LOXO` | loxo | +| `WORKDAYCUSTOMREPORT` | workdaycustomreport | +| `WORKDAYCUSTOMREPORTSFTP` | workdaycustomreportsftp | +| `PAYFITCUSTOMER` | payfitcustomer | +| `PAYFITPARTNER` | payfitpartner | +| `PAYFIT` | payfit | +| `EMPLOYMENTHERO` | employmenthero | +| `FOURTH` | fourth | +| `KENJO` | kenjo | +| `HEAVENHR` | heavenhr | +| `HIBOB` | hibob | +| `CEZANNEHR` | cezannehr | +| `ENTRAID` | entraid | +| `AZUREAD` | azuread | +| `GOOGLEWORKSPACE` | googleworkspace | +| `NMBRS` | nmbrs | +| `DEEL` | deel | +| `REMOTECOM` | remotecom | +| `IRISCASCADE` | iriscascade | +| `OKTA` | okta | +| `SAGEPEOPLE` | sagepeople | +| `HUMAANS` | humaans | +| `EURECIA` | eurecia | +| `ORACLEHCM` | oraclehcm | +| `OFFICIENT` | officient | +| `SESAMEHR` | sesamehr | +| `CHARLIEHR` | charliehr | +| `ABACUS` | abacus | +| `ZOHOPEOPLE` | zohopeople | +| `GUSTO` | gusto | +| `BREATHEHR` | breathehr | +| `CATALYSTONE` | catalystone | +| `MIRUS` | mirus | +| `ALEXISHR` | alexishr | +| `SIMPLOYER` | simployer | +| `PEPLE` | peple | +| `YOUSERVE` | youserve | +| `HANSALOG` | hansalog | +| `LATTICE` | lattice | +| `LATTICETALENT` | latticetalent | +| `HOORAYHR` | hoorayhr | +| `TRINET` | trinet | +| `NAMELY` | namely | +| `PAYCOM` | paycom | +| `INSPERITY` | insperity | +| `PAYCHEX` | paychex | +| `RIPPLING` | rippling | +| `SAPLING` | sapling | +| `PEOPLEHR` | peoplehr | +| `LUCCA` | lucca | +| `ZELT` | zelt | +| `PLANDAY` | planday | +| `BOONDMANAGER` | boondmanager | +| `HAILEYHR` | haileyhr | +| `SILAE` | silae | +| `OYSTERHR` | oysterhr | +| `KIWIHR` | kiwihr | +| `SQUARE` | square | +| `PERBILITYHELIX` | perbilityhelix | +| `LEAPSOME` | leapsome | +| `LOKET` | loket | +| `WORKFORCECOM` | workforcecom | +| `PEOPLEFIRST` | peoplefirst | +| `SDWORX` | sdworx | +| `ITRENT` | itrent | +| `ABSENCEIO` | absenceio | +| `A3INNUVANOMINA` | a3innuvanomina | +| `SCIM` | scim | +| `DATEVHR` | datevhr | +| `DATEV` | datev | +| `DATEVLUG` | datevlug | +| `SYMPA` | sympa | +| `YOUFORCE` | youforce | +| `NIBELIS` | nibelis | +| `PEOPLEXD` | peoplexd | +| `SFTP` | sftp | +| `SFTPFETCH` | sftpfetch | +| `THREE_HUNDRED_AND_SIXTYLEARNING` | 360learning | +| `LINKEDINLEARNING` | linkedinlearning | \ No newline at end of file diff --git a/docs/models/komboatserrorcode.md b/docs/models/komboatserrorcode.md index fc56711..486560b 100644 --- a/docs/models/komboatserrorcode.md +++ b/docs/models/komboatserrorcode.md @@ -13,6 +13,7 @@ Some errors include an error code that can be used to identify their cause. See | `PLATFORM_UNKNOWN_ERROR` | PLATFORM.UNKNOWN_ERROR | | `PLATFORM_IP_NOT_WHITELISTED` | PLATFORM.IP_NOT_WHITELISTED | | `PLATFORM_AUTHENTICATION_INVALID` | PLATFORM.AUTHENTICATION_INVALID | +| `PLATFORM_TASK_TIMED_OUT` | PLATFORM.TASK_TIMED_OUT | | `INTEGRATION_PERMISSION_MISSING` | INTEGRATION.PERMISSION_MISSING | | `INTEGRATION_AUTHENTICATION_INVALID` | INTEGRATION.AUTHENTICATION_INVALID | | `INTEGRATION_QA_FAILED` | INTEGRATION.QA_FAILED | diff --git a/docs/models/kombogeneralerrorcode.md b/docs/models/kombogeneralerrorcode.md index 0d3858e..3e4cb5b 100644 --- a/docs/models/kombogeneralerrorcode.md +++ b/docs/models/kombogeneralerrorcode.md @@ -12,4 +12,5 @@ Some errors include an error code that can be used to identify their cause. See | `PLATFORM_INPUT_INVALID` | PLATFORM.INPUT_INVALID | | `PLATFORM_UNKNOWN_ERROR` | PLATFORM.UNKNOWN_ERROR | | `PLATFORM_IP_NOT_WHITELISTED` | PLATFORM.IP_NOT_WHITELISTED | -| `PLATFORM_AUTHENTICATION_INVALID` | PLATFORM.AUTHENTICATION_INVALID | \ No newline at end of file +| `PLATFORM_AUTHENTICATION_INVALID` | PLATFORM.AUTHENTICATION_INVALID | +| `PLATFORM_TASK_TIMED_OUT` | PLATFORM.TASK_TIMED_OUT | \ No newline at end of file diff --git a/docs/models/kombohriserrorcode.md b/docs/models/kombohriserrorcode.md index 8ea2630..bb834f0 100644 --- a/docs/models/kombohriserrorcode.md +++ b/docs/models/kombohriserrorcode.md @@ -13,6 +13,7 @@ Some errors include an error code that can be used to identify their cause. See | `PLATFORM_UNKNOWN_ERROR` | PLATFORM.UNKNOWN_ERROR | | `PLATFORM_IP_NOT_WHITELISTED` | PLATFORM.IP_NOT_WHITELISTED | | `PLATFORM_AUTHENTICATION_INVALID` | PLATFORM.AUTHENTICATION_INVALID | +| `PLATFORM_TASK_TIMED_OUT` | PLATFORM.TASK_TIMED_OUT | | `INTEGRATION_PERMISSION_MISSING` | INTEGRATION.PERMISSION_MISSING | | `INTEGRATION_AUTHENTICATION_INVALID` | INTEGRATION.AUTHENTICATION_INVALID | | `INTEGRATION_QA_FAILED` | INTEGRATION.QA_FAILED | diff --git a/docs/models/name.md b/docs/models/name.md index 6658ee2..1142aa4 100644 --- a/docs/models/name.md +++ b/docs/models/name.md @@ -32,10 +32,10 @@ The name of the Kombo model or connection that changed. | `ATS_REJECTION_REASONS` | ats_rejection_reasons | | `LMS_USERS` | lms_users | | `LMS_COURSE_PROVIDERS` | lms_course_providers | +| `LMS_SKILLS` | lms_skills | | `LMS_COURSES` | lms_courses | -| `LMS_COURSE_PROGRESSIONS` | lms_course_progressions | | `LMS_COURSE_REVISIONS` | lms_course_revisions | -| `LMS_SKILLS` | lms_skills | +| `LMS_COURSE_PROGRESSIONS` | lms_course_progressions | | `HRIS_JOIN_EMPLOYEES_TEAMS` | hris_join_employees_teams | | `ATS_JOIN_CANDIDATES_TAGS` | ats_join_candidates_tags | | `ATS_JOIN_JOBS_APPLICATION_STAGES` | ats_join_jobs_application_stages | diff --git a/docs/models/putintegrationsintegrationidenabledpositiveresponse.md b/docs/models/putintegrationsintegrationidenabledpositiveresponse.md new file mode 100644 index 0000000..a1a3c57 --- /dev/null +++ b/docs/models/putintegrationsintegrationidenabledpositiveresponse.md @@ -0,0 +1,9 @@ +# PutIntegrationsIntegrationIDEnabledPositiveResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `status` | *Literal["success"]* | :heavy_check_mark: | N/A | +| `data` | [models.PutIntegrationsIntegrationIDEnabledPositiveResponseData](../models/putintegrationsintegrationidenabledpositiveresponsedata.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/putintegrationsintegrationidenabledpositiveresponsedata.md b/docs/models/putintegrationsintegrationidenabledpositiveresponsedata.md new file mode 100644 index 0000000..ab9d8e8 --- /dev/null +++ b/docs/models/putintegrationsintegrationidenabledpositiveresponsedata.md @@ -0,0 +1,7 @@ +# PutIntegrationsIntegrationIDEnabledPositiveResponseData + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/putintegrationsintegrationidenabledrequest.md b/docs/models/putintegrationsintegrationidenabledrequest.md new file mode 100644 index 0000000..180ae5a --- /dev/null +++ b/docs/models/putintegrationsintegrationidenabledrequest.md @@ -0,0 +1,9 @@ +# PutIntegrationsIntegrationIDEnabledRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `integration_id` | *str* | :heavy_check_mark: | PUT /integrations/:integration_id/enabled Parameter | +| `body` | [models.PutIntegrationsIntegrationIDEnabledRequestBody](../models/putintegrationsintegrationidenabledrequestbody.md) | :heavy_check_mark: | PUT /integrations/:integration_id/enabled Request body | \ No newline at end of file diff --git a/docs/models/putintegrationsintegrationidenabledrequestbody.md b/docs/models/putintegrationsintegrationidenabledrequestbody.md new file mode 100644 index 0000000..7306e91 --- /dev/null +++ b/docs/models/putintegrationsintegrationidenabledrequestbody.md @@ -0,0 +1,8 @@ +# PutIntegrationsIntegrationIDEnabledRequestBody + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `value` | *bool* | :heavy_check_mark: | The desired state of the integration (e.g., `true` for enabled, `false` for disabled). | \ No newline at end of file diff --git a/docs/models/scopeconfigsetting.md b/docs/models/scopeconfigsetting.md deleted file mode 100644 index f61e36b..0000000 --- a/docs/models/scopeconfigsetting.md +++ /dev/null @@ -1,12 +0,0 @@ -# ScopeConfigSetting - -The setting of the datapoint in the scope config that you configured in the Kombo dashboard. - - -## Values - -| Name | Value | -| ---------- | ---------- | -| `ENABLED` | ENABLED | -| `DISABLED` | DISABLED | -| `OPTIONAL` | OPTIONAL | \ No newline at end of file diff --git a/docs/models/writeaction.md b/docs/models/writeaction.md deleted file mode 100644 index 04e7c63..0000000 --- a/docs/models/writeaction.md +++ /dev/null @@ -1,12 +0,0 @@ -# WriteAction - -List of supported write actions for this tool. - - -## Fields - -| Field | Type | Required | Description | -| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `id` | *str* | :heavy_check_mark: | N/A | -| `label` | *str* | :heavy_check_mark: | N/A | -| `coverage_status` | [models.WriteActionCoverageStatus](../models/writeactioncoveragestatus.md) | :heavy_check_mark: | The status of a datapoint of an integrated tool:

- `SUPPORTED`: the tool supports the datapoint and it can be used through Kombo.
- `UNSUPPORTED`: the tool does not support the datapoint.
- `NOT_IMPLEMENTED`: tool supports the datapoint but it was not integrated by Kombo for a given reason (see coverage grid).
- `UNKNOWN`: the datapoint is not integrated yet and Kombo has no information about it's availability in the tool. | \ No newline at end of file diff --git a/docs/models/writeactioncoveragestatus.md b/docs/models/writeactioncoveragestatus.md deleted file mode 100644 index bda6c44..0000000 --- a/docs/models/writeactioncoveragestatus.md +++ /dev/null @@ -1,18 +0,0 @@ -# WriteActionCoverageStatus - -The status of a datapoint of an integrated tool: - -- `SUPPORTED`: the tool supports the datapoint and it can be used through Kombo. -- `UNSUPPORTED`: the tool does not support the datapoint. -- `NOT_IMPLEMENTED`: tool supports the datapoint but it was not integrated by Kombo for a given reason (see coverage grid). -- `UNKNOWN`: the datapoint is not integrated yet and Kombo has no information about it's availability in the tool. - - -## Values - -| Name | Value | -| ----------------- | ----------------- | -| `SUPPORTED` | SUPPORTED | -| `UNSUPPORTED` | UNSUPPORTED | -| `NOT_IMPLEMENTED` | NOT_IMPLEMENTED | -| `UNKNOWN` | UNKNOWN | \ No newline at end of file diff --git a/docs/sdks/assessment/README.md b/docs/sdks/assessment/README.md index 42278cc..668241a 100644 --- a/docs/sdks/assessment/README.md +++ b/docs/sdks/assessment/README.md @@ -17,7 +17,7 @@ This is mainly intended for debugging. As you always need to submit the full lis ### Example Usage - + ```python from kombo import Kombo @@ -81,9 +81,45 @@ Packages that have been previously submitted through this endpoint but aren't in } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.assessment.set_packages(packages=[]) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.assessment.set_packages(packages=[]) + + # Handle response + print(res) + +``` +### Example Usage: example1 - + ```python from kombo import Kombo @@ -215,9 +251,45 @@ Updates an assessment or a background check order result. } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.assessment.update_order_result(assessment_order_id="", status="CANCELLED", result_url="https://sour-best-seller.net") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.assessment.update_order_result(assessment_order_id="", status="CANCELLED", result_url="https://sour-best-seller.net") + + # Handle response + print(res) + +``` +### Example Usage: example1 - + ```python from kombo import Kombo from kombo.utils import parse_datetime diff --git a/docs/sdks/ats/README.md b/docs/sdks/ats/README.md index 9e4ec5f..61576e7 100644 --- a/docs/sdks/ats/README.md +++ b/docs/sdks/ats/README.md @@ -43,7 +43,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -107,9 +107,45 @@ Moves an application to a specified stage. Use job-specific stages from GET /job } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.move_application_to_stage(application_id="", stage_id="") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.move_application_to_stage(application_id="", stage_id="") - + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -180,9 +216,45 @@ This can, for example, be used to link a candidate back to a test result/assessm } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: - + res = k_client.ats.add_application_result_link(application_id="", label="", url="https://dapper-grandson.com/") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_application_result_link(application_id="", label="", url="https://dapper-grandson.com/") + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -253,9 +325,45 @@ Add extra information to an application. This can be any extra text information } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_application_note(application_id="", content="", content_type="PLAIN_TEXT") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response - + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_application_note(application_id="", content="", content_type="PLAIN_TEXT") + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -305,7 +413,7 @@ Get attachments from an application. If the ATS stores the attachments on the ca ### Example Usage - + ```python from kombo import Kombo @@ -367,9 +475,51 @@ Uploads an attachment file for the specified applicant. } ``` -### Example Usage +### Example Usage: Error Response - + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_application_attachment(application_id="", attachment={ + "name": "", + "type": "CV", + }) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_application_attachment(application_id="", attachment={ + "name": "", + "type": "CV", + }) + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -431,9 +581,45 @@ Rejects an application with a provided reason. Optionally, you can provide a fre } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.reject_application(application_id="", rejection_reason_id="") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.reject_application(application_id="", rejection_reason_id="") - + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -479,7 +665,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -603,9 +789,67 @@ Create a new candidate and application for the specified job. } ``` -### Example Usage +### Example Usage: Error Response - + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.create_candidate(candidate={ + "first_name": "Crystal", + "last_name": "Prohaska", + "email_address": "Adelia.Littel99@yahoo.com", + }, application={ + "job_id": "", + }, screening_question_answers=[ + { + "question_id": "D8yPrjXXvA2XeBksTmrVvKSn", + "answer": "Yes", + }, + ]) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.create_candidate(candidate={ + "first_name": "Crystal", + "last_name": "Prohaska", + "email_address": "Adelia.Littel99@yahoo.com", + }, application={ + "job_id": "", + }, screening_question_answers=[ + { + "question_id": "D8yPrjXXvA2XeBksTmrVvKSn", + "answer": "Yes", + }, + ]) + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo from kombo.utils import parse_datetime @@ -707,7 +951,7 @@ Get attachments from a candidate, including all attachments of all of their appl ### Example Usage - + ```python from kombo import Kombo @@ -770,9 +1014,51 @@ Uploads an attachment file for the specified candidate. } ``` -### Example Usage +### Example Usage: Error Response - + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_candidate_attachment(candidate_id="", attachment={ + "name": "", + "type": "COVER_LETTER", + }) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_candidate_attachment(candidate_id="", attachment={ + "name": "", + "type": "COVER_LETTER", + }) + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -853,9 +1139,45 @@ Add a result link to a candidate. } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_candidate_result_link(candidate_id="", label="", url="https://thrifty-cellar.net") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo - + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_candidate_result_link(candidate_id="", label="", url="https://thrifty-cellar.net") + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -926,9 +1248,49 @@ Kombo takes care of creating the tag if required, finding out the right ID, and } ``` -### Example Usage +### Example Usage: Error Response - + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_candidate_tag(candidate_id="", tag={ + "name": "", + }) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.add_candidate_tag(candidate_id="", tag={ + "name": "", + }) + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -987,9 +1349,49 @@ This will also succeed if the tag does not exist on the candidate. } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: - + res = k_client.ats.remove_candidate_tag(candidate_id="", tag={ + "name": "", + }) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.remove_candidate_tag(candidate_id="", tag={ + "name": "", + }) + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -1036,7 +1438,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -1097,7 +1499,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -1156,7 +1558,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -1241,6 +1643,8 @@ Visit our in-depth guides to learn more about: "availability_date": "2021-01-01", "location": { "city": "New York", + "zip_code": "10016", + "state": "NY", "country": "US" } }, @@ -1271,9 +1675,63 @@ Visit our in-depth guides to learn more about: } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.create_application(job_id="", candidate={ + "first_name": "Jayda", + "last_name": "Rogahn", + "email_address": "Rowena74@hotmail.com", + }, screening_question_answers=[ + { + "question_id": "D8yPrjXXvA2XeBksTmrVvKSn", + "answer": "Yes", + }, + ]) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo - + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.create_application(job_id="", candidate={ + "first_name": "Jayda", + "last_name": "Rogahn", + "email_address": "Rowena74@hotmail.com", + }, screening_question_answers=[ + { + "question_id": "D8yPrjXXvA2XeBksTmrVvKSn", + "answer": "Yes", + }, + ]) + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo from kombo.utils import parse_datetime @@ -1294,6 +1752,8 @@ with Kombo( "location": { "city": "New York", "country": "US", + "state": "NY", + "zip_code": "10016", }, "gender": "MALE", "availability_date": parse_datetime("2021-01-01T00:00:00Z"), @@ -1362,7 +1822,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -1414,7 +1874,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -1467,7 +1927,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -1518,7 +1978,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -1584,9 +2044,47 @@ Once imported, Kombo will automatically fetch and update the application's compl } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo +from kombo.utils import parse_datetime + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.import_tracked_application(tracked_at=parse_datetime("2024-07-27T05:49:24.648Z")) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo +from kombo.utils import parse_datetime + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.ats.import_tracked_application(tracked_at=parse_datetime("2024-07-27T05:49:24.648Z")) + + # Handle response + print(res) + +``` +### Example Usage: example1 - + ```python from kombo import Kombo from kombo.utils import parse_datetime diff --git a/docs/sdks/connect/README.md b/docs/sdks/connect/README.md index 813f107..cb26879 100644 --- a/docs/sdks/connect/README.md +++ b/docs/sdks/connect/README.md @@ -29,9 +29,43 @@ Generate a unique link that allows your user to enter the embedded Kombo Connect } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.connect.create_connection_link(end_user_email="Abraham55@gmail.com", end_user_organization_name="", integration_category="HRIS", language="en", enable_filtering=False, enable_field_mapping=False, link_type="EMBEDDED") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.connect.create_connection_link(end_user_email="Abraham55@gmail.com", end_user_organization_name="", integration_category="HRIS", language="en", enable_filtering=False, enable_field_mapping=False, link_type="EMBEDDED") + + # Handle response + print(res) + +``` +### Example Usage: example1 - + ```python from kombo import Kombo @@ -91,7 +125,7 @@ into your system. ### Example Usage - + ```python from kombo import Kombo diff --git a/docs/sdks/general/README.md b/docs/sdks/general/README.md index 78867b2..6bd8c92 100644 --- a/docs/sdks/general/README.md +++ b/docs/sdks/general/README.md @@ -9,6 +9,7 @@ * [send_passthrough_request](#send_passthrough_request) - Send passthrough request * [delete_integration](#delete_integration) - Delete integration * [get_integration_details](#get_integration_details) - Get integration details +* [set_integration_enabled](#set_integration_enabled) - Set integration enabled * [create_reconnection_link](#create_reconnection_link) - Create reconnection link * [get_integration_fields](#get_integration_fields) - Get integration fields * [update_integration_field](#update_integration_field) - Updates an integration fields passthrough setting @@ -22,7 +23,7 @@ Check whether your API key is working properly. ### Example Usage - + ```python from kombo import Kombo @@ -61,9 +62,45 @@ Trigger a sync for a specific integration. Please note that it is **not** necessary nor recommended to call this endpoint periodically on your side. Kombo already performs periodic syncs for you and you should only trigger syncs yourself in special cases (like when a user clicks on a "Sync" button in your app). -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.general.trigger_sync(type_="FULL") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.general.trigger_sync(type_="FULL") + + # Handle response + print(res) - +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -110,6 +147,7 @@ To get started, please pick the relevant API (some tools provide multiple to due |Integration|`{tool}/{api}`|Description| |---|---|---| +|360Learning|`360learning/v2`|360Learning [API v2](https://360learning.readme.io/docs). We automatically handle authentication and use `https://app.360learning.com/api/v2/` as the base URL.| |a3innuva Nómina|`a3innuvanomina/laboral`|a3innuva Nómina API [docs](https://a3developers.wolterskluwer.es/). Requests are automatically authenticated using OAuth access tokens (refreshed when needed). Base URL: `https://a3api.wolterskluwer.es/Laboral/api`.| |Abacus Umantis|`abacusumantis/v1`|[Umantis API v1](https://recruitingapp-91005709.umantis.com/api/v1/swagger-ui). We automatically authenticate all requests and use `https://\{subdomain\}.umantis.com/api/v1` as the base URL.| |Abacus|`abacus/api`|Abacus [REST API](https://apihub.abacus.ch/). We automatically authenticate all requests and use `https://\{\{abacusUrl\}\}/api/entity/v1/mandants/\{\{mandantId\}\}` as the base URL.| @@ -120,7 +158,7 @@ To get started, please pick the relevant API (some tools provide multiple to due |ApplicantStack|`applicantstack/api`|ApplicantStack's [API](https://helpas.payrollservers.info/s/article/API-Integration-Guide). We automatically authenticate all requests and use `https://\{subdomain\}.applicantstack.com/api/` as the base URL.| |Apploi|`apploi/rest-api`|The [Apploi API](https://integrate.apploi.com/). We automatically authenticate all requests and use `https://partners.apploi.com/` as the base URL.| |Ashby|`ashby/v1`|Ashby's [V1 API](https://developers.ashbyhq.com/reference/introduction). We automatically authenticate all requests with the provided credentials and use `https://api.ashbyhq.com` as the base URL. Please note that Ashby uses an RPC-style API. Please check [the Ashby API documentation](https://developers.ashbyhq.com/reference/introduction) for details on how to use it.| -|Asymbl|`asymbl/v63`|We use `https://\{customerDomainName\}` as the base URL. Find the official docs [here](https://asymblinc.github.io/ats/ats.html).| +|Asymbl|`asymbl/v63`|We use `https://\{subdomain\}.my.salesforce.com` as the base URL. Find the official docs [here](https://asymblinc.github.io/ats/ats.html).| |Avature|`avature/custom-api`|Avatures's Custom API. Call `Get /openapi` to retrieve the specific custom API schema. We automatically authenticate all requests and use the instance specific custom API URL as the base URL.| |Avionté|`avionte/front-office-v1`|Avionte's API. We automatically authenticate all requests and use `https://api.avionte.com/front-office/v1` as the base URL. Documentation for the BOLD Front Office API: https://developer.avionte.com/reference/get-all-talent-tags| |BambooHR|`bamboohr/v1`|BambooHR's [API](https://documentation.bamboohr.com/reference/get-employee). We automatically authenticate all requests using the customer credentials `https://api.bamboohr.com/api/gateway.php/\{subdomain\}/v1` as the base URL.| @@ -128,6 +166,7 @@ To get started, please pick the relevant API (some tools provide multiple to due |BoondManager|`boondmanager/api`|BoondManager [REST API](https://ui.boondmanager.com/administrator/developer/apisandbox). We automatically authenticate all requests and use `https://ui.boondmanager.com/api` as the base URL.| |Breezy HR|`breezyhr/v3`|[BreezyHR's v3 API](https://developer.breezy.hr/reference/overview). We automatically authenticate all requests and use "https://api.breezy.hr/v3/" as the base URL.| |Bullhorn|`bullhorn/default`|[Bullhorn's API](https://bullhorn.github.io/rest-api-docs/index.html). We automatically use the right `https://rest.bullhornstaffing.com/rest-services/\{corpToken\}` base URL.| +|Carerix|`carerix/api`|Carerix [REST API](https://docs.carerix.io/rest/introduction). We automatically authenticate all requests and use `https://api.carerix.com` as the base URL. Please note that Carerix uses XML for request and response bodies.| |CEGID TalentSoft Customer|`talentsoftcustomer/v1`|Cegid Talentsoft Recruiting FrontOffice API: [API Documentation](https://developers.cegid.com/api-details#api=cegid-talentsoft-recruiting-frontoffice) We automatically authenticate all requests and use `https://\{customer_subdomain\}.talent-soft.com/api/v1` as the base URL.| |CEGID TalentSoft FrontOffice|`talentsoft/v2`|Cegid Talentsoft Recruiting FrontOffice [API](https://developers.cegid.com/api-details). We automatically authenticate all requests using the provided credentials and use `https://\{domain\}/api/v2` as the base URL.| |Ceipal|`ceipal/v1`|We use `https://api.ceipal.com/v1` as the base URL. Find the official docs [here](https://developer.ceipal.com/ceipal-ats-version-one/ceipal-ats-v1-api-reference).| @@ -163,7 +202,8 @@ To get started, please pick the relevant API (some tools provide multiple to due |Google Workspace|`googleworkspace/admin`|[Googles's API](https://developers.google.com/admin-sdk/directory/reference/rest). We automatically authenticate all requests and use 'https://admin.googleapis.com' as the base URL.| |Google Workspace|`googleworkspace/people`|[Googles's API](https://developers.google.com/people/api/rest). We automatically authenticate all requests and use 'https://people.googleapis.com' as the base URL.| |Greenhouse Job Board|`greenhousejobboard/boards-api`|[Greenhouse Job Board API](https://developers.greenhouse.io/job-board). We automatically authenticate all requests and use 'https://boards-api.greenhouse.io/v1/boards/\{job_board_token\}' as the base URL. Optionally, you can provide a custom job_board_token to use a different job board.| -|Greenhouse|`greenhouse/harvest`|Greenhouse [Harvest API](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v1` as the base URL.| +|Greenhouse|`greenhouse/harvest-v2`|Greenhouse [Harvest API v2](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v2` as the base URL.| +|Greenhouse|`greenhouse/harvest`|Greenhouse [Harvest API v1](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v1` as the base URL.| |Hailey HR|`haileyhr/api`|Hailey HR's [API](https://api.haileyhr.app/docs/index.html). We automatically authenticate all requests using the provided credentials and use `https://api.haileyhr.app` as the base URL.| |Hansalog|`hansalog/vision`|Hansalog's [Vision API](https://hansalog-vision.document360.io/docs/). We automatically authenticate all requests and use `https://\{subdomain\}.hansalog-cloud.de/vision` as the base URL.| |Haufe Umantis|`umantis/v1`|[Umantis API v1](https://recruitingapp-91005709.umantis.com/api/v1/swagger-ui). We automatically authenticate all requests and use `https://\{subdomain\}.umantis.com/api/v1` as the base URL.| @@ -183,16 +223,20 @@ To get started, please pick the relevant API (some tools provide multiple to due |JazzHR|`jazzhr/v1`|[JazzHR's v1 API](https://www.resumatorapi.com/v1/#!`).We automatically authenticate all requests and use "https://api.resumatorapi.com/v1/" as the base URL.| |JobDiva|`jobdiva/api`|We automatically authenticate all requests and use `https://api.jobdiva.com` as the base URL.| |Jobvite|`jobvite/api`|We automatically authenticate all requests and use 'https://api.jobvite.com/api/v2' as the base URL.| +|Jobvite|`jobvite/v2`|We use `https://api.jobvite.com/api/v2` as the base URL. Find the official docs [here](https://help.jobvite.com/hc/en-us/articles/8870636608925-Jobvite-API).| |Jobylon|`jobylon/feed`|The [Jobylon Feed API](https://developer.jobylon.com/feed-api/). We automatically authenticate all requests and use `https://\{subdomain\}.jobylon.com/feeds/\{job_hash\}` as the base URL.| |Jobylon|`jobylon/push`|The [Jobylon Push API](https://developer.jobylon.com/push-api-and-webhooks/). We automatically authenticate all requests and use `https://\{subdomain\}.jobylon.com/p1` as the base URL.| |JOIN|`join/v2`|Join's [V2 API](https://docs.join.com/reference/getting-started). We automatically authenticate all requests and use `https://api.join.com/v2` as the base URL.| |Kenjo|`kenjo/api`|Kenjo's [API](https://kenjo.readme.io/reference/generate-the-api-key). We automatically authenticate all requests using the API key and use `https://api.kenjo.io/` as the base URL.| +|Lattice Talent|`latticetalent/talent`|Lattice's [Talent API](https://developers.lattice.com/reference/introduction). We automatically authenticate all requests using API key credentials with `https://api.latticehq.com` as the base URL.| |Lattice|`lattice/passthrough`|Lattice's [API](https://developers.lattice.com/v2/docs/base-url-1). We automatically authenticate all requests using OAuth credentials with `https://api.latticehq.com` as the base URL.| |Lattice|`lattice/talent`|Lattice's [Talent API](https://developers.lattice.com/docs/introduction-1). We automatically authenticate all requests using OAuth credentials with `https://api.latticehq.com` as the base URL.| |Laura|`laura/api`|We automatically authenticate all requests and use `https://\{subdomain\}.rekrytointi.com/api/v1.2` as the base URL.| |Leapsome|`leapsome/scim`|Leapsome [SCIM API](https://api.leapsome.com/scim/v1/api-docs/). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.leapsome.com/scim/v1` as the base URL.| |Leapsome|`leapsome/v1`|Leapsome [API](https://api.leapsome.com/v1/api-docs/). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.leapsome.com/v1` as the base URL.| |Lever|`lever/v1`|[Lever's v1 API](https://hire.lever.co/developer/documentation). We automatically authenticate all requests using the partner credentials which have been configured in the Lever tool settings (this uses Kombo's partner credentials by default).| +|LinkedIn Learning|`linkedinlearning/v2`|LinkedIn Learning [API v2](https://learn.microsoft.com/en-us/linkedin/learning/). We automatically handle authentication and use `https://api.linkedin.com` as the base URL.| +|Loxo|`loxo/v1`|[Loxo's API](https://loxo.readme.io/reference/loxo-api). We automatically authenticate all requests and use 'https://app.loxo.co/api/\{agency_slug\}' as base URL.| |Lucca|`lucca/api`|[Luccas's API](https://developers.lucca.fr/api-reference/legacy/introduction). We automatically authenticate all requests and use 'https://\{account\}.\{ilucca|ilucca-demo\}.\{region\}/' as the base URL.| |Manatal|`manatal/career-page`|Manatal's Career Page API. We use `https://api.manatal.com/open/v3/career-page/\{client_slug\}` as the base URL.| |Manatal|`manatal/open-api-v3`|[Manatal's Open API v3](https://developers.manatal.com/reference/getting-started). We automatically authenticate all requests and use `https://api.manatal.com/open/v3` as the base URL.| @@ -201,6 +245,7 @@ To get started, please pick the relevant API (some tools provide multiple to due |Microsoft Entra ID|`entraid/v1`|[AzureAD's API](https://learn.microsoft.com/en-us/graph/api/resources/identity-network-access-overview?view=graph-rest-1.0). We automatically authenticate all requests.| |Mysolution|`mysolution/default`|[Mysolution's API](https://swagger.mysolution.nl/). We automatically authenticate all requests and use the customer's domain as base URL.| |Nmbrs|`nmbrs/soap`|[Nmbrs SOAP API](https://api.nmbrs.nl/soap/v3/). We automatically authenticate all requests and use `https://api.nmbrs.nl/soap/v3/` as the base URL. Set `data` to your raw XML string (the content that will be placed inside the `\` tag). Use `/` as your `path`, as we will always send requests to `https://api.nmbrs.nl/soap/v3/\{service_name\}.asmx`. Set your `method` to `POST`. You need to specify the `api_options` object and set `service_name` to the name of the service you want to call. Available services include `EmployeeService` and `CompanyService`.| +|Odoo|`odoo/json2`|Odoo's [JSON-2 API](https://www.odoo.com/documentation/19.0/developer/reference/external_api.html). We automatically authenticate all requests and use `https://\{domain\}.odoo.com/json/2` as the base URL. Odoo JSON-2 requests are always `POST` requests and use paths like `/\{model\}/\{method\}` (e.g. `/res.partner/search_read`).| |Okta|`okta/v1`|[Okta's API](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/ApiServiceIntegrations/). We automatically authenticate all request ans use 'https://\/api/v1' as the base URL.| |Onlyfy|`onlyfy/v1`|Onlyfy's [Public v1 REST API](https://onlyfy.io/doc/v1#section/Introduction). We automatically authenticate all requests using the `apikey` header and use `https://api.prescreenapp.io/v1` as the base URL.| |Oracle HCM|`oraclehcm/api`|Oracle HCM Cloud [REST API](https://docs.oracle.com/en/cloud/saas/human-resources/24d/farws/index.html). We automatically authenticate all requests and use `https://\{domain\}/` as the base URL, where domain is your Oracle Cloud domain.| @@ -242,6 +287,7 @@ To get started, please pick the relevant API (some tools provide multiple to due |Softgarden|`softgarden/apply-api`|[Softgarden's Apply API](https://dev.softgarden.de/apply-api/). We automatically authenticate all requests and use 'https://jobdb.softgarden.de/jobdb/public' as base URL.| |Softgarden|`softgarden/frontend-v3`|[Softgarden's Frontend API v3](https://dev.softgarden.de/frontend-v3/. We automatically authenticate all requests and use 'https://api.softgarden.io/api/rest' as base URL.| |Spark Hire Recruit|`comeet/api`|[Spark Hire Recruit's API.](https://developers.comeet.com/reference/recruiting-api-overview)We automatically authenticate all requests and use `https://api.comeet.com` as the base URL.| +|Spott|`spott/protected`|The [Spott API](https://docs.gospott.com). We automatically authenticate all requests and use `https://api.gospott.com` as the base URL.| |Sympa|`sympa/api`|Sympa's [API](https://documenter.getpostman.com/view/33639379/2sA3kXG1vX#intro). We automatically authenticate all requests and use `https://api.sympahr.net/api/` as the base URL.| |Taleez|`taleez/0`|[Taleez's API](https://api.taleez.com/swagger-ui/index.html). We automatically authenticate all requests and use `https://api.taleez.com/0` as the base URL.| |Talention|`talention/v1`|Talention's API. We automatically authenticate all requests and use `https://\{api_domain\}/tms/\{account_id\}/external/api/1.0` as the base URL. Documentation is provided privately by Talention. Contact Kombo support for assistance with specific endpoints.| @@ -266,9 +312,45 @@ To get started, please pick the relevant API (some tools provide multiple to due Please note that the passthrough API endpoints are only meant for edge cases. That's why we only expose them for new integrations after understanding a concrete customer use case. If you have such a use case in mind, please reach out to Kombo. -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.general.send_passthrough_request(tool="", api="", method="DELETE", path="/private/var") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.general.send_passthrough_request(tool="", api="", method="DELETE", path="/private/var") + + # Handle response + print(res) + +``` +### Example Usage: example1 - + ```python from kombo import Kombo @@ -317,9 +399,26 @@ with Kombo( Delete the specified integration. **⚠️ This can not be undone!** -### Example Usage +### Example Usage: Error Response - + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.general.delete_integration(integration_id="", body={}) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + ```python from kombo import Kombo @@ -360,7 +459,7 @@ Get the specified integration with everything you need to display it to your cus ### Example Usage - + ```python from kombo import Kombo @@ -394,6 +493,68 @@ with Kombo( | errors.KomboGeneralError | default | application/json | | errors.SDKDefaultError | 4XX, 5XX | \*/\* | +## set_integration_enabled + +Enable or disable the specified integration. When disabling, all currently running syncs will be cancelled. + +All authentication credentials and configuration are preserved. Syncs can be resumed by re-enabling the integration. + +You may use this to, for example, pause syncing for customers that are temporarily not using the integration. + +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.general.set_integration_enabled(integration_id="", value=False) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.general.set_integration_enabled(integration_id="", value=False) + + # Handle response + print(res) + +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- | +| `integration_id` | *str* | :heavy_check_mark: | PUT /integrations/:integration_id/enabled Parameter | +| `value` | *bool* | :heavy_check_mark: | The desired state of the integration (e.g., `true` for enabled, `false` for disabled). | +| `retries` | [Optional[utils.RetryConfig]](../../models/utils/retryconfig.md) | :heavy_minus_sign: | Configuration to override the default retry behavior of the client. | + +### Response + +**[models.PutIntegrationsIntegrationIDEnabledPositiveResponse](../../models/putintegrationsintegrationidenabledpositiveresponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| ------------------------ | ------------------------ | ------------------------ | +| errors.KomboGeneralError | default | application/json | +| errors.SDKDefaultError | 4XX, 5XX | \*/\* | + ## create_reconnection_link Create a link that will allow the user to reconnect an integration. This is useful if you want to allow your users to update the credentials if the old ones for example expired. @@ -410,9 +571,43 @@ Embed this the same way you would [embed the connect link](/connect/embedded-flo } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.general.create_reconnection_link(integration_id="", language="en", link_type="EMBEDDED") + + # Handle response + print(res) - +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.general.create_reconnection_link(integration_id="", language="en", link_type="EMBEDDED") + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -456,7 +651,7 @@ Get all fields available on the specified integration. ### Example Usage - + ```python from kombo import Kombo @@ -498,9 +693,43 @@ with Kombo( When enabled, the integration field will be passed as part of the `integration_fields` array on the specific model endpoint. Providing false will disable the passthrough for the specified field. -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo - + +with Kombo( + api_key="", +) as k_client: + + res = k_client.general.update_integration_field(integration_id="", integration_field_id="", enable_passthrough=None) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.general.update_integration_field(integration_id="", integration_field_id="", enable_passthrough=None) + + # Handle response + print(res) + +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -543,7 +772,7 @@ Get all custom fields available on the specified integration. ### Example Usage - + ```python from kombo import Kombo @@ -585,9 +814,43 @@ with Kombo( Updates the mapping of a given custom field. If the custom field is already mapped, it will be updated. -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.general.update_custom_field_mapping(integration_id="", custom_field_id="", integration_field_id="") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + api_key="", +) as k_client: + + res = k_client.general.update_custom_field_mapping(integration_id="", custom_field_id="", integration_field_id="") + + # Handle response + print(res) + +``` +### Example Usage: example1 - + ```python from kombo import Kombo @@ -630,7 +893,7 @@ Get a list of the tools (i.e., integrations) enabled in your environment. ### Example Usage - + ```python from kombo import Kombo diff --git a/docs/sdks/hris/README.md b/docs/sdks/hris/README.md index 29ae7f0..cdedc6a 100644 --- a/docs/sdks/hris/README.md +++ b/docs/sdks/hris/README.md @@ -32,7 +32,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -165,7 +165,7 @@ Follow our [create employee guide here](/hris/features/create-employee) to learn ### Example Usage - + ```python from kombo import Kombo @@ -227,9 +227,49 @@ Create an employee, based on the form schema. } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.hris.create_employee_with_form(properties={ + "key": 3571.27, + }) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.hris.create_employee_with_form(properties={ + "key": 3571.27, + }) + + # Handle response + print(res) - +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -296,9 +336,49 @@ Uploads an document file for the specified employee. } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.hris.add_employee_document(employee_id="", category_id="", document={ + "name": "", + }) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.hris.add_employee_document(employee_id="", category_id="", document={ + "name": "", + }) + + # Handle response + print(res) - +``` +### Example Usage: example1 + + ```python from kombo import Kombo @@ -347,7 +427,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -398,7 +478,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -451,7 +531,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -502,7 +582,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -554,7 +634,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -605,7 +685,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -657,7 +737,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -730,9 +810,47 @@ Check [this page](/hris/features/creating-absences) for a detailed guide. } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo +from kombo.utils import parse_datetime + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.hris.create_absence(employee_id="", absence_type_id="", start_date=parse_datetime("2023-09-09T17:57:22.170Z"), end_date=parse_datetime("2024-03-21T09:03:29.368Z"), employee_note="", status="REQUESTED", start_half_day=False, end_half_day=False) + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo +from kombo.utils import parse_datetime + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.hris.create_absence(employee_id="", absence_type_id="", start_date=parse_datetime("2023-09-09T17:57:22.170Z"), end_date=parse_datetime("2024-03-21T09:03:29.368Z"), employee_note="", status="REQUESTED", start_half_day=False, end_half_day=False) + + # Handle response + print(res) - +``` +### Example Usage: example1 + + ```python from kombo import Kombo from kombo.utils import parse_datetime @@ -796,9 +914,45 @@ Delete this absence. } ``` -### Example Usage +### Example Usage: Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.hris.delete_absence(absence_id="") + + # Handle response + print(res) + +``` +### Example Usage: Minimal Error Response + + +```python +from kombo import Kombo + + +with Kombo( + integration_id="workday:HWUTwvyx2wLoSUHphiWVrp28", + api_key="", +) as k_client: + + res = k_client.hris.delete_absence(absence_id="") + + # Handle response + print(res) + +``` +### Example Usage: example1 - + ```python from kombo import Kombo @@ -842,7 +996,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -900,7 +1054,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -962,7 +1116,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo @@ -1019,7 +1173,7 @@ Top level filters use AND, while individual filters use OR if they accept multip ### Example Usage - + ```python from kombo import Kombo diff --git a/pylintrc b/pylintrc index 000d993..24e7c7e 100644 --- a/pylintrc +++ b/pylintrc @@ -89,7 +89,7 @@ persistent=yes # Minimum Python version to use for version dependent checks. Will default to # the version used to run pylint. -py-version=3.9 +py-version=3.10 # Discover python modules and packages in the file system subtree. recursive=no diff --git a/pyproject.toml b/pyproject.toml index c158ed5..685880e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,10 @@ [project] name = "kombo" -version = "0.2.3" +version = "0.3.0" description = "The official Python SDK for the Kombo Unified API" authors = [{ name = "Kombo Technologies GmbH" },] readme = "README-PYPI.md" -requires-python = ">=3.9.2" +requires-python = ">=3.10" dependencies = [ "httpcore >=1.0.9", "httpx >=0.28.1", diff --git a/src/kombo/_version.py b/src/kombo/_version.py index ed8c398..8857f12 100644 --- a/src/kombo/_version.py +++ b/src/kombo/_version.py @@ -3,10 +3,10 @@ import importlib.metadata __title__: str = "kombo" -__version__: str = "0.2.3" +__version__: str = "0.3.0" __openapi_doc_version__: str = "1.0.0" -__gen_version__: str = "2.791.1" -__user_agent__: str = "speakeasy-sdk/python 0.2.3 2.791.1 1.0.0 kombo" +__gen_version__: str = "2.823.1" +__user_agent__: str = "speakeasy-sdk/python 0.3.0 2.823.1 1.0.0 kombo" try: if __package__ is not None: diff --git a/src/kombo/ats.py b/src/kombo/ats.py index b6e9b4d..a03357a 100644 --- a/src/kombo/ats.py +++ b/src/kombo/ats.py @@ -5013,6 +5013,8 @@ def create_application( \"availability_date\": \"2021-01-01\", \"location\": { \"city\": \"New York\", + \"zip_code\": \"10016\", + \"state\": \"NY\", \"country\": \"US\" } }, @@ -5265,6 +5267,8 @@ async def create_application_async( \"availability_date\": \"2021-01-01\", \"location\": { \"city\": \"New York\", + \"zip_code\": \"10016\", + \"state\": \"NY\", \"country\": \"US\" } }, diff --git a/src/kombo/basesdk.py b/src/kombo/basesdk.py index 07d26f4..1b1fc99 100644 --- a/src/kombo/basesdk.py +++ b/src/kombo/basesdk.py @@ -4,7 +4,12 @@ import httpx from kombo import errors, utils from kombo._hooks import AfterErrorContext, AfterSuccessContext, BeforeRequestContext -from kombo.utils import RetryConfig, SerializedRequestBody, get_body_content +from kombo.utils import ( + RetryConfig, + SerializedRequestBody, + get_body_content, + run_sync_in_thread, +) from typing import Callable, List, Mapping, Optional, Tuple from urllib.parse import parse_qs, urlparse @@ -307,7 +312,10 @@ async def do_request_async( async def do(): http_res = None try: - req = hooks.before_request(BeforeRequestContext(hook_ctx), request) + req = await run_sync_in_thread( + hooks.before_request, BeforeRequestContext(hook_ctx), request + ) + logger.debug( "Request:\nMethod: %s\nURL: %s\nHeaders: %s\nBody: %s", req.method, @@ -321,7 +329,10 @@ async def do(): http_res = await client.send(req, stream=stream) except Exception as e: - _, e = hooks.after_error(AfterErrorContext(hook_ctx), None, e) + _, e = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), None, e + ) + if e is not None: logger.debug("Request Exception", exc_info=True) raise e @@ -339,9 +350,10 @@ async def do(): ) if utils.match_status_codes(error_status_codes, http_res.status_code): - result, err = hooks.after_error( - AfterErrorContext(hook_ctx), http_res, None + result, err = await run_sync_in_thread( + hooks.after_error, AfterErrorContext(hook_ctx), http_res, None ) + if err is not None: logger.debug("Request Exception", exc_info=True) raise err @@ -361,6 +373,8 @@ async def do(): http_res = await do() if not utils.match_status_codes(error_status_codes, http_res.status_code): - http_res = hooks.after_success(AfterSuccessContext(hook_ctx), http_res) + http_res = await run_sync_in_thread( + hooks.after_success, AfterSuccessContext(hook_ctx), http_res + ) return http_res diff --git a/src/kombo/general.py b/src/kombo/general.py index ceb57a9..693bafd 100644 --- a/src/kombo/general.py +++ b/src/kombo/general.py @@ -383,6 +383,7 @@ def send_passthrough_request( |Integration|`{tool}/{api}`|Description| |---|---|---| + |360Learning|`360learning/v2`|360Learning [API v2](https://360learning.readme.io/docs). We automatically handle authentication and use `https://app.360learning.com/api/v2/` as the base URL.| |a3innuva Nómina|`a3innuvanomina/laboral`|a3innuva Nómina API [docs](https://a3developers.wolterskluwer.es/). Requests are automatically authenticated using OAuth access tokens (refreshed when needed). Base URL: `https://a3api.wolterskluwer.es/Laboral/api`.| |Abacus Umantis|`abacusumantis/v1`|[Umantis API v1](https://recruitingapp-91005709.umantis.com/api/v1/swagger-ui). We automatically authenticate all requests and use `https://\{subdomain\}.umantis.com/api/v1` as the base URL.| |Abacus|`abacus/api`|Abacus [REST API](https://apihub.abacus.ch/). We automatically authenticate all requests and use `https://\{\{abacusUrl\}\}/api/entity/v1/mandants/\{\{mandantId\}\}` as the base URL.| @@ -393,7 +394,7 @@ def send_passthrough_request( |ApplicantStack|`applicantstack/api`|ApplicantStack's [API](https://helpas.payrollservers.info/s/article/API-Integration-Guide). We automatically authenticate all requests and use `https://\{subdomain\}.applicantstack.com/api/` as the base URL.| |Apploi|`apploi/rest-api`|The [Apploi API](https://integrate.apploi.com/). We automatically authenticate all requests and use `https://partners.apploi.com/` as the base URL.| |Ashby|`ashby/v1`|Ashby's [V1 API](https://developers.ashbyhq.com/reference/introduction). We automatically authenticate all requests with the provided credentials and use `https://api.ashbyhq.com` as the base URL. Please note that Ashby uses an RPC-style API. Please check [the Ashby API documentation](https://developers.ashbyhq.com/reference/introduction) for details on how to use it.| - |Asymbl|`asymbl/v63`|We use `https://\{customerDomainName\}` as the base URL. Find the official docs [here](https://asymblinc.github.io/ats/ats.html).| + |Asymbl|`asymbl/v63`|We use `https://\{subdomain\}.my.salesforce.com` as the base URL. Find the official docs [here](https://asymblinc.github.io/ats/ats.html).| |Avature|`avature/custom-api`|Avatures's Custom API. Call `Get /openapi` to retrieve the specific custom API schema. We automatically authenticate all requests and use the instance specific custom API URL as the base URL.| |Avionté|`avionte/front-office-v1`|Avionte's API. We automatically authenticate all requests and use `https://api.avionte.com/front-office/v1` as the base URL. Documentation for the BOLD Front Office API: https://developer.avionte.com/reference/get-all-talent-tags| |BambooHR|`bamboohr/v1`|BambooHR's [API](https://documentation.bamboohr.com/reference/get-employee). We automatically authenticate all requests using the customer credentials `https://api.bamboohr.com/api/gateway.php/\{subdomain\}/v1` as the base URL.| @@ -401,6 +402,7 @@ def send_passthrough_request( |BoondManager|`boondmanager/api`|BoondManager [REST API](https://ui.boondmanager.com/administrator/developer/apisandbox). We automatically authenticate all requests and use `https://ui.boondmanager.com/api` as the base URL.| |Breezy HR|`breezyhr/v3`|[BreezyHR's v3 API](https://developer.breezy.hr/reference/overview). We automatically authenticate all requests and use \"https://api.breezy.hr/v3/\" as the base URL.| |Bullhorn|`bullhorn/default`|[Bullhorn's API](https://bullhorn.github.io/rest-api-docs/index.html). We automatically use the right `https://rest.bullhornstaffing.com/rest-services/\{corpToken\}` base URL.| + |Carerix|`carerix/api`|Carerix [REST API](https://docs.carerix.io/rest/introduction). We automatically authenticate all requests and use `https://api.carerix.com` as the base URL. Please note that Carerix uses XML for request and response bodies.| |CEGID TalentSoft Customer|`talentsoftcustomer/v1`|Cegid Talentsoft Recruiting FrontOffice API: [API Documentation](https://developers.cegid.com/api-details#api=cegid-talentsoft-recruiting-frontoffice) We automatically authenticate all requests and use `https://\{customer_subdomain\}.talent-soft.com/api/v1` as the base URL.| |CEGID TalentSoft FrontOffice|`talentsoft/v2`|Cegid Talentsoft Recruiting FrontOffice [API](https://developers.cegid.com/api-details). We automatically authenticate all requests using the provided credentials and use `https://\{domain\}/api/v2` as the base URL.| |Ceipal|`ceipal/v1`|We use `https://api.ceipal.com/v1` as the base URL. Find the official docs [here](https://developer.ceipal.com/ceipal-ats-version-one/ceipal-ats-v1-api-reference).| @@ -436,7 +438,8 @@ def send_passthrough_request( |Google Workspace|`googleworkspace/admin`|[Googles's API](https://developers.google.com/admin-sdk/directory/reference/rest). We automatically authenticate all requests and use 'https://admin.googleapis.com' as the base URL.| |Google Workspace|`googleworkspace/people`|[Googles's API](https://developers.google.com/people/api/rest). We automatically authenticate all requests and use 'https://people.googleapis.com' as the base URL.| |Greenhouse Job Board|`greenhousejobboard/boards-api`|[Greenhouse Job Board API](https://developers.greenhouse.io/job-board). We automatically authenticate all requests and use 'https://boards-api.greenhouse.io/v1/boards/\{job_board_token\}' as the base URL. Optionally, you can provide a custom job_board_token to use a different job board.| - |Greenhouse|`greenhouse/harvest`|Greenhouse [Harvest API](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v1` as the base URL.| + |Greenhouse|`greenhouse/harvest-v2`|Greenhouse [Harvest API v2](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v2` as the base URL.| + |Greenhouse|`greenhouse/harvest`|Greenhouse [Harvest API v1](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v1` as the base URL.| |Hailey HR|`haileyhr/api`|Hailey HR's [API](https://api.haileyhr.app/docs/index.html). We automatically authenticate all requests using the provided credentials and use `https://api.haileyhr.app` as the base URL.| |Hansalog|`hansalog/vision`|Hansalog's [Vision API](https://hansalog-vision.document360.io/docs/). We automatically authenticate all requests and use `https://\{subdomain\}.hansalog-cloud.de/vision` as the base URL.| |Haufe Umantis|`umantis/v1`|[Umantis API v1](https://recruitingapp-91005709.umantis.com/api/v1/swagger-ui). We automatically authenticate all requests and use `https://\{subdomain\}.umantis.com/api/v1` as the base URL.| @@ -456,16 +459,20 @@ def send_passthrough_request( |JazzHR|`jazzhr/v1`|[JazzHR's v1 API](https://www.resumatorapi.com/v1/#!`).We automatically authenticate all requests and use \"https://api.resumatorapi.com/v1/\" as the base URL.| |JobDiva|`jobdiva/api`|We automatically authenticate all requests and use `https://api.jobdiva.com` as the base URL.| |Jobvite|`jobvite/api`|We automatically authenticate all requests and use 'https://api.jobvite.com/api/v2' as the base URL.| + |Jobvite|`jobvite/v2`|We use `https://api.jobvite.com/api/v2` as the base URL. Find the official docs [here](https://help.jobvite.com/hc/en-us/articles/8870636608925-Jobvite-API).| |Jobylon|`jobylon/feed`|The [Jobylon Feed API](https://developer.jobylon.com/feed-api/). We automatically authenticate all requests and use `https://\{subdomain\}.jobylon.com/feeds/\{job_hash\}` as the base URL.| |Jobylon|`jobylon/push`|The [Jobylon Push API](https://developer.jobylon.com/push-api-and-webhooks/). We automatically authenticate all requests and use `https://\{subdomain\}.jobylon.com/p1` as the base URL.| |JOIN|`join/v2`|Join's [V2 API](https://docs.join.com/reference/getting-started). We automatically authenticate all requests and use `https://api.join.com/v2` as the base URL.| |Kenjo|`kenjo/api`|Kenjo's [API](https://kenjo.readme.io/reference/generate-the-api-key). We automatically authenticate all requests using the API key and use `https://api.kenjo.io/` as the base URL.| + |Lattice Talent|`latticetalent/talent`|Lattice's [Talent API](https://developers.lattice.com/reference/introduction). We automatically authenticate all requests using API key credentials with `https://api.latticehq.com` as the base URL.| |Lattice|`lattice/passthrough`|Lattice's [API](https://developers.lattice.com/v2/docs/base-url-1). We automatically authenticate all requests using OAuth credentials with `https://api.latticehq.com` as the base URL.| |Lattice|`lattice/talent`|Lattice's [Talent API](https://developers.lattice.com/docs/introduction-1). We automatically authenticate all requests using OAuth credentials with `https://api.latticehq.com` as the base URL.| |Laura|`laura/api`|We automatically authenticate all requests and use `https://\{subdomain\}.rekrytointi.com/api/v1.2` as the base URL.| |Leapsome|`leapsome/scim`|Leapsome [SCIM API](https://api.leapsome.com/scim/v1/api-docs/). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.leapsome.com/scim/v1` as the base URL.| |Leapsome|`leapsome/v1`|Leapsome [API](https://api.leapsome.com/v1/api-docs/). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.leapsome.com/v1` as the base URL.| |Lever|`lever/v1`|[Lever's v1 API](https://hire.lever.co/developer/documentation). We automatically authenticate all requests using the partner credentials which have been configured in the Lever tool settings (this uses Kombo's partner credentials by default).| + |LinkedIn Learning|`linkedinlearning/v2`|LinkedIn Learning [API v2](https://learn.microsoft.com/en-us/linkedin/learning/). We automatically handle authentication and use `https://api.linkedin.com` as the base URL.| + |Loxo|`loxo/v1`|[Loxo's API](https://loxo.readme.io/reference/loxo-api). We automatically authenticate all requests and use 'https://app.loxo.co/api/\{agency_slug\}' as base URL.| |Lucca|`lucca/api`|[Luccas's API](https://developers.lucca.fr/api-reference/legacy/introduction). We automatically authenticate all requests and use 'https://\{account\}.\{ilucca|ilucca-demo\}.\{region\}/' as the base URL.| |Manatal|`manatal/career-page`|Manatal's Career Page API. We use `https://api.manatal.com/open/v3/career-page/\{client_slug\}` as the base URL.| |Manatal|`manatal/open-api-v3`|[Manatal's Open API v3](https://developers.manatal.com/reference/getting-started). We automatically authenticate all requests and use `https://api.manatal.com/open/v3` as the base URL.| @@ -474,6 +481,7 @@ def send_passthrough_request( |Microsoft Entra ID|`entraid/v1`|[AzureAD's API](https://learn.microsoft.com/en-us/graph/api/resources/identity-network-access-overview?view=graph-rest-1.0). We automatically authenticate all requests.| |Mysolution|`mysolution/default`|[Mysolution's API](https://swagger.mysolution.nl/). We automatically authenticate all requests and use the customer's domain as base URL.| |Nmbrs|`nmbrs/soap`|[Nmbrs SOAP API](https://api.nmbrs.nl/soap/v3/). We automatically authenticate all requests and use `https://api.nmbrs.nl/soap/v3/` as the base URL. Set `data` to your raw XML string (the content that will be placed inside the `\` tag). Use `/` as your `path`, as we will always send requests to `https://api.nmbrs.nl/soap/v3/\{service_name\}.asmx`. Set your `method` to `POST`. You need to specify the `api_options` object and set `service_name` to the name of the service you want to call. Available services include `EmployeeService` and `CompanyService`.| + |Odoo|`odoo/json2`|Odoo's [JSON-2 API](https://www.odoo.com/documentation/19.0/developer/reference/external_api.html). We automatically authenticate all requests and use `https://\{domain\}.odoo.com/json/2` as the base URL. Odoo JSON-2 requests are always `POST` requests and use paths like `/\{model\}/\{method\}` (e.g. `/res.partner/search_read`).| |Okta|`okta/v1`|[Okta's API](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/ApiServiceIntegrations/). We automatically authenticate all request ans use 'https://\/api/v1' as the base URL.| |Onlyfy|`onlyfy/v1`|Onlyfy's [Public v1 REST API](https://onlyfy.io/doc/v1#section/Introduction). We automatically authenticate all requests using the `apikey` header and use `https://api.prescreenapp.io/v1` as the base URL.| |Oracle HCM|`oraclehcm/api`|Oracle HCM Cloud [REST API](https://docs.oracle.com/en/cloud/saas/human-resources/24d/farws/index.html). We automatically authenticate all requests and use `https://\{domain\}/` as the base URL, where domain is your Oracle Cloud domain.| @@ -515,6 +523,7 @@ def send_passthrough_request( |Softgarden|`softgarden/apply-api`|[Softgarden's Apply API](https://dev.softgarden.de/apply-api/). We automatically authenticate all requests and use 'https://jobdb.softgarden.de/jobdb/public' as base URL.| |Softgarden|`softgarden/frontend-v3`|[Softgarden's Frontend API v3](https://dev.softgarden.de/frontend-v3/. We automatically authenticate all requests and use 'https://api.softgarden.io/api/rest' as base URL.| |Spark Hire Recruit|`comeet/api`|[Spark Hire Recruit's API.](https://developers.comeet.com/reference/recruiting-api-overview)We automatically authenticate all requests and use `https://api.comeet.com` as the base URL.| + |Spott|`spott/protected`|The [Spott API](https://docs.gospott.com). We automatically authenticate all requests and use `https://api.gospott.com` as the base URL.| |Sympa|`sympa/api`|Sympa's [API](https://documenter.getpostman.com/view/33639379/2sA3kXG1vX#intro). We automatically authenticate all requests and use `https://api.sympahr.net/api/` as the base URL.| |Taleez|`taleez/0`|[Taleez's API](https://api.taleez.com/swagger-ui/index.html). We automatically authenticate all requests and use `https://api.taleez.com/0` as the base URL.| |Talention|`talention/v1`|Talention's API. We automatically authenticate all requests and use `https://\{api_domain\}/tms/\{account_id\}/external/api/1.0` as the base URL. Documentation is provided privately by Talention. Contact Kombo support for assistance with specific endpoints.| @@ -677,6 +686,7 @@ async def send_passthrough_request_async( |Integration|`{tool}/{api}`|Description| |---|---|---| + |360Learning|`360learning/v2`|360Learning [API v2](https://360learning.readme.io/docs). We automatically handle authentication and use `https://app.360learning.com/api/v2/` as the base URL.| |a3innuva Nómina|`a3innuvanomina/laboral`|a3innuva Nómina API [docs](https://a3developers.wolterskluwer.es/). Requests are automatically authenticated using OAuth access tokens (refreshed when needed). Base URL: `https://a3api.wolterskluwer.es/Laboral/api`.| |Abacus Umantis|`abacusumantis/v1`|[Umantis API v1](https://recruitingapp-91005709.umantis.com/api/v1/swagger-ui). We automatically authenticate all requests and use `https://\{subdomain\}.umantis.com/api/v1` as the base URL.| |Abacus|`abacus/api`|Abacus [REST API](https://apihub.abacus.ch/). We automatically authenticate all requests and use `https://\{\{abacusUrl\}\}/api/entity/v1/mandants/\{\{mandantId\}\}` as the base URL.| @@ -687,7 +697,7 @@ async def send_passthrough_request_async( |ApplicantStack|`applicantstack/api`|ApplicantStack's [API](https://helpas.payrollservers.info/s/article/API-Integration-Guide). We automatically authenticate all requests and use `https://\{subdomain\}.applicantstack.com/api/` as the base URL.| |Apploi|`apploi/rest-api`|The [Apploi API](https://integrate.apploi.com/). We automatically authenticate all requests and use `https://partners.apploi.com/` as the base URL.| |Ashby|`ashby/v1`|Ashby's [V1 API](https://developers.ashbyhq.com/reference/introduction). We automatically authenticate all requests with the provided credentials and use `https://api.ashbyhq.com` as the base URL. Please note that Ashby uses an RPC-style API. Please check [the Ashby API documentation](https://developers.ashbyhq.com/reference/introduction) for details on how to use it.| - |Asymbl|`asymbl/v63`|We use `https://\{customerDomainName\}` as the base URL. Find the official docs [here](https://asymblinc.github.io/ats/ats.html).| + |Asymbl|`asymbl/v63`|We use `https://\{subdomain\}.my.salesforce.com` as the base URL. Find the official docs [here](https://asymblinc.github.io/ats/ats.html).| |Avature|`avature/custom-api`|Avatures's Custom API. Call `Get /openapi` to retrieve the specific custom API schema. We automatically authenticate all requests and use the instance specific custom API URL as the base URL.| |Avionté|`avionte/front-office-v1`|Avionte's API. We automatically authenticate all requests and use `https://api.avionte.com/front-office/v1` as the base URL. Documentation for the BOLD Front Office API: https://developer.avionte.com/reference/get-all-talent-tags| |BambooHR|`bamboohr/v1`|BambooHR's [API](https://documentation.bamboohr.com/reference/get-employee). We automatically authenticate all requests using the customer credentials `https://api.bamboohr.com/api/gateway.php/\{subdomain\}/v1` as the base URL.| @@ -695,6 +705,7 @@ async def send_passthrough_request_async( |BoondManager|`boondmanager/api`|BoondManager [REST API](https://ui.boondmanager.com/administrator/developer/apisandbox). We automatically authenticate all requests and use `https://ui.boondmanager.com/api` as the base URL.| |Breezy HR|`breezyhr/v3`|[BreezyHR's v3 API](https://developer.breezy.hr/reference/overview). We automatically authenticate all requests and use \"https://api.breezy.hr/v3/\" as the base URL.| |Bullhorn|`bullhorn/default`|[Bullhorn's API](https://bullhorn.github.io/rest-api-docs/index.html). We automatically use the right `https://rest.bullhornstaffing.com/rest-services/\{corpToken\}` base URL.| + |Carerix|`carerix/api`|Carerix [REST API](https://docs.carerix.io/rest/introduction). We automatically authenticate all requests and use `https://api.carerix.com` as the base URL. Please note that Carerix uses XML for request and response bodies.| |CEGID TalentSoft Customer|`talentsoftcustomer/v1`|Cegid Talentsoft Recruiting FrontOffice API: [API Documentation](https://developers.cegid.com/api-details#api=cegid-talentsoft-recruiting-frontoffice) We automatically authenticate all requests and use `https://\{customer_subdomain\}.talent-soft.com/api/v1` as the base URL.| |CEGID TalentSoft FrontOffice|`talentsoft/v2`|Cegid Talentsoft Recruiting FrontOffice [API](https://developers.cegid.com/api-details). We automatically authenticate all requests using the provided credentials and use `https://\{domain\}/api/v2` as the base URL.| |Ceipal|`ceipal/v1`|We use `https://api.ceipal.com/v1` as the base URL. Find the official docs [here](https://developer.ceipal.com/ceipal-ats-version-one/ceipal-ats-v1-api-reference).| @@ -730,7 +741,8 @@ async def send_passthrough_request_async( |Google Workspace|`googleworkspace/admin`|[Googles's API](https://developers.google.com/admin-sdk/directory/reference/rest). We automatically authenticate all requests and use 'https://admin.googleapis.com' as the base URL.| |Google Workspace|`googleworkspace/people`|[Googles's API](https://developers.google.com/people/api/rest). We automatically authenticate all requests and use 'https://people.googleapis.com' as the base URL.| |Greenhouse Job Board|`greenhousejobboard/boards-api`|[Greenhouse Job Board API](https://developers.greenhouse.io/job-board). We automatically authenticate all requests and use 'https://boards-api.greenhouse.io/v1/boards/\{job_board_token\}' as the base URL. Optionally, you can provide a custom job_board_token to use a different job board.| - |Greenhouse|`greenhouse/harvest`|Greenhouse [Harvest API](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v1` as the base URL.| + |Greenhouse|`greenhouse/harvest-v2`|Greenhouse [Harvest API v2](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v2` as the base URL.| + |Greenhouse|`greenhouse/harvest`|Greenhouse [Harvest API v1](https://developers.greenhouse.io/harvest.html). We automatically authenticate all requests using the API key and use `https://harvest.greenhouse.io/v1` as the base URL.| |Hailey HR|`haileyhr/api`|Hailey HR's [API](https://api.haileyhr.app/docs/index.html). We automatically authenticate all requests using the provided credentials and use `https://api.haileyhr.app` as the base URL.| |Hansalog|`hansalog/vision`|Hansalog's [Vision API](https://hansalog-vision.document360.io/docs/). We automatically authenticate all requests and use `https://\{subdomain\}.hansalog-cloud.de/vision` as the base URL.| |Haufe Umantis|`umantis/v1`|[Umantis API v1](https://recruitingapp-91005709.umantis.com/api/v1/swagger-ui). We automatically authenticate all requests and use `https://\{subdomain\}.umantis.com/api/v1` as the base URL.| @@ -750,16 +762,20 @@ async def send_passthrough_request_async( |JazzHR|`jazzhr/v1`|[JazzHR's v1 API](https://www.resumatorapi.com/v1/#!`).We automatically authenticate all requests and use \"https://api.resumatorapi.com/v1/\" as the base URL.| |JobDiva|`jobdiva/api`|We automatically authenticate all requests and use `https://api.jobdiva.com` as the base URL.| |Jobvite|`jobvite/api`|We automatically authenticate all requests and use 'https://api.jobvite.com/api/v2' as the base URL.| + |Jobvite|`jobvite/v2`|We use `https://api.jobvite.com/api/v2` as the base URL. Find the official docs [here](https://help.jobvite.com/hc/en-us/articles/8870636608925-Jobvite-API).| |Jobylon|`jobylon/feed`|The [Jobylon Feed API](https://developer.jobylon.com/feed-api/). We automatically authenticate all requests and use `https://\{subdomain\}.jobylon.com/feeds/\{job_hash\}` as the base URL.| |Jobylon|`jobylon/push`|The [Jobylon Push API](https://developer.jobylon.com/push-api-and-webhooks/). We automatically authenticate all requests and use `https://\{subdomain\}.jobylon.com/p1` as the base URL.| |JOIN|`join/v2`|Join's [V2 API](https://docs.join.com/reference/getting-started). We automatically authenticate all requests and use `https://api.join.com/v2` as the base URL.| |Kenjo|`kenjo/api`|Kenjo's [API](https://kenjo.readme.io/reference/generate-the-api-key). We automatically authenticate all requests using the API key and use `https://api.kenjo.io/` as the base URL.| + |Lattice Talent|`latticetalent/talent`|Lattice's [Talent API](https://developers.lattice.com/reference/introduction). We automatically authenticate all requests using API key credentials with `https://api.latticehq.com` as the base URL.| |Lattice|`lattice/passthrough`|Lattice's [API](https://developers.lattice.com/v2/docs/base-url-1). We automatically authenticate all requests using OAuth credentials with `https://api.latticehq.com` as the base URL.| |Lattice|`lattice/talent`|Lattice's [Talent API](https://developers.lattice.com/docs/introduction-1). We automatically authenticate all requests using OAuth credentials with `https://api.latticehq.com` as the base URL.| |Laura|`laura/api`|We automatically authenticate all requests and use `https://\{subdomain\}.rekrytointi.com/api/v1.2` as the base URL.| |Leapsome|`leapsome/scim`|Leapsome [SCIM API](https://api.leapsome.com/scim/v1/api-docs/). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.leapsome.com/scim/v1` as the base URL.| |Leapsome|`leapsome/v1`|Leapsome [API](https://api.leapsome.com/v1/api-docs/). We automatically authenticate all requests using the credentials supplied by the customer and use `https://api.leapsome.com/v1` as the base URL.| |Lever|`lever/v1`|[Lever's v1 API](https://hire.lever.co/developer/documentation). We automatically authenticate all requests using the partner credentials which have been configured in the Lever tool settings (this uses Kombo's partner credentials by default).| + |LinkedIn Learning|`linkedinlearning/v2`|LinkedIn Learning [API v2](https://learn.microsoft.com/en-us/linkedin/learning/). We automatically handle authentication and use `https://api.linkedin.com` as the base URL.| + |Loxo|`loxo/v1`|[Loxo's API](https://loxo.readme.io/reference/loxo-api). We automatically authenticate all requests and use 'https://app.loxo.co/api/\{agency_slug\}' as base URL.| |Lucca|`lucca/api`|[Luccas's API](https://developers.lucca.fr/api-reference/legacy/introduction). We automatically authenticate all requests and use 'https://\{account\}.\{ilucca|ilucca-demo\}.\{region\}/' as the base URL.| |Manatal|`manatal/career-page`|Manatal's Career Page API. We use `https://api.manatal.com/open/v3/career-page/\{client_slug\}` as the base URL.| |Manatal|`manatal/open-api-v3`|[Manatal's Open API v3](https://developers.manatal.com/reference/getting-started). We automatically authenticate all requests and use `https://api.manatal.com/open/v3` as the base URL.| @@ -768,6 +784,7 @@ async def send_passthrough_request_async( |Microsoft Entra ID|`entraid/v1`|[AzureAD's API](https://learn.microsoft.com/en-us/graph/api/resources/identity-network-access-overview?view=graph-rest-1.0). We automatically authenticate all requests.| |Mysolution|`mysolution/default`|[Mysolution's API](https://swagger.mysolution.nl/). We automatically authenticate all requests and use the customer's domain as base URL.| |Nmbrs|`nmbrs/soap`|[Nmbrs SOAP API](https://api.nmbrs.nl/soap/v3/). We automatically authenticate all requests and use `https://api.nmbrs.nl/soap/v3/` as the base URL. Set `data` to your raw XML string (the content that will be placed inside the `\` tag). Use `/` as your `path`, as we will always send requests to `https://api.nmbrs.nl/soap/v3/\{service_name\}.asmx`. Set your `method` to `POST`. You need to specify the `api_options` object and set `service_name` to the name of the service you want to call. Available services include `EmployeeService` and `CompanyService`.| + |Odoo|`odoo/json2`|Odoo's [JSON-2 API](https://www.odoo.com/documentation/19.0/developer/reference/external_api.html). We automatically authenticate all requests and use `https://\{domain\}.odoo.com/json/2` as the base URL. Odoo JSON-2 requests are always `POST` requests and use paths like `/\{model\}/\{method\}` (e.g. `/res.partner/search_read`).| |Okta|`okta/v1`|[Okta's API](https://developer.okta.com/docs/api/openapi/okta-management/management/tag/ApiServiceIntegrations/). We automatically authenticate all request ans use 'https://\/api/v1' as the base URL.| |Onlyfy|`onlyfy/v1`|Onlyfy's [Public v1 REST API](https://onlyfy.io/doc/v1#section/Introduction). We automatically authenticate all requests using the `apikey` header and use `https://api.prescreenapp.io/v1` as the base URL.| |Oracle HCM|`oraclehcm/api`|Oracle HCM Cloud [REST API](https://docs.oracle.com/en/cloud/saas/human-resources/24d/farws/index.html). We automatically authenticate all requests and use `https://\{domain\}/` as the base URL, where domain is your Oracle Cloud domain.| @@ -809,6 +826,7 @@ async def send_passthrough_request_async( |Softgarden|`softgarden/apply-api`|[Softgarden's Apply API](https://dev.softgarden.de/apply-api/). We automatically authenticate all requests and use 'https://jobdb.softgarden.de/jobdb/public' as base URL.| |Softgarden|`softgarden/frontend-v3`|[Softgarden's Frontend API v3](https://dev.softgarden.de/frontend-v3/. We automatically authenticate all requests and use 'https://api.softgarden.io/api/rest' as base URL.| |Spark Hire Recruit|`comeet/api`|[Spark Hire Recruit's API.](https://developers.comeet.com/reference/recruiting-api-overview)We automatically authenticate all requests and use `https://api.comeet.com` as the base URL.| + |Spott|`spott/protected`|The [Spott API](https://docs.gospott.com). We automatically authenticate all requests and use `https://api.gospott.com` as the base URL.| |Sympa|`sympa/api`|Sympa's [API](https://documenter.getpostman.com/view/33639379/2sA3kXG1vX#intro). We automatically authenticate all requests and use `https://api.sympahr.net/api/` as the base URL.| |Taleez|`taleez/0`|[Taleez's API](https://api.taleez.com/swagger-ui/index.html). We automatically authenticate all requests and use `https://api.taleez.com/0` as the base URL.| |Talention|`talention/v1`|Talention's API. We automatically authenticate all requests and use `https://\{api_domain\}/tms/\{account_id\}/external/api/1.0` as the base URL. Documentation is provided privately by Talention. Contact Kombo support for assistance with specific endpoints.| @@ -1304,6 +1322,206 @@ async def get_integration_details_async( raise errors.SDKDefaultError("Unexpected response received", http_res) + def set_integration_enabled( + self, + *, + integration_id: str, + value: bool, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PutIntegrationsIntegrationIDEnabledPositiveResponse: + r"""Set integration enabled + + Enable or disable the specified integration. When disabling, all currently running syncs will be cancelled. + + All authentication credentials and configuration are preserved. Syncs can be resumed by re-enabling the integration. + + You may use this to, for example, pause syncing for customers that are temporarily not using the integration. + + :param integration_id: PUT /integrations/:integration_id/enabled Parameter + :param value: The desired state of the integration (e.g., `true` for enabled, `false` for disabled). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutIntegrationsIntegrationIDEnabledRequest( + integration_id=integration_id, + body=models.PutIntegrationsIntegrationIDEnabledRequestBody( + value=value, + ), + ) + + req = self._build_request( + method="PUT", + path="/integrations/{integration_id}/enabled", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.body, + False, + False, + "json", + models.PutIntegrationsIntegrationIDEnabledRequestBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = self.do_request( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="PutIntegrationsIntegrationIdEnabled", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["default"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PutIntegrationsIntegrationIDEnabledPositiveResponse, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + response_data = unmarshal_json_response( + errors.KomboGeneralErrorData, http_res + ) + raise errors.KomboGeneralError(response_data, http_res) + + raise errors.SDKDefaultError("Unexpected response received", http_res) + + async def set_integration_enabled_async( + self, + *, + integration_id: str, + value: bool, + retries: OptionalNullable[utils.RetryConfig] = UNSET, + server_url: Optional[str] = None, + timeout_ms: Optional[int] = None, + http_headers: Optional[Mapping[str, str]] = None, + ) -> models.PutIntegrationsIntegrationIDEnabledPositiveResponse: + r"""Set integration enabled + + Enable or disable the specified integration. When disabling, all currently running syncs will be cancelled. + + All authentication credentials and configuration are preserved. Syncs can be resumed by re-enabling the integration. + + You may use this to, for example, pause syncing for customers that are temporarily not using the integration. + + :param integration_id: PUT /integrations/:integration_id/enabled Parameter + :param value: The desired state of the integration (e.g., `true` for enabled, `false` for disabled). + :param retries: Override the default retry configuration for this method + :param server_url: Override the default server URL for this method + :param timeout_ms: Override the default request timeout configuration for this method in milliseconds + :param http_headers: Additional headers to set or replace on requests. + """ + base_url = None + url_variables = None + if timeout_ms is None: + timeout_ms = self.sdk_configuration.timeout_ms + + if server_url is not None: + base_url = server_url + else: + base_url = self._get_url(base_url, url_variables) + + request = models.PutIntegrationsIntegrationIDEnabledRequest( + integration_id=integration_id, + body=models.PutIntegrationsIntegrationIDEnabledRequestBody( + value=value, + ), + ) + + req = self._build_request_async( + method="PUT", + path="/integrations/{integration_id}/enabled", + base_url=base_url, + url_variables=url_variables, + request=request, + request_body_required=True, + request_has_path_params=True, + request_has_query_params=True, + user_agent_header="user-agent", + accept_header_value="application/json", + http_headers=http_headers, + security=self.sdk_configuration.security, + get_serialized_body=lambda: utils.serialize_request_body( + request.body, + False, + False, + "json", + models.PutIntegrationsIntegrationIDEnabledRequestBody, + ), + allow_empty_value=None, + timeout_ms=timeout_ms, + ) + + if retries == UNSET: + if self.sdk_configuration.retry_config is not UNSET: + retries = self.sdk_configuration.retry_config + + retry_config = None + if isinstance(retries, utils.RetryConfig): + retry_config = (retries, ["429", "500", "502", "503", "504"]) + + http_res = await self.do_request_async( + hook_ctx=HookContext( + config=self.sdk_configuration, + base_url=base_url or "", + operation_id="PutIntegrationsIntegrationIdEnabled", + oauth2_scopes=None, + security_source=self.sdk_configuration.security, + ), + request=req, + error_status_codes=["default"], + retry_config=retry_config, + ) + + response_data: Any = None + if utils.match_response(http_res, "200", "application/json"): + return unmarshal_json_response( + models.PutIntegrationsIntegrationIDEnabledPositiveResponse, http_res + ) + if utils.match_response(http_res, "default", "application/json"): + response_data = unmarshal_json_response( + errors.KomboGeneralErrorData, http_res + ) + raise errors.KomboGeneralError(response_data, http_res) + + raise errors.SDKDefaultError("Unexpected response received", http_res) + def create_reconnection_link( self, *, diff --git a/src/kombo/models/__init__.py b/src/kombo/models/__init__.py index eff439e..60d2be6 100644 --- a/src/kombo/models/__init__.py +++ b/src/kombo/models/__init__.py @@ -1038,6 +1038,7 @@ IntegrationStateChangedWebhookPayloadEndUser, IntegrationStateChangedWebhookPayloadEndUserTypedDict, IntegrationStateChangedWebhookPayloadIntegrationCategory, + IntegrationStateChangedWebhookPayloadSetupStatus, IntegrationStateChangedWebhookPayloadType, IntegrationStateChangedWebhookPayloadTypedDict, QaStatus, @@ -1994,6 +1995,20 @@ PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDRequestBody, PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDRequestBodyTypedDict, ) + from .putintegrationsintegrationidenabledop import ( + PutIntegrationsIntegrationIDEnabledRequest, + PutIntegrationsIntegrationIDEnabledRequestTypedDict, + ) + from .putintegrationsintegrationidenabledpositiveresponse import ( + PutIntegrationsIntegrationIDEnabledPositiveResponse, + PutIntegrationsIntegrationIDEnabledPositiveResponseData, + PutIntegrationsIntegrationIDEnabledPositiveResponseDataTypedDict, + PutIntegrationsIntegrationIDEnabledPositiveResponseTypedDict, + ) + from .putintegrationsintegrationidenabledrequestbody import ( + PutIntegrationsIntegrationIDEnabledRequestBody, + PutIntegrationsIntegrationIDEnabledRequestBodyTypedDict, + ) from .schema1 import Schema1, Schema1TypedDict from .schema1_union_1 import ( Schema1Array1, @@ -2847,6 +2862,7 @@ "IntegrationStateChangedWebhookPayloadEndUser", "IntegrationStateChangedWebhookPayloadEndUserTypedDict", "IntegrationStateChangedWebhookPayloadIntegrationCategory", + "IntegrationStateChangedWebhookPayloadSetupStatus", "IntegrationStateChangedWebhookPayloadType", "IntegrationStateChangedWebhookPayloadTypedDict", "IntegrationTool", @@ -3690,6 +3706,14 @@ "PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDRequestBody", "PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDRequestBodyTypedDict", "PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDRequestTypedDict", + "PutIntegrationsIntegrationIDEnabledPositiveResponse", + "PutIntegrationsIntegrationIDEnabledPositiveResponseData", + "PutIntegrationsIntegrationIDEnabledPositiveResponseDataTypedDict", + "PutIntegrationsIntegrationIDEnabledPositiveResponseTypedDict", + "PutIntegrationsIntegrationIDEnabledRequest", + "PutIntegrationsIntegrationIDEnabledRequestBody", + "PutIntegrationsIntegrationIDEnabledRequestBodyTypedDict", + "PutIntegrationsIntegrationIDEnabledRequestTypedDict", "QaStatus", "ReadModelScopeConfigSetting", "RemoteWorkStatus", @@ -4681,6 +4705,7 @@ "IntegrationStateChangedWebhookPayloadEndUser": ".integrationstatechangedwebhookpayload", "IntegrationStateChangedWebhookPayloadEndUserTypedDict": ".integrationstatechangedwebhookpayload", "IntegrationStateChangedWebhookPayloadIntegrationCategory": ".integrationstatechangedwebhookpayload", + "IntegrationStateChangedWebhookPayloadSetupStatus": ".integrationstatechangedwebhookpayload", "IntegrationStateChangedWebhookPayloadType": ".integrationstatechangedwebhookpayload", "IntegrationStateChangedWebhookPayloadTypedDict": ".integrationstatechangedwebhookpayload", "QaStatus": ".integrationstatechangedwebhookpayload", @@ -5503,6 +5528,14 @@ "PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDPositiveResponseTypedDict": ".putintegrationsintegrationidcustomfieldscustomfieldidpositiveresponse", "PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDRequestBody": ".putintegrationsintegrationidcustomfieldscustomfieldidrequestbody", "PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDRequestBodyTypedDict": ".putintegrationsintegrationidcustomfieldscustomfieldidrequestbody", + "PutIntegrationsIntegrationIDEnabledRequest": ".putintegrationsintegrationidenabledop", + "PutIntegrationsIntegrationIDEnabledRequestTypedDict": ".putintegrationsintegrationidenabledop", + "PutIntegrationsIntegrationIDEnabledPositiveResponse": ".putintegrationsintegrationidenabledpositiveresponse", + "PutIntegrationsIntegrationIDEnabledPositiveResponseData": ".putintegrationsintegrationidenabledpositiveresponse", + "PutIntegrationsIntegrationIDEnabledPositiveResponseDataTypedDict": ".putintegrationsintegrationidenabledpositiveresponse", + "PutIntegrationsIntegrationIDEnabledPositiveResponseTypedDict": ".putintegrationsintegrationidenabledpositiveresponse", + "PutIntegrationsIntegrationIDEnabledRequestBody": ".putintegrationsintegrationidenabledrequestbody", + "PutIntegrationsIntegrationIDEnabledRequestBodyTypedDict": ".putintegrationsintegrationidenabledrequestbody", "Schema1": ".schema1", "Schema1TypedDict": ".schema1", "Schema1Array1": ".schema1_union_1", diff --git a/src/kombo/models/assessmentorderreceivedwebhookpayload.py b/src/kombo/models/assessmentorderreceivedwebhookpayload.py index 3efcd31..2b46949 100644 --- a/src/kombo/models/assessmentorderreceivedwebhookpayload.py +++ b/src/kombo/models/assessmentorderreceivedwebhookpayload.py @@ -55,31 +55,26 @@ class AssessmentOrderReceivedWebhookPayloadCandidate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id", "first_name", "last_name", "phone"] - nullable_fields = ["remote_id", "first_name", "last_name", "phone"] - null_default_fields = [] - + optional_fields = set(["remote_id", "first_name", "last_name", "phone"]) + nullable_fields = set(["remote_id", "first_name", "last_name", "phone"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -99,31 +94,26 @@ class AssessmentOrderReceivedWebhookPayloadApplication(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id"] - nullable_fields = ["remote_id"] - null_default_fields = [] - + optional_fields = set(["remote_id"]) + nullable_fields = set(["remote_id"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -165,47 +155,30 @@ class AssessmentOrderReceivedWebhookPayloadLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -251,30 +224,14 @@ class AssessmentOrderReceivedWebhookPayloadHiringTeam(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["email", "first_name", "last_name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -284,7 +241,7 @@ class AssessmentOrderReceivedWebhookPayloadJobTypedDict(TypedDict): r"""Information about the job posting.""" hiring_team: List[AssessmentOrderReceivedWebhookPayloadHiringTeamTypedDict] - r"""The hiring team allows you to sync users into your system who can access the job and its applications.""" + r"""The hiring team allows you to provision users into your system who can access the job and its applications.""" remote_id: NotRequired[Nullable[str]] r"""The job's identifier in the integrated system.""" name: NotRequired[Nullable[str]] @@ -299,7 +256,7 @@ class AssessmentOrderReceivedWebhookPayloadJob(BaseModel): r"""Information about the job posting.""" hiring_team: List[AssessmentOrderReceivedWebhookPayloadHiringTeam] - r"""The hiring team allows you to sync users into your system who can access the job and its applications.""" + r"""The hiring team allows you to provision users into your system who can access the job and its applications.""" remote_id: OptionalNullable[str] = UNSET r"""The job's identifier in the integrated system.""" @@ -312,31 +269,26 @@ class AssessmentOrderReceivedWebhookPayloadJob(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id", "name", "location"] - nullable_fields = ["remote_id", "name", "location"] - null_default_fields = [] - + optional_fields = set(["remote_id", "name", "location"]) + nullable_fields = set(["remote_id", "name", "location"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m diff --git a/src/kombo/models/connectionflowfailedwebhookpayload.py b/src/kombo/models/connectionflowfailedwebhookpayload.py index 261679d..8300d3e 100644 --- a/src/kombo/models/connectionflowfailedwebhookpayload.py +++ b/src/kombo/models/connectionflowfailedwebhookpayload.py @@ -45,30 +45,14 @@ class ConnectionFlowFailedWebhookPayloadEndUser(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["creator_email", "origin_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/kombo/models/datachangedwebhookpayload.py b/src/kombo/models/datachangedwebhookpayload.py index 820594a..a491412 100644 --- a/src/kombo/models/datachangedwebhookpayload.py +++ b/src/kombo/models/datachangedwebhookpayload.py @@ -45,10 +45,10 @@ "ats_rejection_reasons", "lms_users", "lms_course_providers", + "lms_skills", "lms_courses", - "lms_course_progressions", "lms_course_revisions", - "lms_skills", + "lms_course_progressions", "hris_join_employees_teams", "ats_join_candidates_tags", "ats_join_jobs_application_stages", diff --git a/src/kombo/models/deleteatscandidatescandidateidtagsop.py b/src/kombo/models/deleteatscandidatescandidateidtagsop.py index f98b703..26736fc 100644 --- a/src/kombo/models/deleteatscandidatescandidateidtagsop.py +++ b/src/kombo/models/deleteatscandidatescandidateidtagsop.py @@ -5,7 +5,7 @@ DeleteAtsCandidatesCandidateIDTagsRequestBody, DeleteAtsCandidatesCandidateIDTagsRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class DeleteAtsCandidatesCandidateIDTagsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteAtsCandidatesCandidateIDTagsRequestTypedDict(TypedDict): candidate_id: str diff --git a/src/kombo/models/deleteatscandidatescandidateidtagspositiveresponse.py b/src/kombo/models/deleteatscandidatescandidateidtagspositiveresponse.py index 575e112..4a57904 100644 --- a/src/kombo/models/deleteatscandidatescandidateidtagspositiveresponse.py +++ b/src/kombo/models/deleteatscandidatescandidateidtagspositiveresponse.py @@ -42,3 +42,9 @@ class DeleteAtsCandidatesCandidateIDTagsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + DeleteAtsCandidatesCandidateIDTagsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/deleteatscandidatescandidateidtagsrequestbody.py b/src/kombo/models/deleteatscandidatescandidateidtagsrequestbody.py index c7fadb8..84694ee 100644 --- a/src/kombo/models/deleteatscandidatescandidateidtagsrequestbody.py +++ b/src/kombo/models/deleteatscandidatescandidateidtagsrequestbody.py @@ -35,31 +35,26 @@ class DeleteAtsCandidatesCandidateIDTagsRequestBodyPostHeaders(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -81,6 +76,22 @@ class DeleteAtsCandidatesCandidateIDTagsRequestBodyGreenhouse(BaseModel): ) r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteAtsCandidatesCandidateIDTagsRequestBodyWorkableTypedDict(TypedDict): r"""Workable specific remote fields for ATS actions.""" @@ -95,6 +106,22 @@ class DeleteAtsCandidatesCandidateIDTagsRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteAtsCandidatesCandidateIDTagsRequestBodyRemoteFieldsTypedDict(TypedDict): r"""Additional fields that we will pass through to specific ATS systems.""" @@ -118,6 +145,22 @@ class DeleteAtsCandidatesCandidateIDTagsRequestBodyRemoteFields(BaseModel): workable: Optional[DeleteAtsCandidatesCandidateIDTagsRequestBodyWorkable] = None r"""Workable specific remote fields for ATS actions.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["greenhouse", "workable"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteAtsCandidatesCandidateIDTagsRequestBodyTypedDict(TypedDict): tag: DeleteAtsCandidatesCandidateIDTagsRequestBodyTagTypedDict @@ -134,3 +177,25 @@ class DeleteAtsCandidatesCandidateIDTagsRequestBody(BaseModel): DeleteAtsCandidatesCandidateIDTagsRequestBodyRemoteFields ] = None r"""Additional fields that we will pass through to specific ATS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + DeleteAtsCandidatesCandidateIDTagsRequestBodyPostHeaders.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/deletehrisabsencesabsenceidop.py b/src/kombo/models/deletehrisabsencesabsenceidop.py index cb783a8..35000bb 100644 --- a/src/kombo/models/deletehrisabsencesabsenceidop.py +++ b/src/kombo/models/deletehrisabsencesabsenceidop.py @@ -5,7 +5,7 @@ DeleteHrisAbsencesAbsenceIDRequestBody, DeleteHrisAbsencesAbsenceIDRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class DeleteHrisAbsencesAbsenceIDGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteHrisAbsencesAbsenceIDRequestTypedDict(TypedDict): absence_id: str diff --git a/src/kombo/models/deletehrisabsencesabsenceidpositiveresponse.py b/src/kombo/models/deletehrisabsencesabsenceidpositiveresponse.py index 501d527..ceffa70 100644 --- a/src/kombo/models/deletehrisabsencesabsenceidpositiveresponse.py +++ b/src/kombo/models/deletehrisabsencesabsenceidpositiveresponse.py @@ -10,10 +10,10 @@ UNSET_SENTINEL, UnrecognizedStr, ) -from kombo.utils import validate_const, validate_open_enum +from kombo.utils import validate_const import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator, PlainValidator +from pydantic.functional_validators import AfterValidator from typing import Any, List, Literal, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -126,53 +126,47 @@ class DeleteHrisAbsencesAbsenceIDPositiveResponseData(BaseModel): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString """ - status: Annotated[ - OptionalNullable[DeleteHrisAbsencesAbsenceIDPositiveResponseStatus], - PlainValidator(validate_open_enum(False)), - ] = UNSET + status: OptionalNullable[DeleteHrisAbsencesAbsenceIDPositiveResponseStatus] = UNSET r"""The absence’s current status. In rare cases where we can’t find a clear mapping, the original string is passed through.""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["status"] - nullable_fields = [ - "remote_id", - "start_date", - "end_date", - "start_half_day", - "end_half_day", - "start_time", - "end_time", - "amount", - "unit", - "status", - "employee_note", - "type_id", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set(["status"]) + nullable_fields = set( + [ + "remote_id", + "start_date", + "end_date", + "start_half_day", + "end_half_day", + "start_time", + "end_time", + "amount", + "unit", + "status", + "employee_note", + "type_id", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -202,3 +196,9 @@ class DeleteHrisAbsencesAbsenceIDPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + DeleteHrisAbsencesAbsenceIDPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/deletehrisabsencesabsenceidrequestbody.py b/src/kombo/models/deletehrisabsencesabsenceidrequestbody.py index 341b68c..0064e06 100644 --- a/src/kombo/models/deletehrisabsencesabsenceidrequestbody.py +++ b/src/kombo/models/deletehrisabsencesabsenceidrequestbody.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -19,6 +20,22 @@ class DeleteHrisAbsencesAbsenceIDRequestBodyAdpworkforcenow(BaseModel): employment_id: Optional[str] = None r"""[Required] The employment ID of the employee that the absence will be deleted from.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["employment_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteHrisAbsencesAbsenceIDRequestBodyRemoteFieldsTypedDict(TypedDict): r"""Additional fields that we will pass through to specific HRIS systems.""" @@ -37,6 +54,22 @@ class DeleteHrisAbsencesAbsenceIDRequestBodyRemoteFields(BaseModel): ) r"""Fields specific to ADP Workforce Now.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["adpworkforcenow"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class DeleteHrisAbsencesAbsenceIDRequestBodyTypedDict(TypedDict): remote_fields: NotRequired[ @@ -48,3 +81,19 @@ class DeleteHrisAbsencesAbsenceIDRequestBodyTypedDict(TypedDict): class DeleteHrisAbsencesAbsenceIDRequestBody(BaseModel): remote_fields: Optional[DeleteHrisAbsencesAbsenceIDRequestBodyRemoteFields] = None r"""Additional fields that we will pass through to specific HRIS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/deleteintegrationsintegrationidpositiveresponse.py b/src/kombo/models/deleteintegrationsintegrationidpositiveresponse.py index cc4c1cb..dd38d67 100644 --- a/src/kombo/models/deleteintegrationsintegrationidpositiveresponse.py +++ b/src/kombo/models/deleteintegrationsintegrationidpositiveresponse.py @@ -29,3 +29,9 @@ class DeleteIntegrationsIntegrationIDPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + DeleteIntegrationsIntegrationIDPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getassessmentordersopenop.py b/src/kombo/models/getassessmentordersopenop.py index 646ee80..c11f495 100644 --- a/src/kombo/models/getassessmentordersopenop.py +++ b/src/kombo/models/getassessmentordersopenop.py @@ -5,9 +5,10 @@ GetAssessmentOrdersOpenPositiveResponse, GetAssessmentOrdersOpenPositiveResponseTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -25,6 +26,22 @@ class GetAssessmentOrdersOpenGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAssessmentOrdersOpenRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -46,6 +63,22 @@ class GetAssessmentOrdersOpenRequest(BaseModel): ] = 100 r"""The number of results to return per page. Maximum is 250.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["cursor", "page_size"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAssessmentOrdersOpenResponseTypedDict(TypedDict): result: GetAssessmentOrdersOpenPositiveResponseTypedDict diff --git a/src/kombo/models/getassessmentordersopenpositiveresponse.py b/src/kombo/models/getassessmentordersopenpositiveresponse.py index e9497be..6f36238 100644 --- a/src/kombo/models/getassessmentordersopenpositiveresponse.py +++ b/src/kombo/models/getassessmentordersopenpositiveresponse.py @@ -45,31 +45,26 @@ class GetAssessmentOrdersOpenPositiveResponseCandidate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id", "first_name", "last_name", "phone"] - nullable_fields = ["remote_id", "first_name", "last_name", "phone"] - null_default_fields = [] - + optional_fields = set(["remote_id", "first_name", "last_name", "phone"]) + nullable_fields = set(["remote_id", "first_name", "last_name", "phone"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -89,31 +84,26 @@ class GetAssessmentOrdersOpenPositiveResponseApplication(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id"] - nullable_fields = ["remote_id"] - null_default_fields = [] - + optional_fields = set(["remote_id"]) + nullable_fields = set(["remote_id"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -155,47 +145,30 @@ class GetAssessmentOrdersOpenPositiveResponseLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -241,30 +214,14 @@ class GetAssessmentOrdersOpenPositiveResponseHiringTeam(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["email", "first_name", "last_name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -274,7 +231,7 @@ class GetAssessmentOrdersOpenPositiveResponseJobTypedDict(TypedDict): r"""Information about the job posting.""" hiring_team: List[GetAssessmentOrdersOpenPositiveResponseHiringTeamTypedDict] - r"""The hiring team allows you to sync users into your system who can access the job and its applications.""" + r"""The hiring team allows you to provision users into your system who can access the job and its applications.""" remote_id: NotRequired[Nullable[str]] r"""The job's identifier in the integrated system.""" name: NotRequired[Nullable[str]] @@ -289,7 +246,7 @@ class GetAssessmentOrdersOpenPositiveResponseJob(BaseModel): r"""Information about the job posting.""" hiring_team: List[GetAssessmentOrdersOpenPositiveResponseHiringTeam] - r"""The hiring team allows you to sync users into your system who can access the job and its applications.""" + r"""The hiring team allows you to provision users into your system who can access the job and its applications.""" remote_id: OptionalNullable[str] = UNSET r"""The job's identifier in the integrated system.""" @@ -302,31 +259,26 @@ class GetAssessmentOrdersOpenPositiveResponseJob(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id", "name", "location"] - nullable_fields = ["remote_id", "name", "location"] - null_default_fields = [] - + optional_fields = set(["remote_id", "name", "location"]) + nullable_fields = set(["remote_id", "name", "location"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -373,30 +325,14 @@ class GetAssessmentOrdersOpenPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -414,3 +350,9 @@ class GetAssessmentOrdersOpenPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAssessmentOrdersOpenPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getassessmentpackagesop.py b/src/kombo/models/getassessmentpackagesop.py index 27eb8db..b27557c 100644 --- a/src/kombo/models/getassessmentpackagesop.py +++ b/src/kombo/models/getassessmentpackagesop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetAssessmentPackagesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAssessmentPackagesRequestTypedDict(TypedDict): pass diff --git a/src/kombo/models/getassessmentpackagespositiveresponse.py b/src/kombo/models/getassessmentpackagespositiveresponse.py index 6d4dc22..abffea9 100644 --- a/src/kombo/models/getassessmentpackagespositiveresponse.py +++ b/src/kombo/models/getassessmentpackagespositiveresponse.py @@ -47,30 +47,14 @@ class GetAssessmentPackagesPositiveResponsePackage(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["updated_at", "type"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -96,3 +80,9 @@ class GetAssessmentPackagesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAssessmentPackagesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatsapplicationsapplicationidattachmentsop.py b/src/kombo/models/getatsapplicationsapplicationidattachmentsop.py index 1c4a868..dc37888 100644 --- a/src/kombo/models/getatsapplicationsapplicationidattachmentsop.py +++ b/src/kombo/models/getatsapplicationsapplicationidattachmentsop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetAtsApplicationsApplicationIDAttachmentsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsApplicationsApplicationIDAttachmentsRequestTypedDict(TypedDict): application_id: str diff --git a/src/kombo/models/getatsapplicationsapplicationidattachmentspositiveresponse.py b/src/kombo/models/getatsapplicationsapplicationidattachmentspositiveresponse.py index dd129f9..ab120c9 100644 --- a/src/kombo/models/getatsapplicationsapplicationidattachmentspositiveresponse.py +++ b/src/kombo/models/getatsapplicationsapplicationidattachmentspositiveresponse.py @@ -62,30 +62,14 @@ class GetAtsApplicationsApplicationIDAttachmentsPositiveResponseResult(BaseModel @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_created_at", "remote_updated_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -132,3 +116,9 @@ class GetAtsApplicationsApplicationIDAttachmentsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsApplicationsApplicationIDAttachmentsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatsapplicationsop.py b/src/kombo/models/getatsapplicationsop.py index 416e138..d4433dd 100644 --- a/src/kombo/models/getatsapplicationsop.py +++ b/src/kombo/models/getatsapplicationsop.py @@ -6,9 +6,10 @@ GetAtsApplicationsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetAtsApplicationsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsApplicationsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -151,6 +168,37 @@ class GetAtsApplicationsRequest(BaseModel): ] = None r"""Filter applications by the day they were created in the remote system. This allows you to get applications that were created on or after a certain day.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "outcomes", + "job_ids", + "job_remote_ids", + "current_stage_ids", + "remote_created_after", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsApplicationsResponseTypedDict(TypedDict): result: GetAtsApplicationsPositiveResponseTypedDict diff --git a/src/kombo/models/getatsapplicationspositiveresponse.py b/src/kombo/models/getatsapplicationspositiveresponse.py index 786f6ad..7664893 100644 --- a/src/kombo/models/getatsapplicationspositiveresponse.py +++ b/src/kombo/models/getatsapplicationspositiveresponse.py @@ -32,31 +32,26 @@ class GetAtsApplicationsPositiveResponseAnswer7(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["raw"] - nullable_fields = ["raw"] - null_default_fields = [] - + optional_fields = set(["raw"]) + nullable_fields = set(["raw"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -81,30 +76,14 @@ class GetAtsApplicationsPositiveResponseQuestionUnknown(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -130,30 +109,14 @@ class GetAtsApplicationsPositiveResponseAnswer6(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["date"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -177,30 +140,14 @@ class GetAtsApplicationsPositiveResponseQuestionDate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -226,30 +173,14 @@ class GetAtsApplicationsPositiveResponseAnswer5(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["number"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -273,30 +204,14 @@ class GetAtsApplicationsPositiveResponseQuestionNumber(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -322,30 +237,14 @@ class GetAtsApplicationsPositiveResponseAnswer4(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["checked"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -369,30 +268,14 @@ class GetAtsApplicationsPositiveResponseQuestionBoolean(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -416,6 +299,22 @@ class GetAtsApplicationsPositiveResponseAnswer3TypedDict(TypedDict): class GetAtsApplicationsPositiveResponseAnswer3(BaseModel): choices: Optional[List[str]] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["choices"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsApplicationsPositiveResponseQuestionMultiSelectTypedDict(TypedDict): remote_id: Nullable[str] @@ -437,30 +336,14 @@ class GetAtsApplicationsPositiveResponseQuestionMultiSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -486,30 +369,14 @@ class GetAtsApplicationsPositiveResponseAnswer2(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["choice"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -535,30 +402,14 @@ class GetAtsApplicationsPositiveResponseQuestionSingleSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -584,30 +435,14 @@ class GetAtsApplicationsPositiveResponseAnswer1(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["content"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -631,30 +466,14 @@ class GetAtsApplicationsPositiveResponseQuestionText(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -713,31 +532,26 @@ class GetAtsApplicationsPositiveResponseEmailAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email_address"] - nullable_fields = ["email_address", "type"] - null_default_fields = [] - + optional_fields = set(["email_address"]) + nullable_fields = set(["email_address", "type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -756,31 +570,26 @@ class GetAtsApplicationsPositiveResponsePhoneNumber(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["type"] - nullable_fields = ["type"] - null_default_fields = [] - + optional_fields = set(["type"]) + nullable_fields = set(["type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -800,31 +609,26 @@ class GetAtsApplicationsPositiveResponseSocialMedia(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["link", "type", "username"] - nullable_fields = ["link", "type", "username"] - null_default_fields = [] - + optional_fields = set(["link", "type", "username"]) + nullable_fields = set(["link", "type", "username"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -848,30 +652,14 @@ class GetAtsApplicationsPositiveResponseTag(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id", "name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -943,39 +731,36 @@ class GetAtsApplicationsPositiveResponseCandidate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email_addresses", "phone_numbers", "social_media"] - nullable_fields = [ - "first_name", - "last_name", - "email_addresses", - "phone_numbers", - "social_media", - "source", - "remote_url", - ] - null_default_fields = [] - + optional_fields = set(["email_addresses", "phone_numbers", "social_media"]) + nullable_fields = set( + [ + "first_name", + "last_name", + "email_addresses", + "phone_numbers", + "social_media", + "source", + "remote_url", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1004,30 +789,14 @@ class GetAtsApplicationsPositiveResponseCurrentStage(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id", "name", "index"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -1054,30 +823,14 @@ class GetAtsApplicationsPositiveResponseJob(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -1120,47 +873,30 @@ class GetAtsApplicationsPositiveResponseLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1214,38 +950,28 @@ class Interview(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["location"] - nullable_fields = [ - "remote_id", - "title", - "starting_at", - "ending_at", - "location", - "canceled", - ] - null_default_fields = [] - + optional_fields = set(["location"]) + nullable_fields = set( + ["remote_id", "title", "starting_at", "ending_at", "location", "canceled"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1318,30 +1044,14 @@ class Offer(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id", "status"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -1475,48 +1185,45 @@ class GetAtsApplicationsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["screening_question_answers"] - nullable_fields = [ - "remote_id", - "outcome", - "rejection_reason_name", - "rejected_at", - "current_stage_id", - "job_id", - "candidate_id", - "screening_question_answers", - "custom_fields", - "remote_url", - "remote_deleted_at", - "remote_created_at", - "remote_updated_at", - "candidate", - "current_stage", - "job", - ] - null_default_fields = [] - + optional_fields = set(["screening_question_answers"]) + nullable_fields = set( + [ + "remote_id", + "outcome", + "rejection_reason_name", + "rejected_at", + "current_stage_id", + "job_id", + "candidate_id", + "screening_question_answers", + "custom_fields", + "remote_url", + "remote_deleted_at", + "remote_created_at", + "remote_updated_at", + "candidate", + "current_stage", + "job", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1535,30 +1242,14 @@ class GetAtsApplicationsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -1576,3 +1267,41 @@ class GetAtsApplicationsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsApplicationsPositiveResponseQuestionUnknown.model_rebuild() +except NameError: + pass +try: + GetAtsApplicationsPositiveResponseAnswer6.model_rebuild() +except NameError: + pass +try: + GetAtsApplicationsPositiveResponseQuestionDate.model_rebuild() +except NameError: + pass +try: + GetAtsApplicationsPositiveResponseQuestionNumber.model_rebuild() +except NameError: + pass +try: + GetAtsApplicationsPositiveResponseQuestionBoolean.model_rebuild() +except NameError: + pass +try: + GetAtsApplicationsPositiveResponseQuestionMultiSelect.model_rebuild() +except NameError: + pass +try: + GetAtsApplicationsPositiveResponseQuestionSingleSelect.model_rebuild() +except NameError: + pass +try: + GetAtsApplicationsPositiveResponseQuestionText.model_rebuild() +except NameError: + pass +try: + GetAtsApplicationsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatsapplicationstagesop.py b/src/kombo/models/getatsapplicationstagesop.py index 3522276..4999e1d 100644 --- a/src/kombo/models/getatsapplicationstagesop.py +++ b/src/kombo/models/getatsapplicationstagesop.py @@ -6,9 +6,10 @@ GetAtsApplicationStagesPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetAtsApplicationStagesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsApplicationStagesRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -97,6 +114,32 @@ class GetAtsApplicationStagesRequest(BaseModel): ] = None r"""Filter by a comma-separated list of remote IDs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsApplicationStagesResponseTypedDict(TypedDict): result: GetAtsApplicationStagesPositiveResponseTypedDict diff --git a/src/kombo/models/getatsapplicationstagespositiveresponse.py b/src/kombo/models/getatsapplicationstagespositiveresponse.py index de1e5b5..132e314 100644 --- a/src/kombo/models/getatsapplicationstagespositiveresponse.py +++ b/src/kombo/models/getatsapplicationstagespositiveresponse.py @@ -50,30 +50,14 @@ class GetAtsApplicationStagesPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id", "name", "remote_deleted_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -93,30 +77,14 @@ class GetAtsApplicationStagesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -134,3 +102,9 @@ class GetAtsApplicationStagesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsApplicationStagesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatscandidatescandidateidattachmentsop.py b/src/kombo/models/getatscandidatescandidateidattachmentsop.py index debb68c..78aaf39 100644 --- a/src/kombo/models/getatscandidatescandidateidattachmentsop.py +++ b/src/kombo/models/getatscandidatescandidateidattachmentsop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, PathParamMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetAtsCandidatesCandidateIDAttachmentsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsCandidatesCandidateIDAttachmentsRequestTypedDict(TypedDict): candidate_id: str diff --git a/src/kombo/models/getatscandidatescandidateidattachmentspositiveresponse.py b/src/kombo/models/getatscandidatescandidateidattachmentspositiveresponse.py index feeb575..948ff44 100644 --- a/src/kombo/models/getatscandidatescandidateidattachmentspositiveresponse.py +++ b/src/kombo/models/getatscandidatescandidateidattachmentspositiveresponse.py @@ -72,30 +72,14 @@ class GetAtsCandidatesCandidateIDAttachmentsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["application_id", "remote_created_at", "remote_updated_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -136,3 +120,9 @@ class GetAtsCandidatesCandidateIDAttachmentsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsCandidatesCandidateIDAttachmentsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatscandidatesop.py b/src/kombo/models/getatscandidatesop.py index a1ea172..a3a6290 100644 --- a/src/kombo/models/getatscandidatesop.py +++ b/src/kombo/models/getatscandidatesop.py @@ -6,9 +6,10 @@ GetAtsCandidatesPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetAtsCandidatesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsCandidatesRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -129,6 +146,36 @@ class GetAtsCandidatesRequest(BaseModel): ] = None r"""Filter candidates by last name. This filter is case-insensitive and matches the exact last name. Fuzzy matching might be enabled in the future, so consider this for your implementation.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "email", + "job_ids", + "first_name", + "last_name", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsCandidatesResponseTypedDict(TypedDict): result: GetAtsCandidatesPositiveResponseTypedDict diff --git a/src/kombo/models/getatscandidatespositiveresponse.py b/src/kombo/models/getatscandidatespositiveresponse.py index b46795a..50b44b4 100644 --- a/src/kombo/models/getatscandidatespositiveresponse.py +++ b/src/kombo/models/getatscandidatespositiveresponse.py @@ -25,31 +25,26 @@ class GetAtsCandidatesPositiveResponsePhoneNumber(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["type"] - nullable_fields = ["type"] - null_default_fields = [] - + optional_fields = set(["type"]) + nullable_fields = set(["type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -68,31 +63,26 @@ class GetAtsCandidatesPositiveResponseEmailAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email_address"] - nullable_fields = ["email_address", "type"] - null_default_fields = [] - + optional_fields = set(["email_address"]) + nullable_fields = set(["email_address", "type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -112,31 +102,26 @@ class GetAtsCandidatesPositiveResponseSocialMedia(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["link", "type", "username"] - nullable_fields = ["link", "type", "username"] - null_default_fields = [] - + optional_fields = set(["link", "type", "username"]) + nullable_fields = set(["link", "type", "username"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -178,47 +163,30 @@ class GetAtsCandidatesPositiveResponseLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -257,30 +225,14 @@ class GetAtsCandidatesPositiveResponseCurrentStage(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "remote_id", "index"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -307,30 +259,14 @@ class GetAtsCandidatesPositiveResponseJob(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -413,40 +349,14 @@ class GetAtsCandidatesPositiveResponseApplication(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "remote_id", - "outcome", - "rejection_reason_name", - "rejected_at", - "remote_url", - "remote_created_at", - "remote_updated_at", - "current_stage", - "job", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -471,30 +381,14 @@ class GetAtsCandidatesPositiveResponseTag(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -630,52 +524,46 @@ class GetAtsCandidatesPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "phone_numbers", - "email_addresses", - "social_media", - "location", - ] - nullable_fields = [ - "first_name", - "last_name", - "company", - "title", - "confidential", - "source", - "phone_numbers", - "email_addresses", - "social_media", - "location", - "custom_fields", - "remote_url", - "remote_created_at", - "remote_updated_at", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set( + ["phone_numbers", "email_addresses", "social_media", "location"] + ) + nullable_fields = set( + [ + "first_name", + "last_name", + "company", + "title", + "confidential", + "source", + "phone_numbers", + "email_addresses", + "social_media", + "location", + "custom_fields", + "remote_url", + "remote_created_at", + "remote_updated_at", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -694,30 +582,14 @@ class GetAtsCandidatesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -735,3 +607,9 @@ class GetAtsCandidatesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsCandidatesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatsinterviewsop.py b/src/kombo/models/getatsinterviewsop.py index e31ffb5..3229d37 100644 --- a/src/kombo/models/getatsinterviewsop.py +++ b/src/kombo/models/getatsinterviewsop.py @@ -6,9 +6,10 @@ GetAtsInterviewsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetAtsInterviewsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsInterviewsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -105,6 +122,33 @@ class GetAtsInterviewsRequest(BaseModel): ] = None r"""Filter by a comma-separated list of job IDs. We will only return interviews for applications associated with any of these jobs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "job_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsInterviewsResponseTypedDict(TypedDict): result: GetAtsInterviewsPositiveResponseTypedDict diff --git a/src/kombo/models/getatsinterviewspositiveresponse.py b/src/kombo/models/getatsinterviewspositiveresponse.py index e104d62..fb8b1b6 100644 --- a/src/kombo/models/getatsinterviewspositiveresponse.py +++ b/src/kombo/models/getatsinterviewspositiveresponse.py @@ -48,47 +48,30 @@ class GetAtsInterviewsPositiveResponseLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -124,31 +107,26 @@ class User(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email"] - nullable_fields = ["remote_id", "first_name", "last_name", "email"] - null_default_fields = [] - + optional_fields = set(["email"]) + nullable_fields = set(["remote_id", "first_name", "last_name", "email"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -177,31 +155,26 @@ class GetAtsInterviewsPositiveResponseEmailAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email_address"] - nullable_fields = ["email_address", "type"] - null_default_fields = [] - + optional_fields = set(["email_address"]) + nullable_fields = set(["email_address", "type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -241,31 +214,26 @@ class GetAtsInterviewsPositiveResponseCandidate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email_addresses"] - nullable_fields = ["first_name", "last_name", "email_addresses"] - null_default_fields = [] - + optional_fields = set(["email_addresses"]) + nullable_fields = set(["first_name", "last_name", "email_addresses"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -291,30 +259,14 @@ class GetAtsInterviewsPositiveResponseJob(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -356,36 +308,14 @@ class GetAtsInterviewsPositiveResponseApplication(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "remote_id", - "outcome", - "rejection_reason_name", - "candidate", - "job", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -406,6 +336,8 @@ class GetAtsInterviewsPositiveResponseResultTypedDict(TypedDict): r"""The end time of the interview. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString """ + video_conferencing_url: Nullable[str] + r"""The URL of the video conferencing platform used for the interview.""" application_id: Nullable[str] r"""The Kombo ID of the application this interview belongs to. The ID can be used to retrieve the application from the `get applications` endpoint.""" stage_id: Nullable[str] @@ -454,6 +386,9 @@ class GetAtsInterviewsPositiveResponseResult(BaseModel): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString """ + video_conferencing_url: Nullable[str] + r"""The URL of the video conferencing platform used for the interview.""" + application_id: Nullable[str] r"""The Kombo ID of the application this interview belongs to. The ID can be used to retrieve the application from the `get applications` endpoint.""" @@ -492,44 +427,42 @@ class GetAtsInterviewsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["location"] - nullable_fields = [ - "remote_id", - "title", - "starting_at", - "ending_at", - "location", - "application_id", - "stage_id", - "canceled", - "remote_created_at", - "remote_updated_at", - "remote_deleted_at", - "application", - ] - null_default_fields = [] - + optional_fields = set(["location"]) + nullable_fields = set( + [ + "remote_id", + "title", + "starting_at", + "ending_at", + "location", + "video_conferencing_url", + "application_id", + "stage_id", + "canceled", + "remote_created_at", + "remote_updated_at", + "remote_deleted_at", + "application", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -548,30 +481,14 @@ class GetAtsInterviewsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -589,3 +506,9 @@ class GetAtsInterviewsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsInterviewsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatsjobsop.py b/src/kombo/models/getatsjobsop.py index a330716..4fe1bb9 100644 --- a/src/kombo/models/getatsjobsop.py +++ b/src/kombo/models/getatsjobsop.py @@ -6,9 +6,10 @@ GetAtsJobsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetAtsJobsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsJobsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -171,6 +188,39 @@ class GetAtsJobsRequest(BaseModel): ] = None r"""Filter by the `name` field. Can be used to find a job by keywords present in the job name.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "job_codes", + "post_url", + "statuses", + "employment_types", + "visibilities", + "remote_created_after", + "name_contains", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsJobsResponseTypedDict(TypedDict): result: GetAtsJobsPositiveResponseTypedDict diff --git a/src/kombo/models/getatsjobspositiveresponse.py b/src/kombo/models/getatsjobspositiveresponse.py index 7e202d8..40e3437 100644 --- a/src/kombo/models/getatsjobspositiveresponse.py +++ b/src/kombo/models/getatsjobspositiveresponse.py @@ -10,10 +10,10 @@ UNSET_SENTINEL, UnrecognizedStr, ) -from kombo.utils import validate_const, validate_open_enum +from kombo.utils import validate_const import pydantic from pydantic import Field, model_serializer -from pydantic.functional_validators import AfterValidator, PlainValidator +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -113,47 +113,30 @@ class GetAtsJobsPositiveResponseLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -184,31 +167,26 @@ class Stage(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["index"] - nullable_fields = ["remote_id", "name", "index"] - null_default_fields = [] - + optional_fields = set(["index"]) + nullable_fields = set(["remote_id", "name", "index"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -230,6 +208,22 @@ class FormatUnknown(BaseModel): ] = "UNKNOWN" r"""When we're not able to map a specific question type yet, we will return this type. Every `UNKNOWN` question will also be parsed and unified by us at some point.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["raw_question"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class FormatInformationTypedDict(TypedDict): type: Literal["INFORMATION"] @@ -267,31 +261,26 @@ class Option2(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id"] - nullable_fields = ["remote_id"] - null_default_fields = [] - + optional_fields = set(["remote_id"]) + nullable_fields = set(["remote_id"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -361,31 +350,26 @@ class Option1(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id"] - nullable_fields = ["remote_id"] - null_default_fields = [] - + optional_fields = set(["remote_id"]) + nullable_fields = set(["remote_id"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -410,31 +394,26 @@ class FormatSingleSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["display_type"] - nullable_fields = ["display_type"] - null_default_fields = [] - + optional_fields = set(["display_type"]) + nullable_fields = set(["display_type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -457,31 +436,26 @@ class FormatFile(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["accepted_mime_types", "max_file_size_bytes"] - nullable_fields = ["accepted_mime_types", "max_file_size_bytes"] - null_default_fields = [] - + optional_fields = set(["accepted_mime_types", "max_file_size_bytes"]) + nullable_fields = set(["accepted_mime_types", "max_file_size_bytes"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -513,31 +487,26 @@ class FormatNumber(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["display_type", "max", "min"] - nullable_fields = ["display_type", "max", "min"] - null_default_fields = [] - + optional_fields = set(["display_type", "max", "min"]) + nullable_fields = set(["display_type", "max", "min"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -571,31 +540,26 @@ class FormatText(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["display_type", "max_length"] - nullable_fields = ["display_type", "max_length"] - null_default_fields = [] - + optional_fields = set(["display_type", "max_length"]) + nullable_fields = set(["display_type", "max_length"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -697,46 +661,40 @@ class ScreeningQuestion(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "format", - "index", - "precondition_question_id", - "precondition_options", - ] - nullable_fields = [ - "remote_id", - "title", - "description", - "format", - "category", - "index", - "required", - "precondition_question_id", - "precondition_options", - ] - null_default_fields = [] - + optional_fields = set( + ["format", "index", "precondition_question_id", "precondition_options"] + ) + nullable_fields = set( + [ + "remote_id", + "title", + "description", + "format", + "category", + "index", + "required", + "precondition_question_id", + "precondition_options", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -795,37 +753,14 @@ class JobPosting(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "remote_id", - "title", - "description_html", - "status", - "visibility", - "url", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -873,31 +808,26 @@ class GetAtsJobsPositiveResponseHiringTeam(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email"] - nullable_fields = ["remote_id", "first_name", "last_name", "email"] - null_default_fields = [] - + optional_fields = set(["email"]) + nullable_fields = set(["remote_id", "first_name", "last_name", "email"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1107,16 +1037,10 @@ class GetAtsJobsPositiveResponseResult(BaseModel): hiring_team: List[GetAtsJobsPositiveResponseHiringTeam] r"""The hiring team allows you to sync users into your system who can access the job and its applications.""" - employment_type: Annotated[ - OptionalNullable[GetAtsJobsPositiveResponseEmploymentType], - PlainValidator(validate_open_enum(False)), - ] = UNSET + employment_type: OptionalNullable[GetAtsJobsPositiveResponseEmploymentType] = UNSET r"""The type of employment contract. In rare cases where can't find a clear mapping, the original string is passed through.""" - status: Annotated[ - OptionalNullable[GetAtsJobsPositiveResponseStatus], - PlainValidator(validate_open_enum(False)), - ] = UNSET + status: OptionalNullable[GetAtsJobsPositiveResponseStatus] = UNSET r"""The job's current status. *Note: For any checks (e.g., \"can we publish this job?\"), always evaluate both `status` and `visibility`. For example, a job can be `status=OPEN` with `visibility=INTERNAL`, meaning only existing employees can apply.* @@ -1124,9 +1048,7 @@ class GetAtsJobsPositiveResponseResult(BaseModel): In rare cases where we can’t find a clear mapping, the original string is passed through. """ - visibility: Annotated[ - OptionalNullable[Visibility], PlainValidator(validate_open_enum(False)) - ] = UNSET + visibility: OptionalNullable[Visibility] = UNSET r"""Describes the visibility of the job: - `PUBLIC`: visible to everyone, published on a job board @@ -1139,14 +1061,10 @@ class GetAtsJobsPositiveResponseResult(BaseModel): In rare cases where we can’t find a clear mapping, the original string is passed through. """ - remote_work_status: Annotated[ - OptionalNullable[RemoteWorkStatus], PlainValidator(validate_open_enum(False)) - ] = UNSET + remote_work_status: OptionalNullable[RemoteWorkStatus] = UNSET r"""Defines if the job supports remote work and if so, to what extent.""" - salary_period: Annotated[ - OptionalNullable[SalaryPeriod], PlainValidator(validate_open_enum(False)) - ] = UNSET + salary_period: OptionalNullable[SalaryPeriod] = UNSET r"""The period of time over which the salary amount is paid (not equal to the pay frequency). In rare cases where we can’t find a clear mapping, the original string is passed through.""" location: OptionalNullable[GetAtsJobsPositiveResponseLocation] = UNSET @@ -1154,66 +1072,65 @@ class GetAtsJobsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "employment_type", - "status", - "visibility", - "remote_work_status", - "salary_period", - "location", - ] - nullable_fields = [ - "name", - "job_code", - "description", - "confidential", - "weekly_hours", - "employment_type", - "status", - "visibility", - "category", - "department", - "post_url", - "experience_level", - "remote_work_status", - "salary_amount", - "salary_amount_from", - "salary_amount_to", - "salary_currency", - "salary_period", - "location", - "custom_fields", - "remote_url", - "opened_at", - "closed_at", - "remote_created_at", - "remote_updated_at", - "contact_id", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set( + [ + "employment_type", + "status", + "visibility", + "remote_work_status", + "salary_period", + "location", + ] + ) + nullable_fields = set( + [ + "name", + "job_code", + "description", + "confidential", + "weekly_hours", + "employment_type", + "status", + "visibility", + "category", + "department", + "post_url", + "experience_level", + "remote_work_status", + "salary_amount", + "salary_amount_from", + "salary_amount_to", + "salary_currency", + "salary_period", + "location", + "custom_fields", + "remote_url", + "opened_at", + "closed_at", + "remote_created_at", + "remote_updated_at", + "contact_id", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1232,30 +1149,14 @@ class GetAtsJobsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -1273,3 +1174,49 @@ class GetAtsJobsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + FormatUnknown.model_rebuild() +except NameError: + pass +try: + FormatInformation.model_rebuild() +except NameError: + pass +try: + FormatMultiSelect.model_rebuild() +except NameError: + pass +try: + FormatDate.model_rebuild() +except NameError: + pass +try: + FormatBoolean.model_rebuild() +except NameError: + pass +try: + FormatSingleSelect.model_rebuild() +except NameError: + pass +try: + FormatFile.model_rebuild() +except NameError: + pass +try: + FormatNumber.model_rebuild() +except NameError: + pass +try: + FormatText.model_rebuild() +except NameError: + pass +try: + ScreeningQuestion.model_rebuild() +except NameError: + pass +try: + GetAtsJobsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatsoffersop.py b/src/kombo/models/getatsoffersop.py index e12ef14..a3b7407 100644 --- a/src/kombo/models/getatsoffersop.py +++ b/src/kombo/models/getatsoffersop.py @@ -6,9 +6,10 @@ GetAtsOffersPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetAtsOffersGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsOffersRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -97,6 +114,32 @@ class GetAtsOffersRequest(BaseModel): ] = None r"""Filter by a comma-separated list of remote IDs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsOffersResponseTypedDict(TypedDict): result: GetAtsOffersPositiveResponseTypedDict diff --git a/src/kombo/models/getatsofferspositiveresponse.py b/src/kombo/models/getatsofferspositiveresponse.py index 9136457..0a5d85e 100644 --- a/src/kombo/models/getatsofferspositiveresponse.py +++ b/src/kombo/models/getatsofferspositiveresponse.py @@ -48,31 +48,26 @@ class GetAtsOffersPositiveResponseEmailAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email_address"] - nullable_fields = ["email_address", "type"] - null_default_fields = [] - + optional_fields = set(["email_address"]) + nullable_fields = set(["email_address", "type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -112,31 +107,26 @@ class GetAtsOffersPositiveResponseCandidate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email_addresses"] - nullable_fields = ["first_name", "last_name", "email_addresses"] - null_default_fields = [] - + optional_fields = set(["email_addresses"]) + nullable_fields = set(["first_name", "last_name", "email_addresses"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -162,30 +152,14 @@ class GetAtsOffersPositiveResponseJob(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -203,30 +177,14 @@ class GetAtsOffersPositiveResponseApplication(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["candidate", "job"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -335,40 +293,14 @@ class GetAtsOffersPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "remote_id", - "status", - "employment_start_date", - "application_id", - "custom_fields", - "remote_deleted_at", - "remote_created_at", - "remote_updated_at", - "application", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -388,30 +320,14 @@ class GetAtsOffersPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -429,3 +345,9 @@ class GetAtsOffersPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsOffersPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatsrejectionreasonsop.py b/src/kombo/models/getatsrejectionreasonsop.py index 9b5d80a..a8e7066 100644 --- a/src/kombo/models/getatsrejectionreasonsop.py +++ b/src/kombo/models/getatsrejectionreasonsop.py @@ -6,9 +6,10 @@ GetAtsRejectionReasonsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetAtsRejectionReasonsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsRejectionReasonsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -97,6 +114,32 @@ class GetAtsRejectionReasonsRequest(BaseModel): ] = None r"""Filter by a comma-separated list of remote IDs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsRejectionReasonsResponseTypedDict(TypedDict): result: GetAtsRejectionReasonsPositiveResponseTypedDict diff --git a/src/kombo/models/getatsrejectionreasonspositiveresponse.py b/src/kombo/models/getatsrejectionreasonspositiveresponse.py index 05f3d8b..1294292 100644 --- a/src/kombo/models/getatsrejectionreasonspositiveresponse.py +++ b/src/kombo/models/getatsrejectionreasonspositiveresponse.py @@ -50,30 +50,14 @@ class GetAtsRejectionReasonsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "remote_deleted_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -93,30 +77,14 @@ class GetAtsRejectionReasonsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -134,3 +102,9 @@ class GetAtsRejectionReasonsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsRejectionReasonsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatstagsop.py b/src/kombo/models/getatstagsop.py index e430d50..847be46 100644 --- a/src/kombo/models/getatstagsop.py +++ b/src/kombo/models/getatstagsop.py @@ -6,9 +6,10 @@ GetAtsTagsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetAtsTagsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsTagsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -97,6 +114,32 @@ class GetAtsTagsRequest(BaseModel): ] = None r"""Filter by a comma-separated list of remote IDs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsTagsResponseTypedDict(TypedDict): result: GetAtsTagsPositiveResponseTypedDict diff --git a/src/kombo/models/getatstagspositiveresponse.py b/src/kombo/models/getatstagspositiveresponse.py index 9b62670..6c0dcb1 100644 --- a/src/kombo/models/getatstagspositiveresponse.py +++ b/src/kombo/models/getatstagspositiveresponse.py @@ -48,30 +48,14 @@ class GetAtsTagsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id", "name", "remote_deleted_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -91,30 +75,14 @@ class GetAtsTagsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -132,3 +100,9 @@ class GetAtsTagsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsTagsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getatsusersop.py b/src/kombo/models/getatsusersop.py index 302833a..4eee014 100644 --- a/src/kombo/models/getatsusersop.py +++ b/src/kombo/models/getatsusersop.py @@ -6,9 +6,10 @@ GetAtsUsersPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetAtsUsersGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsUsersRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -105,6 +122,33 @@ class GetAtsUsersRequest(BaseModel): ] = None r"""Filter by a comma-separated list of emails. We will only return users who have _any_ of the emails. The format of the emails is case-insensitive.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "emails", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetAtsUsersResponseTypedDict(TypedDict): result: GetAtsUsersPositiveResponseTypedDict diff --git a/src/kombo/models/getatsuserspositiveresponse.py b/src/kombo/models/getatsuserspositiveresponse.py index e2776dc..5ae0848 100644 --- a/src/kombo/models/getatsuserspositiveresponse.py +++ b/src/kombo/models/getatsuserspositiveresponse.py @@ -72,38 +72,35 @@ class GetAtsUsersPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email"] - nullable_fields = [ - "remote_id", - "first_name", - "last_name", - "email", - "status", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set(["email"]) + nullable_fields = set( + [ + "remote_id", + "first_name", + "last_name", + "email", + "status", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -122,30 +119,14 @@ class GetAtsUsersPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -163,3 +144,9 @@ class GetAtsUsersPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetAtsUsersPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getcheckapikeypositiveresponse.py b/src/kombo/models/getcheckapikeypositiveresponse.py index 191e316..979eadc 100644 --- a/src/kombo/models/getcheckapikeypositiveresponse.py +++ b/src/kombo/models/getcheckapikeypositiveresponse.py @@ -29,3 +29,9 @@ class GetCheckAPIKeyPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetCheckAPIKeyPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getconnectintegrationbytokentokenpositiveresponse.py b/src/kombo/models/getconnectintegrationbytokentokenpositiveresponse.py index 4cee930..4760ac9 100644 --- a/src/kombo/models/getconnectintegrationbytokentokenpositiveresponse.py +++ b/src/kombo/models/getconnectintegrationbytokentokenpositiveresponse.py @@ -59,30 +59,14 @@ class GetConnectIntegrationByTokenTokenPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["end_user_origin_id", "end_user_email"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -100,3 +84,9 @@ class GetConnectIntegrationByTokenTokenPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetConnectIntegrationByTokenTokenPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrisabsencesop.py b/src/kombo/models/gethrisabsencesop.py index e3a11f0..55b7925 100644 --- a/src/kombo/models/gethrisabsencesop.py +++ b/src/kombo/models/gethrisabsencesop.py @@ -6,9 +6,10 @@ GetHrisAbsencesPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisAbsencesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisAbsencesRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -129,6 +146,36 @@ class GetHrisAbsencesRequest(BaseModel): ] = None r"""Filter by a specific employee using their ID.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "date_from", + "date_until", + "type_ids", + "employee_id", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisAbsencesResponseTypedDict(TypedDict): result: GetHrisAbsencesPositiveResponseTypedDict diff --git a/src/kombo/models/gethrisabsencespositiveresponse.py b/src/kombo/models/gethrisabsencespositiveresponse.py index e999753..a201536 100644 --- a/src/kombo/models/gethrisabsencespositiveresponse.py +++ b/src/kombo/models/gethrisabsencespositiveresponse.py @@ -10,10 +10,10 @@ UNSET_SENTINEL, UnrecognizedStr, ) -from kombo.utils import validate_const, validate_open_enum +from kombo.utils import validate_const import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator, PlainValidator +from pydantic.functional_validators import AfterValidator from typing import Any, List, Literal, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -98,36 +98,14 @@ class GetHrisAbsencesPositiveResponseType(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "name", - "unit", - "half_days_supported", - "exact_times_supported", - "remote_deleted_at", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -225,54 +203,48 @@ class GetHrisAbsencesPositiveResponseResult(BaseModel): type: Nullable[GetHrisAbsencesPositiveResponseType] - status: Annotated[ - OptionalNullable[GetHrisAbsencesPositiveResponseStatus], - PlainValidator(validate_open_enum(False)), - ] = UNSET + status: OptionalNullable[GetHrisAbsencesPositiveResponseStatus] = UNSET r"""The absence’s current status. In rare cases where we can’t find a clear mapping, the original string is passed through.""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["status"] - nullable_fields = [ - "remote_id", - "start_date", - "end_date", - "start_half_day", - "end_half_day", - "start_time", - "end_time", - "amount", - "unit", - "status", - "employee_note", - "type_id", - "remote_deleted_at", - "type", - ] - null_default_fields = [] - + optional_fields = set(["status"]) + nullable_fields = set( + [ + "remote_id", + "start_date", + "end_date", + "start_half_day", + "end_half_day", + "start_time", + "end_time", + "amount", + "unit", + "status", + "employee_note", + "type_id", + "remote_deleted_at", + "type", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -291,30 +263,14 @@ class GetHrisAbsencesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -332,3 +288,9 @@ class GetHrisAbsencesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisAbsencesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrisabsencetypesop.py b/src/kombo/models/gethrisabsencetypesop.py index 145f666..1ae1f0c 100644 --- a/src/kombo/models/gethrisabsencetypesop.py +++ b/src/kombo/models/gethrisabsencetypesop.py @@ -6,9 +6,10 @@ GetHrisAbsenceTypesPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisAbsenceTypesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisAbsenceTypesRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -97,6 +114,32 @@ class GetHrisAbsenceTypesRequest(BaseModel): ] = None r"""Filter by a comma-separated list of remote IDs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisAbsenceTypesResponseTypedDict(TypedDict): result: GetHrisAbsenceTypesPositiveResponseTypedDict diff --git a/src/kombo/models/gethrisabsencetypespositiveresponse.py b/src/kombo/models/gethrisabsencetypespositiveresponse.py index e4b0c0f..74c745c 100644 --- a/src/kombo/models/gethrisabsencetypespositiveresponse.py +++ b/src/kombo/models/gethrisabsencetypespositiveresponse.py @@ -72,36 +72,14 @@ class GetHrisAbsenceTypesPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "name", - "unit", - "half_days_supported", - "exact_times_supported", - "remote_deleted_at", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -121,30 +99,14 @@ class GetHrisAbsenceTypesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -162,3 +124,9 @@ class GetHrisAbsenceTypesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisAbsenceTypesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrisemployeedocumentcategoriesop.py b/src/kombo/models/gethrisemployeedocumentcategoriesop.py index e161453..9350780 100644 --- a/src/kombo/models/gethrisemployeedocumentcategoriesop.py +++ b/src/kombo/models/gethrisemployeedocumentcategoriesop.py @@ -6,9 +6,10 @@ GetHrisEmployeeDocumentCategoriesPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisEmployeeDocumentCategoriesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisEmployeeDocumentCategoriesRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -97,6 +114,32 @@ class GetHrisEmployeeDocumentCategoriesRequest(BaseModel): ] = None r"""Filter by a comma-separated list of remote IDs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisEmployeeDocumentCategoriesResponseTypedDict(TypedDict): result: GetHrisEmployeeDocumentCategoriesPositiveResponseTypedDict diff --git a/src/kombo/models/gethrisemployeedocumentcategoriespositiveresponse.py b/src/kombo/models/gethrisemployeedocumentcategoriespositiveresponse.py index 9d61ad2..b4e1e7c 100644 --- a/src/kombo/models/gethrisemployeedocumentcategoriespositiveresponse.py +++ b/src/kombo/models/gethrisemployeedocumentcategoriespositiveresponse.py @@ -50,30 +50,14 @@ class GetHrisEmployeeDocumentCategoriesPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id", "name", "remote_deleted_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -93,30 +77,14 @@ class GetHrisEmployeeDocumentCategoriesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -134,3 +102,9 @@ class GetHrisEmployeeDocumentCategoriesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisEmployeeDocumentCategoriesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrisemployeesformop.py b/src/kombo/models/gethrisemployeesformop.py index d857d0f..2eac9d0 100644 --- a/src/kombo/models/gethrisemployeesformop.py +++ b/src/kombo/models/gethrisemployeesformop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -21,6 +22,22 @@ class GetHrisEmployeesFormGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisEmployeesFormRequestTypedDict(TypedDict): pass diff --git a/src/kombo/models/gethrisemployeesformpositiveresponse.py b/src/kombo/models/gethrisemployeesformpositiveresponse.py index 05e2379..6d0584f 100644 --- a/src/kombo/models/gethrisemployeesformpositiveresponse.py +++ b/src/kombo/models/gethrisemployeesformpositiveresponse.py @@ -48,31 +48,26 @@ class GetHrisEmployeesFormPositiveResponseFileRestrictions(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["max_file_size"] - nullable_fields = ["max_file_size"] - null_default_fields = [] - + optional_fields = set(["max_file_size"]) + nullable_fields = set(["max_file_size"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -106,31 +101,26 @@ class PropertiesFile(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -194,31 +184,26 @@ class PropertiesArray(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min_items", "max_items"] - nullable_fields = ["description", "unified_key", "min_items", "max_items"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min_items", "max_items"]) + nullable_fields = set(["description", "unified_key", "min_items", "max_items"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -276,31 +261,26 @@ class PropertiesObject(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -355,31 +335,26 @@ class PropertiesCheckbox(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -424,6 +399,22 @@ class GetHrisEmployeesFormPositiveResponseEntry2(BaseModel): unified_value: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["unified_value"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisEmployeesFormPositiveResponseOptionsInline2TypedDict(TypedDict): entries: List[GetHrisEmployeesFormPositiveResponseEntry2TypedDict] @@ -492,31 +483,26 @@ class PropertiesMultiSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min_items", "max_items"] - nullable_fields = ["description", "unified_key", "min_items", "max_items"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min_items", "max_items"]) + nullable_fields = set(["description", "unified_key", "min_items", "max_items"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -585,6 +571,22 @@ class GetHrisEmployeesFormPositiveResponseEntry1(BaseModel): unified_value: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["unified_value"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisEmployeesFormPositiveResponseOptionsInline1TypedDict(TypedDict): entries: List[GetHrisEmployeesFormPositiveResponseEntry1TypedDict] @@ -649,31 +651,26 @@ class PropertiesSingleSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -728,31 +725,26 @@ class PropertiesDate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -813,31 +805,26 @@ class PropertiesNumber(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min", "max"] - nullable_fields = ["description", "unified_key", "min", "max"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min", "max"]) + nullable_fields = set(["description", "unified_key", "min", "max"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -901,43 +888,30 @@ class PropertiesText(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "description", - "unified_key", - "min_length", - "max_length", - "reg_exp", - ] - nullable_fields = [ - "description", - "unified_key", - "min_length", - "max_length", - "reg_exp", - ] - null_default_fields = [] - + optional_fields = set( + ["description", "unified_key", "min_length", "max_length", "reg_exp"] + ) + nullable_fields = set( + ["description", "unified_key", "min_length", "max_length", "reg_exp"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1007,3 +981,61 @@ class GetHrisEmployeesFormPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PropertiesFile.model_rebuild() +except NameError: + pass +try: + PropertiesArray.model_rebuild() +except NameError: + pass +try: + PropertiesObject.model_rebuild() +except NameError: + pass +try: + PropertiesCheckbox.model_rebuild() +except NameError: + pass +try: + GetHrisEmployeesFormPositiveResponseOptionsReferenced2.model_rebuild() +except NameError: + pass +try: + GetHrisEmployeesFormPositiveResponseOptionsInline2.model_rebuild() +except NameError: + pass +try: + PropertiesMultiSelect.model_rebuild() +except NameError: + pass +try: + GetHrisEmployeesFormPositiveResponseOptionsReferenced1.model_rebuild() +except NameError: + pass +try: + GetHrisEmployeesFormPositiveResponseOptionsInline1.model_rebuild() +except NameError: + pass +try: + PropertiesSingleSelect.model_rebuild() +except NameError: + pass +try: + PropertiesDate.model_rebuild() +except NameError: + pass +try: + PropertiesNumber.model_rebuild() +except NameError: + pass +try: + PropertiesText.model_rebuild() +except NameError: + pass +try: + GetHrisEmployeesFormPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrisemployeesop.py b/src/kombo/models/gethrisemployeesop.py index aec7d0b..53f14a4 100644 --- a/src/kombo/models/gethrisemployeesop.py +++ b/src/kombo/models/gethrisemployeesop.py @@ -6,9 +6,10 @@ GetHrisEmployeesPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisEmployeesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisEmployeesRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -169,6 +186,39 @@ class GetHrisEmployeesRequest(BaseModel): ] = None r"""A JSON string with a single key-value pair like {\"fieldKey\":\"fieldValue\"} to filter employees by a specific custom field value. Note that the value must be a string, number, boolean or null and the key must be a valid custom field key. Custom fields with a value of type array or object are not supported.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "employment_statuses", + "group_ids", + "legal_entity_ids", + "work_location_ids", + "work_emails", + "personal_emails", + "custom_fields", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisEmployeesResponseTypedDict(TypedDict): result: GetHrisEmployeesPositiveResponseTypedDict diff --git a/src/kombo/models/gethrisemployeespositiveresponse.py b/src/kombo/models/gethrisemployeespositiveresponse.py index 3f669bd..6c35df3 100644 --- a/src/kombo/models/gethrisemployeespositiveresponse.py +++ b/src/kombo/models/gethrisemployeespositiveresponse.py @@ -10,10 +10,10 @@ UNSET_SENTINEL, UnrecognizedStr, ) -from kombo.utils import validate_const, validate_open_enum +from kombo.utils import validate_const import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator, PlainValidator +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -121,47 +121,30 @@ class HomeAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -193,30 +176,14 @@ class DomesticBankRouting(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["type"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -256,45 +223,44 @@ class BankAccount(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "iban", - "bic", - "account_number", - "holder_name", - "bank_name", - "domestic_bank_routing", - ] - nullable_fields = [ - "iban", - "bic", - "account_number", - "holder_name", - "bank_name", - "domestic_bank_routing", - ] - null_default_fields = [] - + optional_fields = set( + [ + "iban", + "bic", + "account_number", + "holder_name", + "bank_name", + "domestic_bank_routing", + ] + ) + nullable_fields = set( + [ + "iban", + "bic", + "account_number", + "holder_name", + "bank_name", + "domestic_bank_routing", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -437,28 +403,21 @@ class Employment(BaseModel): custom_fields: Nullable[Dict[str, Any]] r"""A key-value store of fields not covered by the schema. [Read more](/custom-fields)""" - pay_period: Annotated[ - OptionalNullable[GetHrisEmployeesPositiveResponsePayPeriod], - PlainValidator(validate_open_enum(False)), - ] = UNSET + pay_period: OptionalNullable[GetHrisEmployeesPositiveResponsePayPeriod] = UNSET r"""The time interval which the `pay_rate` is describing. A `pay_rate` value of `12000` with a `pay_period` of `YEAR` would indicate that the employee receives 12000 over the course of a year. In rare cases where we can’t find a clear mapping, the original string is passed through. """ - pay_frequency: Annotated[ - OptionalNullable[GetHrisEmployeesPositiveResponsePayFrequency], - PlainValidator(validate_open_enum(False)), - ] = UNSET + pay_frequency: OptionalNullable[GetHrisEmployeesPositiveResponsePayFrequency] = ( + UNSET + ) r"""The time interval at which the employee receives payment. A `pay_rate` of `12000`, with a `pay_period` of `YEAR`, and a `pay_frequency` of `MONTHLY` would indicate that the employee is paid 1000 every month. In rare cases where we can’t find a clear mapping, the original string is passed through. """ - employment_type: Annotated[ - OptionalNullable[EmploymentEmploymentType], - PlainValidator(validate_open_enum(False)), - ] = UNSET + employment_type: OptionalNullable[EmploymentEmploymentType] = UNSET r"""The employee’s current employment type: - `FULL_TIME`: the employee is actively employed @@ -475,42 +434,39 @@ class Employment(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["pay_period", "pay_frequency", "employment_type"] - nullable_fields = [ - "remote_id", - "job_title", - "pay_rate", - "pay_period", - "pay_frequency", - "employment_type", - "pay_currency", - "effective_date", - "remote_deleted_at", - "custom_fields", - ] - null_default_fields = [] - + optional_fields = set(["pay_period", "pay_frequency", "employment_type"]) + nullable_fields = set( + [ + "remote_id", + "job_title", + "pay_rate", + "pay_period", + "pay_frequency", + "employment_type", + "pay_currency", + "effective_date", + "remote_deleted_at", + "custom_fields", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -591,37 +547,14 @@ class TimeOffBalance(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "remote_id", - "balance", - "balance_unit", - "remote_deleted_at", - "used", - "used_unit", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -696,10 +629,7 @@ class Manager(BaseModel): work_email: OptionalNullable[str] = UNSET r"""The employee’s work email address. If the email address is invalid, we will set this to `null`.""" - employment_status: Annotated[ - OptionalNullable[ManagerEmploymentStatus], - PlainValidator(validate_open_enum(False)), - ] = UNSET + employment_status: OptionalNullable[ManagerEmploymentStatus] = UNSET r"""The employee’s current employment status: - `ACTIVE`: the employee is **actively employed** @@ -712,39 +642,36 @@ class Manager(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["work_email", "employment_status"] - nullable_fields = [ - "first_name", - "last_name", - "display_full_name", - "employee_number", - "work_email", - "employment_status", - "termination_date", - ] - null_default_fields = [] - + optional_fields = set(["work_email", "employment_status"]) + nullable_fields = set( + [ + "first_name", + "last_name", + "display_full_name", + "employee_number", + "work_email", + "employment_status", + "termination_date", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -783,30 +710,14 @@ class Group(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "type"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -849,47 +760,30 @@ class LegalEntityAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -920,31 +814,26 @@ class LegalEntity(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["address"] - nullable_fields = ["remote_id", "name", "address"] - null_default_fields = [] - + optional_fields = set(["address"]) + nullable_fields = set(["remote_id", "name", "address"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -986,47 +875,30 @@ class WorkLocationAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1080,31 +952,28 @@ class WorkLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["address"] - nullable_fields = ["remote_id", "name", "address", "type", "remote_deleted_at"] - null_default_fields = [] - + optional_fields = set(["address"]) + nullable_fields = set( + ["remote_id", "name", "address", "type", "remote_deleted_at"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1316,25 +1185,16 @@ class GetHrisEmployeesPositiveResponseResult(BaseModel): personal_email: OptionalNullable[str] = UNSET r"""The employee’s personal email address. If the email address is invalid, we will set this to `null`.""" - gender: Annotated[ - OptionalNullable[GetHrisEmployeesPositiveResponseGender], - PlainValidator(validate_open_enum(False)), - ] = UNSET + gender: OptionalNullable[GetHrisEmployeesPositiveResponseGender] = UNSET r"""The employee’s gender.""" - ethnicity: Annotated[ - OptionalNullable[Ethnicity], PlainValidator(validate_open_enum(False)) - ] = UNSET + ethnicity: OptionalNullable[Ethnicity] = UNSET r"""The employee’s ethnicity. In rare cases where we can’t find a clear mapping, the original string is passed through.""" - marital_status: Annotated[ - OptionalNullable[MaritalStatus], PlainValidator(validate_open_enum(False)) - ] = UNSET + marital_status: OptionalNullable[MaritalStatus] = UNSET r"""The employee’s current marital status. In rare cases where we can’t find a clear mapping, the original string is passed through.""" - employment_status: Annotated[ - OptionalNullable[EmploymentStatus], PlainValidator(validate_open_enum(False)) - ] = UNSET + employment_status: OptionalNullable[EmploymentStatus] = UNSET r"""The employee’s current employment status: - `ACTIVE`: the employee is **actively employed** @@ -1345,9 +1205,8 @@ class GetHrisEmployeesPositiveResponseResult(BaseModel): In rare cases where we can’t find a clear mapping, the original string is passed through. """ - employment_type: Annotated[ - OptionalNullable[GetHrisEmployeesPositiveResponseEmploymentType], - PlainValidator(validate_open_enum(False)), + employment_type: OptionalNullable[ + GetHrisEmployeesPositiveResponseEmploymentType ] = UNSET r"""The employee’s current employment type: @@ -1371,74 +1230,73 @@ class GetHrisEmployeesPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "work_email", - "personal_email", - "gender", - "ethnicity", - "marital_status", - "employment_status", - "employment_type", - "home_address", - "bank_accounts", - ] - nullable_fields = [ - "employee_number", - "first_name", - "last_name", - "nationality", - "display_full_name", - "job_title", - "work_email", - "personal_email", - "mobile_phone_number", - "ssn", - "tax_id", - "gender", - "ethnicity", - "marital_status", - "employment_status", - "employment_type", - "weekly_hours", - "avatar", - "work_location_id", - "legal_entity_id", - "manager_id", - "home_address", - "bank_accounts", - "date_of_birth", - "start_date", - "termination_date", - "remote_created_at", - "remote_deleted_at", - "custom_fields", - "manager", - "legal_entity", - "work_location", - ] - null_default_fields = [] - + optional_fields = set( + [ + "work_email", + "personal_email", + "gender", + "ethnicity", + "marital_status", + "employment_status", + "employment_type", + "home_address", + "bank_accounts", + ] + ) + nullable_fields = set( + [ + "employee_number", + "first_name", + "last_name", + "nationality", + "display_full_name", + "job_title", + "work_email", + "personal_email", + "mobile_phone_number", + "ssn", + "tax_id", + "gender", + "ethnicity", + "marital_status", + "employment_status", + "employment_type", + "weekly_hours", + "avatar", + "work_location_id", + "legal_entity_id", + "manager_id", + "home_address", + "bank_accounts", + "date_of_birth", + "start_date", + "termination_date", + "remote_created_at", + "remote_deleted_at", + "custom_fields", + "manager", + "legal_entity", + "work_location", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1457,30 +1315,14 @@ class GetHrisEmployeesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -1498,3 +1340,9 @@ class GetHrisEmployeesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisEmployeesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrisemploymentsop.py b/src/kombo/models/gethrisemploymentsop.py index a8a3052..4532c96 100644 --- a/src/kombo/models/gethrisemploymentsop.py +++ b/src/kombo/models/gethrisemploymentsop.py @@ -6,9 +6,10 @@ GetHrisEmploymentsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisEmploymentsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisEmploymentsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -97,6 +114,32 @@ class GetHrisEmploymentsRequest(BaseModel): ] = None r"""Filter by a comma-separated list of remote IDs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisEmploymentsResponseTypedDict(TypedDict): result: GetHrisEmploymentsPositiveResponseTypedDict diff --git a/src/kombo/models/gethrisemploymentspositiveresponse.py b/src/kombo/models/gethrisemploymentspositiveresponse.py index 972325d..500a0a6 100644 --- a/src/kombo/models/gethrisemploymentspositiveresponse.py +++ b/src/kombo/models/gethrisemploymentspositiveresponse.py @@ -10,10 +10,10 @@ UNSET_SENTINEL, UnrecognizedStr, ) -from kombo.utils import validate_const, validate_open_enum +from kombo.utils import validate_const import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator, PlainValidator +from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -158,27 +158,22 @@ class GetHrisEmploymentsPositiveResponseResult(BaseModel): custom_fields: Nullable[Dict[str, Any]] r"""A key-value store of fields not covered by the schema. [Read more](/custom-fields)""" - pay_period: Annotated[ - OptionalNullable[GetHrisEmploymentsPositiveResponsePayPeriod], - PlainValidator(validate_open_enum(False)), - ] = UNSET + pay_period: OptionalNullable[GetHrisEmploymentsPositiveResponsePayPeriod] = UNSET r"""The time interval which the `pay_rate` is describing. A `pay_rate` value of `12000` with a `pay_period` of `YEAR` would indicate that the employee receives 12000 over the course of a year. In rare cases where we can’t find a clear mapping, the original string is passed through. """ - pay_frequency: Annotated[ - OptionalNullable[GetHrisEmploymentsPositiveResponsePayFrequency], - PlainValidator(validate_open_enum(False)), - ] = UNSET + pay_frequency: OptionalNullable[GetHrisEmploymentsPositiveResponsePayFrequency] = ( + UNSET + ) r"""The time interval at which the employee receives payment. A `pay_rate` of `12000`, with a `pay_period` of `YEAR`, and a `pay_frequency` of `MONTHLY` would indicate that the employee is paid 1000 every month. In rare cases where we can’t find a clear mapping, the original string is passed through. """ - employment_type: Annotated[ - OptionalNullable[GetHrisEmploymentsPositiveResponseEmploymentType], - PlainValidator(validate_open_enum(False)), + employment_type: OptionalNullable[ + GetHrisEmploymentsPositiveResponseEmploymentType ] = UNSET r"""The employee’s current employment type: @@ -196,42 +191,39 @@ class GetHrisEmploymentsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["pay_period", "pay_frequency", "employment_type"] - nullable_fields = [ - "remote_id", - "job_title", - "pay_rate", - "pay_period", - "pay_frequency", - "employment_type", - "pay_currency", - "effective_date", - "remote_deleted_at", - "custom_fields", - ] - null_default_fields = [] - + optional_fields = set(["pay_period", "pay_frequency", "employment_type"]) + nullable_fields = set( + [ + "remote_id", + "job_title", + "pay_rate", + "pay_period", + "pay_frequency", + "employment_type", + "pay_currency", + "effective_date", + "remote_deleted_at", + "custom_fields", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -250,30 +242,14 @@ class GetHrisEmploymentsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -291,3 +267,9 @@ class GetHrisEmploymentsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisEmploymentsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrisgroupsop.py b/src/kombo/models/gethrisgroupsop.py index 2946546..ad828ab 100644 --- a/src/kombo/models/gethrisgroupsop.py +++ b/src/kombo/models/gethrisgroupsop.py @@ -6,9 +6,10 @@ GetHrisGroupsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisGroupsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisGroupsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -119,6 +136,34 @@ class GetHrisGroupsRequest(BaseModel): ] = None r"""Filter by the `name` field. Can be used to find a group by keywords present in the group name.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "types", + "name_contains", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisGroupsResponseTypedDict(TypedDict): result: GetHrisGroupsPositiveResponseTypedDict diff --git a/src/kombo/models/gethrisgroupspositiveresponse.py b/src/kombo/models/gethrisgroupspositiveresponse.py index 9f6a3cb..d068c29 100644 --- a/src/kombo/models/gethrisgroupspositiveresponse.py +++ b/src/kombo/models/gethrisgroupspositiveresponse.py @@ -68,30 +68,14 @@ class GetHrisGroupsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "remote_deleted_at", "type", "parent_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -111,30 +95,14 @@ class GetHrisGroupsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -152,3 +120,9 @@ class GetHrisGroupsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisGroupsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrislegalentitiesop.py b/src/kombo/models/gethrislegalentitiesop.py index 6b3ee55..7434fbf 100644 --- a/src/kombo/models/gethrislegalentitiesop.py +++ b/src/kombo/models/gethrislegalentitiesop.py @@ -6,9 +6,10 @@ GetHrisLegalEntitiesPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisLegalEntitiesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisLegalEntitiesRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -105,6 +122,33 @@ class GetHrisLegalEntitiesRequest(BaseModel): ] = None r"""Filter by the `name` field. Can be used to find a legal entity by keywords present in the legal entity name.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "name_contains", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisLegalEntitiesResponseTypedDict(TypedDict): result: GetHrisLegalEntitiesPositiveResponseTypedDict diff --git a/src/kombo/models/gethrislegalentitiespositiveresponse.py b/src/kombo/models/gethrislegalentitiespositiveresponse.py index 146ee15..3d9897d 100644 --- a/src/kombo/models/gethrislegalentitiespositiveresponse.py +++ b/src/kombo/models/gethrislegalentitiespositiveresponse.py @@ -48,47 +48,30 @@ class GetHrisLegalEntitiesPositiveResponseAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -137,31 +120,26 @@ class GetHrisLegalEntitiesPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["address"] - nullable_fields = ["remote_id", "name", "address", "remote_deleted_at"] - null_default_fields = [] - + optional_fields = set(["address"]) + nullable_fields = set(["remote_id", "name", "address", "remote_deleted_at"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -180,30 +158,14 @@ class GetHrisLegalEntitiesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -221,3 +183,9 @@ class GetHrisLegalEntitiesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisLegalEntitiesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrislocationsop.py b/src/kombo/models/gethrislocationsop.py index 1da746c..655ab8c 100644 --- a/src/kombo/models/gethrislocationsop.py +++ b/src/kombo/models/gethrislocationsop.py @@ -6,9 +6,10 @@ GetHrisLocationsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisLocationsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisLocationsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -105,6 +122,33 @@ class GetHrisLocationsRequest(BaseModel): ] = None r"""Filter by the `name` field. Can be used to find a location by keywords present in the location name.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "name_contains", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisLocationsResponseTypedDict(TypedDict): result: GetHrisLocationsPositiveResponseTypedDict diff --git a/src/kombo/models/gethrislocationspositiveresponse.py b/src/kombo/models/gethrislocationspositiveresponse.py index eaa2232..228b0f1 100644 --- a/src/kombo/models/gethrislocationspositiveresponse.py +++ b/src/kombo/models/gethrislocationspositiveresponse.py @@ -48,47 +48,30 @@ class GetHrisLocationsPositiveResponseAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -142,31 +125,28 @@ class GetHrisLocationsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["address"] - nullable_fields = ["remote_id", "name", "address", "type", "remote_deleted_at"] - null_default_fields = [] - + optional_fields = set(["address"]) + nullable_fields = set( + ["remote_id", "name", "address", "type", "remote_deleted_at"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -185,30 +165,14 @@ class GetHrisLocationsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -226,3 +190,9 @@ class GetHrisLocationsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisLocationsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrisperformancereviewcyclesop.py b/src/kombo/models/gethrisperformancereviewcyclesop.py index 3ac2feb..88afcf8 100644 --- a/src/kombo/models/gethrisperformancereviewcyclesop.py +++ b/src/kombo/models/gethrisperformancereviewcyclesop.py @@ -6,9 +6,10 @@ GetHrisPerformanceReviewCyclesPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisPerformanceReviewCyclesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisPerformanceReviewCyclesRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -97,6 +114,32 @@ class GetHrisPerformanceReviewCyclesRequest(BaseModel): ] = None r"""Filter by a comma-separated list of remote IDs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisPerformanceReviewCyclesResponseTypedDict(TypedDict): result: GetHrisPerformanceReviewCyclesPositiveResponseTypedDict diff --git a/src/kombo/models/gethrisperformancereviewcyclespositiveresponse.py b/src/kombo/models/gethrisperformancereviewcyclespositiveresponse.py index bab55c6..a9abbad 100644 --- a/src/kombo/models/gethrisperformancereviewcyclespositiveresponse.py +++ b/src/kombo/models/gethrisperformancereviewcyclespositiveresponse.py @@ -59,30 +59,14 @@ class GetHrisPerformanceReviewCyclesPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "review_period_start_date", "remote_deleted_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -102,30 +86,14 @@ class GetHrisPerformanceReviewCyclesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -143,3 +111,9 @@ class GetHrisPerformanceReviewCyclesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisPerformanceReviewCyclesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethrisperformancereviewsop.py b/src/kombo/models/gethrisperformancereviewsop.py index d75324e..88d29cd 100644 --- a/src/kombo/models/gethrisperformancereviewsop.py +++ b/src/kombo/models/gethrisperformancereviewsop.py @@ -6,9 +6,10 @@ GetHrisPerformanceReviewsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisPerformanceReviewsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisPerformanceReviewsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -127,6 +144,35 @@ class GetHrisPerformanceReviewsRequest(BaseModel): ] = None r"""Filter by a comma-separated list of reviewee IDs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "types", + "review_cycle_ids", + "reviewee_ids", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisPerformanceReviewsResponseTypedDict(TypedDict): result: GetHrisPerformanceReviewsPositiveResponseTypedDict diff --git a/src/kombo/models/gethrisperformancereviewspositiveresponse.py b/src/kombo/models/gethrisperformancereviewspositiveresponse.py index c39833d..f2ccbc6 100644 --- a/src/kombo/models/gethrisperformancereviewspositiveresponse.py +++ b/src/kombo/models/gethrisperformancereviewspositiveresponse.py @@ -44,30 +44,14 @@ class SummaryRatingSingleSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["ordered_options", "value"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -100,30 +84,14 @@ class SummaryRatingNumeric(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["min", "max", "value"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -191,37 +159,34 @@ class Reviewee(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["work_email"] - nullable_fields = [ - "first_name", - "last_name", - "display_full_name", - "work_email", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set(["work_email"]) + nullable_fields = set( + [ + "first_name", + "last_name", + "display_full_name", + "work_email", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -275,37 +240,34 @@ class Reviewer(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["work_email"] - nullable_fields = [ - "first_name", - "last_name", - "display_full_name", - "work_email", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set(["work_email"]) + nullable_fields = set( + [ + "first_name", + "last_name", + "display_full_name", + "work_email", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -358,30 +320,14 @@ class ReviewCycle(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "review_period_start_date", "remote_deleted_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -449,38 +395,35 @@ class GetHrisPerformanceReviewsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["summary_rating"] - nullable_fields = [ - "type", - "summary_comment", - "summary_rating", - "remote_deleted_at", - "reviewer", - "review_cycle", - ] - null_default_fields = [] - + optional_fields = set(["summary_rating"]) + nullable_fields = set( + [ + "type", + "summary_comment", + "summary_rating", + "remote_deleted_at", + "reviewer", + "review_cycle", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -499,30 +442,14 @@ class GetHrisPerformanceReviewsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -540,3 +467,17 @@ class GetHrisPerformanceReviewsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + SummaryRatingSingleSelect.model_rebuild() +except NameError: + pass +try: + SummaryRatingNumeric.model_rebuild() +except NameError: + pass +try: + GetHrisPerformanceReviewsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethristimeoffbalancesop.py b/src/kombo/models/gethristimeoffbalancesop.py index e3fd29f..4688cae 100644 --- a/src/kombo/models/gethristimeoffbalancesop.py +++ b/src/kombo/models/gethristimeoffbalancesop.py @@ -6,9 +6,10 @@ GetHrisTimeOffBalancesPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisTimeOffBalancesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisTimeOffBalancesRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -105,6 +122,33 @@ class GetHrisTimeOffBalancesRequest(BaseModel): ] = None r"""Filter by a specific employee using their ID.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "employee_id", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisTimeOffBalancesResponseTypedDict(TypedDict): result: GetHrisTimeOffBalancesPositiveResponseTypedDict diff --git a/src/kombo/models/gethristimeoffbalancespositiveresponse.py b/src/kombo/models/gethristimeoffbalancespositiveresponse.py index c5690aa..26f0ba4 100644 --- a/src/kombo/models/gethristimeoffbalancespositiveresponse.py +++ b/src/kombo/models/gethristimeoffbalancespositiveresponse.py @@ -86,36 +86,14 @@ class GetHrisTimeOffBalancesPositiveResponseType(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "name", - "unit", - "half_days_supported", - "exact_times_supported", - "remote_deleted_at", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -186,37 +164,14 @@ class GetHrisTimeOffBalancesPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "remote_id", - "balance", - "balance_unit", - "remote_deleted_at", - "used", - "used_unit", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -236,30 +191,14 @@ class GetHrisTimeOffBalancesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -277,3 +216,9 @@ class GetHrisTimeOffBalancesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisTimeOffBalancesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gethristimesheetsop.py b/src/kombo/models/gethristimesheetsop.py index 38b6380..3c80ca6 100644 --- a/src/kombo/models/gethristimesheetsop.py +++ b/src/kombo/models/gethristimesheetsop.py @@ -6,9 +6,10 @@ GetHrisTimesheetsPositiveResponseTypedDict, ) from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata, QueryParamMetadata import pydantic +from pydantic import model_serializer from typing import Awaitable, Callable, List, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -26,6 +27,22 @@ class GetHrisTimesheetsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisTimesheetsRequestTypedDict(TypedDict): cursor: NotRequired[str] @@ -137,6 +154,37 @@ class GetHrisTimesheetsRequest(BaseModel): ] = None r"""Return timesheets whose end time is on or after the given timestamp.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "cursor", + "page_size", + "updated_after", + "include_deleted", + "ignore_unsupported_filters", + "ids", + "remote_ids", + "employee_id", + "started_before", + "started_after", + "ended_before", + "ended_after", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetHrisTimesheetsResponseTypedDict(TypedDict): result: GetHrisTimesheetsPositiveResponseTypedDict diff --git a/src/kombo/models/gethristimesheetspositiveresponse.py b/src/kombo/models/gethristimesheetspositiveresponse.py index 3a14365..c890ea6 100644 --- a/src/kombo/models/gethristimesheetspositiveresponse.py +++ b/src/kombo/models/gethristimesheetspositiveresponse.py @@ -132,44 +132,41 @@ class GetHrisTimesheetsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["breaks"] - nullable_fields = [ - "remote_id", - "started_at", - "ended_at", - "timezone", - "payable_hours", - "unpaid_break_minutes", - "breaks", - "approval_status", - "approved_at", - "comment", - "custom_fields", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set(["breaks"]) + nullable_fields = set( + [ + "remote_id", + "started_at", + "ended_at", + "timezone", + "payable_hours", + "unpaid_break_minutes", + "breaks", + "approval_status", + "approved_at", + "comment", + "custom_fields", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -188,30 +185,14 @@ class GetHrisTimesheetsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -229,3 +210,9 @@ class GetHrisTimesheetsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetHrisTimesheetsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getintegrationsintegrationidcustomfieldsop.py b/src/kombo/models/getintegrationsintegrationidcustomfieldsop.py index 360e388..cb71bfd 100644 --- a/src/kombo/models/getintegrationsintegrationidcustomfieldsop.py +++ b/src/kombo/models/getintegrationsintegrationidcustomfieldsop.py @@ -5,8 +5,9 @@ GetIntegrationsIntegrationIDCustomFieldsPositiveResponse, GetIntegrationsIntegrationIDCustomFieldsPositiveResponseTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer from typing import Awaitable, Callable, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -38,6 +39,22 @@ class GetIntegrationsIntegrationIDCustomFieldsRequest(BaseModel): ] = 100 r"""The number of results to return per page. Maximum is 250.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["cursor", "page_size"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetIntegrationsIntegrationIDCustomFieldsResponseTypedDict(TypedDict): result: GetIntegrationsIntegrationIDCustomFieldsPositiveResponseTypedDict diff --git a/src/kombo/models/getintegrationsintegrationidcustomfieldspositiveresponse.py b/src/kombo/models/getintegrationsintegrationidcustomfieldspositiveresponse.py index a544926..e1fad71 100644 --- a/src/kombo/models/getintegrationsintegrationidcustomfieldspositiveresponse.py +++ b/src/kombo/models/getintegrationsintegrationidcustomfieldspositiveresponse.py @@ -51,30 +51,14 @@ class GetIntegrationsIntegrationIDCustomFieldsPositiveResponseIntegrationField( @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["label"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -122,30 +106,14 @@ class GetIntegrationsIntegrationIDCustomFieldsPositiveResponseResult(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["integration_field", "label", "description"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -167,30 +135,14 @@ class GetIntegrationsIntegrationIDCustomFieldsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -208,3 +160,9 @@ class GetIntegrationsIntegrationIDCustomFieldsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetIntegrationsIntegrationIDCustomFieldsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getintegrationsintegrationidintegrationfieldsop.py b/src/kombo/models/getintegrationsintegrationidintegrationfieldsop.py index 9ef9dc3..02d9660 100644 --- a/src/kombo/models/getintegrationsintegrationidintegrationfieldsop.py +++ b/src/kombo/models/getintegrationsintegrationidintegrationfieldsop.py @@ -5,8 +5,9 @@ GetIntegrationsIntegrationIDIntegrationFieldsPositiveResponse, GetIntegrationsIntegrationIDIntegrationFieldsPositiveResponseTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, PathParamMetadata, QueryParamMetadata +from pydantic import model_serializer from typing import Awaitable, Callable, Optional, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -38,6 +39,22 @@ class GetIntegrationsIntegrationIDIntegrationFieldsRequest(BaseModel): ] = 100 r"""The number of results to return per page. Maximum is 2000.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["cursor", "page_size"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class GetIntegrationsIntegrationIDIntegrationFieldsResponseTypedDict(TypedDict): result: GetIntegrationsIntegrationIDIntegrationFieldsPositiveResponseTypedDict diff --git a/src/kombo/models/getintegrationsintegrationidintegrationfieldspositiveresponse.py b/src/kombo/models/getintegrationsintegrationidintegrationfieldspositiveresponse.py index b9adba9..31de105 100644 --- a/src/kombo/models/getintegrationsintegrationidintegrationfieldspositiveresponse.py +++ b/src/kombo/models/getintegrationsintegrationidintegrationfieldspositiveresponse.py @@ -63,30 +63,14 @@ class GetIntegrationsIntegrationIDIntegrationFieldsPositiveResponseResult(BaseMo @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["label"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -110,30 +94,14 @@ class GetIntegrationsIntegrationIDIntegrationFieldsPositiveResponseData(BaseMode @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["next"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -151,3 +119,13 @@ class GetIntegrationsIntegrationIDIntegrationFieldsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetIntegrationsIntegrationIDIntegrationFieldsPositiveResponseResult.model_rebuild() +except NameError: + pass +try: + GetIntegrationsIntegrationIDIntegrationFieldsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/getintegrationsintegrationidpositiveresponse.py b/src/kombo/models/getintegrationsintegrationidpositiveresponse.py index 719e23e..7433eef 100644 --- a/src/kombo/models/getintegrationsintegrationidpositiveresponse.py +++ b/src/kombo/models/getintegrationsintegrationidpositiveresponse.py @@ -40,30 +40,14 @@ class GetIntegrationsIntegrationIDPositiveResponseTool(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["internal_label"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -120,30 +104,14 @@ class GetIntegrationsIntegrationIDPositiveResponseEndUser(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["creator_email", "origin_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -161,30 +129,14 @@ class ScopeConfig(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -542,30 +494,14 @@ class GetIntegrationsIntegrationIDPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["data_expired_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -583,3 +519,9 @@ class GetIntegrationsIntegrationIDPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetIntegrationsIntegrationIDPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/gettoolscategorypositiveresponse.py b/src/kombo/models/gettoolscategorypositiveresponse.py index 7912999..ee7c16d 100644 --- a/src/kombo/models/gettoolscategorypositiveresponse.py +++ b/src/kombo/models/gettoolscategorypositiveresponse.py @@ -318,36 +318,14 @@ class GetToolsCategoryPositiveResponseTool(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "internal_label", - "paid_api_details_markdown", - "fast_track_details_markdown", - "partner_only_details_markdown", - "connection_guide_url", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -373,3 +351,9 @@ class GetToolsCategoryPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + GetToolsCategoryPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/inlineassessmentorderreceivedwebhookpayload.py b/src/kombo/models/inlineassessmentorderreceivedwebhookpayload.py index 04495e9..dd994ec 100644 --- a/src/kombo/models/inlineassessmentorderreceivedwebhookpayload.py +++ b/src/kombo/models/inlineassessmentorderreceivedwebhookpayload.py @@ -57,31 +57,26 @@ class InlineAssessmentOrderReceivedWebhookPayloadCandidate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id", "first_name", "last_name", "phone"] - nullable_fields = ["remote_id", "first_name", "last_name", "phone"] - null_default_fields = [] - + optional_fields = set(["remote_id", "first_name", "last_name", "phone"]) + nullable_fields = set(["remote_id", "first_name", "last_name", "phone"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -101,31 +96,26 @@ class InlineAssessmentOrderReceivedWebhookPayloadApplication(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id"] - nullable_fields = ["remote_id"] - null_default_fields = [] - + optional_fields = set(["remote_id"]) + nullable_fields = set(["remote_id"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -167,47 +157,30 @@ class InlineAssessmentOrderReceivedWebhookPayloadLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -253,30 +226,14 @@ class InlineAssessmentOrderReceivedWebhookPayloadHiringTeam(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["email", "first_name", "last_name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -286,7 +243,7 @@ class InlineAssessmentOrderReceivedWebhookPayloadJobTypedDict(TypedDict): r"""Information about the job posting.""" hiring_team: List[InlineAssessmentOrderReceivedWebhookPayloadHiringTeamTypedDict] - r"""The hiring team allows you to sync users into your system who can access the job and its applications.""" + r"""The hiring team allows you to provision users into your system who can access the job and its applications.""" remote_id: NotRequired[Nullable[str]] r"""The job's identifier in the integrated system.""" name: NotRequired[Nullable[str]] @@ -301,7 +258,7 @@ class InlineAssessmentOrderReceivedWebhookPayloadJob(BaseModel): r"""Information about the job posting.""" hiring_team: List[InlineAssessmentOrderReceivedWebhookPayloadHiringTeam] - r"""The hiring team allows you to sync users into your system who can access the job and its applications.""" + r"""The hiring team allows you to provision users into your system who can access the job and its applications.""" remote_id: OptionalNullable[str] = UNSET r"""The job's identifier in the integrated system.""" @@ -316,31 +273,26 @@ class InlineAssessmentOrderReceivedWebhookPayloadJob(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["remote_id", "name", "location"] - nullable_fields = ["remote_id", "name", "location"] - null_default_fields = [] - + optional_fields = set(["remote_id", "name", "location"]) + nullable_fields = set(["remote_id", "name", "location"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m diff --git a/src/kombo/models/integrationcreatedwebhookpayload.py b/src/kombo/models/integrationcreatedwebhookpayload.py index 577421a..cdbc260 100644 --- a/src/kombo/models/integrationcreatedwebhookpayload.py +++ b/src/kombo/models/integrationcreatedwebhookpayload.py @@ -45,30 +45,14 @@ class IntegrationCreatedWebhookPayloadEndUser(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["creator_email", "origin_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/kombo/models/integrationdeletedwebhookpayload.py b/src/kombo/models/integrationdeletedwebhookpayload.py index 22b1861..2923017 100644 --- a/src/kombo/models/integrationdeletedwebhookpayload.py +++ b/src/kombo/models/integrationdeletedwebhookpayload.py @@ -46,30 +46,14 @@ class IntegrationDeletedWebhookPayloadEndUser(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["creator_email", "origin_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/kombo/models/integrationstatechangedwebhookpayload.py b/src/kombo/models/integrationstatechangedwebhookpayload.py index d164702..aa2f19d 100644 --- a/src/kombo/models/integrationstatechangedwebhookpayload.py +++ b/src/kombo/models/integrationstatechangedwebhookpayload.py @@ -46,30 +46,14 @@ class IntegrationStateChangedWebhookPayloadEndUser(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["creator_email", "origin_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -83,6 +67,14 @@ def serialize_model(self, handler): r"""The quality assurance status of the integration.""" +IntegrationStateChangedWebhookPayloadSetupStatus = Literal[ + "INCOMPLETE", + "FINAL_SYNC_PENDING", + "COMPLETED", +] +r"""The current status of an integration that has filtering, field mapping features or required setup steps.""" + + State = Literal[ "ACTIVE", "INVALID", @@ -102,6 +94,8 @@ class IntegrationStateChangedWebhookPayloadDataTypedDict(TypedDict): r"""Information about the end user who created the integration.""" qa_status: QaStatus r"""The quality assurance status of the integration.""" + setup_status: IntegrationStateChangedWebhookPayloadSetupStatus + r"""The current status of an integration that has filtering, field mapping features or required setup steps.""" state: State r"""The current state of the integration.""" updated_at: datetime @@ -124,6 +118,9 @@ class IntegrationStateChangedWebhookPayloadData(BaseModel): qa_status: QaStatus r"""The quality assurance status of the integration.""" + setup_status: IntegrationStateChangedWebhookPayloadSetupStatus + r"""The current status of an integration that has filtering, field mapping features or required setup steps.""" + state: State r"""The current state of the integration.""" diff --git a/src/kombo/models/internal/globals.py b/src/kombo/models/internal/globals.py index d1cdf47..a98e34e 100644 --- a/src/kombo/models/internal/globals.py +++ b/src/kombo/models/internal/globals.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class Globals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""ID of the integration you want to interact with.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/komboatserror.py b/src/kombo/models/komboatserror.py index 8a0c81a..bebf21a 100644 --- a/src/kombo/models/komboatserror.py +++ b/src/kombo/models/komboatserror.py @@ -17,6 +17,7 @@ "PLATFORM.UNKNOWN_ERROR", "PLATFORM.IP_NOT_WHITELISTED", "PLATFORM.AUTHENTICATION_INVALID", + "PLATFORM.TASK_TIMED_OUT", "INTEGRATION.PERMISSION_MISSING", "INTEGRATION.AUTHENTICATION_INVALID", "INTEGRATION.QA_FAILED", @@ -67,30 +68,14 @@ class KomboAtsErrorError(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["code", "title", "log_url"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/kombo/models/kombogeneralerror.py b/src/kombo/models/kombogeneralerror.py index 195bcd5..45015a3 100644 --- a/src/kombo/models/kombogeneralerror.py +++ b/src/kombo/models/kombogeneralerror.py @@ -17,6 +17,7 @@ "PLATFORM.UNKNOWN_ERROR", "PLATFORM.IP_NOT_WHITELISTED", "PLATFORM.AUTHENTICATION_INVALID", + "PLATFORM.TASK_TIMED_OUT", ] r"""Some errors include an error code that can be used to identify their cause. See the [Error Handling Docs](https://docs.kombo.dev/guides/errors) for more information. For your error handling logic please use the error `code` instead of other properties (e.g. message, http status code, ...).""" @@ -51,30 +52,14 @@ class KomboGeneralErrorError(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["code", "title", "log_url"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/kombo/models/kombohriserror.py b/src/kombo/models/kombohriserror.py index 93d41e3..51ec4fc 100644 --- a/src/kombo/models/kombohriserror.py +++ b/src/kombo/models/kombohriserror.py @@ -17,6 +17,7 @@ "PLATFORM.UNKNOWN_ERROR", "PLATFORM.IP_NOT_WHITELISTED", "PLATFORM.AUTHENTICATION_INVALID", + "PLATFORM.TASK_TIMED_OUT", "INTEGRATION.PERMISSION_MISSING", "INTEGRATION.AUTHENTICATION_INVALID", "INTEGRATION.QA_FAILED", @@ -66,30 +67,14 @@ class KomboHrisErrorError(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["code", "title", "log_url"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidpositiveresponse.py b/src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidpositiveresponse.py index aef0ebf..18c509b 100644 --- a/src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidpositiveresponse.py +++ b/src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidpositiveresponse.py @@ -65,30 +65,14 @@ class PatchIntegrationsIntegrationIDIntegrationFieldsIntegrationFieldIDPositiveR @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["label"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -110,3 +94,13 @@ class PatchIntegrationsIntegrationIDIntegrationFieldsIntegrationFieldIDPositiveR Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PatchIntegrationsIntegrationIDIntegrationFieldsIntegrationFieldIDPositiveResponseData.model_rebuild() +except NameError: + pass +try: + PatchIntegrationsIntegrationIDIntegrationFieldsIntegrationFieldIDPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidrequestbody.py b/src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidrequestbody.py index 9d176cf..4c06f7d 100644 --- a/src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidrequestbody.py +++ b/src/kombo/models/patchintegrationsintegrationidintegrationfieldsintegrationfieldidrequestbody.py @@ -19,30 +19,14 @@ class PatchIntegrationsIntegrationIDIntegrationFieldsIntegrationFieldIDRequestBo @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["enable_passthrough"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/kombo/models/postatsapplicationsapplicationidattachmentsop.py b/src/kombo/models/postatsapplicationsapplicationidattachmentsop.py index 04e7747..6ef7a3a 100644 --- a/src/kombo/models/postatsapplicationsapplicationidattachmentsop.py +++ b/src/kombo/models/postatsapplicationsapplicationidattachmentsop.py @@ -5,7 +5,7 @@ PostAtsApplicationsApplicationIDAttachmentsRequestBody, PostAtsApplicationsApplicationIDAttachmentsRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostAtsApplicationsApplicationIDAttachmentsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDAttachmentsRequestTypedDict(TypedDict): application_id: str diff --git a/src/kombo/models/postatsapplicationsapplicationidattachmentspositiveresponse.py b/src/kombo/models/postatsapplicationsapplicationidattachmentspositiveresponse.py index d630cc1..7411af7 100644 --- a/src/kombo/models/postatsapplicationsapplicationidattachmentspositiveresponse.py +++ b/src/kombo/models/postatsapplicationsapplicationidattachmentspositiveresponse.py @@ -48,3 +48,9 @@ class PostAtsApplicationsApplicationIDAttachmentsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsApplicationsApplicationIDAttachmentsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsapplicationsapplicationidattachmentsrequestbody.py b/src/kombo/models/postatsapplicationsapplicationidattachmentsrequestbody.py index f956403..35dae4f 100644 --- a/src/kombo/models/postatsapplicationsapplicationidattachmentsrequestbody.py +++ b/src/kombo/models/postatsapplicationsapplicationidattachmentsrequestbody.py @@ -73,6 +73,22 @@ class PostAtsApplicationsApplicationIDAttachmentsRequestBodyAttachment(BaseModel **Note:** You must provide either this or `data_url`. We recommend `data_url` over `data` for most cases. """ + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content_type", "data_url", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + PostAtsApplicationsApplicationIDAttachmentsRequestBodyOverrideDocumentCategory = ( Literal[ @@ -107,6 +123,24 @@ class PostAtsApplicationsApplicationIDAttachmentsRequestBodyOracle(BaseModel): multi_post_to_all_current_applications: Optional[bool] = None r"""If true, the attachment will be posted to all current applications for the candidate.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["override_document_category", "multi_post_to_all_current_applications"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDAttachmentsRequestBodyPostHeadersTypedDict( TypedDict @@ -127,31 +161,26 @@ class PostAtsApplicationsApplicationIDAttachmentsRequestBodyPostHeaders(BaseMode @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -175,6 +204,22 @@ class PostAtsApplicationsApplicationIDAttachmentsRequestBodyGreenhouse(BaseModel ] = None r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDAttachmentsRequestBodyWorkableTypedDict( TypedDict @@ -191,6 +236,22 @@ class PostAtsApplicationsApplicationIDAttachmentsRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDAttachmentsRequestBodyRemoteFieldsTypedDict( TypedDict @@ -229,6 +290,22 @@ class PostAtsApplicationsApplicationIDAttachmentsRequestBodyRemoteFields(BaseMod ] = None r"""Workable specific remote fields for ATS actions.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["oracle", "greenhouse", "workable"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDAttachmentsRequestBodyTypedDict(TypedDict): attachment: ( @@ -245,3 +322,25 @@ class PostAtsApplicationsApplicationIDAttachmentsRequestBody(BaseModel): remote_fields: Optional[ PostAtsApplicationsApplicationIDAttachmentsRequestBodyRemoteFields ] = None + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PostAtsApplicationsApplicationIDAttachmentsRequestBodyPostHeaders.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsapplicationsapplicationidnotesop.py b/src/kombo/models/postatsapplicationsapplicationidnotesop.py index 51a876c..667b017 100644 --- a/src/kombo/models/postatsapplicationsapplicationidnotesop.py +++ b/src/kombo/models/postatsapplicationsapplicationidnotesop.py @@ -5,7 +5,7 @@ PostAtsApplicationsApplicationIDNotesRequestBody, PostAtsApplicationsApplicationIDNotesRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostAtsApplicationsApplicationIDNotesGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDNotesRequestTypedDict(TypedDict): application_id: str diff --git a/src/kombo/models/postatsapplicationsapplicationidnotespositiveresponse.py b/src/kombo/models/postatsapplicationsapplicationidnotespositiveresponse.py index 6949d0d..5a56d68 100644 --- a/src/kombo/models/postatsapplicationsapplicationidnotespositiveresponse.py +++ b/src/kombo/models/postatsapplicationsapplicationidnotespositiveresponse.py @@ -44,3 +44,9 @@ class PostAtsApplicationsApplicationIDNotesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsApplicationsApplicationIDNotesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsapplicationsapplicationidnotesrequestbody.py b/src/kombo/models/postatsapplicationsapplicationidnotesrequestbody.py index 0d6f74a..ecffabf 100644 --- a/src/kombo/models/postatsapplicationsapplicationidnotesrequestbody.py +++ b/src/kombo/models/postatsapplicationsapplicationidnotesrequestbody.py @@ -25,6 +25,22 @@ class PostAtsApplicationsApplicationIDNotesRequestBodyTeamtailor(BaseModel): user_id: Optional[str] = None r"""ID of the user that created the note. Defaults to the first admin user found.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["user_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDNotesRequestBodyPostHeadersTypedDict(TypedDict): r"""Headers we will pass with `POST` requests to Greenhouse.""" @@ -43,31 +59,26 @@ class PostAtsApplicationsApplicationIDNotesRequestBodyPostHeaders(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -89,6 +100,22 @@ class PostAtsApplicationsApplicationIDNotesRequestBodyGreenhouse(BaseModel): ] = None r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDNotesRequestBodyRecruiteeTypedDict(TypedDict): r"""Recruitee specific remote fields for the note.""" @@ -108,6 +135,22 @@ class PostAtsApplicationsApplicationIDNotesRequestBodyRecruitee(BaseModel): is_json: Optional[bool] = None r"""Whether the note is in a stringified JSON format. If true, content should contain a valid JSON as per the [Recruitee API documentation](https://docs.recruitee.com/reference/candidatesidnotes) (body_json field). If false we add the note as a plain text.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["visibility", "is_json"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDNotesRequestBodyBullhornTypedDict(TypedDict): r"""Bullhorn specific remote fields for the note.""" @@ -122,6 +165,22 @@ class PostAtsApplicationsApplicationIDNotesRequestBodyBullhorn(BaseModel): action: Optional[str] = None r"""The action (or type) associated with a Note. You can find all available note actions in a Bullhorn instance under System Settings > commentActionList. The default action is `Note`.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["action"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDNotesRequestBodyWorkableTypedDict(TypedDict): r"""Workable specific remote fields for ATS actions.""" @@ -136,6 +195,22 @@ class PostAtsApplicationsApplicationIDNotesRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDNotesRequestBodyRemoteFieldsTypedDict(TypedDict): r"""Tool specific remote fields for the note.""" @@ -186,6 +261,24 @@ class PostAtsApplicationsApplicationIDNotesRequestBodyRemoteFields(BaseModel): workable: Optional[PostAtsApplicationsApplicationIDNotesRequestBodyWorkable] = None r"""Workable specific remote fields for ATS actions.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["teamtailor", "greenhouse", "recruitee", "bullhorn", "workable"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDNotesRequestBodyTypedDict(TypedDict): content: str @@ -209,3 +302,25 @@ class PostAtsApplicationsApplicationIDNotesRequestBody(BaseModel): PostAtsApplicationsApplicationIDNotesRequestBodyRemoteFields ] = None r"""Tool specific remote fields for the note.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PostAtsApplicationsApplicationIDNotesRequestBodyPostHeaders.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsapplicationsapplicationidrejectop.py b/src/kombo/models/postatsapplicationsapplicationidrejectop.py index e5e7c96..f9f74bc 100644 --- a/src/kombo/models/postatsapplicationsapplicationidrejectop.py +++ b/src/kombo/models/postatsapplicationsapplicationidrejectop.py @@ -5,7 +5,7 @@ PostAtsApplicationsApplicationIDRejectRequestBody, PostAtsApplicationsApplicationIDRejectRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostAtsApplicationsApplicationIDRejectGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDRejectRequestTypedDict(TypedDict): application_id: str diff --git a/src/kombo/models/postatsapplicationsapplicationidrejectpositiveresponse.py b/src/kombo/models/postatsapplicationsapplicationidrejectpositiveresponse.py index 8eac2b7..a6a347c 100644 --- a/src/kombo/models/postatsapplicationsapplicationidrejectpositiveresponse.py +++ b/src/kombo/models/postatsapplicationsapplicationidrejectpositiveresponse.py @@ -44,3 +44,9 @@ class PostAtsApplicationsApplicationIDRejectPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsApplicationsApplicationIDRejectPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsapplicationsapplicationidrejectrequestbody.py b/src/kombo/models/postatsapplicationsapplicationidrejectrequestbody.py index 7c5e3b4..a14f2a5 100644 --- a/src/kombo/models/postatsapplicationsapplicationidrejectrequestbody.py +++ b/src/kombo/models/postatsapplicationsapplicationidrejectrequestbody.py @@ -25,31 +25,26 @@ class PostAtsApplicationsApplicationIDRejectRequestBodyPostHeaders(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -71,6 +66,22 @@ class PostAtsApplicationsApplicationIDRejectRequestBodyGreenhouse(BaseModel): ] = None r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDRejectRequestBodyTeamtailorTypedDict(TypedDict): r"""Fields specific to Teamtailor.""" @@ -85,6 +96,22 @@ class PostAtsApplicationsApplicationIDRejectRequestBodyTeamtailor(BaseModel): user_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action. If not provided, the first admin user will be used.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["user_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDRejectRequestBodyWorkableTypedDict(TypedDict): r"""Workable specific remote fields for ATS actions.""" @@ -99,6 +126,22 @@ class PostAtsApplicationsApplicationIDRejectRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDRejectRequestBodyRemoteFieldsTypedDict(TypedDict): r"""Additional fields that we will pass through to specific ATS systems.""" @@ -133,6 +176,22 @@ class PostAtsApplicationsApplicationIDRejectRequestBodyRemoteFields(BaseModel): workable: Optional[PostAtsApplicationsApplicationIDRejectRequestBodyWorkable] = None r"""Workable specific remote fields for ATS actions.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["greenhouse", "teamtailor", "workable"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDRejectRequestBodyTypedDict(TypedDict): rejection_reason_id: str @@ -156,3 +215,25 @@ class PostAtsApplicationsApplicationIDRejectRequestBody(BaseModel): PostAtsApplicationsApplicationIDRejectRequestBodyRemoteFields ] = None r"""Additional fields that we will pass through to specific ATS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["note", "remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PostAtsApplicationsApplicationIDRejectRequestBodyPostHeaders.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsapplicationsapplicationidresultlinksop.py b/src/kombo/models/postatsapplicationsapplicationidresultlinksop.py index 119e7b0..b8d5620 100644 --- a/src/kombo/models/postatsapplicationsapplicationidresultlinksop.py +++ b/src/kombo/models/postatsapplicationsapplicationidresultlinksop.py @@ -5,7 +5,7 @@ PostAtsApplicationsApplicationIDResultLinksRequestBody, PostAtsApplicationsApplicationIDResultLinksRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostAtsApplicationsApplicationIDResultLinksGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDResultLinksRequestTypedDict(TypedDict): application_id: str diff --git a/src/kombo/models/postatsapplicationsapplicationidresultlinkspositiveresponse.py b/src/kombo/models/postatsapplicationsapplicationidresultlinkspositiveresponse.py index 6a4517d..03be529 100644 --- a/src/kombo/models/postatsapplicationsapplicationidresultlinkspositiveresponse.py +++ b/src/kombo/models/postatsapplicationsapplicationidresultlinkspositiveresponse.py @@ -48,3 +48,9 @@ class PostAtsApplicationsApplicationIDResultLinksPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsApplicationsApplicationIDResultLinksPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsapplicationsapplicationidresultlinksrequestbody.py b/src/kombo/models/postatsapplicationsapplicationidresultlinksrequestbody.py index 054883c..9422d2c 100644 --- a/src/kombo/models/postatsapplicationsapplicationidresultlinksrequestbody.py +++ b/src/kombo/models/postatsapplicationsapplicationidresultlinksrequestbody.py @@ -63,6 +63,22 @@ class PostAtsApplicationsApplicationIDResultLinksRequestBodyIcims(BaseModel): assessment_package_id: Optional[str] = None r"""The package ID of the assessment that the result link will be added to.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["assessment_package_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + PostAtsApplicationsApplicationIDResultLinksRequestBodyOverrideDocumentCategory = ( Literal[ @@ -97,6 +113,24 @@ class PostAtsApplicationsApplicationIDResultLinksRequestBodyOracle(BaseModel): multi_post_to_all_current_applications: Optional[bool] = None r"""If true, the result link will be posted to all current applications for the candidate.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["override_document_category", "multi_post_to_all_current_applications"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDResultLinksRequestBodyPostHeadersTypedDict( TypedDict @@ -117,31 +151,26 @@ class PostAtsApplicationsApplicationIDResultLinksRequestBodyPostHeaders(BaseMode @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -165,6 +194,22 @@ class PostAtsApplicationsApplicationIDResultLinksRequestBodyGreenhouse(BaseModel ] = None r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDResultLinksRequestBodyWorkableTypedDict( TypedDict @@ -181,6 +226,22 @@ class PostAtsApplicationsApplicationIDResultLinksRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDResultLinksRequestBodyRemoteFieldsTypedDict( TypedDict @@ -226,6 +287,22 @@ class PostAtsApplicationsApplicationIDResultLinksRequestBodyRemoteFields(BaseMod ] = None r"""Workable specific remote fields for ATS actions.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["icims", "oracle", "greenhouse", "workable"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsApplicationsApplicationIDResultLinksRequestBodyTypedDict(TypedDict): label: str @@ -264,3 +341,25 @@ class PostAtsApplicationsApplicationIDResultLinksRequestBody(BaseModel): PostAtsApplicationsApplicationIDResultLinksRequestBodyRemoteFields ] = None r"""Additional fields that we will pass through to specific ATS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["details", "remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PostAtsApplicationsApplicationIDResultLinksRequestBodyPostHeaders.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatscandidatescandidateidattachmentsop.py b/src/kombo/models/postatscandidatescandidateidattachmentsop.py index 7257f44..3a35c57 100644 --- a/src/kombo/models/postatscandidatescandidateidattachmentsop.py +++ b/src/kombo/models/postatscandidatescandidateidattachmentsop.py @@ -5,7 +5,7 @@ PostAtsCandidatesCandidateIDAttachmentsRequestBody, PostAtsCandidatesCandidateIDAttachmentsRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostAtsCandidatesCandidateIDAttachmentsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDAttachmentsRequestTypedDict(TypedDict): candidate_id: str diff --git a/src/kombo/models/postatscandidatescandidateidattachmentspositiveresponse.py b/src/kombo/models/postatscandidatescandidateidattachmentspositiveresponse.py index cf46289..080f16a 100644 --- a/src/kombo/models/postatscandidatescandidateidattachmentspositiveresponse.py +++ b/src/kombo/models/postatscandidatescandidateidattachmentspositiveresponse.py @@ -46,3 +46,9 @@ class PostAtsCandidatesCandidateIDAttachmentsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsCandidatesCandidateIDAttachmentsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatscandidatescandidateidattachmentsrequestbody.py b/src/kombo/models/postatscandidatescandidateidattachmentsrequestbody.py index a1f7bf6..10e9794 100644 --- a/src/kombo/models/postatscandidatescandidateidattachmentsrequestbody.py +++ b/src/kombo/models/postatscandidatescandidateidattachmentsrequestbody.py @@ -71,6 +71,22 @@ class PostAtsCandidatesCandidateIDAttachmentsRequestBodyAttachment(BaseModel): **Note:** You must provide either this or `data_url`. We recommend `data_url` over `data` for most cases. """ + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content_type", "data_url", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDAttachmentsRequestBodyPostHeadersTypedDict(TypedDict): r"""Headers we will pass with `POST` requests to Greenhouse.""" @@ -89,31 +105,26 @@ class PostAtsCandidatesCandidateIDAttachmentsRequestBodyPostHeaders(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -135,6 +146,22 @@ class PostAtsCandidatesCandidateIDAttachmentsRequestBodyGreenhouse(BaseModel): ] = None r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDAttachmentsRequestBodyWorkableTypedDict(TypedDict): r"""Workable specific remote fields for ATS actions.""" @@ -149,6 +176,22 @@ class PostAtsCandidatesCandidateIDAttachmentsRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDAttachmentsRequestBodyRemoteFieldsTypedDict( TypedDict @@ -178,6 +221,22 @@ class PostAtsCandidatesCandidateIDAttachmentsRequestBodyRemoteFields(BaseModel): ) r"""Workable specific remote fields for ATS actions.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["greenhouse", "workable"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDAttachmentsRequestBodyTypedDict(TypedDict): attachment: PostAtsCandidatesCandidateIDAttachmentsRequestBodyAttachmentTypedDict @@ -194,3 +253,25 @@ class PostAtsCandidatesCandidateIDAttachmentsRequestBody(BaseModel): PostAtsCandidatesCandidateIDAttachmentsRequestBodyRemoteFields ] = None r"""Additional fields that we will pass through to specific ATS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PostAtsCandidatesCandidateIDAttachmentsRequestBodyPostHeaders.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatscandidatescandidateidresultlinksop.py b/src/kombo/models/postatscandidatescandidateidresultlinksop.py index 6cb6f53..ecab21c 100644 --- a/src/kombo/models/postatscandidatescandidateidresultlinksop.py +++ b/src/kombo/models/postatscandidatescandidateidresultlinksop.py @@ -5,7 +5,7 @@ PostAtsCandidatesCandidateIDResultLinksRequestBody, PostAtsCandidatesCandidateIDResultLinksRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostAtsCandidatesCandidateIDResultLinksGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDResultLinksRequestTypedDict(TypedDict): candidate_id: str diff --git a/src/kombo/models/postatscandidatescandidateidresultlinkspositiveresponse.py b/src/kombo/models/postatscandidatescandidateidresultlinkspositiveresponse.py index 7470a92..1910122 100644 --- a/src/kombo/models/postatscandidatescandidateidresultlinkspositiveresponse.py +++ b/src/kombo/models/postatscandidatescandidateidresultlinkspositiveresponse.py @@ -46,3 +46,9 @@ class PostAtsCandidatesCandidateIDResultLinksPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsCandidatesCandidateIDResultLinksPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatscandidatescandidateidresultlinksrequestbody.py b/src/kombo/models/postatscandidatescandidateidresultlinksrequestbody.py index 03fc182..780bdd7 100644 --- a/src/kombo/models/postatscandidatescandidateidresultlinksrequestbody.py +++ b/src/kombo/models/postatscandidatescandidateidresultlinksrequestbody.py @@ -61,6 +61,22 @@ class PostAtsCandidatesCandidateIDResultLinksRequestBodyIcims(BaseModel): assessment_package_id: Optional[str] = None r"""The package ID of the assessment that the result link will be added to.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["assessment_package_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + PostAtsCandidatesCandidateIDResultLinksRequestBodyOverrideDocumentCategory = Literal[ "IRC_CANDIDATE_RESUME", @@ -93,6 +109,24 @@ class PostAtsCandidatesCandidateIDResultLinksRequestBodyOracle(BaseModel): multi_post_to_all_current_applications: Optional[bool] = None r"""If true, the result link will be posted to all current applications for the candidate.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["override_document_category", "multi_post_to_all_current_applications"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDResultLinksRequestBodyPostHeadersTypedDict(TypedDict): r"""Headers we will pass with `POST` requests to Greenhouse.""" @@ -111,31 +145,26 @@ class PostAtsCandidatesCandidateIDResultLinksRequestBodyPostHeaders(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -157,6 +186,22 @@ class PostAtsCandidatesCandidateIDResultLinksRequestBodyGreenhouse(BaseModel): ] = None r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDResultLinksRequestBodyWorkableTypedDict(TypedDict): r"""Workable specific remote fields for ATS actions.""" @@ -171,6 +216,22 @@ class PostAtsCandidatesCandidateIDResultLinksRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDResultLinksRequestBodyRemoteFieldsTypedDict( TypedDict @@ -212,6 +273,22 @@ class PostAtsCandidatesCandidateIDResultLinksRequestBodyRemoteFields(BaseModel): ) r"""Workable specific remote fields for ATS actions.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["icims", "oracle", "greenhouse", "workable"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDResultLinksRequestBodyTypedDict(TypedDict): label: str @@ -248,3 +325,25 @@ class PostAtsCandidatesCandidateIDResultLinksRequestBody(BaseModel): PostAtsCandidatesCandidateIDResultLinksRequestBodyRemoteFields ] = None r"""Additional fields that we will pass through to specific ATS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["details", "remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PostAtsCandidatesCandidateIDResultLinksRequestBodyPostHeaders.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatscandidatescandidateidtagsop.py b/src/kombo/models/postatscandidatescandidateidtagsop.py index 33c1595..784581e 100644 --- a/src/kombo/models/postatscandidatescandidateidtagsop.py +++ b/src/kombo/models/postatscandidatescandidateidtagsop.py @@ -5,7 +5,7 @@ PostAtsCandidatesCandidateIDTagsRequestBody, PostAtsCandidatesCandidateIDTagsRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostAtsCandidatesCandidateIDTagsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDTagsRequestTypedDict(TypedDict): candidate_id: str diff --git a/src/kombo/models/postatscandidatescandidateidtagspositiveresponse.py b/src/kombo/models/postatscandidatescandidateidtagspositiveresponse.py index 40ed46c..312ef84 100644 --- a/src/kombo/models/postatscandidatescandidateidtagspositiveresponse.py +++ b/src/kombo/models/postatscandidatescandidateidtagspositiveresponse.py @@ -42,3 +42,9 @@ class PostAtsCandidatesCandidateIDTagsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsCandidatesCandidateIDTagsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatscandidatescandidateidtagsrequestbody.py b/src/kombo/models/postatscandidatescandidateidtagsrequestbody.py index 5c35194..2fe3911 100644 --- a/src/kombo/models/postatscandidatescandidateidtagsrequestbody.py +++ b/src/kombo/models/postatscandidatescandidateidtagsrequestbody.py @@ -35,31 +35,26 @@ class PostAtsCandidatesCandidateIDTagsRequestBodyPostHeaders(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -81,6 +76,22 @@ class PostAtsCandidatesCandidateIDTagsRequestBodyGreenhouse(BaseModel): ) r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDTagsRequestBodyWorkableTypedDict(TypedDict): r"""Workable specific remote fields for ATS actions.""" @@ -95,6 +106,22 @@ class PostAtsCandidatesCandidateIDTagsRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDTagsRequestBodyRemoteFieldsTypedDict(TypedDict): r"""Additional fields that we will pass through to specific ATS systems.""" @@ -116,6 +143,22 @@ class PostAtsCandidatesCandidateIDTagsRequestBodyRemoteFields(BaseModel): workable: Optional[PostAtsCandidatesCandidateIDTagsRequestBodyWorkable] = None r"""Workable specific remote fields for ATS actions.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["greenhouse", "workable"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesCandidateIDTagsRequestBodyTypedDict(TypedDict): tag: PostAtsCandidatesCandidateIDTagsRequestBodyTagTypedDict @@ -132,3 +175,25 @@ class PostAtsCandidatesCandidateIDTagsRequestBody(BaseModel): None ) r"""Additional fields that we will pass through to specific ATS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PostAtsCandidatesCandidateIDTagsRequestBodyPostHeaders.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatscandidatesop.py b/src/kombo/models/postatscandidatesop.py index e0e9325..8882824 100644 --- a/src/kombo/models/postatscandidatesop.py +++ b/src/kombo/models/postatscandidatesop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class PostAtsCandidatesGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""ID of the integration you want to interact with.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/postatscandidatespositiveresponse.py b/src/kombo/models/postatscandidatespositiveresponse.py index 429ec65..baaea6c 100644 --- a/src/kombo/models/postatscandidatespositiveresponse.py +++ b/src/kombo/models/postatscandidatespositiveresponse.py @@ -25,31 +25,26 @@ class PostAtsCandidatesPositiveResponsePhoneNumber(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["type"] - nullable_fields = ["type"] - null_default_fields = [] - + optional_fields = set(["type"]) + nullable_fields = set(["type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -68,31 +63,26 @@ class PostAtsCandidatesPositiveResponseEmailAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email_address"] - nullable_fields = ["email_address", "type"] - null_default_fields = [] - + optional_fields = set(["email_address"]) + nullable_fields = set(["email_address", "type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -112,31 +102,26 @@ class PostAtsCandidatesPositiveResponseSocialMedia(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["link", "type", "username"] - nullable_fields = ["link", "type", "username"] - null_default_fields = [] - + optional_fields = set(["link", "type", "username"]) + nullable_fields = set(["link", "type", "username"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -178,47 +163,30 @@ class PostAtsCandidatesPositiveResponseLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -257,30 +225,14 @@ class PostAtsCandidatesPositiveResponseCurrentStage(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "remote_id", "index"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -307,30 +259,14 @@ class PostAtsCandidatesPositiveResponseJob(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -413,40 +349,14 @@ class PostAtsCandidatesPositiveResponseApplication(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = [ - "remote_id", - "outcome", - "rejection_reason_name", - "rejected_at", - "remote_url", - "remote_created_at", - "remote_updated_at", - "current_stage", - "job", - ] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -471,30 +381,14 @@ class PostAtsCandidatesPositiveResponseTag(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -630,52 +524,46 @@ class PostAtsCandidatesPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "phone_numbers", - "email_addresses", - "social_media", - "location", - ] - nullable_fields = [ - "first_name", - "last_name", - "company", - "title", - "confidential", - "source", - "phone_numbers", - "email_addresses", - "social_media", - "location", - "custom_fields", - "remote_url", - "remote_created_at", - "remote_updated_at", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set( + ["phone_numbers", "email_addresses", "social_media", "location"] + ) + nullable_fields = set( + [ + "first_name", + "last_name", + "company", + "title", + "confidential", + "source", + "phone_numbers", + "email_addresses", + "social_media", + "location", + "custom_fields", + "remote_url", + "remote_created_at", + "remote_updated_at", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -705,3 +593,9 @@ class PostAtsCandidatesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsCandidatesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatscandidatesrequestbody.py b/src/kombo/models/postatscandidatesrequestbody.py index 37eb410..5e24dc5 100644 --- a/src/kombo/models/postatscandidatesrequestbody.py +++ b/src/kombo/models/postatscandidatesrequestbody.py @@ -76,6 +76,22 @@ class PostAtsCandidatesRequestBodyLocation(BaseModel): zip_code: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["city", "state", "street_1", "zip_code"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + PostAtsCandidatesRequestBodyGender = Literal[ "MALE", @@ -198,6 +214,35 @@ class PostAtsCandidatesRequestBodyCandidate(BaseModel): social_links: Optional[List[PostAtsCandidatesRequestBodySocialLink]] = None r"""A list of social media links of the candidate. The links must be valid URLs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "additional_email_addresses", + "company", + "title", + "phone_number", + "additional_phone_numbers", + "location", + "gender", + "availability_date", + "salary_expectations", + "social_links", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyApplicationTypedDict(TypedDict): r"""Currently, every candidate has one application. If you are interested in talent pools, please contact Kombo.""" @@ -217,6 +262,22 @@ class PostAtsCandidatesRequestBodyApplication(BaseModel): stage_id: Optional[str] = None r"""Stage this candidate should be in. If left out, the default stage for this job will be used.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["stage_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyAnswerTypedDict(TypedDict): r"""Answer to a `FILE` question.""" @@ -272,6 +333,22 @@ class PostAtsCandidatesRequestBodyAnswer(BaseModel): **Note:** You must provide either this or `data_url`. We recommend `data_url` over `data` for most cases. """ + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content_type", "data_url", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + PostAtsCandidatesRequestBodyAnswerUnionTypedDict = TypeAliasType( "PostAtsCandidatesRequestBodyAnswerUnionTypedDict", @@ -432,6 +509,22 @@ class PostAtsCandidatesRequestBodyAttachment(BaseModel): **Note:** You must provide either this or `data_url`. We recommend `data_url` over `data` for most cases. """ + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content_type", "data_url", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + @deprecated( "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." @@ -468,6 +561,22 @@ class PostAtsCandidatesRequestBodySource(BaseModel): id: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "unified_key", "id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodySourcedByTypedDict(TypedDict): r"""Credit the recruiter or team member who sourced this candidate. @@ -511,6 +620,22 @@ class PostAtsCandidatesRequestBodyGdprConsent(BaseModel): given: Optional[bool] = None r"""Whether the candidate has given consent.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["expires_at", "given"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodySuccessfactorsTypedDict(TypedDict): r"""Fields specific to SAP SuccessFactors.""" @@ -548,36 +673,33 @@ class PostAtsCandidatesRequestBodySuccessfactors(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "Candidate", - "JobApplication", - "copyJobApplicationAttachments", - "update_existing_candidate", - ] - nullable_fields = ["update_existing_candidate"] - null_default_fields = [] - + optional_fields = set( + [ + "Candidate", + "JobApplication", + "copyJobApplicationAttachments", + "update_existing_candidate", + ] + ) + nullable_fields = set(["update_existing_candidate"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -595,6 +717,22 @@ class PostAtsCandidatesRequestBodyPersonio(BaseModel): application: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Personio's `application` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyTalentsoftTypedDict(TypedDict): r"""Fields specific to TalentSoft.""" @@ -614,6 +752,22 @@ class PostAtsCandidatesRequestBodyTalentsoft(BaseModel): application: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to TalentSoft's `application` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["applicant", "application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyTeamtailorApplicationTypedDict(TypedDict): attributes: NotRequired[Dict[str, Any]] @@ -624,6 +778,22 @@ class PostAtsCandidatesRequestBodyTeamtailorApplication(BaseModel): attributes: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Teamtailor's attributes section `Job application` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["attributes"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyTeamtailorTypedDict(TypedDict): candidate: NotRequired[Dict[str, Any]] @@ -637,6 +807,22 @@ class PostAtsCandidatesRequestBodyTeamtailor(BaseModel): application: Optional[PostAtsCandidatesRequestBodyTeamtailorApplication] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate", "application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyPostHeadersTypedDict(TypedDict): r"""Headers we will pass with `POST` requests to Greenhouse.""" @@ -655,31 +841,26 @@ class PostAtsCandidatesRequestBodyPostHeaders(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -697,6 +878,22 @@ class PostAtsCandidatesRequestBodyGreenhouse(BaseModel): post_headers: Optional[PostAtsCandidatesRequestBodyPostHeaders] = None r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyLeverTypedDict(TypedDict): r"""Fields specific to Lever.""" @@ -711,6 +908,22 @@ class PostAtsCandidatesRequestBodyLever(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Lever's `Candidate` object. Note: make sure to submit the keys and values in the correct form data format.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyWorkableTypedDict(TypedDict): r"""Workable specific remote fields for ATS actions.""" @@ -725,6 +938,22 @@ class PostAtsCandidatesRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodySocialSuffixReferenceTypedDict(TypedDict): r"""The WID of the social suffix reference for the candidate""" @@ -759,6 +988,22 @@ class PostAtsCandidatesRequestBodyNameDetailData(BaseModel): ] = None r"""The WID of the social suffix reference for the candidate""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Middle_Name", "Social_Suffix_Reference"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyLanguageReferenceTypedDict(TypedDict): r"""Used to set the candidate's primary language""" @@ -781,6 +1026,22 @@ class PostAtsCandidatesRequestBodyGlobalPersonalInformationData(BaseModel): None ) + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Date_of_Birth"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyJobAppliedToDataTypedDict(TypedDict): global_personal_information_data: NotRequired[ @@ -794,6 +1055,22 @@ class PostAtsCandidatesRequestBodyJobAppliedToData(BaseModel): pydantic.Field(alias="Global_Personal_Information_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Global_Personal_Information_Data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyFieldOfStudyReferenceTypedDict(TypedDict): wid: str @@ -847,6 +1124,31 @@ class PostAtsCandidatesRequestBodyEducationDatum(BaseModel): None ) + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "School_Name", + "First_Year_Attended", + "Last_Year_Attended", + "Field_of_Study_Reference", + "Degree_Reference", + "Grade_Average", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodySkillDatumTypedDict(TypedDict): skill_name: NotRequired[str] @@ -855,6 +1157,22 @@ class PostAtsCandidatesRequestBodySkillDatumTypedDict(TypedDict): class PostAtsCandidatesRequestBodySkillDatum(BaseModel): skill_name: Annotated[Optional[str], pydantic.Field(alias="Skill_Name")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Skill_Name"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyLanguageDatumLanguageReferenceTypedDict(TypedDict): wid: NotRequired[str] @@ -863,6 +1181,22 @@ class PostAtsCandidatesRequestBodyLanguageDatumLanguageReferenceTypedDict(TypedD class PostAtsCandidatesRequestBodyLanguageDatumLanguageReference(BaseModel): wid: Annotated[Optional[str], pydantic.Field(alias="WID")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["WID"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyLanguageProficiencyReferenceTypedDict(TypedDict): wid: str @@ -900,11 +1234,29 @@ class PostAtsCandidatesRequestBodyLanguageAbilityData(BaseModel): pydantic.Field(alias="Language_Ability_Type_Reference"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["Language_Proficiency_Reference", "Language_Ability_Type_Reference"] + ) + serialized = handler(self) + m = {} -class PostAtsCandidatesRequestBodyLanguageAbilityTypedDict(TypedDict): - language_ability_data: NotRequired[ - PostAtsCandidatesRequestBodyLanguageAbilityDataTypedDict - ] + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class PostAtsCandidatesRequestBodyLanguageAbilityTypedDict(TypedDict): + language_ability_data: NotRequired[ + PostAtsCandidatesRequestBodyLanguageAbilityDataTypedDict + ] class PostAtsCandidatesRequestBodyLanguageAbility(BaseModel): @@ -913,6 +1265,22 @@ class PostAtsCandidatesRequestBodyLanguageAbility(BaseModel): pydantic.Field(alias="Language_Ability_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Language_Ability_Data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyLanguageTypedDict(TypedDict): language_ability: List[PostAtsCandidatesRequestBodyLanguageAbilityTypedDict] @@ -927,6 +1295,22 @@ class PostAtsCandidatesRequestBodyLanguage(BaseModel): native: Annotated[Optional[bool], pydantic.Field(alias="Native")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Native"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyLanguageDatumTypedDict(TypedDict): language_reference: NotRequired[ @@ -945,6 +1329,22 @@ class PostAtsCandidatesRequestBodyLanguageDatum(BaseModel): Optional[PostAtsCandidatesRequestBodyLanguage], pydantic.Field(alias="Language") ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Language_Reference", "Language"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyExperienceDatumTypedDict(TypedDict): company_name: str @@ -985,6 +1385,24 @@ class PostAtsCandidatesRequestBodyExperienceDatum(BaseModel): description: Annotated[Optional[str], pydantic.Field(alias="Description")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["Location", "End_Date", "Currently_Work_Here", "Description"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyResumeDataTypedDict(TypedDict): education_data: NotRequired[ @@ -1018,6 +1436,24 @@ class PostAtsCandidatesRequestBodyResumeData(BaseModel): pydantic.Field(alias="Experience_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["Education_Data", "Skill_Data", "Language_Data", "Experience_Data"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyJobApplicationDataTypedDict(TypedDict): job_applied_to_data: NotRequired[ @@ -1037,6 +1473,22 @@ class PostAtsCandidatesRequestBodyJobApplicationData(BaseModel): pydantic.Field(alias="Resume_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Job_Applied_To_Data", "Resume_Data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyCountryRegionReferenceTypedDict(TypedDict): country_region_id: str @@ -1089,6 +1541,30 @@ class PostAtsCandidatesRequestBodyLocationData(BaseModel): pydantic.Field(alias="Country_City_Reference"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "Address_Line_1", + "Address_Line_2", + "Region_Subdivision_1", + "Country_Region_Reference", + "Country_City_Reference", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyContactDataTypedDict(TypedDict): location_data: NotRequired[PostAtsCandidatesRequestBodyLocationDataTypedDict] @@ -1100,6 +1576,22 @@ class PostAtsCandidatesRequestBodyContactData(BaseModel): pydantic.Field(alias="Location_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Location_Data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyWorkerReferenceTypedDict(TypedDict): r"""Reference to the Worker (employee) to link the candidate to. Provide either WID or Employee_ID.""" @@ -1115,6 +1607,22 @@ class PostAtsCandidatesRequestBodyWorkerReference(BaseModel): employee_id: Annotated[Optional[str], pydantic.Field(alias="Employee_ID")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["WID", "Employee_ID"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyCandidateDataTypedDict(TypedDict): name_detail_data: NotRequired[PostAtsCandidatesRequestBodyNameDetailDataTypedDict] @@ -1158,6 +1666,30 @@ class PostAtsCandidatesRequestBodyCandidateData(BaseModel): ] = None r"""Reference to the Worker (employee) to link the candidate to. Provide either WID or Employee_ID.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "Name_Detail_Data", + "Language_Reference", + "Job_Application_Data", + "Contact_Data", + "Worker_Reference", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyWorkdayTypedDict(TypedDict): r"""Fields specific to Workday. The remote fields schema follows the documentation at https://community.workday.com/sites/default/files/file-hosting/productionapi/Recruiting/v43.0/Put_Candidate.html. Only defined fields are supported, if you need additional field support please reach out to Kombo support.""" @@ -1180,6 +1712,22 @@ class PostAtsCandidatesRequestBodyWorkday(BaseModel): ] = None r"""Used to override the automatic source WID.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Candidate_Data", "Override_Source_Reference_WID"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyZohorecruitTypedDict(TypedDict): r"""Fields specific to Zoho Recruit.""" @@ -1194,6 +1742,22 @@ class PostAtsCandidatesRequestBodyZohorecruit(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Zoho Recruit's `Candidate` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyBullhornTypedDict(TypedDict): r"""Fields specific to Bullhorn.""" @@ -1213,6 +1777,22 @@ class PostAtsCandidatesRequestBodyBullhorn(BaseModel): job_submission: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Bullhorn's `JobSubmission` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate", "job_submission"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodySmartrecruitersTypedDict(TypedDict): r"""Fields specific to SmartRecruiters.""" @@ -1247,6 +1827,24 @@ class PostAtsCandidatesRequestBodySmartrecruiters(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to the SmartRecruiters's `Candidate` object. This API is used: https://developers.smartrecruiters.com/reference/createcandidate-1""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["candidate_with_questions", "candidate_without_questions", "candidate"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyTalentadoreTypedDict(TypedDict): r"""Fields specific to Talentadore.""" @@ -1261,6 +1859,22 @@ class PostAtsCandidatesRequestBodyTalentadore(BaseModel): applications: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to the Talentadore's when creating applications.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["applications"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyGuidecomTypedDict(TypedDict): r"""Fields specific to GuideCom.""" @@ -1275,6 +1889,22 @@ class PostAtsCandidatesRequestBodyGuidecom(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to GuideCom's `Candidate` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyDvinciTypedDict(TypedDict): r"""Fields specific to d.vinci.""" @@ -1289,6 +1919,22 @@ class PostAtsCandidatesRequestBodyDvinci(BaseModel): application: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to d.vinci's application object. This API is used: https://static.dvinci-easy.com/files/d.vinci%20application-apply-api.html#jobs__id__applyApi_post""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyHrworksTypedDict(TypedDict): r"""Fields specific to GuideCom.""" @@ -1305,6 +1951,22 @@ class PostAtsCandidatesRequestBodyHrworks(BaseModel): ] = None r"""Fields that we will pass through to HRWorks's `Job Application` object. This API is used: https://developers.hrworks.de/docs/hrworks-api-v2/53021f035f62d-post-job-applications""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["jobApplication"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyJobylonApplicationTypedDict(TypedDict): r"""Fields that we will pass through to Jobylon's create application [endpoint](https://developer.jobylon.com/push-api-and-webhooks#-xL0v)'s request body.""" @@ -1319,6 +1981,22 @@ class PostAtsCandidatesRequestBodyJobylonApplication(BaseModel): message: Optional[str] = None r"""The `message` field of Jobylon's create application endpoint's request body.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyJobylonTypedDict(TypedDict): r"""Fields specific to Jobylon.""" @@ -1333,6 +2011,22 @@ class PostAtsCandidatesRequestBodyJobylon(BaseModel): application: Optional[PostAtsCandidatesRequestBodyJobylonApplication] = None r"""Fields that we will pass through to Jobylon's create application [endpoint](https://developer.jobylon.com/push-api-and-webhooks#-xL0v)'s request body.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyStepTypedDict(TypedDict): id: int @@ -1351,6 +2045,22 @@ class PostAtsCandidatesRequestBodyWorkflowTypedDict(TypedDict): class PostAtsCandidatesRequestBodyWorkflow(BaseModel): step: Optional[PostAtsCandidatesRequestBodyStep] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["step"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyAvatureTypedDict(TypedDict): r"""Fields specific to Avature.""" @@ -1363,6 +2073,22 @@ class PostAtsCandidatesRequestBodyAvature(BaseModel): workflow: Optional[PostAtsCandidatesRequestBodyWorkflow] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["workflow"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyRecruiteeCandidateTypedDict(TypedDict): cover_letter_text: NotRequired[str] @@ -1373,6 +2099,22 @@ class PostAtsCandidatesRequestBodyRecruiteeCandidate(BaseModel): cover_letter_text: Optional[str] = None r"""The cover letter text as a string. This will be visible on the main candidate page. Can be provided together with the `cover_letter` attachment, which will end up in a separate `file` section.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["cover_letter_text"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyRecruiteeTypedDict(TypedDict): r"""Fields specific to Recruitee.""" @@ -1385,6 +2127,22 @@ class PostAtsCandidatesRequestBodyRecruitee(BaseModel): candidate: Optional[PostAtsCandidatesRequestBodyRecruiteeCandidate] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyUmantisTypedDict(TypedDict): r"""Fields specific to Abacus Umantis.""" @@ -1399,6 +2157,22 @@ class PostAtsCandidatesRequestBodyUmantis(BaseModel): person: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Abacus Umantis's \"Create a person\" endpoint's `attributes` when creating a candidate.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["person"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyPilogaCandidateTypedDict(TypedDict): r"""Additional candidate fields for P&I Loga that will be mapped to the application form.""" @@ -1413,6 +2187,22 @@ class PostAtsCandidatesRequestBodyPilogaCandidate(BaseModel): street: Optional[str] = None r"""The street address of the candidate.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["street"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyPilogaTypedDict(TypedDict): r"""Fields specific to P&I Loga.""" @@ -1427,6 +2217,22 @@ class PostAtsCandidatesRequestBodyPiloga(BaseModel): candidate: Optional[PostAtsCandidatesRequestBodyPilogaCandidate] = None r"""Additional candidate fields for P&I Loga that will be mapped to the application form.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyPinpointTypedDict(TypedDict): r"""Fields specific to Pinpoint.""" @@ -1441,6 +2247,22 @@ class PostAtsCandidatesRequestBodyPinpoint(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Pinpoint's `Candidate` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyCovetorestCandidateTypedDict(TypedDict): r"""Additional candidate fields that will be passed to the Coveto candidate creation.""" @@ -1455,6 +2277,22 @@ class PostAtsCandidatesRequestBodyCovetorestCandidate(BaseModel): mandant: Optional[float] = None r"""The mandant field for the candidate in Coveto.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["mandant"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyCovetorestTypedDict(TypedDict): r"""Fields specific to Coveto REST.""" @@ -1469,6 +2307,22 @@ class PostAtsCandidatesRequestBodyCovetorest(BaseModel): candidate: Optional[PostAtsCandidatesRequestBodyCovetorestCandidate] = None r"""Additional candidate fields that will be passed to the Coveto candidate creation.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyRemoteFieldsTypedDict(TypedDict): r"""Additional fields that we will pass through to specific ATS systems.""" @@ -1586,6 +2440,47 @@ class PostAtsCandidatesRequestBodyRemoteFields(BaseModel): covetorest: Optional[PostAtsCandidatesRequestBodyCovetorest] = None r"""Fields specific to Coveto REST.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "successfactors", + "personio", + "talentsoft", + "teamtailor", + "greenhouse", + "lever", + "workable", + "workday", + "zohorecruit", + "bullhorn", + "smartrecruiters", + "talentadore", + "guidecom", + "dvinci", + "hrworks", + "jobylon", + "avature", + "recruitee", + "umantis", + "piloga", + "pinpoint", + "covetorest", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsCandidatesRequestBodyTypedDict(TypedDict): candidate: PostAtsCandidatesRequestBodyCandidateTypedDict @@ -1659,3 +2554,146 @@ class PostAtsCandidatesRequestBody(BaseModel): remote_fields: Optional[PostAtsCandidatesRequestBodyRemoteFields] = None r"""Additional fields that we will pass through to specific ATS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "screening_question_answers", + "attachments", + "source", + "sourced_by", + "gdpr_consent", + "remote_fields", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PostAtsCandidatesRequestBodySuccessfactors.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyPostHeaders.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodySocialSuffixReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyNameDetailData.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyLanguageReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyGlobalPersonalInformationData.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyJobAppliedToData.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyFieldOfStudyReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyDegreeReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyEducationDatum.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodySkillDatum.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyLanguageDatumLanguageReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyLanguageProficiencyReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyLanguageAbilityTypeReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyLanguageAbilityData.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyLanguageAbility.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyLanguage.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyLanguageDatum.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyExperienceDatum.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyResumeData.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyJobApplicationData.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyCountryRegionReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyCountryCityReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyLocationData.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyContactData.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyWorkerReference.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyCandidateData.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyWorkday.model_rebuild() +except NameError: + pass +try: + PostAtsCandidatesRequestBodyHrworks.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsimporttrackedapplicationop.py b/src/kombo/models/postatsimporttrackedapplicationop.py index 17dabde..675bacb 100644 --- a/src/kombo/models/postatsimporttrackedapplicationop.py +++ b/src/kombo/models/postatsimporttrackedapplicationop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class PostAtsImportTrackedApplicationGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""ID of the integration you want to interact with.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/postatsimporttrackedapplicationpositiveresponse.py b/src/kombo/models/postatsimporttrackedapplicationpositiveresponse.py index a790e91..a16b93b 100644 --- a/src/kombo/models/postatsimporttrackedapplicationpositiveresponse.py +++ b/src/kombo/models/postatsimporttrackedapplicationpositiveresponse.py @@ -162,16 +162,6 @@ class PostAtsImportTrackedApplicationPositiveResponseGreenhouseApplicationID(Bas r"""Uses the `/applications/{id}` endpoint to retrieve the application.""" -PostAtsImportTrackedApplicationPositiveResponseGreenhouseUnionTypedDict = ( - PostAtsImportTrackedApplicationPositiveResponseGreenhouseApplicationIDTypedDict -) - - -PostAtsImportTrackedApplicationPositiveResponseGreenhouseUnion = ( - PostAtsImportTrackedApplicationPositiveResponseGreenhouseApplicationID -) - - class PostAtsImportTrackedApplicationPositiveResponseOnlyfyApplicationIDTypedDict( TypedDict ): @@ -192,6 +182,16 @@ class PostAtsImportTrackedApplicationPositiveResponseOnlyfyApplicationID(BaseMod r"""Uses the `/v1/application/{id}` endpoint to retrieve the application.""" +PostAtsImportTrackedApplicationPositiveResponseGreenhouseUnionTypedDict = ( + PostAtsImportTrackedApplicationPositiveResponseGreenhouseApplicationIDTypedDict +) + + +PostAtsImportTrackedApplicationPositiveResponseGreenhouseUnion = ( + PostAtsImportTrackedApplicationPositiveResponseGreenhouseApplicationID +) + + PostAtsImportTrackedApplicationPositiveResponseOnlyfyUnionTypedDict = ( PostAtsImportTrackedApplicationPositiveResponseOnlyfyApplicationIDTypedDict ) @@ -278,6 +278,31 @@ class ImportedID(BaseModel): PostAtsImportTrackedApplicationPositiveResponseSmartrecruitersUnion ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "erecruiter", + "successfactors", + "recruitee", + "greenhouse", + "onlyfy", + "smartrecruiters", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsImportTrackedApplicationPositiveResponseDataTypedDict(TypedDict): id: str @@ -300,30 +325,14 @@ class PostAtsImportTrackedApplicationPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["tracked_at"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -354,3 +363,37 @@ class PostAtsImportTrackedApplicationPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsImportTrackedApplicationPositiveResponseErecruiterApplicationAndCandidateRemoteIds.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationPositiveResponseErecruiterApplicationAndJobRemoteIds.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationPositiveResponseSuccessfactorsApplicationRemoteID.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationPositiveResponseRecruiteePlacementID.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationPositiveResponseGreenhouseApplicationID.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationPositiveResponseOnlyfyApplicationID.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationPositiveResponseSmartrecruitersCandidateAndJobRemoteIds.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsimporttrackedapplicationrequestbody.py b/src/kombo/models/postatsimporttrackedapplicationrequestbody.py index 5183b7b..62dad87 100644 --- a/src/kombo/models/postatsimporttrackedapplicationrequestbody.py +++ b/src/kombo/models/postatsimporttrackedapplicationrequestbody.py @@ -164,16 +164,6 @@ class PostAtsImportTrackedApplicationRequestBodyGreenhouseApplicationID(BaseMode r"""Uses the `/applications/{id}` endpoint to retrieve the application.""" -PostAtsImportTrackedApplicationRequestBodyGreenhouseUnionTypedDict = ( - PostAtsImportTrackedApplicationRequestBodyGreenhouseApplicationIDTypedDict -) - - -PostAtsImportTrackedApplicationRequestBodyGreenhouseUnion = ( - PostAtsImportTrackedApplicationRequestBodyGreenhouseApplicationID -) - - class PostAtsImportTrackedApplicationRequestBodyOnlyfyApplicationIDTypedDict(TypedDict): application_id: str id_type: Literal["application_id"] @@ -192,6 +182,16 @@ class PostAtsImportTrackedApplicationRequestBodyOnlyfyApplicationID(BaseModel): r"""Uses the `/v1/application/{id}` endpoint to retrieve the application.""" +PostAtsImportTrackedApplicationRequestBodyGreenhouseUnionTypedDict = ( + PostAtsImportTrackedApplicationRequestBodyGreenhouseApplicationIDTypedDict +) + + +PostAtsImportTrackedApplicationRequestBodyGreenhouseUnion = ( + PostAtsImportTrackedApplicationRequestBodyGreenhouseApplicationID +) + + PostAtsImportTrackedApplicationRequestBodyOnlyfyUnionTypedDict = ( PostAtsImportTrackedApplicationRequestBodyOnlyfyApplicationIDTypedDict ) @@ -287,37 +287,64 @@ class PostAtsImportTrackedApplicationRequestBody(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "erecruiter", - "successfactors", - "recruitee", - "greenhouse", - "onlyfy", - "smartrecruiters", - ] - nullable_fields = ["tracked_at"] - null_default_fields = [] - + optional_fields = set( + [ + "erecruiter", + "successfactors", + "recruitee", + "greenhouse", + "onlyfy", + "smartrecruiters", + ] + ) + nullable_fields = set(["tracked_at"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member + return m - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - return m +try: + PostAtsImportTrackedApplicationRequestBodyErecruiterApplicationAndCandidateRemoteIds.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationRequestBodyErecruiterApplicationAndJobRemoteIds.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationRequestBodySuccessfactorsApplicationRemoteID.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationRequestBodyRecruiteePlacementID.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationRequestBodyGreenhouseApplicationID.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationRequestBodyOnlyfyApplicationID.model_rebuild() +except NameError: + pass +try: + PostAtsImportTrackedApplicationRequestBodySmartrecruitersCandidateAndJobRemoteIds.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsjobsjobidapplicationsop.py b/src/kombo/models/postatsjobsjobidapplicationsop.py index f3ac0ec..bacea68 100644 --- a/src/kombo/models/postatsjobsjobidapplicationsop.py +++ b/src/kombo/models/postatsjobsjobidapplicationsop.py @@ -5,7 +5,7 @@ PostAtsJobsJobIDApplicationsRequestBody, PostAtsJobsJobIDApplicationsRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostAtsJobsJobIDApplicationsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestTypedDict(TypedDict): job_id: str diff --git a/src/kombo/models/postatsjobsjobidapplicationspositiveresponse.py b/src/kombo/models/postatsjobsjobidapplicationspositiveresponse.py index 10df409..cbe1666 100644 --- a/src/kombo/models/postatsjobsjobidapplicationspositiveresponse.py +++ b/src/kombo/models/postatsjobsjobidapplicationspositiveresponse.py @@ -32,31 +32,26 @@ class PostAtsJobsJobIDApplicationsPositiveResponseAnswer7(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["raw"] - nullable_fields = ["raw"] - null_default_fields = [] - + optional_fields = set(["raw"]) + nullable_fields = set(["raw"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -81,30 +76,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseQuestionUnknown(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -132,30 +111,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseAnswer6(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["date"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -179,30 +142,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseQuestionDate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -230,30 +177,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseAnswer5(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["number"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -277,30 +208,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseQuestionNumber(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -328,30 +243,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseAnswer4(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["checked"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -375,30 +274,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseQuestionBoolean(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -424,6 +307,22 @@ class PostAtsJobsJobIDApplicationsPositiveResponseAnswer3TypedDict(TypedDict): class PostAtsJobsJobIDApplicationsPositiveResponseAnswer3(BaseModel): choices: Optional[List[str]] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["choices"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsPositiveResponseQuestionMultiSelectTypedDict( TypedDict @@ -447,30 +346,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseQuestionMultiSelect(BaseModel) @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -498,30 +381,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseAnswer2(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["choice"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -549,30 +416,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseQuestionSingleSelect(BaseModel @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -600,30 +451,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseAnswer1(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["content"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -647,30 +482,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseQuestionText(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -743,30 +562,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseCurrentStage(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "remote_id", "index"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -793,30 +596,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseJob(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -836,31 +623,26 @@ class PostAtsJobsJobIDApplicationsPositiveResponsePhoneNumber(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["type"] - nullable_fields = ["type"] - null_default_fields = [] - + optional_fields = set(["type"]) + nullable_fields = set(["type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -879,31 +661,26 @@ class PostAtsJobsJobIDApplicationsPositiveResponseEmailAddress(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["email_address"] - nullable_fields = ["email_address", "type"] - null_default_fields = [] - + optional_fields = set(["email_address"]) + nullable_fields = set(["email_address", "type"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -923,31 +700,26 @@ class PostAtsJobsJobIDApplicationsPositiveResponseSocialMedia(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["link", "type", "username"] - nullable_fields = ["link", "type", "username"] - null_default_fields = [] - + optional_fields = set(["link", "type", "username"]) + nullable_fields = set(["link", "type", "username"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -989,47 +761,30 @@ class PostAtsJobsJobIDApplicationsPositiveResponseLocation(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - nullable_fields = [ - "city", - "country", - "raw", - "state", - "street_1", - "street_2", - "zip_code", - ] - null_default_fields = [] - + optional_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) + nullable_fields = set( + ["city", "country", "raw", "state", "street_1", "street_2", "zip_code"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1053,30 +808,14 @@ class PostAtsJobsJobIDApplicationsPositiveResponseTag(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["name", "remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -1215,52 +954,46 @@ class PostAtsJobsJobIDApplicationsPositiveResponseCandidate(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "phone_numbers", - "email_addresses", - "social_media", - "location", - ] - nullable_fields = [ - "first_name", - "last_name", - "company", - "title", - "confidential", - "source", - "phone_numbers", - "email_addresses", - "social_media", - "location", - "custom_fields", - "remote_url", - "remote_created_at", - "remote_updated_at", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set( + ["phone_numbers", "email_addresses", "social_media", "location"] + ) + nullable_fields = set( + [ + "first_name", + "last_name", + "company", + "title", + "confidential", + "source", + "phone_numbers", + "email_addresses", + "social_media", + "location", + "custom_fields", + "remote_url", + "remote_created_at", + "remote_updated_at", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1389,48 +1122,45 @@ class PostAtsJobsJobIDApplicationsPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["screening_question_answers"] - nullable_fields = [ - "remote_id", - "outcome", - "rejection_reason_name", - "rejected_at", - "current_stage_id", - "job_id", - "candidate_id", - "screening_question_answers", - "custom_fields", - "remote_url", - "remote_deleted_at", - "remote_created_at", - "remote_updated_at", - "current_stage", - "job", - "candidate", - ] - null_default_fields = [] - + optional_fields = set(["screening_question_answers"]) + nullable_fields = set( + [ + "remote_id", + "outcome", + "rejection_reason_name", + "rejected_at", + "current_stage_id", + "job_id", + "candidate_id", + "screening_question_answers", + "custom_fields", + "remote_url", + "remote_deleted_at", + "remote_created_at", + "remote_updated_at", + "current_stage", + "job", + "candidate", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -1460,3 +1190,41 @@ class PostAtsJobsJobIDApplicationsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostAtsJobsJobIDApplicationsPositiveResponseQuestionUnknown.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsPositiveResponseAnswer6.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsPositiveResponseQuestionDate.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsPositiveResponseQuestionNumber.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsPositiveResponseQuestionBoolean.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsPositiveResponseQuestionMultiSelect.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsPositiveResponseQuestionSingleSelect.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsPositiveResponseQuestionText.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postatsjobsjobidapplicationsrequestbody.py b/src/kombo/models/postatsjobsjobidapplicationsrequestbody.py index 34abf3d..a340104 100644 --- a/src/kombo/models/postatsjobsjobidapplicationsrequestbody.py +++ b/src/kombo/models/postatsjobsjobidapplicationsrequestbody.py @@ -76,6 +76,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyLocation(BaseModel): zip_code: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["city", "state", "street_1", "zip_code"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + PostAtsJobsJobIDApplicationsRequestBodyGender = Literal[ "MALE", @@ -204,6 +220,35 @@ class PostAtsJobsJobIDApplicationsRequestBodyCandidate(BaseModel): ) r"""A list of social media links of the candidate. The links must be valid URLs.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "additional_email_addresses", + "company", + "title", + "phone_number", + "additional_phone_numbers", + "location", + "gender", + "availability_date", + "salary_expectations", + "social_links", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + PostAtsJobsJobIDApplicationsRequestBodyAttachmentType = Literal[ "CV", @@ -268,6 +313,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyAttachment(BaseModel): **Note:** You must provide either this or `data_url`. We recommend `data_url` over `data` for most cases. """ + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content_type", "data_url", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + @deprecated( "warning: ** DEPRECATED ** - This will be removed in a future release, please migrate away from it as soon as possible." @@ -304,6 +365,22 @@ class PostAtsJobsJobIDApplicationsRequestBodySource(BaseModel): id: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["name", "unified_key", "id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodySourcedByTypedDict(TypedDict): r"""Credit the recruiter or team member who sourced this candidate. @@ -347,6 +424,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyGdprConsent(BaseModel): given: Optional[bool] = None r"""Whether the candidate has given consent.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["expires_at", "given"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodySuccessfactorsTypedDict(TypedDict): r"""Fields specific to SAP SuccessFactors.""" @@ -384,36 +477,33 @@ class PostAtsJobsJobIDApplicationsRequestBodySuccessfactors(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "Candidate", - "JobApplication", - "copyJobApplicationAttachments", - "update_existing_candidate", - ] - nullable_fields = ["update_existing_candidate"] - null_default_fields = [] - + optional_fields = set( + [ + "Candidate", + "JobApplication", + "copyJobApplicationAttachments", + "update_existing_candidate", + ] + ) + nullable_fields = set(["update_existing_candidate"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -431,6 +521,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyPersonio(BaseModel): application: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Personio's `application` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyTalentsoftTypedDict(TypedDict): r"""Fields specific to TalentSoft.""" @@ -450,6 +556,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyTalentsoft(BaseModel): application: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to TalentSoft's `application` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["applicant", "application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyTeamtailorApplicationTypedDict(TypedDict): attributes: NotRequired[Dict[str, Any]] @@ -460,6 +582,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyTeamtailorApplication(BaseModel): attributes: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Teamtailor's attributes section `Job application` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["attributes"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyTeamtailorTypedDict(TypedDict): candidate: NotRequired[Dict[str, Any]] @@ -477,6 +615,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyTeamtailor(BaseModel): PostAtsJobsJobIDApplicationsRequestBodyTeamtailorApplication ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate", "application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyPostHeadersTypedDict(TypedDict): r"""Headers we will pass with `POST` requests to Greenhouse.""" @@ -495,31 +649,26 @@ class PostAtsJobsJobIDApplicationsRequestBodyPostHeaders(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -539,6 +688,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyGreenhouse(BaseModel): post_headers: Optional[PostAtsJobsJobIDApplicationsRequestBodyPostHeaders] = None r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyLeverTypedDict(TypedDict): r"""Fields specific to Lever.""" @@ -553,6 +718,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyLever(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Lever's `Candidate` object. Note: make sure to submit the keys and values in the correct form data format.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyWorkableTypedDict(TypedDict): r"""Workable specific remote fields for ATS actions.""" @@ -567,6 +748,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodySocialSuffixReferenceTypedDict(TypedDict): r"""The WID of the social suffix reference for the candidate""" @@ -601,6 +798,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyNameDetailData(BaseModel): ] = None r"""The WID of the social suffix reference for the candidate""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Middle_Name", "Social_Suffix_Reference"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyLanguageReferenceTypedDict(TypedDict): r"""Used to set the candidate's primary language""" @@ -625,6 +838,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyGlobalPersonalInformationData(BaseM None ) + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Date_of_Birth"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyJobAppliedToDataTypedDict(TypedDict): global_personal_information_data: NotRequired[ @@ -638,6 +867,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyJobAppliedToData(BaseModel): pydantic.Field(alias="Global_Personal_Information_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Global_Personal_Information_Data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyFieldOfStudyReferenceTypedDict(TypedDict): wid: str @@ -693,6 +938,31 @@ class PostAtsJobsJobIDApplicationsRequestBodyEducationDatum(BaseModel): None ) + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "School_Name", + "First_Year_Attended", + "Last_Year_Attended", + "Field_of_Study_Reference", + "Degree_Reference", + "Grade_Average", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodySkillDatumTypedDict(TypedDict): skill_name: NotRequired[str] @@ -701,6 +971,22 @@ class PostAtsJobsJobIDApplicationsRequestBodySkillDatumTypedDict(TypedDict): class PostAtsJobsJobIDApplicationsRequestBodySkillDatum(BaseModel): skill_name: Annotated[Optional[str], pydantic.Field(alias="Skill_Name")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Skill_Name"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyLanguageDatumLanguageReferenceTypedDict( TypedDict @@ -711,6 +997,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyLanguageDatumLanguageReferenceTyped class PostAtsJobsJobIDApplicationsRequestBodyLanguageDatumLanguageReference(BaseModel): wid: Annotated[Optional[str], pydantic.Field(alias="WID")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["WID"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyLanguageProficiencyReferenceTypedDict( TypedDict @@ -752,6 +1054,24 @@ class PostAtsJobsJobIDApplicationsRequestBodyLanguageAbilityData(BaseModel): pydantic.Field(alias="Language_Ability_Type_Reference"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["Language_Proficiency_Reference", "Language_Ability_Type_Reference"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyLanguageAbilityTypedDict(TypedDict): language_ability_data: NotRequired[ @@ -765,6 +1085,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyLanguageAbility(BaseModel): pydantic.Field(alias="Language_Ability_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Language_Ability_Data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyLanguageTypedDict(TypedDict): language_ability: List[ @@ -781,11 +1117,27 @@ class PostAtsJobsJobIDApplicationsRequestBodyLanguage(BaseModel): native: Annotated[Optional[bool], pydantic.Field(alias="Native")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Native"]) + serialized = handler(self) + m = {} -class PostAtsJobsJobIDApplicationsRequestBodyLanguageDatumTypedDict(TypedDict): - language_reference: NotRequired[ - PostAtsJobsJobIDApplicationsRequestBodyLanguageDatumLanguageReferenceTypedDict - ] + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +class PostAtsJobsJobIDApplicationsRequestBodyLanguageDatumTypedDict(TypedDict): + language_reference: NotRequired[ + PostAtsJobsJobIDApplicationsRequestBodyLanguageDatumLanguageReferenceTypedDict + ] language: NotRequired[PostAtsJobsJobIDApplicationsRequestBodyLanguageTypedDict] @@ -800,6 +1152,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyLanguageDatum(BaseModel): pydantic.Field(alias="Language"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Language_Reference", "Language"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyExperienceDatumTypedDict(TypedDict): company_name: str @@ -840,6 +1208,24 @@ class PostAtsJobsJobIDApplicationsRequestBodyExperienceDatum(BaseModel): description: Annotated[Optional[str], pydantic.Field(alias="Description")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["Location", "End_Date", "Currently_Work_Here", "Description"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyResumeDataTypedDict(TypedDict): education_data: NotRequired[ @@ -877,6 +1263,24 @@ class PostAtsJobsJobIDApplicationsRequestBodyResumeData(BaseModel): pydantic.Field(alias="Experience_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["Education_Data", "Skill_Data", "Language_Data", "Experience_Data"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyJobApplicationDataTypedDict(TypedDict): job_applied_to_data: NotRequired[ @@ -896,6 +1300,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyJobApplicationData(BaseModel): pydantic.Field(alias="Resume_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Job_Applied_To_Data", "Resume_Data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyCountryRegionReferenceTypedDict(TypedDict): country_region_id: str @@ -948,6 +1368,30 @@ class PostAtsJobsJobIDApplicationsRequestBodyLocationData(BaseModel): pydantic.Field(alias="Country_City_Reference"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "Address_Line_1", + "Address_Line_2", + "Region_Subdivision_1", + "Country_Region_Reference", + "Country_City_Reference", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyContactDataTypedDict(TypedDict): location_data: NotRequired[ @@ -961,6 +1405,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyContactData(BaseModel): pydantic.Field(alias="Location_Data"), ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Location_Data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyWorkerReferenceTypedDict(TypedDict): r"""Reference to the Worker (employee) to link the candidate to. Provide either WID or Employee_ID.""" @@ -976,6 +1436,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyWorkerReference(BaseModel): employee_id: Annotated[Optional[str], pydantic.Field(alias="Employee_ID")] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["WID", "Employee_ID"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyCandidateDataTypedDict(TypedDict): name_detail_data: NotRequired[ @@ -1025,6 +1501,30 @@ class PostAtsJobsJobIDApplicationsRequestBodyCandidateData(BaseModel): ] = None r"""Reference to the Worker (employee) to link the candidate to. Provide either WID or Employee_ID.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "Name_Detail_Data", + "Language_Reference", + "Job_Application_Data", + "Contact_Data", + "Worker_Reference", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyWorkdayTypedDict(TypedDict): r"""Fields specific to Workday. The remote fields schema follows the documentation at https://community.workday.com/sites/default/files/file-hosting/productionapi/Recruiting/v43.0/Put_Candidate.html. Only defined fields are supported, if you need additional field support please reach out to Kombo support.""" @@ -1049,6 +1549,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyWorkday(BaseModel): ] = None r"""Used to override the automatic source WID.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["Candidate_Data", "Override_Source_Reference_WID"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyZohorecruitTypedDict(TypedDict): r"""Fields specific to Zoho Recruit.""" @@ -1063,6 +1579,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyZohorecruit(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Zoho Recruit's `Candidate` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyBullhornTypedDict(TypedDict): r"""Fields specific to Bullhorn.""" @@ -1082,6 +1614,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyBullhorn(BaseModel): job_submission: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Bullhorn's `JobSubmission` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate", "job_submission"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodySmartrecruitersTypedDict(TypedDict): r"""Fields specific to SmartRecruiters.""" @@ -1116,6 +1664,24 @@ class PostAtsJobsJobIDApplicationsRequestBodySmartrecruiters(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to the SmartRecruiters's `Candidate` object. This API is used: https://developers.smartrecruiters.com/reference/createcandidate-1""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + ["candidate_with_questions", "candidate_without_questions", "candidate"] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyTalentadoreTypedDict(TypedDict): r"""Fields specific to Talentadore.""" @@ -1130,6 +1696,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyTalentadore(BaseModel): applications: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to the Talentadore's when creating applications.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["applications"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyGuidecomTypedDict(TypedDict): r"""Fields specific to GuideCom.""" @@ -1144,6 +1726,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyGuidecom(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to GuideCom's `Candidate` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyDvinciTypedDict(TypedDict): r"""Fields specific to d.vinci.""" @@ -1158,6 +1756,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyDvinci(BaseModel): application: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to d.vinci's application object. This API is used: https://static.dvinci-easy.com/files/d.vinci%20application-apply-api.html#jobs__id__applyApi_post""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyHrworksTypedDict(TypedDict): r"""Fields specific to GuideCom.""" @@ -1174,6 +1788,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyHrworks(BaseModel): ] = None r"""Fields that we will pass through to HRWorks's `Job Application` object. This API is used: https://developers.hrworks.de/docs/hrworks-api-v2/53021f035f62d-post-job-applications""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["jobApplication"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyJobylonApplicationTypedDict(TypedDict): r"""Fields that we will pass through to Jobylon's create application [endpoint](https://developer.jobylon.com/push-api-and-webhooks#-xL0v)'s request body.""" @@ -1188,6 +1818,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyJobylonApplication(BaseModel): message: Optional[str] = None r"""The `message` field of Jobylon's create application endpoint's request body.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["message"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyJobylonTypedDict(TypedDict): r"""Fields specific to Jobylon.""" @@ -1206,6 +1852,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyJobylon(BaseModel): ) r"""Fields that we will pass through to Jobylon's create application [endpoint](https://developer.jobylon.com/push-api-and-webhooks#-xL0v)'s request body.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["application"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyStepTypedDict(TypedDict): id: int @@ -1224,6 +1886,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyWorkflowTypedDict(TypedDict): class PostAtsJobsJobIDApplicationsRequestBodyWorkflow(BaseModel): step: Optional[PostAtsJobsJobIDApplicationsRequestBodyStep] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["step"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyAvatureTypedDict(TypedDict): r"""Fields specific to Avature.""" @@ -1236,6 +1914,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyAvature(BaseModel): workflow: Optional[PostAtsJobsJobIDApplicationsRequestBodyWorkflow] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["workflow"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyRecruiteeCandidateTypedDict(TypedDict): cover_letter_text: NotRequired[str] @@ -1246,6 +1940,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyRecruiteeCandidate(BaseModel): cover_letter_text: Optional[str] = None r"""The cover letter text as a string. This will be visible on the main candidate page. Can be provided together with the `cover_letter` attachment, which will end up in a separate `file` section.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["cover_letter_text"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyRecruiteeTypedDict(TypedDict): r"""Fields specific to Recruitee.""" @@ -1262,6 +1972,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyRecruitee(BaseModel): None ) + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyUmantisTypedDict(TypedDict): r"""Fields specific to Abacus Umantis.""" @@ -1276,6 +2002,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyUmantis(BaseModel): person: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Abacus Umantis's \"Create a person\" endpoint's `attributes` when creating a candidate.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["person"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyPilogaCandidateTypedDict(TypedDict): r"""Additional candidate fields for P&I Loga that will be mapped to the application form.""" @@ -1290,6 +2032,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyPilogaCandidate(BaseModel): street: Optional[str] = None r"""The street address of the candidate.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["street"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyPilogaTypedDict(TypedDict): r"""Fields specific to P&I Loga.""" @@ -1306,6 +2064,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyPiloga(BaseModel): candidate: Optional[PostAtsJobsJobIDApplicationsRequestBodyPilogaCandidate] = None r"""Additional candidate fields for P&I Loga that will be mapped to the application form.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyPinpointTypedDict(TypedDict): r"""Fields specific to Pinpoint.""" @@ -1320,6 +2094,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyPinpoint(BaseModel): candidate: Optional[Dict[str, Any]] = None r"""Fields that we will pass through to Pinpoint's `Candidate` object.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyCovetorestCandidateTypedDict(TypedDict): r"""Additional candidate fields that will be passed to the Coveto candidate creation.""" @@ -1334,6 +2124,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyCovetorestCandidate(BaseModel): mandant: Optional[float] = None r"""The mandant field for the candidate in Coveto.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["mandant"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyCovetorestTypedDict(TypedDict): r"""Fields specific to Coveto REST.""" @@ -1352,6 +2158,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyCovetorest(BaseModel): ) r"""Additional candidate fields that will be passed to the Coveto candidate creation.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["candidate"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyRemoteFieldsTypedDict(TypedDict): r"""Additional fields that we will pass through to specific ATS systems.""" @@ -1481,6 +2303,47 @@ class PostAtsJobsJobIDApplicationsRequestBodyRemoteFields(BaseModel): covetorest: Optional[PostAtsJobsJobIDApplicationsRequestBodyCovetorest] = None r"""Fields specific to Coveto REST.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "successfactors", + "personio", + "talentsoft", + "teamtailor", + "greenhouse", + "lever", + "workable", + "workday", + "zohorecruit", + "bullhorn", + "smartrecruiters", + "talentadore", + "guidecom", + "dvinci", + "hrworks", + "jobylon", + "avature", + "recruitee", + "umantis", + "piloga", + "pinpoint", + "covetorest", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostAtsJobsJobIDApplicationsRequestBodyAnswerTypedDict(TypedDict): r"""Answer to a `FILE` question.""" @@ -1536,6 +2399,22 @@ class PostAtsJobsJobIDApplicationsRequestBodyAnswer(BaseModel): **Note:** You must provide either this or `data_url`. We recommend `data_url` over `data` for most cases. """ + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content_type", "data_url", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + PostAtsJobsJobIDApplicationsRequestBodyAnswerUnionTypedDict = TypeAliasType( "PostAtsJobsJobIDApplicationsRequestBodyAnswerUnionTypedDict", @@ -1722,3 +2601,147 @@ class PostAtsJobsJobIDApplicationsRequestBody(BaseModel): The available questions for a job can be retrieved from the get jobs endpoint. The answers will be validated based on the format of the questions. Make sure to follow this schema to avoid errors. """ + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "stage_id", + "attachments", + "source", + "sourced_by", + "gdpr_consent", + "remote_fields", + "screening_question_answers", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PostAtsJobsJobIDApplicationsRequestBodySuccessfactors.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyPostHeaders.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodySocialSuffixReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyNameDetailData.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyLanguageReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyGlobalPersonalInformationData.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyJobAppliedToData.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyFieldOfStudyReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyDegreeReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyEducationDatum.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodySkillDatum.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyLanguageDatumLanguageReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyLanguageProficiencyReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyLanguageAbilityTypeReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyLanguageAbilityData.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyLanguageAbility.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyLanguage.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyLanguageDatum.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyExperienceDatum.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyResumeData.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyJobApplicationData.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyCountryRegionReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyCountryCityReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyLocationData.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyContactData.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyWorkerReference.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyCandidateData.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyWorkday.model_rebuild() +except NameError: + pass +try: + PostAtsJobsJobIDApplicationsRequestBodyHrworks.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postconnectcreatelinkpositiveresponse.py b/src/kombo/models/postconnectcreatelinkpositiveresponse.py index 6c5648d..91e8d75 100644 --- a/src/kombo/models/postconnectcreatelinkpositiveresponse.py +++ b/src/kombo/models/postconnectcreatelinkpositiveresponse.py @@ -29,3 +29,9 @@ class PostConnectCreateLinkPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostConnectCreateLinkPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postconnectcreatelinkrequestbody.py b/src/kombo/models/postconnectcreatelinkrequestbody.py index 095331b..652e345 100644 --- a/src/kombo/models/postconnectcreatelinkrequestbody.py +++ b/src/kombo/models/postconnectcreatelinkrequestbody.py @@ -95,6 +95,7 @@ "hr4you", "cornerstoneondemand", "zvooverecruit", + "odoo", "comeet", "compleet", "compleetpitcher", @@ -109,11 +110,14 @@ "asymbl", "breezyhr", "flatchr", + "dayforce", "applicantstack", "reachmee", "talentadore", "sandbox", "guidecom", + "spott", + "loxo", "workdaycustomreport", "workdaycustomreportsftp", "payfitcustomer", @@ -150,9 +154,9 @@ "simployer", "peple", "youserve", - "dayforce", "hansalog", "lattice", + "latticetalent", "hoorayhr", "trinet", "namely", @@ -190,6 +194,8 @@ "peoplexd", "sftp", "sftpfetch", + "360learning", + "linkedinlearning", ] r"""Pre-define a tool this integration link can be used for.""" @@ -285,46 +291,45 @@ class PostConnectCreateLinkRequestBody(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "end_user_origin_id", - "remote_environment", - "integration_category", - "integration_tool", - "language", - "scope_config_id", - "enable_filtering", - "enable_field_mapping", - "link_type", - ] - nullable_fields = [ - "end_user_origin_id", - "remote_environment", - "integration_tool", - "language", - "scope_config_id", - ] - null_default_fields = [] - + optional_fields = set( + [ + "end_user_origin_id", + "remote_environment", + "integration_category", + "integration_tool", + "language", + "scope_config_id", + "enable_filtering", + "enable_field_mapping", + "link_type", + ] + ) + nullable_fields = set( + [ + "end_user_origin_id", + "remote_environment", + "integration_tool", + "language", + "scope_config_id", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m diff --git a/src/kombo/models/postforcesyncop.py b/src/kombo/models/postforcesyncop.py index f45ea80..ac0f2c6 100644 --- a/src/kombo/models/postforcesyncop.py +++ b/src/kombo/models/postforcesyncop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class PostForceSyncGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""ID of the integration you want to interact with.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/postforcesyncpositiveresponse.py b/src/kombo/models/postforcesyncpositiveresponse.py index 4ed9096..f81f791 100644 --- a/src/kombo/models/postforcesyncpositiveresponse.py +++ b/src/kombo/models/postforcesyncpositiveresponse.py @@ -48,3 +48,9 @@ class PostForceSyncPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostForceSyncPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postforcesyncrequestbody.py b/src/kombo/models/postforcesyncrequestbody.py index 725656f..d23abaa 100644 --- a/src/kombo/models/postforcesyncrequestbody.py +++ b/src/kombo/models/postforcesyncrequestbody.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer from typing import Literal, Optional from typing_extensions import NotRequired, TypedDict @@ -21,3 +22,19 @@ class PostForceSyncRequestBodyTypedDict(TypedDict): class PostForceSyncRequestBody(BaseModel): type: Optional[PostForceSyncRequestBodyType] = "FULL" r"""The type of the triggered sync.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["type"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/posthrisabsencesop.py b/src/kombo/models/posthrisabsencesop.py index ba8e75a..9201fbf 100644 --- a/src/kombo/models/posthrisabsencesop.py +++ b/src/kombo/models/posthrisabsencesop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class PostHrisAbsencesGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""ID of the integration you want to interact with.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/posthrisabsencespositiveresponse.py b/src/kombo/models/posthrisabsencespositiveresponse.py index a8e9dfa..fb3d4d8 100644 --- a/src/kombo/models/posthrisabsencespositiveresponse.py +++ b/src/kombo/models/posthrisabsencespositiveresponse.py @@ -10,10 +10,10 @@ UNSET_SENTINEL, UnrecognizedStr, ) -from kombo.utils import validate_const, validate_open_enum +from kombo.utils import validate_const import pydantic from pydantic import model_serializer -from pydantic.functional_validators import AfterValidator, PlainValidator +from pydantic.functional_validators import AfterValidator from typing import Any, List, Literal, Union from typing_extensions import Annotated, NotRequired, TypedDict @@ -126,53 +126,47 @@ class PostHrisAbsencesPositiveResponseData(BaseModel): https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString """ - status: Annotated[ - OptionalNullable[PostHrisAbsencesPositiveResponseStatus], - PlainValidator(validate_open_enum(False)), - ] = UNSET + status: OptionalNullable[PostHrisAbsencesPositiveResponseStatus] = UNSET r"""The absence’s current status. In rare cases where we can’t find a clear mapping, the original string is passed through.""" @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["status"] - nullable_fields = [ - "remote_id", - "start_date", - "end_date", - "start_half_day", - "end_half_day", - "start_time", - "end_time", - "amount", - "unit", - "status", - "employee_note", - "type_id", - "remote_deleted_at", - ] - null_default_fields = [] - + optional_fields = set(["status"]) + nullable_fields = set( + [ + "remote_id", + "start_date", + "end_date", + "start_half_day", + "end_half_day", + "start_time", + "end_time", + "amount", + "unit", + "status", + "employee_note", + "type_id", + "remote_deleted_at", + ] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -202,3 +196,9 @@ class PostHrisAbsencesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostHrisAbsencesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/posthrisabsencesrequestbody.py b/src/kombo/models/posthrisabsencesrequestbody.py index cf06165..98d1d55 100644 --- a/src/kombo/models/posthrisabsencesrequestbody.py +++ b/src/kombo/models/posthrisabsencesrequestbody.py @@ -40,6 +40,22 @@ class PostHrisAbsencesRequestBodyAdpworkforcenow(BaseModel): paid_leave: Optional[bool] = None r"""Whether the absence is paid or not.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["employment_id", "paid_leave"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostHrisAbsencesRequestBodyRemoteFieldsTypedDict(TypedDict): r"""Additional fields that we will pass through to specific HRIS systems.""" @@ -54,6 +70,22 @@ class PostHrisAbsencesRequestBodyRemoteFields(BaseModel): adpworkforcenow: Optional[PostHrisAbsencesRequestBodyAdpworkforcenow] = None r"""Fields specific to ADP Workforce Now.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["adpworkforcenow"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostHrisAbsencesRequestBodyTypedDict(TypedDict): employee_id: str @@ -134,39 +166,36 @@ class PostHrisAbsencesRequestBody(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "status", - "start_half_day", - "end_half_day", - "amount", - "unit", - "start_time", - "end_time", - "remote_fields", - ] - nullable_fields = ["employee_note"] - null_default_fields = [] - + optional_fields = set( + [ + "status", + "start_half_day", + "end_half_day", + "amount", + "unit", + "start_time", + "end_time", + "remote_fields", + ] + ) + nullable_fields = set(["employee_note"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m diff --git a/src/kombo/models/posthrisemployeesemployeeiddocumentsop.py b/src/kombo/models/posthrisemployeesemployeeiddocumentsop.py index 40ed8c5..e341b42 100644 --- a/src/kombo/models/posthrisemployeesemployeeiddocumentsop.py +++ b/src/kombo/models/posthrisemployeesemployeeiddocumentsop.py @@ -5,7 +5,7 @@ PostHrisEmployeesEmployeeIDDocumentsRequestBody, PostHrisEmployeesEmployeeIDDocumentsRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostHrisEmployeesEmployeeIDDocumentsGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostHrisEmployeesEmployeeIDDocumentsRequestTypedDict(TypedDict): employee_id: str diff --git a/src/kombo/models/posthrisemployeesemployeeiddocumentspositiveresponse.py b/src/kombo/models/posthrisemployeesemployeeiddocumentspositiveresponse.py index b0325a7..520fce8 100644 --- a/src/kombo/models/posthrisemployeesemployeeiddocumentspositiveresponse.py +++ b/src/kombo/models/posthrisemployeesemployeeiddocumentspositiveresponse.py @@ -42,3 +42,9 @@ class PostHrisEmployeesEmployeeIDDocumentsPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostHrisEmployeesEmployeeIDDocumentsPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/posthrisemployeesemployeeiddocumentsrequestbody.py b/src/kombo/models/posthrisemployeesemployeeiddocumentsrequestbody.py index 6db75a8..b421b14 100644 --- a/src/kombo/models/posthrisemployeesemployeeiddocumentsrequestbody.py +++ b/src/kombo/models/posthrisemployeesemployeeiddocumentsrequestbody.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer from typing import Optional from typing_extensions import NotRequired, TypedDict @@ -56,6 +57,22 @@ class Document(BaseModel): **Note:** You must provide either this or `data_url`. We recommend `data_url` over `data` for most cases. """ + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content_type", "data_url", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostHrisEmployeesEmployeeIDDocumentsRequestBodyTypedDict(TypedDict): category_id: str diff --git a/src/kombo/models/posthrisemployeesformop.py b/src/kombo/models/posthrisemployeesformop.py index 0555fef..f642545 100644 --- a/src/kombo/models/posthrisemployeesformop.py +++ b/src/kombo/models/posthrisemployeesformop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class PostHrisEmployeesFormGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""ID of the integration you want to interact with.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/posthrisemployeesformpositiveresponse.py b/src/kombo/models/posthrisemployeesformpositiveresponse.py index 8c1275e..2529148 100644 --- a/src/kombo/models/posthrisemployeesformpositiveresponse.py +++ b/src/kombo/models/posthrisemployeesformpositiveresponse.py @@ -25,30 +25,14 @@ class Prehire(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -75,30 +59,14 @@ class PostHrisEmployeesFormPositiveResponseData(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["id", "remote_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -129,3 +97,9 @@ class PostHrisEmployeesFormPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostHrisEmployeesFormPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postintegrationsintegrationidrelinkpositiveresponse.py b/src/kombo/models/postintegrationsintegrationidrelinkpositiveresponse.py index affff38..93c22a1 100644 --- a/src/kombo/models/postintegrationsintegrationidrelinkpositiveresponse.py +++ b/src/kombo/models/postintegrationsintegrationidrelinkpositiveresponse.py @@ -29,3 +29,9 @@ class PostIntegrationsIntegrationIDRelinkPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostIntegrationsIntegrationIDRelinkPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postintegrationsintegrationidrelinkrequestbody.py b/src/kombo/models/postintegrationsintegrationidrelinkrequestbody.py index 8bcb38b..17604a8 100644 --- a/src/kombo/models/postintegrationsintegrationidrelinkrequestbody.py +++ b/src/kombo/models/postintegrationsintegrationidrelinkrequestbody.py @@ -66,30 +66,25 @@ class PostIntegrationsIntegrationIDRelinkRequestBody(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["language", "scope_config_id", "link_type"] - nullable_fields = ["language", "scope_config_id"] - null_default_fields = [] - + optional_fields = set(["language", "scope_config_id", "link_type"]) + nullable_fields = set(["language", "scope_config_id"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m diff --git a/src/kombo/models/postpassthroughtoolapiop.py b/src/kombo/models/postpassthroughtoolapiop.py index 9fad6ab..b025bbe 100644 --- a/src/kombo/models/postpassthroughtoolapiop.py +++ b/src/kombo/models/postpassthroughtoolapiop.py @@ -5,7 +5,7 @@ PostPassthroughToolAPIRequestBody, PostPassthroughToolAPIRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PostPassthroughToolAPIGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostPassthroughToolAPIRequestTypedDict(TypedDict): tool: str diff --git a/src/kombo/models/postpassthroughtoolapipositiveresponse.py b/src/kombo/models/postpassthroughtoolapipositiveresponse.py index 3374e0c..475235b 100644 --- a/src/kombo/models/postpassthroughtoolapipositiveresponse.py +++ b/src/kombo/models/postpassthroughtoolapipositiveresponse.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import validate_const import pydantic +from pydantic import model_serializer from pydantic.functional_validators import AfterValidator from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -39,6 +40,22 @@ class PostPassthroughToolAPIPositiveResponseData(BaseModel): data: Optional[Any] = None r"""The HTTP body returned from the remote system. This will either be an array or object (in the case that JSON was returned) or a string (in any other case).""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PostPassthroughToolAPIPositiveResponseWarningTypedDict(TypedDict): message: str @@ -65,3 +82,9 @@ class PostPassthroughToolAPIPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PostPassthroughToolAPIPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/postpassthroughtoolapirequestbody.py b/src/kombo/models/postpassthroughtoolapirequestbody.py index fc7b364..a7b54b4 100644 --- a/src/kombo/models/postpassthroughtoolapirequestbody.py +++ b/src/kombo/models/postpassthroughtoolapirequestbody.py @@ -1,7 +1,8 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL +from pydantic import model_serializer from typing import Any, Dict, List, Literal, Optional, Union from typing_extensions import NotRequired, TypeAliasType, TypedDict @@ -66,6 +67,22 @@ class Value(BaseModel): **Note:** You must provide either this or `data_url`. We recommend `data_url` over `data` for most cases. """ + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content_type", "data_url", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + ValueUnionTypedDict = TypeAliasType("ValueUnionTypedDict", Union[ValueTypedDict, str]) @@ -131,3 +148,28 @@ class PostPassthroughToolAPIRequestBody(BaseModel): api_options: Optional[Dict[str, str]] = None r"""Custom options interpreted by the passthrough API adapter you've selected. These options are not documented right now as they're only for very advanced use cases.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "headers", + "params", + "data", + "response_as_base64", + "multipart_form_data", + "api_options", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/putassessmentordersassessmentorderidresultop.py b/src/kombo/models/putassessmentordersassessmentorderidresultop.py index 62753a8..e2c72ca 100644 --- a/src/kombo/models/putassessmentordersassessmentorderidresultop.py +++ b/src/kombo/models/putassessmentordersassessmentorderidresultop.py @@ -5,7 +5,7 @@ PutAssessmentOrdersAssessmentOrderIDResultRequestBody, PutAssessmentOrdersAssessmentOrderIDResultRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PutAssessmentOrdersAssessmentOrderIDResultGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PutAssessmentOrdersAssessmentOrderIDResultRequestTypedDict(TypedDict): assessment_order_id: str diff --git a/src/kombo/models/putassessmentordersassessmentorderidresultpositiveresponse.py b/src/kombo/models/putassessmentordersassessmentorderidresultpositiveresponse.py index 6de8024..b34ea0d 100644 --- a/src/kombo/models/putassessmentordersassessmentorderidresultpositiveresponse.py +++ b/src/kombo/models/putassessmentordersassessmentorderidresultpositiveresponse.py @@ -48,3 +48,9 @@ class PutAssessmentOrdersAssessmentOrderIDResultPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PutAssessmentOrdersAssessmentOrderIDResultPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/putassessmentordersassessmentorderidresultrequestbody.py b/src/kombo/models/putassessmentordersassessmentorderidresultrequestbody.py index ff302b1..493dffd 100644 --- a/src/kombo/models/putassessmentordersassessmentorderidresultrequestbody.py +++ b/src/kombo/models/putassessmentordersassessmentorderidresultrequestbody.py @@ -2,10 +2,10 @@ from __future__ import annotations from datetime import datetime -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import validate_const import pydantic -from pydantic import Field +from pydantic import Field, model_serializer from pydantic.functional_validators import AfterValidator from typing import List, Literal, Optional, Union from typing_extensions import Annotated, NotRequired, TypeAliasType, TypedDict @@ -141,6 +141,22 @@ class PutAssessmentOrdersAssessmentOrderIDResultRequestBodyAttachment(BaseModel) **Note:** You must provide either this or `data_url`. We recommend `data_url` over `data` for most cases. """ + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["content_type", "data_url", "data"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PutAssessmentOrdersAssessmentOrderIDResultRequestBodySmartrecruitersTypedDict( TypedDict @@ -153,6 +169,22 @@ class PutAssessmentOrdersAssessmentOrderIDResultRequestBodySmartrecruiters(BaseM score_label: Annotated[Optional[str], pydantic.Field(alias="scoreLabel")] = None r"""Value that we will pass through to SmartRecruiters' `scoreLabel` field.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["scoreLabel"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PutAssessmentOrdersAssessmentOrderIDResultRequestBodyRemoteFieldsTypedDict( TypedDict @@ -171,6 +203,22 @@ class PutAssessmentOrdersAssessmentOrderIDResultRequestBodyRemoteFields(BaseMode PutAssessmentOrdersAssessmentOrderIDResultRequestBodySmartrecruiters ] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["smartrecruiters"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PutAssessmentOrdersAssessmentOrderIDResultRequestBodyTypedDict(TypedDict): status: PutAssessmentOrdersAssessmentOrderIDResultRequestBodyStatus @@ -237,3 +285,42 @@ class PutAssessmentOrdersAssessmentOrderIDResultRequestBody(BaseModel): PutAssessmentOrdersAssessmentOrderIDResultRequestBodyRemoteFields ] = None r"""Additional fields that we will pass through to specific ATS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set( + [ + "completed_at", + "score", + "max_score", + "attributes", + "attachments", + "remote_fields", + ] + ) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + AttributeSubResult.model_rebuild() +except NameError: + pass +try: + AttributeText.model_rebuild() +except NameError: + pass +try: + PutAssessmentOrdersAssessmentOrderIDResultRequestBodySmartrecruiters.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/putassessmentpackagesop.py b/src/kombo/models/putassessmentpackagesop.py index 52a99f8..57db7e9 100644 --- a/src/kombo/models/putassessmentpackagesop.py +++ b/src/kombo/models/putassessmentpackagesop.py @@ -1,9 +1,10 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" from __future__ import annotations -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import FieldMetadata, HeaderMetadata import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -20,3 +21,19 @@ class PutAssessmentPackagesGlobals(BaseModel): FieldMetadata(header=HeaderMetadata(style="simple", explode=False)), ] = None r"""ID of the integration you want to interact with.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m diff --git a/src/kombo/models/putassessmentpackagespositiveresponse.py b/src/kombo/models/putassessmentpackagespositiveresponse.py index 03019cb..4412ec5 100644 --- a/src/kombo/models/putassessmentpackagespositiveresponse.py +++ b/src/kombo/models/putassessmentpackagespositiveresponse.py @@ -42,3 +42,9 @@ class PutAssessmentPackagesPositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PutAssessmentPackagesPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/putatsapplicationsapplicationidstageop.py b/src/kombo/models/putatsapplicationsapplicationidstageop.py index 27e0a33..2142134 100644 --- a/src/kombo/models/putatsapplicationsapplicationidstageop.py +++ b/src/kombo/models/putatsapplicationsapplicationidstageop.py @@ -5,7 +5,7 @@ PutAtsApplicationsApplicationIDStageRequestBody, PutAtsApplicationsApplicationIDStageRequestBodyTypedDict, ) -from kombo.types import BaseModel +from kombo.types import BaseModel, UNSET_SENTINEL from kombo.utils import ( FieldMetadata, HeaderMetadata, @@ -13,6 +13,7 @@ RequestMetadata, ) import pydantic +from pydantic import model_serializer from typing import Optional from typing_extensions import Annotated, NotRequired, TypedDict @@ -30,6 +31,22 @@ class PutAtsApplicationsApplicationIDStageGlobals(BaseModel): ] = None r"""ID of the integration you want to interact with.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["integration_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PutAtsApplicationsApplicationIDStageRequestTypedDict(TypedDict): application_id: str diff --git a/src/kombo/models/putatsapplicationsapplicationidstagepositiveresponse.py b/src/kombo/models/putatsapplicationsapplicationidstagepositiveresponse.py index ba139df..43a73b9 100644 --- a/src/kombo/models/putatsapplicationsapplicationidstagepositiveresponse.py +++ b/src/kombo/models/putatsapplicationsapplicationidstagepositiveresponse.py @@ -42,3 +42,9 @@ class PutAtsApplicationsApplicationIDStagePositiveResponse(BaseModel): Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PutAtsApplicationsApplicationIDStagePositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/putatsapplicationsapplicationidstagerequestbody.py b/src/kombo/models/putatsapplicationsapplicationidstagerequestbody.py index a68884d..cefafcc 100644 --- a/src/kombo/models/putatsapplicationsapplicationidstagerequestbody.py +++ b/src/kombo/models/putatsapplicationsapplicationidstagerequestbody.py @@ -25,31 +25,26 @@ class PutAtsApplicationsApplicationIDStageRequestBodyPostHeaders(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["On-Behalf-Of"] - nullable_fields = ["On-Behalf-Of"] - null_default_fields = [] - + optional_fields = set(["On-Behalf-Of"]) + nullable_fields = set(["On-Behalf-Of"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -71,6 +66,22 @@ class PutAtsApplicationsApplicationIDStageRequestBodyGreenhouse(BaseModel): ] = None r"""Headers we will pass with `POST` requests to Greenhouse.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["post_headers"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PutAtsApplicationsApplicationIDStageRequestBodyWorkableTypedDict(TypedDict): r"""Workable specific remote fields for ATS actions.""" @@ -85,6 +96,22 @@ class PutAtsApplicationsApplicationIDStageRequestBodyWorkable(BaseModel): on_behalf_of_user_remote_id: Optional[str] = None r"""The remote ID of the user that will be displayed in the UI as the one that performed the action.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["on_behalf_of_user_remote_id"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PutAtsApplicationsApplicationIDStageRequestBodyRemoteFieldsTypedDict(TypedDict): r"""Additional fields that we will pass through to specific ATS systems.""" @@ -110,6 +137,22 @@ class PutAtsApplicationsApplicationIDStageRequestBodyRemoteFields(BaseModel): workable: Optional[PutAtsApplicationsApplicationIDStageRequestBodyWorkable] = None r"""Workable specific remote fields for ATS actions.""" + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["greenhouse", "workable"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class PutAtsApplicationsApplicationIDStageRequestBodyTypedDict(TypedDict): stage_id: str @@ -128,3 +171,25 @@ class PutAtsApplicationsApplicationIDStageRequestBody(BaseModel): PutAtsApplicationsApplicationIDStageRequestBodyRemoteFields ] = None r"""Additional fields that we will pass through to specific ATS systems.""" + + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["remote_fields"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + + +try: + PutAtsApplicationsApplicationIDStageRequestBodyPostHeaders.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidpositiveresponse.py b/src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidpositiveresponse.py index 06ce9cf..7ab6200 100644 --- a/src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidpositiveresponse.py +++ b/src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidpositiveresponse.py @@ -51,30 +51,14 @@ class PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDPositiveResponseInteg @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["label"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -124,30 +108,14 @@ class PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDPositiveResponseData( @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["integration_field", "label", "description"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m @@ -167,3 +135,9 @@ class PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDPositiveResponse(Base Annotated[Literal["success"], AfterValidator(validate_const("success"))], pydantic.Field(alias="status"), ] = "success" + + +try: + PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidrequestbody.py b/src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidrequestbody.py index f091065..07944b0 100644 --- a/src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidrequestbody.py +++ b/src/kombo/models/putintegrationsintegrationidcustomfieldscustomfieldidrequestbody.py @@ -19,30 +19,14 @@ class PutIntegrationsIntegrationIDCustomFieldsCustomFieldIDRequestBody(BaseModel @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["integration_field_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/kombo/models/putintegrationsintegrationidenabledop.py b/src/kombo/models/putintegrationsintegrationidenabledop.py new file mode 100644 index 0000000..389fd2e --- /dev/null +++ b/src/kombo/models/putintegrationsintegrationidenabledop.py @@ -0,0 +1,30 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from .putintegrationsintegrationidenabledrequestbody import ( + PutIntegrationsIntegrationIDEnabledRequestBody, + PutIntegrationsIntegrationIDEnabledRequestBodyTypedDict, +) +from kombo.types import BaseModel +from kombo.utils import FieldMetadata, PathParamMetadata, RequestMetadata +from typing_extensions import Annotated, TypedDict + + +class PutIntegrationsIntegrationIDEnabledRequestTypedDict(TypedDict): + integration_id: str + r"""PUT /integrations/:integration_id/enabled Parameter""" + body: PutIntegrationsIntegrationIDEnabledRequestBodyTypedDict + r"""PUT /integrations/:integration_id/enabled Request body""" + + +class PutIntegrationsIntegrationIDEnabledRequest(BaseModel): + integration_id: Annotated[ + str, FieldMetadata(path=PathParamMetadata(style="simple", explode=False)) + ] + r"""PUT /integrations/:integration_id/enabled Parameter""" + + body: Annotated[ + PutIntegrationsIntegrationIDEnabledRequestBody, + FieldMetadata(request=RequestMetadata(media_type="application/json")), + ] + r"""PUT /integrations/:integration_id/enabled Request body""" diff --git a/src/kombo/models/putintegrationsintegrationidenabledpositiveresponse.py b/src/kombo/models/putintegrationsintegrationidenabledpositiveresponse.py new file mode 100644 index 0000000..a067e8a --- /dev/null +++ b/src/kombo/models/putintegrationsintegrationidenabledpositiveresponse.py @@ -0,0 +1,37 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from kombo.types import BaseModel +from kombo.utils import validate_const +import pydantic +from pydantic.functional_validators import AfterValidator +from typing import Literal +from typing_extensions import Annotated, TypedDict + + +class PutIntegrationsIntegrationIDEnabledPositiveResponseDataTypedDict(TypedDict): + pass + + +class PutIntegrationsIntegrationIDEnabledPositiveResponseData(BaseModel): + pass + + +class PutIntegrationsIntegrationIDEnabledPositiveResponseTypedDict(TypedDict): + data: PutIntegrationsIntegrationIDEnabledPositiveResponseDataTypedDict + status: Literal["success"] + + +class PutIntegrationsIntegrationIDEnabledPositiveResponse(BaseModel): + data: PutIntegrationsIntegrationIDEnabledPositiveResponseData + + STATUS: Annotated[ + Annotated[Literal["success"], AfterValidator(validate_const("success"))], + pydantic.Field(alias="status"), + ] = "success" + + +try: + PutIntegrationsIntegrationIDEnabledPositiveResponse.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/putintegrationsintegrationidenabledrequestbody.py b/src/kombo/models/putintegrationsintegrationidenabledrequestbody.py new file mode 100644 index 0000000..3e7d6ac --- /dev/null +++ b/src/kombo/models/putintegrationsintegrationidenabledrequestbody.py @@ -0,0 +1,15 @@ +"""Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" + +from __future__ import annotations +from kombo.types import BaseModel +from typing_extensions import TypedDict + + +class PutIntegrationsIntegrationIDEnabledRequestBodyTypedDict(TypedDict): + value: bool + r"""The desired state of the integration (e.g., `true` for enabled, `false` for disabled).""" + + +class PutIntegrationsIntegrationIDEnabledRequestBody(BaseModel): + value: bool + r"""The desired state of the integration (e.g., `true` for enabled, `false` for disabled).""" diff --git a/src/kombo/models/schema1_union_1.py b/src/kombo/models/schema1_union_1.py index b9d908d..52cc276 100644 --- a/src/kombo/models/schema1_union_1.py +++ b/src/kombo/models/schema1_union_1.py @@ -48,31 +48,26 @@ class Schema1FileRestrictions(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["max_file_size"] - nullable_fields = ["max_file_size"] - null_default_fields = [] - + optional_fields = set(["max_file_size"]) + nullable_fields = set(["max_file_size"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -104,31 +99,26 @@ class Schema1File(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -190,31 +180,26 @@ class Schema1Array1(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min_items", "max_items"] - nullable_fields = ["description", "unified_key", "min_items", "max_items"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min_items", "max_items"]) + nullable_fields = set(["description", "unified_key", "min_items", "max_items"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -270,31 +255,26 @@ class Schema1Object(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -347,31 +327,26 @@ class Schema1Checkbox(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -414,6 +389,22 @@ class Schema1Entry2(BaseModel): unified_value: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["unified_value"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class Schema1OptionsInline2TypedDict(TypedDict): entries: List[Schema1Entry2TypedDict] @@ -475,31 +466,26 @@ class Schema1MultiSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min_items", "max_items"] - nullable_fields = ["description", "unified_key", "min_items", "max_items"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min_items", "max_items"]) + nullable_fields = set(["description", "unified_key", "min_items", "max_items"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -566,6 +552,22 @@ class Schema1Entry1(BaseModel): unified_value: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["unified_value"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class Schema1OptionsInline1TypedDict(TypedDict): entries: List[Schema1Entry1TypedDict] @@ -621,31 +623,26 @@ class Schema1SingleSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -698,31 +695,26 @@ class Schema1Date(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -781,31 +773,26 @@ class Schema1Number(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min", "max"] - nullable_fields = ["description", "unified_key", "min", "max"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min", "max"]) + nullable_fields = set(["description", "unified_key", "min", "max"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -867,43 +854,30 @@ class Schema1Text(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "description", - "unified_key", - "min_length", - "max_length", - "reg_exp", - ] - nullable_fields = [ - "description", - "unified_key", - "min_length", - "max_length", - "reg_exp", - ] - null_default_fields = [] - + optional_fields = set( + ["description", "unified_key", "min_length", "max_length", "reg_exp"] + ) + nullable_fields = set( + ["description", "unified_key", "min_length", "max_length", "reg_exp"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -938,3 +912,57 @@ def serialize_model(self, handler): ], Field(discriminator="TYPE"), ] + + +try: + Schema1File.model_rebuild() +except NameError: + pass +try: + Schema1Array1.model_rebuild() +except NameError: + pass +try: + Schema1Object.model_rebuild() +except NameError: + pass +try: + Schema1Checkbox.model_rebuild() +except NameError: + pass +try: + Schema1OptionsReferenced2.model_rebuild() +except NameError: + pass +try: + Schema1OptionsInline2.model_rebuild() +except NameError: + pass +try: + Schema1MultiSelect.model_rebuild() +except NameError: + pass +try: + Schema1OptionsReferenced1.model_rebuild() +except NameError: + pass +try: + Schema1OptionsInline1.model_rebuild() +except NameError: + pass +try: + Schema1SingleSelect.model_rebuild() +except NameError: + pass +try: + Schema1Date.model_rebuild() +except NameError: + pass +try: + Schema1Number.model_rebuild() +except NameError: + pass +try: + Schema1Text.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/schema1_union_2.py b/src/kombo/models/schema1_union_2.py index 9580dd7..5dbedfd 100644 --- a/src/kombo/models/schema1_union_2.py +++ b/src/kombo/models/schema1_union_2.py @@ -32,38 +32,6 @@ from .schema2_union_2 import Schema2Union2, Schema2Union2TypedDict -Schema1Union2TypedDict = TypeAliasType( - "Schema1Union2TypedDict", - Union[ - Schema1DateTypedDict, - Schema1CheckboxTypedDict, - Schema1SingleSelectTypedDict, - Schema1ObjectTypedDict, - Schema1FileTypedDict, - Schema1NumberTypedDict, - Schema1TextTypedDict, - Schema1MultiSelectTypedDict, - "Schema1Array2TypedDict", - ], -) - - -Schema1Union2 = Annotated[ - Union[ - Schema1Text, - Schema1Number, - Schema1Date, - Schema1SingleSelect, - Schema1MultiSelect, - Schema1Checkbox, - Schema1Object, - "Schema1Array2", - Schema1File, - ], - Field(discriminator="TYPE"), -] - - class Schema1Array2TypedDict(TypedDict): label: str required: bool @@ -97,30 +65,63 @@ class Schema1Array2(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min_items", "max_items"] - nullable_fields = ["description", "unified_key", "min_items", "max_items"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min_items", "max_items"]) + nullable_fields = set(["description", "unified_key", "min_items", "max_items"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member + return m - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val - return m +Schema1Union2TypedDict = TypeAliasType( + "Schema1Union2TypedDict", + Union[ + Schema1DateTypedDict, + Schema1CheckboxTypedDict, + Schema1SingleSelectTypedDict, + Schema1ObjectTypedDict, + Schema1FileTypedDict, + Schema1NumberTypedDict, + Schema1TextTypedDict, + Schema1MultiSelectTypedDict, + "Schema1Array2TypedDict", + ], +) + + +Schema1Union2 = Annotated[ + Union[ + Schema1Text, + Schema1Number, + Schema1Date, + Schema1SingleSelect, + Schema1MultiSelect, + Schema1Checkbox, + Schema1Object, + Schema1Array2, + Schema1File, + ], + Field(discriminator="TYPE"), +] + + +try: + Schema1Array2.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/schema2_union_1.py b/src/kombo/models/schema2_union_1.py index 584bfb3..360eb50 100644 --- a/src/kombo/models/schema2_union_1.py +++ b/src/kombo/models/schema2_union_1.py @@ -47,31 +47,26 @@ class Schema2FileRestrictions(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["max_file_size"] - nullable_fields = ["max_file_size"] - null_default_fields = [] - + optional_fields = set(["max_file_size"]) + nullable_fields = set(["max_file_size"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -103,31 +98,26 @@ class Schema2File(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -213,43 +203,30 @@ class Schema2Text(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [ - "description", - "unified_key", - "min_length", - "max_length", - "reg_exp", - ] - nullable_fields = [ - "description", - "unified_key", - "min_length", - "max_length", - "reg_exp", - ] - null_default_fields = [] - + optional_fields = set( + ["description", "unified_key", "min_length", "max_length", "reg_exp"] + ) + nullable_fields = set( + ["description", "unified_key", "min_length", "max_length", "reg_exp"] + ) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -308,31 +285,26 @@ class Schema2Number(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min", "max"] - nullable_fields = ["description", "unified_key", "min", "max"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min", "max"]) + nullable_fields = set(["description", "unified_key", "min", "max"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -385,31 +357,26 @@ class Schema2Date(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -462,6 +429,22 @@ class Schema2Entry1(BaseModel): unified_value: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["unified_value"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class Schema2OptionsInline1TypedDict(TypedDict): entries: List[Schema2Entry1TypedDict] @@ -531,31 +514,26 @@ class Schema2SingleSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -584,6 +562,22 @@ class Schema2Entry2(BaseModel): unified_value: Optional[str] = None + @model_serializer(mode="wrap") + def serialize_model(self, handler): + optional_fields = set(["unified_value"]) + serialized = handler(self) + m = {} + + for n, f in type(self).model_fields.items(): + k = f.alias or n + val = serialized.get(k) + + if val != UNSET_SENTINEL: + if val is not None or k not in optional_fields: + m[k] = val + + return m + class Schema2OptionsInline2TypedDict(TypedDict): entries: List[Schema2Entry2TypedDict] @@ -659,31 +653,26 @@ class Schema2MultiSelect(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min_items", "max_items"] - nullable_fields = ["description", "unified_key", "min_items", "max_items"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min_items", "max_items"]) + nullable_fields = set(["description", "unified_key", "min_items", "max_items"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -736,31 +725,26 @@ class Schema2Checkbox(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -816,31 +800,26 @@ class Schema2Object1(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -878,31 +857,26 @@ class Schema2Array1(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min_items", "max_items"] - nullable_fields = ["description", "unified_key", "min_items", "max_items"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min_items", "max_items"]) + nullable_fields = set(["description", "unified_key", "min_items", "max_items"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -932,8 +906,62 @@ def serialize_model(self, handler): Schema2MultiSelect, Schema2Checkbox, Schema2Object1, - "Schema2Array1", + Schema2Array1, Schema2File, ], Field(discriminator="TYPE"), ] + + +try: + Schema2File.model_rebuild() +except NameError: + pass +try: + Schema2Text.model_rebuild() +except NameError: + pass +try: + Schema2Number.model_rebuild() +except NameError: + pass +try: + Schema2Date.model_rebuild() +except NameError: + pass +try: + Schema2OptionsInline1.model_rebuild() +except NameError: + pass +try: + Schema2OptionsReferenced1.model_rebuild() +except NameError: + pass +try: + Schema2SingleSelect.model_rebuild() +except NameError: + pass +try: + Schema2OptionsInline2.model_rebuild() +except NameError: + pass +try: + Schema2OptionsReferenced2.model_rebuild() +except NameError: + pass +try: + Schema2MultiSelect.model_rebuild() +except NameError: + pass +try: + Schema2Checkbox.model_rebuild() +except NameError: + pass +try: + Schema2Object1.model_rebuild() +except NameError: + pass +try: + Schema2Array1.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/schema2_union_2.py b/src/kombo/models/schema2_union_2.py index bba2c89..b347458 100644 --- a/src/kombo/models/schema2_union_2.py +++ b/src/kombo/models/schema2_union_2.py @@ -58,31 +58,26 @@ class Schema2Object2(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key"] - nullable_fields = ["description", "unified_key"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key"]) + nullable_fields = set(["description", "unified_key"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -120,31 +115,26 @@ class Schema2Array2(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = ["description", "unified_key", "min_items", "max_items"] - nullable_fields = ["description", "unified_key", "min_items", "max_items"] - null_default_fields = [] - + optional_fields = set(["description", "unified_key", "min_items", "max_items"]) + nullable_fields = set(["description", "unified_key", "min_items", "max_items"]) serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): - m[k] = val + is_nullable_and_explicitly_set = ( + k in nullable_fields + and (self.__pydantic_fields_set__.intersection({n})) # pylint: disable=no-member + ) + + if val != UNSET_SENTINEL: + if ( + val is not None + or k not in optional_fields + or is_nullable_and_explicitly_set + ): + m[k] = val return m @@ -173,9 +163,19 @@ def serialize_model(self, handler): Schema2SingleSelect, Schema2MultiSelect, Schema2Checkbox, - "Schema2Object2", - "Schema2Array2", + Schema2Object2, + Schema2Array2, Schema2File, ], Field(discriminator="TYPE"), ] + + +try: + Schema2Object2.model_rebuild() +except NameError: + pass +try: + Schema2Array2.model_rebuild() +except NameError: + pass diff --git a/src/kombo/models/syncfinishedwebhookpayload.py b/src/kombo/models/syncfinishedwebhookpayload.py index ba329f3..383770f 100644 --- a/src/kombo/models/syncfinishedwebhookpayload.py +++ b/src/kombo/models/syncfinishedwebhookpayload.py @@ -46,30 +46,14 @@ class SyncFinishedWebhookPayloadEndUser(BaseModel): @model_serializer(mode="wrap") def serialize_model(self, handler): - optional_fields = [] - nullable_fields = ["creator_email", "origin_id"] - null_default_fields = [] - serialized = handler(self) - m = {} for n, f in type(self).model_fields.items(): k = f.alias or n val = serialized.get(k) - serialized.pop(k, None) - optional_nullable = k in optional_fields and k in nullable_fields - is_set = ( - self.__pydantic_fields_set__.intersection({n}) - or k in null_default_fields - ) # pylint: disable=no-member - - if val is not None and val != UNSET_SENTINEL: - m[k] = val - elif val != UNSET_SENTINEL and ( - not k in optional_fields or (optional_nullable and is_set) - ): + if val != UNSET_SENTINEL: m[k] = val return m diff --git a/src/kombo/utils/__init__.py b/src/kombo/utils/__init__.py index 56164cf..15394a0 100644 --- a/src/kombo/utils/__init__.py +++ b/src/kombo/utils/__init__.py @@ -1,10 +1,19 @@ """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.""" -from typing import TYPE_CHECKING +from typing import TYPE_CHECKING, Callable, TypeVar from importlib import import_module +import asyncio import builtins import sys +_T = TypeVar("_T") + + +async def run_sync_in_thread(func: Callable[..., _T], *args) -> _T: + """Run a synchronous function in a thread pool to avoid blocking the event loop.""" + return await asyncio.to_thread(func, *args) + + if TYPE_CHECKING: from .annotations import get_discriminator from .datetimes import parse_datetime @@ -41,7 +50,6 @@ validate_decimal, validate_float, validate_int, - validate_open_enum, ) from .url import generate_url, template_url, remove_suffix from .values import ( @@ -102,7 +110,6 @@ "validate_const", "validate_float", "validate_int", - "validate_open_enum", "cast_partial", ] @@ -155,7 +162,6 @@ "validate_const": ".serializers", "validate_float": ".serializers", "validate_int": ".serializers", - "validate_open_enum": ".serializers", "cast_partial": ".values", } diff --git a/src/kombo/utils/enums.py b/src/kombo/utils/enums.py index c3bc13c..3324e1b 100644 --- a/src/kombo/utils/enums.py +++ b/src/kombo/utils/enums.py @@ -2,6 +2,10 @@ import enum import sys +from typing import Any + +from pydantic_core import core_schema + class OpenEnumMeta(enum.EnumMeta): # The __call__ method `boundary` kwarg was added in 3.11 and must be present @@ -72,3 +76,59 @@ def __call__( ) except ValueError: return value + + def __new__(mcs, name, bases, namespace, **kwargs): + cls = super().__new__(mcs, name, bases, namespace, **kwargs) + + # Add __get_pydantic_core_schema__ to make open enums work correctly + # in union discrimination. In strict mode (used by Pydantic for unions), + # only known enum values match. In lax mode, unknown values are accepted. + def __get_pydantic_core_schema__( + cls_inner: Any, _source_type: Any, _handler: Any + ) -> core_schema.CoreSchema: + # Create a validator that only accepts known enum values (for strict mode) + def validate_strict(v: Any) -> Any: + if isinstance(v, cls_inner): + return v + # Use the parent EnumMeta's __call__ which raises ValueError for unknown values + return enum.EnumMeta.__call__(cls_inner, v) + + # Create a lax validator that accepts unknown values + def validate_lax(v: Any) -> Any: + if isinstance(v, cls_inner): + return v + try: + return enum.EnumMeta.__call__(cls_inner, v) + except ValueError: + # Return the raw value for unknown enum values + return v + + # Determine the base type schema (str or int) + is_int_enum = False + for base in cls_inner.__mro__: + if base is int: + is_int_enum = True + break + if base is str: + break + + base_schema = ( + core_schema.int_schema() + if is_int_enum + else core_schema.str_schema() + ) + + # Use lax_or_strict_schema: + # - strict mode: only known enum values match (raises ValueError for unknown) + # - lax mode: accept any value, return enum member or raw value + return core_schema.lax_or_strict_schema( + lax_schema=core_schema.chain_schema( + [base_schema, core_schema.no_info_plain_validator_function(validate_lax)] + ), + strict_schema=core_schema.chain_schema( + [base_schema, core_schema.no_info_plain_validator_function(validate_strict)] + ), + ) + + setattr(cls, "__get_pydantic_core_schema__", classmethod(__get_pydantic_core_schema__)) + return cls diff --git a/src/kombo/utils/eventstreaming.py b/src/kombo/utils/eventstreaming.py index 0969899..f2052fc 100644 --- a/src/kombo/utils/eventstreaming.py +++ b/src/kombo/utils/eventstreaming.py @@ -2,7 +2,9 @@ import re import json +from dataclasses import dataclass, asdict from typing import ( + Any, Callable, Generic, TypeVar, @@ -22,6 +24,7 @@ class EventStream(Generic[T]): client_ref: Optional[object] response: httpx.Response generator: Generator[T, None, None] + _closed: bool def __init__( self, @@ -33,17 +36,21 @@ def __init__( self.response = response self.generator = stream_events(response, decoder, sentinel) self.client_ref = client_ref + self._closed = False def __iter__(self): return self def __next__(self): + if self._closed: + raise StopIteration return next(self.generator) def __enter__(self): return self def __exit__(self, exc_type, exc_val, exc_tb): + self._closed = True self.response.close() @@ -53,6 +60,7 @@ class EventStreamAsync(Generic[T]): client_ref: Optional[object] response: httpx.Response generator: AsyncGenerator[T, None] + _closed: bool def __init__( self, @@ -64,33 +72,45 @@ def __init__( self.response = response self.generator = stream_events_async(response, decoder, sentinel) self.client_ref = client_ref + self._closed = False def __aiter__(self): return self async def __anext__(self): + if self._closed: + raise StopAsyncIteration return await self.generator.__anext__() async def __aenter__(self): return self async def __aexit__(self, exc_type, exc_val, exc_tb): + self._closed = True await self.response.aclose() +@dataclass class ServerEvent: id: Optional[str] = None event: Optional[str] = None - data: Optional[str] = None + data: Any = None retry: Optional[int] = None MESSAGE_BOUNDARIES = [ b"\r\n\r\n", - b"\n\n", + b"\r\n\r", + b"\r\n\n", + b"\r\r\n", + b"\n\r\n", b"\r\r", + b"\n\r", + b"\n\n", ] +UTF8_BOM = b"\xef\xbb\xbf" + async def stream_events_async( response: httpx.Response, @@ -99,14 +119,10 @@ async def stream_events_async( ) -> AsyncGenerator[T, None]: buffer = bytearray() position = 0 - discard = False + event_id: Optional[str] = None async for chunk in response.aiter_bytes(): - # We've encountered the sentinel value and should no longer process - # incoming data. Instead we throw new data away until the server closes - # the connection. - if discard: - continue - + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] buffer += chunk for i in range(position, len(buffer)): char = buffer[i : i + 1] @@ -121,15 +137,22 @@ async def stream_events_async( block = buffer[position:i] position = i + len(seq) - event, discard = _parse_event(block, decoder, sentinel) + event, discard, event_id = _parse_event( + raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + ) if event is not None: yield event + if discard: + await response.aclose() + return if position > 0: buffer = buffer[position:] position = 0 - event, discard = _parse_event(buffer, decoder, sentinel) + event, discard, _ = _parse_event( + raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + ) if event is not None: yield event @@ -141,14 +164,10 @@ def stream_events( ) -> Generator[T, None, None]: buffer = bytearray() position = 0 - discard = False + event_id: Optional[str] = None for chunk in response.iter_bytes(): - # We've encountered the sentinel value and should no longer process - # incoming data. Instead we throw new data away until the server closes - # the connection. - if discard: - continue - + if len(buffer) == 0 and chunk.startswith(UTF8_BOM): + chunk = chunk[len(UTF8_BOM) :] buffer += chunk for i in range(position, len(buffer)): char = buffer[i : i + 1] @@ -163,22 +182,33 @@ def stream_events( block = buffer[position:i] position = i + len(seq) - event, discard = _parse_event(block, decoder, sentinel) + event, discard, event_id = _parse_event( + raw=block, decoder=decoder, sentinel=sentinel, event_id=event_id + ) if event is not None: yield event + if discard: + response.close() + return if position > 0: buffer = buffer[position:] position = 0 - event, discard = _parse_event(buffer, decoder, sentinel) + event, discard, _ = _parse_event( + raw=buffer, decoder=decoder, sentinel=sentinel, event_id=event_id + ) if event is not None: yield event def _parse_event( - raw: bytearray, decoder: Callable[[str], T], sentinel: Optional[str] = None -) -> Tuple[Optional[T], bool]: + *, + raw: bytearray, + decoder: Callable[[str], T], + sentinel: Optional[str] = None, + event_id: Optional[str] = None, +) -> Tuple[Optional[T], bool, Optional[str]]: block = raw.decode() lines = re.split(r"\r?\n|\r", block) publish = False @@ -189,13 +219,16 @@ def _parse_event( continue delim = line.find(":") - if delim <= 0: + if delim == 0: continue - field = line[0:delim] - value = line[delim + 1 :] if delim < len(line) - 1 else "" - if len(value) and value[0] == " ": - value = value[1:] + field = line + value = "" + if delim > 0: + field = line[0:delim] + value = line[delim + 1 :] if delim < len(line) - 1 else "" + if len(value) and value[0] == " ": + value = value[1:] if field == "event": event.event = value @@ -204,37 +237,36 @@ def _parse_event( data += value + "\n" publish = True elif field == "id": - event.id = value publish = True + if "\x00" not in value: + event_id = value elif field == "retry": - event.retry = int(value) if value.isdigit() else None + if value.isdigit(): + event.retry = int(value) publish = True + event.id = event_id + if sentinel and data == f"{sentinel}\n": - return None, True + return None, True, event_id if data: data = data[:-1] - event.data = data - - data_is_primitive = ( - data.isnumeric() or data == "true" or data == "false" or data == "null" - ) - data_is_json = ( - data.startswith("{") or data.startswith("[") or data.startswith('"') - ) - - if data_is_primitive or data_is_json: - try: - event.data = json.loads(data) - except Exception: - pass + try: + event.data = json.loads(data) + except json.JSONDecodeError: + event.data = data out = None if publish: - out = decoder(json.dumps(event.__dict__)) - - return out, False + out_dict = { + k: v + for k, v in asdict(event).items() + if v is not None or (k == "data" and data) + } + out = decoder(json.dumps(out_dict)) + + return out, False, event_id def _peek_sequence(position: int, buffer: bytearray, sequence: bytes): diff --git a/src/kombo/utils/requestbodies.py b/src/kombo/utils/requestbodies.py index d5240dd..1de32b6 100644 --- a/src/kombo/utils/requestbodies.py +++ b/src/kombo/utils/requestbodies.py @@ -44,15 +44,15 @@ def serialize_request_body( serialized_request_body = SerializedRequestBody(media_type) - if re.match(r"(application|text)\/.*?\+*json.*", media_type) is not None: + if re.match(r"^(application|text)\/([^+]+\+)*json.*", media_type) is not None: serialized_request_body.content = marshal_json(request_body, request_body_type) - elif re.match(r"multipart\/.*", media_type) is not None: + elif re.match(r"^multipart\/.*", media_type) is not None: ( serialized_request_body.media_type, serialized_request_body.data, serialized_request_body.files, ) = serialize_multipart_form(media_type, request_body) - elif re.match(r"application\/x-www-form-urlencoded.*", media_type) is not None: + elif re.match(r"^application\/x-www-form-urlencoded.*", media_type) is not None: serialized_request_body.data = serialize_form_data(request_body) elif isinstance(request_body, (bytes, bytearray, io.BytesIO, io.BufferedReader)): serialized_request_body.content = request_body diff --git a/src/kombo/utils/security.py b/src/kombo/utils/security.py index 295a3f4..17996bd 100644 --- a/src/kombo/utils/security.py +++ b/src/kombo/utils/security.py @@ -135,6 +135,8 @@ def _parse_security_scheme_value( elif scheme_type == "http": if sub_type == "bearer": headers[header_name] = _apply_bearer(value) + elif sub_type == "basic": + headers[header_name] = value elif sub_type == "custom": return else: diff --git a/src/kombo/utils/serializers.py b/src/kombo/utils/serializers.py index 378a14c..14321eb 100644 --- a/src/kombo/utils/serializers.py +++ b/src/kombo/utils/serializers.py @@ -102,26 +102,6 @@ def validate_int(b): return int(b) -def validate_open_enum(is_int: bool): - def validate(e): - if e is None: - return None - - if isinstance(e, Unset): - return e - - if is_int: - if not isinstance(e, int): - raise ValueError("Expected int") - else: - if not isinstance(e, str): - raise ValueError("Expected string") - - return e - - return validate - - def validate_const(v): def validate(c): # Optional[T] is a Union[T, None] diff --git a/uv.lock b/uv.lock index f8bd0bf..3956c2c 100644 --- a/uv.lock +++ b/uv.lock @@ -1,11 +1,10 @@ version = 1 revision = 3 -requires-python = ">=3.9.2" +requires-python = ">=3.10" resolution-markers = [ "python_full_version >= '3.12'", "python_full_version == '3.11.*'", - "python_full_version == '3.10.*'", - "python_full_version < '3.10'", + "python_full_version < '3.11'", ] [[package]] @@ -147,27 +146,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" }, ] -[[package]] -name = "iniconfig" -version = "2.1.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -sdist = { url = "https://files.pythonhosted.org/packages/f2/97/ebf4da567aa6827c909642694d71c9fcf53e5b504f2d96afea02718862f3/iniconfig-2.1.0.tar.gz", hash = "sha256:3abbd2e30b36733fee78f9c7f7308f2d0050e88f0087fd25c2645f63c773e1c7", size = 4793, upload-time = "2025-03-19T20:09:59.721Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2c/e1/e6716421ea10d38022b952c159d5161ca1193197fb744506875fbb87ea7b/iniconfig-2.1.0-py3-none-any.whl", hash = "sha256:9deba5723312380e77435581c6bf4935c94cbfab9b1ed33ef8d238ea168eb760", size = 6050, upload-time = "2025-03-19T20:10:01.071Z" }, -] - [[package]] name = "iniconfig" version = "2.3.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.12'", - "python_full_version == '3.11.*'", - "python_full_version == '3.10.*'", -] sdist = { url = "https://files.pythonhosted.org/packages/72/34/14ca021ce8e5dfedc35312d08ba8bf51fdd999c576889fc2c24cb97f4f10/iniconfig-2.3.0.tar.gz", hash = "sha256:c76315c77db068650d49c5b56314774a7804df16fee4402c1f19d6d15d8c4730", size = 20503, upload-time = "2025-10-18T21:55:43.219Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/cb/b1/3846dd7f199d53cb17f49cba7e651e9ce294d8497c8c150530ed11865bb8/iniconfig-2.3.0-py3-none-any.whl", hash = "sha256:f631c04d2c48c52b84d0d0549c99ff3859c98df65b3101406327ecc7d53fbf12", size = 7484, upload-time = "2025-10-18T21:55:41.639Z" }, @@ -180,8 +162,7 @@ source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "asttokens" }, { name = "executing" }, - { name = "pytest", version = "8.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "pytest", version = "9.0.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "pytest" }, { name = "rich" }, { name = "tomli", marker = "python_full_version < '3.11'" }, ] @@ -210,7 +191,7 @@ wheels = [ [[package]] name = "kombo" -version = "0.2.3" +version = "0.3.0" source = { editable = "." } dependencies = [ { name = "httpcore" }, @@ -225,8 +206,7 @@ dev = [ { name = "mypy" }, { name = "pylint" }, { name = "pyright" }, - { name = "pytest", version = "8.4.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "pytest", version = "9.0.2", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "pytest" }, { name = "respx" }, ] @@ -248,32 +228,12 @@ dev = [ { name = "respx", specifier = ">=0.21.0" }, ] -[[package]] -name = "markdown-it-py" -version = "3.0.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "mdurl", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/38/71/3b932df36c1a044d397a1f92d1cf91ee0a503d91e470cbd670aa66b07ed0/markdown-it-py-3.0.0.tar.gz", hash = "sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb", size = 74596, upload-time = "2023-06-03T06:41:14.443Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl", hash = "sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1", size = 87528, upload-time = "2023-06-03T06:41:11.019Z" }, -] - [[package]] name = "markdown-it-py" version = "4.0.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.12'", - "python_full_version == '3.11.*'", - "python_full_version == '3.10.*'", -] dependencies = [ - { name = "mdurl", marker = "python_full_version >= '3.10'" }, + { name = "mdurl" }, ] sdist = { url = "https://files.pythonhosted.org/packages/5b/f5/4ec618ed16cc4f8fb3b701563655a69816155e79e24a17b651541804721d/markdown_it_py-4.0.0.tar.gz", hash = "sha256:cb0a2b4aa34f932c007117b194e945bd74e0ec24133ceb5bac59009cda1cb9f3", size = 73070, upload-time = "2025-08-11T12:57:52.854Z" } wheels = [ @@ -333,12 +293,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/d2/8b/801aa06445d2de3895f59e476f38f3f8d610ef5d6908245f07d002676cbf/mypy-1.15.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c43a7682e24b4f576d93072216bf56eeff70d9140241f9edec0c104d0c515036", size = 12402541, upload-time = "2025-02-05T03:49:57.623Z" }, { url = "https://files.pythonhosted.org/packages/c7/67/5a4268782eb77344cc613a4cf23540928e41f018a9a1ec4c6882baf20ab8/mypy-1.15.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:baefc32840a9f00babd83251560e0ae1573e2f9d1b067719479bfb0e987c6357", size = 12494348, upload-time = "2025-02-05T03:48:52.361Z" }, { url = "https://files.pythonhosted.org/packages/83/3e/57bb447f7bbbfaabf1712d96f9df142624a386d98fb026a761532526057e/mypy-1.15.0-cp313-cp313-win_amd64.whl", hash = "sha256:b9378e2c00146c44793c98b8d5a61039a048e31f429fb0eb546d93f4b000bedf", size = 9373648, upload-time = "2025-02-05T03:49:11.395Z" }, - { url = "https://files.pythonhosted.org/packages/5a/fa/79cf41a55b682794abe71372151dbbf856e3008f6767057229e6649d294a/mypy-1.15.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:e601a7fa172c2131bff456bb3ee08a88360760d0d2f8cbd7a75a65497e2df078", size = 10737129, upload-time = "2025-02-05T03:50:24.509Z" }, - { url = "https://files.pythonhosted.org/packages/d3/33/dd8feb2597d648de29e3da0a8bf4e1afbda472964d2a4a0052203a6f3594/mypy-1.15.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:712e962a6357634fef20412699a3655c610110e01cdaa6180acec7fc9f8513ba", size = 9856335, upload-time = "2025-02-05T03:49:36.398Z" }, - { url = "https://files.pythonhosted.org/packages/e4/b5/74508959c1b06b96674b364ffeb7ae5802646b32929b7701fc6b18447592/mypy-1.15.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f95579473af29ab73a10bada2f9722856792a36ec5af5399b653aa28360290a5", size = 11611935, upload-time = "2025-02-05T03:49:14.154Z" }, - { url = "https://files.pythonhosted.org/packages/6c/53/da61b9d9973efcd6507183fdad96606996191657fe79701b2c818714d573/mypy-1.15.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8f8722560a14cde92fdb1e31597760dc35f9f5524cce17836c0d22841830fd5b", size = 12365827, upload-time = "2025-02-05T03:48:59.458Z" }, - { url = "https://files.pythonhosted.org/packages/c1/72/965bd9ee89540c79a25778cc080c7e6ef40aa1eeac4d52cec7eae6eb5228/mypy-1.15.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:1fbb8da62dc352133d7d7ca90ed2fb0e9d42bb1a32724c287d3c76c58cbaa9c2", size = 12541924, upload-time = "2025-02-05T03:50:03.12Z" }, - { url = "https://files.pythonhosted.org/packages/46/d0/f41645c2eb263e6c77ada7d76f894c580c9ddb20d77f0c24d34273a4dab2/mypy-1.15.0-cp39-cp39-win_amd64.whl", hash = "sha256:d10d994b41fb3497719bbf866f227b3489048ea4bbbb5015357db306249f7980", size = 9271176, upload-time = "2025-02-05T03:50:10.86Z" }, { url = "https://files.pythonhosted.org/packages/09/4e/a7d65c7322c510de2c409ff3828b03354a7c43f5a8ed458a7a131b41c7b9/mypy-1.15.0-py3-none-any.whl", hash = "sha256:5469affef548bd1895d86d3bf10ce2b44e33d86923c29e4d675b3e323437ea3e", size = 2221777, upload-time = "2025-02-05T03:50:08.348Z" }, ] @@ -369,27 +323,10 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/20/12/38679034af332785aac8774540895e234f4d07f7545804097de4b666afd8/packaging-25.0-py3-none-any.whl", hash = "sha256:29572ef2b1f17581046b3a2227d5c611fb25ec70ca1ba8554b24b0e69331a484", size = 66469, upload-time = "2025-04-19T11:48:57.875Z" }, ] -[[package]] -name = "platformdirs" -version = "4.4.0" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -sdist = { url = "https://files.pythonhosted.org/packages/23/e8/21db9c9987b0e728855bd57bff6984f67952bea55d6f75e055c46b5383e8/platformdirs-4.4.0.tar.gz", hash = "sha256:ca753cf4d81dc309bc67b0ea38fd15dc97bc30ce419a7f58d13eb3bf14c4febf", size = 21634, upload-time = "2025-08-26T14:32:04.268Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/40/4b/2028861e724d3bd36227adfa20d3fd24c3fc6d52032f4a93c133be5d17ce/platformdirs-4.4.0-py3-none-any.whl", hash = "sha256:abd01743f24e5287cd7a5db3752faf1a2d65353f38ec26d98e25a6db65958c85", size = 18654, upload-time = "2025-08-26T14:32:02.735Z" }, -] - [[package]] name = "platformdirs" version = "4.5.0" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.12'", - "python_full_version == '3.11.*'", - "python_full_version == '3.10.*'", -] sdist = { url = "https://files.pythonhosted.org/packages/61/33/9611380c2bdb1225fdef633e2a9610622310fed35ab11dac9620972ee088/platformdirs-4.5.0.tar.gz", hash = "sha256:70ddccdd7c99fc5942e9fc25636a8b34d04c24b335100223152c2803e4063312", size = 21632, upload-time = "2025-10-08T17:44:48.791Z" } wheels = [ { url = "https://files.pythonhosted.org/packages/73/cb/ac7874b3e5d58441674fb70742e6c374b28b0c7cb988d37d991cde47166c/platformdirs-4.5.0-py3-none-any.whl", hash = "sha256:e578a81bb873cbb89a41fcc904c7ef523cc18284b7e3b3ccf06aca1403b7ebd3", size = 18651, upload-time = "2025-10-08T17:44:47.223Z" }, @@ -511,19 +448,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/5c/96/5fb7d8c3c17bc8c62fdb031c47d77a1af698f1d7a406b0f79aaa1338f9ad/pydantic_core-2.41.5-cp314-cp314t-win32.whl", hash = "sha256:b4ececa40ac28afa90871c2cc2b9ffd2ff0bf749380fbdf57d165fd23da353aa", size = 1988906, upload-time = "2025-11-04T13:41:56.606Z" }, { url = "https://files.pythonhosted.org/packages/22/ed/182129d83032702912c2e2d8bbe33c036f342cc735737064668585dac28f/pydantic_core-2.41.5-cp314-cp314t-win_amd64.whl", hash = "sha256:80aa89cad80b32a912a65332f64a4450ed00966111b6615ca6816153d3585a8c", size = 1981607, upload-time = "2025-11-04T13:41:58.889Z" }, { url = "https://files.pythonhosted.org/packages/9f/ed/068e41660b832bb0b1aa5b58011dea2a3fe0ba7861ff38c4d4904c1c1a99/pydantic_core-2.41.5-cp314-cp314t-win_arm64.whl", hash = "sha256:35b44f37a3199f771c3eaa53051bc8a70cd7b54f333531c59e29fd4db5d15008", size = 1974769, upload-time = "2025-11-04T13:42:01.186Z" }, - { url = "https://files.pythonhosted.org/packages/54/db/160dffb57ed9a3705c4cbcbff0ac03bdae45f1ca7d58ab74645550df3fbd/pydantic_core-2.41.5-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:8bfeaf8735be79f225f3fefab7f941c712aaca36f1128c9d7e2352ee1aa87bdf", size = 2107999, upload-time = "2025-11-04T13:42:03.885Z" }, - { url = "https://files.pythonhosted.org/packages/a3/7d/88e7de946f60d9263cc84819f32513520b85c0f8322f9b8f6e4afc938383/pydantic_core-2.41.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:346285d28e4c8017da95144c7f3acd42740d637ff41946af5ce6e5e420502dd5", size = 1929745, upload-time = "2025-11-04T13:42:06.075Z" }, - { url = "https://files.pythonhosted.org/packages/d5/c2/aef51e5b283780e85e99ff19db0f05842d2d4a8a8cd15e63b0280029b08f/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a75dafbf87d6276ddc5b2bf6fae5254e3d0876b626eb24969a574fff9149ee5d", size = 1920220, upload-time = "2025-11-04T13:42:08.457Z" }, - { url = "https://files.pythonhosted.org/packages/c7/97/492ab10f9ac8695cd76b2fdb24e9e61f394051df71594e9bcc891c9f586e/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:7b93a4d08587e2b7e7882de461e82b6ed76d9026ce91ca7915e740ecc7855f60", size = 2067296, upload-time = "2025-11-04T13:42:10.817Z" }, - { url = "https://files.pythonhosted.org/packages/ec/23/984149650e5269c59a2a4c41d234a9570adc68ab29981825cfaf4cfad8f4/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:e8465ab91a4bd96d36dde3263f06caa6a8a6019e4113f24dc753d79a8b3a3f82", size = 2231548, upload-time = "2025-11-04T13:42:13.843Z" }, - { url = "https://files.pythonhosted.org/packages/71/0c/85bcbb885b9732c28bec67a222dbed5ed2d77baee1f8bba2002e8cd00c5c/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:299e0a22e7ae2b85c1a57f104538b2656e8ab1873511fd718a1c1c6f149b77b5", size = 2362571, upload-time = "2025-11-04T13:42:16.208Z" }, - { url = "https://files.pythonhosted.org/packages/c0/4a/412d2048be12c334003e9b823a3fa3d038e46cc2d64dd8aab50b31b65499/pydantic_core-2.41.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:707625ef0983fcfb461acfaf14de2067c5942c6bb0f3b4c99158bed6fedd3cf3", size = 2068175, upload-time = "2025-11-04T13:42:18.911Z" }, - { url = "https://files.pythonhosted.org/packages/73/f4/c58b6a776b502d0a5540ad02e232514285513572060f0d78f7832ca3c98b/pydantic_core-2.41.5-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f41eb9797986d6ebac5e8edff36d5cef9de40def462311b3eb3eeded1431e425", size = 2177203, upload-time = "2025-11-04T13:42:22.578Z" }, - { url = "https://files.pythonhosted.org/packages/ed/ae/f06ea4c7e7a9eead3d165e7623cd2ea0cb788e277e4f935af63fc98fa4e6/pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:0384e2e1021894b1ff5a786dbf94771e2986ebe2869533874d7e43bc79c6f504", size = 2148191, upload-time = "2025-11-04T13:42:24.89Z" }, - { url = "https://files.pythonhosted.org/packages/c1/57/25a11dcdc656bf5f8b05902c3c2934ac3ea296257cc4a3f79a6319e61856/pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_armv7l.whl", hash = "sha256:f0cd744688278965817fd0839c4a4116add48d23890d468bc436f78beb28abf5", size = 2343907, upload-time = "2025-11-04T13:42:27.683Z" }, - { url = "https://files.pythonhosted.org/packages/96/82/e33d5f4933d7a03327c0c43c65d575e5919d4974ffc026bc917a5f7b9f61/pydantic_core-2.41.5-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:753e230374206729bf0a807954bcc6c150d3743928a73faffee51ac6557a03c3", size = 2322174, upload-time = "2025-11-04T13:42:30.776Z" }, - { url = "https://files.pythonhosted.org/packages/81/45/4091be67ce9f469e81656f880f3506f6a5624121ec5eb3eab37d7581897d/pydantic_core-2.41.5-cp39-cp39-win32.whl", hash = "sha256:873e0d5b4fb9b89ef7c2d2a963ea7d02879d9da0da8d9d4933dee8ee86a8b460", size = 1990353, upload-time = "2025-11-04T13:42:33.111Z" }, - { url = "https://files.pythonhosted.org/packages/44/8a/a98aede18db6e9cd5d66bcacd8a409fcf8134204cdede2e7de35c5a2c5ef/pydantic_core-2.41.5-cp39-cp39-win_amd64.whl", hash = "sha256:e4f4a984405e91527a0d62649ee21138f8e3d0ef103be488c1dc11a80d7f184b", size = 2015698, upload-time = "2025-11-04T13:42:35.484Z" }, { url = "https://files.pythonhosted.org/packages/11/72/90fda5ee3b97e51c494938a4a44c3a35a9c96c19bba12372fb9c634d6f57/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_10_12_x86_64.whl", hash = "sha256:b96d5f26b05d03cc60f11a7761a5ded1741da411e7fe0909e27a5e6a0cb7b034", size = 2115441, upload-time = "2025-11-04T13:42:39.557Z" }, { url = "https://files.pythonhosted.org/packages/1f/53/8942f884fa33f50794f119012dc6a1a02ac43a56407adaac20463df8e98f/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-macosx_11_0_arm64.whl", hash = "sha256:634e8609e89ceecea15e2d61bc9ac3718caaaa71963717bf3c8f38bfde64242c", size = 1930291, upload-time = "2025-11-04T13:42:42.169Z" }, { url = "https://files.pythonhosted.org/packages/79/c8/ecb9ed9cd942bce09fc888ee960b52654fbdbede4ba6c2d6e0d3b1d8b49c/pydantic_core-2.41.5-graalpy311-graalpy242_311_native-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:93e8740d7503eb008aa2df04d3b9735f845d43ae845e6dcd2be0b55a2da43cd2", size = 1948632, upload-time = "2025-11-04T13:42:44.564Z" }, @@ -569,11 +493,9 @@ dependencies = [ { name = "dill" }, { name = "isort" }, { name = "mccabe" }, - { name = "platformdirs", version = "4.4.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "platformdirs", version = "4.5.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "platformdirs" }, { name = "tomli", marker = "python_full_version < '3.11'" }, { name = "tomlkit" }, - { name = "typing-extensions", marker = "python_full_version < '3.10'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/9a/e9/60280b14cc1012794120345ce378504cf17409e38cd88f455dc24e0ad6b5/pylint-3.2.3.tar.gz", hash = "sha256:02f6c562b215582386068d52a30f520d84fdbcf2a95fc7e855b816060d048b60", size = 1506739, upload-time = "2024-06-06T14:19:17.955Z" } wheels = [ @@ -593,44 +515,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/58/e0/5283593f61b3c525d6d7e94cfb6b3ded20b3df66e953acaf7bb4f23b3f6e/pyright-1.1.398-py3-none-any.whl", hash = "sha256:0a70bfd007d9ea7de1cf9740e1ad1a40a122592cfe22a3f6791b06162ad08753", size = 5780235, upload-time = "2025-03-26T10:06:03.994Z" }, ] -[[package]] -name = "pytest" -version = "8.4.2" -source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version < '3.10'", -] -dependencies = [ - { name = "colorama", marker = "python_full_version < '3.10' and sys_platform == 'win32'" }, - { name = "exceptiongroup", marker = "python_full_version < '3.10'" }, - { name = "iniconfig", version = "2.1.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "packaging", marker = "python_full_version < '3.10'" }, - { name = "pluggy", marker = "python_full_version < '3.10'" }, - { name = "pygments", marker = "python_full_version < '3.10'" }, - { name = "tomli", marker = "python_full_version < '3.10'" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/a3/5c/00a0e072241553e1a7496d638deababa67c5058571567b92a7eaa258397c/pytest-8.4.2.tar.gz", hash = "sha256:86c0d0b93306b961d58d62a4db4879f27fe25513d4b969df351abdddb3c30e01", size = 1519618, upload-time = "2025-09-04T14:34:22.711Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/a8/a4/20da314d277121d6534b3a980b29035dcd51e6744bd79075a6ce8fa4eb8d/pytest-8.4.2-py3-none-any.whl", hash = "sha256:872f880de3fc3a5bdc88a11b39c9710c3497a547cfa9320bc3c5e62fbf272e79", size = 365750, upload-time = "2025-09-04T14:34:20.226Z" }, -] - [[package]] name = "pytest" version = "9.0.2" source = { registry = "https://pypi.org/simple" } -resolution-markers = [ - "python_full_version >= '3.12'", - "python_full_version == '3.11.*'", - "python_full_version == '3.10.*'", -] dependencies = [ - { name = "colorama", marker = "python_full_version >= '3.10' and sys_platform == 'win32'" }, - { name = "exceptiongroup", marker = "python_full_version == '3.10.*'" }, - { name = "iniconfig", version = "2.3.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, - { name = "packaging", marker = "python_full_version >= '3.10'" }, - { name = "pluggy", marker = "python_full_version >= '3.10'" }, - { name = "pygments", marker = "python_full_version >= '3.10'" }, - { name = "tomli", marker = "python_full_version == '3.10.*'" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "exceptiongroup", marker = "python_full_version < '3.11'" }, + { name = "iniconfig" }, + { name = "packaging" }, + { name = "pluggy" }, + { name = "pygments" }, + { name = "tomli", marker = "python_full_version < '3.11'" }, ] sdist = { url = "https://files.pythonhosted.org/packages/d1/db/7ef3487e0fb0049ddb5ce41d3a49c235bf9ad299b6a25d5780a89f19230f/pytest-9.0.2.tar.gz", hash = "sha256:75186651a92bd89611d1d9fc20f0b4345fd827c41ccd5c299a868a05d70edf11", size = 1568901, upload-time = "2025-12-06T21:30:51.014Z" } wheels = [ @@ -654,8 +550,7 @@ name = "rich" version = "14.2.0" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "markdown-it-py", version = "3.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version < '3.10'" }, - { name = "markdown-it-py", version = "4.0.0", source = { registry = "https://pypi.org/simple" }, marker = "python_full_version >= '3.10'" }, + { name = "markdown-it-py" }, { name = "pygments" }, ] sdist = { url = "https://files.pythonhosted.org/packages/fb/d2/8920e102050a0de7bfabeb4c4614a49248cf8d5d7a8d01885fbb24dc767a/rich-14.2.0.tar.gz", hash = "sha256:73ff50c7c0c1c77c8243079283f4edb376f0f6442433aecb8ce7e6d0b92d1fe4", size = 219990, upload-time = "2025-10-09T14:16:53.064Z" }