diff --git a/.gitattributes b/.gitattributes index 87cd6547..8f8da085 100644 --- a/.gitattributes +++ b/.gitattributes @@ -4,8 +4,5 @@ # Linux start script should use lf /gradlew text eol=lf -# These are Windows script files and should use crlf -*.bat text eol=crlf - # This allows generated code to be indexed correctly *.java linguist-generated=false \ No newline at end of file diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock index f8b10978..5e34bc40 100644 --- a/.speakeasy/gen.lock +++ b/.speakeasy/gen.lock @@ -1,29 +1,29 @@ lockVersion: 2.0.0 id: caaab73e-db12-4a8b-93a0-536b113afa44 management: - docChecksum: cc211761a0a4040e773b86e160722533 - docVersion: 3.14.0 - speakeasyVersion: 1.732.2 - generationVersion: 2.845.10 - releaseVersion: 3.14.0 - configChecksum: 27929c8c41866427de46a3e4af6ea2d8 + docChecksum: 92d8280ef38ed737256ce35abd8aeed7 + docVersion: 3.15.0 + speakeasyVersion: 1.761.3 + generationVersion: 2.879.11 + releaseVersion: 3.15.0 + configChecksum: 0fb99d2d81fcbfc8fe77a868c65be2db repoURL: https://github.com/novuhq/novu-java.git installationURL: https://github.com/novuhq/novu-java published: true persistentEdits: - generation_id: ca009ef3-5c5d-455c-822e-613168df9ca6 - pristine_commit_hash: 44f7d4531d546efe998d9e10b3d39b2fab6b2688 - pristine_tree_hash: 44e3b91e9ddcdc85d2a4174fdc3c4cd869d71ab7 + generation_id: a6975f18-3328-4c7b-b8d2-9287972eef35 + pristine_commit_hash: eca8cd27778ad366f0b8583171ba2debb6d7282c + pristine_tree_hash: a57bd3c86153734788f37c93d55750a49a17206f features: java: additionalDependencies: 0.1.0 additionalProperties: 0.0.1 constsAndDefaults: 0.1.3 - core: 3.55.16 + core: 3.55.23 deprecations: 2.81.2 - examples: 2.81.7 + examples: 2.81.8 flattening: 2.81.1 - globalSecurity: 2.83.2 + globalSecurity: 2.83.4 globalSecurityCallbacks: 0.1.0 globalSecurityFlattening: 0.1.0 globalServerURLs: 2.83.1 @@ -31,19 +31,19 @@ features: nameOverrides: 2.81.5 nullables: 0.1.0 openEnums: 0.2.0 - retries: 0.1.1 + retries: 0.1.2 sdkHooks: 1.2.0 - unions: 0.3.2 + unions: 0.3.5 uploadStreams: 0.1.0 trackedFiles: .gitattributes: id: 24139dae6567 - last_write_checksum: sha1:18563f88a3e50e55f2ae6f2b62440464808f5d6f - pristine_git_object: 87cd6547287adad3b806972ee22a765ed80ab806 + last_write_checksum: sha1:2b27a763ec2b5c70648554e408dc254181222d09 + pristine_git_object: 8f8da085659bbf87d293b49b4593e43137a4acb0 USAGE.md: id: 3aed33ce6e6f - last_write_checksum: sha1:63da2a788e00cc70bd7ed6345cd86a1039063974 - pristine_git_object: cc5b5f6b12d3725d2d4aa639f2559c4a571ca83f + last_write_checksum: sha1:3d0a86f52133b9ad8ae9877941cb87a4618620d2 + pristine_git_object: 533d9067d3fbdc59e36ef1479b483d80580d7b70 build.gradle: id: f07866736216 last_write_checksum: sha1:4c522639341bdb9f6641811f1c8cc89a7bbbd350 @@ -70,8 +70,8 @@ trackedFiles: pristine_git_object: 8ffb7ff59af46fae7238d3bb596adb85791a3922 docs/models/components/ActivityNotificationJobResponseDtoType.md: id: 8046439d9956 - last_write_checksum: sha1:812f372e04c8fbfd202e2125df99d4bc4e9d99da - pristine_git_object: d6f446ab77706ea9191e1d3f704e7812f32d0072 + last_write_checksum: sha1:0c39065b5f582db081dbc00437bdd4581e47e838 + pristine_git_object: 0185a7fc4aa16cd1d153b6e3782aa7fda26c5e32 docs/models/components/ActivityNotificationResponseDto.md: id: a909885ab798 last_write_checksum: sha1:406e84713fdbd1af16d7082e7362564e07d7536f @@ -106,8 +106,8 @@ trackedFiles: pristine_git_object: 04b475b3eb7ec5973a91eeecff6af3226167ff80 docs/models/components/ActorTypeEnum.md: id: 205b757beed8 - last_write_checksum: sha1:ee025d290250d11a8785ecf06bfbb7977e07e06a - pristine_git_object: 2c6d083857bbaf3d5a295380a44085aec17564f4 + last_write_checksum: sha1:b333fcb3e7191134c86a39638d15265a31cfed16 + pristine_git_object: 7cf6141f9d21ca5501eed59a457d9873bc4fce76 docs/models/components/ApiKeyDto.md: id: 69e9f78f8207 last_write_checksum: sha1:b74efcdc6770b6c98602748e08feff735d15bddd @@ -122,16 +122,16 @@ trackedFiles: pristine_git_object: 43dc930ad5703057516d4164fd3e20b904083dc3 docs/models/components/BackoffUnit.md: id: ce28e2571af5 - last_write_checksum: sha1:8dea3237654656af787895a9f9e941cbb320ff96 - pristine_git_object: 1a98c32a4649f9d17e0b36c5b1b062efa9bec731 + last_write_checksum: sha1:666b9f28813f265a7b2ef4521ab62fc50e0f66e6 + pristine_git_object: 9fa28cb8dad44fc22dc1a18e92baf4af386fa172 docs/models/components/BridgeConfigurationDto.md: id: a0060374055d last_write_checksum: sha1:3c58bdfebb82d3fd167c8fdf9b238f87a7837aba pristine_git_object: 81a591af647b5aef0958852adf20889534a08e86 docs/models/components/BuilderFieldTypeEnum.md: id: 3005fa9caa7b - last_write_checksum: sha1:e9e9d65069afcf5f323675688b314bb663e1a91c - pristine_git_object: 882c65495da7116ba6334552803f068f4cf70253 + last_write_checksum: sha1:ac2ac7bb86b600d188f105fec9a4819f2381b0f6 + pristine_git_object: a05dcdd227c915393f417ba7d9fe327b107a1ad3 docs/models/components/BulkCreateSubscriberResponseDto.md: id: 9b0514d36eb4 last_write_checksum: sha1:ddf0ea3c10638a73b7e8ec2ad27aabb6f0ad5dd8 @@ -162,12 +162,12 @@ trackedFiles: pristine_git_object: 75373528204dff6cd189b2eea1a5728d44b5eb28 docs/models/components/ButtonTypeEnum.md: id: a2a7e8fb8376 - last_write_checksum: sha1:ff9b6d333bd4540bbb07436e473a0b16d2ebcc48 - pristine_git_object: 29e77c4228d21f332f9475cfc8a1f1d5371178e1 + last_write_checksum: sha1:ca09a2e7d0d19e5ced85a9b12a6eb573962e24f8 + pristine_git_object: 566f1368aa5c20cdd4f42ad18a451cf35b8058b0 docs/models/components/ChannelCTATypeEnum.md: id: 7d36307b0446 - last_write_checksum: sha1:5013ffebe83f18534d615251db318a9181eb9878 - pristine_git_object: ae449fd22f3466393c460f6886c81d74a97e9d66 + last_write_checksum: sha1:13f2966d93ad5ebc01aa25d4413ac804eb37d884 + pristine_git_object: e69d890830a53fc9adf9a43a169034e924473509 docs/models/components/ChannelCredentials.md: id: f5fd1255db07 last_write_checksum: sha1:1bb296e7ef605d6443767e1cfbd5f93026f84014 @@ -186,8 +186,8 @@ trackedFiles: pristine_git_object: 9e90b0a6861bc12672eff2c17b7f55c20e9a7cc2 docs/models/components/ChannelTypeEnum.md: id: 37a6d6947747 - last_write_checksum: sha1:813f424fd50322bd96e1bb8928f1e6025c6eab14 - pristine_git_object: 07ea81fdd5c0b6ec1d414e78c06a238fb47055bc + last_write_checksum: sha1:0fc30ed24acc0c563188ecdf8327ce577afa21e4 + pristine_git_object: b06fefedd244a2c38264b678b775a16f35ef1b71 docs/models/components/ChatControlDto.md: id: 02d7b638e395 last_write_checksum: sha1:3422f420336dc0c8cf13d70e75d35c94ce2adcee @@ -198,12 +198,16 @@ trackedFiles: pristine_git_object: b4d84ec2682996c111d8b5ddb956d36233708de4 docs/models/components/ChatOrPushProviderEnum.md: id: 8dfd13848da1 - last_write_checksum: sha1:c725d22d6b63a1b7e575fc893a5d9d9f6597a8a6 - pristine_git_object: 651c586c9ef5af666c5bafb30660f76bfc59f4b6 + last_write_checksum: sha1:0bdd97fb143c826f666b85ac5c46a5f845742dea + pristine_git_object: 409ab06ccbf738922b92a084854dd6930d7b3491 + docs/models/components/ChatRenderOutput.md: + id: 298a6056d75c + last_write_checksum: sha1:975556c5ac7e8fb12f31c27a8340859688af7cf6 + pristine_git_object: d6bf0e870840a122ee655e0552b04cbda4d14acd docs/models/components/ChatStepResponseDto.md: id: fa37a3992e65 - last_write_checksum: sha1:3e3f601601664fd3667eb6af1dd0ea6505fcc071 - pristine_git_object: 2013f182a1cde9e6212acb706811aa3071e57b03 + last_write_checksum: sha1:dc7cea20f1bf18ae507eddefaccee18c8485472c + pristine_git_object: 6240bc3cb27d507dc40a5ff15b102d4d9645fb87 docs/models/components/ChatStepResponseDtoControlValues.md: id: dadba7539b1a last_write_checksum: sha1:d9ff1120872a1379a5d2bbc3e63ec4dcb60ec59f @@ -246,8 +250,8 @@ trackedFiles: pristine_git_object: b92c7aa193227dc4d806400724071e049452e335 docs/models/components/ContentIssueEnum.md: id: 7c6895aa99a1 - last_write_checksum: sha1:46f7b5322570e1f65c329d093ec7e04112ecfe86 - pristine_git_object: 3097f3926406486c9349ee7fd621adeadbbc3d5f + last_write_checksum: sha1:aea3aa0232797d32e8ecf99b2eb25b4bed1ee874 + pristine_git_object: b5681a91325da2ea4963dd9a3069fba0f4001c4b docs/models/components/ControlVariables.md: id: fb27ef1db53d last_write_checksum: sha1:3add6f9f5465555bd98b4925afadea58796c6c98 @@ -276,14 +280,22 @@ trackedFiles: id: 1a3353eb94a3 last_write_checksum: sha1:87b50c14889ab53585057015495266245078a9b5 pristine_git_object: 3b03f592b75ea01d1504c58ce908474181defdf7 + docs/models/components/CreateEnvironmentVariableRequestDto.md: + id: 9d6dcd187660 + last_write_checksum: sha1:905fcb578425aee9f31486b02fed40113414b48d + pristine_git_object: b66d10c58d36c027e153acf56b728868ffb91451 + docs/models/components/CreateEnvironmentVariableRequestDtoType.md: + id: 924e10d07ba0 + last_write_checksum: sha1:6dd87630f713449425cd013f1abdbd6bc5b8a93b + pristine_git_object: b5a2aa3b477d1f77d5d5a99c39fe768389bc46c8 docs/models/components/CreateIntegrationRequestDto.md: id: f611d3687e88 last_write_checksum: sha1:f89f8cf709c145236e9da32fc86112a3af0e6132 pristine_git_object: 75cf06ce2860d630fc621f761b4ee33e82107cd0 docs/models/components/CreateIntegrationRequestDtoChannel.md: id: cc555000705f - last_write_checksum: sha1:fa358df8df3235a988f5e9737998da9b3071aa9f - pristine_git_object: d51cd9cf8eed6a521cefcfc491f630bf95eef162 + last_write_checksum: sha1:5ea2e05fea77e57113d69cbdc833729f99372fc5 + pristine_git_object: 8f4b912eb3e9363d9f9f279a19b22cac5552fa1c docs/models/components/CreateIntegrationRequestDtoConfigurations.md: id: 6f81eb26b6f9 last_write_checksum: sha1:69fefc1ef123ead90ea779ac3c3ac9aab5cf3b2a @@ -306,8 +318,8 @@ trackedFiles: pristine_git_object: ad533db4ce607b0780a2bc354118ce7a0e607c5e docs/models/components/CreateMsTeamsChannelEndpointDtoType.md: id: 9978fecd5ed6 - last_write_checksum: sha1:824efb39db1fea0c8633e103d00abac16ed1204d - pristine_git_object: 3c52bc8cae3aaad371ffe7e8520d2c903dafda7f + last_write_checksum: sha1:b3a1360c328d7cc074813755cb8182feed5860e8 + pristine_git_object: 93c7a287948d61210625d5be5f2fcaaa85b487c3 docs/models/components/CreateMsTeamsUserEndpointDto.md: id: 9c666c10ac3e last_write_checksum: sha1:c6c257f34c2440145d6d3feb8e142bd5402a411f @@ -322,8 +334,8 @@ trackedFiles: pristine_git_object: 51380ba6155f73e700e849293784ff206b90cb2a docs/models/components/CreateMsTeamsUserEndpointDtoType.md: id: 6804a160bb2a - last_write_checksum: sha1:18ff8f0faf099aa12dd1fa3b11cc2f77f90ae55c - pristine_git_object: 7e6d7cb63e4796f86bcd65b0ef252a1ac439e9fc + last_write_checksum: sha1:54b99a48f98a1f010e8c5f78457bf333774e2b07 + pristine_git_object: fbf27088ac042d2d702f42e22902893bc3bc143a docs/models/components/CreatePhoneEndpointDto.md: id: 6eb93a55dbdd last_write_checksum: sha1:703b57ca26597fd6c2b4e320b6d8cc8f5b33b62c @@ -338,8 +350,8 @@ trackedFiles: pristine_git_object: b2a9c8c8df1bc8dfc83a32545d364a06e82d813e docs/models/components/CreatePhoneEndpointDtoType.md: id: 3d0d2f916599 - last_write_checksum: sha1:df54678c9eca64f0c2a7d23f4dd8eb148e6f18a3 - pristine_git_object: f2e052e1f014933e36543079b1922b72be5add49 + last_write_checksum: sha1:12c1d32832db993ee50c40c5cb4430c1ed6d2229 + pristine_git_object: ab4ab2e074edf60936adec2e05fd447e7ee743d8 docs/models/components/CreateSlackChannelEndpointDto.md: id: 13a5e9032af7 last_write_checksum: sha1:91987bf070b40e3e69cf1eccf67f0f9f7fcd1862 @@ -354,8 +366,8 @@ trackedFiles: pristine_git_object: acd4854635a757900c3bb748f484635e5d491c74 docs/models/components/CreateSlackChannelEndpointDtoType.md: id: 521bdcdc3488 - last_write_checksum: sha1:1992dd73c7673c60a4ec8d91168c1c1b8a6d9585 - pristine_git_object: 1e8968d3c9cf31df428b2f11dedcf6d8c178891b + last_write_checksum: sha1:893e7a4d3c95ae5444d86d2033ea1140c8d72c08 + pristine_git_object: 44bd3aedddacaf358ea78c1146c8409e8ae20ad1 docs/models/components/CreateSlackUserEndpointDto.md: id: df36c1a9b1ef last_write_checksum: sha1:2937942a339370714d9404e8324d5337a449f455 @@ -370,8 +382,8 @@ trackedFiles: pristine_git_object: 04b8acb4675d2c94b5ffcaead8f6866441bad404 docs/models/components/CreateSlackUserEndpointDtoType.md: id: 99b86fbe9af1 - last_write_checksum: sha1:22317ded5b9d9f6bb075fc935432fd29396e5de2 - pristine_git_object: 2d6bc936a2d7169e0b723bed5ea10c6016b10518 + last_write_checksum: sha1:e3d5cbc49deec1c5a5c683c8cc4fb9c7481ef784 + pristine_git_object: ba8b90eef44e355cb5b9271f427fabfeaf4f1740 docs/models/components/CreateSubscriberRequestDto.md: id: 39faf44a93a7 last_write_checksum: sha1:673b080796d540094b58bb89a0978261f63e747a @@ -406,8 +418,8 @@ trackedFiles: pristine_git_object: d09e4559ebc4eb80bd5fbfbd2faaca577239624c docs/models/components/CreateTranslationRequestDtoResourceType.md: id: d7b4c8d45dc3 - last_write_checksum: sha1:440078eedfb3b1b3b10f72f17887a7c2a2fa70f2 - pristine_git_object: 98aebd253143f15e327071bf63869c00a08f28c9 + last_write_checksum: sha1:051d5320af1331872ae8a15f997912adca657b48 + pristine_git_object: 23778f66138b8d269ebb3de9a8a829af614b41f1 docs/models/components/CreateUpdateTopicRequestDto.md: id: cc171164dad7 last_write_checksum: sha1:677a558f00978cd14b9019584dcddf0e4eb1041f @@ -426,8 +438,8 @@ trackedFiles: pristine_git_object: 588c63a67da578da50f34edae42d504a0ed21e3e docs/models/components/CreateWebhookEndpointDtoType.md: id: ff565a86bdc0 - last_write_checksum: sha1:cf8f417baee74ab96a07421a3e34a177c83112d7 - pristine_git_object: 02e75536dffbbd151f6d64c373757720663defe7 + last_write_checksum: sha1:b0524f3b17b22dc4b6bd35766b541ce712bdda8e + pristine_git_object: 94e966048227af1686b7b27f2cd9a1225ba8161d docs/models/components/CreateWorkflowDto.md: id: 72b1532520ed last_write_checksum: sha1:6f9ec36e5f68771a45c71ce2d91301b31672db33 @@ -454,8 +466,8 @@ trackedFiles: pristine_git_object: f55d9115d1aa496409d30e6a3f248cd48d52f1b5 docs/models/components/CustomStepResponseDto.md: id: aade138857f7 - last_write_checksum: sha1:f89078e850ad28b5d739bf87b0e3c4b0adef2dd8 - pristine_git_object: b38ccbc61345db34ee32a44e8488f97e780ddecf + last_write_checksum: sha1:5073390faff7b9b9d8f2e214555061fd583a74bc + pristine_git_object: 2184feb148add4d37f5f22a336789d8c64c20610 docs/models/components/CustomStepResponseDtoControlValues.md: id: a26142d73868 last_write_checksum: sha1:0c4a7b72afc5b9c14198904de703317ff2f80dd2 @@ -474,12 +486,12 @@ trackedFiles: pristine_git_object: 222c8ef86417665620d8a2cbe6132207be57b12f docs/models/components/DelayControlDtoType.md: id: 30a48a69f166 - last_write_checksum: sha1:ae193bdc6a0a2a82dbc1d72d3082bac7c2c381b5 - pristine_git_object: 823c5264c958bf1553c3ef36828ae1857cdeb2a4 + last_write_checksum: sha1:425c515aa58a27d10d24b684c4e4c9951e0a8dcf + pristine_git_object: 5607d116babc2c1c67cb3b881d5595f388b3be02 docs/models/components/DelayControlDtoUnit.md: id: cc54a79cd991 - last_write_checksum: sha1:45273ca81789d3a767688cda782fd9644c679781 - pristine_git_object: 617ab1beb8e894df5bb8a7c1964f5f0de9d58e76 + last_write_checksum: sha1:78c767fe0d4c30e1c0f39167fdb4ff94e1e4ce0e + pristine_git_object: d3919e3bcd82cd2f7c137487063c26b535dae032 docs/models/components/DelayControlsMetadataResponseDto.md: id: 2930f68ef77f last_write_checksum: sha1:373f3fdae0f46da0f393c1e5f0c6c12e141b4cfe @@ -490,36 +502,36 @@ trackedFiles: pristine_git_object: fcea20ec708775c75fee300003a3b54fd8f16851 docs/models/components/DelayRegularMetadataType.md: id: 660e1b4409ad - last_write_checksum: sha1:64e788c447658639dd14305d7ad0af3766b7eb13 - pristine_git_object: 666be6776e839677a239892f026ad1f12c2986b1 + last_write_checksum: sha1:7b3aad8cf0aa36caa79235ada49495377c6d3d2d + pristine_git_object: d75572aa70c84f93461c4af0cd65b99dae215eb6 docs/models/components/DelayRegularMetadataUnit.md: id: 146dcae4c59f - last_write_checksum: sha1:f39cf7bc0bc7b3b9e12021574c1d21f69fb407bf - pristine_git_object: c7ab8cd2a49c4e9194c7634cf7594bec98467c80 + last_write_checksum: sha1:ff5ddce3b4f19fc1a945e74c93f5d7197c75e3e2 + pristine_git_object: ce0e913601748a7afb7748c7fac82c372207c1d6 docs/models/components/DelayScheduledMetadata.md: id: a2466a8be2fc last_write_checksum: sha1:da8baf5ba6f3137f9e181d035c507e39db4c6a79 pristine_git_object: 0345b944e3dce56c4f5e15bb3ac038028cb1b3e6 docs/models/components/DelayScheduledMetadataType.md: id: 7ea8c99274af - last_write_checksum: sha1:9da8a186dc5a5bbed082929be500e5693df111ba - pristine_git_object: 0f1472d0fbac45b2cacfffbfa1d6e049b33a20bd + last_write_checksum: sha1:c491f3f600b8cace9f010388049338408060407b + pristine_git_object: 8beed7d6502a40b13606a2f80342ae98f8be7f6d docs/models/components/DelayStepResponseDto.md: id: ffc01de912ee - last_write_checksum: sha1:f374ad88f640e512af0c5a49f8098b2feda99d1e - pristine_git_object: 457d7eb8a6ad46977c0065d1fecf6643d12a238a + last_write_checksum: sha1:e9a3a5b194e297c1f6f9dd2d5c938547478ee4d7 + pristine_git_object: 2ba498a434a71dd1937231d59f2f7f8fd3bff991 docs/models/components/DelayStepResponseDtoControlValues.md: id: 10f7a4be5ef1 last_write_checksum: sha1:917f02f0170105a9ad6b72117a92987dea0495af pristine_git_object: 50cfb82454020bd56053b8f9ae06779c5655f91d docs/models/components/DelayStepResponseDtoType.md: id: b5f748a8f106 - last_write_checksum: sha1:7398c5ec216e6e2413262f32a163b99cc64a5a7c - pristine_git_object: cb0322643540b6352ba731bdc5c9b8033874cecb + last_write_checksum: sha1:4682962a5f81e9c9a608550d9ab307ae957717e6 + pristine_git_object: 9441a48f9ec53dcc37ec7f13268c10e6784740e9 docs/models/components/DelayStepResponseDtoUnit.md: id: 294a39806754 - last_write_checksum: sha1:3271f9b45f4dd096d35d48beaf1f481819558660 - pristine_git_object: 6d8fdb7abe65c045f2ee12002e44beb133f80ef1 + last_write_checksum: sha1:4ad6cb3ef1e3e2723a7aa9ee45be086e5751b98f + pristine_git_object: 912ff7d15965ed85bed8160f0d86465fdd066118 docs/models/components/DelayStepUpsertDto.md: id: 8cd01e21ee5b last_write_checksum: sha1:c8ab7f8eb3f04ec7ca7f3d9e2859fbe8b2c99d97 @@ -534,8 +546,8 @@ trackedFiles: pristine_git_object: c5e29a5449f41c0d6545eb4ae5d64242d5ec25e9 docs/models/components/DeleteMessageResponseDtoStatus.md: id: a17bb64a8c4b - last_write_checksum: sha1:27ec4c9a7f55ca7b34817b185d0f5a77c58dc527 - pristine_git_object: 99f803926e1e3f4e27d4645b98171a095479fa37 + last_write_checksum: sha1:70e2a93f5bfd320f423c655bc7d3292be2f652d3 + pristine_git_object: 6079850d9c16987530b1da07360654940195b753 docs/models/components/DeleteTopicResponseDto.md: id: ae68785f08bf last_write_checksum: sha1:bded640140bf69c44336ef52103771addf323401 @@ -556,18 +568,42 @@ trackedFiles: id: 373790163c4e last_write_checksum: sha1:4597f99f791d299fce5db932136968db2283359b pristine_git_object: 2d48e0197959ba5ae9a043abe63ff1209c13f079 + docs/models/components/DependencyReasonEnum.md: + id: 5b97a5d8351a + last_write_checksum: sha1:ee9af369f2ab14b8e271d553658e863e2d012e30 + pristine_git_object: 3f7731d45a85ee633560611247614426a243c4a4 + docs/models/components/DiffActionEnum.md: + id: 44404fa7da23 + last_write_checksum: sha1:6a0c0b78885ca278764933e1a755c275c534d7e1 + pristine_git_object: b625476625a672b571c86e8d28ac46d0f53ad6ec + docs/models/components/DiffEnvironmentRequestDto.md: + id: d77579803ac9 + last_write_checksum: sha1:2db66e38860702d8b512f894b62d2d8bb614647c + pristine_git_object: 6e34526e9887ab2153b4651f2700ee6ecd7d3aac + docs/models/components/DiffEnvironmentResponseDto.md: + id: 3d0f7ad7c855 + last_write_checksum: sha1:714fe0ebfcc62c3a3417e19fef939e6bb89e6b0c + pristine_git_object: 9c09b50b1e2d60f5a92c50eb534dd528dbdec509 + docs/models/components/DiffSummaryDto.md: + id: 1282e7f73b86 + last_write_checksum: sha1:73482c6e074318f30a7e1eb48356e9ff0fcd0f1b + pristine_git_object: 9d8e8d39f3c361b2930b5544cef560d3be31aaa8 + docs/models/components/Diffs.md: + id: 250e6860de66 + last_write_checksum: sha1:bd22ee0e7fa57c07382fcd7b2b0828552d3778f9 + pristine_git_object: ab1bb243c9e1af3bb72cac7bf9138e742a47bb58 docs/models/components/DigestControlDto.md: id: 8bfc14d04840 last_write_checksum: sha1:a9accd437d4e23d543cc469585e67b7c796d90a2 pristine_git_object: cd20b1d4cd2d77f76fae70a3b794f005cbbde1eb docs/models/components/DigestControlDtoType.md: id: e1daf523b886 - last_write_checksum: sha1:b0c689457a7ae2f728d59b408e83f4f9cbdd551d - pristine_git_object: 521a77a18ff5aa8920ab5cea127670eeb877f22b + last_write_checksum: sha1:71a3194c6d41a6e9a801949c3b742b141099fc07 + pristine_git_object: 96d54ed195a690a3b346f5f58da3f74999bcd920 docs/models/components/DigestControlDtoUnit.md: id: 76cbb9120944 - last_write_checksum: sha1:4d42aa71ea8d0b1779e845ea6d08f836db0c7291 - pristine_git_object: 34e0a306208eabdcfbe93fb72c4fbf8ae563ac57 + last_write_checksum: sha1:4f2cc69ebf4303c6a631f599e546689097cf9f44 + pristine_git_object: d598b514f539053c84d836f18c1193f02cb1e0d3 docs/models/components/DigestControlsMetadataResponseDto.md: id: ad537a20e494 last_write_checksum: sha1:0843b24f7cf7fa2ae145e6dbfa0b9fb11f8fa4b0 @@ -578,36 +614,40 @@ trackedFiles: pristine_git_object: 181fc36325712620719087bad56f72a0e77ced40 docs/models/components/DigestMetadataDtoUnit.md: id: 2c55f30dd54b - last_write_checksum: sha1:8d37d1ee96a451c9dfab1c7aaf0638ba03ebe0c9 - pristine_git_object: 45270c3946e1144c6373d4cfb3b145e09378386c + last_write_checksum: sha1:0a2fcf6e9e8e8917bc8b5526c106600e72503fbd + pristine_git_object: 27aba19ee5a7484e473cd878bf0c8c814a0a41cd docs/models/components/DigestRegularMetadata.md: id: 9a376fc01ff3 last_write_checksum: sha1:2b6fdf20934aa7ddb9a4fd53ab48a4dfd5fea943 pristine_git_object: c4c080acdf1c786c16c1d475a0711ff447fee6d4 docs/models/components/DigestRegularMetadataType.md: id: 2f88f1da34ac - last_write_checksum: sha1:145cbc8738560105cb216852fbe640bd006bce86 - pristine_git_object: bf48026970a400c09f668f7d5706459720dbb396 + last_write_checksum: sha1:bd568731df8471c8d2195d3bdab36fa336d62413 + pristine_git_object: 60f0b1800524d81fd24aefebc443ddc1291a6847 docs/models/components/DigestRegularMetadataUnit.md: id: 2f0fcd4cae9e - last_write_checksum: sha1:22a4f21b29ca16779ddd8ffdaeb434df6d6e8b22 - pristine_git_object: 89dc4f29505af89ee2a3bd71bbbcac9776b7f21e + last_write_checksum: sha1:33052a45608d73e977a30648d9c25fea27c037dd + pristine_git_object: 7b109ab7f1a4c8d71afbbac68cfc8852ba5cd41a + docs/models/components/DigestRegularOutput.md: + id: ea8719bb0fd2 + last_write_checksum: sha1:ff824da60f14295b2cf4a070f2c639a71202bb03 + pristine_git_object: 00aa21de5a1b34841819e4a95fc22fde1f61593d docs/models/components/DigestStepResponseDto.md: id: 4043e0ab68f2 - last_write_checksum: sha1:eb1c169a2a2faf19e79413354761f88f54bddaf2 - pristine_git_object: e78b9d690d5cb2a29d14fd63a5f781dee6eb7b85 + last_write_checksum: sha1:8e22810ee340a88abe733d6b8a0379befa3bfd17 + pristine_git_object: 7f00309497a46f149716b31d10cf59c18a3638ea docs/models/components/DigestStepResponseDtoControlValues.md: id: ed16210b8eeb last_write_checksum: sha1:6dd5d4efd2d724d7c8f9359effe6f604252dd3ff pristine_git_object: 042c58e2a18da99c9caa3e037e753c2f2d13310a docs/models/components/DigestStepResponseDtoType.md: id: 10b5a6abdab9 - last_write_checksum: sha1:79546c242f010c1286fef8b1767b223a3b32cf9c - pristine_git_object: 56ac52d724cf7d74bcfaeb7cea9542e7422f4339 + last_write_checksum: sha1:5d4caadc3c8c7745b3fcc3b32c4e4f4adb056a4a + pristine_git_object: cc0156ef87bfb12b8160e3c68f9994b59ba5f745 docs/models/components/DigestStepResponseDtoUnit.md: id: 9b650bb6aa19 - last_write_checksum: sha1:5fba7d38e66e4b7cfe82693577f8b4d894974edf - pristine_git_object: be32945abac56276eb1cd4aa542b5fabdd1ef14b + last_write_checksum: sha1:a6981b992cea3deeb9e584d66a4c29f2ba79aee3 + pristine_git_object: 70e5ed622f3c55d0e67039eaf6c439ac4c884abd docs/models/components/DigestStepUpsertDto.md: id: ff398d8cf504 last_write_checksum: sha1:0715767537d250bad2bc01f695492c721b515a08 @@ -622,32 +662,32 @@ trackedFiles: pristine_git_object: 53f2141644605521d7577586deb264dd6891580c docs/models/components/DigestTimedConfigDtoWeekDay.md: id: 1d7097ff96d1 - last_write_checksum: sha1:1e620d704ff8aa65f325faeaeb607e4f2d395c47 - pristine_git_object: 7adaa5a7de6baad14d52c75ada6deb5868756c9d + last_write_checksum: sha1:00236759a87975c3b9fb5cecdb069db46350d977 + pristine_git_object: 9e67f05d82829672fcd3ef8216c232fb13997c50 docs/models/components/DigestTimedMetadata.md: id: 306a68c5f7d0 last_write_checksum: sha1:76596e891b8b8d2849436e5da269f757797eb3b8 pristine_git_object: 1479c277e476ce391e1f1a32129d48f45359b78a docs/models/components/DigestTimedMetadataType.md: id: 59dd0f254f1b - last_write_checksum: sha1:66d7c7c5aa2fcc06dfba72fbabedc7ede0013619 - pristine_git_object: 47d3b2c78f00247350aad0ae4378caec67d143c5 + last_write_checksum: sha1:e48b7cc04a28aa61d1992d056f05ad5b5cc382c4 + pristine_git_object: fc963e47d1707ee526884ae9d0f79d6d8833b3e8 docs/models/components/DigestTimedMetadataUnit.md: id: d6b7da268fca - last_write_checksum: sha1:3eeae5c1c1df8cd9f178ee1c61a009240f5a2a62 - pristine_git_object: f45daeb0b394593f57029a4742ea78a963a1aa8a + last_write_checksum: sha1:4d7431cd23800a2771bfb7f6a344d6571d383ed0 + pristine_git_object: 8b16b5f63e86886f09a7b889ff58803cf34cafa5 docs/models/components/DigestTypeEnum.md: id: 0b5833f222c7 - last_write_checksum: sha1:58e5a55149e4906d577a8b06d033eeca0cdd41fa - pristine_git_object: b6062460e2c31e855e69559847eb052321557e29 + last_write_checksum: sha1:9214e43e190eb812040fa38252b23a36b85c135b + pristine_git_object: d568fb9c035243e22f554e7754e0dfd49b51453e docs/models/components/DigestUnitEnum.md: id: 2446ea2f3864 - last_write_checksum: sha1:023bb33b9a3a6e7ad29a8bea452f1cba28544717 - pristine_git_object: 4ddc039e140874478add60b21b62c25e903ac45a + last_write_checksum: sha1:52ddbe53897bfece9df86e49c205a1311f9688ae + pristine_git_object: 688e7aec5b4b40f31aaa6e96319609d0e743e108 docs/models/components/DirectionEnum.md: id: 79168b804424 - last_write_checksum: sha1:f7388bb327eb6e1bae0722edf1530bfe6f222bfa - pristine_git_object: b8bad34ad13db052bddb551ae9bea06f1b18ec6e + last_write_checksum: sha1:6dd7ea2cf5f47bfc3e0592ffc8952ff7e59f5d01 + pristine_git_object: 06df34c72b8e2db8fcc9da2820c00e02f50b663f docs/models/components/DuplicateLayoutDto.md: id: 315285235c43 last_write_checksum: sha1:c9ba07433addbc6f908d96e437106d0956e4c2f5 @@ -662,32 +702,28 @@ trackedFiles: pristine_git_object: 4491848fe08b124f42b44dddf1cf4bfe0431cb33 docs/models/components/EmailBlockTypeEnum.md: id: bf94dc9e2f9a - last_write_checksum: sha1:c900450579fb7023bc563bef2316345d381ab25f - pristine_git_object: 92e98ec00cfcd871ac61bc9bb1910690bcdafa89 + last_write_checksum: sha1:75f83eda5b404349288db125ab1305782d7f384a + pristine_git_object: 44e9c3da781ea4289deebbd28bad2ffc5ed87f9d docs/models/components/EmailChannelOverrides.md: id: 9e6a96a695bd last_write_checksum: sha1:045d7bd1b93bf31ad832f0712619c46443e6bdd3 pristine_git_object: 89fa72aeeaa988e563de7539dcf53ed10b80bea6 docs/models/components/EmailControlDto.md: id: a82375dab69e - last_write_checksum: sha1:0a1dbfd4d6bbbda0643cf9bad10c6b85672b4ce9 - pristine_git_object: 7f3a13b0f5854d9914502a539cbafad3098622cb + last_write_checksum: sha1:d617502c811f2cc7d240e92e0440096817fbcfb9 + pristine_git_object: e66251e4a2290236d00f6c8eeb1ff6c399b94bb8 docs/models/components/EmailControlDtoEditorType.md: id: bb69e5cb9394 - last_write_checksum: sha1:2a09e330a5d5d463ca03762a3795ff178b7233d8 - pristine_git_object: 4394a12632082185b2052715a366731cc4d9b05a - docs/models/components/EmailControlDtoRendererType.md: - id: 301a607fc5c3 - last_write_checksum: sha1:615cecb17d6c0616cd630e345001903251a6b2db - pristine_git_object: 8821efdff12334fc5c5b517bb7c61c9f04711dd0 + last_write_checksum: sha1:21e488d59f3a6d647c6e87d8e8531f13456de6cb + pristine_git_object: fac1b841f3c04d5ca525fb5b46910485b6a30a34 docs/models/components/EmailControlsDto.md: id: 17c5d5c27464 last_write_checksum: sha1:f399c231e78abfbcf18db5fe54e7ac13dc47b557 pristine_git_object: 10aba193d804136d4950df28b61fa18012cd8af5 docs/models/components/EmailControlsDtoEditorType.md: id: 43eb387ce37e - last_write_checksum: sha1:67cbde5570b4f60ae44e289419e5139b2ec0f18e - pristine_git_object: ef56f6c8dd7f3ab25e28ab8b681a3f99ce3c6960 + last_write_checksum: sha1:326bdc36112b785533b1257004ab4f1f3df8ceed + pristine_git_object: b9104bce3f5747de6a981607bb9fa2199c17f2d6 docs/models/components/EmailControlsMetadataResponseDto.md: id: 2b5b68028bae last_write_checksum: sha1:54b19174c9e0b94c07c855340854e6af4b55d23a @@ -696,22 +732,22 @@ trackedFiles: id: 7d7452ca92ce last_write_checksum: sha1:27d9f774e33e8d9a6c1928895c56875f7860be16 pristine_git_object: 7eb3d9d23ea915c9b29e099f25f73b2085bf69a9 + docs/models/components/EmailRenderOutput.md: + id: 30ca6c62332e + last_write_checksum: sha1:7f6472e973684ed4c1d17c88e5fecb3bf3b09ccf + pristine_git_object: face90c5573d5867f4a2f39a01670075fec0cdc9 docs/models/components/EmailStepResponseDto.md: id: b814c7348683 - last_write_checksum: sha1:0ea64077ff438957a7351a485ecd1cafa0241a1d - pristine_git_object: 440fa2c9e3926e68b573aa4d051a83c072bb0921 + last_write_checksum: sha1:91632c4a45bd1f14cb91d324cd0879e02a6ba7ed + pristine_git_object: 5d3ea9447fb43e68f457e1756f272cc82fec29c2 docs/models/components/EmailStepResponseDtoControlValues.md: id: 2e7b78e49eb6 - last_write_checksum: sha1:e3d3aba0e803892ab16799c8d304d96e0bb513f9 - pristine_git_object: 7e4f8411ca9a8df3e2cc8ee5af72ff06999a278d + last_write_checksum: sha1:26eac83055d7401f52b31148c0029e9395c23bb6 + pristine_git_object: 4c990f7883eb19e30639883924512d1df1a9eeb5 docs/models/components/EmailStepResponseDtoEditorType.md: id: 8db3e9181b15 - last_write_checksum: sha1:55eaa4a920f4b6a8aff1a9d5d02419335776b5b6 - pristine_git_object: b36c7e9d1d80386b7d51de721e2830f465a964cf - docs/models/components/EmailStepResponseDtoRendererType.md: - id: 8065ddccf88a - last_write_checksum: sha1:64fe155ed8269bea6e5cc08eb9aeda0b7853607b - pristine_git_object: 7e2b6312bc47d767de3ff2796f59c4aca55749e6 + last_write_checksum: sha1:9b5b4a9a58b6460ac5bb95fa91887fe010d53551 + pristine_git_object: 5ce6d3da5336c3b1012fa6affd04037160389287 docs/models/components/EmailStepUpsertDto.md: id: 6f8f4caaf13d last_write_checksum: sha1:4f0fb400ea985be0dde597b8242b6cd949cb68f7 @@ -720,14 +756,38 @@ trackedFiles: id: a5c5760eadb8 last_write_checksum: sha1:8994d17999e89564a7222dd09c9cb3dae12d66e3 pristine_git_object: 2b0bc11364c2f52b841f062933ca14f04fd7b7ec + docs/models/components/EnvironmentDiffSummaryDto.md: + id: f3bfe5078c16 + last_write_checksum: sha1:b7951d1a87968d02e5e65d00323d4ac858fd0615 + pristine_git_object: d4619ba00ceba672eaba3a8825939d02d3ee064a docs/models/components/EnvironmentResponseDto.md: id: 704d526e145b last_write_checksum: sha1:2e3ec48f7515e728b8ddd73a4b063b92e1f8b1f3 pristine_git_object: d063ef1b0c48a376740fcc778f6e9bf3293d1abd docs/models/components/EnvironmentResponseDtoType.md: id: 13d0624be040 - last_write_checksum: sha1:b82487bbb7633da352f1f2880276b3b6da5becac - pristine_git_object: 8a0a5918889f63f1cbf0046083fe7bc2aa906880 + last_write_checksum: sha1:db16c2412eda1706f4f804d56677cda87535d082 + pristine_git_object: f986dd5a4b371c1072966aacf4a9600ac7165af9 + docs/models/components/EnvironmentVariableResponseDto.md: + id: 5889af918eb8 + last_write_checksum: sha1:99ab33045bb5110cebcc04a4fca41cb4eafd59f1 + pristine_git_object: dddea05d8859e052a43f7000f6382ace4aea2aba + docs/models/components/EnvironmentVariableResponseDtoType.md: + id: 78c620ce94ce + last_write_checksum: sha1:c1d8372294a71b68ffeac178fa1045713f356610 + pristine_git_object: 4a8c9c640a29d8a5a28d1735a58f18402ed198d2 + docs/models/components/EnvironmentVariableValueDto.md: + id: dbf06f86b443 + last_write_checksum: sha1:a85e273bd16e7aa7d61ec4c3ee641e8658cff78a + pristine_git_object: e20475778af4a4cad2312302b7d49df64e69f742 + docs/models/components/EnvironmentVariableValueResponseDto.md: + id: 5abb8a00179b + last_write_checksum: sha1:8a0a1962e55f79b60136e94ec6de4fc0c266bfb3 + pristine_git_object: f1ee1221cf01a6bc0ef610e12c2f5fd098a4e1ae + docs/models/components/EnvironmentVariableWorkflowInfoDto.md: + id: 95bbd86d90db + last_write_checksum: sha1:23aba07262e8fb310bd8661d2bba662cd10fe94d + pristine_git_object: 53ff0bf52ebb15a70b3b5fd6e32d9ed31e4e594d docs/models/components/ErrorDtoMessage.md: id: badf85dc2c6a last_write_checksum: sha1:80be9b864b7327cf716be0273da7f2e7c9960a96 @@ -746,20 +806,24 @@ trackedFiles: pristine_git_object: 041b63b9ebd4159e0a3914c0280710dda67eee84 docs/models/components/EventBodyStatus.md: id: 968a8b810925 - last_write_checksum: sha1:0a1d30103c5a4b749cfce5bfbfb66768d9d871ad - pristine_git_object: 68c14004f78d0ce2afeffeb1a64b911ab7df01fc + last_write_checksum: sha1:00ecb8bb4b9719b64c6fa1893a52d08877cf872e + pristine_git_object: 379af4b11d2dc1928d35b9c6cef55a4bdd61da7c docs/models/components/ExecutionDetailsSourceEnum.md: id: 84b2a08afc2e - last_write_checksum: sha1:233b7ea1dcd2dceab91a090f10e66d7288b11190 - pristine_git_object: 91540db4e8bf0f267135c51be69e285d02133236 + last_write_checksum: sha1:3a08932a537882959c470343c1ee510c80449b63 + pristine_git_object: 233b539258a74bec948dbf63f2cfa482af7ed97b docs/models/components/ExecutionDetailsStatusEnum.md: id: 88d8ce44d336 - last_write_checksum: sha1:a4cc3a15b23ad57310094edd1842ffc4e9cc6f42 - pristine_git_object: 924bebabaf02e2792997673f4cd1e8de2790d864 + last_write_checksum: sha1:4fa76c3a9ac9efb44f194f1583c4d02bb4edf09f + pristine_git_object: 39adfbfb77890cbb5891010e0d0a1143817ae14e docs/models/components/FailedOperationDto.md: id: ec96cff9e61b last_write_checksum: sha1:0c9f80bef5cb1cc03331583784a6aa4df7bb2e73 pristine_git_object: 83202450e87677b53e9177aa5e43591e32aa5db1 + docs/models/components/FailedWorkflowDto.md: + id: ad380f97db00 + last_write_checksum: sha1:84c1587596c9f308e1420eaf5af7535110bd2247 + pristine_git_object: 4aa4cbc0961996e8f50befff7e58882c14e2492e docs/models/components/FeedIdentifier.md: id: 89dce7a96bab last_write_checksum: sha1:10eaabd2e67c27cbb16cdca87c269003d9ab1860 @@ -772,6 +836,10 @@ trackedFiles: id: 75ccd21c7529 last_write_checksum: sha1:d100303e86c5e14f132c2c7c479a9a4ba34b6314 pristine_git_object: 150b8fa401e6dfe71a35db007ff130dcb2c21582 + docs/models/components/Filter.md: + id: 07d185f6f346 + last_write_checksum: sha1:c38c66ee7c7541384a33487fd9d7d892ccf6056b + pristine_git_object: c80e8255f825dd037ffe86b88b88acb07654f25c docs/models/components/Friday.md: id: f7165b814148 last_write_checksum: sha1:51e65f1ed79737e1b1063b444a1cd5649d439d66 @@ -794,44 +862,104 @@ trackedFiles: pristine_git_object: ac80adadc0365dffe96ce3c2b22edada11bc5616 docs/models/components/GenerateLayoutPreviewResponseDto.md: id: 221f0d6cb6f0 - last_write_checksum: sha1:61a506a162ab4bde703f33ce530fe54957cbe6d7 - pristine_git_object: 280181dbdf852f3fe6d929acb16d4ff69a66269e + last_write_checksum: sha1:8cd69a58ffc58ba0c3ce8a86cacb0347ebf0fe35 + pristine_git_object: 9e8cef82741c0ff7c15dd35b6872d5ada188d790 + docs/models/components/GenerateLayoutPreviewResponseDtoResult.md: + id: 07e6eab4c4ec + last_write_checksum: sha1:d0b3928f5c94ed4eeee0cfd94f8224a51f2e5011 + pristine_git_object: 4d7135a6948551230c2d6cdbf25bc5e62c96adf2 + docs/models/components/GenerateLayoutPreviewResponseDtoResultUnion.md: + id: 874bfb068dd9 + last_write_checksum: sha1:4180f8e3feb866585ba9e8c988b4583dfe0b83d8 + pristine_git_object: 19a7423c7576094ac3e279bcb5f65e1cd2f51220 docs/models/components/GenerateLayoutPreviewResponseDtoType.md: id: eff190babd47 - last_write_checksum: sha1:b2ae3babec5fffdfb1a1f7111294caccea0f268c - pristine_git_object: 386efc3ecccec9803d5191f218e4c881b3ada448 + last_write_checksum: sha1:14d94bb60f541a21b8586cfc3036022968d82d4c + pristine_git_object: d5f479e1e0b888fca4d4e1338affe41916491c3b + docs/models/components/GeneratePreviewRequestDto.md: + id: c597bd385e63 + last_write_checksum: sha1:48163ce8b866f5751f17e66205542db569ea2f45 + pristine_git_object: 99c2a1280321e0ec62f79c861d7570f053542214 + docs/models/components/GeneratePreviewResponseDto.md: + id: 8969f4373cbd + last_write_checksum: sha1:61bb7d77616b76794a51a96fe4454d76218b9937 + pristine_git_object: 0bc81fc08386385df9e3191c769290e0b2b291f2 + docs/models/components/GeneratePreviewResponseDtoResult1.md: + id: 8de9e67d5067 + last_write_checksum: sha1:d94683a972c6f59fcf1ae8d1afaff46655987cb9 + pristine_git_object: 6e626e27b79b810876f0eb09c36840db725fcd3d + docs/models/components/GeneratePreviewResponseDtoResult2.md: + id: e98a43280edc + last_write_checksum: sha1:312abf2dc3ab90f0b757059750cb7aacd64fb2af + pristine_git_object: 7aa679e9beaaefaee1fdb7c8014b42c4a7f0be36 + docs/models/components/GeneratePreviewResponseDtoResult3.md: + id: 0f61105fba25 + last_write_checksum: sha1:b4e15a50b5110fa091223a3d4ce3dbcc0f0d785e + pristine_git_object: f3d665a9f1f228e3da139bc757562aad93b4f1bf + docs/models/components/GeneratePreviewResponseDtoResult4.md: + id: 8e262ca2b491 + last_write_checksum: sha1:8cd7775266d558d681f566af3ecee24ffa3ebf87 + pristine_git_object: 4632590d1df2d78e9fe6f2c88ba1613f57177e45 + docs/models/components/GeneratePreviewResponseDtoResult5.md: + id: 041c8c2d8d85 + last_write_checksum: sha1:6a138ae84a0c283737efa91390a0f6eb44f960bb + pristine_git_object: a3ec019718ad3660699e480a10cd6b8f73152ad1 + docs/models/components/GeneratePreviewResponseDtoResult6.md: + id: cfcb2f620930 + last_write_checksum: sha1:4aeb5fab31fab429f3d97919d24eaf8b46fdeeaa + pristine_git_object: 0e447147ed589c65c01fe3f472b6aa3a88429627 + docs/models/components/GeneratePreviewResponseDtoResult7.md: + id: 36511f0cfb07 + last_write_checksum: sha1:eb593b1c7eefcf31b87ce05c1dd03b19c3521913 + pristine_git_object: bbcb7426707cfbd1cf0e63a6c239b552478deab4 + docs/models/components/GeneratePreviewResponseDtoResult8.md: + id: "533409576677" + last_write_checksum: sha1:f305ac2799d86b15e4e614b626b86089adfef2b7 + pristine_git_object: 2a85a37244d27a6c27e64fbb572c6a11ab711fff + docs/models/components/GeneratePreviewResponseDtoResultUnion.md: + id: c365bfd73124 + last_write_checksum: sha1:c24b9165600486ebdc187d57fb3e33b59dea0d98 + pristine_git_object: 34c1972e0eb2ba98a8929f85500a462af4a3d5ae + docs/models/components/GeneratePreviewResponseDtoTypeEmail1.md: + id: fb716f134734 + last_write_checksum: sha1:e70bbe273db0c2f926c27cb98bb1ca0aa529132d + pristine_git_object: 7ed7691ea247416c03c696dbe6c86ea4c6509c9c + docs/models/components/GeneratePreviewResponseDtoTypeEmail2.md: + id: 9c1a1e1c27db + last_write_checksum: sha1:b78e432e3fbabec2835c4f1ec0330d21d710c12a + pristine_git_object: 759c9434194fd92a5a6c850ba9cfa9ef6adb6ef5 docs/models/components/GetChannelConnectionResponseDto.md: id: aa1e6d08ce77 last_write_checksum: sha1:0a9abe41f185a1e7b2eec0b7fda4a95c1707081e pristine_git_object: 367558bce8348bb122b9bb4a42d250db15ef86e5 docs/models/components/GetChannelConnectionResponseDtoChannel.md: id: ae39c7bf64be - last_write_checksum: sha1:ef03d8164cb64384f17aceeae3101647e6e8db8a - pristine_git_object: 6c63cb15d9086b227294bb652545ee6ccf6324c0 + last_write_checksum: sha1:1c3f7a8cd4719bc985e4a2f23eb1c6bc86c80f68 + pristine_git_object: d9bf8ab71ee7e46b25572d310cc9caf41c173d8b docs/models/components/GetChannelConnectionResponseDtoProviderId.md: id: dc493e622c57 - last_write_checksum: sha1:39b21b140a11a4b40aad37655a9b1b20d6733108 - pristine_git_object: 72edf5ca71a6655d635a339306aa9a6aa1778659 + last_write_checksum: sha1:f91557164d142785ad498848afaa0796eeedfcf7 + pristine_git_object: 3ad7ba312c22c9309c1a282342ec8780089e732d docs/models/components/GetChannelEndpointResponseDto.md: id: b38c3787aaef last_write_checksum: sha1:72238ecea2038fcdca5999c008c504bce9373ab1 pristine_git_object: 22210f26671c3b5f390ad7ba6bea2896bfe6c024 docs/models/components/GetChannelEndpointResponseDtoChannel.md: id: 50a0be5170c2 - last_write_checksum: sha1:3d4370a02c4f82cb1caa97a8db4c802050185f3e - pristine_git_object: 4cac0681bbaddf974cbb67268f39c775d7ae51ba + last_write_checksum: sha1:b014feea6eca15e8c208f38607ef4010a400791c + pristine_git_object: e81d3fd529c3785c1c9b7ea924943a13e2969123 docs/models/components/GetChannelEndpointResponseDtoEndpoint.md: id: 879cab75b9fc last_write_checksum: sha1:cf56e95127c18f25de10d41d9688b03e7caa2d8e pristine_git_object: 49601be9acd281c39415ae5fbb040d1182af000c docs/models/components/GetChannelEndpointResponseDtoProviderId.md: id: 022811bb48aa - last_write_checksum: sha1:3619322c22f6d1f77797ddc58b676ba9c56bdeff - pristine_git_object: c940c5f55c50db3b6958741c300f2fb36879b403 + last_write_checksum: sha1:dec713acb311a652c5fb670e81b190ab72f1bfbd + pristine_git_object: 4a8931b364e3e0dbb4ab5ee9eee854be927ddd4c docs/models/components/GetChannelEndpointResponseDtoType.md: id: 71f7459931e7 - last_write_checksum: sha1:d384ccd23fbbcbbbbc183f6b27f769e0765bea6f - pristine_git_object: 171d3115c25a2d6d6543a3023509bf5f5a3b1362 + last_write_checksum: sha1:28626768c1bed82f46d7eab498b25ed4dc11e5c3 + pristine_git_object: 4d4cd70692f00f632f512ff3a268ad8559557fae docs/models/components/GetContextResponseDto.md: id: 751cd92795cd last_write_checksum: sha1:d116219652373a8e420444a096eedcf30d043325 @@ -840,6 +968,10 @@ trackedFiles: id: d717d3e3b450 last_write_checksum: sha1:c46aead6bade949b8ae6390f74f590238231e027 pristine_git_object: ecf53a745fe3c819e5935b4dff94d7e36bc668d7 + docs/models/components/GetEnvironmentVariableUsageResponseDto.md: + id: 415fb4a279f5 + last_write_checksum: sha1:b7f48dfdb2d5fa8f0ec9d6a3882a19995ad2e039 + pristine_git_object: 73802962d091b96398761bf54a05a4c8d8318067 docs/models/components/GetLayoutUsageResponseDto.md: id: 3c05876f7a98 last_write_checksum: sha1:e6c883b44cd9412d0ca56a501c7f1aa27b77fe3b @@ -860,6 +992,14 @@ trackedFiles: id: dfca241a3b95 last_write_checksum: sha1:fd7f534619c04624264c37f7d9d1b917bf179ed8 pristine_git_object: 306099eb8290d2531cab2988cbf9bf794c393b40 + docs/models/components/GetSubscriberNotificationsCountResponseDto.md: + id: 3e952e633c1e + last_write_checksum: sha1:61c9b8fd60c41efa35db68f8100efb89d7cc3dd2 + pristine_git_object: 0222a4e4e53eda5dd428225e0c6e5e6cb7b02b9b + docs/models/components/GetSubscriberNotificationsResponseDto.md: + id: 2251c0b6d349 + last_write_checksum: sha1:6dd14477aea444a117c493a999ce40f563fc1f01 + pristine_git_object: ef210cb320f246292f3f0f0823c0e6691902eb59 docs/models/components/GetSubscriberPreferencesDto.md: id: 929e3fccc049 last_write_checksum: sha1:b85f64de1c4f1dab899d267aec496b0ef6d33b79 @@ -872,6 +1012,38 @@ trackedFiles: id: 3d6f1c6495d6 last_write_checksum: sha1:5f01213545059aa20b98bc20837965738ab3b54e pristine_git_object: a2dd04e4817dc8c0795baaa0891eca2973592c7a + docs/models/components/HttpMethodEnum.md: + id: 02b64baa8e97 + last_write_checksum: sha1:fef1d89e31b0a970fb3ac2e51f761b583d340acd + pristine_git_object: 04c331f15b505cfa1184adba63ff80c699b66a48 + docs/models/components/HttpRequestControlDto.md: + id: 853ef1804674 + last_write_checksum: sha1:b9e7aa03ded974c0ed4fff25510f09d7882a8747 + pristine_git_object: 042d0fbec22d5899cd8d51676c88cf5b4fde3fbc + docs/models/components/HttpRequestControlsMetadataResponseDto.md: + id: 3d1df76ab3a0 + last_write_checksum: sha1:4e25e192074ffc5653363284f9348b6600795d62 + pristine_git_object: e908afc7b6535cf939e84dfed5474eef1427c12f + docs/models/components/HttpRequestKeyValuePairDto.md: + id: 61b4aedefa67 + last_write_checksum: sha1:e2c7d1b171af0591436c95a830ea99710b389c5e + pristine_git_object: 56ab7b45afe463f58a56febe8a7522e6443a8464 + docs/models/components/HttpRequestStepResponseDto.md: + id: 8d8820d4951f + last_write_checksum: sha1:b58802761cc93f5211f23e5f4729f107b8870389 + pristine_git_object: b65df2e9075d6469db0aba847e9f07cbd9454a0d + docs/models/components/HttpRequestStepResponseDtoControlValues.md: + id: c3f80bf0af21 + last_write_checksum: sha1:2808885c166ec492277f486acd955fc0bed807cc + pristine_git_object: e08d3cbade6035976fa58a318a4ced9c71056976 + docs/models/components/HttpRequestStepUpsertDto.md: + id: eafa9e3811b7 + last_write_checksum: sha1:8c54054f1f5043938e21527e0ecd9a77c453a62f + pristine_git_object: e224fdf42a582ea35a44b52c6cbe8db346d50d0b + docs/models/components/HttpRequestStepUpsertDtoControlValues.md: + id: de6c99d1a30b + last_write_checksum: sha1:1dcb0a8261f54414f110b3662777cb59f730f11a + pristine_git_object: cc7cceafec7586e653a0c89163d232d9625d3773 docs/models/components/ImportMasterJsonRequestDto.md: id: 5d2dd40d357a last_write_checksum: sha1:ccb739080841c3cadcc58cffaf4991a5e0f89938 @@ -888,10 +1060,14 @@ trackedFiles: id: a1ee37207d93 last_write_checksum: sha1:4babbd8d83d5325115a7619c31a72705d7f2d990 pristine_git_object: 665f88a6393a20bfe2076f13a4aae427fa3318b1 + docs/models/components/InAppRenderOutput.md: + id: 50bfc4a4acc0 + last_write_checksum: sha1:e37829b11c4e6cfafd133efb18baee7029e99036 + pristine_git_object: c7840d4fa4ef29c922df15d3ddf22214387b90f5 docs/models/components/InAppStepResponseDto.md: id: e669f2428e9f - last_write_checksum: sha1:3f3d870900f84b413d3d4e96048e3a8940353514 - pristine_git_object: 71dadfa04af661ce672cf39b3430038d198c4169 + last_write_checksum: sha1:ec64e40ce416f664d46bbed12cce853417a2510c + pristine_git_object: 58334681c8941f82850f47ff89bd5329dcfbb2ad docs/models/components/InAppStepResponseDtoControlValues.md: id: 1e5665c5c3fc last_write_checksum: sha1:f151a75496fc6b7e840764e78258436ad9a3607f @@ -908,26 +1084,34 @@ trackedFiles: id: 62dbcee8ca8e last_write_checksum: sha1:f9e8da4d91111ece0b64510175a3875d93dd8488 pristine_git_object: 9260dda71950eee8247129d4e7d11f858a320703 + docs/models/components/InboxActionDto.md: + id: 164aec470ff3 + last_write_checksum: sha1:31d467a9faddbfd0e8a300f880b80b883ff2ea5f + pristine_git_object: 659ce31282256f9ecc7d4df4e38a239a5356b3c2 + docs/models/components/InboxNotificationDto.md: + id: b66370ae6169 + last_write_checksum: sha1:2073070316ab25ccb5de4d679c27ad80236c28bc + pristine_git_object: 3fe9244f466104b3f43c55fd885b045e00dff5b0 + docs/models/components/InboxSubscriberResponseDto.md: + id: eb45ac7750c6 + last_write_checksum: sha1:7349fd5359208ce71bdc3541f21146e687398aa5 + pristine_git_object: e8f0f4364c7704198a1eadb6f5fe0e6d9c334155 docs/models/components/Integration.md: id: efababb5af54 last_write_checksum: sha1:1794e7bfe152e1f3548974f2dc1fef69397f815b pristine_git_object: 3dccca16e25bdfcaac6618deabb66137526561c8 docs/models/components/IntegrationIssueEnum.md: id: f42875feec01 - last_write_checksum: sha1:6bee7838112309e4219c74c10261857b0af1eed9 - pristine_git_object: 3148ce51525a73e3c179de4cfed1900ac7fb64d7 + last_write_checksum: sha1:6f42e51da57de3b40d1626c72d588b1b547ace81 + pristine_git_object: 04e7ec7fa525a25cc5bc5d52f59343ec76669617 docs/models/components/IntegrationResponseDto.md: id: 5336a6faef89 - last_write_checksum: sha1:b8b98c658128c448283495018470f16ee6ef13a9 - pristine_git_object: b2336b2bb66e1de9b8021c673595a1d7354a6fa5 + last_write_checksum: sha1:d8c8d1517ac5c15836675560c0ffc3bbaaf32a33 + pristine_git_object: 78285b1425bcb9e3aacfe8ffbd2e3d94492c1c46 docs/models/components/IntegrationResponseDtoChannel.md: id: b2b692ddf6ff - last_write_checksum: sha1:ad4d03c77f6f92da0a11dd74d5738ff87cf3e544 - pristine_git_object: 25e24d238a7646f11a7f1e5fe38cd559dee2de6f - docs/models/components/IssueType.md: - id: 5bfe404dbaea - last_write_checksum: sha1:92891e449531f2b960e4087611c9fef0a3e96c8b - pristine_git_object: 40c79175accca4a89af86822d538c850b7c5178f + last_write_checksum: sha1:f65d79e2d4da003fc18db54813e0b4b70ffa4483 + pristine_git_object: f7c6be613a367af6283e5abd6b57efb414b9517f docs/models/components/Issues.md: id: b8afbaf572c7 last_write_checksum: sha1:923b707ed29ee23268c0fef17bdc859f04e798b5 @@ -946,8 +1130,8 @@ trackedFiles: pristine_git_object: 79f2d34907bea284fc9011b1efad5ce857f35faa docs/models/components/LayoutCreationSourceEnum.md: id: 309ebf539670 - last_write_checksum: sha1:1ca332bd571085f70cc197a1864631091156cfb1 - pristine_git_object: e00f6ca6cf8d19f3b72f9c856b2ab625136d78de + last_write_checksum: sha1:a7c01d7703be14201191a8f0dc1ed96d8f41438b + pristine_git_object: 5d7b5ac7b63726a5b9845f1218d6d216abdff7f3 docs/models/components/LayoutPreviewPayloadDto.md: id: 1fd614447bb1 last_write_checksum: sha1:c78361c3dfbb86a463e7e3b407564961c23e3ff5 @@ -962,8 +1146,8 @@ trackedFiles: pristine_git_object: 053fe29677adc592110981d43bec9222dab3af2c docs/models/components/LayoutResponseDtoSortField.md: id: 9fdd46043c91 - last_write_checksum: sha1:3d7a0c4e79baf3bf86fa385001c5ff51a3c8c61d - pristine_git_object: bf7c7b78b3ac70a32df69356ef55919910cd3d5a + last_write_checksum: sha1:75c503b16bdd06bc554ed6cf37cdd6cfb931c2a3 + pristine_git_object: ba3b0338bc39937e4d9b4f761e37f5bda011be70 docs/models/components/LayoutResponseDtoUpdatedBy.md: id: b99b8859ccaf last_write_checksum: sha1:27c366714800b9b8f57fbe5b372a56f0fc75604b @@ -1000,22 +1184,26 @@ trackedFiles: id: 6b7f8d9c6f9c last_write_checksum: sha1:a9cb142b821da8245781d3744d661410c5f6b09e pristine_git_object: c1da2bf0e76f479d4b8b19eee5e6fb0686453b3f + docs/models/components/LookBackWindow.md: + id: c886a960fd29 + last_write_checksum: sha1:906c26a03475ebb6720fbdbb1cfefc4af198939b + pristine_git_object: 958bf272d85ee808f06bd5e0fed5e083234c1bce docs/models/components/LookBackWindowDto.md: id: 24fc2edafc5e last_write_checksum: sha1:e2b9545c26d84863a3f553a474a70f1e12db7f31 pristine_git_object: fe27a18b66bddfbe33c6ec4a9a3aefbf285ad1ff docs/models/components/LookBackWindowDtoUnit.md: id: 7ef958b1b495 - last_write_checksum: sha1:eae85fd6330c65a759b04c70b7a51326b6f894c6 - pristine_git_object: 8c87e1c16c7077e2262a8dd7e4ae2466a6d44e36 + last_write_checksum: sha1:cd20e5b71f49ca1c47abb1d87b9b237579574317 + pristine_git_object: 7b2fb3cc4e49dffac39c60feb5ee3a78add5968a docs/models/components/MarkAllMessageAsRequestDto.md: id: 3196efae5f2c last_write_checksum: sha1:bf0bef562f3da599ece26731b046d2415a82c7df pristine_git_object: a452439ed4691f38dd9bf461b3c4c9bfeea4b512 docs/models/components/MarkAllMessageAsRequestDtoMarkAs.md: id: 97bbe6192ae4 - last_write_checksum: sha1:db84e45d9b33fc5d33fd62dfe5e14cf0eaf1e60b - pristine_git_object: 5f3ec2f4ccfc904b615ae5e2ff7eef14c7367d37 + last_write_checksum: sha1:e47d4bd217f0889c3ba3ab0a9adfb0a2d259d1e2 + pristine_git_object: fa6007aba02f66551b449f8b53ec8d59f404feb4 docs/models/components/MarkMessageActionAsSeenDto.md: id: e117335a11ae last_write_checksum: sha1:a21de3ee6dbf4f512fd83d19ce99af4a1ff55896 @@ -1026,8 +1214,16 @@ trackedFiles: pristine_git_object: d829e4c8c08b06db3b4b334e1161a5bc7e8ec236 docs/models/components/MarkMessageActionAsSeenDtoStatus.md: id: dd2c1bc1705b - last_write_checksum: sha1:cd8b032148ae1cc00aa01af600d34b6891116d4b - pristine_git_object: 0178991e32262146036111a9513515494a5a61b2 + last_write_checksum: sha1:f9c1d5a4ca20199d405c0c731ef50160a008a599 + pristine_git_object: c72a1d80420539c3cd2339171be5b5f47de05d02 + docs/models/components/MarkSubscriberNotificationsAsSeenDto.md: + id: 244a103b502a + last_write_checksum: sha1:0202d7940c5415d6f137d3bfea848aa2a24536de + pristine_git_object: b6bcdb8b106a7d7a82faa94ca9ecfbc5298c29c1 + docs/models/components/MarkSubscriberNotificationsAsSeenDtoTags.md: + id: d97223a72a2f + last_write_checksum: sha1:1f6fca3ca6de2163e5280bf8f61f06e584cad4f4 + pristine_git_object: 3abb5be52a5696a57a79c64f1264f149d7b7679b docs/models/components/MessageAction.md: id: 2380844d4395 last_write_checksum: sha1:d9c0d3ac9e00cbd275bf1353ea6416ff668cd9a3 @@ -1038,8 +1234,8 @@ trackedFiles: pristine_git_object: 080e52d3ba1fa8c5c347fe7e54c3d269ff2c6cd6 docs/models/components/MessageActionStatusEnum.md: id: 38403928f7cc - last_write_checksum: sha1:0fc2a7ebec0b8782906d60fbace391080449b085 - pristine_git_object: 5836499ca4cb800e8826f5cd8efcd0291ff1afc5 + last_write_checksum: sha1:c09806f2ff87aece4f7894c84425baee7baabce9 + pristine_git_object: 5d4ebf352596d75a2e5c00b6eb9809f3819d87e8 docs/models/components/MessageButton.md: id: b3337ea95f20 last_write_checksum: sha1:8355e645cce235d10a2bed03d8ef2ac640839336 @@ -1062,16 +1258,16 @@ trackedFiles: pristine_git_object: 2b4bc4b5b3f5b8b75b2582814d0ebd342f70af74 docs/models/components/MessageMarkAsRequestDtoMarkAs.md: id: "050116102464" - last_write_checksum: sha1:bfeb31f2ae2960cba238c917f43302345a13d536 - pristine_git_object: 13c5a1df1decbe64628d0de2f61b2720b2169a98 + last_write_checksum: sha1:32eb3e1fba038facf175ba054816b2829c865ca6 + pristine_git_object: 38c2d026f3104dfcaada9a1780bffb0dbd3a5d63 docs/models/components/MessageResponseDto.md: id: 8dca237f7d69 last_write_checksum: sha1:aeadacd3872d04ada2ce86f006ad1a7fc10bd7b7 pristine_git_object: a4e410bfb4e63aa6368bc4c0e5052dd7582caa5b docs/models/components/MessageStatusEnum.md: id: 0d7f81e3b7eb - last_write_checksum: sha1:1c9f8964c9c38fe5d980f910dae0e32a6df80d0d - pristine_git_object: 8aa4778ad944834114785aa6a8fee38c240d884b + last_write_checksum: sha1:62d9961a7e2bbee20a5a85061c4568dc68c014f6 + pristine_git_object: f816ae9759616105fa8ddce44f02d24633ef0b31 docs/models/components/MessageTemplate.md: id: 1142467cde54 last_write_checksum: sha1:51432b01b811bb5c17b3a8d06119fb61ac904699 @@ -1094,12 +1290,12 @@ trackedFiles: pristine_git_object: d248de07ae31bb05f25ee2d00fb1e4ac051f10fc docs/models/components/MonthlyType.md: id: 4d0ada5a149d - last_write_checksum: sha1:87def077b38cc76031a02e8fde132e178d7d4b67 - pristine_git_object: 2f4c06e0fd49316b763cdb10d80be70a2f9c10ed + last_write_checksum: sha1:62a97e94cf0ae45e22125e40310dfcb9b99443be + pristine_git_object: 80120b522df9d070de6f2032fdb08ced383a8db6 docs/models/components/MonthlyTypeEnum.md: id: 6617e74b8b27 - last_write_checksum: sha1:19c4c62c62bf05b61cd31c1b77645a08b5fbd538 - pristine_git_object: f70026fc6e599bfdca21b536713f55296b2fbde8 + last_write_checksum: sha1:9c1e4b810230f1bf348449500a4c30b9acbb60bb + pristine_git_object: d8d592dcf29f08048145c503bbda9696f67aad17 docs/models/components/MsTeamsChannelEndpointDto.md: id: d2b083b71c09 last_write_checksum: sha1:752125b01e4e4bca8556a63375c65e59648b57a0 @@ -1114,8 +1310,8 @@ trackedFiles: pristine_git_object: d345eac40b387c5ccf1cf571a55fa9b7b4a945e3 docs/models/components/NotificationFeedItemDtoStatus.md: id: c4c719fa908a - last_write_checksum: sha1:a8530544c6bfde6ed676b1c58f6446a484b71147 - pristine_git_object: 6d53216c4e4aa23d6d8f8914c89d642fdac57e59 + last_write_checksum: sha1:9a3b9ba5f503a6cd644ca884a8891510a6c8688b + pristine_git_object: c98bcf6265551e3cba6a909aacd10a99c3a0d85d docs/models/components/NotificationGroup.md: id: fad3782a032a last_write_checksum: sha1:0eddd5c3dbcdac3404b604cba74a3d2bdffc0134 @@ -1146,40 +1342,44 @@ trackedFiles: pristine_git_object: dc5e012a5bc8dc62bbe3a59e80bb3b4830e840ba docs/models/components/NotificationTriggerDtoType.md: id: 98a6f53d9f85 - last_write_checksum: sha1:3fb718ea5a878da60a53b0b6b7f8a0d125a72af1 - pristine_git_object: c4dc40bb76850cbc9c245d5de3aa083ff4acce16 + last_write_checksum: sha1:84d3a00e853a882a1e42e8c392c8c0c4aa939a96 + pristine_git_object: a7a5c3eab11bf8165cb9eb61c2e955dca3c16663 docs/models/components/NotificationTriggerType.md: id: 15ff6c42e774 - last_write_checksum: sha1:254042946fa1a8e0a4b2fa23f27ae0a990062abf - pristine_git_object: 39c8366702a2fe39420d7da34a6788555c801fc5 + last_write_checksum: sha1:b102a1fbb07208ea790f453a17802b4b9abb8b6a + pristine_git_object: 9e834870207a18f4ed3556b96e57a9d4e1c0cb4e docs/models/components/NotificationTriggerVariable.md: id: 7085c2236187 last_write_checksum: sha1:7ecb5812d4b262d9e1ae2d88817230427929bc92 pristine_git_object: 43de407a74d47225ec6ee47881f85355a48767b5 + docs/models/components/NotificationWorkflowDto.md: + id: b11945b5a2dd + last_write_checksum: sha1:ccaa0bc766942e6fbd31eb6c9c85f90842bfe576 + pristine_git_object: e11370a2647a703ba880f97a7490170e09e70578 docs/models/components/On.md: id: 16c2cbe5ed69 - last_write_checksum: sha1:024299efc7a47dcc267d46b9cd9e5f2de57a3498 - pristine_git_object: 3efe5278bd07fe36bfe2a89ce5513610e75b5d6e + last_write_checksum: sha1:8d47400eea8918d144a30ec2e8a6f9e470e7e74b + pristine_git_object: 6b843d2716530e1e42ea91e57ddf6e8f0f9dbd25 docs/models/components/Operator.md: id: e3ebac18fa75 - last_write_checksum: sha1:a346dd32a75ddf32c784b84a4e776078501bdc72 - pristine_git_object: f6e858622acc60f289fe61e4cc816adfc75dee8e + last_write_checksum: sha1:5f36ca55920679fc139dfdee6070cc372fd8b2b8 + pristine_git_object: 9e9442f63d3d0ee2b1cd4ebe541900fe837c8d5e docs/models/components/Ordinal.md: id: b859a946b878 - last_write_checksum: sha1:d254c79816ac7c53a72d97f177876f6ca2b48a4b - pristine_git_object: aa6267262afac6516b06624533095a410c07834d + last_write_checksum: sha1:4105257a0fefe4bef095a80d005b7012214a9714 + pristine_git_object: 1a4cb7985cde20ae1f35147ffb8568a2e30a43ac docs/models/components/OrdinalEnum.md: id: 513f73041c56 - last_write_checksum: sha1:86b0f6c2654ab74c6a61c3242adc0c2004f35ae2 - pristine_git_object: 55025aacba4df25a2632be89c12a043a19491278 + last_write_checksum: sha1:a4a18a69e6d9659d97067d43e6f6a7a13286706f + pristine_git_object: 48f18e0f0b0f6699b6ea84ea6afc8671a0060b1b docs/models/components/OrdinalValue.md: id: 32becff01857 - last_write_checksum: sha1:a0a8f58321b1c0abf08ad61ba69a3c4ad0b0d8e8 - pristine_git_object: 067293675a68fcac75da570de4d2bef2ad610aad + last_write_checksum: sha1:a76112c8b3afb33fb76c22bb8f22c077e55f0e14 + pristine_git_object: d6b3eabbca389a0cabb686a8925c77cceab394ca docs/models/components/OrdinalValueEnum.md: id: 3042aa82ef7b - last_write_checksum: sha1:89a3c5dadd41e787ac53303b2f988dad1b138f2c - pristine_git_object: 514d50a11b6b3335724e46426b102c5d62045151 + last_write_checksum: sha1:38119e51356752b8db7a089fac949ebd870b4b92 + pristine_git_object: 44a4355d5e41589069b64129eef7395de718150a docs/models/components/PatchPreferenceChannelsDto.md: id: 09e0e790d4d4 last_write_checksum: sha1:23b908e0a34a251c1b00ca2f987b2625be5f2354 @@ -1246,12 +1446,12 @@ trackedFiles: pristine_git_object: 49ff48637577b6e0796f14fcfb63b557cf8a58b2 docs/models/components/PreferenceLevelEnum.md: id: f833a650e623 - last_write_checksum: sha1:f570a7784c5a008983a24dcfc646133915cd9a15 - pristine_git_object: 5d81dc2b79fcff3066f5a772f38a2d9547a3fb2d + last_write_checksum: sha1:b2f344c65b2c8e69236353fa8a3637078d797f7a + pristine_git_object: fd308fe860f681ef9f9ae012f77119818f33a008 docs/models/components/PreferenceOverrideSourceEnum.md: id: 42bffc1bef8c - last_write_checksum: sha1:393bb35fe17948ca230263883edb7fb140e63be7 - pristine_git_object: 679580b3aa04bc419ad88a792524c3e2e808b9ad + last_write_checksum: sha1:aa2ab580d7aff31d3d6179935e6378e20f7f3ad6 + pristine_git_object: 25c2f40e77c054d64f97998b1450a7ddc43b805b docs/models/components/PreferencesRequestDto.md: id: eaf68071dcb0 last_write_checksum: sha1:67a31ea890e2cc10eb6fe5a7cdbfefcaf24f601e @@ -1268,10 +1468,38 @@ trackedFiles: id: 6edbddeec563 last_write_checksum: sha1:ac39b4202f91451763f85fe8bfa4132c204f3000 pristine_git_object: 185c9d9f65241599ea6c62eb0ded182d9d269e85 + docs/models/components/PreviewErrorDto.md: + id: 5208d24ea57c + last_write_checksum: sha1:1bad28fc86a586f33ccff1c90c13e895358e7d5c + pristine_git_object: 1f21c7b433f921416394cacc5e212b3a57a3ef32 + docs/models/components/PreviewPayloadDto.md: + id: 9cb33fb69fd2 + last_write_checksum: sha1:a5fa37f2e3043f33bb8cd15a88799d44edacc77f + pristine_git_object: e0f9212d70d50d8eb2ba6442a2d3cfe3bc9b1f11 + docs/models/components/PreviewPayloadDtoContext.md: + id: a61f6b73ab65 + last_write_checksum: sha1:2c50663f419c0595002c2f0a639165b53d66349a + pristine_git_object: 13b8a2d5c82cbc7de23c2ed6a565deb180cc0424 + docs/models/components/PreviewPayloadDtoContextUnion.md: + id: 20d205eb90b2 + last_write_checksum: sha1:eb2a0c1e073ccab106ee173be1d50d3ec8fb527f + pristine_git_object: c8d2201a53d6506deed1e03feca7bd36bac30f4e docs/models/components/ProvidersIdEnum.md: id: 03642e27ea3f - last_write_checksum: sha1:9f7e46322bf913310b3160bc24a0fd695a8091b6 - pristine_git_object: 552acd8c25f7dbe26ffa0ea0fa2a3a115ceb4f09 + last_write_checksum: sha1:ffabbca522788143d3f87cd2468b774577a9a0a8 + pristine_git_object: 1be6727e2ca8b8501ece103770e6937a2b44a605 + docs/models/components/PublishEnvironmentRequestDto.md: + id: b29e42c4e73a + last_write_checksum: sha1:ad2a05caed528a273e66615963ee2cb30af62372 + pristine_git_object: 4f8f3af4a4ac624711deaf07b247dabc7a6bd624 + docs/models/components/PublishEnvironmentResponseDto.md: + id: 1e7e831c0b56 + last_write_checksum: sha1:544c283f3b113288fe2dd16aefa646b672cd621e + pristine_git_object: 0cb4cff37ca349bfac5735e0657d6504ff8ace51 + docs/models/components/PublishSummaryDto.md: + id: af6fdceb81b8 + last_write_checksum: sha1:83fcb85dd20e577ec29fb4d7ab0f3c3c42474586 + pristine_git_object: 9a1976ac28a684cb0e0e0fb993d3b03618964f44 docs/models/components/PushControlDto.md: id: 91e09fa14cb6 last_write_checksum: sha1:6878c43b0db97a8d6fcc3355ae0a00f680210e8a @@ -1280,10 +1508,14 @@ trackedFiles: id: f05f178d5f1d last_write_checksum: sha1:360a8733a6db54d359058a549717fc84133f58a8 pristine_git_object: aed4c7c85aae12a7567f3b5367e4db86a510f420 + docs/models/components/PushRenderOutput.md: + id: 83da01c114a8 + last_write_checksum: sha1:680c6793c9d05264413ca8e7c66da792039f1dfc + pristine_git_object: 1f28279a9f214a89a741d588946babe479bbca64 docs/models/components/PushStepResponseDto.md: id: e469376e97bf - last_write_checksum: sha1:107bf9b04d0abc16638e755d881c61f4c1da6d0b - pristine_git_object: 57502828246cb05e0afa80dd007f9c62c3ed6ab8 + last_write_checksum: sha1:09456669fa181e63ccb38c9fee65dd94f22ce89a + pristine_git_object: 67898d0ec70c99fc14ddd613a49ca291d949b418 docs/models/components/PushStepResponseDtoControlValues.md: id: 3579d0d31ec0 last_write_checksum: sha1:84d5069909c9bc6ed04eedc38c7e0c37e2d0011a @@ -1298,8 +1530,8 @@ trackedFiles: pristine_git_object: 05bb7eaa2fb539e233a2626b333051b19c0fa186 docs/models/components/RedirectDto.md: id: f02c95c8314c - last_write_checksum: sha1:0b8d264ab3be3c50c06ccc25738a39ca0ba93df4 - pristine_git_object: 607b4d5a03aab57f3db9c9013821c7129ab92114 + last_write_checksum: sha1:fb514384f820469fbdff9c122e047a0679ba8dae + pristine_git_object: e6381a9899357fd32318c05b6f65efa174d7b935 docs/models/components/RemoveSubscriberResponseDto.md: id: ed647218b384 last_write_checksum: sha1:cf327c2ae230f3554e4765f0ea44605aafda515d @@ -1308,26 +1540,66 @@ trackedFiles: id: f1b51e71e6bc last_write_checksum: sha1:1c90833ac1b7a30b6ecfd8f1f68046960d930544 pristine_git_object: d9430e9df8142e562816118a59944e508119c48e + docs/models/components/ResourceDependencyDto.md: + id: 3ac81522acad + last_write_checksum: sha1:d609bd9502df1c755fef8c73c17f36b2d0c531eb + pristine_git_object: 45ca158322d8f59e55156ba7e478dfc292cf945c + docs/models/components/ResourceDiffDto.md: + id: 12b296e1c388 + last_write_checksum: sha1:169a98a8c0e21f3aa581c4269b968accdb42b182 + pristine_git_object: 8c1838acffda2ce5f62a96eab51d44282d7331e3 + docs/models/components/ResourceDiffDtoSourceResource.md: + id: 7fa34aa13f18 + last_write_checksum: sha1:05bb6f8a46ba70249904ca59a6ad835fffe8a2b9 + pristine_git_object: c434b7b8ff6c9aff4e712b563babdca3074c5ec7 + docs/models/components/ResourceDiffDtoSourceResourceUpdatedBy.md: + id: a1479cc60023 + last_write_checksum: sha1:a8b63e39a8028a4d50f598bb9e3ab9bcbf76c578 + pristine_git_object: 50585bc181514abf6bc8534b447d93d03f7a451e + docs/models/components/ResourceDiffDtoTargetResource.md: + id: 485938d9d8a6 + last_write_checksum: sha1:9fd12d02bafeac1d4e26d10fa6186401860bec00 + pristine_git_object: e0f00800190e5c2291b4b40ab5aff8aa9b6c284b + docs/models/components/ResourceDiffDtoTargetResourceUpdatedBy.md: + id: ef348721e17d + last_write_checksum: sha1:cbb8c71a118999e0d9dcf499493bec6c90a07578 + pristine_git_object: 3fa5c91d82bdf9071a27bafb7fbf189bcbc0e646 + docs/models/components/ResourceDiffResultDto.md: + id: c40eb5f57e28 + last_write_checksum: sha1:fc3beabc9a7333d041897d1d84650b1fd030c6c9 + pristine_git_object: ab2cbdf631dca9a25b7162c6d4ca368dd416a52e + docs/models/components/ResourceDiffResultDtoSourceResource.md: + id: d8a6b2c4c8ae + last_write_checksum: sha1:0777fb8ee99b34f0d223511ec5c7a88b46d652fe + pristine_git_object: 5eb0d32ac75be67310caf4bc45ec27fb150579ee + docs/models/components/ResourceDiffResultDtoSourceResourceUpdatedBy.md: + id: 026dc3727a3c + last_write_checksum: sha1:354952a532ebfc9ec590e4d60319047851179104 + pristine_git_object: 715b86261e48a465bb260a77548d1b929fd86279 + docs/models/components/ResourceDiffResultDtoTargetResource.md: + id: 1fd555df93d9 + last_write_checksum: sha1:0d0184ef4c8ef3908268572f11023b3b83cc535d + pristine_git_object: facc6e3c6ea952b690a7af6595c9470a9765770f + docs/models/components/ResourceDiffResultDtoTargetResourceUpdatedBy.md: + id: c152723337d0 + last_write_checksum: sha1:c5860d6ccdf3b3046b51cfe4438533918065611b + pristine_git_object: 0cac739c353d0557aaffeaaea0df6bd29e4190a7 docs/models/components/ResourceOriginEnum.md: id: 6ab8adc90395 - last_write_checksum: sha1:ff9eb8b009f51509c291dfece677c065290c6a8c - pristine_git_object: d13caba512965037d5e46fcb75eb6b2a9319f6c0 + last_write_checksum: sha1:d24cfde637668417e9a7f06f4c9620bb02c3a324 + pristine_git_object: eddc819afe2dc0ed18ba9fd3abb669e006d036f0 + docs/models/components/ResourceToPublishDto.md: + id: 62c3f2650636 + last_write_checksum: sha1:03b02a541d28f0db8d376f78ad4d564b78c0fb35 + pristine_git_object: b7def35e537186e8ec735030b303e197771a531a docs/models/components/ResourceTypeEnum.md: id: e280b7d329a5 - last_write_checksum: sha1:332dd36c1f3fb51b0c7daab00163068297f129e8 - pristine_git_object: f512fb042ee30b0fbd7dbbcec0854f72c448b0d1 - docs/models/components/Result.md: - id: 1e17971d13ce - last_write_checksum: sha1:41d800762f571381d73dbaa9472874fec84e994c - pristine_git_object: bc50f5ce494708e543ae92fd2735841f738d930d - docs/models/components/ResultUnion.md: - id: eb67b8448f1b - last_write_checksum: sha1:62d97fe8dac8ae9462db643e44f6c7cc96b74b9f - pristine_git_object: 2b409a5653fc283bb5df7eacdbc44c44f981ae2c + last_write_checksum: sha1:d4e5777f6655c34d86d1a610f92ba4a42fc8f361 + pristine_git_object: 905c66f0dfa3783ab2fb1de1a16db0cf0e3f1f5a docs/models/components/RuntimeIssueDto.md: id: b6df56cca835 - last_write_checksum: sha1:523dfd1d05ec8d4b82a9bf576088cae7caf555ec - pristine_git_object: edadbd706c872e999739218c344fc74a3ffdc185 + last_write_checksum: sha1:98cb96fde0416c3d41fd082403aeb7551bc1b75a + pristine_git_object: ad21f87d9312c4010d5bdc2309819a4c8bc3dc5b docs/models/components/Saturday.md: id: 420bc8a8cf93 last_write_checksum: sha1:b74674ba4b759fbab8fde6b6113de732d36f1373 @@ -1346,8 +1618,12 @@ trackedFiles: pristine_git_object: 1df42e77682f373f9c0374568822f390aa087c71 docs/models/components/SeverityLevelEnum.md: id: fe5722613a91 - last_write_checksum: sha1:9f2d807ca401d13cbd853e812ef484cae38f92d5 - pristine_git_object: 833bae2f84cf8dd04819243269b33dc2e5610321 + last_write_checksum: sha1:4a5649330f5648b9d10f2a4a88d64fd45f76ed51 + pristine_git_object: 7f52615ea77ab1b0a0304ae776c26aceb1f300b9 + docs/models/components/SkippedWorkflowDto.md: + id: d7e8cd6ecbaa + last_write_checksum: sha1:7c16c57093fc512d708a175d18980423fbce5348 + pristine_git_object: e5b156c6d5260c4b2a6ba41ac3b317402cccec39 docs/models/components/SlackChannelEndpointDto.md: id: a3c606dec47c last_write_checksum: sha1:b96704b640f6362278bb2181bb12557d4a3486a8 @@ -1364,10 +1640,14 @@ trackedFiles: id: edb550131d06 last_write_checksum: sha1:534a17d2e6595edfdc0c6a5d21fc4e19acf40962 pristine_git_object: 79b9e261ba1c73eb4d537e0a3aa0a5039020c924 + docs/models/components/SmsRenderOutput.md: + id: e40832b7cd2e + last_write_checksum: sha1:d79ffb642f09f15b192edcb191241563e072e580 + pristine_git_object: 221da0584841e68d03f6bc1adb1078b5a9aafd8a docs/models/components/SmsStepResponseDto.md: id: 5bf2e263a8f9 - last_write_checksum: sha1:9716d05e1570e8d3a230a5d0a3b9310a47f08f71 - pristine_git_object: ecf5ad71aa964603cab8eab6c1e22c9bc20819fd + last_write_checksum: sha1:14bce84e0ae87ff9edea84626fa0c8a14be69c77 + pristine_git_object: 756f5a9108e0ace5f94c806bb5b3199d44c211b2 docs/models/components/SmsStepResponseDtoControlValues.md: id: 756d0624a639 last_write_checksum: sha1:7c91f69cf445669b2f87836df3adcd17d9ba12f6 @@ -1380,6 +1660,10 @@ trackedFiles: id: 6c843e0a59d4 last_write_checksum: sha1:2278a612585e34967a760c647aee7a2158cb81e4 pristine_git_object: 753c9b54ec3a22ebc614167e9f95c9a03113c6b4 + docs/models/components/SnoozeSubscriberNotificationDto.md: + id: 91f3d1b1366e + last_write_checksum: sha1:9fc6bb3321754a64f83af0196550c09c1fcbcc5d + pristine_git_object: e370aa9c6a6e91bda96969aa61a7c096c1e6eaa0 docs/models/components/StepContentIssueDto.md: id: ab0f9cb7cf11 last_write_checksum: sha1:505a1574c59f5ecad8091e0102988077e08b2f93 @@ -1402,12 +1686,12 @@ trackedFiles: pristine_git_object: d683ffd3640e245ce86b62fe38b4fe7cb10bb7b3 docs/models/components/StepResponseDto.md: id: 622bfb8172d6 - last_write_checksum: sha1:8b7222e8ac55db0937edaf78198f2e04b2fc465a - pristine_git_object: d8dfda71015952114b8ae365082babf70ed0ed21 + last_write_checksum: sha1:98595c55e8f7baa832187bc4e778799ad89757a7 + pristine_git_object: f7bc441e62f621721fde26c991604361e6288475 docs/models/components/StepTypeEnum.md: id: a5bd86bd90af - last_write_checksum: sha1:3affdddd4439af7b2d2228ad8b727760e1e43180 - pristine_git_object: e789781ea6eab8a4b71cc9fc9a9613510319e85c + last_write_checksum: sha1:c7e5f8d122e0f8bc5dbb0c5947cf64f061650ff1 + pristine_git_object: 2e474213c3faceb45dd65a72496405535ef46548 docs/models/components/StepsOverrides.md: id: bdbec325659c last_write_checksum: sha1:e2d29818a291b6fc600e078ed893b123c6f0c6f6 @@ -1418,8 +1702,8 @@ trackedFiles: pristine_git_object: 586c8f61707bd183b9cbca876ab20693a710410a docs/models/components/SubscriberChannelDtoProviderId.md: id: 61d1a707eb28 - last_write_checksum: sha1:0c42cb00d1921577e866d5b8f56f9e16ee240134 - pristine_git_object: c80ebd8b2142e20b3cdb76ec846b0b308e89a583 + last_write_checksum: sha1:a135e8004d2ab86c7171f0e0f973891bce636248 + pristine_git_object: 6b9961a4fa873eea7722d57921da84b2e36e6383 docs/models/components/SubscriberDto.md: id: 84a3109b14c6 last_write_checksum: sha1:4c243c6b51654e8903c3addf5e4f4271fb682adc @@ -1504,14 +1788,26 @@ trackedFiles: id: eace044cf172 last_write_checksum: sha1:cb0e1f6afba42942e738f7c5872e381c63d55c63 pristine_git_object: 0d00df2589acae02233c2b5de3658623dbd5068d + docs/models/components/SyncActionEnum.md: + id: 24df0a8a0487 + last_write_checksum: sha1:043e4fee98a8564185067025fb0172d007594925 + pristine_git_object: d29ea6eb06d4eb6689d55173d55f3c4a2fdc44fd + docs/models/components/SyncResultDto.md: + id: b62b9788758f + last_write_checksum: sha1:2962621a64ab264725fb266fa0ae6bf0df9a55dd + pristine_git_object: fc7c15e1ca6a3b923114071c39916f496936ffbe docs/models/components/SyncWorkflowDto.md: id: b3a80cd2a918 last_write_checksum: sha1:e35e7af90cf40f82a61325566729c51f918ee979 pristine_git_object: 61c957b5b4baed5c6bfe2a2abf18803e784e12a1 + docs/models/components/SyncedWorkflowDto.md: + id: 814d6fd12224 + last_write_checksum: sha1:98014f91c2b83bfcdb580acf2d82683c48fc2617 + pristine_git_object: 81ae88b56b752fa93858443fb2e9a8e8702be3df docs/models/components/Target.md: id: 7e9c394caef6 - last_write_checksum: sha1:b61babb39aa7d3c856b1df1cdc4b81e50ac0394b - pristine_git_object: f287baf59542a979230f364e07887ebba0c642ca + last_write_checksum: sha1:88ec75895cd6842abeb38f9ad0a319850c0b6620 + pristine_git_object: cd607395305ead10a19ab32bf56b6d7692fd6593 docs/models/components/TenantPayloadDto.md: id: 6704f631f6a3 last_write_checksum: sha1:3fec1e0f4ba4d8119c75337e3a3f8b112558a3d4 @@ -1522,40 +1818,40 @@ trackedFiles: pristine_git_object: 944dd45abcf0a48a41c6cf767da635e50f7e5cd3 docs/models/components/TextAlignEnum.md: id: 4e83953c1b55 - last_write_checksum: sha1:5f43e53fe2def37d601b2ee0cc41cdcaa965aec2 - pristine_git_object: b1c901a72ef7fc5bc631dafac9cd6ca02ec76b26 + last_write_checksum: sha1:111b6a971f7b80ed2657af9f799bbfac1683b428 + pristine_git_object: f5bc34910c7a7b16d134ee29696f5cc6588ff3c7 docs/models/components/ThrottleControlDto.md: id: b1a5af8af6b9 last_write_checksum: sha1:091ac9014d1bfcb2a714881b823dcf4e5bdb3227 pristine_git_object: 61b9e005f72409705e642aae4aa69a13a0f37cf6 docs/models/components/ThrottleControlDtoType.md: id: 2b74a553053a - last_write_checksum: sha1:43b7d09139532ea2bdd33d2790c4f01aab4ba590 - pristine_git_object: 82ae3296282110f99833e9df7bb2bd90a6b3f0a6 + last_write_checksum: sha1:a16ef44c7361430fbe22b40861faf5f65c58430c + pristine_git_object: f753a7e0cd36866792994218eb76a7309e4f9883 docs/models/components/ThrottleControlDtoUnit.md: id: b3a0ce7b0137 - last_write_checksum: sha1:d749d05a3929dc0adbfd8a8e9ab37b17e66187f5 - pristine_git_object: 83b05cef9869802a6f2f8bccbf17b51b18405c86 + last_write_checksum: sha1:0b9593496306b779dc97bd20374bac5af75c4bc9 + pristine_git_object: 3ac5786a9edc09c4af69292d046e539c37f424e6 docs/models/components/ThrottleControlsMetadataResponseDto.md: id: 6c4dc8801607 last_write_checksum: sha1:eda1de286a6e145e483009af541a015949a773b3 pristine_git_object: e23315e915e82db572f7c5006eda5be0e964208b docs/models/components/ThrottleStepResponseDto.md: id: e6a45b6313d1 - last_write_checksum: sha1:e7346316ce6f5d9a3488fd6f69f3ab57a8c8480a - pristine_git_object: dbb2a0185dbdd8d1c6f0e68ec35160e000375ce1 + last_write_checksum: sha1:f3fbbae4b1712127eb553d588853cbf1048933ca + pristine_git_object: 0b39a4c9a8c835e8d7c02d0c019efc0e6cc776e9 docs/models/components/ThrottleStepResponseDtoControlValues.md: id: 0658e02a2f96 last_write_checksum: sha1:81e6496614295a6668ea74bb3d4875d71e5b72a7 pristine_git_object: b864eb53133a5217ae2ee4513dc9e615ab17dc45 docs/models/components/ThrottleStepResponseDtoType.md: id: 2ef217d5279d - last_write_checksum: sha1:488aff6acbbd25b17c6786c49ffd16bdc98e00aa - pristine_git_object: 6cd982601f506e8050e9ff0f11666a4d1bdd601d + last_write_checksum: sha1:2ebefb41cdb307fbca8f17d89e0aa24838e8d901 + pristine_git_object: 7b672d5123b60229e228c450faf02c54f0d49e91 docs/models/components/ThrottleStepResponseDtoUnit.md: id: 580309bafb14 - last_write_checksum: sha1:cb21d1566ae02c3d8ea841172abc4ecb1463794e - pristine_git_object: 4dbf78b70af199c76c72ffb569ca14872edf5200 + last_write_checksum: sha1:c59a10d91d6655f3da955258521e49cbc862f8ce + pristine_git_object: bd2cd84bfaafc72469a109faa134c086efd2e765 docs/models/components/ThrottleStepUpsertDto.md: id: fee46fdbb580 last_write_checksum: sha1:e3351a149a63dbe89d909cd2c32e2c05083b75cb @@ -1572,14 +1868,18 @@ trackedFiles: id: 74f29a87812e last_write_checksum: sha1:3472b44e9b7bacde7392ddeebb9a67604874b64d pristine_git_object: b0375c390ab842bd90c098919a1d530d8a14f2e4 + docs/models/components/TimeUnitEnum.md: + id: 8e5e5ae714fc + last_write_checksum: sha1:f29dc1d17dae0357f1e5e235c14280b76eca3716 + pristine_git_object: 69a34f5d77e9069e7f476418cb6860bb02cee4c5 docs/models/components/TimedConfig.md: id: 5cdb66af085b last_write_checksum: sha1:9a5acc98d47eb3db6058384659d4b5d2d362a322 pristine_git_object: 13c342d74bb88275746bb899695ebaa24798c945 docs/models/components/TimedConfigWeekDay.md: id: f06da1c00984 - last_write_checksum: sha1:95f6ef95e5bd27e13523abf8dd657732d7ef1528 - pristine_git_object: 48ddd5d3191d2a47beba4e69669370015e25e7c2 + last_write_checksum: sha1:a75090e9afb5e2ded24dd2eb9de543d4567e28e7 + pristine_git_object: 8f6e0db44a157e5924394e086ffc4cc0206a9ee6 docs/models/components/TlsOptions.md: id: 9466325be2bf last_write_checksum: sha1:58de045be513cad92100921b9a1cf15b163aa25d @@ -1622,16 +1922,16 @@ trackedFiles: pristine_git_object: 1e8c891302d3b98dfdf71ef101e1009339ac37c8 docs/models/components/TranslationGroupDtoResourceType.md: id: cc5e5e3dd977 - last_write_checksum: sha1:1f05cf9217330defb027961b20687c03283844a8 - pristine_git_object: c54b21d96854c369652815e798fb65fffbb60f9f + last_write_checksum: sha1:c3d4c1c0cbbb30ce0b848488db21fbda7e43e7fd + pristine_git_object: 6a5221e09156724bff7e7dc70360f550b6fde2eb docs/models/components/TranslationResponseDto.md: id: f3ee6465bc1d last_write_checksum: sha1:3bea0d37e85a0fa3c4cb11fea1fccc0e7f312a5e pristine_git_object: a2d0e55ba053fbb1ee64c95c9ca1368d08365a4a docs/models/components/TranslationResponseDtoResourceType.md: id: f4b3ad26ff0c - last_write_checksum: sha1:39acbc61fb5c872067443ad681abd84265e691fe - pristine_git_object: ce1a7f3593020d6e8e1e8fc6fa519ee06bdddcfa + last_write_checksum: sha1:01ef86f2caab892f27af7ced1a93e46f2782309a + pristine_git_object: a8803a411b6ee8c22fed452bfb449b3df78cfe4e docs/models/components/TriggerEventRequestDto.md: id: 420d06389b5c last_write_checksum: sha1:4ba62fb1224c648be92e12b9b4c456e594b86c14 @@ -1662,12 +1962,12 @@ trackedFiles: pristine_git_object: 6bd8db080961719292634a919fe1a12a0b96f4cb docs/models/components/TriggerEventResponseDto.md: id: 0fc50aca5d5c - last_write_checksum: sha1:1a47c671de24750c11b92adbd3aa7d721a3ce517 - pristine_git_object: 817e77f45490834a4b350dc8af3d2fe28682119b + last_write_checksum: sha1:d766ff183d8740eeee4d598f567d9c33ccb28cb7 + pristine_git_object: f8a910d0b2afd08ffd8036ca57fdd9637e20a920 docs/models/components/TriggerEventResponseDtoStatus.md: id: 954d4cda47aa - last_write_checksum: sha1:ea3cc8378067031038979edaa45e330af757a2e7 - pristine_git_object: 92140d7474c7f556607ab03c84fdd71fb6d99a55 + last_write_checksum: sha1:8ee06fdc5d26deee9e5758f526b85b512ddd1465 + pristine_git_object: 1654d4e5d6207fdd5f86f7f63a9bf02d7ae53dcc docs/models/components/TriggerEventToAllRequestDto.md: id: 55213e9ebcdb last_write_checksum: sha1:6b70925186f054d9775c0f39e5641fdbd8073a4d @@ -1698,24 +1998,48 @@ trackedFiles: pristine_git_object: 22fe8d899030ce59d3bde419fd27f41cb79517cb docs/models/components/TriggerRecipientsTypeEnum.md: id: 6c0336cd4505 - last_write_checksum: sha1:05c0ffa08524d27b6cb244a5f7ece2d01448a7c5 - pristine_git_object: 3e2f1d581ebcf54886a5fcc8a614c80c0a310c31 + last_write_checksum: sha1:4d02e700770bcd1fab3933cbd3baec6f55cd44e2 + pristine_git_object: d6273c0bf9bd0dabe94c6492870914fe50dc34a7 docs/models/components/Tuesday.md: id: b4205135393a last_write_checksum: sha1:19c5243921b56240da65f90fd0abcaa07945606d pristine_git_object: e9792bcce722fdf909cb73020682e541387bbdde + docs/models/components/TypeChat.md: + id: e5f19e79d405 + last_write_checksum: sha1:ef1c7ead58657ebd6fddde4c616b8cce08150dc0 + pristine_git_object: c22918e545a9cf1f6b6b207613cbe4db7c9c5108 + docs/models/components/TypeDelay.md: + id: 02f9c0f82266 + last_write_checksum: sha1:b738d61f8ed64c58b9b02fca38cdd746a7d13a2c + pristine_git_object: 5de88064b797cf4c3f1d56bced383b8d11f31257 + docs/models/components/TypeDigest.md: + id: 56d543f97509 + last_write_checksum: sha1:a264c7cdb88bd455bbdb546a6954f0d930e4f466 + pristine_git_object: ff24c71e182991b7b3b34741a585293e3d0a44d5 + docs/models/components/TypeInApp.md: + id: d52160e71431 + last_write_checksum: sha1:26c330004e8b020eb2fc165209ebabd5db48201a + pristine_git_object: b4fa016248b951bb05d6d6a2f0d6920c635262c7 + docs/models/components/TypePush.md: + id: 76894f571c5d + last_write_checksum: sha1:e0253367798dc0b0ed4d2b87b21559ac4187e19d + pristine_git_object: 42e33253297dd07047b29c8c92f848572c9bf209 + docs/models/components/TypeSms.md: + id: d6cac40d70f5 + last_write_checksum: sha1:bebe486f5b8238c79f629c1591cced6ffa090890 + pristine_git_object: 95ba1f46a06f991d87157f9915ba6a9cdd3e233b docs/models/components/UiComponentEnum.md: id: 525d059341fe - last_write_checksum: sha1:f34c05b8bf0f73b1c7f13876b87c106b253b51b8 - pristine_git_object: cb80dce55fbadfbcc7a0b8763ef6600e45e0830a + last_write_checksum: sha1:4aefb0eb805c21087dac8043c5b6b317c8fcbee4 + pristine_git_object: 572fcb11cdc699e42f3cc22daf3012a9f4de0add docs/models/components/UiSchema.md: id: 50f9094912b6 last_write_checksum: sha1:4562f9dc8f77081675ad5a4241eba526bb16fa5e pristine_git_object: 6a8aaa1ac4f832ee4787e8c37a5c156a857f4d9e docs/models/components/UiSchemaGroupEnum.md: id: 765b147132f6 - last_write_checksum: sha1:8d4b6466c60a81d98ad02e19227098d52ab94967 - pristine_git_object: 1106a519951aa3440e272edb3dbb58cb2ad7382b + last_write_checksum: sha1:f979785c4d44a268f537a2702882b8b9441839f7 + pristine_git_object: b560471219f6dac50260a4ea490f0711d54b2d60 docs/models/components/UiSchemaProperty.md: id: 464399d93758 last_write_checksum: sha1:3c7c43f388f55ff69d57027c9c9bcd22a47cd412 @@ -1724,6 +2048,14 @@ trackedFiles: id: ac248aaff356 last_write_checksum: sha1:cc776935a352b689f70e88aefe81454b59cdaca7 pristine_git_object: 9bb470fd23c0421ec72cba48507d512e7a252eba + docs/models/components/UpdateAllSubscriberNotificationsDto.md: + id: 21752d062d5c + last_write_checksum: sha1:521317970ab02d3843e6bdb0fc5a102544898c1c + pristine_git_object: a9781f3139a4f7bee6b853e815bd91264c4be929 + docs/models/components/UpdateAllSubscriberNotificationsDtoTags.md: + id: 2e4874fee5fe + last_write_checksum: sha1:3993b9b66f3d3b1e3a8f43f5e0127d06c92f3fee + pristine_git_object: 434fbf59d172f05c77e673fe97653bbd738fc81e docs/models/components/UpdateChannelConnectionRequestDto.md: id: 5111d02691e4 last_write_checksum: sha1:560100c503281c126a1140a4d7e4c2b0a50c5f51 @@ -1744,6 +2076,14 @@ trackedFiles: id: 1c5412454f73 last_write_checksum: sha1:6da0703b2d25291baf8e765ff121ff9d2003c761 pristine_git_object: 55d3c06cd2cb697ef204fd4a1fe3f64b6af3d7d0 + docs/models/components/UpdateEnvironmentVariableRequestDto.md: + id: bc54884bff85 + last_write_checksum: sha1:68abe12cae081636b750e5beb7b2900f0f1496d0 + pristine_git_object: 13dd329c0a3131cc680ae38fae8534b9e50875d6 + docs/models/components/UpdateEnvironmentVariableRequestDtoType.md: + id: 83cac14d4903 + last_write_checksum: sha1:021b97e5899637fb6923fd3304b3f84380dbbb14 + pristine_git_object: ccadb9acc97df9868ba7b844fc611990dfda4379 docs/models/components/UpdateIntegrationRequestDto.md: id: 5737f8641c13 last_write_checksum: sha1:7309e0dcaf4f17e4505580a23c01033def4a0aad @@ -1754,12 +2094,12 @@ trackedFiles: pristine_git_object: 2db02a155b7b37e19721d26eda564434bf476dbd docs/models/components/UpdateLayoutDto.md: id: 0611bac71276 - last_write_checksum: sha1:603d5abe139ef4cbcdcaa9f7b24ad97af46ee681 - pristine_git_object: b1064c1387487bc570dc3369dbb69862419453b9 + last_write_checksum: sha1:712dfe3581927e7c9ebb90df1b5ed0b83e1ecfcd + pristine_git_object: 0e7ea0a7bca004f1039ee69013b98efd473b9af2 docs/models/components/UpdateLayoutDtoControlValues.md: id: 485970b6cac5 - last_write_checksum: sha1:bf7101ecc8317f51196a4a2c408aee34f636ec0e - pristine_git_object: fe4507ceb7ae67682f9225bebe421cfc0d4b5683 + last_write_checksum: sha1:596e8d06b7490ead6cbd39306fca964740182598 + pristine_git_object: 884d9c3b960017f73b44a592c492a2442a03a252 docs/models/components/UpdateSubscriberChannelRequestDto.md: id: e8e2e13a630f last_write_checksum: sha1:c705561fd40f0a80a359cdbaeabe41718f93dc4f @@ -1814,8 +2154,8 @@ trackedFiles: pristine_git_object: 68dff42e8e7273f91dafa24f23486e7c23c37ce0 docs/models/components/ValueEnum.md: id: 37981f012798 - last_write_checksum: sha1:63506dbbc40be981c200f77341d25291c735fe89 - pristine_git_object: 4f50a66df2f6206ab7b807cff77f1bcbca078952 + last_write_checksum: sha1:8bc5af00452a3ff6e0f943c6cbfedca11b2f64cd + pristine_git_object: 8544099faefbbdd2fa622f7a4034920d8b9cf45c docs/models/components/WebhookEndpointDto.md: id: 6fd2c59c1e30 last_write_checksum: sha1:b982da75c45d926fa46d2e49b56d74b81cbb1141 @@ -1838,8 +2178,8 @@ trackedFiles: pristine_git_object: ebb874e49f496b0d693ab5cb4109ef30cdebf206 docs/models/components/WorkflowCreationSourceEnum.md: id: d1cd9a1c1e35 - last_write_checksum: sha1:38ee2da3df5db21b271326fbd543bc7a254f2463 - pristine_git_object: 4bbff52ad3e5b804b123361cc4862f24ee52a031 + last_write_checksum: sha1:d614f3773a2e670f4c427f8272daa2ec9056adf1 + pristine_git_object: d102e2df8060356e28ece71dee0bc61e2df409ad docs/models/components/WorkflowInfoDto.md: id: e9e55955d86e last_write_checksum: sha1:60ded6f9050c419533ed14394e27e06fcc633fa6 @@ -1906,8 +2246,8 @@ trackedFiles: pristine_git_object: 97cfb8370b14a0958e584316173fe58e51e8ca2d docs/models/components/WorkflowResponseDtoSortField.md: id: d262a4672a79 - last_write_checksum: sha1:0c9fde360c63830b4c007fc72fefa6cdda5cf258 - pristine_git_object: 322ef0dca8a3bb9b3f2b670fa025ea9991bcb7d4 + last_write_checksum: sha1:2a650bacc39cbcd19d14daea55279af817e5649e + pristine_git_object: 8809ee79fe995cb982435f9cb104702197d8b27b docs/models/components/WorkflowResponseDtoStep.md: id: 32d7f0244d2c last_write_checksum: sha1:606ca264d625e1545702b2647c28cbf87fca9368 @@ -1918,8 +2258,8 @@ trackedFiles: pristine_git_object: 81b197cfb23e60590ca8964fd030c9766f86a421 docs/models/components/WorkflowStatusEnum.md: id: 71823c3f4bad - last_write_checksum: sha1:6f977186118ff8f06d00e29c25600206c423f3ff - pristine_git_object: 9f790b32dd404067021025e4727444c4cb68eab6 + last_write_checksum: sha1:9cefc1a086d33b7ac0199c9ef00b8bcf276af572 + pristine_git_object: f6e39f2eeca63b3592feb8e92c8ee3437941fa5d docs/models/components/WorkspaceDto.md: id: 2e551173a9df last_write_checksum: sha1:0a863b468e02e73108493d5319da4f0329cfb8a9 @@ -1970,12 +2310,12 @@ trackedFiles: pristine_git_object: 9a545e63f57da30e20408ad2e8f64cad512b5450 docs/models/operations/ChannelConnectionsControllerListChannelConnectionsChannel.md: id: 3d2c6cdd77e6 - last_write_checksum: sha1:89959273152d747692b86b4ddfb43f35037d22c2 - pristine_git_object: 5cfae6ea31c36df07a48629b243c1e3e1119297b + last_write_checksum: sha1:ebbbddb2ee837571bd60d1328611da509e9098a0 + pristine_git_object: 7004e698c4cdfe61566425c3095fd5312e570526 docs/models/operations/ChannelConnectionsControllerListChannelConnectionsOrderDirection.md: id: 4222b55896d2 - last_write_checksum: sha1:8566db14e0047e8fd91fb5c191a410ed0bc10aab - pristine_git_object: 5d5ba4b747cf358c772daf44327c90c1dc204da2 + last_write_checksum: sha1:6654d742bec8f798dfcedf717b5ebfddcb315c17 + pristine_git_object: c7d4fe2fecc11c8229f265af3143b8a68699e9e1 docs/models/operations/ChannelConnectionsControllerListChannelConnectionsRequest.md: id: 6df5ceb7dd84 last_write_checksum: sha1:729f92715ed5fbaefd00fbe49358e5735cea0011 @@ -2022,12 +2362,12 @@ trackedFiles: pristine_git_object: 2199381231117ab444e208a709ab3d83ca966e2c docs/models/operations/ChannelEndpointsControllerListChannelEndpointsChannel.md: id: 3639245d16d0 - last_write_checksum: sha1:8bc4f9428c1ef6b3dc4a12a0f1003fd51baceaed - pristine_git_object: ed8e03713796a49a98be9ece90c6c6600f433b5b + last_write_checksum: sha1:b31f50a0525c544ae56c62960dea4e807e17bd95 + pristine_git_object: e77a38a86aba0cf56e0090f7f50ebbfab892b6eb docs/models/operations/ChannelEndpointsControllerListChannelEndpointsOrderDirection.md: id: aa42e6963632 - last_write_checksum: sha1:7297200f95c5f49f3fe9aeb72acc10f1e95deacb - pristine_git_object: 36ca608ca4052e88883e96ee1e8fe2ca49b940f2 + last_write_checksum: sha1:1fdac0972f0374666dc36ec48843a4916016a5da + pristine_git_object: 1dfcc292ad52282d011788feb64b6b9f29442248 docs/models/operations/ChannelEndpointsControllerListChannelEndpointsRequest.md: id: 778bda5d8ac9 last_write_checksum: sha1:f55ee3fb0f5526796ba68138aab71b2fa788a788 @@ -2070,8 +2410,8 @@ trackedFiles: pristine_git_object: e212ceb3696238d5ac13fd703f06ec40e00a634b docs/models/operations/ContextsControllerListContextsOrderDirection.md: id: 03956702b3f3 - last_write_checksum: sha1:3ebf3605b67c18f29b676dcef2aeb5d3ab91c28b - pristine_git_object: da2e510b5ac221b2b6c6de8ec05b95793efb93be + last_write_checksum: sha1:bfc412a6752ee393c45cca3a1bdce4678c3d7df7 + pristine_git_object: 29a98d9b37f2e8bc72535a7475c14a6ec2cdd3d4 docs/models/operations/ContextsControllerListContextsRequest.md: id: b544496933dc last_write_checksum: sha1:d493e1fcc2fd610a4872e89d1053703e34f8ac7d @@ -2090,8 +2430,64 @@ trackedFiles: pristine_git_object: 0785bff548b1e9c97ec84a10fa780fe746bc59b3 docs/models/operations/Criticality.md: id: 76910d17512a - last_write_checksum: sha1:9055898612f6467fcb231443235c302eeb96071d - pristine_git_object: d4bc23b3c29a414304721493c5e89bb885936e35 + last_write_checksum: sha1:b4d74ea6c0bd4a453bcc1fd5ac0f1cf171ba8d2f + pristine_git_object: b7a367b7952b1553a86d603f0ccd106bea5c7d54 + docs/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequest.md: + id: 843561ea0233 + last_write_checksum: sha1:5d861bca325afb6a5fbda7493dc3f83bc0fb7a15 + pristine_git_object: 54d372c065c02df4ff96cdfae909b5118dcf8042 + docs/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.md: + id: 9078269d9115 + last_write_checksum: sha1:4e85fff39ad974de1fbc0aa6796db30322136020 + pristine_git_object: 69dee01fffc32b51756d53cf7bec55f61b1c8ffe + docs/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.md: + id: d2669d7007b4 + last_write_checksum: sha1:5bd9392ab1d96bd557939136e88b2492c691559a + pristine_git_object: c784af6f7b84ce7fbaeebe857bb7306271f6152d + docs/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.md: + id: 7e13b87012b7 + last_write_checksum: sha1:f832343d1d70810dc72d20612910e429a8c14e44 + pristine_git_object: 4bfab7171a2b945508cbbb97a91e4ffe602e2ccd + docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequest.md: + id: b0d2efda2729 + last_write_checksum: sha1:0af15e30e53ef6b56989a2c97397ae26810b7fb1 + pristine_git_object: 710acfe4536ac9f5a2b9fef7dd9333cbf95a2a79 + docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableResponse.md: + id: 450e98e5b4c6 + last_write_checksum: sha1:95bf78d45aafe26d919e0a2bbf99295fd84582da + pristine_git_object: f2731cadb9ae3ad1335bcacda1cafb28be1da5a6 + docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.md: + id: 4970efc09a2a + last_write_checksum: sha1:4e3c6f986e2333aa75dcc358df061b786ab5af34 + pristine_git_object: d3c8833c9b0859d1474711c5cc420088568bf53c + docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.md: + id: 0a40778554da + last_write_checksum: sha1:e9be6e64c9731a53988c2894d8c8a6e349e69d39 + pristine_git_object: 87252feef020b820b72e39ab8804a9ebcfdde201 + docs/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequest.md: + id: 9181230bec50 + last_write_checksum: sha1:715b86cad751fc8da4f6f26f424d3c5c3780c8ee + pristine_git_object: 876740b79679b2d81dba5fb8983a42e1279b66b9 + docs/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesResponse.md: + id: fb9cbef1ab49 + last_write_checksum: sha1:43599b0e6a230e889c5b569b775c0e34069bcb03 + pristine_git_object: baf8f21ade1ec06d7e6b61a7fe27e75718145bed + docs/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.md: + id: 708a28df3580 + last_write_checksum: sha1:26457b3dc14659fe93107437702ed8230c364a83 + pristine_git_object: 14e4c9ea8290032eb708b7e9ca9174c29e5f5c31 + docs/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.md: + id: c4028c4178cb + last_write_checksum: sha1:0a5a60b12ec8c9eac62501c4a0ceafd8a78c5f93 + pristine_git_object: d870a3f0babfd3cb766b91803e91da9ced4438de + docs/models/operations/EnvironmentsControllerDiffEnvironmentRequest.md: + id: a494233f477b + last_write_checksum: sha1:e5d5fb3accf50a77f3946f1f7e1ce2aeaa80b0c4 + pristine_git_object: 9fdf9b4558fe10fe2d73e2e390e0de2aafce990f + docs/models/operations/EnvironmentsControllerDiffEnvironmentResponse.md: + id: 2055b3b4d452 + last_write_checksum: sha1:5a22a54a9d0ce2e354f503df2f9fd60830a744bc + pristine_git_object: 85739e6cd06a1a1a4ebffe065a744314231b0eb4 docs/models/operations/EnvironmentsControllerGetEnvironmentTagsRequest.md: id: fd6f946b3d69 last_write_checksum: sha1:0d0c958a915ed3363c97b1a733e29b77a45cdff7 @@ -2100,6 +2496,14 @@ trackedFiles: id: 15898e14bfd8 last_write_checksum: sha1:004776c2b3b967a95e470ac5fb9e882e30e962d6 pristine_git_object: 99f7008ea00c3986cdd81ee96788342ad4c97ec1 + docs/models/operations/EnvironmentsControllerPublishEnvironmentRequest.md: + id: 1585794f56b6 + last_write_checksum: sha1:6790ea07d6378a8ece56ca8af109b63c6ef9cf9f + pristine_git_object: 99b8c6a12413f72c6059e6df43c12c88029710b9 + docs/models/operations/EnvironmentsControllerPublishEnvironmentResponse.md: + id: 859bb51087a7 + last_write_checksum: sha1:c5712532baac12992c5e68adc88c508fdf39f8b5 + pristine_git_object: 8872788b1ee9c2ee55ce3ca02b343e6750747a16 docs/models/operations/EnvironmentsControllerV1CreateEnvironmentRequest.md: id: e918199f5efa last_write_checksum: sha1:f3c745889c2aa80b9badd6ba078f513ecd3b8e3f @@ -2310,8 +2714,8 @@ trackedFiles: pristine_git_object: 15f943cf5151c9f4c63a744e358ffe95594a6dcc docs/models/operations/MessagesControllerDeleteMessagesByTransactionIdChannel.md: id: cc975b6a4cbd - last_write_checksum: sha1:01d6f2601463a9feeef829d094318c3a82c9b46c - pristine_git_object: 00d9093432f38a0bfbca5323428a663988943b1f + last_write_checksum: sha1:f940e87bdcc3c24fa2cd2fd5db443a7a9e1ea3e6 + pristine_git_object: 4b7ddc2607208d52c830b5fae05fa50fb245c131 docs/models/operations/MessagesControllerDeleteMessagesByTransactionIdRequest.md: id: b11391ad28da last_write_checksum: sha1:4278c1d3c4731c51e37d088952fe47d0fe85f17c @@ -2344,14 +2748,54 @@ trackedFiles: id: 2a6052198c52 last_write_checksum: sha1:d928a2891a81e66bfb3a90f3a8a7d8dcaa211286 pristine_git_object: 5781dfd2c820b8f1e3273df5b17008bde867d899 + docs/models/operations/Severity.md: + id: 166f46696b15 + last_write_checksum: sha1:c8f8ad2b33f909e315cb4b8498f958683ed8f0d1 + pristine_git_object: f15f3b5b8bb719499911131a265dca53062ddc0d + docs/models/operations/SubscribersControllerArchiveAllNotificationsRequest.md: + id: d78236282549 + last_write_checksum: sha1:cc5563241506a5d42d50dd6eee26840b42a33001 + pristine_git_object: baadc0c9ecf9d153efffd4eca3b69f3b4b6b1a6f + docs/models/operations/SubscribersControllerArchiveAllNotificationsResponse.md: + id: 7b2a5676f94a + last_write_checksum: sha1:e6e069f9ca1642901938825cf60c41855f758cad + pristine_git_object: ee55cff3dca67ecd3b584fd9a2f04f48c1635f4f + docs/models/operations/SubscribersControllerArchiveAllReadNotificationsRequest.md: + id: 4e8a7feae47c + last_write_checksum: sha1:594e1f78aa9723227bee6c7795a687bb121c4729 + pristine_git_object: 19e96f007ee30cd6d08b23d13c8a997a2fc0a104 + docs/models/operations/SubscribersControllerArchiveAllReadNotificationsResponse.md: + id: 5ec0036379d5 + last_write_checksum: sha1:76cf5302366509474f5d559e5c005d3946ced0a5 + pristine_git_object: 7c2e52c3e611692a83ff2f2cac2a3a02e353659d + docs/models/operations/SubscribersControllerArchiveNotificationRequest.md: + id: a475df9dcafa + last_write_checksum: sha1:796cd39fe5e14066a193a0459e2551d79a84f49e + pristine_git_object: 47150729c3ad96b023c9c44ddf8e94933dec58cf + docs/models/operations/SubscribersControllerArchiveNotificationResponse.md: + id: 0f16289c003f + last_write_checksum: sha1:c8a1842bd5e6ed1f79542548301092b3247f83de + pristine_git_object: 1b916421f69343b54f2232c7b6ee95f6726a7bb7 docs/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.md: id: 71e4974cbc3a - last_write_checksum: sha1:f40e4dda4042a2eec1a412c0caf15ff7116a4588 - pristine_git_object: 7a6c92470d84e9341d6d44cb88100eb13c7b6964 + last_write_checksum: sha1:adc5a7e19955f63c9f61e8419f861b553a5ca742 + pristine_git_object: 85e4ed9e8e980926074e5f894e38e74539ed9dd5 docs/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesResponse.md: id: 601b4efec912 last_write_checksum: sha1:64ba2dd80d86c42cc7efe9e8773c28a71ab09604 pristine_git_object: c70049e5550db8b2e449432b922a46534d960b0a + docs/models/operations/SubscribersControllerCompleteNotificationActionActionType.md: + id: 42b0284139f3 + last_write_checksum: sha1:5107815e21488e7ee671293b2c4b52a3b3b40daf + pristine_git_object: 34db443168c8a8f8d110535c31e2cd61814740ce + docs/models/operations/SubscribersControllerCompleteNotificationActionRequest.md: + id: 86089afbfc44 + last_write_checksum: sha1:3729fdcf72e57943cc92d99551a97a0335391f54 + pristine_git_object: 595ba30e5ff4eb9050f7d2dc9fd09718d14dcf86 + docs/models/operations/SubscribersControllerCompleteNotificationActionResponse.md: + id: 3c632abc9176 + last_write_checksum: sha1:fad84f896be86d9f7510393c76af7d84450ffc1e + pristine_git_object: b29efa1667fc909b5f812106c75ee93c93f6dcae docs/models/operations/SubscribersControllerCreateSubscriberRequest.md: id: aa257ee09b76 last_write_checksum: sha1:92491b297498f0cdd8d12f5f96ff6295f12a3ca0 @@ -2360,26 +2804,58 @@ trackedFiles: id: 702618bac555 last_write_checksum: sha1:1890be2e0362d438094270707c777a728f2242ad pristine_git_object: 42d512b4339c89c4365b5e831005b10d1d56b1bb + docs/models/operations/SubscribersControllerDeleteAllNotificationsRequest.md: + id: c5474b6542c2 + last_write_checksum: sha1:6c5339d9a06388b9e6942f97fab94814908e15f2 + pristine_git_object: 47a578692572af9f06bb6e875fa47d9f67bd93c9 + docs/models/operations/SubscribersControllerDeleteAllNotificationsResponse.md: + id: cf63b2b0d269 + last_write_checksum: sha1:74ba4552cc1b3c4bd8a6bacc8ffe64ffb292d58f + pristine_git_object: 577866960074834802159a8b273fe170136d9504 + docs/models/operations/SubscribersControllerDeleteNotificationRequest.md: + id: 554e12f62edf + last_write_checksum: sha1:277be3532f853d4d143cfd121f79bc756401740e + pristine_git_object: 4e0da1053ae12aeff083a41f823cbeeef4a115a2 + docs/models/operations/SubscribersControllerDeleteNotificationResponse.md: + id: 4c375642e3e1 + last_write_checksum: sha1:15372d8036fa1b9f2b9f584a689cfa600404f395 + pristine_git_object: 5ad5fb03a0fd4774def52825ee3fbd1f7b1afd67 + docs/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequest.md: + id: 9c586269ed27 + last_write_checksum: sha1:25120fea16f87e960ecd5966d374c643aa97111c + pristine_git_object: 5b6853ca8ff0615b1712ad14b51508fd46296a9d + docs/models/operations/SubscribersControllerGetSubscriberNotificationsCountResponse.md: + id: 58f9616578cf + last_write_checksum: sha1:ecfbc3832e67261cddbd2458e69a83fab84f8876 + pristine_git_object: 8ffb90e329509f0d6e327d86980bc5fa804b66d7 + docs/models/operations/SubscribersControllerGetSubscriberNotificationsRequest.md: + id: 09c2657ea6d7 + last_write_checksum: sha1:26195a9892a800f5bf89a5a247ca23933eeff375 + pristine_git_object: 473b5e8f2fb7260e8696f3e0937743448c71a20e + docs/models/operations/SubscribersControllerGetSubscriberNotificationsResponse.md: + id: cb769ac44618 + last_write_checksum: sha1:fe3fb5dbac23ea0e6a44e9257f6b9fe709b369af + pristine_git_object: 643f1b9ec0a1f0e3fa621d7d8ac948bec996f3a6 docs/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.md: id: 3f804ef10989 - last_write_checksum: sha1:6a489bbc5e0688fea58524b471df1f252203fd5f - pristine_git_object: c5f4f5216cf242a58305e59424cf9c454afb2147 + last_write_checksum: sha1:38e5265ab965781ece4be80ca9bcd7665ad9d0d1 + pristine_git_object: 92c55d3adca215f8ecf0571fd7a5321557b21d03 docs/models/operations/SubscribersControllerGetSubscriberPreferencesResponse.md: id: a03e34e30c68 last_write_checksum: sha1:91b9d97c04cdb2342c1ef7d5f7120dda8dde3957 pristine_git_object: dc499a998fbadb92735096ae13e6a5216d930ef4 docs/models/operations/SubscribersControllerGetSubscriberRequest.md: id: d6aaf84a45b9 - last_write_checksum: sha1:192c0bb382ba6a13b30e7ff6990e04955c69ebe3 - pristine_git_object: e4a0489b42e0edff3f9f3e466bf42f437665568e + last_write_checksum: sha1:e84997f30cb5fc4ce6375cb9b14bf8e5fb16e200 + pristine_git_object: 2db24aa1bc8d21dbd0c8a9ed8b26485fd1a9f22e docs/models/operations/SubscribersControllerGetSubscriberResponse.md: id: 8af252b12735 last_write_checksum: sha1:9b4e3b374183f9e5c3bd44f4965f60a615dcdb38 pristine_git_object: f8f1e4ec3680aa1b5110c2ca0b258e8bdf2494da docs/models/operations/SubscribersControllerListSubscriberTopicsOrderDirection.md: id: 17e0d47332c0 - last_write_checksum: sha1:d79ea5402fa60c82909b68dda3b89ef6ee1c8796 - pristine_git_object: a580c024ef52d9ab57c4548d2371bb657ed73aa5 + last_write_checksum: sha1:ed0b0263f6c05f4e3d5df97ac098be436b53d236 + pristine_git_object: f1970b22f4ce512e664bafe143618a654562aa43 docs/models/operations/SubscribersControllerListSubscriberTopicsRequest.md: id: 820d489d0072 last_write_checksum: sha1:bd5e55144c7b98a8230df7c5c7e384c019d2c0ef @@ -2388,26 +2864,70 @@ trackedFiles: id: 460b68184ab8 last_write_checksum: sha1:8a99b5e24097b0beff3158a51c63908232346b56 pristine_git_object: 629d446cadc1dfad87ee0b30c240d6cbdc5d2659 + docs/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequest.md: + id: 0bb6048f2b03 + last_write_checksum: sha1:008addad96aac1115d9c98a06b663519f620feb3 + pristine_git_object: e0d1c698e31df274d6d25cf6cc358338e510946c + docs/models/operations/SubscribersControllerMarkAllNotificationsAsReadResponse.md: + id: 540cfd499c8f + last_write_checksum: sha1:958a3b48b69f7f015da12cb55053ea8b8940fdb7 + pristine_git_object: e16de2792a07a7dcb2994b9eebb812db62fefd3c + docs/models/operations/SubscribersControllerMarkNotificationAsReadRequest.md: + id: 506ff0009b4d + last_write_checksum: sha1:804e19e8af294458e58e11f02bf50d049156c44e + pristine_git_object: 0043da2f1d64a32dd95d1704141c0e273507845a + docs/models/operations/SubscribersControllerMarkNotificationAsReadResponse.md: + id: 01a938bcc072 + last_write_checksum: sha1:fed3655ba76cb5b945dc31c656b5327da8e92e31 + pristine_git_object: 588ee74ce1c9703b1a8b8599c4668e2568675952 + docs/models/operations/SubscribersControllerMarkNotificationAsUnreadRequest.md: + id: d080ea0b8c93 + last_write_checksum: sha1:59ef63aa49d31c1b78cc1103a1a13667d5e5696a + pristine_git_object: d73c002659c75c1d5b711f8f558421cd853e33f1 + docs/models/operations/SubscribersControllerMarkNotificationAsUnreadResponse.md: + id: a01eb98f70af + last_write_checksum: sha1:fd24a9d0b537fa7ff32dfc300b30b6ffe6fd7211 + pristine_git_object: d509b18364f1cddeb88abcf2f55c22eedc41c21e + docs/models/operations/SubscribersControllerMarkNotificationsAsSeenRequest.md: + id: bec378898138 + last_write_checksum: sha1:9ba43726193e8e511db6ebf0db6542f7a39bac9b + pristine_git_object: 20e48685fae5522d0bae7460ff46ca6fab545fa8 + docs/models/operations/SubscribersControllerMarkNotificationsAsSeenResponse.md: + id: a2f00dc7bbe1 + last_write_checksum: sha1:340a248b7c30fdd80bf245531d01755e693841e7 + pristine_git_object: 015051606737a3af8f842fc3c93008ee2d23ca94 docs/models/operations/SubscribersControllerPatchSubscriberRequest.md: id: 9201cbc7ef16 - last_write_checksum: sha1:e444931e7bf787de9274e52b129fe67246b92ad1 - pristine_git_object: 25c981ece349155db158b4a2d2189d2a9fc975da + last_write_checksum: sha1:1125eadbe64c4560f7b21344f748dc80d39b2cbf + pristine_git_object: f9ec72138260fa7147072db3347393103d8f81ed docs/models/operations/SubscribersControllerPatchSubscriberResponse.md: id: 88c7a3b15442 last_write_checksum: sha1:6228d39c866f2337f7aa60e68908c571e4a4f838 pristine_git_object: 6d0349ef4ad4d308b933bc08f68f7330ab76d617 docs/models/operations/SubscribersControllerRemoveSubscriberRequest.md: id: d9deb6b2c303 - last_write_checksum: sha1:16d8355fc2a81bfa6fbcca7a8de863d779664fc0 - pristine_git_object: 504d0c31095271941918f01f74a9360c2cfde6ff + last_write_checksum: sha1:b4d13b12fc286ef68a111963c44682e67dd1d4ca + pristine_git_object: c0d58630157786636dc28e14b13b639e8fb5f31d docs/models/operations/SubscribersControllerRemoveSubscriberResponse.md: id: 8adcbca7aeb9 last_write_checksum: sha1:15ae467a119d06d5e12b306f8acbfae9c0100825 pristine_git_object: 9b3d2caa024ab31f844247b3b91807f6c870a764 + docs/models/operations/SubscribersControllerRevertNotificationActionActionType.md: + id: ffb62683bdfd + last_write_checksum: sha1:f853b08dcb7feb20997f93b142fac3634ba4debb + pristine_git_object: e3e2d52b0e48ae353a4774a13f302ce5ee72458e + docs/models/operations/SubscribersControllerRevertNotificationActionRequest.md: + id: ad64a7db8dd6 + last_write_checksum: sha1:437c8fccaa12f38620f90cdab252201082a28cf2 + pristine_git_object: cade8b2779ea330a5250f0cac30fe688b418ddfb + docs/models/operations/SubscribersControllerRevertNotificationActionResponse.md: + id: adeb1fd17de6 + last_write_checksum: sha1:e48722cda339b4b5fd3a0dbd4e3073449f688442 + pristine_git_object: cb3eb8b6b3d5dba9f64f21a8f43a1a765230a56d docs/models/operations/SubscribersControllerSearchSubscribersOrderDirection.md: id: 6e203f3c4dda - last_write_checksum: sha1:409da48639bc91bc940d25f1b6ff81f4046433bb - pristine_git_object: 9ef024ba664825b41b789a6f87f409fa6befe299 + last_write_checksum: sha1:81ed9f2d204cf6854ce469ea93a9f9235ba3f19d + pristine_git_object: bb3fd8ebd5aae8378c39499c14a6a63e528c7a69 docs/models/operations/SubscribersControllerSearchSubscribersRequest.md: id: bc5f2b98bca5 last_write_checksum: sha1:f22496a32348e80c81a0d1e6ee79b3fa7759630d @@ -2416,10 +2936,34 @@ trackedFiles: id: 2e20494cb44d last_write_checksum: sha1:16735999f66fa05bb021fecf05bbb328c7e7f49e pristine_git_object: f2def3b815cfaed504e7f807c2b2152f5e7cb0cb + docs/models/operations/SubscribersControllerSnoozeNotificationRequest.md: + id: 715a047f350b + last_write_checksum: sha1:ffb73b58ccb0a3fa53460e16d7c109f9d31950ce + pristine_git_object: 67a5ace7bd9ba4d7ae47192ac3fa9f4288f45f86 + docs/models/operations/SubscribersControllerSnoozeNotificationResponse.md: + id: 6b7f8e64f01e + last_write_checksum: sha1:a0e4d031aebcf6a7a804c430dc4beb972411fe24 + pristine_git_object: 2d2d77de4f3277ccd575c64775dfca63acb8d37f + docs/models/operations/SubscribersControllerUnarchiveNotificationRequest.md: + id: 008c98157557 + last_write_checksum: sha1:02cbe41800d97e229f127ded3d1d7ff0d6971871 + pristine_git_object: d7a7bba8345fb46f5f965c758a6ac170a8784a03 + docs/models/operations/SubscribersControllerUnarchiveNotificationResponse.md: + id: "125855831670" + last_write_checksum: sha1:c88998993968e25939b6351cf89cc109b3334f2a + pristine_git_object: e5c8968c02ff771970dabeaddb2aa47105d1e218 + docs/models/operations/SubscribersControllerUnsnoozeNotificationRequest.md: + id: bb37a9ab3090 + last_write_checksum: sha1:dc79f8c077afc71b3fec793084d9b114c935898c + pristine_git_object: bc56669a1dd57f3f54e7eeee3414c2ce2fab84bd + docs/models/operations/SubscribersControllerUnsnoozeNotificationResponse.md: + id: f9e0bbfe33ac + last_write_checksum: sha1:8307010b0bd740115c858645ab525b40d5690bdc + pristine_git_object: b9d9651519bb12957d56694bc511678f31f5c799 docs/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.md: id: 817673b5214d - last_write_checksum: sha1:01aebf7e0342b7133c2e5b8eb67f0ce099278c53 - pristine_git_object: e8e5c08f5805914056c9c44ec00451013216cd8b + last_write_checksum: sha1:90073a9de90ccaa1880206122650c12dc20ba8aa + pristine_git_object: 36e463ce8deea99687168bc337efbd27e17d0b15 docs/models/operations/SubscribersControllerUpdateSubscriberPreferencesResponse.md: id: cc37298a7754 last_write_checksum: sha1:3b2a39de781d73b93cea58b354c8ff5936f2a734 @@ -2546,8 +3090,8 @@ trackedFiles: pristine_git_object: da03ba14622365ea08f6d31d068f5e0bb2ef7166 docs/models/operations/TopicsControllerListTopicSubscriptionsOrderDirection.md: id: 6efd87f6a657 - last_write_checksum: sha1:60b1d2ec5e932ca1db285879398514602bd51a9c - pristine_git_object: 429636acd2cd95dfc8c7977d6d266a343bd0a7ad + last_write_checksum: sha1:e6dfde2e8e9c9abba9f4e1b56c26f00bba4d2243 + pristine_git_object: c16dd6006309057ad42e179ba80a0c8c5756ded4 docs/models/operations/TopicsControllerListTopicSubscriptionsRequest.md: id: 851a279f9c66 last_write_checksum: sha1:9dd51b8d303e30bcc00c34477a2a5fdb7b545683 @@ -2558,8 +3102,8 @@ trackedFiles: pristine_git_object: 743f13f4c09a9acb1f77393a329fe091e95e013c docs/models/operations/TopicsControllerListTopicsOrderDirection.md: id: 42422dae824a - last_write_checksum: sha1:690ed4d89800b8138c09e40bcf2b1a2f70fa9714 - pristine_git_object: bd5d525133e3e62f2802bf1a58c9871d7f6968ec + last_write_checksum: sha1:ae57c2815a034b19f887e10347fbc4af29bd42d5 + pristine_git_object: 680354297d5fbf250ebabf614ca36966a72e7ca2 docs/models/operations/TopicsControllerListTopicsRequest.md: id: 022e9b1ba23c last_write_checksum: sha1:5b0f0920cc6815a0a97a0a8b8fe7519cd2c51efb @@ -2614,8 +3158,8 @@ trackedFiles: pristine_git_object: 1858f787fc9582c69f0f8427abb0f8bfe792493c docs/models/operations/TranslationControllerDeleteTranslationEndpointResourceType.md: id: d633f4761826 - last_write_checksum: sha1:7bbd043a06bdaaeb7a12ce85bc038bca737b95d1 - pristine_git_object: a89d7b2bece662e70ed64c0a398a044f6e760d57 + last_write_checksum: sha1:8b3d9b9526828bf6c81763cc80687d62ed32647f + pristine_git_object: f32d428e1bb824826ba70cdb80ac583076115edc docs/models/operations/TranslationControllerDeleteTranslationEndpointResponse.md: id: 6a999d501f94 last_write_checksum: sha1:7b8208839ec16b575de69ad39e55ea9dafc3f02e @@ -2626,8 +3170,8 @@ trackedFiles: pristine_git_object: bd9cbfe194c9fb659632c0dca3741ab3219b8fdf docs/models/operations/TranslationControllerDeleteTranslationGroupEndpointResourceType.md: id: 2620b942bd00 - last_write_checksum: sha1:7d7116370dfa48c80880e77fbf1a22c067b2ccc9 - pristine_git_object: 81d0e79a78b8936510d5077c1549f48759456765 + last_write_checksum: sha1:10e33cab09e7bf9860defbb071518f09926766e8 + pristine_git_object: 98ebe21f4c63be3e2c2bb171b424114bbcb544df docs/models/operations/TranslationControllerDeleteTranslationGroupEndpointResponse.md: id: 3d73cb29c538 last_write_checksum: sha1:a9ccf5f909d22172d0114e1227ea9b0cd4df0664 @@ -2646,8 +3190,8 @@ trackedFiles: pristine_git_object: 14a1af47e5522e0dfb59f2399b577982ef96c8e3 docs/models/operations/TranslationControllerGetSingleTranslationResourceType.md: id: 4eef20ce780e - last_write_checksum: sha1:6bfd3f3cbcd3228977e934aa8e72b91b6fd3e6c9 - pristine_git_object: 2601386f3df6f4f858f149900531a456d193cdc4 + last_write_checksum: sha1:f0e8a6f9d48ccd25262b8cb1b77886fab20a162f + pristine_git_object: b5715011d869368ca4422319e5f9f378bf797e82 docs/models/operations/TranslationControllerGetSingleTranslationResponse.md: id: 9aa2585ff9ce last_write_checksum: sha1:45ea272cc764305ac7c452e2a0e1e8b501a62c8a @@ -2658,8 +3202,8 @@ trackedFiles: pristine_git_object: b4d58aebad5ba34855fdab27b2bf178fe572bf73 docs/models/operations/TranslationControllerGetTranslationGroupEndpointResourceType.md: id: fd99ed533cfb - last_write_checksum: sha1:2bfc2822be2e2da512ea9754371b4f5714817c41 - pristine_git_object: 15d8bca78a0a3fa6c0b82dcff6c0174966d4b538 + last_write_checksum: sha1:6b0583ac3a6957482b289e6abf349bba760a6c32 + pristine_git_object: ea22aac9792b51c460513dc920a25c141b24c61a docs/models/operations/TranslationControllerGetTranslationGroupEndpointResponse.md: id: 9c2d6bff9d27 last_write_checksum: sha1:b158a6997b0c108ca7f19ed99848b26d9f6da221 @@ -2702,8 +3246,8 @@ trackedFiles: pristine_git_object: 690bba414bf77e0dc02bcdb4434b33a12e7af489 docs/models/operations/TranslationControllerUploadTranslationFilesResourceType.md: id: 80a24dee855a - last_write_checksum: sha1:d4aa2ed21face2218aa216967de6f7cb467d8064 - pristine_git_object: bf6ad52b9985715af09999004f7918f973444d13 + last_write_checksum: sha1:4517ea08faa00ee9ce3e58542a5e6f2b1d4f470a + pristine_git_object: 4ad783f806d92b9786da86a8ce5a6303da694b63 docs/models/operations/TranslationControllerUploadTranslationFilesResponse.md: id: 7f76c3a11e73 last_write_checksum: sha1:8a4da80bea38c826244122c9f1ce1c9ae6353bd1 @@ -2716,6 +3260,14 @@ trackedFiles: id: 7c882021ff7d last_write_checksum: sha1:37d6589b6fed335c289084a571ec0b8e31ead494 pristine_git_object: bcf4a6d09a38d6d6375d34d1ff2c6e0388a7ee36 + docs/models/operations/WorkflowControllerGeneratePreviewRequest.md: + id: fb87d39c5a38 + last_write_checksum: sha1:5f3fa188e91c99cba528c68900d90210e2a18c4b + pristine_git_object: 978a3d8066f1175a9b3cfb581964ba3fab23e2d5 + docs/models/operations/WorkflowControllerGeneratePreviewResponse.md: + id: ac0697b3b2d5 + last_write_checksum: sha1:2c9db22177cb4b5d93ebb75d76fdab5e1496250b + pristine_git_object: 83841e466235e1be566749fb220aa89dacc47730 docs/models/operations/WorkflowControllerGetWorkflowRequest.md: id: 4c5ea6a1b620 last_write_checksum: sha1:059fac7a079d767543e92cc0a792d6e868a7f5bc @@ -2774,116 +3326,124 @@ trackedFiles: pristine_git_object: 8766b1cecfc78b084b5349ec1582c4dda23c0561 docs/sdks/activity/README.md: id: f6e8241fca80 - last_write_checksum: sha1:9d61489a3ea880929320b0037b90907afc95ac99 - pristine_git_object: b376b3271bfedc9464afba44cf593b491f936630 + last_write_checksum: sha1:fb8f54f4cf526c41be0f97244a4ba9db306dd745 + pristine_git_object: 1d1718a8e5573c80ab18f7c52a5a05c98518587b docs/sdks/channelconnections/README.md: id: b38f46c2a1f7 - last_write_checksum: sha1:494af7d249283b35fc7017f8460e95940d8f7e4f - pristine_git_object: 589f1d941d6d3a4c6501c724ccb5f0a1115562bf + last_write_checksum: sha1:08ac442004c8a4271e36b68a9baf6b5dd1720c69 + pristine_git_object: aed9ad35a2d698c185c45c76030ba66920cf6c84 docs/sdks/channelendpoints/README.md: id: 597f23f5fd73 - last_write_checksum: sha1:cc7bff412006fec72e1bea5b4317022c728e834e - pristine_git_object: 2aa81990dd588e7de217e91156902bfff7359094 + last_write_checksum: sha1:9b8b62ecd992d41abbd3f04bee3c3db6613257a5 + pristine_git_object: ca08f2821f4df0b99485777c79a3fe1acead67b6 docs/sdks/contexts/README.md: id: d8fd381b7d65 - last_write_checksum: sha1:f694089a66ccc51a252e969b0e73096daaf88b82 - pristine_git_object: f3a7a9752a37a158c6c8ce6a27846a49c510501d + last_write_checksum: sha1:856abe88dbd5077e5d07837f5759566085520b45 + pristine_git_object: 4ac439360a66aa61959e22780719836f788b5cb6 docs/sdks/credentials/README.md: id: fb7e49751327 - last_write_checksum: sha1:d0b19d2052a3049771c19f6988cc34fdcf3fe443 - pristine_git_object: f6a7f1f97ae3be09c470b508fb60417ea50ff901 + last_write_checksum: sha1:5c2067205aafeba712e7f1857f9977ee0bf2831c + pristine_git_object: 5ac4241ce3afdf7d60578bb1791acc5797ab9178 docs/sdks/environments/README.md: id: d15fc95481b6 - last_write_checksum: sha1:298a7b2b5d34317af61bf8ef1c229543b6400e01 - pristine_git_object: 8e079dfd3d4ca36cea25191fd412674abeec43b9 + last_write_checksum: sha1:0eb4fe04a6f890f82e503eda0a1b4f1b35b1da7d + pristine_git_object: cd9b8b1b8f472dd2f25810ac5e47a94116b57a0e + docs/sdks/environmentvariables/README.md: + id: 2a863cad4ffa + last_write_checksum: sha1:9ebc91cd11d79611f39b37b4b2a122ee7f5c2600 + pristine_git_object: 6cacdb852c8dd948fb203f1bdc3349d82e463da1 docs/sdks/integrations/README.md: id: 7b29664808c0 - last_write_checksum: sha1:594698c8f8a78168c4dc13a174d68f774c695922 - pristine_git_object: 81f187b98c4b35c06f06d1a15bc56a4b7ab08741 + last_write_checksum: sha1:c3d7a4b790f11916d72c08cbbcdddceaee44b4f2 + pristine_git_object: 645e6b99b7e3465922404b99354e923c861facb0 docs/sdks/layouts/README.md: id: 9cae4f89dc39 - last_write_checksum: sha1:26dcca6c323da639183b429b39fddf338363f841 - pristine_git_object: e8542ca8f9ed6e4b1d3ecceefc623222d8251e33 + last_write_checksum: sha1:a36abf1f450b6f2d3e3eea19d6251aef288a5484 + pristine_git_object: 6bad2dc2a4667a921c3dc2a58bb551aec9daa0b1 docs/sdks/messages/README.md: id: 3f1f6d38fc33 - last_write_checksum: sha1:1d2376deda1dfef032e2375f8f4df3729008e537 - pristine_git_object: 6063db6ae1c6a4eb12eb744224dd8963bad46946 + last_write_checksum: sha1:ed213b5abafe0f4d73e458d3409ab8a4c2308ca0 + pristine_git_object: b2dab8a4d12cd3a21c1cf4bf3667c1bdea10bbed docs/sdks/notifications/README.md: id: 271bac956045 - last_write_checksum: sha1:3b93bfe3e06e74d61443f1bf6793a61ebd0786a0 - pristine_git_object: b72c1deed7860bfbcc61b3f995e234ae1a188337 + last_write_checksum: sha1:1845f7fbf89affa5c43405403c17886e1e9687ac + pristine_git_object: 0ff92249f4f5afe6190c2a8a948f90f3e1317e51 docs/sdks/novu/README.md: id: b25d764fd1ca - last_write_checksum: sha1:73560037a090de66bc04bf007f9060aade5b3f7e - pristine_git_object: 41292f9e08800c90904d949db834e4b48d88c2b4 + last_write_checksum: sha1:24922864514c42fd65c4930ba5990749f80e80b9 + pristine_git_object: 6ae66f6a02aa7366e3c737426228e530a8d030ba docs/sdks/preferences/README.md: id: 6a64506aa707 - last_write_checksum: sha1:d92fb05d7db4df5703596dfe6dd3e6c0683e6489 - pristine_git_object: de3241c2b848eb833355d249af2556d3ec927380 + last_write_checksum: sha1:2efffe75936d96e70e6074dbc79a041a41c15424 + pristine_git_object: d2909300459b957cec7295525133016a2971647e docs/sdks/steps/README.md: id: 39cb94746ff0 - last_write_checksum: sha1:efc72960ced67161f3666033ce8efae24bda9976 - pristine_git_object: 0484b0b1fd69ec344c0b06140dfe79c27e2dd92c + last_write_checksum: sha1:873427f81e623ec5e7a48bdd808ee0135b0c3ff2 + pristine_git_object: a641bf9243d13882e05b2d741422704266974d99 docs/sdks/subscribers/README.md: id: 14c599d74195 - last_write_checksum: sha1:30364b4fcbd0e1ff368a2571c4723a82cd2c84e6 - pristine_git_object: 5fa94aef5a8f1f2a174a773f83b17e29633ec204 + last_write_checksum: sha1:5ae1f587673293d975862c5af002583f5d96cdbc + pristine_git_object: a29ca102f6eb38a708f1a6ad84dd0376dc4d32f4 docs/sdks/subscribersmessages1/README.md: id: cad1e73a3892 - last_write_checksum: sha1:548ad86ebf2ad24d2a4043d6eff397bebed7c0d5 - pristine_git_object: 5e5e5313fee070ea7656508d826865687c530786 + last_write_checksum: sha1:d6e7568f1a5454023a9f53d672d42b15bb0549aa + pristine_git_object: 069b8d34c2693fa0e188199385c70c5bf32c6b6f docs/sdks/subscribersmessages2/README.md: id: 44404bd9eafc - last_write_checksum: sha1:684c4d5a20c6ef4355b8e1788452cd85d4e44f3d - pristine_git_object: b349f6f23792fca1b995cc6c5c0017bfba41e4df + last_write_checksum: sha1:6e38f61f96dd069fc121e69e3f98fac87dbb10f8 + pristine_git_object: 7493615d87252ffd1d4d231468c8cb1a87e41d62 docs/sdks/subscribersnotifications1/README.md: id: 47d2849a4d27 - last_write_checksum: sha1:5e46751b9c752bb6c13e3c50f7adc9de451bec2f - pristine_git_object: f743de8f91d4c64cf71e9955f7155c262445a0cb + last_write_checksum: sha1:dd9f9dcf1a03624ea85dbf9aff6454acf9778057 + pristine_git_object: 69ace30e31eb929de9c83eeb4d6c35aceb80d74b docs/sdks/subscribersnotifications2/README.md: id: a3a143202791 - last_write_checksum: sha1:7235032cf14d6c562a06f610f13809884488c320 - pristine_git_object: 23b7343cb963743a00d5be7ea4c0206360959517 + last_write_checksum: sha1:959202fa83684e5f8aa33bf469cc8c1c68ab47c3 + pristine_git_object: f531b9359b7ecd4ba113a54d0bf78af10d0ef080 docs/sdks/subscribersproperties/README.md: id: 304c640f892f - last_write_checksum: sha1:cbc95342ea5424fd27350877a132528558466010 - pristine_git_object: c535587de15cea4957711329b7b4040bb4942353 + last_write_checksum: sha1:fe743996f899529b164c82387781c692048fdd7b + pristine_git_object: a020a45a35383ee561bd6835354bf5b8877ed604 docs/sdks/subscriberstopics/README.md: id: 994c484835f2 - last_write_checksum: sha1:1c80d25de16301e1a66e16cb119f26623d279c19 - pristine_git_object: f7b0aaba9b9274ef2e9c7c24ca67ce9dd70f5dc9 + last_write_checksum: sha1:c83898dde9d651cf18fec0e160afdd660a5f1f4e + pristine_git_object: 20c15ac04743b14a24333d2eee761e238d90f745 docs/sdks/subscriptions/README.md: id: 298b9ab3c3e0 - last_write_checksum: sha1:dac018eb31bb42ea42b05a2ea3f2d00b4f67e3c6 - pristine_git_object: 7bacb7be9a9ffbc817b40eed95c66cd8400b63e3 + last_write_checksum: sha1:07a6fccc6bf61176be569bd04da890c7711cd494 + pristine_git_object: 67deea657380a1241a1e5844a64ed74b2b61be4b docs/sdks/tags/README.md: id: 971f8a95d807 - last_write_checksum: sha1:b3cc163f3f2eb3a60e74b73caba7eefe921feb68 - pristine_git_object: 81c64ed9be8cb62087245c91e3d34d62b655e7b6 + last_write_checksum: sha1:b86aba1ac2582c13388849264c48e7a6f6293d6b + pristine_git_object: 5d5a5f9625cf26890a617db1f16d2b87d8bc8e35 docs/sdks/topics/README.md: id: db4aff1adac3 - last_write_checksum: sha1:aca7d377345f7782e2fc5541dfebac90c6d99371 - pristine_git_object: e92ec42a55d176ffdef5aa3feadb66db912f10cb + last_write_checksum: sha1:b1648603feedc25656927992cc9ba014e2aa3b35 + pristine_git_object: 2641efeaeaf5162d51b804d244be485037feff68 docs/sdks/topicssubscribers/README.md: id: 7ae84d741547 - last_write_checksum: sha1:317d411c5be972b7ac712549a4f08736d7046da4 - pristine_git_object: 847d737d303d71393e05851b2ce1a34aafb0382a + last_write_checksum: sha1:3d408c43e53df6066dbd69f02d31cfdca36e020c + pristine_git_object: 144f1e266f7a2ebcc6a7d5207e9c9633342cfd96 docs/sdks/translations/README.md: id: 0452749a3d5d - last_write_checksum: sha1:02d9755a8186ce3cb839ac695f41eab8c639da6b - pristine_git_object: 34cdbe0e454627201cb4145bdeb16e544d675515 + last_write_checksum: sha1:6a1ef5df78ee39d914c05eefbb7b961f1756d792 + pristine_git_object: 1aca2b5dee55ff8714cc61c7212c22c9a8a150ae docs/sdks/workflows/README.md: id: 80c76ce944c0 - last_write_checksum: sha1:a37a93255eed61a36ffbc712c0d0c718fb4748b7 - pristine_git_object: 2f15f645cc70b0f202981c155db76c3b863ecc33 + last_write_checksum: sha1:b801b1366b0d20c5a5056f7b53ab9575e94f60af + pristine_git_object: 2d38124c39e7af8a5359d7aa6fba2bf4f6b82909 + docs/sdks/workflowssteps/README.md: + id: c2b394727ac0 + last_write_checksum: sha1:a594189550b5bed55d2a528bfb7eeffd5770ab0e + pristine_git_object: a8998cb100708c76c5a34fa8f38b1987c8196061 docs/utils/Blob.md: id: 3d9a7c4ad67a last_write_checksum: sha1:8b6733e4e21ccd89a889b38349c21d6ea3a035e4 pristine_git_object: ebaa3566af4ce4249639e5a2dd8bca0edd2979bf gradle.properties: id: 2afbb999f001 - last_write_checksum: sha1:cb99eda45e8e5961c2383fe8d0957768ee78b340 - pristine_git_object: 7b03c511da89c676d8960c38995b288d1658c161 + last_write_checksum: sha1:5c05176c015f5dc3ef3213925e671be0bcaa42a5 + pristine_git_object: 1894a86f21260000ee3166b302c4b0c4fa16b5e7 gradle/wrapper/gradle-wrapper.jar: id: ec27dae6e852 last_write_checksum: sha1:f725fb1467084142d74fd7cd8eab691ab3442611 @@ -2918,8 +3478,8 @@ trackedFiles: pristine_git_object: f34f2d19c30aa20e4a74b5ccf68befbeb3d5c382 spring/novu-java-spring-boot-autoconfigure/src/main/java/co/novu/NovuJavaAutoConfig.java: id: c93c006e52f0 - last_write_checksum: sha1:638be9aebb6c873e7cfcec40198513a87a16a91c - pristine_git_object: ced9ed7a776b9d70ef540f216f1385fdfc48e27a + last_write_checksum: sha1:a92addcce72bb0ae38c9a0563e43985a36d5e75b + pristine_git_object: 2b5615d12dba1e36bb2338b488a0437239a6f9bc spring/novu-java-spring-boot-autoconfigure/src/main/java/co/novu/NovuJavaAutoConfigProperties.java: id: 27a940a4055d last_write_checksum: sha1:c9aba66120ef4a720a0ddd2797948e475b53290a @@ -2938,20 +3498,20 @@ trackedFiles: pristine_git_object: a2a22dd4b5338095cd42665ed1236181fa9ce0ea src/main/java/co/novu/Activity.java: id: f21d05d4db93 - last_write_checksum: sha1:5f00c68e448c9fb0a66b1a33c658b628cb4d8b69 - pristine_git_object: 9321e1ea8be0344650c5f8a505ec4a77c5a17730 + last_write_checksum: sha1:3c6c810bec430b5fac0f15646ec7e6734879a912 + pristine_git_object: c97a62d95508043f443f26dc7c7a0bdd70c81bc7 src/main/java/co/novu/AsyncActivity.java: id: de975d8a5803 - last_write_checksum: sha1:e889ce3e8d991d9dbbc8b796b6714bf57260c492 - pristine_git_object: 70da879d92ab2925ddc3bcb666a8cfc2b20c2637 + last_write_checksum: sha1:f9c19fb77df303b3b29b2bbdce6e8624d2a6d807 + pristine_git_object: da699f03686c92290e8d973ea85ebf37354a18bf src/main/java/co/novu/AsyncChannelConnections.java: id: 1f7c707ba1ec last_write_checksum: sha1:9dd5e1739683d2aa599cd8edfacd32ed0b821740 pristine_git_object: 621edcacefdb1469c7351f93ae5b15f446fbb5e3 src/main/java/co/novu/AsyncChannelEndpoints.java: id: 87554bfcfb5e - last_write_checksum: sha1:dda2edd6d8086f4da8e4ec7c8f534e871c086879 - pristine_git_object: 9832cd9d455c6dbdd25c6b077f21fd148d3449f2 + last_write_checksum: sha1:5875bfba38cef7713931ffdde2e6e6ab91d76bee + pristine_git_object: 063573b3620d73da2d83551c8958e09a52013622 src/main/java/co/novu/AsyncContexts.java: id: a331e21244fa last_write_checksum: sha1:17899ffd9980e740b32477976c9b772ea3377e16 @@ -2960,10 +3520,14 @@ trackedFiles: id: bb8724d21324 last_write_checksum: sha1:72e98d064d80a7694932bcf8422333de158fb619 pristine_git_object: 5d4c94a633cbe1f0e967ac0658941262253ce85d + src/main/java/co/novu/AsyncEnvironmentVariables.java: + id: 75902ca892f8 + last_write_checksum: sha1:89b0dbbe675f06cc609baec077bd92ffdb097f9d + pristine_git_object: 73aff9857828309248ae51e948780ab580225620 src/main/java/co/novu/AsyncEnvironments.java: id: 6c4f3a70d38d - last_write_checksum: sha1:5f02cd06987f958bb77ce3280a12850bcf369db6 - pristine_git_object: db1f1f0ff47ddf7d23e74a9508544810ceddaa70 + last_write_checksum: sha1:9f086ea08519b61bfe85af3cfb39db40c1345c14 + pristine_git_object: f3afdef6bca6885dd2567d8d92dfb3119cf328b7 src/main/java/co/novu/AsyncIntegrations.java: id: a6ef8277c4d3 last_write_checksum: sha1:fc042ebfad310ae4ecb0162bc5a06ce88898efe4 @@ -2982,20 +3546,20 @@ trackedFiles: pristine_git_object: 02a797be7d3b1f0b76e3c581b488b470ffa71a68 src/main/java/co/novu/AsyncNovu.java: id: caee93e13378 - last_write_checksum: sha1:166cfcb64b3dee1018c204ce0440e2f25e95c076 - pristine_git_object: b65137ef91a2bd61fabc2e73f4a672f19d2c98c0 + last_write_checksum: sha1:a7118d4fb708f51fbc9de73b81a34984f945a92b + pristine_git_object: 15e36b8f7fccd62da1a0a871909c9f76e3fcf158 src/main/java/co/novu/AsyncPreferences.java: id: 432ad88a9ebe - last_write_checksum: sha1:77dbba30a699d2ba4aecc59f875a0bb6ef846a41 - pristine_git_object: aa257af31cf0fb0e67bc781ce28b52699c911627 + last_write_checksum: sha1:57f0e79c5cc55fe94a81ed6bd5796a8268d81074 + pristine_git_object: d5aeb209ff1f4c2012f4fd18162bff1c3e780900 src/main/java/co/novu/AsyncSteps.java: id: 074ae7f2b60b last_write_checksum: sha1:3178cca4791961827f304321c1f1cb0bba7901a3 pristine_git_object: ba88046730f671db9e5e893ca5abe1e9a6c4d4e1 src/main/java/co/novu/AsyncSubscribers.java: id: 09ff40d6a4a5 - last_write_checksum: sha1:c6d192f8ff9fa3ffdbf70ab06e5ba8df1920f876 - pristine_git_object: 1084cd5a20c0326c086dee88de16714cc7e761b3 + last_write_checksum: sha1:25e93b834cd8f8dfafb502f0629e6b185f08a7e0 + pristine_git_object: 06c3c1bfc6aa26c07d0fba3b7cf96274e56bebd8 src/main/java/co/novu/AsyncSubscribersMessages1.java: id: 9eaf02044a98 last_write_checksum: sha1:a81f93988e72e6988e8985773aecce3011e2ae11 @@ -3006,12 +3570,12 @@ trackedFiles: pristine_git_object: 1dfe4e9c284dbd999aa4219a86be7b0e91138c5e src/main/java/co/novu/AsyncSubscribersNotifications1.java: id: 4c7c126324f7 - last_write_checksum: sha1:38e3721920fb02f80711f3c0000b258e892401cb - pristine_git_object: d86b2b39c46083e6c68b534c24f70870d57a6b91 + last_write_checksum: sha1:5089979e61cbb3603039aaba4271242e8ee9ad6a + pristine_git_object: d017ff360e4415f31230a75d72e2b930090c7e00 src/main/java/co/novu/AsyncSubscribersNotifications2.java: id: 5c9659a22891 - last_write_checksum: sha1:7c097232a4844c0a6ef50a6ceee7780c394744d0 - pristine_git_object: dcadf90d2711d0283713fcf8d90d5adeee187e75 + last_write_checksum: sha1:b34667ffb427920b251e3af3c12ebbf3df698ee4 + pristine_git_object: 8b53ad1ed18a7fe93f9ad4efa960f1f71fabf3ca src/main/java/co/novu/AsyncSubscribersProperties.java: id: 6c51acb34d0b last_write_checksum: sha1:59020a2bfd21a1b83c8829ffea92590ea2846e2e @@ -3038,20 +3602,24 @@ trackedFiles: pristine_git_object: 4a4f1a52df9df2e391308315e6359172c80a87e6 src/main/java/co/novu/AsyncTranslations.java: id: 2177400b230b - last_write_checksum: sha1:b717b67f9fe7516fb4c9f74ce1dcc53f684a9467 - pristine_git_object: 5887350daa556e6e7d4d18546f4c459ca462fc90 + last_write_checksum: sha1:01738aa07dd2332022a58f77d34ffbbc71a01876 + pristine_git_object: 6100cc86ed7501204c3c6da417c2113ac877c375 src/main/java/co/novu/AsyncWorkflows.java: id: 3b574ed44a00 last_write_checksum: sha1:bd6e59e6c74d183468a3ffe5ee69fbd9299dcc67 pristine_git_object: 2f2e947c77ef5742fbd26b88ef3e6502b2d96f2c + src/main/java/co/novu/AsyncWorkflowsSteps.java: + id: bffb47aca891 + last_write_checksum: sha1:bf8a886e6daefb3e7bbc428e646ba18837948541 + pristine_git_object: 8aa1102bb139b3348b60787d7be60da25a64b4c3 src/main/java/co/novu/ChannelConnections.java: id: 9ab5cf58ad50 last_write_checksum: sha1:4c36ae9acfbf045c670a966556c4037614ab91eb pristine_git_object: 8a06c0746d82aa0b2bdda454d830757a8275e757 src/main/java/co/novu/ChannelEndpoints.java: id: 660913664f5e - last_write_checksum: sha1:436314748cc5806827f57ff7cee1f9e28cff19e5 - pristine_git_object: 27084444fe76a2911a7c3f582f293b2953140b19 + last_write_checksum: sha1:f5e1c2cf76072ccb233e01741ad7ba4944c096f2 + pristine_git_object: 151e30387ba8afa22af680b6f732735ff320edea src/main/java/co/novu/Contexts.java: id: a79acfec9101 last_write_checksum: sha1:840255f1b0794cf1ca2386efa2530da73ca6b1e5 @@ -3060,10 +3628,14 @@ trackedFiles: id: 63318e16ee5e last_write_checksum: sha1:aec3c76d027dbed7a24385cdb49cf9ded9a592fd pristine_git_object: ed8120e485fc384241bc350839332872879acacc + src/main/java/co/novu/EnvironmentVariables.java: + id: 7e3311f04d9e + last_write_checksum: sha1:a9946b9acdf93f9dac54a4dbbb77a3cc3c9ce173 + pristine_git_object: 934ba1ee0b9b8265f8726b168447663984cdf10d src/main/java/co/novu/Environments.java: id: e12ffafc6d74 - last_write_checksum: sha1:4e50f9e014832512f06b73badee6ab761f0f0f72 - pristine_git_object: 6ee468d5f01a1d5392b1f3790828f6f83077cc76 + last_write_checksum: sha1:c66dc6062b4285387351cfa8f7c6bee2ed92db24 + pristine_git_object: af39c7045adf37600225de8f7abe074a4916b8dc src/main/java/co/novu/Integrations.java: id: b7633f63704d last_write_checksum: sha1:29d720ae14cda634c4083de6c7a11b4860421763 @@ -3082,16 +3654,16 @@ trackedFiles: pristine_git_object: 7a5536e807a4bb48b23aac23d0983127a27c6459 src/main/java/co/novu/Novu.java: id: 11b62371bd26 - last_write_checksum: sha1:13327ed105b14c69399fcfd651c3c3d166d14a00 - pristine_git_object: 8c8f8691513a1f930e0e2f528d56383d517af173 + last_write_checksum: sha1:a02f10c64af33b63741d22f4b1e5be6e77599ff2 + pristine_git_object: 346146f4accb4f450965ede8f855ab671c6e0de9 src/main/java/co/novu/Preferences.java: id: 40bb45282f6a - last_write_checksum: sha1:b30819a1fdac34cceab61c91c1eb46dd8be83c23 - pristine_git_object: 1b5f7ce4b77efc9d29be373d45eca57c867ad675 + last_write_checksum: sha1:0a43c6c3a2cacc874e1ab6cc0ac7ed1fc6d14f55 + pristine_git_object: de99c6f659cf2f809e2c08ae469dad9d1a8d119e src/main/java/co/novu/SDKConfiguration.java: id: c8d0f1a7e696 - last_write_checksum: sha1:638ef83d2eb6edf3d250cb87ef9fd8c6e5597fa5 - pristine_git_object: 992ece489fd54746c9cc80b7a48dc51d740e2cba + last_write_checksum: sha1:e59596dd98bf1e61f31c020e5d7d3da22d2483dc + pristine_git_object: 8e65b8714a5c72c50345f5418627eb3b09cc2030 src/main/java/co/novu/SecuritySource.java: id: 8b19fc2daaf0 last_write_checksum: sha1:b876d0191046515ce80a9ea832f7c9b06bcfaa40 @@ -3102,8 +3674,8 @@ trackedFiles: pristine_git_object: 1d176108e99a3fcf79219f253fe1aaa26b90e936 src/main/java/co/novu/Subscribers.java: id: 5a5ebfabb771 - last_write_checksum: sha1:3836e7146ac4efeb2877ef869f52ec69734b0cee - pristine_git_object: abdbca9ddbc13effd31e6e886cd4a8eac7682527 + last_write_checksum: sha1:9b120610ff767429a2b8a30e2f4528542ff87559 + pristine_git_object: 6722b11f9055702b2f0634453e3e0d498e9bfe97 src/main/java/co/novu/SubscribersMessages1.java: id: e176ec83c434 last_write_checksum: sha1:30a570df99be6490650e121cfa7f5b964ea90dd9 @@ -3114,12 +3686,12 @@ trackedFiles: pristine_git_object: 646ae3f5028bd19e7db56d398caeb1078e83658c src/main/java/co/novu/SubscribersNotifications1.java: id: c127d78b24e5 - last_write_checksum: sha1:460517ed48cbd08660b514be0231dce248564404 - pristine_git_object: 69501ce4b95cf73e5707ce184db8bdce98769587 + last_write_checksum: sha1:350e94a75081f7947a938b1fe0825331e2c69fc3 + pristine_git_object: 82c5c96965d7a3886bf6463222e432572398dff9 src/main/java/co/novu/SubscribersNotifications2.java: id: 12b7e2dfcae3 - last_write_checksum: sha1:0bbf725b180cf18d93217ed2fb57e61633bf802b - pristine_git_object: 017b68c0b425412ce06ac878cfcc81853cb11402 + last_write_checksum: sha1:dbbc01c68bbac761337be16b5179f7b786f4ccf6 + pristine_git_object: 013ca882a90c235821543ffa24f177d2800d34d1 src/main/java/co/novu/SubscribersProperties.java: id: 590a942d9a52 last_write_checksum: sha1:51a2939a0ba8f93c820abc07a86d01b3c55ee1b6 @@ -3146,12 +3718,16 @@ trackedFiles: pristine_git_object: 4c4d5fcfa9670ed54925cc52df58bab730ec8cba src/main/java/co/novu/Translations.java: id: c338d4f98598 - last_write_checksum: sha1:e20126bc5b64e54fca75dda7e79ad3f8e33dc36b - pristine_git_object: b3360209fbb3bcb4c3ec5a5b98485130878efdf6 + last_write_checksum: sha1:2bb7a317e3460e0f5cef355e32f96909c0a2993f + pristine_git_object: 387c4d94eb1f171a0d669cadaff2468ae0c7d4e8 src/main/java/co/novu/Workflows.java: id: d4015788d243 last_write_checksum: sha1:2777e2ac8ad3184866917161e6b4e9725d7c10c1 pristine_git_object: 530f1fe347915be263a79663af39fad2af780912 + src/main/java/co/novu/WorkflowsSteps.java: + id: cc3410a06ca1 + last_write_checksum: sha1:0045cc761630e64a3f22c847beb2f74a995d4f7b + pristine_git_object: a0c7f3874a49df121198cd6a9fc515f6013db678 src/main/java/co/novu/models/components/ActionDto.java: id: 15e730f55e09 last_write_checksum: sha1:1179b06aa8e0c0be9e15e60e41bbcd41439fbb9f @@ -3174,8 +3750,8 @@ trackedFiles: pristine_git_object: c6b9b01067afec2226fc33ac9b2af5951b1b3e31 src/main/java/co/novu/models/components/ActivityNotificationJobResponseDtoType.java: id: cbb2224d4e7e - last_write_checksum: sha1:5a34e566630c6f9e911e0e7c5e6a6faa57ce7db3 - pristine_git_object: eb6d8d54e0cc49156793b6e7a508e5ec672366f3 + last_write_checksum: sha1:6f22d8294fb128c278ef8f36a3ab0d0c6f299954 + pristine_git_object: e7396b39cd158f05bcd4a97a21de0150c9374ae0 src/main/java/co/novu/models/components/ActivityNotificationResponseDto.java: id: be3468e68d01 last_write_checksum: sha1:0bc403794f5e79347ff88aa3ea3d1f21da2abdf7 @@ -3304,10 +3880,14 @@ trackedFiles: id: d6c1e4ab0ee1 last_write_checksum: sha1:71c57be2cf75998a78418f680bddb0fd2bc83393 pristine_git_object: 0ddba19084e9b20c026c7f3a33865fb801489857 + src/main/java/co/novu/models/components/ChatRenderOutput.java: + id: 54a2c937f753 + last_write_checksum: sha1:b52910b99e8f94d351851c9b6265e01794200a32 + pristine_git_object: 24a9745b5789fb3a7e42b56747aa0b3d3a91b51d src/main/java/co/novu/models/components/ChatStepResponseDto.java: id: e68354f6d282 - last_write_checksum: sha1:03450d16c666b09e597c4f8ad15b53d0ab2cb230 - pristine_git_object: 7dad35d27132090d253c4dcf9ba4bf09dd0df23a + last_write_checksum: sha1:92f48599511e2ad433bfa5651b881e4deaaeeb79 + pristine_git_object: bc41099fdab9a9e06816e2ed28aaabb227bda562 src/main/java/co/novu/models/components/ChatStepResponseDtoControlValues.java: id: ab69cfd58da1 last_write_checksum: sha1:c9c7846a1d4d81ec52c3f82393ee58f9147eb2b6 @@ -3350,8 +3930,8 @@ trackedFiles: pristine_git_object: 13ddec2870069a98b5f631046fae6c9097249be5 src/main/java/co/novu/models/components/ContentIssueEnum.java: id: 51a1868e7c03 - last_write_checksum: sha1:d1067195f9deddd9e8cd55282812feba2e6e1924 - pristine_git_object: 634d583cd10f02232f0bedf33b2f5b7caaf0f4f8 + last_write_checksum: sha1:23768a3cedab4021d37856746dfaccef8350856a + pristine_git_object: e6645997fc42afd39372a494cab3f833199cd639 src/main/java/co/novu/models/components/ControlVariables.java: id: 83e2ef28ae2a last_write_checksum: sha1:ca688b26833bcaff2a32c764bd3f4baa80f2e878 @@ -3380,6 +3960,14 @@ trackedFiles: id: 18c624dd379f last_write_checksum: sha1:942f7f9db33a9b2b741dbeee9ca9fa881911473e pristine_git_object: 6beac19ccbdca46b94c713906fd47780dc13ec00 + src/main/java/co/novu/models/components/CreateEnvironmentVariableRequestDto.java: + id: 10c2b3b666cf + last_write_checksum: sha1:79948406001ce1d1f4012f54da113090621207f5 + pristine_git_object: 2fc116d436c74b3f3e315b05e8fda15149a94ff3 + src/main/java/co/novu/models/components/CreateEnvironmentVariableRequestDtoType.java: + id: f94f2e9e21a6 + last_write_checksum: sha1:60626bfb86065689ce3bcf08e96432cc1d8afdc8 + pristine_git_object: c78544f8a26f64a5f041d8b66737c53ecf570c91 src/main/java/co/novu/models/components/CreateIntegrationRequestDto.java: id: 5ee496a5d2ee last_write_checksum: sha1:f7b0bd768bd74bce80b9ae50090a81b495766372 @@ -3542,8 +4130,8 @@ trackedFiles: pristine_git_object: 6c98d881c63b0dc5a1fca3416d5eea890c77ab1b src/main/java/co/novu/models/components/CreateWorkflowDtoStepTypeIdResolver.java: id: a6b69e05fef1 - last_write_checksum: sha1:e51dd12563c77c85ff673516422cfc165c20a5c8 - pristine_git_object: 074b6fb38327037cac91ba42c8afe0e56bf9ca79 + last_write_checksum: sha1:400b7097cff691e1572c500d4fa07aa3f450dccb + pristine_git_object: d9df8b27debcac1446c0c35b7f932ec42b8a538b src/main/java/co/novu/models/components/CreatedSubscriberDto.java: id: dbb5433130c3 last_write_checksum: sha1:7a7cf50ea99ccb496e1f15b00464cb887bcda104 @@ -3562,8 +4150,8 @@ trackedFiles: pristine_git_object: 10a352299004248f020995ddd1f20015c2751e9f src/main/java/co/novu/models/components/CustomStepResponseDto.java: id: 704b0eb35466 - last_write_checksum: sha1:1c08117d070b698287bd46ee05d8b48e6a9cc421 - pristine_git_object: 8223618c2986ed73225a49a2bf75ff99e96701e0 + last_write_checksum: sha1:d7b4667e2b9a7705e6e5da48d5a6e1d6bc2294ac + pristine_git_object: 410c26a25085d4643e77754db4690edbfb811396 src/main/java/co/novu/models/components/CustomStepResponseDtoControlValues.java: id: 56f44360f002 last_write_checksum: sha1:3f819f91e0be23d802bae56b091f4ac8731a6a7d @@ -3614,8 +4202,8 @@ trackedFiles: pristine_git_object: 077290e78644126a4f068db3782d473486fea5ef src/main/java/co/novu/models/components/DelayStepResponseDto.java: id: a99771b3fde5 - last_write_checksum: sha1:1ab7df7a4689e584f195484cc5317fa28a076e28 - pristine_git_object: ff75e120aa14b220fd77a2a9ea20a0dc57652ca7 + last_write_checksum: sha1:7731bf91b0dc006db3fc0c5a680c4518fc6d992c + pristine_git_object: 8581e27b9720f6427eab3869bf96cad4dda6442f src/main/java/co/novu/models/components/DelayStepResponseDtoControlValues.java: id: ea20e60172a3 last_write_checksum: sha1:b1b4280f990873a8a6c4978b7bd20805e87ba5c5 @@ -3664,6 +4252,30 @@ trackedFiles: id: db522c3b746d last_write_checksum: sha1:34313bdf54c17e6dac2174971c64f397303511cd pristine_git_object: 9c3bcb5264fb54dde4a64da90b06dfd70841dae8 + src/main/java/co/novu/models/components/DependencyReasonEnum.java: + id: daa619683d96 + last_write_checksum: sha1:8f109bc04800969b761d8fb9d95928ece61b9141 + pristine_git_object: c55cbb2134e5fe5fbf0aafbaca8798c43ddddff4 + src/main/java/co/novu/models/components/DiffActionEnum.java: + id: 39c83475276a + last_write_checksum: sha1:438787061c701efbf9eabfdf232d147a82ce4cbb + pristine_git_object: a6a5ab00937ebe1fcf297cd69c39ac9dad0723a3 + src/main/java/co/novu/models/components/DiffEnvironmentRequestDto.java: + id: 8b0fec5633f8 + last_write_checksum: sha1:eb69e73685237ea832de508b8d98ba14eee74e78 + pristine_git_object: e3b1303059e9d1c72fe9344ec26f26fef80794b6 + src/main/java/co/novu/models/components/DiffEnvironmentResponseDto.java: + id: 66df4e45f521 + last_write_checksum: sha1:dbf89f9cdef3901f8da89bf3621d5013558c15d6 + pristine_git_object: 584590fbbf66e0b321c52dc82dba211ce26800d2 + src/main/java/co/novu/models/components/DiffSummaryDto.java: + id: 4715d055a061 + last_write_checksum: sha1:2fafed80529304f6fc6a13b37c7ad2b045470f21 + pristine_git_object: caf12ed3447eba9c4df364c905a3766dfe1e2dbd + src/main/java/co/novu/models/components/Diffs.java: + id: c1e7ec1cb6b0 + last_write_checksum: sha1:694d76988bc97cc55e71a7d702be52d6539ff945 + pristine_git_object: 2bf096cc6daeb359783a33acdbd81cc30d6e075c src/main/java/co/novu/models/components/DigestControlDto.java: id: b414ff324cde last_write_checksum: sha1:184c26d44ca0c99c58ec60bace4e2672c3cdcc6a @@ -3700,10 +4312,14 @@ trackedFiles: id: 90450806516f last_write_checksum: sha1:3dd7168ccf153f63b958eec27db743e161bd84ca pristine_git_object: dd14049bb708cd00e32647da35416aef0d1d5c24 + src/main/java/co/novu/models/components/DigestRegularOutput.java: + id: bdb4f44326c4 + last_write_checksum: sha1:d3fc4d68413953855467dbc2a2cfc7a772de602c + pristine_git_object: 923d669593962d96398a44b4ac00c89b27868e65 src/main/java/co/novu/models/components/DigestStepResponseDto.java: id: c65dada0c658 - last_write_checksum: sha1:d61ac7fbe0bf5c729bf7d91b772ccf1896c82007 - pristine_git_object: 69c402db3be256285a0d7b975a71c5ac60f57dd2 + last_write_checksum: sha1:16f928c31c6d8ea10cabdcf28d397809ce645a78 + pristine_git_object: bab562a074d45af7f1129665e74d86e467fda8bb src/main/java/co/novu/models/components/DigestStepResponseDtoControlValues.java: id: 18d904f6f397 last_write_checksum: sha1:4a7a6b7b9ae43ba81d56ca6f9805f8fc4a41f401 @@ -3778,16 +4394,12 @@ trackedFiles: pristine_git_object: b9b2865726665fb60d12d4c5d2e2aedad2252b69 src/main/java/co/novu/models/components/EmailControlDto.java: id: 792284aa1628 - last_write_checksum: sha1:a3600a308ef13b1302654b978c99d32753b0afb1 - pristine_git_object: cf1876b1322cd6b99ccfe296b0cc25ea3a4272b8 + last_write_checksum: sha1:306272751717d47f854384a04ba794f732fb85ee + pristine_git_object: 15130c9ebe7127c8b88171acdc67030cda68d046 src/main/java/co/novu/models/components/EmailControlDtoEditorType.java: id: c04364b533a1 last_write_checksum: sha1:9a4b39f3f7af214a8cf6b453580d1808c8977474 pristine_git_object: b74c3cc8b2c6941f2f66327d648364f89556ffc4 - src/main/java/co/novu/models/components/EmailControlDtoRendererType.java: - id: e70ab0adde4f - last_write_checksum: sha1:7a67649cbf99bfe9f5bf8a4a30c675b8bc7af9e7 - pristine_git_object: 7ba34b4d8443ad727de7669f84233eeae0f0f3bf src/main/java/co/novu/models/components/EmailControlsDto.java: id: 91e6005d1e48 last_write_checksum: sha1:e67666a71fced8c987dadde0b3646a21559258b6 @@ -3804,22 +4416,22 @@ trackedFiles: id: 556a4ed1fccf last_write_checksum: sha1:6d16d029962bd4d826f0c938aab34e286279e347 pristine_git_object: b803c9c072685585fc673a2a759846876cda0ed3 + src/main/java/co/novu/models/components/EmailRenderOutput.java: + id: c45e60ab0489 + last_write_checksum: sha1:1b7e99d58545eb826b0a5f3cae14c9e1213d02b5 + pristine_git_object: cf14fee784b1d5cf808b994e55f549ab49c6f06d src/main/java/co/novu/models/components/EmailStepResponseDto.java: id: c4ccd3ada588 - last_write_checksum: sha1:507580d58d5e332919860aafca5fd93e8658ae15 - pristine_git_object: 4cfb2bd81d2da2e763169d98abfe4ccb9a52a87f + last_write_checksum: sha1:032ff6aee70480bf7cb9f5d660ad01fa27f38d84 + pristine_git_object: 8eb4166548cdc4503f955f07e2188afc6cc25244 src/main/java/co/novu/models/components/EmailStepResponseDtoControlValues.java: id: bf7545a78a11 - last_write_checksum: sha1:bf217e740c216a982e985c120e8038fe43a4840d - pristine_git_object: 4972f01e781f8b14ea3a514693a661e375f20c3b + last_write_checksum: sha1:49169d8f4a79b70064ecc687723571d6e0d4d970 + pristine_git_object: 31c48bfd5ff6a589e39d49e78a373a1ad5100081 src/main/java/co/novu/models/components/EmailStepResponseDtoEditorType.java: id: 329304fe1c33 last_write_checksum: sha1:6f6f6cdb21c96d7d14897992f8025a4f1f381702 pristine_git_object: 788160f063f364ee2d545ab4fe07c40c355d89b0 - src/main/java/co/novu/models/components/EmailStepResponseDtoRendererType.java: - id: 9402cd15fb1a - last_write_checksum: sha1:c04e116f7fa0313a23de96835e1b9606efe609b2 - pristine_git_object: 3bc66322e1b1a43b68390dd957a9f62afab6a108 src/main/java/co/novu/models/components/EmailStepUpsertDto.java: id: 8d60d8ae03c4 last_write_checksum: sha1:6f42b98893b0ba5d19f73708ea22f2354e3cddf4 @@ -3828,6 +4440,10 @@ trackedFiles: id: df9f9a458092 last_write_checksum: sha1:00f1cc02c14197e5c9c440976c93f6bcece803de pristine_git_object: 2edbe98f1361c40f0ea0668541bd9397a44cdbb8 + src/main/java/co/novu/models/components/EnvironmentDiffSummaryDto.java: + id: 0659acd7421d + last_write_checksum: sha1:b21fe66d7152fa0b3400507ebdc92ec703d29323 + pristine_git_object: 2acb79ccc4927ca442c3342bb4248c529329bb98 src/main/java/co/novu/models/components/EnvironmentResponseDto.java: id: e851deb10a14 last_write_checksum: sha1:b35a9b77e9d573bcbc37681016ee4425d07d2215 @@ -3836,6 +4452,26 @@ trackedFiles: id: 62b84c9b792f last_write_checksum: sha1:b4eebf8abcca63ce5928ec925c36f55d7b7daa1a pristine_git_object: fe63eccd38987e69c756d4a91bd373bb888256f4 + src/main/java/co/novu/models/components/EnvironmentVariableResponseDto.java: + id: e9384bf61db1 + last_write_checksum: sha1:27d5677eaf20bca6facf9dd7057c02d7c13b7b24 + pristine_git_object: 5b22512572b37e5dcb1e3147f6dda138bfe8d82b + src/main/java/co/novu/models/components/EnvironmentVariableResponseDtoType.java: + id: c8ec92da4aa9 + last_write_checksum: sha1:a9f1512eb3ad309477faf96f7e3d4dd39ab7c2de + pristine_git_object: 6132202ca5c496296406d685ce23953166205fc4 + src/main/java/co/novu/models/components/EnvironmentVariableValueDto.java: + id: 0f1bef3c5703 + last_write_checksum: sha1:151e7644feb3ee72a5b6e0d2336704ebcc805be0 + pristine_git_object: dcea43cb14c7cdc5e0fcabbe48e8bb9118daaf60 + src/main/java/co/novu/models/components/EnvironmentVariableValueResponseDto.java: + id: 269d29731ff6 + last_write_checksum: sha1:b6d0cc2c2c09d0796c0244c39517420bb35ed26c + pristine_git_object: ef522af2a482ae54e7b33b05ff57f0d05baa9cee + src/main/java/co/novu/models/components/EnvironmentVariableWorkflowInfoDto.java: + id: 47acd77e1423 + last_write_checksum: sha1:ecabb18e5c5d437007bfb00556a24f19e7d45c4e + pristine_git_object: a93d6aa8151bfdf7e29454b16ccf40cd70466669 src/main/java/co/novu/models/components/ErrorDtoMessage.java: id: a926ecd80820 last_write_checksum: sha1:48c35ef3ef371ba08c84217f95a52767d3af90a4 @@ -3868,6 +4504,10 @@ trackedFiles: id: 8c71497a122f last_write_checksum: sha1:f377534c66c160243b3053f8c55b7f7f61b72e99 pristine_git_object: 4aea96646912608939d8971fe93b1a5c4732e66d + src/main/java/co/novu/models/components/FailedWorkflowDto.java: + id: 5ee3c2018db5 + last_write_checksum: sha1:ed77806c9bc2848e7a1868d0c712146809545c05 + pristine_git_object: 4f7af9cf9877e70ac0697742d22a8d39a14bae8f src/main/java/co/novu/models/components/FeedIdentifier.java: id: 74cfeccf05a3 last_write_checksum: sha1:7bb34c62ee82c943b62ccbefb549e22610a82938 @@ -3880,6 +4520,10 @@ trackedFiles: id: 026fe21bb52e last_write_checksum: sha1:6d2bd6dfe2b244689386e16ce794d8d7896ba09c pristine_git_object: 9a77e73fe69efcbcea7dbe1f065fb7c3fe1261ed + src/main/java/co/novu/models/components/Filter.java: + id: ad5a0ea8d9eb + last_write_checksum: sha1:29659b86bda2574a9c73903c4616f76c2f6d9335 + pristine_git_object: 77ffd4f422beb202a0c8e60412a24028ccaf8ee5 src/main/java/co/novu/models/components/Friday.java: id: edfd871827e7 last_write_checksum: sha1:65a55cae2abb1c3fc8d0b1628ecac89e8e1e00f1 @@ -3902,12 +4546,72 @@ trackedFiles: pristine_git_object: 800a3ea08651ea3e4f501d3b274f8e0e37e521c4 src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDto.java: id: 2940bdbc7b75 - last_write_checksum: sha1:f92c11a1d0e8e19ca5dfd3941ec4421091d2f8a6 - pristine_git_object: 226f2110be1e2a4a385f18ba9f83ca94b1a3911e + last_write_checksum: sha1:bbfa52acf12a613a1036b3f566021df512606e10 + pristine_git_object: e4600f75e8e6e59030fa7f93dc2ea99a7219afad + src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDtoResult.java: + id: 4c13535d8afa + last_write_checksum: sha1:0ee195208aea22ed8f3e7f1132c13ea5371034c9 + pristine_git_object: a2395a445f4bba005ed713ac2f68bc04da79f653 + src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDtoResultUnion.java: + id: 6d2f8e948d2d + last_write_checksum: sha1:140c157caefbaa8ad1350e42fd8e9796415cc036 + pristine_git_object: ead2b5081bc55522f22165bfce799b39d51477b3 src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDtoType.java: id: 318b28900395 last_write_checksum: sha1:6af933fab3e58eda8ef319cd0a4ae27d190585c5 pristine_git_object: f85542ad66bb4c2e4c44d51e7eac0f12828bf048 + src/main/java/co/novu/models/components/GeneratePreviewRequestDto.java: + id: 7b713e02c1cf + last_write_checksum: sha1:c76d9a6871bb3f3f4387dee566601b359a72e929 + pristine_git_object: 893c35ed60cf232dcd473860083ad4cfa52693a7 + src/main/java/co/novu/models/components/GeneratePreviewResponseDto.java: + id: 513663aeb2bd + last_write_checksum: sha1:301950a5e4b649775d2d3093b139d5c78ef80575 + pristine_git_object: bdf6fa9b22071d15ad432e13c41b86f971d2522c + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult1.java: + id: 18b5e97f2084 + last_write_checksum: sha1:d60a6592c882a204c17dce61b6e43ba9faca7833 + pristine_git_object: d0bd36cc43110b3eee1f1940b84267815aabacf0 + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult2.java: + id: 4b6f93a65aaa + last_write_checksum: sha1:458de7b7a57477957b1ab49b55c52ff447a486af + pristine_git_object: f3b8902ac4cd072160de60495958188665b6f080 + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult3.java: + id: bcafadfc7c0c + last_write_checksum: sha1:c64881b1b6b7d2e781af3bbf35c706ed29020e07 + pristine_git_object: 7d6fe0b73823f8e0406b776effd9198d22591409 + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult4.java: + id: a4f093ddd27e + last_write_checksum: sha1:4416e26d5690474f141f5daafba537218e801fa2 + pristine_git_object: fdc8a5e6a8cacb12d9dad11be5f46378485ea939 + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult5.java: + id: 2e249f9cc11d + last_write_checksum: sha1:3dd44d023a40f23c254bc3e00910c18ee5418356 + pristine_git_object: f510d579a6e2766cb6b816e25a546eeeb1efc986 + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult6.java: + id: 49f2046fb7b2 + last_write_checksum: sha1:b5d4804c7f50aa4b7e423c90412bf098e44d078e + pristine_git_object: f3addd2a9f52dca26fb5db8faeb5a8be4f69a98a + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult7.java: + id: f435bd5def9b + last_write_checksum: sha1:3c1d23c27ca66b258e2c765bdb865ffd61ff5202 + pristine_git_object: c13870cfe3b4b48d889f37424dc9acd6bea808a5 + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult8.java: + id: 5ecc8111fb69 + last_write_checksum: sha1:f67b78e5954e37069ff0b2e8681e1703ef44dc59 + pristine_git_object: 1bbfd710898aa648a18bf1673b8aaf02ed7672af + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResultUnion.java: + id: fbc6d025fcba + last_write_checksum: sha1:f8f66a54a015fcb047f0ff5b8e84025848424e5e + pristine_git_object: f259cc292ec6ac5d2a5aca4cbbdbda1592d821f2 + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoTypeEmail1.java: + id: 90baa2cf8e58 + last_write_checksum: sha1:0089895a715fb390dda373441ebb212b14197ddc + pristine_git_object: d1b3d9627358b5a23123b83e5f40efbeec3b98c4 + src/main/java/co/novu/models/components/GeneratePreviewResponseDtoTypeEmail2.java: + id: cf6b6d8843bc + last_write_checksum: sha1:748cfa541002b56a0045288943fa502011b42e59 + pristine_git_object: fff71b63db9d416fe4a3317d6897345dcf008fdf src/main/java/co/novu/models/components/GetChannelConnectionResponseDto.java: id: 13cecfa4e560 last_write_checksum: sha1:c38e305df8f46ee75d9981f2d49a5a3957d3577f @@ -3918,8 +4622,8 @@ trackedFiles: pristine_git_object: ef69fcdde802125d312d0ad8528e2a4328abca2c src/main/java/co/novu/models/components/GetChannelConnectionResponseDtoProviderId.java: id: 33e731a0de3d - last_write_checksum: sha1:c899b5e1695f488b2c23f479734ab8e195106e60 - pristine_git_object: 3725e08d96e9165ed217f2f44f7fce1dd1066d0a + last_write_checksum: sha1:15683e1f47fb6ef26a62a630afede3ce3bdc400f + pristine_git_object: e652c1210e4f856b3235e4f226b9ca387d77dc90 src/main/java/co/novu/models/components/GetChannelEndpointResponseDto.java: id: f8ed47c8b977 last_write_checksum: sha1:40acf6083157c2b8edc20dd67aab9c78cbba3e84 @@ -3934,8 +4638,8 @@ trackedFiles: pristine_git_object: 6c2dd7ad82432a2087afb8cbd1b055c9d9d2cc6f src/main/java/co/novu/models/components/GetChannelEndpointResponseDtoProviderId.java: id: e0072ed5b1e5 - last_write_checksum: sha1:51ba389d5d15f42a334012fd4df20e5edab1bc54 - pristine_git_object: c83653731f1c21c2984093104c41ed9ed4d29ded + last_write_checksum: sha1:86cb04bdb03eaf75a235f018e9b268999772ce6d + pristine_git_object: cf0bb16a1b5ed66882d448e16ea14761cf771e6c src/main/java/co/novu/models/components/GetChannelEndpointResponseDtoType.java: id: 5900d97a9ab3 last_write_checksum: sha1:f1506e7640f422ca7fbea2c0ca4a1ae074a877eb @@ -3948,6 +4652,10 @@ trackedFiles: id: 36c3976c57c7 last_write_checksum: sha1:d18f53e3085e4d59034f1737eee7cffa8a82a40e pristine_git_object: ccbcd4052f0f92fe978c139eb1837ebd8535675e + src/main/java/co/novu/models/components/GetEnvironmentVariableUsageResponseDto.java: + id: 9cdd71544b03 + last_write_checksum: sha1:5ea9b1ddb70c9337ba6928530ef28f2c7e76a4b1 + pristine_git_object: 80f0813fe1f3e60ff22e529833028009130158e6 src/main/java/co/novu/models/components/GetLayoutUsageResponseDto.java: id: 0afbf4dadf2b last_write_checksum: sha1:37781de371e56dd936fb4e6a8a546dc66065ae09 @@ -3968,6 +4676,14 @@ trackedFiles: id: 67af694a4826 last_write_checksum: sha1:a9872d830eccf6b46029a1b6dbbc0f63e7a60a86 pristine_git_object: 81271d71dd135930d6302333ec1257687e11e883 + src/main/java/co/novu/models/components/GetSubscriberNotificationsCountResponseDto.java: + id: 6b61fa560875 + last_write_checksum: sha1:c346c407b48afff6c5dea4f6711f834536613f19 + pristine_git_object: 3225c455e428bff2cf323c0a761c446a572c0ea4 + src/main/java/co/novu/models/components/GetSubscriberNotificationsResponseDto.java: + id: 58b2c5a6f9dc + last_write_checksum: sha1:942adcce38fd998ea970ce5b277e54ef5fb596c1 + pristine_git_object: 89d7e5a7a03fbacb4375c4619a97fdaf34cc9f70 src/main/java/co/novu/models/components/GetSubscriberPreferencesDto.java: id: a76ae4b04e9b last_write_checksum: sha1:99b552114444ff2ebf72de54591169f2c82976bc @@ -3980,6 +4696,38 @@ trackedFiles: id: 4d200b4b02b5 last_write_checksum: sha1:05bd2ba29e34a083bead36d4dbbd7614a7dab671 pristine_git_object: 5700c32e0da79742eb2bbaa402d5248c6e09d23d + src/main/java/co/novu/models/components/HttpMethodEnum.java: + id: d79bd6d55498 + last_write_checksum: sha1:22b0249cdecfd515dbafa511acb62ad77e546c25 + pristine_git_object: fed7064ae48b1a0128d5e5d7cb82cbccb96d5f24 + src/main/java/co/novu/models/components/HttpRequestControlDto.java: + id: ae5395a5963a + last_write_checksum: sha1:c6d72261de61b373a95c09bffbd609e6294ec135 + pristine_git_object: 5252910974a63b6367a1379abded562af39ed903 + src/main/java/co/novu/models/components/HttpRequestControlsMetadataResponseDto.java: + id: c5f13165c3e1 + last_write_checksum: sha1:caf35b9d761abfff21f76fbb57b4a3f8574aa758 + pristine_git_object: 9c667adeb6532467212cc9a5926b42096f8ac587 + src/main/java/co/novu/models/components/HttpRequestKeyValuePairDto.java: + id: 65feb42d23b4 + last_write_checksum: sha1:76d439378b2b1a47ded9004179f23297bf6074cb + pristine_git_object: 77ac36ef18d9bfa447176387071a39628062fc04 + src/main/java/co/novu/models/components/HttpRequestStepResponseDto.java: + id: 60f24cb5b433 + last_write_checksum: sha1:edcbb7077025fa596163b29110df45b3feaacaf2 + pristine_git_object: 75d0955bac38ecd0b95e8d877dbb08cfc9c79c8e + src/main/java/co/novu/models/components/HttpRequestStepResponseDtoControlValues.java: + id: c89c2d592faa + last_write_checksum: sha1:7f1a4883cb8557856a6207a98f12c5e9e993b17d + pristine_git_object: b9b35a3ef4257f2d6f26ed60104bd2b4124f84d2 + src/main/java/co/novu/models/components/HttpRequestStepUpsertDto.java: + id: 84345995ed1b + last_write_checksum: sha1:bab73d41f4f8e3955f61cacf3bc32f61b53405dc + pristine_git_object: b1a9b65ea71f181145cd3bb554200d03744a5f66 + src/main/java/co/novu/models/components/HttpRequestStepUpsertDtoControlValues.java: + id: 771fe9de5313 + last_write_checksum: sha1:e79ca7631ec58adc405a86389a73993bb54ea835 + pristine_git_object: 040c42529c5a7ba9d6a664987ae3f55bdbb7caa0 src/main/java/co/novu/models/components/ImportMasterJsonRequestDto.java: id: 10fd6a7c3827 last_write_checksum: sha1:139ed506788a93af7b03fa32b42e04a32700e8fb @@ -3996,10 +4744,14 @@ trackedFiles: id: 8ccea574b2f7 last_write_checksum: sha1:6b5dbbe1e75b112391c51e870b947928c5b1bd4b pristine_git_object: f3625ca4d7a2f48419cae0d03ddaf1e4806fb853 + src/main/java/co/novu/models/components/InAppRenderOutput.java: + id: 6cae862f5c4a + last_write_checksum: sha1:b9164fbb8454faec2a62bf6e7c95c0d82df8e49d + pristine_git_object: 8604256d8410376a8152b2c8f1536d975400334a src/main/java/co/novu/models/components/InAppStepResponseDto.java: id: 8d5e5f975b43 - last_write_checksum: sha1:0e7f2849b45e15eb887611cb86928730d646484e - pristine_git_object: acccaa2ce26a2a048f7d0c789aa4fad744701cc5 + last_write_checksum: sha1:2c08f1a533d657f2a80997c122c7d39e93e60590 + pristine_git_object: 8c2dcafe6182a959cd77da0e7a2f7cb1b7e1401f src/main/java/co/novu/models/components/InAppStepResponseDtoControlValues.java: id: b247f371f254 last_write_checksum: sha1:317f22401d2829cd147e558dfc26a1ed2ab4c12e @@ -4016,6 +4768,18 @@ trackedFiles: id: 8d231bcbe89d last_write_checksum: sha1:17ef5247ac0b9a2a0be7acce3622b4e229bf69f4 pristine_git_object: 171a64e923fc2d893d77e9ec3c987eaebcfda14a + src/main/java/co/novu/models/components/InboxActionDto.java: + id: 63f9bd6809f8 + last_write_checksum: sha1:afb1c93e00969ce2bca5e1d26997b1622d360b6e + pristine_git_object: d02356fcba08ebd255aaf653763aae30e3fa708b + src/main/java/co/novu/models/components/InboxNotificationDto.java: + id: c56ff6476f7b + last_write_checksum: sha1:9297d8e86de49d8893ff679f2b51f86fb9135f25 + pristine_git_object: c3e89d55f373cf64b0f8487ab8ec08fc2e5ea19f + src/main/java/co/novu/models/components/InboxSubscriberResponseDto.java: + id: 0ff54a374943 + last_write_checksum: sha1:93b7e23a624952e3e14466e8a86cecf99ed71c59 + pristine_git_object: cd697e2965ed21545e2ef96415f5b2af3b880e13 src/main/java/co/novu/models/components/Integration.java: id: 12f025d1bf5d last_write_checksum: sha1:35bbb83815147c943f55b5ec93f5aa947f32bfc5 @@ -4026,16 +4790,12 @@ trackedFiles: pristine_git_object: 9812e1176eb4928f4652fff4dd038e0f0bcacddb src/main/java/co/novu/models/components/IntegrationResponseDto.java: id: b43d812fe7c6 - last_write_checksum: sha1:cf0ab756706cef8f0f37795a608affa44058b58f - pristine_git_object: 1972727095079be7ccfd03df3ff7838a67b4e35e + last_write_checksum: sha1:07518f46b599c09cd132dec88c7b37af119053b4 + pristine_git_object: 355b69308066413775cdf446421872a32331729b src/main/java/co/novu/models/components/IntegrationResponseDtoChannel.java: id: b66a446847fa - last_write_checksum: sha1:d3a1575f81c01efb276d08e08c936c88665ed427 - pristine_git_object: a3714578366f3da3a2068a6dcaf2d20a50f74574 - src/main/java/co/novu/models/components/IssueType.java: - id: 0f712cba5e23 - last_write_checksum: sha1:a00118ef4b726823e9277a5983be1322454ba2cf - pristine_git_object: 87ecb4d792921a7183526bb8793a9288a5fb6e30 + last_write_checksum: sha1:84dab4320c326c35b9d3e805b98af42605a0abc7 + pristine_git_object: b61e2e8e5a30cc4ecf7f2ff27a00b94f81f3c3a6 src/main/java/co/novu/models/components/Issues.java: id: b10d7257ea6a last_write_checksum: sha1:e510fdc25d1a9dfc58134b32638f89d9218120c6 @@ -4108,6 +4868,10 @@ trackedFiles: id: 338711beb96b last_write_checksum: sha1:680c309cf0294fa4142d52c460a9b08b2d95a13f pristine_git_object: 8d0a843999f82cc5204071ad3571e43b90f74e95 + src/main/java/co/novu/models/components/LookBackWindow.java: + id: bdb3a83f89b8 + last_write_checksum: sha1:3e5712b7b6157aa6558ff58746af5860335560f8 + pristine_git_object: 151e147867d6f7164290bd4091a5fab559d14eaf src/main/java/co/novu/models/components/LookBackWindowDto.java: id: bd710fee7c77 last_write_checksum: sha1:cd53457073c5e872e38a796ce8f2023474c7bec8 @@ -4136,6 +4900,14 @@ trackedFiles: id: a7048b275187 last_write_checksum: sha1:d324430eaca5f5139cb2513eb3f290178d88b03d pristine_git_object: 773ef85e5f97acaf4cd8519aaf70a31563443f4d + src/main/java/co/novu/models/components/MarkSubscriberNotificationsAsSeenDto.java: + id: c282daee0879 + last_write_checksum: sha1:ba9d4cdd841bea6097b14b7eb2d440b2f773d9c7 + pristine_git_object: 73ae9df7dae19b179356b0a50d753aba1a480ab4 + src/main/java/co/novu/models/components/MarkSubscriberNotificationsAsSeenDtoTags.java: + id: 97505f89a2b2 + last_write_checksum: sha1:a9b031c7ff4c0b08c4b81784b9f7fee4d63bddc4 + pristine_git_object: aa0b6c000cbd3070d726e5a4e3e2a336922abdcc src/main/java/co/novu/models/components/MessageAction.java: id: c2406f5c8f23 last_write_checksum: sha1:8cd41a561d21e15aafc3aba9506f71d88f7a224f @@ -4264,6 +5036,10 @@ trackedFiles: id: dd2b8d5ca798 last_write_checksum: sha1:8b4768e2648ed98d969591c8b0e6dd932b467609 pristine_git_object: 2930094891799d977f53a236a91f8ab56e359650 + src/main/java/co/novu/models/components/NotificationWorkflowDto.java: + id: b342bc7e4905 + last_write_checksum: sha1:53aa4f776a134a9ad7a389d0d3b9d9f657dfe60d + pristine_git_object: 7c08791930887615cf74ca04b07b3cc9546152aa src/main/java/co/novu/models/components/On.java: id: e29ebf90b32a last_write_checksum: sha1:2cf0deb8ebb5260d87fb0c8dcc794ce781da9aea @@ -4376,10 +5152,38 @@ trackedFiles: id: f3da0653adfc last_write_checksum: sha1:38b397ba16a1a2a2dc437ec5b477c12d9e2fab70 pristine_git_object: 2cbe1ca58f4c2ee6f28d5f7dafa401ef403a99cb + src/main/java/co/novu/models/components/PreviewErrorDto.java: + id: 2abad7b9f9b9 + last_write_checksum: sha1:6ad2f7ef0ec7b3a246e00c9f5a8bdc8f74cc6c4b + pristine_git_object: be46c41e37dde302e766dc066b06522a1f0baaf5 + src/main/java/co/novu/models/components/PreviewPayloadDto.java: + id: 10b1f0af5651 + last_write_checksum: sha1:c5c1ffe02db4151b88993b5c06018f34628a1f31 + pristine_git_object: 202e4ac180794fdf095dbe4abe5030807f728069 + src/main/java/co/novu/models/components/PreviewPayloadDtoContext.java: + id: "039354562148" + last_write_checksum: sha1:da904c3d624e7a1fc54940a58becad7c443ef2e5 + pristine_git_object: 1c6b2eb44e25b01610e8ff3dd7c7a75f7b02a044 + src/main/java/co/novu/models/components/PreviewPayloadDtoContextUnion.java: + id: 0b4aa4c6305a + last_write_checksum: sha1:4cd3c6e53d3bc90f8d5e1e4c987bd1996cf4cfe0 + pristine_git_object: c2cbf7799026159fc751867cb5e42b54ef59387b src/main/java/co/novu/models/components/ProvidersIdEnum.java: id: c041089a54bd - last_write_checksum: sha1:c666ea1a7157c6fc4a9506b0389a91a81c423229 - pristine_git_object: 81b481bd3d8df4f6f7b8cfd30e8ae20b232b88d2 + last_write_checksum: sha1:a9815e34e34d55d8820a871d088e51290f729487 + pristine_git_object: 6de8a6c7ddc43b6ed45c732dcc68566993074c4b + src/main/java/co/novu/models/components/PublishEnvironmentRequestDto.java: + id: 2f73cfe4267d + last_write_checksum: sha1:b9424a0b975b1a9c7ea241ffba01cb73efc7a95f + pristine_git_object: 3c26d51071c04123a972e1efba0c0cee7ad50795 + src/main/java/co/novu/models/components/PublishEnvironmentResponseDto.java: + id: e64a3231555e + last_write_checksum: sha1:9d70f553bdb796358c63c73fdf27acc58ddc7135 + pristine_git_object: a048fd3a1d7daf32e3ad92e7b7ef2e89ba0defcd + src/main/java/co/novu/models/components/PublishSummaryDto.java: + id: f4b06f9c6e0f + last_write_checksum: sha1:76e298393237727d104f82fd119fa6462f88aa69 + pristine_git_object: e4067f38b24179ee145c261aa40a15262c5be613 src/main/java/co/novu/models/components/PushControlDto.java: id: 8974c4e2b5a5 last_write_checksum: sha1:a6995882624138c6756ad982b823c6d13b7bcbcb @@ -4388,10 +5192,14 @@ trackedFiles: id: 5f214b86c16c last_write_checksum: sha1:71e71a3c84b290934a90ecaf2ca7699c29938b78 pristine_git_object: 6507f9173ab3683092fcd6507b99ff552c0e35da + src/main/java/co/novu/models/components/PushRenderOutput.java: + id: 73a646a0b495 + last_write_checksum: sha1:5e34ba7b2c3bb1cde1a5fcb47d1669c9c5034231 + pristine_git_object: 17aad2bfd525430f0728eef4c33c36a973f5ecae src/main/java/co/novu/models/components/PushStepResponseDto.java: id: dae8f64c644a - last_write_checksum: sha1:e3884eeb41e05b71ddffa70c99cabc1794853055 - pristine_git_object: a7430e652a3adab4791ead7623b73d1369f685c6 + last_write_checksum: sha1:7c0c8fad1b244fc6626ac2e9337ca8ec9fe70f3e + pristine_git_object: 6a9c83673d2aeb7aa4d54067f89204ca527201d3 src/main/java/co/novu/models/components/PushStepResponseDtoControlValues.java: id: f23f4aa1fe9a last_write_checksum: sha1:97506e7b14d010b27350b3beb71f102e3964629c @@ -4406,8 +5214,8 @@ trackedFiles: pristine_git_object: bf77db8896bf52a33dedc9856c1068b18e080073 src/main/java/co/novu/models/components/RedirectDto.java: id: 7914b3e6bff4 - last_write_checksum: sha1:87187ee44535b8dc52f91c0bc196cf8408e35920 - pristine_git_object: 3f390602e85fc780d545666e94796151c5dfa679 + last_write_checksum: sha1:b5f91c080474baab378050afdd23cf31535b57fe + pristine_git_object: f153078eb3167b2c653e4692d5c65dc4a69ad2f3 src/main/java/co/novu/models/components/RemoveSubscriberResponseDto.java: id: 8c898a656a6f last_write_checksum: sha1:6d4b249fb1d90a6c09cc1813bab3513c0f011de9 @@ -4416,26 +5224,66 @@ trackedFiles: id: 68153fa59dce last_write_checksum: sha1:7033209ecffabe97b4fb344e1df4bf21df2feb87 pristine_git_object: 407b1f58f085081fde17d8f09d5d4a76c964d4bb + src/main/java/co/novu/models/components/ResourceDependencyDto.java: + id: 12118e7756de + last_write_checksum: sha1:600df33d5616070b7f25dac7e9d85d52728e5769 + pristine_git_object: e526ae2bf6ef767529c5a74a09c4b37579e978e4 + src/main/java/co/novu/models/components/ResourceDiffDto.java: + id: f5233a484f8c + last_write_checksum: sha1:d4015774dde1244d6763e6c59e69b7f3207e1f38 + pristine_git_object: 3d69907d49f3c97272736e2a9ea9b00eba0b9a30 + src/main/java/co/novu/models/components/ResourceDiffDtoSourceResource.java: + id: 057913cee1d4 + last_write_checksum: sha1:33db2475d0d107eac16403c3327e68dff365ce48 + pristine_git_object: 25dc704d146b02e9ecc4822fe01465485176b6ca + src/main/java/co/novu/models/components/ResourceDiffDtoSourceResourceUpdatedBy.java: + id: 706051b1a5a1 + last_write_checksum: sha1:210d1c8602364efd99482417f8b9c1cb0f9a430d + pristine_git_object: 02318184d3a637c8fccb97406d8e6d24de930f46 + src/main/java/co/novu/models/components/ResourceDiffDtoTargetResource.java: + id: dce33e1146fa + last_write_checksum: sha1:a39ff45ae3dddb20041533db12a94d87332bb520 + pristine_git_object: 1603d37c9816a0f3d63f6490820da2c5d8347d74 + src/main/java/co/novu/models/components/ResourceDiffDtoTargetResourceUpdatedBy.java: + id: fe65fd7b7d88 + last_write_checksum: sha1:e585688ede964d3849ffe320a6374ed8924df1c0 + pristine_git_object: a825637c3009bceb031cc3c264a73dbae0cf8806 + src/main/java/co/novu/models/components/ResourceDiffResultDto.java: + id: 805ade9ae07f + last_write_checksum: sha1:f998cb4b6b8a534e2f15387cde61cbb3e18a99d8 + pristine_git_object: 0a17c66df5e071f2de46d91d0cd76c4cb6b7e9a4 + src/main/java/co/novu/models/components/ResourceDiffResultDtoSourceResource.java: + id: 0bf5fadb8a42 + last_write_checksum: sha1:db9477f1216ba7f26d6e262735e9e2ce8f0a7bc2 + pristine_git_object: 99d431ad09c57f3b704c6cb6daaff588aec5111d + src/main/java/co/novu/models/components/ResourceDiffResultDtoSourceResourceUpdatedBy.java: + id: 76c9e1425159 + last_write_checksum: sha1:d24096aaca7c3c8950cf96b18801a7d4467d6592 + pristine_git_object: 3379fe25e19811015840c7cb720a16c7a30b402a + src/main/java/co/novu/models/components/ResourceDiffResultDtoTargetResource.java: + id: c83cebe5a3dc + last_write_checksum: sha1:420612e8910609081ba5b16ab5cd12d7af7ee01f + pristine_git_object: abe8f6f49a49c4a3a545af944ad605998d2ff7e2 + src/main/java/co/novu/models/components/ResourceDiffResultDtoTargetResourceUpdatedBy.java: + id: c3dd35433289 + last_write_checksum: sha1:9cfe88e3873c1b7f8f8b1cede974434dc64acf0c + pristine_git_object: 637ba43a1450182dfafa6442e0bcf22dbf2302e4 src/main/java/co/novu/models/components/ResourceOriginEnum.java: id: 78a07a4ae57d last_write_checksum: sha1:54aa8a79f823f592868825fa1dc5c750620c67ab pristine_git_object: d7e7b95ff70f0b2dee577663c7799ce972c82a6e + src/main/java/co/novu/models/components/ResourceToPublishDto.java: + id: f5ef3b9590ab + last_write_checksum: sha1:e09bc5a73c05c409c977cba1b891b9581c36e35c + pristine_git_object: bb6caadc358e38a1782a35552393d6379be8f4dc src/main/java/co/novu/models/components/ResourceTypeEnum.java: id: 82889a072a68 last_write_checksum: sha1:8d9c2a20e845c61dcb32625b927b1eaa1f5a792c pristine_git_object: 7b6ad29bb16e7ced0fa9b2cfc058fda57ac8ada6 - src/main/java/co/novu/models/components/Result.java: - id: bafc76f69b15 - last_write_checksum: sha1:7f3b48b8886393841c41ae1a618410ba111ed27b - pristine_git_object: 5d63754b69010b0e5a2de2c4d2c41628a5215564 - src/main/java/co/novu/models/components/ResultUnion.java: - id: 060a68b84759 - last_write_checksum: sha1:a99cbcdd17154828338ae7eb6b31630aea02fbab - pristine_git_object: 82a0102fa3495e984e753667e3a2c9c956ec5866 src/main/java/co/novu/models/components/RuntimeIssueDto.java: id: 5acff3e58d04 - last_write_checksum: sha1:57685e2418239e3dc84085059e1438bc9d6952c8 - pristine_git_object: 99605a81f4c61155f6594a083de797b758e2b3f5 + last_write_checksum: sha1:10681c3772b9148ffaa9085d72f41a61dff2a4c2 + pristine_git_object: c0ff9c5a47f0dbf0002307e14f690d53e8b88187 src/main/java/co/novu/models/components/Saturday.java: id: 0a90110b7aac last_write_checksum: sha1:6618a858c31505e0b613f118dd0bb3494f484eae @@ -4456,6 +5304,10 @@ trackedFiles: id: ca5bb3c93342 last_write_checksum: sha1:72b210fc4a1263cafe78d80fc7fa1016167695e0 pristine_git_object: 372786b8835113b1834af7247f1e7750a8c73f11 + src/main/java/co/novu/models/components/SkippedWorkflowDto.java: + id: ef34caa63097 + last_write_checksum: sha1:221c68360b687b6593ee55ee311ba90983e307c5 + pristine_git_object: 830555c430944453bde062be23907e75d129507f src/main/java/co/novu/models/components/SlackChannelEndpointDto.java: id: 0a235d5f2510 last_write_checksum: sha1:ed61ef08de30a71313009174456aae1f733a4d3d @@ -4472,10 +5324,14 @@ trackedFiles: id: ef2139db85f1 last_write_checksum: sha1:98fe6a4a4df4f9662165df00be0468b1a7cb1cbb pristine_git_object: 1f33bff069a20c93e8869e11f4d560e88fa176a0 + src/main/java/co/novu/models/components/SmsRenderOutput.java: + id: 6202fcbdd5fc + last_write_checksum: sha1:d6e2205a1219961e44bdf20156731d054c2bc919 + pristine_git_object: 49a9e12acfef1a4c4a7ff1503cd4dde56f52eebd src/main/java/co/novu/models/components/SmsStepResponseDto.java: id: b86734878940 - last_write_checksum: sha1:ac7798bc860227b0cb157ab9330c8c2f48040ea0 - pristine_git_object: d48a6dc8031af25859935dba0a87948d26d22f5b + last_write_checksum: sha1:75d123c9aeb2c5b44a9ba4993341894566db32bd + pristine_git_object: dd449d2ef3bbc9222b45d05e1241a5094391b58c src/main/java/co/novu/models/components/SmsStepResponseDtoControlValues.java: id: b0ee5306d24b last_write_checksum: sha1:6fcb1eebd8ae8dc6551d756e9c1a0ffc3b3a7768 @@ -4488,6 +5344,10 @@ trackedFiles: id: 0a567fdeb156 last_write_checksum: sha1:7e8185272dae8969b6e35a3be7669ac4846b8e72 pristine_git_object: 912a00af493bde61ec2970904b149f0a02feae77 + src/main/java/co/novu/models/components/SnoozeSubscriberNotificationDto.java: + id: 58335c375f31 + last_write_checksum: sha1:1de9151df2eff002d42cfab5689ad13935c63f59 + pristine_git_object: e3a9d3cfab79ed47a5dff8f393fe4191772bdee9 src/main/java/co/novu/models/components/StepContentIssueDto.java: id: 20f89cd5a04f last_write_checksum: sha1:7711e799531b42f5fbd047203d16fc9a5b0abc06 @@ -4510,12 +5370,12 @@ trackedFiles: pristine_git_object: 007b2417682453f3c8505f4710707f19c6a844c3 src/main/java/co/novu/models/components/StepResponseDto.java: id: 03127bad6caf - last_write_checksum: sha1:0147e5891fef7a03e7647e86cabeb66436a4262b - pristine_git_object: e8d5490e7523998487d5ae51887ef3a0096db205 + last_write_checksum: sha1:2993f4a65d28b145e59f9fd14aa4aa8ca0096fc8 + pristine_git_object: 4054c342d1edd854f1aaba9cebaca9f5e68a7e0a src/main/java/co/novu/models/components/StepTypeEnum.java: id: ce207dd1f2e5 - last_write_checksum: sha1:9277d18bf8cf100b460dce61388ffda19a9ad63e - pristine_git_object: 7dcdb8d7068a16b1a8d5991e7f6ac193b45b4346 + last_write_checksum: sha1:fbbe3be8f1703bc3852df3d90041b3fb9bc4c557 + pristine_git_object: b1205c23f04638be1cec5ec46c0505c263619fef src/main/java/co/novu/models/components/StepsOverrides.java: id: 2603f7513efd last_write_checksum: sha1:c52bd5063571ecc171b6f29a3ae52e8bba778e84 @@ -4612,14 +5472,26 @@ trackedFiles: id: d7c8d503121e last_write_checksum: sha1:099f1ef24218875ef8ade881e3941fc1c9acf5e6 pristine_git_object: 5fcc409c850caeeed07500cfc3b94c1c952ea102 + src/main/java/co/novu/models/components/SyncActionEnum.java: + id: da6755cd6681 + last_write_checksum: sha1:2cc7b185147de0e895f6ffdca8bbb59ae9e94654 + pristine_git_object: 5976614c62643bdef6cb0ce38be61c6d9beb756f + src/main/java/co/novu/models/components/SyncResultDto.java: + id: 92e8017fb246 + last_write_checksum: sha1:d63381ce6f6d49a01fc5e9fa88d69e39db2eaae3 + pristine_git_object: 9ba4e9487d4004db02ca1db8a5053f197e6e9276 src/main/java/co/novu/models/components/SyncWorkflowDto.java: id: 689a8988bb11 last_write_checksum: sha1:3882e3ad17bb8c488ad12523f4a8ce86170f0ea1 pristine_git_object: 7928c39cf76ab1ec7d31b60dbdcbcb41a5769c6e + src/main/java/co/novu/models/components/SyncedWorkflowDto.java: + id: 8895403d0d76 + last_write_checksum: sha1:f9ac991bc8c91ba4ae8a8d5aa07977e9a8a9e2ce + pristine_git_object: e41d810db90228e5ad382a03f718b8af922b9222 src/main/java/co/novu/models/components/Target.java: id: 226979a31a96 - last_write_checksum: sha1:f1e12e266d6acee5f18a2787e9d2dd22b77fb3d8 - pristine_git_object: 1919882584b6c1ae85e2abbf1dff5ac96346779f + last_write_checksum: sha1:9958e1b6f28f5c193914d0363da96b13b080f75c + pristine_git_object: c449c8acd0581d6167f7ff781b35b5acbd7f419c src/main/java/co/novu/models/components/TenantPayloadDto.java: id: a948d37fc6ec last_write_checksum: sha1:fed0793cd68cff736830bbd4489cf3456bf5b34e @@ -4650,8 +5522,8 @@ trackedFiles: pristine_git_object: 2424abc91b1e6332ce4c88b550627ffea93626ac src/main/java/co/novu/models/components/ThrottleStepResponseDto.java: id: 06777376ac5e - last_write_checksum: sha1:58675ad854102e4bd505efda08b12613285e4fb6 - pristine_git_object: 2af063c79ff1539f72441751c4121cf0ba295a82 + last_write_checksum: sha1:8d7f0c186094386152dd9ada9c12d75347aedde9 + pristine_git_object: 4d4c564bb16fe6413700a7a25ccaba802c0cd881 src/main/java/co/novu/models/components/ThrottleStepResponseDtoControlValues.java: id: ac4975aec352 last_write_checksum: sha1:ef02c9b40837716ffd3ac280558c06b47bcc8e62 @@ -4680,6 +5552,10 @@ trackedFiles: id: 8747dd36b24c last_write_checksum: sha1:1394093019b623daedeedef833f99d7f2b0d8f61 pristine_git_object: 65cfa6459e2ce5dc69b8893c9a8f148748a97c13 + src/main/java/co/novu/models/components/TimeUnitEnum.java: + id: 781eaa0cc4e1 + last_write_checksum: sha1:304cc683f04d02582c7708ed88e9c3b0cc54705c + pristine_git_object: b0f27e7de9470f30d003361a3c07ac37b09bd175 src/main/java/co/novu/models/components/TimedConfig.java: id: 454a97d0e906 last_write_checksum: sha1:c5a840e079de7f73ad943c5089d7f374b7653cde @@ -4770,8 +5646,8 @@ trackedFiles: pristine_git_object: 724ff0613105d99d640ed7322f86066d4aba156f src/main/java/co/novu/models/components/TriggerEventResponseDto.java: id: 3ca1e88fe923 - last_write_checksum: sha1:7b710f20d07a02ddc0e959228c21895d0a94c181 - pristine_git_object: 2c67de0ac363abe09a1be2356e94456d4042bf40 + last_write_checksum: sha1:dff03ad74a40e1145a3b0ab688e3a674b440f96e + pristine_git_object: 38455b15ea6514f9e75accc225aead5c73702294 src/main/java/co/novu/models/components/TriggerEventResponseDtoStatus.java: id: c34d378b6a1f last_write_checksum: sha1:25349324c121d340e0325681daf1851d6d319691 @@ -4812,18 +5688,42 @@ trackedFiles: id: ced2ee45ffbe last_write_checksum: sha1:c28981ae40a432d011da36cbb21309a16e7bc16d pristine_git_object: e1c3b4f88648232032bd7ef7433dd6233f1ceb08 + src/main/java/co/novu/models/components/TypeChat.java: + id: 4e5b8c06ca7c + last_write_checksum: sha1:426353892729b41de711b4933351eaf11bb35cb6 + pristine_git_object: 8b231352bf5d248a0c2bb43a8899560f0e6a3f5f + src/main/java/co/novu/models/components/TypeDelay.java: + id: 6f1b1fce635a + last_write_checksum: sha1:d6d474640317a0fe62914471b652bc55ef72cdc6 + pristine_git_object: ae16db2788e55a26c3bb94bb280e4b59247dd1df + src/main/java/co/novu/models/components/TypeDigest.java: + id: 6bb037aae9cb + last_write_checksum: sha1:4d18cf3197b95cbfc849b474d5bccbecb7abadfc + pristine_git_object: e610b87e1f294916183df1c14cfbc852a6918b80 + src/main/java/co/novu/models/components/TypeInApp.java: + id: 4af3930a5888 + last_write_checksum: sha1:4cca6605f2681657d0678509d30736790433dd79 + pristine_git_object: 65b0bc54655341bc0620ab48455ffbfe6bb7ee5e + src/main/java/co/novu/models/components/TypePush.java: + id: 048d717127bc + last_write_checksum: sha1:acd95679e69593400e6ac56dc66297d039877461 + pristine_git_object: df838e06db13b0162c608fd94a0f8cc6566e2b3e + src/main/java/co/novu/models/components/TypeSms.java: + id: c59b22410a70 + last_write_checksum: sha1:6ff81346ffe97032f24ce277631da92a0c715592 + pristine_git_object: 4b7ac141974958fd76b5ece72b87eae40ac79ca1 src/main/java/co/novu/models/components/UiComponentEnum.java: id: 568abf8588bd - last_write_checksum: sha1:99b63d96e520cfb5bc79bb8fb570097bb2895cf9 - pristine_git_object: fc53abcc21e386741ac2697765e33b259a91c8aa + last_write_checksum: sha1:34f30aecb43eb98a0250b5d25d462483bdb90604 + pristine_git_object: a0d4628c25066cf5ab70ee274ffe3f94e9c82739 src/main/java/co/novu/models/components/UiSchema.java: id: 79136d19d8dd last_write_checksum: sha1:7a729bf13b588eb44a38666f79e36ac43201078e pristine_git_object: daea9e56e8d9788fd6f8a359627f03e9a177a115 src/main/java/co/novu/models/components/UiSchemaGroupEnum.java: id: 7411a5c14c70 - last_write_checksum: sha1:3bc436d67e095cf2fff29128be8fae9799bccac5 - pristine_git_object: 111cfa641b113a99eb2fcb276a7c48b5f74013ef + last_write_checksum: sha1:640134348e70aa3b1bbb2d060595286fd8271300 + pristine_git_object: d3620cab48024c932d70cf37927e222337d7f6d7 src/main/java/co/novu/models/components/UiSchemaProperty.java: id: 2970640b249b last_write_checksum: sha1:5e4f6a00f3145317fa01ecd0d5fc6e5108a1f20f @@ -4844,6 +5744,14 @@ trackedFiles: id: 25b0bb81f88b last_write_checksum: sha1:762d608289e13d81bcdbea3f56176dce83e381f6 pristine_git_object: d7ec0c16472942180ccbce9adbfa567d22cb1035 + src/main/java/co/novu/models/components/UpdateAllSubscriberNotificationsDto.java: + id: c18f33dcc15a + last_write_checksum: sha1:f72da18be5d9b22dc10249388f7df8c89ee1b6c2 + pristine_git_object: 335654bc9a6e96793897eee828278fa3eccd209d + src/main/java/co/novu/models/components/UpdateAllSubscriberNotificationsDtoTags.java: + id: 14f1f819f316 + last_write_checksum: sha1:f64bd5a7dc6fb904a2155fd338741704f9973ff1 + pristine_git_object: be74c138ccce85aeff7a1254ed64114d58dcdaf3 src/main/java/co/novu/models/components/UpdateChannelConnectionRequestDto.java: id: b52dbd23dad6 last_write_checksum: sha1:3b8a5ef1936a5706ace08c3f8faac198ae8ff264 @@ -4864,6 +5772,14 @@ trackedFiles: id: 92ecfda1142d last_write_checksum: sha1:619e4b67dca698a1b6b815f0a34e6da964de781b pristine_git_object: 2fdf71391c8a60b2d1206c88354c908103f53713 + src/main/java/co/novu/models/components/UpdateEnvironmentVariableRequestDto.java: + id: dfed310aa7da + last_write_checksum: sha1:0570053caa2bf712cdb0a3a560ec0201ecb5ea16 + pristine_git_object: 74bab867c4434edd1959f52789c47316ce473757 + src/main/java/co/novu/models/components/UpdateEnvironmentVariableRequestDtoType.java: + id: 7baf4754cbe6 + last_write_checksum: sha1:2505e5722e1f8f1e3e48624970d4783fc7f2afa5 + pristine_git_object: 6eff66b4daa190fb3ad2b845048fbe63e375d4a1 src/main/java/co/novu/models/components/UpdateIntegrationRequestDto.java: id: 155a762db6c0 last_write_checksum: sha1:626459f1c2e4100d8973fc8c029d722ec1f66c46 @@ -4874,12 +5790,12 @@ trackedFiles: pristine_git_object: fdae2f7bba14693143389cd4bdaa192fe46d7ff6 src/main/java/co/novu/models/components/UpdateLayoutDto.java: id: bd6d813c132b - last_write_checksum: sha1:a106d7b39bb1d7944b11b041f21c3dad6a5d3ea5 - pristine_git_object: 69447aa8974a2e660a4db0c218f702ac07223615 + last_write_checksum: sha1:0cd5a1ff41ae9980cf0b32874955cfd8904f2d89 + pristine_git_object: 2d1d4999f8508ec99673c1ce667dd192e3deeeba src/main/java/co/novu/models/components/UpdateLayoutDtoControlValues.java: id: a014e94a718e - last_write_checksum: sha1:57ed0adc9c32880e97971be0922751732654c688 - pristine_git_object: 1609f968c27d635e23b0f69ffc0e15e9b2994772 + last_write_checksum: sha1:9ff281289c79496167a2796913cb4b7f60b44160 + pristine_git_object: 90b59d7bae11bc62191fcb9c5b2fb0ea014ae22e src/main/java/co/novu/models/components/UpdateSubscriberChannelRequestDto.java: id: 33e56efea8bb last_write_checksum: sha1:6ee17273b5e61d279f9e93457ffc86ec76600917 @@ -4910,8 +5826,8 @@ trackedFiles: pristine_git_object: c389e7060b8e2bd80464059f25d3bdc3a8f0786e src/main/java/co/novu/models/components/UpdateWorkflowDtoStepTypeIdResolver.java: id: 3c014df61808 - last_write_checksum: sha1:e556940133763fdf3a1b43e44d0af5056019be8e - pristine_git_object: 06e94d8d40e88c4b0a5f12627c627e865c0f97af + last_write_checksum: sha1:8a3c47dd803db340004bc5e508ec417058d512af + pristine_git_object: 86f1b7157ee49d839be50455250cba183b55b774 src/main/java/co/novu/models/components/UpdatedSubscriberDto.java: id: 6f08c7b9d3e9 last_write_checksum: sha1:7175f92001c5cf618752f18d82bcf42285d24f99 @@ -5038,8 +5954,8 @@ trackedFiles: pristine_git_object: 500d6e2a4a7ba55f7324808b2d9aaf4b11d9352a src/main/java/co/novu/models/components/WorkflowResponseDtoStepTypeIdResolver.java: id: d02af515d74e - last_write_checksum: sha1:769e8a7beb2fd7afbbcb19c6e04341c65eb227a8 - pristine_git_object: 51b113077cce9d42852374aef3ede419142f7d24 + last_write_checksum: sha1:91e38f30c58b5403a83ec4e84db43431a735db2b + pristine_git_object: 73d93e07de5e1596dc290382cf87d29cdfe022af src/main/java/co/novu/models/components/WorkflowResponseDtoUpdatedBy.java: id: e5354ccf2684 last_write_checksum: sha1:2c85035f867a6adba5eca270c66766ed74c95ed5 @@ -5148,10 +6064,42 @@ trackedFiles: id: 973596e5309c last_write_checksum: sha1:43f9ed65567c221d3d8a1704f42114ca4c460700 pristine_git_object: fecafa275663ff3aaf5f2876c92209783038a822 + src/main/java/co/novu/models/operations//async/EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder.java: + id: e07787d87c3b + last_write_checksum: sha1:455d7c94411986a14670b362f59a985c777776b0 + pristine_git_object: 79cce5e7c997c305819a2f7a191a606e78df81b0 + src/main/java/co/novu/models/operations//async/EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder.java: + id: bc4800f225e5 + last_write_checksum: sha1:1fc0b34ede4f9dbed0e72cafc4d4d9cfaf963af0 + pristine_git_object: 7b9e0bc37af739da7a9ce43d8b7c026f3efdc42a + src/main/java/co/novu/models/operations//async/EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder.java: + id: b9200d0df1c4 + last_write_checksum: sha1:9b4e679ddf1ee564ffef9e7b1b1e45d53bc1b4a6 + pristine_git_object: 7ee022929320382b58ab133a045c1d9f31de2ea3 + src/main/java/co/novu/models/operations//async/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder.java: + id: efd705ae5856 + last_write_checksum: sha1:c409c7970000b196c4d7e3fa5e2ba6378e4afcd1 + pristine_git_object: 38ae2f3fd1cb696ded23501fc232006edd4da45e + src/main/java/co/novu/models/operations//async/EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder.java: + id: ca3eac2c8b0a + last_write_checksum: sha1:0f59d260abd91bd69a29f1de579ece58321e3064 + pristine_git_object: dbca9dfa99b05450056b372b4ac187ef6631ea51 + src/main/java/co/novu/models/operations//async/EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder.java: + id: afa1c660774a + last_write_checksum: sha1:2bfe7aedba993cd4f56a2af53f003adb78d45cae + pristine_git_object: 10c5bb35a3842cc8d165999786fc25baae929071 + src/main/java/co/novu/models/operations//async/EnvironmentsControllerDiffEnvironmentRequestBuilder.java: + id: 877d73d0c0f8 + last_write_checksum: sha1:3c8f9507e62ea5599ddc0975d623fb593ef4f9f9 + pristine_git_object: 0fd48f0ed8436dfba5aac02f5f26dd3fe28d8b80 src/main/java/co/novu/models/operations//async/EnvironmentsControllerGetEnvironmentTagsRequestBuilder.java: id: cdd0120ea5d7 last_write_checksum: sha1:650509073baf449cc08039187db87fef137b33ed pristine_git_object: 9d156f3f7d819d140fa9bdf1c54383d8fcb2f3ae + src/main/java/co/novu/models/operations//async/EnvironmentsControllerPublishEnvironmentRequestBuilder.java: + id: a704b6fb3a5a + last_write_checksum: sha1:0e752b158cc527635fd869bd5e571b0178bb0abd + pristine_git_object: d02a51c91f420fff248c66a4d31f809f88f02c42 src/main/java/co/novu/models/operations//async/EnvironmentsControllerV1CreateEnvironmentRequestBuilder.java: id: 6594d67fa3f2 last_write_checksum: sha1:9f893c108055091a35ecb810d16052649480eaf5 @@ -5272,14 +6220,46 @@ trackedFiles: id: 7b0f6d2ee2d0 last_write_checksum: sha1:4c68173f12eb0b88c2e9f79498d0a78b47b4af5c pristine_git_object: 9e2c3644d630540b720eec957383c68327f7df17 + src/main/java/co/novu/models/operations//async/SubscribersControllerArchiveAllNotificationsRequestBuilder.java: + id: 9b72d649219a + last_write_checksum: sha1:e899cfcfe68637b2ff8cd0ea5a4cb2596a177c2f + pristine_git_object: 889f459e86a8028f176201e0502918bfb3ab5096 + src/main/java/co/novu/models/operations//async/SubscribersControllerArchiveAllReadNotificationsRequestBuilder.java: + id: 300aec3bdcf1 + last_write_checksum: sha1:013f50247428558a9d50cbf135f4599fd435d597 + pristine_git_object: fa88fcf94477d5f003d36cf4083134c45bf36f99 + src/main/java/co/novu/models/operations//async/SubscribersControllerArchiveNotificationRequestBuilder.java: + id: 377082c9a026 + last_write_checksum: sha1:867c2f7e3c3cc5426030bf2018a8d5210b112966 + pristine_git_object: 94c9e19437caf9e087bdf1f6d2868939dd2a95ff src/main/java/co/novu/models/operations//async/SubscribersControllerBulkUpdateSubscriberPreferencesRequestBuilder.java: id: 30c51b6f140c last_write_checksum: sha1:81f57b471bcc5e83e9bb8e8890825ff638389956 pristine_git_object: 9be2c52fe7ecc4e8bedd6553ae320ce729c00bc5 + src/main/java/co/novu/models/operations//async/SubscribersControllerCompleteNotificationActionRequestBuilder.java: + id: b064f47c6651 + last_write_checksum: sha1:ac539fa04ee920663abce4a8f4088465c4c346e2 + pristine_git_object: 160025357cd4f92fd094c26b09eea4864f2c508c src/main/java/co/novu/models/operations//async/SubscribersControllerCreateSubscriberRequestBuilder.java: id: 61079b3a7eaf last_write_checksum: sha1:b3cc264520e778148d627b5a8e51fcdd98a5cfde pristine_git_object: 8b6f729940daf0830def485820373d505560816c + src/main/java/co/novu/models/operations//async/SubscribersControllerDeleteAllNotificationsRequestBuilder.java: + id: 29c5bc095e81 + last_write_checksum: sha1:3ef8a526a389593a160222f2d1285bcaf9917491 + pristine_git_object: ad94c8191dd0fc8654c50a12a68a576607335f06 + src/main/java/co/novu/models/operations//async/SubscribersControllerDeleteNotificationRequestBuilder.java: + id: 41bf0f106fc6 + last_write_checksum: sha1:1ac4c8a88851f4636f7ddc91c4f5dbc202f6fe9a + pristine_git_object: 629c3588f43e0bf7178d45cb783017045fb8ce79 + src/main/java/co/novu/models/operations//async/SubscribersControllerGetSubscriberNotificationsCountRequestBuilder.java: + id: 56c3d0e7e1a1 + last_write_checksum: sha1:726edcaf60ab9c576a526e8e065448b1c07187c4 + pristine_git_object: c74274eb21566cdb3d6efa26ed0c0b080550cf33 + src/main/java/co/novu/models/operations//async/SubscribersControllerGetSubscriberNotificationsRequestBuilder.java: + id: 633f58fb2fec + last_write_checksum: sha1:b54cf7384ce0416c444af795ad2f6df47d21a58a + pristine_git_object: 2cf051358a6eac72ece47b12046eecd1446a7647 src/main/java/co/novu/models/operations//async/SubscribersControllerGetSubscriberPreferencesRequestBuilder.java: id: df78c202713e last_write_checksum: sha1:913a4af69191b909321079c2b13be75bbd6de103 @@ -5292,6 +6272,22 @@ trackedFiles: id: afd5178ef973 last_write_checksum: sha1:5cd60eec10ecc9e0d3a4bb5c04b5d472e92ed6ac pristine_git_object: d6472b616af98e4f251eb629d763145f4bc062ec + src/main/java/co/novu/models/operations//async/SubscribersControllerMarkAllNotificationsAsReadRequestBuilder.java: + id: b2714ea9ba3e + last_write_checksum: sha1:df02624dc083c9c18dd720d6dc62992ed1d2d9cb + pristine_git_object: 78970ab0d8013d6d9a8810963692ea68db5bcbfc + src/main/java/co/novu/models/operations//async/SubscribersControllerMarkNotificationAsReadRequestBuilder.java: + id: e1045db3d23c + last_write_checksum: sha1:2d1585fee58b81cf43e2c1f8d07f25bd5911ebe3 + pristine_git_object: 0c1cf71ae37bfc05d20e8813cbc3feb32bb4134a + src/main/java/co/novu/models/operations//async/SubscribersControllerMarkNotificationAsUnreadRequestBuilder.java: + id: 4eaf71d964da + last_write_checksum: sha1:6a35869abb052ba204d45345ed23fab2fa1f6723 + pristine_git_object: a23830e96116d3ce54f4d5a799f2399e9d96b958 + src/main/java/co/novu/models/operations//async/SubscribersControllerMarkNotificationsAsSeenRequestBuilder.java: + id: 91698b5d0843 + last_write_checksum: sha1:307cf566d1d881d121ba638fb633e2cd99ad522a + pristine_git_object: 5c979b61950dc0bca22faa22abe3e127cce73979 src/main/java/co/novu/models/operations//async/SubscribersControllerPatchSubscriberRequestBuilder.java: id: 18e7a77f5218 last_write_checksum: sha1:e4116d35e57b67266e79938886a55f780c442454 @@ -5300,10 +6296,26 @@ trackedFiles: id: 49a3eb1b5289 last_write_checksum: sha1:aa3e6a78fcc69d2204deff8031b7096e58c66cfb pristine_git_object: 6e47f445d627f3cd5137825412d93b3f6009d122 + src/main/java/co/novu/models/operations//async/SubscribersControllerRevertNotificationActionRequestBuilder.java: + id: e7bf5eb86524 + last_write_checksum: sha1:6c76f75c5aa9609ec347fc70d4f663cbb2ff8ac1 + pristine_git_object: e3601f407cb90e6c00cdd7f9c3ddf24dbec97e43 src/main/java/co/novu/models/operations//async/SubscribersControllerSearchSubscribersRequestBuilder.java: id: 198a381e8b87 last_write_checksum: sha1:7209227f97076a337c282fdc428332b68dd9012e pristine_git_object: 26b665f5744e9fe15fcfa9dd30545d4347c60299 + src/main/java/co/novu/models/operations//async/SubscribersControllerSnoozeNotificationRequestBuilder.java: + id: 2f5de14d7626 + last_write_checksum: sha1:8fc1bd8498c07291bcacafc9eb6f26baabd75f0e + pristine_git_object: 66005526bcf4e0344d658981a6a594e895b887f5 + src/main/java/co/novu/models/operations//async/SubscribersControllerUnarchiveNotificationRequestBuilder.java: + id: 3b51e286a513 + last_write_checksum: sha1:919bd12d388d90a89b62fd141560309886c966eb + pristine_git_object: aad56153996b74d60cb817100152e8c18a09f0ea + src/main/java/co/novu/models/operations//async/SubscribersControllerUnsnoozeNotificationRequestBuilder.java: + id: 0e26a1dd21cc + last_write_checksum: sha1:74e79b2c2e1d40b8cf27e5eebb4b2ca1525a29c8 + pristine_git_object: dc3da9e324fc017e0afd6a5d9c448bfb1261dd33 src/main/java/co/novu/models/operations//async/SubscribersControllerUpdateSubscriberPreferencesRequestBuilder.java: id: cb5b1e486825 last_write_checksum: sha1:4cdbcd48a85b18469e096e8bc6a7d6a366235abc @@ -5432,6 +6444,10 @@ trackedFiles: id: 8fcc4a48a6a6 last_write_checksum: sha1:f08e6f723b8e0fef1e30d206c7d5605d00e92769 pristine_git_object: 2fb7a1a225d89053146eb388cbd88698b64d9f2e + src/main/java/co/novu/models/operations//async/WorkflowControllerGeneratePreviewRequestBuilder.java: + id: 75b37cef26a0 + last_write_checksum: sha1:7da1f0233dd138b64f448e3253a6eeb90bc63cbf + pristine_git_object: 5897c8fd5b329196c42e6ed0cc7d8e8c49860eb2 src/main/java/co/novu/models/operations//async/WorkflowControllerGetWorkflowRequestBuilder.java: id: 7b4d80b7c9de last_write_checksum: sha1:ecc814affbbafa08a62a5d5072a366e2edcab833 @@ -5672,6 +6688,90 @@ trackedFiles: id: 6a7db321d6ea last_write_checksum: sha1:6bafecf9429186f1e8a06099c78cec27e47eda50 pristine_git_object: c9405b330003b76d3d59a4fec5b80742f33ac001 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequest.java: + id: bb04bec1e778 + last_write_checksum: sha1:f3ab07bee688f144013d344974f80fced6a20540 + pristine_git_object: 8789366c7886194e97716ebc42e26002ffaf4bbb + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder.java: + id: 83cf702bcd6b + last_write_checksum: sha1:80804c12ba9c1e924e676f9e4a2ab65ad0bea6ba + pristine_git_object: 5619e8b0f95c651591e1dc665751d78a3e892349 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.java: + id: 5e639a94c121 + last_write_checksum: sha1:ca74ef2c75f8cc99f564e65a5cae639180294bcd + pristine_git_object: 415ab84dfbc350bf6d0a2983bd219b2eeb027ae6 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.java: + id: ff0f03d787e6 + last_write_checksum: sha1:9ca6c611c66b79f835c20bd291d71359c0b7f8c0 + pristine_git_object: 309c6ca603e17e32f6f115357d3e1215fcc2e1c4 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder.java: + id: 7c502e2d2ed0 + last_write_checksum: sha1:e17a7dc9f1276350b7e20862f442993ea698b24a + pristine_git_object: b059f7ba6242de3e350e10197ac94ea1d05dc427 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.java: + id: f4d30d4fe6de + last_write_checksum: sha1:27d26420705ba6e07c7f6c40b3f0ef657d9853f7 + pristine_git_object: 637808b3c44c5f74d2670581c3b1ef8317c36f78 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequest.java: + id: c62e0ab25af3 + last_write_checksum: sha1:e017c3e6665bd0d9868ab8a22df2ea857656b5ca + pristine_git_object: ba4d9ca9ab36ab16ae722ccc50be7d53eda1ecd1 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder.java: + id: 080479a8b46d + last_write_checksum: sha1:c8223c5881745322f606c7316b8219c8e1d06a9b + pristine_git_object: f3cb79a928f209642596ca52342fb743c2054205 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableResponse.java: + id: 0684052ecaf5 + last_write_checksum: sha1:515f6a0f556685c9b94a84476c366430e086497c + pristine_git_object: 1b2a0ffed000a34a08afc05b73a08b940eaa7de9 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.java: + id: 2129696ff1ef + last_write_checksum: sha1:36e93c6f60cbaca3192837f3b57759ea9b6024d2 + pristine_git_object: 1494effc8f15294269853234d92cecf76492fbf4 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder.java: + id: 124f1161cc32 + last_write_checksum: sha1:cc029074032082ab46fcf9f5cd9f4e7d5edda167 + pristine_git_object: c4f9f966e7c82750409f5be50a544fe112c96f9a + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.java: + id: 9c993b220630 + last_write_checksum: sha1:7fd717e235e36054c1259f13650bc19d3995336e + pristine_git_object: d7eb6ff6177ffe77ca2009445c07c46385102bd0 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequest.java: + id: 13d6e59eed54 + last_write_checksum: sha1:3238ab80ff4ad1dd89b2db379ef0b0a1848ab70d + pristine_git_object: 592c69751079f35234707ff66f74e0f8722b8edd + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder.java: + id: 3cbef63fb253 + last_write_checksum: sha1:66a8d62492c8c50dca76b3798018865a18b9bf01 + pristine_git_object: ee8505ac7191ce3fc22e761ec41fe95493610379 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesResponse.java: + id: 1a5e48eaecc5 + last_write_checksum: sha1:63d9792b62fb9552b1e0091de5d642a01779a52b + pristine_git_object: 2f5c6ed00952aef2590efff8e5c4c13d94678fe4 + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.java: + id: 21d61f63ec9f + last_write_checksum: sha1:f76c2f91f07cccf5d4e87d7779519c5fe131a78e + pristine_git_object: 702bfd99d752f7f2705a93cccc75387925f02e5e + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder.java: + id: 6cae4d850419 + last_write_checksum: sha1:1af0d52cf5e743c43614a49fc56329edfb52d700 + pristine_git_object: c292d4f74cc28c8f49cbb3ae6b1fbcc5ea08997a + src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.java: + id: df8c4b1f052e + last_write_checksum: sha1:a192b52f560f91b9d3f01ffe179303927915fa71 + pristine_git_object: 3f4443514593665115cf0b26ee6a3689af6a2d4b + src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentRequest.java: + id: f991f4afc374 + last_write_checksum: sha1:c4b05fbaf1a0bd264f8f20edcc879363d6130936 + pristine_git_object: 70954de921fbd5eaa7f41ba1c2b3e5d15d334187 + src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentRequestBuilder.java: + id: c1ab9e5f1550 + last_write_checksum: sha1:8a1e65052e7b9d1c58f88cf57f99dbc683f9ec11 + pristine_git_object: c208be2b1580286c3f01fc564f4107103af47a46 + src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentResponse.java: + id: 653d6aed45b7 + last_write_checksum: sha1:6dc9ae162167862b4224d5a6929004246b4337e0 + pristine_git_object: 0543c63efa506124577a52205e6ec12e5f752376 src/main/java/co/novu/models/operations/EnvironmentsControllerGetEnvironmentTagsRequest.java: id: 94f82a80b8b2 last_write_checksum: sha1:4c20ee18d894335553341499eb99e89c173aaf51 @@ -5684,6 +6784,18 @@ trackedFiles: id: 000cfbe1e991 last_write_checksum: sha1:988bcc2fe5a9425631f64b5e220f0fea4cd96716 pristine_git_object: e78954a387cf92195ca6229e2a19a034f6e570c1 + src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentRequest.java: + id: c0dd84ba1816 + last_write_checksum: sha1:6792a1079640ac26259d28eb95007d4324ec4197 + pristine_git_object: 0fab2aa583388b013e41e07d52757a5dcd976e04 + src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentRequestBuilder.java: + id: 4ffb27becb86 + last_write_checksum: sha1:0a2049ade8de420591b5ba7b8f191322108c2d38 + pristine_git_object: b903d2f5956925a824f699da3750737f0a2164d8 + src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentResponse.java: + id: 36926eed0b63 + last_write_checksum: sha1:2be248ce78bf8cc57796e67fa01c8db532bab755 + pristine_git_object: 64d5bb537aabb1bfcd98d2d16dbf018c6f8eee79 src/main/java/co/novu/models/operations/EnvironmentsControllerV1CreateEnvironmentRequest.java: id: e660c6db502a last_write_checksum: sha1:8ca97180a51c3a5767a9e34a57f879869c53738b @@ -6048,10 +7160,50 @@ trackedFiles: id: db0d742ed061 last_write_checksum: sha1:8d308ebb82a0f94a2d0f22c1c91c8c21f2a50fca pristine_git_object: 9b76df47260ae2ae4b718aa4ff65099ad57dd52a + src/main/java/co/novu/models/operations/Severity.java: + id: b907167d63b5 + last_write_checksum: sha1:f2dc01397929156bc76f6ddfa5bc07372f126512 + pristine_git_object: c83f12b11f0c0ed40b2964538ce2054b45b64a45 + src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsRequest.java: + id: 9c1b3e7a8d86 + last_write_checksum: sha1:577623984a45df317ae5b521c46da89688b03950 + pristine_git_object: 85e8f49e81f390d557bed2eb8b19312064a52b95 + src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsRequestBuilder.java: + id: f4b36b5751ae + last_write_checksum: sha1:c228ae46297fb69b78bd96a954ba88b87217730e + pristine_git_object: 1ba5ccdfd096fe347d3e95b7bca5113c861dbf90 + src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsResponse.java: + id: d2afdca838db + last_write_checksum: sha1:aae1bd5d3ca14b104b8ffc83d6f907edea1ed5a3 + pristine_git_object: e175133dcdb26c70705d73b0f98aeee9128878b7 + src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsRequest.java: + id: 25d2cae24a9b + last_write_checksum: sha1:baf8002274c76f51c99fd4f7d90d88d2aebd8998 + pristine_git_object: 065d96a1400dd853dcee3d0ce9c759aec9ce3a44 + src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsRequestBuilder.java: + id: d842305d594b + last_write_checksum: sha1:b77901ebc942a1dafb13b79d7e48320618f31628 + pristine_git_object: 90b15d687244f7ff475e60a67fc77fc439b9466c + src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsResponse.java: + id: 363669b34f8b + last_write_checksum: sha1:60e415567f72b67a5f0e783cef57e658441c0d9f + pristine_git_object: 204fb637eacd3621d28f45e7b7524f57a181671c + src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationRequest.java: + id: 5178eb4798c6 + last_write_checksum: sha1:4a3f2486318e6f50627a1d3b522edb930f96246f + pristine_git_object: ef7c611e65cfee4bbf8aaee83b9783151517f3ff + src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationRequestBuilder.java: + id: c3b09fc5079c + last_write_checksum: sha1:72be2024479b07985e925ae603b245ca63a132af + pristine_git_object: 9add097d3538c1f86b098b65f49d5529c0d30db1 + src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationResponse.java: + id: b04974f5a059 + last_write_checksum: sha1:ad8832eca83914b3e4303f67f88025c0b7baa050 + pristine_git_object: 5b15f0a568820039590e7744127a93163f9b354b src/main/java/co/novu/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.java: id: f812165237b0 - last_write_checksum: sha1:73f35377349cebcbb14affbb041b1ec57f110565 - pristine_git_object: 18e2b2c23cf9445f98feb32836e11bb0a554d415 + last_write_checksum: sha1:756d667ad0a9ca156615826b6181a2e6c72cb923 + pristine_git_object: 3aa311ee4ba150c983c16a18475c2cc70302c8d8 src/main/java/co/novu/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequestBuilder.java: id: a9d2337a90c2 last_write_checksum: sha1:cfa300c35ada343c258ac00a444b31b0163cc202 @@ -6060,6 +7212,22 @@ trackedFiles: id: cf3a1c4bc98b last_write_checksum: sha1:01615413bc91f858404ee12ce9158520392f04de pristine_git_object: b9915ec2b6da0d38c434e62f7ae53d2db23e4ac9 + src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionActionType.java: + id: 0225c659e515 + last_write_checksum: sha1:f1ce814a1a37f05c556a8d680b0875e2ca3ae21e + pristine_git_object: 2f2c99d4a895c0088a7e7c51af7f777a67273c73 + src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionRequest.java: + id: dc1665fae004 + last_write_checksum: sha1:228084691dc391c3e5c197481f1814431576f63f + pristine_git_object: e555f666d8f3b1b0fe3cde43fdbe0a477af4fb87 + src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionRequestBuilder.java: + id: 6d7e78270306 + last_write_checksum: sha1:4d312226b87cf147309f3e1d643620cfebce44d3 + pristine_git_object: cb9bd7e0dc652c0728a242e9d951a78304ab4a22 + src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionResponse.java: + id: 6774f01f6c17 + last_write_checksum: sha1:f24d00d527bb2aa245b27964d394c93fc50a8ea2 + pristine_git_object: 8bccb9f99b9ab164bca700e84e856f9eed6ede34 src/main/java/co/novu/models/operations/SubscribersControllerCreateSubscriberRequest.java: id: cfa1c5f2c5ea last_write_checksum: sha1:c2dbe5a0df0508578b77fb9b97e42f10c07417c0 @@ -6072,10 +7240,58 @@ trackedFiles: id: e501fcb6ced3 last_write_checksum: sha1:7796d7f14e17b05c295ce6db6ede3a6134b79193 pristine_git_object: 0053f2f62f7b7cff571c2e42e67328a0be975c54 + src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsRequest.java: + id: 36fe4330f9ca + last_write_checksum: sha1:56f6a8df993d986eafdd9727045d7b04cf722cfd + pristine_git_object: bcc0de203229e62ef8da9f7d6e1c84b5e21565f5 + src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsRequestBuilder.java: + id: be624013cfe3 + last_write_checksum: sha1:b5a1c8ae04737ec0609664c6771856df66e1ea18 + pristine_git_object: 7cdbf09b20575b7df855aa487c312c48461bcdb1 + src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsResponse.java: + id: 91da68b597ac + last_write_checksum: sha1:78baa37e4cb2e2632aa612ded515a3812494b6ad + pristine_git_object: 92839a65e01d3828373db905b972e02e6678e7de + src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationRequest.java: + id: 923aa22133c4 + last_write_checksum: sha1:6bc38cc4a2d861212ae477c6f4ca781198a247dc + pristine_git_object: 37f68f32e341ede7da7b8eab3268ae5851e329bd + src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationRequestBuilder.java: + id: bbc440842d00 + last_write_checksum: sha1:dc9c8f5a1d23fe3ab2371c65012f3160d052f6c8 + pristine_git_object: 6fea0188d3bc67ca891c2e43f6d0d2fec4f7515d + src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationResponse.java: + id: 4a85c1e5496b + last_write_checksum: sha1:5a16c2f91ec97c246844128f5e4aba4492f3587c + pristine_git_object: 97925c5dd9cb5e21ae3915e10e27c23e5fa179f6 + src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequest.java: + id: 5ebc69268e48 + last_write_checksum: sha1:58bd6873c693adb6d896636ddc82551ba464ccf7 + pristine_git_object: 17ad5738d083533be00eac79da905835b99a63a4 + src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequestBuilder.java: + id: f06b6c2b6759 + last_write_checksum: sha1:16582232972ea2be72507aa73dbf5b10537e316f + pristine_git_object: ff72525e9a697c625bfd92ff8f39db0a7d9943f3 + src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountResponse.java: + id: 762c0abe8f0f + last_write_checksum: sha1:8e616b0a2f24bdc4928742980b731a4ca3f7e2b5 + pristine_git_object: df2187469385649e69e667b552a47cf4d0f150ce + src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsRequest.java: + id: 255c20f6807a + last_write_checksum: sha1:4f607893b640f51536f3f2c500881f38e599f41d + pristine_git_object: 26921e94620e31a99d3a0cf96a740913115779fc + src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsRequestBuilder.java: + id: f159ed308329 + last_write_checksum: sha1:7ab1ad4fc56a48130f9795091c96b57ee2c60a17 + pristine_git_object: c35352f879e7f055f8b7577c14dce594094f4cce + src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsResponse.java: + id: 8c31d1751073 + last_write_checksum: sha1:c7826cb1eebb6ee13774d4594bfcea621c2697fc + pristine_git_object: 30e4b1b27cb8c506cc183f36be54338e0b6976cd src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.java: id: 1db09f2a7d12 - last_write_checksum: sha1:1cee289c8d82de48380a219c2867747c18043f4a - pristine_git_object: cd22ba5292ed5631cda53be7c2ff0d9bed9671fd + last_write_checksum: sha1:05eed7a501ac2513208685892e1ed96778b50bbf + pristine_git_object: 4f0638b7c9d4ff2a8d61e066c0c79f251fffa6be src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberPreferencesRequestBuilder.java: id: "38340526e239" last_write_checksum: sha1:f673be5ab69916c1eab15c51d1e7cac752290799 @@ -6086,8 +7302,8 @@ trackedFiles: pristine_git_object: a19522ac8d222dc493a9ba09963f7e3bca588d77 src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberRequest.java: id: 2291eb79dbf9 - last_write_checksum: sha1:9e99481446a6134e7c6150f5dd3589a06e2c61d3 - pristine_git_object: be4c1fb53ca29bee66d3bcbb2f18e42c3cf37e78 + last_write_checksum: sha1:b7da7edce4046a86b6243546955afc424cfdf396 + pristine_git_object: 64c2f9f0577042d1e6aaa72156a1752e62b8bac4 src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberRequestBuilder.java: id: bcac24cae225 last_write_checksum: sha1:6c10c461e1010c4dbeabff90a781f46c64880b25 @@ -6112,10 +7328,58 @@ trackedFiles: id: fa763b9a922a last_write_checksum: sha1:08832b1938447dab0356017b73cc31f41c65763f pristine_git_object: b788718a580a45d460f7e5459c5a805814675455 + src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequest.java: + id: 7c6e5fb8334f + last_write_checksum: sha1:952da70fa773dfba870e674ad4dc9ecb12aa9469 + pristine_git_object: 583a6144d3f74071030f0107b4cf21086b8b1721 + src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequestBuilder.java: + id: 9dc7f7567b7d + last_write_checksum: sha1:048acf3e98668a8b56f8abde8184561a810b846b + pristine_git_object: 74cf3502873430e1814b8be6dcb55f7797545d0f + src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadResponse.java: + id: 7b32ab5bb60f + last_write_checksum: sha1:16ee81bfbd85afbe74f37f67fd12164e32cb39f1 + pristine_git_object: 760436c0d8b089a8307caa78dc4b87aee5793b46 + src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadRequest.java: + id: 9310e3abb30c + last_write_checksum: sha1:929ff17ab74e9ee9de072de57f928c86e15f1e5b + pristine_git_object: 631fbe956d76f05af8ce310d3af005587f681aeb + src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadRequestBuilder.java: + id: 4f7c51a5333c + last_write_checksum: sha1:4d2e063504be9f3d1bae528ca8bb577df4209b66 + pristine_git_object: 9555792b04b4ebcbad672dd81133f6881c1d4281 + src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadResponse.java: + id: 7d09f699686c + last_write_checksum: sha1:d24ab3d3ec8b53dea27030aab5a8a0a312c0bc92 + pristine_git_object: aba6bb6eb2c5636e31218670eb568a38c954ebf6 + src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadRequest.java: + id: c42f9615c315 + last_write_checksum: sha1:55f8e2b93eb62bc67236fbe7e2eb1fade7a8d66f + pristine_git_object: 94889e95782a001b0e571c02d96f952550b866c6 + src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadRequestBuilder.java: + id: db4b44edc897 + last_write_checksum: sha1:b7a818e320f80bf92019cb2f4878c093e59e9ae2 + pristine_git_object: d7fd374704bcd5762ff60f16053a608847be3e93 + src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadResponse.java: + id: b5433874f66f + last_write_checksum: sha1:db338ec38f6b1070cafe463e53bea2072aad84c9 + pristine_git_object: 4094672628b68b89254431260c8b392978d10971 + src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenRequest.java: + id: 24c6d0054d66 + last_write_checksum: sha1:61265c1cef539f5f906ee81c3f91c1f9ee152e01 + pristine_git_object: 87a60739280e33de73db54bae46580c23ab9aca5 + src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenRequestBuilder.java: + id: b7faedb669e9 + last_write_checksum: sha1:7d2b75d2dd6c408549358ed263f25e54a593eaa6 + pristine_git_object: 0c056af3cbd104dde3db2bd651755c25c7bd54ad + src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenResponse.java: + id: 64fad950198f + last_write_checksum: sha1:7100f68e1665efd5957c7aa3977c29bedd36509e + pristine_git_object: cd538e52d145ab5e996d17e7e0059a8e7448d552 src/main/java/co/novu/models/operations/SubscribersControllerPatchSubscriberRequest.java: id: 04bd04ffdcf3 - last_write_checksum: sha1:f8a6fd617ce95313c37446b6b3fa2a4e1eb34dd0 - pristine_git_object: c7fecb6ca349ea7a0672a7b40c61c946d0e12ef6 + last_write_checksum: sha1:c6b87c6388fb5807342a1e312bacaebe179c1070 + pristine_git_object: 3666b41ec86d0cb78db46c1b3cedcbef0c797775 src/main/java/co/novu/models/operations/SubscribersControllerPatchSubscriberRequestBuilder.java: id: d5b7b9756718 last_write_checksum: sha1:6b7af8e40211c5edb10ba4dc199517e9352d9f60 @@ -6126,8 +7390,8 @@ trackedFiles: pristine_git_object: ba369c6f79a7b6460aca18007da06dfbfd22ead3 src/main/java/co/novu/models/operations/SubscribersControllerRemoveSubscriberRequest.java: id: f87961c19e45 - last_write_checksum: sha1:ba8b9a2537a663fd857ff93e13a1a079bd51c8ec - pristine_git_object: 19c49f7872e1906b16de891abd3ec1fb923075bb + last_write_checksum: sha1:7a71b11b87c59ebc927c118fb15ddcde42e56c0a + pristine_git_object: 7ed41df21f2ff60daf30c277f8b3b485da5d3dc6 src/main/java/co/novu/models/operations/SubscribersControllerRemoveSubscriberRequestBuilder.java: id: 3dd37d387e3b last_write_checksum: sha1:52a1d91ed78f2a4f9a0592baf1913cd6fef53cb4 @@ -6136,6 +7400,22 @@ trackedFiles: id: 83a5608c817c last_write_checksum: sha1:7f01330a45c7ac520eb73be955d9065518824444 pristine_git_object: 685f202ea619ea1b7877287efdd50a7c9da8f780 + src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionActionType.java: + id: f9716eaadaa4 + last_write_checksum: sha1:89c2ae36ec6e1347fa59861683a98cba4995418e + pristine_git_object: b4d49f04450a53ffedf753f2048648b7b4d48dac + src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionRequest.java: + id: 05c4bad59ec6 + last_write_checksum: sha1:354f394461bd5b3adbf018631e92adbcbc136255 + pristine_git_object: 49045e02f6e7144603f96363681d556791b78b69 + src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionRequestBuilder.java: + id: 9fc8069d9e10 + last_write_checksum: sha1:c36776890c166059e3c27e8b55e38f0d9ed91118 + pristine_git_object: 806d04feac4f70b5f1eee7804e865f238b07b7e0 + src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionResponse.java: + id: 2d21bf5275b6 + last_write_checksum: sha1:b98d14168039a1e9d8b5ab288f840b317abe9100 + pristine_git_object: e6149ba2b8fc70681d4aab3c9804d95c7058cdd6 src/main/java/co/novu/models/operations/SubscribersControllerSearchSubscribersOrderDirection.java: id: 764c8d84affe last_write_checksum: sha1:64d5e12e03790f5194bd2a7cb3dbf39c765f4f5e @@ -6152,10 +7432,46 @@ trackedFiles: id: 68a3749340b9 last_write_checksum: sha1:315ce3a31e6ff8dd936bec6e15d522e1802fdac8 pristine_git_object: 7ef468c4c6279cdcfc99bd1d0a8df556c497dcb3 + src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationRequest.java: + id: 1f7a0ec47bcd + last_write_checksum: sha1:7ba4dc5ac1442a912f672df8f217bed890a997f5 + pristine_git_object: baf865d4c2abc9de1799d2d94760c1c657a46054 + src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationRequestBuilder.java: + id: 97c94fb260a7 + last_write_checksum: sha1:5868e4f64ddf5e3fcbf396e0e2aeef5e685e624e + pristine_git_object: d767069029f5ae16a2c9f90dd44b7673090c1b2a + src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationResponse.java: + id: e30478fc2a14 + last_write_checksum: sha1:420f33509c78ddd24e378ad123b3d7fe5d2b58d0 + pristine_git_object: 680e6b8d6d48d09bea5aa50926d82e692597f7db + src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationRequest.java: + id: 81e33ed03e46 + last_write_checksum: sha1:a2a089adab4b609dcebeadf3b7309ab5a3248cfc + pristine_git_object: 73d8aa65027bedf287b42a5a712792c6e2ae0285 + src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationRequestBuilder.java: + id: 9241923cb59f + last_write_checksum: sha1:32c53f0bc48f253d5c93890adf8a0fce973743cf + pristine_git_object: a61c52695495dcc5915fc7a88e78272343ec6ae5 + src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationResponse.java: + id: abe7dcc1fb7a + last_write_checksum: sha1:25989bef3631495817ff65d12528071d12edd8d3 + pristine_git_object: 45d9db1a79b12dbb1debe3f0dca038934c0c4635 + src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationRequest.java: + id: 2708d1253b28 + last_write_checksum: sha1:741a793a4c06d706b40f1eba48433a4448eff34b + pristine_git_object: a04ac758d034f9adb6f40d238eece3870ef938a4 + src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationRequestBuilder.java: + id: 2837d43c602e + last_write_checksum: sha1:fe8d018d06717e715165d17ec71712d8397c6e81 + pristine_git_object: 7e0d5ac22633eae7ca6c1bfda34c9449626b5b92 + src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationResponse.java: + id: c3286b66b9bb + last_write_checksum: sha1:9153302562d4d17fc488b88be2f6d5e9d852cdb3 + pristine_git_object: 25706cb19cbf2f9ae37f40e160b4f404c684b9ec src/main/java/co/novu/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.java: id: c1c27054823a - last_write_checksum: sha1:cd8620bba8fc96c3dabce301f71845af68b43743 - pristine_git_object: 9c3f1587e36152b6b6324189d616e7f538a17333 + last_write_checksum: sha1:b2ab1ab7389336260810c9e4a5a48c5ba33ddad5 + pristine_git_object: 7c9398305340fbd278a79cd93ca2763baaea99d4 src/main/java/co/novu/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequestBuilder.java: id: a14de4f8941e last_write_checksum: sha1:dd0c8120b86bdd737c924b746c49457f30ddb225 @@ -6584,6 +7900,18 @@ trackedFiles: id: 3565b68b35f7 last_write_checksum: sha1:74ba943b9f89eb438097c203cae7bbf1b0337499 pristine_git_object: e35a8927bc2810322dfeace3d0ca358392e815b6 + src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewRequest.java: + id: 3e7a1721099a + last_write_checksum: sha1:a244011ebbdbde307895ba307d686dbdbb724226 + pristine_git_object: 141c6a04161bd158829a90f2957375cd6c3483a7 + src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewRequestBuilder.java: + id: ca277b6e82f9 + last_write_checksum: sha1:244bde15f9c774f2a5f9ff8b01473e4c1f73959d + pristine_git_object: 6b4d33c23358eb56de0c9d4b5970d69fa8466a24 + src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewResponse.java: + id: 64097154957f + last_write_checksum: sha1:1463b2765c6cda1d25f79c01a60b8a7d91c5502a + pristine_git_object: d9d232fdff8cfafa18107ab01b15e91ada5f3d6d src/main/java/co/novu/models/operations/WorkflowControllerGetWorkflowRequest.java: id: 48b0fa0ec585 last_write_checksum: sha1:328ce66bdeac9da2609b077da572197c9ebe4345 @@ -6728,10 +8056,42 @@ trackedFiles: id: f64c28f1b7e2 last_write_checksum: sha1:c1d8119ad0e79f91432921738ababa09d8bd58df pristine_git_object: 7dc84d6ab2d219d7800f1ed79032fc43a0b805ce + src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.java: + id: 5ee7b0c65be7 + last_write_checksum: sha1:52624107d590132220408b1e60339e107128c357 + pristine_git_object: f74e701d1e65a70fbc530c9064f0078394ec477d + src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.java: + id: 90e7ae71327a + last_write_checksum: sha1:8f182c85b09cf4181e260cfcf6507263ba7a62f1 + pristine_git_object: 8d5205db6f4f388be6f8cf476183b3adf8bb5759 + src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableResponse.java: + id: 66dafbd7d06e + last_write_checksum: sha1:795807e9264867e574768170cccfdc65eb5b0792 + pristine_git_object: 3b5a2f73312b8198eea88ea8ffc432e36efd9a05 + src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.java: + id: 4319979e37b6 + last_write_checksum: sha1:5dfc8ea8896e1b345f09109cc09deff643367176 + pristine_git_object: 67bb9c80a48dad9569382098745be91670bd1093 + src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerListEnvironmentVariablesResponse.java: + id: 76becb06cf93 + last_write_checksum: sha1:c5e1c627cad40d5d4dbbdc475000f67d596aaaac + pristine_git_object: dc86ff6df5dc23ae0695e7cd5c260b294874ee78 + src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.java: + id: c9becdf31976 + last_write_checksum: sha1:a45816d5a2faa2b182cccec3b0db70e109c94975 + pristine_git_object: de09018c903975c2b7c9f291f8fc1db3648fb199 + src/main/java/co/novu/models/operations/async/EnvironmentsControllerDiffEnvironmentResponse.java: + id: ef9bf2da28df + last_write_checksum: sha1:0d58114eaf9f50165e19a63976f70c1f5beba471 + pristine_git_object: d8f3dd5d1d11fbb29eb134199b8c960942ca2161 src/main/java/co/novu/models/operations/async/EnvironmentsControllerGetEnvironmentTagsResponse.java: id: 405dc30028ff last_write_checksum: sha1:51f4f0358fae90af5f777636fb78bcfa0cd10624 pristine_git_object: 2c8c1aeafe775baf27886701d466f3c284032b95 + src/main/java/co/novu/models/operations/async/EnvironmentsControllerPublishEnvironmentResponse.java: + id: 8d9815e1054e + last_write_checksum: sha1:4c34fe41acbcf4c0454123c8be8df7d324c30e7d + pristine_git_object: 100fede965b387b29524a9ea710b6cef4028b4fe src/main/java/co/novu/models/operations/async/EnvironmentsControllerV1CreateEnvironmentResponse.java: id: 9d95837096b8 last_write_checksum: sha1:047fbd1ac777938e696a8343566b2ff5ced328a6 @@ -6852,14 +8212,46 @@ trackedFiles: id: 415c9c15aa7f last_write_checksum: sha1:1c0fc1c213f03a52d49ceb13b07914c7ef86aab2 pristine_git_object: 037d99ddd94e0d763bc7581f6fafd8f97975c921 + src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllNotificationsResponse.java: + id: 7386510f9264 + last_write_checksum: sha1:5c760cdab944ae02c0108ff891ea4266d3dad3d0 + pristine_git_object: f27dd6b8b025258ac8f3d4e7dbfec7203b1f535e + src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllReadNotificationsResponse.java: + id: e38be586871f + last_write_checksum: sha1:460b05685a254904b5f6ba27096c225d7056edbd + pristine_git_object: a3a99272b070541fd79d0e739914124063527e62 + src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveNotificationResponse.java: + id: ec75cb832991 + last_write_checksum: sha1:e80a6d2eea34bbd70ed0504a2c0e5622740b7192 + pristine_git_object: eb2388ff8fa096e89057cc47eb95be536f1d54fa src/main/java/co/novu/models/operations/async/SubscribersControllerBulkUpdateSubscriberPreferencesResponse.java: id: 7f6327c51d6b last_write_checksum: sha1:e93ddf858ed9fd7b1c977161ec6e93cf745fd0fd pristine_git_object: bedcfd96835258d8cc3763fbaa093fe947e94952 + src/main/java/co/novu/models/operations/async/SubscribersControllerCompleteNotificationActionResponse.java: + id: ebd210b14114 + last_write_checksum: sha1:658f00d606b6bd2fda09bc0ac143d3db628b6fd1 + pristine_git_object: 08ec61d5a4d4c5b010bbec03322e67be3339f4e7 src/main/java/co/novu/models/operations/async/SubscribersControllerCreateSubscriberResponse.java: id: 81c1ebb94f9b last_write_checksum: sha1:2bd1753f6b7d946becc607ed8192d59c93fbeecb pristine_git_object: 17a974e286d7b8359e51f659d3b19cb60a12533f + src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteAllNotificationsResponse.java: + id: 5e5c0d11f233 + last_write_checksum: sha1:ffacd5f3b06b2884e6883c4b08acbb8aad23acc4 + pristine_git_object: 69602efe6a8b3b1fd6d10a4401efd0a6717ab779 + src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteNotificationResponse.java: + id: a576a9f053d5 + last_write_checksum: sha1:5ddbfc9c1b10ba0456ce554bd73955cd3b71b0c3 + pristine_git_object: ceef4c60cc50762c2bffa2de9f93ba830ec5edd1 + src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsCountResponse.java: + id: 7bdfc490ce75 + last_write_checksum: sha1:6e2ea839f143028cb193965851aad96f30e967e4 + pristine_git_object: 9d3ab383af67e2d988f59a970bb9f5f7f07bb3b9 + src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsResponse.java: + id: 2210d7426c24 + last_write_checksum: sha1:a005cc0dea8893396e58ab9fbc51848d3882e7ee + pristine_git_object: e7d4b84504329a7d1b9ecd36e0b2ec50607b8f18 src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberPreferencesResponse.java: id: a66724dd9b26 last_write_checksum: sha1:3f0e41ac31ed2c839379031ea6fa225300250dfd @@ -6872,6 +8264,22 @@ trackedFiles: id: 0233d1965d5d last_write_checksum: sha1:888ec399825e898abdd312ce903a67e930b67f58 pristine_git_object: 44d2dfeb2a7e4f0f829472544aa0f8d986b49316 + src/main/java/co/novu/models/operations/async/SubscribersControllerMarkAllNotificationsAsReadResponse.java: + id: 000a6483802e + last_write_checksum: sha1:edde0ce8b99a281df5b55e1a12d4dc83d8fa617e + pristine_git_object: 746a272a7790b1c1de5a6a28cab1c7c9894306bc + src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsReadResponse.java: + id: 369cbb641a46 + last_write_checksum: sha1:6e25f064975484717d59ea525f963cdf292b7137 + pristine_git_object: 2cb1796613ad17bb374688f8f45aae540ed4be4b + src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsUnreadResponse.java: + id: b84bf1d6c734 + last_write_checksum: sha1:0a3ad3389bb5e741e80f4f06e644fb5243d8e4a2 + pristine_git_object: 4c1bf79f31246651bb1a4287975a9d31223ca31b + src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationsAsSeenResponse.java: + id: a5a82094cd1b + last_write_checksum: sha1:794dda668119f7e71d69b6198d99b5fdea879b30 + pristine_git_object: 9aecb8a8d141b67f3cf7ee10bf221b40e554e0ec src/main/java/co/novu/models/operations/async/SubscribersControllerPatchSubscriberResponse.java: id: 333941cd6cd6 last_write_checksum: sha1:7c9081d4dd6393d8036760ee2ad2b77a4c2718ed @@ -6880,10 +8288,26 @@ trackedFiles: id: 0b315daff989 last_write_checksum: sha1:6af2aa67853b17b1308b2399411816e0102398e1 pristine_git_object: fb6809215a96fcfc0bf4093703f9911401eadf26 + src/main/java/co/novu/models/operations/async/SubscribersControllerRevertNotificationActionResponse.java: + id: 6d9086621ba9 + last_write_checksum: sha1:6d97a03805933aa83a9f0102f11a37d638b3f24e + pristine_git_object: 08277b2275fdb2e5c8a34ffcce1b9710d7b8e319 src/main/java/co/novu/models/operations/async/SubscribersControllerSearchSubscribersResponse.java: id: c3c01c58eb2e last_write_checksum: sha1:7e0112cf8f4fe5ebefc2e6511036c0039f89950c pristine_git_object: 3c25acbad1c73d1f33229a940e6ebad9caf653f3 + src/main/java/co/novu/models/operations/async/SubscribersControllerSnoozeNotificationResponse.java: + id: c22a1346feec + last_write_checksum: sha1:361ba877d531014dee141cbd74d4d9b633ec9ba8 + pristine_git_object: ba2ccb1614abe262a43ec046777d0cc6693c4681 + src/main/java/co/novu/models/operations/async/SubscribersControllerUnarchiveNotificationResponse.java: + id: 6ff3b46f205d + last_write_checksum: sha1:27427042853067d7b94a8c26c5e0e49b4ecf6c76 + pristine_git_object: 936c339f6b9354eabc99ddadcb3a339e73989f30 + src/main/java/co/novu/models/operations/async/SubscribersControllerUnsnoozeNotificationResponse.java: + id: 1e85613d25a3 + last_write_checksum: sha1:20a178aa354278e570ee4bb98c307ab4c5ed47fc + pristine_git_object: 3cc2d918e020901b7f44f164ce72675c46151497 src/main/java/co/novu/models/operations/async/SubscribersControllerUpdateSubscriberPreferencesResponse.java: id: 0e8d77aa6aa7 last_write_checksum: sha1:372d3cd8eeac76c9f360bb1f625cc8618a3f6e72 @@ -7012,6 +8436,10 @@ trackedFiles: id: 5c033bba589f last_write_checksum: sha1:6e1a342fd3a83a4247dcf16f0081ba19de12b725 pristine_git_object: 0c51271033b752f5383f218a31b13f8180505da9 + src/main/java/co/novu/models/operations/async/WorkflowControllerGeneratePreviewResponse.java: + id: f735f67e83d6 + last_write_checksum: sha1:c561c3f8bae8bf614e5feb1f0ed925fdd6489b9c + pristine_git_object: 8aefbb14c78a1ee462e7f5ebd84b23560fff622e src/main/java/co/novu/models/operations/async/WorkflowControllerGetWorkflowResponse.java: id: 76a966a119f3 last_write_checksum: sha1:2767eb9cacd4848fb34d2f44e6bbf45f2e37f5f6 @@ -7062,24 +8490,24 @@ trackedFiles: pristine_git_object: 70f1fd86c0f2e5ebb417fd287a531582993727d1 src/main/java/co/novu/operations/ChannelEndpointsControllerCreateChannelEndpoint.java: id: c3e441b706a9 - last_write_checksum: sha1:2418c92e0337d34cbd8dd63991a3377a81771fb5 - pristine_git_object: 09bebc9cb9d85d9fd5ebf3867725f0f9812235d6 + last_write_checksum: sha1:c0dce65f0d88e258812251734ea2567e8d7bbfb3 + pristine_git_object: a6eb92090a8c302fecf2e1b78beadd388ef7d8f4 src/main/java/co/novu/operations/ChannelEndpointsControllerDeleteChannelEndpoint.java: id: 0e253904edb5 - last_write_checksum: sha1:25e627657a52ff7e8a78dd86e0218a4a4000b854 - pristine_git_object: 90c3fc7e3dbd7b1fc7e152d9f7dacf664b062e9b + last_write_checksum: sha1:bc6d22512795478e44538061dfe899873c74099e + pristine_git_object: 7eee416c5b8f01898185bbfd3f99439479315321 src/main/java/co/novu/operations/ChannelEndpointsControllerGetChannelEndpoint.java: id: 30676f1d8d8b - last_write_checksum: sha1:bb5cbe6f35aa89e949972554553ba7e46f87c618 - pristine_git_object: 84a4171bffcdac8dfb19bea12b1a12d82f9a6937 + last_write_checksum: sha1:3d06a57ddcadde9f9e5269989ec782f5498c849d + pristine_git_object: eba570ba055a25235ebb7508b120284e29d51241 src/main/java/co/novu/operations/ChannelEndpointsControllerListChannelEndpoints.java: id: 565b3d483cce - last_write_checksum: sha1:96e415f88a221bb5d82b605b04c8d44892fabdbb - pristine_git_object: d257fac5f5c2e0ea06798a45be47194940ef1820 + last_write_checksum: sha1:f3fe522b59ff7aa6adcef8f426387b4c40b700f1 + pristine_git_object: 0aece13e0acffd0a1564a255236011768fcf1178 src/main/java/co/novu/operations/ChannelEndpointsControllerUpdateChannelEndpoint.java: id: b62475bb7a75 - last_write_checksum: sha1:fb8de0d227c0a03fda7752457d941f7b8bca8875 - pristine_git_object: b1d74fb00ba3688f5d81d009bbad20bf63d46d32 + last_write_checksum: sha1:0a346725059916cdb89f9b8025e9bbb26fa61d18 + pristine_git_object: d4e9f19b3ac8861d2d0574a65a1b65758255bfff src/main/java/co/novu/operations/ContextsControllerCreateContext.java: id: c9be274067ce last_write_checksum: sha1:612117af3ef870ca6ca74f1b5abc081adec59fbc @@ -7100,10 +8528,42 @@ trackedFiles: id: d606d9445895 last_write_checksum: sha1:59cc42b923f56888a8bbfa7b9c05e98826966c97 pristine_git_object: 4890021fc0651aca38e03ec963d54b67788842ed + src/main/java/co/novu/operations/EnvironmentVariablesControllerCreateEnvironmentVariable.java: + id: 606ddb35c253 + last_write_checksum: sha1:2039a85a309b8e7b0c5ca3e953678dc494cfd5c0 + pristine_git_object: 7d93c518d72b8492b09feae8afa39d046bae6161 + src/main/java/co/novu/operations/EnvironmentVariablesControllerDeleteEnvironmentVariable.java: + id: 8ff34d946b90 + last_write_checksum: sha1:ea1735af48ab9f0bb76b63c0fb898402df439584 + pristine_git_object: a744ba319388b93f9596958b5bcca37210ca0d0c + src/main/java/co/novu/operations/EnvironmentVariablesControllerGetEnvironmentVariable.java: + id: 87c766d5a298 + last_write_checksum: sha1:a6f9c67b151ccc6d7cdb55ba15c9ac2beddc7eb9 + pristine_git_object: 830d39708b4bc0fc107d7a3c07d1c62aab16993c + src/main/java/co/novu/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsage.java: + id: b494acb974a7 + last_write_checksum: sha1:b475169b602a5375c244682fe1297db24a1ccae4 + pristine_git_object: 7a62f573d0fddcb9be1cece72305aab96d8c70c5 + src/main/java/co/novu/operations/EnvironmentVariablesControllerListEnvironmentVariables.java: + id: 06860a197a99 + last_write_checksum: sha1:1fe8ca983a369ff6ac9dfb0c49b9df0400649183 + pristine_git_object: 4c0c9b51e95c9b1239ce37a05c0e8cce52e43ff5 + src/main/java/co/novu/operations/EnvironmentVariablesControllerUpdateEnvironmentVariable.java: + id: 91329ec4b4a4 + last_write_checksum: sha1:c1d3c2a184aa51b48e86cddead03082067794d0f + pristine_git_object: 17a9b2b63ea8f10f0cf6f4c06c65e9444992fd73 + src/main/java/co/novu/operations/EnvironmentsControllerDiffEnvironment.java: + id: d626e70ff73b + last_write_checksum: sha1:f7b02d582b46a0c17fb361d4b3f7c79f8e4b0cf6 + pristine_git_object: 72f73aed67c715695d6bf304340743815da2d66c src/main/java/co/novu/operations/EnvironmentsControllerGetEnvironmentTags.java: id: 5dda817fe9c2 last_write_checksum: sha1:ba278ade606e04aaaac1d1370a708a69bc625a1e pristine_git_object: 2402ddbb1c631eb9865beb283072e9b5638737bc + src/main/java/co/novu/operations/EnvironmentsControllerPublishEnvironment.java: + id: f732c06a6033 + last_write_checksum: sha1:9e6c55e16c9aa38b8e3771b4c11b99f77eda13c6 + pristine_git_object: 467d01401235de069157d49059d85dbfff3f0db8 src/main/java/co/novu/operations/EnvironmentsControllerV1CreateEnvironment.java: id: 46038cbb3442 last_write_checksum: sha1:b501d64246884b27afc401bb9c07b80bbaea28db @@ -7228,18 +8688,50 @@ trackedFiles: id: 0f151638197b last_write_checksum: sha1:1adaa8e5e9d2f7891ee6c47bddf8989022dd61ea pristine_git_object: dee63ebfc8c177c92414df2d00e8a486cf474996 + src/main/java/co/novu/operations/SubscribersControllerArchiveAllNotifications.java: + id: dfe914e0703e + last_write_checksum: sha1:3569b1308bed6e86f07c5d7ae30cbfb201bdbf9d + pristine_git_object: 5797abd9221e5650cac200933042ad2f42c64d03 + src/main/java/co/novu/operations/SubscribersControllerArchiveAllReadNotifications.java: + id: cde29a5bfb8d + last_write_checksum: sha1:4bf9e3ddac07e7466fb7f0aa3bf9abf1a0ca9636 + pristine_git_object: 37a06ccbce093d4ed29af5595aeb0ce9db676392 + src/main/java/co/novu/operations/SubscribersControllerArchiveNotification.java: + id: f59234166c31 + last_write_checksum: sha1:9bbc2ae1524d5887c6f07743dc642979007120ae + pristine_git_object: 8537a5acc0263a59ae1b98b1ab72f77dcb6ccef8 src/main/java/co/novu/operations/SubscribersControllerBulkUpdateSubscriberPreferences.java: id: 6fae88e2560f last_write_checksum: sha1:f6fc28a055edb6c608e6e7ca836cc581e6c77bac pristine_git_object: 39dd52dbe10e7b9184a9f2eb90cabc03608adc67 + src/main/java/co/novu/operations/SubscribersControllerCompleteNotificationAction.java: + id: b5637cee3076 + last_write_checksum: sha1:57b48e1f18cda88b15dffadd1cb34814d3850244 + pristine_git_object: d69908de23636e67fc263e6c211615a4f4dc41b2 src/main/java/co/novu/operations/SubscribersControllerCreateSubscriber.java: id: 0ad6654c93ae last_write_checksum: sha1:946f5baee42fe15cc40801bd14cde44352a5fa41 pristine_git_object: f6132c3d84c4d82553b2b6ceee636cbbd6c66556 + src/main/java/co/novu/operations/SubscribersControllerDeleteAllNotifications.java: + id: b63a67257216 + last_write_checksum: sha1:02e2a74899801d8cc081ecdef4a8ccde4a961928 + pristine_git_object: 4517846fe3e4cd78d8b91aa6d4771b678da8283c + src/main/java/co/novu/operations/SubscribersControllerDeleteNotification.java: + id: c13cbdf6ea75 + last_write_checksum: sha1:74c9cc356b6e8aa56cc6ad09f65d9477c0bef8d5 + pristine_git_object: a46ee3863ea04bb6e8079e2cd373f38c6a902669 src/main/java/co/novu/operations/SubscribersControllerGetSubscriber.java: id: 5b722994930f last_write_checksum: sha1:33dc12d16512f595ca60e04be261806ce524f949 pristine_git_object: 1739bdd8ddc1e6aa4e56aa6d7bb9639113a57351 + src/main/java/co/novu/operations/SubscribersControllerGetSubscriberNotifications.java: + id: 4cb3e0b2193b + last_write_checksum: sha1:a6d5a4f8fb2c37159596f3f7c1b67c29d78af4aa + pristine_git_object: a402e677ae66a88d755c753c88db825079fdd337 + src/main/java/co/novu/operations/SubscribersControllerGetSubscriberNotificationsCount.java: + id: 1c95096055f9 + last_write_checksum: sha1:7c4f56ff339b483cba808e0c49427a24e0d1df74 + pristine_git_object: 901b2689e9ca9c4156f7ed6eedc070e6abaa57dc src/main/java/co/novu/operations/SubscribersControllerGetSubscriberPreferences.java: id: d09f40a1398f last_write_checksum: sha1:c9500603cc0a7a9137a7b94fa54ca6d0b6ee8ad7 @@ -7248,6 +8740,22 @@ trackedFiles: id: a84800961c54 last_write_checksum: sha1:88faa03e39c72a090c1d61c9916fa359cdf43a57 pristine_git_object: fa9fd11e2bd94b51068e35ee3ce358927a400646 + src/main/java/co/novu/operations/SubscribersControllerMarkAllNotificationsAsRead.java: + id: 1f0db369918f + last_write_checksum: sha1:5f2bced0acbbe510db1424ec766b7fd1ef7fe3fc + pristine_git_object: dc15ff2d4d423ebc31d862f75bfe0801b16bedd4 + src/main/java/co/novu/operations/SubscribersControllerMarkNotificationAsRead.java: + id: 086f3b4a8f74 + last_write_checksum: sha1:1d073124fc93d995625317cb36cc932c81250b92 + pristine_git_object: e138cc956b2cdffef8661477fed95d01fc0bfe47 + src/main/java/co/novu/operations/SubscribersControllerMarkNotificationAsUnread.java: + id: 5b64baa3194c + last_write_checksum: sha1:9a28c80781c3d00b8cecd3e9c7c24063024e6302 + pristine_git_object: 343c8e90aafec1021d0522c39182d46e8b327012 + src/main/java/co/novu/operations/SubscribersControllerMarkNotificationsAsSeen.java: + id: 1685d84224c9 + last_write_checksum: sha1:a1f8ddc49e18632ee2102bbeef0f4a5016db1d09 + pristine_git_object: 1e5642157f6ee8e88cefb0e011acef9ae437c42e src/main/java/co/novu/operations/SubscribersControllerPatchSubscriber.java: id: 6dfb1dfdabc4 last_write_checksum: sha1:52e796faa7d1e5e36d27b87a613e6fdd06336192 @@ -7256,10 +8764,26 @@ trackedFiles: id: 04bb7dd88321 last_write_checksum: sha1:38cda00927e87eab136d474fac2a83be09c3c6e2 pristine_git_object: 72f59d59b3f8c0b49396e76ca34d24be396c81ef + src/main/java/co/novu/operations/SubscribersControllerRevertNotificationAction.java: + id: 7522d827be95 + last_write_checksum: sha1:c59710d20e8bc971e1df4483714dc5a992fa5d40 + pristine_git_object: dd7b3a76c3c7cb6ce1b3ea572cd02015185325d6 src/main/java/co/novu/operations/SubscribersControllerSearchSubscribers.java: id: 8f23c4dcb997 last_write_checksum: sha1:2b8785d300b7596b0692c35c2b6bdad01c7ab521 pristine_git_object: 18cf686a6c502e93bfa0ff4cb7ccec0c242dc967 + src/main/java/co/novu/operations/SubscribersControllerSnoozeNotification.java: + id: 30d975ff5e44 + last_write_checksum: sha1:e2be9d8af7818d9c82d0a625c803c26c7035b465 + pristine_git_object: ce77c477762a10eed5c730938662d5bcbb4fde82 + src/main/java/co/novu/operations/SubscribersControllerUnarchiveNotification.java: + id: 31146bb6ec9d + last_write_checksum: sha1:0586b2899ca41c83660742dce9190ed05a407a70 + pristine_git_object: 63edef24c4def30a64b28e26e91a42dd39ed9ad7 + src/main/java/co/novu/operations/SubscribersControllerUnsnoozeNotification.java: + id: b6700346a5e3 + last_write_checksum: sha1:50b5f1768ea2005442f1b75227edca8f6ea291d3 + pristine_git_object: 8dca28723b8cea64674939f2d6a5862c407da2a8 src/main/java/co/novu/operations/SubscribersControllerUpdateSubscriberPreferences.java: id: a33bfeb8ce24 last_write_checksum: sha1:71d8143bbff29910a6e666d0626d4286e420577a @@ -7350,44 +8874,48 @@ trackedFiles: pristine_git_object: 6702058fb63322555dcffcb1cfbdddb08183c1d2 src/main/java/co/novu/operations/TranslationControllerCreateTranslationEndpoint.java: id: 1961431d2a8d - last_write_checksum: sha1:a96b6000938d1353507f7c00bb0451426da82fb8 - pristine_git_object: def14a051453c75b3e11abbedeaa6e34129b5cf7 + last_write_checksum: sha1:5cd17bb46d8da5f19529648a1b2ddcec3a55f357 + pristine_git_object: c3efd66be686f8a6d4ddaeec3611928f8a0dddfe src/main/java/co/novu/operations/TranslationControllerDeleteTranslationEndpoint.java: id: 19b3a01805c3 - last_write_checksum: sha1:026cb3b82471a4e039f95b1736e659e6ef403629 - pristine_git_object: ab2d3142a428ac50c01470a403055afeb0271bce + last_write_checksum: sha1:5bf64f1950cd8fc23bbe34ea8e54c0a841a92844 + pristine_git_object: edbd958579e00c96659befaa1b8f46557beb06d8 src/main/java/co/novu/operations/TranslationControllerDeleteTranslationGroupEndpoint.java: id: 9a89a6162b1c - last_write_checksum: sha1:667219dc373ad1e618196e5f0c8a2c77f7cdd63c - pristine_git_object: 704b8296f93a179cd9216f53cb6255951248c3c9 + last_write_checksum: sha1:c103ea407c0b248f408c40021eaef44a727416d7 + pristine_git_object: 90665f5b884547b20276396269a77fa835b749a4 src/main/java/co/novu/operations/TranslationControllerGetMasterJsonEndpoint.java: id: 3fd7b050cc75 - last_write_checksum: sha1:d5a996dab7bc3926836453ec20f6d5fe4a39b560 - pristine_git_object: ba8348eede29168d021b562ce48d4b3390302c7d + last_write_checksum: sha1:0db1b48b35aeb71ae4a1742f8d65a244386a7f8e + pristine_git_object: 826467310b01e7422c62b72e6665d6497eb77da7 src/main/java/co/novu/operations/TranslationControllerGetSingleTranslation.java: id: e0b00dd15bf9 - last_write_checksum: sha1:003c6e3ebf64a8b4f84b8397c2e9dd23e46b88ac - pristine_git_object: 6d86e6d751d05f9bafc7c7216d46712764e12239 + last_write_checksum: sha1:7379bc193680da8348d2dc3998245a91e264bcb1 + pristine_git_object: 2813c5cac1b04326bd79f705eb82e486717f95a1 src/main/java/co/novu/operations/TranslationControllerGetTranslationGroupEndpoint.java: id: e519e968c7ce - last_write_checksum: sha1:1072ae0ea2f6f504a2e1756085a4c16af808db91 - pristine_git_object: c794be93547eee382ef9810ccf70c6869de95848 + last_write_checksum: sha1:c807e77e2b40cd4fc1fb1f717fa94f4330be50c2 + pristine_git_object: 615a77826ad2290edac5ad9a4179d85abbee58d7 src/main/java/co/novu/operations/TranslationControllerImportMasterJsonEndpoint.java: id: 8a8674467cea - last_write_checksum: sha1:d1df409577c7714cf5de399da2387405a0e91256 - pristine_git_object: 04258f00e78c88cfaab61d0de177b4eba5f8e265 + last_write_checksum: sha1:e4cea266c10e6a20ff9758d3e9f4c99cc07ac9fb + pristine_git_object: e5da86a1216281fdaf9acd36fb3f78a089916311 src/main/java/co/novu/operations/TranslationControllerUploadMasterJsonEndpoint.java: id: 0aca562d3287 - last_write_checksum: sha1:cf9d77486cef8f15ff19c66f06deb3eb3792008d - pristine_git_object: ed247f7f84b14758d75396dd69daf20c91e187b8 + last_write_checksum: sha1:b731852e6765dd2e5e2e90b0448c5958b9ef3a56 + pristine_git_object: cbc63b0a01481a594d94b6863839a521c9fa9cf2 src/main/java/co/novu/operations/TranslationControllerUploadTranslationFiles.java: id: 590af2a21367 - last_write_checksum: sha1:838cad96e935563b9e2c06046d75782cd6faab9e - pristine_git_object: d3a9397a5aad2670055b6ba1070e87b528e02e6b + last_write_checksum: sha1:043525c742fcb91fbf7266086a7fa60a0b98dff8 + pristine_git_object: b57b5be094c42fc07b03ee6e6df276d52caad88f src/main/java/co/novu/operations/WorkflowControllerCreate.java: id: 02ce074112a6 last_write_checksum: sha1:4da177d3208b66685d9cfc426cc524cf3580b7c0 pristine_git_object: 3e62dfd5a88e4687357504e955eb1f4f27ea6868 + src/main/java/co/novu/operations/WorkflowControllerGeneratePreview.java: + id: 095f3e413feb + last_write_checksum: sha1:68fabf60df6a53e027ef5aa98dfde1b3839fdf3d + pristine_git_object: f56ace56ed1386466f0fefb736e37546c45cacf0 src/main/java/co/novu/operations/WorkflowControllerGetWorkflow.java: id: 2ee660ae64ee last_write_checksum: sha1:9c2a657fb5a82a7eb9a3ab35670e55874e88e77c @@ -7430,8 +8958,8 @@ trackedFiles: pristine_git_object: d6f1e93db1032daa3409743a9fd04fe85dc090b3 src/main/java/co/novu/utils/AsyncRetries.java: id: 41e642a22bc6 - last_write_checksum: sha1:7e8080ca55ea4d8f299dd03b0825a446adbbc430 - pristine_git_object: f14f8a487e9f37bb7a6b572b8c572d87e51bb7b3 + last_write_checksum: sha1:51bf58992a60326d8a5489b46da9638c9e0f76ec + pristine_git_object: 8d49a25be1db224b737369221b5e39389154efd3 src/main/java/co/novu/utils/AsyncRetryableException.java: id: 78a8085f0eea last_write_checksum: sha1:24148c6fef8e647e021ba8abb57e3d08a6361349 @@ -7470,8 +8998,8 @@ trackedFiles: pristine_git_object: 57e31191b71458895f41feff7b062d16273b0f9f src/main/java/co/novu/utils/EventStream.java: id: ccb172e74a46 - last_write_checksum: sha1:4488dd7706035c2f4355b8cf6a57b94ffbba91b7 - pristine_git_object: 64a83bcd9198186d7a9b5d1bd3edb1737804af9c + last_write_checksum: sha1:614bad1d283e4a2bc91783f1f33124522fad5127 + pristine_git_object: 4d54f775143007dfea80dbf08ae19caf1a7579e6 src/main/java/co/novu/utils/EventStreamMessage.java: id: 02120d6f4c32 last_write_checksum: sha1:a26d79a101b5bf797014309a9afe567e0dfc26aa @@ -7556,6 +9084,10 @@ trackedFiles: id: 9606daed0c5a last_write_checksum: sha1:a3c40e029353dbbcbcc2628c697a8b8d71940ce5 pristine_git_object: 47e5bfbe939633c70742fca9cd9b2c40b4d32e95 + src/main/java/co/novu/utils/NovuJavaJacksonModule.java: + id: fa5004028f9c + last_write_checksum: sha1:ea168b49c73ed3144aaa62774671c627febf3b51 + pristine_git_object: 8010e0d4ee3b7c224d23970b639fd13c8ab826ca src/main/java/co/novu/utils/OneOfDeserializer.java: id: cb0060599e63 last_write_checksum: sha1:8ee709fda27bed7763e4cb3737926c323cd4ec47 @@ -7610,8 +9142,8 @@ trackedFiles: pristine_git_object: 8109c1fa4fc3350218f957319acb39876f47cda5 src/main/java/co/novu/utils/Retries.java: id: 9f6b383d0294 - last_write_checksum: sha1:aa9cf6672f4263db53bef31aefc4701cede6ea14 - pristine_git_object: a22635d14fa6382b67c96efde84e3f7a4b9eb348 + last_write_checksum: sha1:19c4d80c212198c2a70d7bdeee955e09a4853d90 + pristine_git_object: ee9a1b500b4c692596f05356f0ae811d637436a0 src/main/java/co/novu/utils/RetryConfig.java: id: 129e37909ec5 last_write_checksum: sha1:02091f8e58d3a574ab964dae697294dbf3400022 @@ -7622,12 +9154,12 @@ trackedFiles: pristine_git_object: 016df5f3ca97d7c5cc0e443e75e387990f9ff833 src/main/java/co/novu/utils/Security.java: id: 97326fcb4a7b - last_write_checksum: sha1:bf1a21610c5c2d3a42c45b1992f7387b655e8ea9 - pristine_git_object: b701675da22f58ae593c15bc2c8af0945d9e36fe + last_write_checksum: sha1:36dbefb31eef47e4e12549f09997a6d20f6c0790 + pristine_git_object: e6246c60f62974813927ba51a4914f4d92e19ea9 src/main/java/co/novu/utils/SecurityMetadata.java: id: f85bc89f790c - last_write_checksum: sha1:de6c83d9190ecae3f4cd0f84ab38d361c05ac477 - pristine_git_object: 79ab400842c2a60f86474913a3024df5424e06eb + last_write_checksum: sha1:01c9a87b4f33c0c955bb9bda3cfb570a71a7b8db + pristine_git_object: 7e9568b43ffe42792ada29728733bff3999efade src/main/java/co/novu/utils/SerializedBody.java: id: 28841452d297 last_write_checksum: sha1:47be95168550f976c359922ea97fae2cbd90664a @@ -7670,12 +9202,12 @@ trackedFiles: pristine_git_object: 9960c147160e2182e18939d45de132c203c3df8b src/main/java/co/novu/utils/Utils.java: id: 5354c18edd72 - last_write_checksum: sha1:73d92343e55822497b2682db10506eaa32bba9e7 - pristine_git_object: 30d53d28deff6a2345093556d77e0a3affc30b59 + last_write_checksum: sha1:7f5ada2b6239fbfc72a85bf280d43f0f05908565 + pristine_git_object: f7ce1b9b63d2940ead9c25239a391e60435b33bb src/main/java/co/novu/utils/reactive/EventStream.java: id: 54e371592c06 - last_write_checksum: sha1:e92f7a38c43d4ca9898f787c16fd8dec759737de - pristine_git_object: 838c5d306f29d61d4e7dc682f9957e84115a3c80 + last_write_checksum: sha1:54a5c45f76e1f9bb5db743bfb6889ef0ec0d3e4c + pristine_git_object: 17052a3e4b5b7cee66ef8e51fccc7058cd0639a0 src/main/java/co/novu/utils/reactive/ReactiveUtils.java: id: 756072bd658e last_write_checksum: sha1:f4d33adb4a9a2199c21172385b778e4a98274d17 @@ -8881,7 +10413,7 @@ examples: application/json: {"name": "", "active": false, "isTranslationEnabled": false, "steps": [], "preferences": {"user": {"all": {"enabled": true, "readOnly": false}, "channels": {"email": {"enabled": true}, "sms": {"enabled": false}}}, "workflow": {"all": {"enabled": true, "readOnly": false}, "channels": {"email": {"enabled": true}, "sms": {"enabled": false}}}}, "origin": "external"} responses: "200": - application/json: {"name": "", "active": false, "isTranslationEnabled": false, "_id": "", "workflowId": "", "slug": "", "updatedAt": "1735625998632", "createdAt": "1709428435642", "steps": [{"controls": {"values": {"skip": {"and": [{"==": [{"var": "payload.tier"}, "pro"]}, {"==": [{"var": "subscriber.data.role"}, "admin"]}, {">": [{"var": "payload.amount"}, "4"]}]}, "subject": "", "body": "", "editorType": "block", "rendererType": "html", "disableOutputSanitization": false}}, "variables": {}, "stepId": "", "_id": "", "name": "", "slug": "", "type": "email", "origin": "novu-cloud", "workflowId": "", "workflowDatabaseId": ""}], "origin": "novu-cloud-v1", "preferences": {"user": {"all": {"enabled": true, "readOnly": false}, "channels": {"email": {"enabled": true}, "sms": {"enabled": false}}}, "default": {"all": {"enabled": true, "readOnly": false}, "channels": {"email": {"enabled": true}, "sms": {"enabled": false}}}}, "status": "ACTIVE", "severity": "high"} + application/json: {"name": "", "active": false, "isTranslationEnabled": false, "_id": "", "workflowId": "", "slug": "", "updatedAt": "1735625998632", "createdAt": "1709428435642", "steps": [{"controls": {"values": {"skip": {"and": [{"==": [{"var": "payload.tier"}, "pro"]}, {"==": [{"var": "subscriber.data.role"}, "admin"]}, {">": [{"var": "payload.amount"}, "4"]}]}, "subject": "", "body": "", "editorType": "block", "disableOutputSanitization": false}}, "variables": {}, "stepId": "", "_id": "", "name": "", "slug": "", "type": "email", "origin": "novu-cloud", "workflowId": "", "workflowDatabaseId": ""}], "origin": "novu-cloud-v1", "preferences": {"user": {"all": {"enabled": true, "readOnly": false}, "channels": {"email": {"enabled": true}, "sms": {"enabled": false}}}, "default": {"all": {"enabled": true, "readOnly": false}, "channels": {"email": {"enabled": true}, "sms": {"enabled": false}}}}, "status": "ACTIVE", "severity": "high"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "400": @@ -8897,7 +10429,7 @@ examples: workflowId: "" responses: "200": - application/json: {"name": "", "active": false, "isTranslationEnabled": false, "_id": "", "workflowId": "", "slug": "", "updatedAt": "1735639255382", "createdAt": "1721141645591", "steps": [{"controls": {"values": {"skip": {"and": [{"==": [{"var": "payload.tier"}, "pro"]}, {"==": [{"var": "subscriber.data.role"}, "admin"]}, {">": [{"var": "payload.amount"}, "4"]}]}, "subject": "", "body": "", "editorType": "block", "rendererType": "html", "disableOutputSanitization": false}}, "variables": {"key": "", "key1": ""}, "stepId": "", "_id": "", "name": "", "slug": "", "type": "email", "origin": "novu-cloud", "workflowId": "", "workflowDatabaseId": ""}], "origin": "external", "preferences": {"user": null, "default": {"all": {"enabled": true, "readOnly": false}, "channels": {"email": {"enabled": true}, "sms": {"enabled": false}}}}, "status": "ACTIVE", "severity": "low"} + application/json: {"name": "", "active": false, "isTranslationEnabled": false, "_id": "", "workflowId": "", "slug": "", "updatedAt": "1735639255382", "createdAt": "1721141645591", "steps": [{"controls": {"values": {"skip": {"and": [{"==": [{"var": "payload.tier"}, "pro"]}, {"==": [{"var": "subscriber.data.role"}, "admin"]}, {">": [{"var": "payload.amount"}, "4"]}]}, "subject": "", "body": "", "editorType": "block", "disableOutputSanitization": false}}, "variables": {"key": "", "key1": ""}, "stepId": "", "_id": "", "name": "", "slug": "", "type": "email", "origin": "novu-cloud", "workflowId": "", "workflowDatabaseId": ""}], "origin": "external", "preferences": {"user": null, "default": {"all": {"enabled": true, "readOnly": false}, "channels": {"email": {"enabled": true}, "sms": {"enabled": false}}}}, "status": "ACTIVE", "severity": "low"} "414": application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} "400": @@ -9228,4 +10760,407 @@ examples: path: resourceType: "workflow" resourceId: "welcome-email" + EnvironmentsController_diffEnvironment: + speakeasy-default-environments-controller-diff-environment: + parameters: + path: + targetEnvironmentId: "6615943e7ace93b0540ae377" + requestBody: + application/json: {"sourceEnvironmentId": "507f1f77bcf86cd799439011"} + responses: + "200": + application/json: {"sourceEnvironmentId": "", "targetEnvironmentId": "", "resources": [{"resourceType": "BRIDGE", "sourceResource": {"updatedAt": "2024-01-15T10:30:00.000Z"}, "targetResource": {"updatedAt": "2024-01-15T10:30:00.000Z"}, "changes": [{"sourceResource": {"updatedAt": "2024-01-15T10:30:00.000Z"}, "targetResource": {"updatedAt": "2024-01-15T10:30:00.000Z"}, "resourceType": "ECHO", "action": "deleted"}], "summary": {"added": 4536.9, "modified": 4715.06, "deleted": 7919.8, "unchanged": 7466.34}}], "summary": {"totalEntities": 2495.22, "totalChanges": 5911.44, "hasChanges": true}} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": 8798.18}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + EnvironmentsController_publishEnvironment: + speakeasy-default-environments-controller-publish-environment: + parameters: + path: + targetEnvironmentId: "6615943e7ace93b0540ae377" + requestBody: + application/json: {"sourceEnvironmentId": "507f1f77bcf86cd799439011", "dryRun": false, "resources": [{"resourceType": "REGULAR", "resourceId": "workflow-id-1"}]} + responses: + "200": + application/json: {"results": [{"resourceType": "REGULAR", "successful": [], "failed": [{"resourceType": "ECHO", "resourceId": "", "resourceName": "", "error": ""}], "skipped": [{"resourceType": "BRIDGE", "resourceId": "", "resourceName": "", "reason": ""}], "totalProcessed": 3977.33}], "summary": {"resources": 1548.2, "successful": 1186.4, "failed": 5607.1, "skipped": 8053.79}} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": false}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_getSubscriberNotifications: + speakeasy-default-subscribers-controller-get-subscriber-notifications: + parameters: + path: + subscriberId: "" + query: + limit: 10 + offset: 0 + createdGte: 1704067200000 + createdLte: 1735689599999 + responses: + "200": + application/json: {"data": [{"id": "", "transactionId": "", "body": "", "to": {"id": "", "subscriberId": ""}, "isRead": false, "isSeen": true, "isArchived": true, "isSnoozed": true, "createdAt": "1718005196143", "channelType": "in_app", "severity": "low"}], "hasMore": true, "filter": {}} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": 7184.76}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_deleteNotification: + speakeasy-default-subscribers-controller-delete-notification: + parameters: + path: + subscriberId: "" + notificationId: "" + responses: + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_completeNotificationAction: + speakeasy-default-subscribers-controller-complete-notification-action: + parameters: + path: + subscriberId: "" + notificationId: "" + actionType: "secondary" + responses: + "200": + application/json: {"id": "", "transactionId": "", "body": "", "to": {"id": "", "subscriberId": ""}, "isRead": false, "isSeen": false, "isArchived": true, "isSnoozed": false, "createdAt": "1720937619557", "channelType": "push", "severity": "none"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_revertNotificationAction: + speakeasy-default-subscribers-controller-revert-notification-action: + parameters: + path: + subscriberId: "" + notificationId: "" + actionType: "primary" + responses: + "200": + application/json: {"id": "", "transactionId": "", "body": "", "to": {"id": "", "subscriberId": ""}, "isRead": false, "isSeen": false, "isArchived": false, "isSnoozed": true, "createdAt": "1732319296776", "channelType": "email", "severity": "medium"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_archiveNotification: + speakeasy-default-subscribers-controller-archive-notification: + parameters: + path: + subscriberId: "" + notificationId: "" + responses: + "200": + application/json: {"id": "", "transactionId": "", "body": "", "to": {"id": "", "subscriberId": ""}, "isRead": false, "isSeen": true, "isArchived": true, "isSnoozed": true, "createdAt": "1722007690839", "channelType": "in_app", "severity": "low"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": 9244.04}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_markNotificationAsRead: + speakeasy-default-subscribers-controller-mark-notification-as-read: + parameters: + path: + subscriberId: "" + notificationId: "" + responses: + "200": + application/json: {"id": "", "transactionId": "", "body": "", "to": {"id": "", "subscriberId": ""}, "isRead": false, "isSeen": false, "isArchived": true, "isSnoozed": true, "createdAt": "1730112582938", "channelType": "push", "severity": "high"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_snoozeNotification: + speakeasy-default-subscribers-controller-snooze-notification: + parameters: + path: + subscriberId: "" + notificationId: "" + requestBody: + application/json: {"snoozeUntil": "2026-03-01T10:00:00Z"} + responses: + "200": + application/json: {"id": "", "transactionId": "", "body": "", "to": {"id": "", "subscriberId": ""}, "isRead": true, "isSeen": false, "isArchived": true, "isSnoozed": true, "createdAt": "1733991021454", "channelType": "chat", "severity": "medium"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": [{"key": ""}]}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_unarchiveNotification: + speakeasy-default-subscribers-controller-unarchive-notification: + parameters: + path: + subscriberId: "" + notificationId: "" + responses: + "200": + application/json: {"id": "", "transactionId": "", "body": "", "to": {"id": "", "subscriberId": ""}, "isRead": false, "isSeen": false, "isArchived": false, "isSnoozed": true, "createdAt": "1711880035185", "channelType": "email", "severity": "high"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": 7563.41}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_markNotificationAsUnread: + speakeasy-default-subscribers-controller-mark-notification-as-unread: + parameters: + path: + subscriberId: "" + notificationId: "" + responses: + "200": + application/json: {"id": "", "transactionId": "", "body": "", "to": {"id": "", "subscriberId": ""}, "isRead": false, "isSeen": false, "isArchived": false, "isSnoozed": false, "createdAt": "1709953113134", "channelType": "sms", "severity": "low"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_unsnoozeNotification: + speakeasy-default-subscribers-controller-unsnooze-notification: + parameters: + path: + subscriberId: "" + notificationId: "" + responses: + "200": + application/json: {"id": "", "transactionId": "", "body": "", "to": {"id": "", "subscriberId": ""}, "isRead": false, "isSeen": false, "isArchived": false, "isSnoozed": false, "createdAt": "1706480856288", "channelType": "chat", "severity": "low"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": true}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_archiveAllNotifications: + speakeasy-default-subscribers-controller-archive-all-notifications: + parameters: + path: + subscriberId: "" + requestBody: + application/json: {} + responses: + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": []}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_getSubscriberNotificationsCount: + speakeasy-default-subscribers-controller-get-subscriber-notifications-count: + parameters: + path: + subscriberId: "" + query: + filters: "[{\"read\":false,\"archived\":false},{\"tags\":[\"important\"]},{\"tags\":{\"and\":[{\"or\":[\"a\",\"b\"]},{\"or\":[\"c\"]}]}}]" + responses: + "200": + application/json: [{"count": 8917.76, "filter": {"key": ""}}] + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": []}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_deleteAllNotifications: + speakeasy-default-subscribers-controller-delete-all-notifications: + parameters: + path: + subscriberId: "" + requestBody: + application/json: {} + responses: + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": 8140.75}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_markAllNotificationsAsRead: + speakeasy-default-subscribers-controller-mark-all-notifications-as-read: + parameters: + path: + subscriberId: "" + requestBody: + application/json: {} + responses: + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_archiveAllReadNotifications: + speakeasy-default-subscribers-controller-archive-all-read-notifications: + parameters: + path: + subscriberId: "" + requestBody: + application/json: {} + responses: + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + SubscribersController_markNotificationsAsSeen: + speakeasy-default-subscribers-controller-mark-notifications-as-seen: + parameters: + path: + subscriberId: "" + requestBody: + application/json: {} + responses: + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": [7844.83]}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + EnvironmentVariablesController_listEnvironmentVariables: + speakeasy-default-environment-variables-controller-list-environment-variables: + responses: + "200": + application/json: [{"_id": "", "_organizationId": "", "key": "", "type": "string", "isSecret": true, "values": [], "createdAt": "1706473664670", "updatedAt": "1735673165458"}] + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + EnvironmentVariablesController_createEnvironmentVariable: + speakeasy-default-environment-variables-controller-create-environment-variable: + requestBody: + application/json: {"key": ""} + responses: + "200": + application/json: {"_id": "", "_organizationId": "", "key": "", "type": "string", "isSecret": true, "values": [], "createdAt": "1717108706789", "updatedAt": "1735627858441"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": []}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + EnvironmentVariablesController_getEnvironmentVariable: + speakeasy-default-environment-variables-controller-get-environment-variable: + parameters: + path: + variableKey: "BASE_URL" + responses: + "200": + application/json: {"_id": "", "_organizationId": "", "key": "", "type": "string", "isSecret": false, "values": [{"_environmentId": "", "value": ""}], "createdAt": "1710536460779", "updatedAt": "1735619742616"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + EnvironmentVariablesController_updateEnvironmentVariable: + speakeasy-default-environment-variables-controller-update-environment-variable: + parameters: + path: + variableKey: "BASE_URL" + requestBody: + application/json: {} + responses: + "200": + application/json: {"_id": "", "_organizationId": "", "key": "", "type": "string", "isSecret": true, "values": [{"_environmentId": "", "value": ""}], "createdAt": "1724810279964", "updatedAt": "1735653406294"} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + EnvironmentVariablesController_deleteEnvironmentVariable: + speakeasy-default-environment-variables-controller-delete-environment-variable: + parameters: + path: + variableKey: "BASE_URL" + responses: + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": "xx xx xx "}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + EnvironmentVariablesController_getEnvironmentVariableUsage: + speakeasy-default-environment-variables-controller-get-environment-variable-usage: + parameters: + path: + variableKey: "BASE_URL" + responses: + "200": + application/json: {"workflows": [{"name": "Welcome Email", "workflowId": "welcome-email"}]} + "414": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "400": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} + "422": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123", "errors": {"fieldName1": {"messages": ["Field is required", "Must be a valid email address"], "value": "invalidEmail"}, "fieldName2": {"messages": ["Must be at least 18 years old"], "value": 17}, "fieldName3": {"messages": ["Must be a boolean value"], "value": true}, "fieldName4": {"messages": ["Must be a valid object"], "value": {}}, "fieldName5": {"messages": ["Field is missing"], "value": null}, "fieldName6": {"messages": ["Undefined value"]}}} + "500": + application/json: {"statusCode": 404, "timestamp": "2024-12-12T13:00:00Z", "path": "/api/v1/resource", "message": "xx xx xx ", "ctx": {"workflowId": "some_wf_id", "stepId": "some_wf_id"}, "errorId": "abc123"} examplesVersion: 1.0.2 +releaseNotes: "## Java SDK Changes:\n* `novu.layouts.create()`: `response.controls.uiSchema` **Changed** (Breaking ⚠️)\n* `novu.workflows.steps.get()`: `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.sync()`: `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.modify()`: `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.workflowDetails()`: `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.update()`: \n * `request.body.steps[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `novu.workflows.create()`: \n * `request.body.steps[]` **Changed** (Breaking ⚠️)\n * `response` **Changed** (Breaking ⚠️)\n* `novu.layouts.duplicate()`: `response.controls.uiSchema` **Changed** (Breaking ⚠️)\n* `novu.layouts.get()`: `response.controls.uiSchema` **Changed** (Breaking ⚠️)\n* `novu.layouts.update()`: `response.controls.uiSchema` **Changed** (Breaking ⚠️)\n* `novu.layouts.list()`: `response.layouts[].controls.uiSchema` **Changed** (Breaking ⚠️)\n* `novu.subscribers.notifications.count()`: **Added**\n* `novu.subscribers.notifications.unarchive()`: **Added**\n* `novu.environments.diff()`: **Added**\n* `novu.subscribers.notifications.deleteAll()`: **Added**\n* `novu.subscribers.notifications.markAllAsRead()`: **Added**\n* `novu.subscribers.notifications.archiveAllRead()`: **Added**\n* `novu.subscribers.notifications.markAsSeen()`: **Added**\n* `novu.subscribers.notifications.getUnseenCount()`: **Added**\n* `novu.workflowsSteps.generatePreview()`: **Added**\n* `novu.environmentVariables.list()`: **Added**\n* `novu.environmentVariables.create()`: **Added**\n* `novu.environmentVariables.retrieve()`: **Added**\n* `novu.environmentVariables.update()`: **Added**\n* `novu.environmentVariables.delete()`: **Added**\n* `novu.environmentVariables.usage()`: **Added**\n* `novu.subscribers.notifications.getUnseenCount()`: **Removed** (Breaking ⚠️)\n* `novu.trigger()`: `response.activityFeedLink` **Added**\n* `novu.broadcast()`: `response.activityFeedLink` **Added**\n* `novu.triggerBulk()`: `response.[].activityFeedLink` **Added**\n* `novu.subscribers.notifications.unsnooze()`: **Added**\n* `novu.subscribers.notifications.markAsUnread()`: **Added**\n* `novu.subscribers.notifications.archiveAll()`: **Added**\n* `novu.subscribers.notifications.snooze()`: **Added**\n* `novu.subscribers.notifications.markAsRead()`: **Added**\n* `novu.subscribers.notifications.archive()`: **Added**\n* `novu.workflows.list()`: `response.workflows[]` **Changed**\n* `novu.subscribers.notifications.revertAction()`: **Added**\n* `novu.subscribers.notifications.completeAction()`: **Added**\n* `novu.subscribers.notifications.delete()`: **Added**\n* `novu.subscribers.notifications.list()`: **Added**\n* `novu.environments.publish()`: **Added**\n* `novu.channelConnections.list()`: \n * `request.providerId` **Changed**\n * `response.data[].providerId.enum(cmTelecom)` **Added**\n* `novu.channelConnections.create()`: `response.providerId.enum(cmTelecom)` **Added**\n* `novu.channelConnections.retrieve()`: `response.providerId.enum(cmTelecom)` **Added**\n* `novu.channelConnections.update()`: `response.providerId.enum(cmTelecom)` **Added**\n* `novu.channelEndpoints.list()`: \n * `request.providerId` **Changed**\n * `response.data[].providerId.enum(cmTelecom)` **Added**\n* `novu.channelEndpoints.create()`: `response.providerId.enum(cmTelecom)` **Added**\n* `novu.channelEndpoints.get()`: `response.providerId.enum(cmTelecom)` **Added**\n* `novu.channelEndpoints.update()`: `response.providerId.enum(cmTelecom)` **Added**\n* `novu.notifications.list()`: `response.data[]` **Changed**\n* `novu.notifications.get()`: `response` **Changed**\n" diff --git a/.speakeasy/gen.yaml b/.speakeasy/gen.yaml index 7e53db1f..73babffb 100644 --- a/.speakeasy/gen.yaml +++ b/.speakeasy/gen.yaml @@ -31,7 +31,7 @@ generation: generateNewTests: true skipResponseBodyAssertions: false java: - version: 3.14.0 + version: 3.15.0 additionalDependencies: [] additionalPlugins: [] artifactID: novu-java @@ -46,11 +46,13 @@ java: enableFormatting: false enableSlf4jLogging: true enableStreamingUploads: true + explicitDocImports: false flattenGlobalSecurity: true forwardCompatibleEnumsByDefault: true forwardCompatibleUnionsByDefault: "false" generateOptionalUnionAccessors: true generateSpringBootStarter: true + generateUnionDocs: false githubURL: github.com/novuhq/novu-java groupID: co.novu imports: @@ -74,7 +76,9 @@ java: operationScopedParams: true outputModelSuffix: output packageName: co.novu + prefixModeMethodNames: false projectName: novu respectTitlesForPrimitiveUnionMembers: false + showSetterGetterTypesInDocs: false templateVersion: v2 unionStrategy: populated-fields diff --git a/.speakeasy/workflow.lock b/.speakeasy/workflow.lock index add709f9..f9197374 100644 --- a/.speakeasy/workflow.lock +++ b/.speakeasy/workflow.lock @@ -1,4 +1,4 @@ -speakeasyVersion: 1.732.2 +speakeasyVersion: 1.761.3 sources: 'DEPRECATED: Novu API. Use -openapi.{json,yaml} instead.': sourceNamespace: novu-oas @@ -9,20 +9,19 @@ sources: - 3.12.0 novu-OAS: sourceNamespace: novu-oas - sourceRevisionDigest: sha256:aaf89e274c31a5a450b1170b501418fe743781d8797e09e5827f2adb34e5f49a - sourceBlobDigest: sha256:70458c344be37b8b008f62e6725939bfe6ebcef8ec5edceebaf375ae6f541c10 + sourceRevisionDigest: sha256:c5dd0d3f13489389911c14b53f3bbdd6237fcab5d844a6bfaff97940512a44a6 + sourceBlobDigest: sha256:13ff54b154fcc9d198ca82a7d3ba72b1fe8cfbcb323370bd57a93450207b2311 tags: - latest - - speakeasy-sdk-regen-next-1769213168 - - 3.14.0 + - 3.15.0 targets: novu: source: novu-OAS sourceNamespace: novu-oas - sourceRevisionDigest: sha256:aaf89e274c31a5a450b1170b501418fe743781d8797e09e5827f2adb34e5f49a - sourceBlobDigest: sha256:70458c344be37b8b008f62e6725939bfe6ebcef8ec5edceebaf375ae6f541c10 + sourceRevisionDigest: sha256:c5dd0d3f13489389911c14b53f3bbdd6237fcab5d844a6bfaff97940512a44a6 + sourceBlobDigest: sha256:13ff54b154fcc9d198ca82a7d3ba72b1fe8cfbcb323370bd57a93450207b2311 codeSamplesNamespace: novu-oas-java-code-samples - codeSamplesRevisionDigest: sha256:c73df67cdc82540ab0df3a94450eda0fdb446c4f8d4bdfe12f23112c12595130 + codeSamplesRevisionDigest: sha256:20ca348983899708eae37f797d0826188fbc41e60b63e28e0f7e9fa3342ee446 workflow: workflowVersion: 1.0.0 speakeasyVersion: latest diff --git a/README.md b/README.md index 920a2974..f077b4b2 100644 --- a/README.md +++ b/README.md @@ -44,7 +44,7 @@ For more information about the API: [Novu Documentation](https://docs.novu.co) ## Table of Contents -* [openapi](#openapi) +* [JAVA Novu SDK](#java-novu-sdk) * [SDK Installation](#sdk-installation) * [SDK Example Usage](#sdk-example-usage) * [Asynchronous Support](#asynchronous-support) @@ -56,6 +56,7 @@ For more information about the API: [Novu Documentation](https://docs.novu.co) * [Server Selection](#server-selection) * [Custom HTTP Client](#custom-http-client) * [Debugging](#debugging) + * [Jackson Configuration](#jackson-configuration) * [Development](#development) * [Maturity](#maturity) * [Contributions](#contributions) @@ -73,7 +74,7 @@ The samples below show how a published SDK artifact is used: Gradle: ```groovy -implementation 'co.novu:novu-java:3.14.0' +implementation 'co.novu:novu-java:3.15.0' ``` Maven: @@ -81,7 +82,7 @@ Maven: co.novu novu-java - 3.14.0 + 3.15.0 ``` @@ -140,7 +141,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -170,7 +171,7 @@ public class Application { .call(); if (res.boolean_().isPresent()) { - // handle response + System.out.println(res.boolean_().get()); } } } @@ -225,7 +226,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -281,7 +282,7 @@ public class Application { .call(); if (res.triggerEventResponseDtos().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDtos().get()); } } } @@ -325,7 +326,7 @@ public class Application { resFut.thenAccept(res -> { if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } }); } @@ -333,6 +334,15 @@ public class Application { ``` [comp-fut]: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CompletableFuture.html + +#### Union Consumption Patterns + +When a response field is a union model: + +- Discriminated unions: branch on the discriminator (`switch`) and then narrow to the concrete type. +- Non-discriminated unions: use generated accessors (for example `string()`, `asLong()`, `simpleObject()`) to determine the active variant. + +For full model-specific examples (including Java 11/16/21 variants), see each union model's **Supported Types** section in the generated model docs. @@ -448,7 +458,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -470,7 +480,7 @@ public class Application { ### [Activity](docs/sdks/activity/README.md) -* [track](docs/sdks/activity/README.md#track) - Track activity and engagement events +* [track](docs/sdks/activity/README.md#track) - Track provider activity and engagement events ### [ChannelConnections](docs/sdks/channelconnections/README.md) @@ -496,8 +506,19 @@ public class Application { * [get](docs/sdks/contexts/README.md#get) - Retrieve a context * [delete](docs/sdks/contexts/README.md#delete) - Delete a context +### [EnvironmentVariables](docs/sdks/environmentvariables/README.md) + +* [list](docs/sdks/environmentvariables/README.md#list) - List all variables +* [create](docs/sdks/environmentvariables/README.md#create) - Create a variable +* [retrieve](docs/sdks/environmentvariables/README.md#retrieve) - Get environment variable +* [update](docs/sdks/environmentvariables/README.md#update) - Update a variable +* [delete](docs/sdks/environmentvariables/README.md#delete) - Delete environment variable +* [usage](docs/sdks/environmentvariables/README.md#usage) - Retrieve a variable usage + ### [Environments](docs/sdks/environments/README.md) +* [diff](docs/sdks/environments/README.md#diff) - Compare resources between environments +* [publish](docs/sdks/environments/README.md#publish) - Publish resources to target environment * [create](docs/sdks/environments/README.md#create) - Create an environment * [list](docs/sdks/environments/README.md#list) - List all environments * [update](docs/sdks/environments/README.md#update) - Update an environment @@ -553,6 +574,26 @@ public class Application { * [removeCredentials](docs/sdks/subscribers/README.md#removecredentials) - Delete provider credentials * [markAllMessages](docs/sdks/subscribers/README.md#markallmessages) - Update all notifications state +#### [Subscribers.Notifications](docs/sdks/subscribersnotifications1/README.md) + +* [list](docs/sdks/subscribersnotifications1/README.md#list) - Retrieve subscriber notifications +* [delete](docs/sdks/subscribersnotifications1/README.md#delete) - Delete a notification +* [completeAction](docs/sdks/subscribersnotifications1/README.md#completeaction) - Complete a notification action +* [revertAction](docs/sdks/subscribersnotifications1/README.md#revertaction) - Revert a notification action +* [archive](docs/sdks/subscribersnotifications1/README.md#archive) - Archive a notification +* [markAsRead](docs/sdks/subscribersnotifications1/README.md#markasread) - Mark a notification as read +* [snooze](docs/sdks/subscribersnotifications1/README.md#snooze) - Snooze a notification +* [unarchive](docs/sdks/subscribersnotifications1/README.md#unarchive) - Unarchive a notification +* [markAsUnread](docs/sdks/subscribersnotifications1/README.md#markasunread) - Mark a notification as unread +* [unsnooze](docs/sdks/subscribersnotifications1/README.md#unsnooze) - Unsnooze a notification +* [archiveAll](docs/sdks/subscribersnotifications1/README.md#archiveall) - Archive all notifications +* [count](docs/sdks/subscribersnotifications1/README.md#count) - Retrieve subscriber notifications count +* [deleteAll](docs/sdks/subscribersnotifications1/README.md#deleteall) - Delete all notifications +* [markAllAsRead](docs/sdks/subscribersnotifications1/README.md#markallasread) - Mark all notifications as read +* [archiveAllRead](docs/sdks/subscribersnotifications1/README.md#archiveallread) - Archive all read notifications +* [markAsSeen](docs/sdks/subscribersnotifications1/README.md#markasseen) - Mark notifications as seen +* [getUnseenCount](docs/sdks/subscribersnotifications1/README.md#getunseencount) - Retrieve unseen notifications count + ### [Subscribers.Credentials](docs/sdks/credentials/README.md) * [upsert](docs/sdks/credentials/README.md#upsert) - Upsert provider credentials @@ -561,10 +602,6 @@ public class Application { * [updateActionStatus](docs/sdks/subscribersmessages1/README.md#updateactionstatus) - Update notification action status -### [Subscribers.Notifications](docs/sdks/subscribersnotifications2/README.md) - -* [getUnseenCount](docs/sdks/subscribersnotifications2/README.md#getunseencount) - Retrieve unseen notifications count - ### [Subscribers.Preferences](docs/sdks/preferences/README.md) * [list](docs/sdks/preferences/README.md#list) - Retrieve subscriber preferences @@ -574,9 +611,9 @@ public class Application { * [markAllAs](docs/sdks/subscribersmessages2/README.md#markallas) - Update notifications state -### [SubscribersNotifications](docs/sdks/subscribersnotifications1/README.md) +### [SubscribersNotifications](docs/sdks/subscribersnotifications2/README.md) -* [getFeed](docs/sdks/subscribersnotifications1/README.md#getfeed) - Retrieve subscriber notifications +* [getFeed](docs/sdks/subscribersnotifications2/README.md#getfeed) - Retrieve subscriber notifications ### [SubscribersProperties](docs/sdks/subscribersproperties/README.md) @@ -632,6 +669,10 @@ public class Application { * [get](docs/sdks/steps/README.md#get) - Retrieve workflow step +### [WorkflowsSteps](docs/sdks/workflowssteps/README.md) + +* [generatePreview](docs/sdks/workflowssteps/README.md#generatepreview) - Generate a step preview + @@ -738,7 +779,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -793,7 +834,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -857,7 +898,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } catch (NovuException ex) { // all SDK exceptions inherit from NovuException @@ -912,9 +953,9 @@ public class Application { many more subclasses in the JDK platform). **Inherit from [`NovuException`](./src/main/java/models/errors/NovuException.java)**: -* [`co.novu.models.errors.PayloadValidationExceptionDto`](./src/main/java/models/errors/co.novu.models.errors.PayloadValidationExceptionDto.java): Status code `400`. Applicable to 3 of 93 methods.* -* [`co.novu.models.errors.SubscriberResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.SubscriberResponseDtoException.java): Created. Status code `409`. Applicable to 1 of 93 methods.* -* [`co.novu.models.errors.TopicResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.TopicResponseDtoException.java): OK. Status code `409`. Applicable to 1 of 93 methods.* +* [`co.novu.models.errors.PayloadValidationExceptionDto`](./src/main/java/models/errors/co.novu.models.errors.PayloadValidationExceptionDto.java): Status code `400`. Applicable to 3 of 118 methods.* +* [`co.novu.models.errors.SubscriberResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.SubscriberResponseDtoException.java): Created. Status code `409`. Applicable to 1 of 118 methods.* +* [`co.novu.models.errors.TopicResponseDtoException`](./src/main/java/models/errors/co.novu.models.errors.TopicResponseDtoException.java): OK. Status code `409`. Applicable to 1 of 118 methods.* @@ -972,7 +1013,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -1017,7 +1058,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -1243,6 +1284,36 @@ __NOTE__: This is a convenience method that calls `HTTPClient.enableDebugLogging Another option is to set the System property `-Djdk.httpclient.HttpClient.log=all`. However, this option does not log request/response bodies. + +## Jackson Configuration + +The SDK ships with a pre-configured Jackson [`ObjectMapper`][jackson-databind] accessible via +`JSON.getMapper()`. It is set up with type modules, strict deserializers, and the feature flags +needed for full SDK compatibility (including ISO-8601 `OffsetDateTime` serialization): + +```java +import co.novu.utils.JSON; + +String json = JSON.getMapper().writeValueAsString(response); +``` + +To compose with your own `ObjectMapper`, register the provided `NovuJavaJacksonModule`, which +bundles all the same modules and feature flags as a single plug-and-play module: + +```java +import co.novu.utils.NovuJavaJacksonModule; +import com.fasterxml.jackson.databind.ObjectMapper; + +ObjectMapper myMapper = new ObjectMapper() + .registerModule(new NovuJavaJacksonModule()); + +String json = myMapper.writeValueAsString(response); +``` + +[jackson-databind]: https://github.com/FasterXML/jackson-databind +[jackson-jsr310]: https://github.com/FasterXML/jackson-modules-java8/tree/master/datetime + + # Development diff --git a/RELEASES.md b/RELEASES.md index 39c7d697..37e6e810 100644 --- a/RELEASES.md +++ b/RELEASES.md @@ -18,4 +18,14 @@ Based on: ### Generated - [java v3.14.0] . ### Releases -- [Maven Central v3.14.0] https://central.sonatype.com/artifact/co.novu/novu-java/3.14.0 - . \ No newline at end of file +- [Maven Central v3.14.0] https://central.sonatype.com/artifact/co.novu/novu-java/3.14.0 - . + +## 2026-04-13 15:11:33 +### Changes +Based on: +- OpenAPI Doc +- Speakeasy CLI 1.761.3 (2.879.11) https://github.com/speakeasy-api/speakeasy +### Generated +- [java v3.15.0] . +### Releases +- [Maven Central v3.15.0] https://central.sonatype.com/artifact/co.novu/novu-java/3.15.0 - . \ No newline at end of file diff --git a/USAGE.md b/USAGE.md index cc5b5f6b..533d9067 100644 --- a/USAGE.md +++ b/USAGE.md @@ -36,7 +36,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -66,7 +66,7 @@ public class Application { .call(); if (res.boolean_().isPresent()) { - // handle response + System.out.println(res.boolean_().get()); } } } @@ -121,7 +121,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -177,7 +177,7 @@ public class Application { .call(); if (res.triggerEventResponseDtos().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDtos().get()); } } } diff --git a/docs/models/components/ActivityNotificationJobResponseDtoType.md b/docs/models/components/ActivityNotificationJobResponseDtoType.md index d6f446ab..0185a7fc 100644 --- a/docs/models/components/ActivityNotificationJobResponseDtoType.md +++ b/docs/models/components/ActivityNotificationJobResponseDtoType.md @@ -2,18 +2,30 @@ Type of the job +## Example Usage + +```java +import co.novu.models.components.ActivityNotificationJobResponseDtoType; + +ActivityNotificationJobResponseDtoType value = ActivityNotificationJobResponseDtoType.IN_APP; + +// Open enum: use .of() to create instances from custom string values +ActivityNotificationJobResponseDtoType custom = ActivityNotificationJobResponseDtoType.of("custom_value"); +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `IN_APP` | in_app | -| `EMAIL` | email | -| `SMS` | sms | -| `CHAT` | chat | -| `PUSH` | push | -| `DIGEST` | digest | -| `TRIGGER` | trigger | -| `DELAY` | delay | -| `THROTTLE` | throttle | -| `CUSTOM` | custom | \ No newline at end of file +| Name | Value | +| -------------- | -------------- | +| `IN_APP` | in_app | +| `EMAIL` | email | +| `SMS` | sms | +| `CHAT` | chat | +| `PUSH` | push | +| `DIGEST` | digest | +| `TRIGGER` | trigger | +| `DELAY` | delay | +| `THROTTLE` | throttle | +| `CUSTOM` | custom | +| `HTTP_REQUEST` | http_request | \ No newline at end of file diff --git a/docs/models/components/ActorTypeEnum.md b/docs/models/components/ActorTypeEnum.md index 2c6d0838..7cf6141f 100644 --- a/docs/models/components/ActorTypeEnum.md +++ b/docs/models/components/ActorTypeEnum.md @@ -2,6 +2,17 @@ The type of the actor, indicating the role in the notification process. +## Example Usage + +```java +import co.novu.models.components.ActorTypeEnum; + +ActorTypeEnum value = ActorTypeEnum.NONE; + +// Open enum: use .of() to create instances from custom string values +ActorTypeEnum custom = ActorTypeEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/BackoffUnit.md b/docs/models/components/BackoffUnit.md index 1a98c32a..9fa28cb8 100644 --- a/docs/models/components/BackoffUnit.md +++ b/docs/models/components/BackoffUnit.md @@ -1,5 +1,16 @@ # BackoffUnit +## Example Usage + +```java +import co.novu.models.components.BackoffUnit; + +BackoffUnit value = BackoffUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +BackoffUnit custom = BackoffUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/BuilderFieldTypeEnum.md b/docs/models/components/BuilderFieldTypeEnum.md index 882c6549..a05dcdd2 100644 --- a/docs/models/components/BuilderFieldTypeEnum.md +++ b/docs/models/components/BuilderFieldTypeEnum.md @@ -1,5 +1,16 @@ # BuilderFieldTypeEnum +## Example Usage + +```java +import co.novu.models.components.BuilderFieldTypeEnum; + +BuilderFieldTypeEnum value = BuilderFieldTypeEnum.BOOLEAN; + +// Open enum: use .of() to create instances from custom string values +BuilderFieldTypeEnum custom = BuilderFieldTypeEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ButtonTypeEnum.md b/docs/models/components/ButtonTypeEnum.md index 29e77c42..566f1368 100644 --- a/docs/models/components/ButtonTypeEnum.md +++ b/docs/models/components/ButtonTypeEnum.md @@ -2,6 +2,17 @@ Type of button for the action result +## Example Usage + +```java +import co.novu.models.components.ButtonTypeEnum; + +ButtonTypeEnum value = ButtonTypeEnum.PRIMARY; + +// Open enum: use .of() to create instances from custom string values +ButtonTypeEnum custom = ButtonTypeEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ChannelCTATypeEnum.md b/docs/models/components/ChannelCTATypeEnum.md index ae449fd2..e69d8908 100644 --- a/docs/models/components/ChannelCTATypeEnum.md +++ b/docs/models/components/ChannelCTATypeEnum.md @@ -2,6 +2,14 @@ Type of call to action +## Example Usage + +```java +import co.novu.models.components.ChannelCTATypeEnum; + +ChannelCTATypeEnum value = ChannelCTATypeEnum.REDIRECT; +``` + ## Values diff --git a/docs/models/components/ChannelTypeEnum.md b/docs/models/components/ChannelTypeEnum.md index 07ea81fd..b06fefed 100644 --- a/docs/models/components/ChannelTypeEnum.md +++ b/docs/models/components/ChannelTypeEnum.md @@ -2,6 +2,17 @@ Channel type through which the message is sent +## Example Usage + +```java +import co.novu.models.components.ChannelTypeEnum; + +ChannelTypeEnum value = ChannelTypeEnum.IN_APP; + +// Open enum: use .of() to create instances from custom string values +ChannelTypeEnum custom = ChannelTypeEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ChatOrPushProviderEnum.md b/docs/models/components/ChatOrPushProviderEnum.md index 651c586c..409ab06c 100644 --- a/docs/models/components/ChatOrPushProviderEnum.md +++ b/docs/models/components/ChatOrPushProviderEnum.md @@ -2,6 +2,17 @@ The provider identifier for the credentials +## Example Usage + +```java +import co.novu.models.components.ChatOrPushProviderEnum; + +ChatOrPushProviderEnum value = ChatOrPushProviderEnum.SLACK; + +// Open enum: use .of() to create instances from custom string values +ChatOrPushProviderEnum custom = ChatOrPushProviderEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ChatRenderOutput.md b/docs/models/components/ChatRenderOutput.md new file mode 100644 index 00000000..d6bf0e87 --- /dev/null +++ b/docs/models/components/ChatRenderOutput.md @@ -0,0 +1,8 @@ +# ChatRenderOutput + + +## Fields + +| Field | Type | Required | Description | +| ------------------------ | ------------------------ | ------------------------ | ------------------------ | +| `body` | *String* | :heavy_check_mark: | Body of the chat message | \ No newline at end of file diff --git a/docs/models/components/ChatStepResponseDto.md b/docs/models/components/ChatStepResponseDto.md index 2013f182..6240bc3c 100644 --- a/docs/models/components/ChatStepResponseDto.md +++ b/docs/models/components/ChatStepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/ContentIssueEnum.md b/docs/models/components/ContentIssueEnum.md index 3097f392..b5681a91 100644 --- a/docs/models/components/ContentIssueEnum.md +++ b/docs/models/components/ContentIssueEnum.md @@ -2,6 +2,17 @@ Type of step content issue +## Example Usage + +```java +import co.novu.models.components.ContentIssueEnum; + +ContentIssueEnum value = ContentIssueEnum.ILLEGAL_VARIABLE_IN_CONTROL_VALUE; + +// Open enum: use .of() to create instances from custom string values +ContentIssueEnum custom = ContentIssueEnum.of("custom_value"); +``` + ## Values @@ -9,5 +20,6 @@ Type of step content issue | ----------------------------------- | ----------------------------------- | | `ILLEGAL_VARIABLE_IN_CONTROL_VALUE` | ILLEGAL_VARIABLE_IN_CONTROL_VALUE | | `INVALID_FILTER_ARG_IN_VARIABLE` | INVALID_FILTER_ARG_IN_VARIABLE | +| `INVALID_URL` | INVALID_URL | | `MISSING_VALUE` | MISSING_VALUE | | `TIER_LIMIT_EXCEEDED` | TIER_LIMIT_EXCEEDED | \ No newline at end of file diff --git a/docs/models/components/CreateEnvironmentVariableRequestDto.md b/docs/models/components/CreateEnvironmentVariableRequestDto.md new file mode 100644 index 00000000..b66d10c5 --- /dev/null +++ b/docs/models/components/CreateEnvironmentVariableRequestDto.md @@ -0,0 +1,11 @@ +# CreateEnvironmentVariableRequestDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `key` | *String* | :heavy_check_mark: | Unique key for the variable. Must start with a letter and contain only letters, digits, and underscores. | +| `type` | [Optional\](../../models/components/CreateEnvironmentVariableRequestDtoType.md) | :heavy_minus_sign: | The type of the variable | +| `isSecret` | *Optional\* | :heavy_minus_sign: | Whether this variable is a secret (encrypted at rest, masked in responses) | +| `values` | List\<[EnvironmentVariableValueDto](../../models/components/EnvironmentVariableValueDto.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/CreateEnvironmentVariableRequestDtoType.md b/docs/models/components/CreateEnvironmentVariableRequestDtoType.md new file mode 100644 index 00000000..b5a2aa3b --- /dev/null +++ b/docs/models/components/CreateEnvironmentVariableRequestDtoType.md @@ -0,0 +1,18 @@ +# CreateEnvironmentVariableRequestDtoType + +The type of the variable + +## Example Usage + +```java +import co.novu.models.components.CreateEnvironmentVariableRequestDtoType; + +CreateEnvironmentVariableRequestDtoType value = CreateEnvironmentVariableRequestDtoType.STRING; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `STRING` | string | \ No newline at end of file diff --git a/docs/models/components/CreateIntegrationRequestDtoChannel.md b/docs/models/components/CreateIntegrationRequestDtoChannel.md index d51cd9cf..8f4b912e 100644 --- a/docs/models/components/CreateIntegrationRequestDtoChannel.md +++ b/docs/models/components/CreateIntegrationRequestDtoChannel.md @@ -2,6 +2,14 @@ The channel type for the integration +## Example Usage + +```java +import co.novu.models.components.CreateIntegrationRequestDtoChannel; + +CreateIntegrationRequestDtoChannel value = CreateIntegrationRequestDtoChannel.IN_APP; +``` + ## Values diff --git a/docs/models/components/CreateMsTeamsChannelEndpointDtoType.md b/docs/models/components/CreateMsTeamsChannelEndpointDtoType.md index 3c52bc8c..93c7a287 100644 --- a/docs/models/components/CreateMsTeamsChannelEndpointDtoType.md +++ b/docs/models/components/CreateMsTeamsChannelEndpointDtoType.md @@ -2,6 +2,14 @@ Type of channel endpoint +## Example Usage + +```java +import co.novu.models.components.CreateMsTeamsChannelEndpointDtoType; + +CreateMsTeamsChannelEndpointDtoType value = CreateMsTeamsChannelEndpointDtoType.MS_TEAMS_CHANNEL; +``` + ## Values diff --git a/docs/models/components/CreateMsTeamsUserEndpointDtoType.md b/docs/models/components/CreateMsTeamsUserEndpointDtoType.md index 7e6d7cb6..fbf27088 100644 --- a/docs/models/components/CreateMsTeamsUserEndpointDtoType.md +++ b/docs/models/components/CreateMsTeamsUserEndpointDtoType.md @@ -2,6 +2,14 @@ Type of channel endpoint +## Example Usage + +```java +import co.novu.models.components.CreateMsTeamsUserEndpointDtoType; + +CreateMsTeamsUserEndpointDtoType value = CreateMsTeamsUserEndpointDtoType.MS_TEAMS_USER; +``` + ## Values diff --git a/docs/models/components/CreatePhoneEndpointDtoType.md b/docs/models/components/CreatePhoneEndpointDtoType.md index f2e052e1..ab4ab2e0 100644 --- a/docs/models/components/CreatePhoneEndpointDtoType.md +++ b/docs/models/components/CreatePhoneEndpointDtoType.md @@ -2,6 +2,14 @@ Type of channel endpoint +## Example Usage + +```java +import co.novu.models.components.CreatePhoneEndpointDtoType; + +CreatePhoneEndpointDtoType value = CreatePhoneEndpointDtoType.PHONE; +``` + ## Values diff --git a/docs/models/components/CreateSlackChannelEndpointDtoType.md b/docs/models/components/CreateSlackChannelEndpointDtoType.md index 1e8968d3..44bd3aed 100644 --- a/docs/models/components/CreateSlackChannelEndpointDtoType.md +++ b/docs/models/components/CreateSlackChannelEndpointDtoType.md @@ -2,6 +2,14 @@ Type of channel endpoint +## Example Usage + +```java +import co.novu.models.components.CreateSlackChannelEndpointDtoType; + +CreateSlackChannelEndpointDtoType value = CreateSlackChannelEndpointDtoType.SLACK_CHANNEL; +``` + ## Values diff --git a/docs/models/components/CreateSlackUserEndpointDtoType.md b/docs/models/components/CreateSlackUserEndpointDtoType.md index 2d6bc936..ba8b90ee 100644 --- a/docs/models/components/CreateSlackUserEndpointDtoType.md +++ b/docs/models/components/CreateSlackUserEndpointDtoType.md @@ -2,6 +2,14 @@ Type of channel endpoint +## Example Usage + +```java +import co.novu.models.components.CreateSlackUserEndpointDtoType; + +CreateSlackUserEndpointDtoType value = CreateSlackUserEndpointDtoType.SLACK_USER; +``` + ## Values diff --git a/docs/models/components/CreateTranslationRequestDtoResourceType.md b/docs/models/components/CreateTranslationRequestDtoResourceType.md index 98aebd25..23778f66 100644 --- a/docs/models/components/CreateTranslationRequestDtoResourceType.md +++ b/docs/models/components/CreateTranslationRequestDtoResourceType.md @@ -2,6 +2,14 @@ The resource type to associate translation with +## Example Usage + +```java +import co.novu.models.components.CreateTranslationRequestDtoResourceType; + +CreateTranslationRequestDtoResourceType value = CreateTranslationRequestDtoResourceType.WORKFLOW; +``` + ## Values diff --git a/docs/models/components/CreateWebhookEndpointDtoType.md b/docs/models/components/CreateWebhookEndpointDtoType.md index 02e75536..94e96604 100644 --- a/docs/models/components/CreateWebhookEndpointDtoType.md +++ b/docs/models/components/CreateWebhookEndpointDtoType.md @@ -2,6 +2,14 @@ Type of channel endpoint +## Example Usage + +```java +import co.novu.models.components.CreateWebhookEndpointDtoType; + +CreateWebhookEndpointDtoType value = CreateWebhookEndpointDtoType.WEBHOOK; +``` + ## Values diff --git a/docs/models/components/CustomStepResponseDto.md b/docs/models/components/CustomStepResponseDto.md index b38ccbc6..2184feb1 100644 --- a/docs/models/components/CustomStepResponseDto.md +++ b/docs/models/components/CustomStepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/DelayControlDtoType.md b/docs/models/components/DelayControlDtoType.md index 823c5264..5607d116 100644 --- a/docs/models/components/DelayControlDtoType.md +++ b/docs/models/components/DelayControlDtoType.md @@ -2,6 +2,17 @@ Type of the delay. Currently only 'regular' is supported by the schema. +## Example Usage + +```java +import co.novu.models.components.DelayControlDtoType; + +DelayControlDtoType value = DelayControlDtoType.REGULAR; + +// Open enum: use .of() to create instances from custom string values +DelayControlDtoType custom = DelayControlDtoType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DelayControlDtoUnit.md b/docs/models/components/DelayControlDtoUnit.md index 617ab1be..d3919e3b 100644 --- a/docs/models/components/DelayControlDtoUnit.md +++ b/docs/models/components/DelayControlDtoUnit.md @@ -2,6 +2,17 @@ Unit of time for the delay amount. +## Example Usage + +```java +import co.novu.models.components.DelayControlDtoUnit; + +DelayControlDtoUnit value = DelayControlDtoUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +DelayControlDtoUnit custom = DelayControlDtoUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DelayRegularMetadataType.md b/docs/models/components/DelayRegularMetadataType.md index 666be677..d75572aa 100644 --- a/docs/models/components/DelayRegularMetadataType.md +++ b/docs/models/components/DelayRegularMetadataType.md @@ -1,5 +1,13 @@ # DelayRegularMetadataType +## Example Usage + +```java +import co.novu.models.components.DelayRegularMetadataType; + +DelayRegularMetadataType value = DelayRegularMetadataType.REGULAR; +``` + ## Values diff --git a/docs/models/components/DelayRegularMetadataUnit.md b/docs/models/components/DelayRegularMetadataUnit.md index c7ab8cd2..ce0e9136 100644 --- a/docs/models/components/DelayRegularMetadataUnit.md +++ b/docs/models/components/DelayRegularMetadataUnit.md @@ -1,5 +1,16 @@ # DelayRegularMetadataUnit +## Example Usage + +```java +import co.novu.models.components.DelayRegularMetadataUnit; + +DelayRegularMetadataUnit value = DelayRegularMetadataUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +DelayRegularMetadataUnit custom = DelayRegularMetadataUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DelayScheduledMetadataType.md b/docs/models/components/DelayScheduledMetadataType.md index 0f1472d0..8beed7d6 100644 --- a/docs/models/components/DelayScheduledMetadataType.md +++ b/docs/models/components/DelayScheduledMetadataType.md @@ -1,5 +1,13 @@ # DelayScheduledMetadataType +## Example Usage + +```java +import co.novu.models.components.DelayScheduledMetadataType; + +DelayScheduledMetadataType value = DelayScheduledMetadataType.SCHEDULED; +``` + ## Values diff --git a/docs/models/components/DelayStepResponseDto.md b/docs/models/components/DelayStepResponseDto.md index 457d7eb8..2ba498a4 100644 --- a/docs/models/components/DelayStepResponseDto.md +++ b/docs/models/components/DelayStepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/DelayStepResponseDtoType.md b/docs/models/components/DelayStepResponseDtoType.md index cb032264..9441a48f 100644 --- a/docs/models/components/DelayStepResponseDtoType.md +++ b/docs/models/components/DelayStepResponseDtoType.md @@ -2,6 +2,17 @@ Type of the delay. Currently only 'regular' is supported by the schema. +## Example Usage + +```java +import co.novu.models.components.DelayStepResponseDtoType; + +DelayStepResponseDtoType value = DelayStepResponseDtoType.REGULAR; + +// Open enum: use .of() to create instances from custom string values +DelayStepResponseDtoType custom = DelayStepResponseDtoType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DelayStepResponseDtoUnit.md b/docs/models/components/DelayStepResponseDtoUnit.md index 6d8fdb7a..912ff7d1 100644 --- a/docs/models/components/DelayStepResponseDtoUnit.md +++ b/docs/models/components/DelayStepResponseDtoUnit.md @@ -2,6 +2,17 @@ Unit of time for the delay amount. +## Example Usage + +```java +import co.novu.models.components.DelayStepResponseDtoUnit; + +DelayStepResponseDtoUnit value = DelayStepResponseDtoUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +DelayStepResponseDtoUnit custom = DelayStepResponseDtoUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DeleteMessageResponseDtoStatus.md b/docs/models/components/DeleteMessageResponseDtoStatus.md index 99f80392..6079850d 100644 --- a/docs/models/components/DeleteMessageResponseDtoStatus.md +++ b/docs/models/components/DeleteMessageResponseDtoStatus.md @@ -2,6 +2,14 @@ The status enum for the performed action +## Example Usage + +```java +import co.novu.models.components.DeleteMessageResponseDtoStatus; + +DeleteMessageResponseDtoStatus value = DeleteMessageResponseDtoStatus.DELETED; +``` + ## Values diff --git a/docs/models/components/DependencyReasonEnum.md b/docs/models/components/DependencyReasonEnum.md new file mode 100644 index 00000000..3f7731d4 --- /dev/null +++ b/docs/models/components/DependencyReasonEnum.md @@ -0,0 +1,22 @@ +# DependencyReasonEnum + +Reason for the dependency + +## Example Usage + +```java +import co.novu.models.components.DependencyReasonEnum; + +DependencyReasonEnum value = DependencyReasonEnum.LAYOUT_REQUIRED_FOR_WORKFLOW; + +// Open enum: use .of() to create instances from custom string values +DependencyReasonEnum custom = DependencyReasonEnum.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ------------------------------ | ------------------------------ | +| `LAYOUT_REQUIRED_FOR_WORKFLOW` | LAYOUT_REQUIRED_FOR_WORKFLOW | +| `LAYOUT_EXISTS_IN_TARGET` | LAYOUT_EXISTS_IN_TARGET | \ No newline at end of file diff --git a/docs/models/components/DiffActionEnum.md b/docs/models/components/DiffActionEnum.md new file mode 100644 index 00000000..b6254766 --- /dev/null +++ b/docs/models/components/DiffActionEnum.md @@ -0,0 +1,25 @@ +# DiffActionEnum + +Type of change + +## Example Usage + +```java +import co.novu.models.components.DiffActionEnum; + +DiffActionEnum value = DiffActionEnum.ADDED; + +// Open enum: use .of() to create instances from custom string values +DiffActionEnum custom = DiffActionEnum.of("custom_value"); +``` + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `ADDED` | added | +| `MODIFIED` | modified | +| `DELETED` | deleted | +| `UNCHANGED` | unchanged | +| `MOVED` | moved | \ No newline at end of file diff --git a/docs/models/components/DiffEnvironmentRequestDto.md b/docs/models/components/DiffEnvironmentRequestDto.md new file mode 100644 index 00000000..6e34526e --- /dev/null +++ b/docs/models/components/DiffEnvironmentRequestDto.md @@ -0,0 +1,8 @@ +# DiffEnvironmentRequestDto + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- | +| `sourceEnvironmentId` | *Optional\* | :heavy_minus_sign: | Source environment ID to compare from. Defaults to the Development environment if not provided. | 507f1f77bcf86cd799439011 | \ No newline at end of file diff --git a/docs/models/components/DiffEnvironmentResponseDto.md b/docs/models/components/DiffEnvironmentResponseDto.md new file mode 100644 index 00000000..9c09b50b --- /dev/null +++ b/docs/models/components/DiffEnvironmentResponseDto.md @@ -0,0 +1,11 @@ +# DiffEnvironmentResponseDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `sourceEnvironmentId` | *String* | :heavy_check_mark: | Source environment ID | +| `targetEnvironmentId` | *String* | :heavy_check_mark: | Target environment ID | +| `resources` | List\<[ResourceDiffResultDto](../../models/components/ResourceDiffResultDto.md)> | :heavy_check_mark: | Diff resources by resource type | +| `summary` | [EnvironmentDiffSummaryDto](../../models/components/EnvironmentDiffSummaryDto.md) | :heavy_check_mark: | Overall summary | \ No newline at end of file diff --git a/docs/models/components/DiffSummaryDto.md b/docs/models/components/DiffSummaryDto.md new file mode 100644 index 00000000..9d8e8d39 --- /dev/null +++ b/docs/models/components/DiffSummaryDto.md @@ -0,0 +1,11 @@ +# DiffSummaryDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | --------------------------------------------------- | +| `added` | *double* | :heavy_check_mark: | Number of added resources (workflows and steps) | +| `modified` | *double* | :heavy_check_mark: | Number of modified resources (workflows and steps) | +| `deleted` | *double* | :heavy_check_mark: | Number of deleted resources (workflows and steps) | +| `unchanged` | *double* | :heavy_check_mark: | Number of unchanged resources (workflows and steps) | \ No newline at end of file diff --git a/docs/models/components/Diffs.md b/docs/models/components/Diffs.md new file mode 100644 index 00000000..ab1bb243 --- /dev/null +++ b/docs/models/components/Diffs.md @@ -0,0 +1,11 @@ +# Diffs + +Detailed changes (only for modified resources) + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | --------------------------------------------------------- | +| `previous` | Map\ | :heavy_minus_sign: | Previous state of the resource (null for added resources) | +| `new_` | Map\ | :heavy_minus_sign: | New state of the resource (null for deleted resources) | \ No newline at end of file diff --git a/docs/models/components/DigestControlDtoType.md b/docs/models/components/DigestControlDtoType.md index 521a77a1..96d54ed1 100644 --- a/docs/models/components/DigestControlDtoType.md +++ b/docs/models/components/DigestControlDtoType.md @@ -2,6 +2,17 @@ The type of digest strategy. Determines which fields are applicable. +## Example Usage + +```java +import co.novu.models.components.DigestControlDtoType; + +DigestControlDtoType value = DigestControlDtoType.REGULAR; + +// Open enum: use .of() to create instances from custom string values +DigestControlDtoType custom = DigestControlDtoType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DigestControlDtoUnit.md b/docs/models/components/DigestControlDtoUnit.md index 34e0a306..d598b514 100644 --- a/docs/models/components/DigestControlDtoUnit.md +++ b/docs/models/components/DigestControlDtoUnit.md @@ -2,6 +2,17 @@ The unit of time for the digest interval (for REGULAR type). +## Example Usage + +```java +import co.novu.models.components.DigestControlDtoUnit; + +DigestControlDtoUnit value = DigestControlDtoUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +DigestControlDtoUnit custom = DigestControlDtoUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DigestMetadataDtoUnit.md b/docs/models/components/DigestMetadataDtoUnit.md index 45270c39..27aba19e 100644 --- a/docs/models/components/DigestMetadataDtoUnit.md +++ b/docs/models/components/DigestMetadataDtoUnit.md @@ -2,6 +2,17 @@ Unit of the digest +## Example Usage + +```java +import co.novu.models.components.DigestMetadataDtoUnit; + +DigestMetadataDtoUnit value = DigestMetadataDtoUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +DigestMetadataDtoUnit custom = DigestMetadataDtoUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DigestRegularMetadataType.md b/docs/models/components/DigestRegularMetadataType.md index bf480269..60f0b180 100644 --- a/docs/models/components/DigestRegularMetadataType.md +++ b/docs/models/components/DigestRegularMetadataType.md @@ -1,5 +1,16 @@ # DigestRegularMetadataType +## Example Usage + +```java +import co.novu.models.components.DigestRegularMetadataType; + +DigestRegularMetadataType value = DigestRegularMetadataType.REGULAR; + +// Open enum: use .of() to create instances from custom string values +DigestRegularMetadataType custom = DigestRegularMetadataType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DigestRegularMetadataUnit.md b/docs/models/components/DigestRegularMetadataUnit.md index 89dc4f29..7b109ab7 100644 --- a/docs/models/components/DigestRegularMetadataUnit.md +++ b/docs/models/components/DigestRegularMetadataUnit.md @@ -1,5 +1,16 @@ # DigestRegularMetadataUnit +## Example Usage + +```java +import co.novu.models.components.DigestRegularMetadataUnit; + +DigestRegularMetadataUnit value = DigestRegularMetadataUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +DigestRegularMetadataUnit custom = DigestRegularMetadataUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DigestRegularOutput.md b/docs/models/components/DigestRegularOutput.md new file mode 100644 index 00000000..00aa21de --- /dev/null +++ b/docs/models/components/DigestRegularOutput.md @@ -0,0 +1,11 @@ +# DigestRegularOutput + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- | +| `amount` | *double* | :heavy_check_mark: | Amount of time units | +| `unit` | [TimeUnitEnum](../../models/components/TimeUnitEnum.md) | :heavy_check_mark: | Time unit | +| `digestKey` | *Optional\* | :heavy_minus_sign: | Optional digest key | +| `lookBackWindow` | [Optional\](../../models/components/LookBackWindow.md) | :heavy_minus_sign: | Look back window configuration | \ No newline at end of file diff --git a/docs/models/components/DigestStepResponseDto.md b/docs/models/components/DigestStepResponseDto.md index e78b9d69..7f003094 100644 --- a/docs/models/components/DigestStepResponseDto.md +++ b/docs/models/components/DigestStepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/DigestStepResponseDtoType.md b/docs/models/components/DigestStepResponseDtoType.md index 56ac52d7..cc0156ef 100644 --- a/docs/models/components/DigestStepResponseDtoType.md +++ b/docs/models/components/DigestStepResponseDtoType.md @@ -2,6 +2,17 @@ The type of digest strategy. Determines which fields are applicable. +## Example Usage + +```java +import co.novu.models.components.DigestStepResponseDtoType; + +DigestStepResponseDtoType value = DigestStepResponseDtoType.REGULAR; + +// Open enum: use .of() to create instances from custom string values +DigestStepResponseDtoType custom = DigestStepResponseDtoType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DigestStepResponseDtoUnit.md b/docs/models/components/DigestStepResponseDtoUnit.md index be32945a..70e5ed62 100644 --- a/docs/models/components/DigestStepResponseDtoUnit.md +++ b/docs/models/components/DigestStepResponseDtoUnit.md @@ -2,6 +2,17 @@ The unit of time for the digest interval (for REGULAR type). +## Example Usage + +```java +import co.novu.models.components.DigestStepResponseDtoUnit; + +DigestStepResponseDtoUnit value = DigestStepResponseDtoUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +DigestStepResponseDtoUnit custom = DigestStepResponseDtoUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DigestTimedConfigDtoWeekDay.md b/docs/models/components/DigestTimedConfigDtoWeekDay.md index 7adaa5a7..9e67f05d 100644 --- a/docs/models/components/DigestTimedConfigDtoWeekDay.md +++ b/docs/models/components/DigestTimedConfigDtoWeekDay.md @@ -1,5 +1,13 @@ # DigestTimedConfigDtoWeekDay +## Example Usage + +```java +import co.novu.models.components.DigestTimedConfigDtoWeekDay; + +DigestTimedConfigDtoWeekDay value = DigestTimedConfigDtoWeekDay.MONDAY; +``` + ## Values diff --git a/docs/models/components/DigestTimedMetadataType.md b/docs/models/components/DigestTimedMetadataType.md index 47d3b2c7..fc963e47 100644 --- a/docs/models/components/DigestTimedMetadataType.md +++ b/docs/models/components/DigestTimedMetadataType.md @@ -1,5 +1,13 @@ # DigestTimedMetadataType +## Example Usage + +```java +import co.novu.models.components.DigestTimedMetadataType; + +DigestTimedMetadataType value = DigestTimedMetadataType.TIMED; +``` + ## Values diff --git a/docs/models/components/DigestTimedMetadataUnit.md b/docs/models/components/DigestTimedMetadataUnit.md index f45daeb0..8b16b5f6 100644 --- a/docs/models/components/DigestTimedMetadataUnit.md +++ b/docs/models/components/DigestTimedMetadataUnit.md @@ -1,5 +1,16 @@ # DigestTimedMetadataUnit +## Example Usage + +```java +import co.novu.models.components.DigestTimedMetadataUnit; + +DigestTimedMetadataUnit value = DigestTimedMetadataUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +DigestTimedMetadataUnit custom = DigestTimedMetadataUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DigestTypeEnum.md b/docs/models/components/DigestTypeEnum.md index b6062460..d568fb9c 100644 --- a/docs/models/components/DigestTypeEnum.md +++ b/docs/models/components/DigestTypeEnum.md @@ -2,6 +2,17 @@ The Digest Type +## Example Usage + +```java +import co.novu.models.components.DigestTypeEnum; + +DigestTypeEnum value = DigestTypeEnum.REGULAR; + +// Open enum: use .of() to create instances from custom string values +DigestTypeEnum custom = DigestTypeEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DigestUnitEnum.md b/docs/models/components/DigestUnitEnum.md index 4ddc039e..688e7aec 100644 --- a/docs/models/components/DigestUnitEnum.md +++ b/docs/models/components/DigestUnitEnum.md @@ -2,6 +2,17 @@ Regular digest: Unit for backoff +## Example Usage + +```java +import co.novu.models.components.DigestUnitEnum; + +DigestUnitEnum value = DigestUnitEnum.SECONDS; + +// Open enum: use .of() to create instances from custom string values +DigestUnitEnum custom = DigestUnitEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/DirectionEnum.md b/docs/models/components/DirectionEnum.md index b8bad34a..06df34c7 100644 --- a/docs/models/components/DirectionEnum.md +++ b/docs/models/components/DirectionEnum.md @@ -1,5 +1,13 @@ # DirectionEnum +## Example Usage + +```java +import co.novu.models.components.DirectionEnum; + +DirectionEnum value = DirectionEnum.ASC; +``` + ## Values diff --git a/docs/models/components/EmailBlockTypeEnum.md b/docs/models/components/EmailBlockTypeEnum.md index 92e98ec0..44e9c3da 100644 --- a/docs/models/components/EmailBlockTypeEnum.md +++ b/docs/models/components/EmailBlockTypeEnum.md @@ -2,6 +2,17 @@ Type of the email block +## Example Usage + +```java +import co.novu.models.components.EmailBlockTypeEnum; + +EmailBlockTypeEnum value = EmailBlockTypeEnum.BUTTON; + +// Open enum: use .of() to create instances from custom string values +EmailBlockTypeEnum custom = EmailBlockTypeEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/EmailControlDto.md b/docs/models/components/EmailControlDto.md index 7f3a13b0..e66251e4 100644 --- a/docs/models/components/EmailControlDto.md +++ b/docs/models/components/EmailControlDto.md @@ -9,6 +9,5 @@ | `subject` | *String* | :heavy_check_mark: | Subject of the email. | | | `body` | *Optional\* | :heavy_minus_sign: | Body content of the email, either a valid Maily JSON object, or html string. | | | `editorType` | [Optional\](../../models/components/EmailControlDtoEditorType.md) | :heavy_minus_sign: | Type of editor to use for the body. | | -| `rendererType` | [Optional\](../../models/components/EmailControlDtoRendererType.md) | :heavy_minus_sign: | Type of renderer to use (raw HTML or React Email step resolver) | | | `disableOutputSanitization` | *Optional\* | :heavy_minus_sign: | Disable sanitization of the output. | | | `layoutId` | *JsonNullable\* | :heavy_minus_sign: | Layout ID to use for the email. Null means no layout, undefined means default layout. | | \ No newline at end of file diff --git a/docs/models/components/EmailControlDtoEditorType.md b/docs/models/components/EmailControlDtoEditorType.md index 4394a126..fac1b841 100644 --- a/docs/models/components/EmailControlDtoEditorType.md +++ b/docs/models/components/EmailControlDtoEditorType.md @@ -2,6 +2,17 @@ Type of editor to use for the body. +## Example Usage + +```java +import co.novu.models.components.EmailControlDtoEditorType; + +EmailControlDtoEditorType value = EmailControlDtoEditorType.BLOCK; + +// Open enum: use .of() to create instances from custom string values +EmailControlDtoEditorType custom = EmailControlDtoEditorType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/EmailControlDtoRendererType.md b/docs/models/components/EmailControlDtoRendererType.md deleted file mode 100644 index 8821efdf..00000000 --- a/docs/models/components/EmailControlDtoRendererType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EmailControlDtoRendererType - -Type of renderer to use (raw HTML or React Email step resolver) - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `HTML` | html | -| `REACT_EMAIL` | react-email | \ No newline at end of file diff --git a/docs/models/components/EmailControlsDtoEditorType.md b/docs/models/components/EmailControlsDtoEditorType.md index ef56f6c8..b9104bce 100644 --- a/docs/models/components/EmailControlsDtoEditorType.md +++ b/docs/models/components/EmailControlsDtoEditorType.md @@ -2,6 +2,17 @@ Editor type of the layout. +## Example Usage + +```java +import co.novu.models.components.EmailControlsDtoEditorType; + +EmailControlsDtoEditorType value = EmailControlsDtoEditorType.HTML; + +// Open enum: use .of() to create instances from custom string values +EmailControlsDtoEditorType custom = EmailControlsDtoEditorType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/EmailRenderOutput.md b/docs/models/components/EmailRenderOutput.md new file mode 100644 index 00000000..face90c5 --- /dev/null +++ b/docs/models/components/EmailRenderOutput.md @@ -0,0 +1,9 @@ +# EmailRenderOutput + + +## Fields + +| Field | Type | Required | Description | +| -------------------- | -------------------- | -------------------- | -------------------- | +| `subject` | *String* | :heavy_check_mark: | Subject of the email | +| `body` | *String* | :heavy_check_mark: | Body of the email | \ No newline at end of file diff --git a/docs/models/components/EmailStepResponseDto.md b/docs/models/components/EmailStepResponseDto.md index 440fa2c9..5d3ea944 100644 --- a/docs/models/components/EmailStepResponseDto.md +++ b/docs/models/components/EmailStepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/EmailStepResponseDtoControlValues.md b/docs/models/components/EmailStepResponseDtoControlValues.md index 7e4f8411..4c990f78 100644 --- a/docs/models/components/EmailStepResponseDtoControlValues.md +++ b/docs/models/components/EmailStepResponseDtoControlValues.md @@ -11,7 +11,6 @@ Control values for the email step | `subject` | *String* | :heavy_check_mark: | Subject of the email. | | | `body` | *Optional\* | :heavy_minus_sign: | Body content of the email, either a valid Maily JSON object, or html string. | | | `editorType` | [Optional\](../../models/components/EmailStepResponseDtoEditorType.md) | :heavy_minus_sign: | Type of editor to use for the body. | | -| `rendererType` | [Optional\](../../models/components/EmailStepResponseDtoRendererType.md) | :heavy_minus_sign: | Type of renderer to use (raw HTML or React Email step resolver) | | | `disableOutputSanitization` | *Optional\* | :heavy_minus_sign: | Disable sanitization of the output. | | | `layoutId` | *JsonNullable\* | :heavy_minus_sign: | Layout ID to use for the email. Null means no layout, undefined means default layout. | | | `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | | \ No newline at end of file diff --git a/docs/models/components/EmailStepResponseDtoEditorType.md b/docs/models/components/EmailStepResponseDtoEditorType.md index b36c7e9d..5ce6d3da 100644 --- a/docs/models/components/EmailStepResponseDtoEditorType.md +++ b/docs/models/components/EmailStepResponseDtoEditorType.md @@ -2,6 +2,17 @@ Type of editor to use for the body. +## Example Usage + +```java +import co.novu.models.components.EmailStepResponseDtoEditorType; + +EmailStepResponseDtoEditorType value = EmailStepResponseDtoEditorType.BLOCK; + +// Open enum: use .of() to create instances from custom string values +EmailStepResponseDtoEditorType custom = EmailStepResponseDtoEditorType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/EmailStepResponseDtoRendererType.md b/docs/models/components/EmailStepResponseDtoRendererType.md deleted file mode 100644 index 7e2b6312..00000000 --- a/docs/models/components/EmailStepResponseDtoRendererType.md +++ /dev/null @@ -1,11 +0,0 @@ -# EmailStepResponseDtoRendererType - -Type of renderer to use (raw HTML or React Email step resolver) - - -## Values - -| Name | Value | -| ------------- | ------------- | -| `HTML` | html | -| `REACT_EMAIL` | react-email | \ No newline at end of file diff --git a/docs/models/components/EnvironmentDiffSummaryDto.md b/docs/models/components/EnvironmentDiffSummaryDto.md new file mode 100644 index 00000000..d4619ba0 --- /dev/null +++ b/docs/models/components/EnvironmentDiffSummaryDto.md @@ -0,0 +1,10 @@ +# EnvironmentDiffSummaryDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | +| `totalEntities` | *double* | :heavy_check_mark: | Total number of entities compared | +| `totalChanges` | *double* | :heavy_check_mark: | Total number of changes detected | +| `hasChanges` | *boolean* | :heavy_check_mark: | Whether any changes were detected | \ No newline at end of file diff --git a/docs/models/components/EnvironmentResponseDtoType.md b/docs/models/components/EnvironmentResponseDtoType.md index 8a0a5918..f986dd5a 100644 --- a/docs/models/components/EnvironmentResponseDtoType.md +++ b/docs/models/components/EnvironmentResponseDtoType.md @@ -2,6 +2,17 @@ Type of the environment +## Example Usage + +```java +import co.novu.models.components.EnvironmentResponseDtoType; + +EnvironmentResponseDtoType value = EnvironmentResponseDtoType.DEV; + +// Open enum: use .of() to create instances from custom string values +EnvironmentResponseDtoType custom = EnvironmentResponseDtoType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/EnvironmentVariableResponseDto.md b/docs/models/components/EnvironmentVariableResponseDto.md new file mode 100644 index 00000000..dddea05d --- /dev/null +++ b/docs/models/components/EnvironmentVariableResponseDto.md @@ -0,0 +1,15 @@ +# EnvironmentVariableResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------ | +| `id` | *String* | :heavy_check_mark: | N/A | +| `organizationId` | *String* | :heavy_check_mark: | N/A | +| `key` | *String* | :heavy_check_mark: | N/A | +| `type` | [EnvironmentVariableResponseDtoType](../../models/components/EnvironmentVariableResponseDtoType.md) | :heavy_check_mark: | N/A | +| `isSecret` | *boolean* | :heavy_check_mark: | N/A | +| `values` | List\<[EnvironmentVariableValueResponseDto](../../models/components/EnvironmentVariableValueResponseDto.md)> | :heavy_check_mark: | N/A | +| `createdAt` | *String* | :heavy_check_mark: | N/A | +| `updatedAt` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/EnvironmentVariableResponseDtoType.md b/docs/models/components/EnvironmentVariableResponseDtoType.md new file mode 100644 index 00000000..4a8c9c64 --- /dev/null +++ b/docs/models/components/EnvironmentVariableResponseDtoType.md @@ -0,0 +1,16 @@ +# EnvironmentVariableResponseDtoType + +## Example Usage + +```java +import co.novu.models.components.EnvironmentVariableResponseDtoType; + +EnvironmentVariableResponseDtoType value = EnvironmentVariableResponseDtoType.STRING; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `STRING` | string | \ No newline at end of file diff --git a/docs/models/components/EnvironmentVariableValueDto.md b/docs/models/components/EnvironmentVariableValueDto.md new file mode 100644 index 00000000..e2047577 --- /dev/null +++ b/docs/models/components/EnvironmentVariableValueDto.md @@ -0,0 +1,9 @@ +# EnvironmentVariableValueDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------ | ------------------ | ------------------ | ------------------ | +| `environmentId` | *String* | :heavy_check_mark: | N/A | +| `value` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/components/EnvironmentVariableValueResponseDto.md b/docs/models/components/EnvironmentVariableValueResponseDto.md new file mode 100644 index 00000000..f1ee1221 --- /dev/null +++ b/docs/models/components/EnvironmentVariableValueResponseDto.md @@ -0,0 +1,9 @@ +# EnvironmentVariableValueResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | ----------------------------------------------- | +| `environmentId` | *String* | :heavy_check_mark: | N/A | +| `value` | *String* | :heavy_check_mark: | Value is masked (••••••••) for secret variables | \ No newline at end of file diff --git a/docs/models/components/EnvironmentVariableWorkflowInfoDto.md b/docs/models/components/EnvironmentVariableWorkflowInfoDto.md new file mode 100644 index 00000000..53ff0bf5 --- /dev/null +++ b/docs/models/components/EnvironmentVariableWorkflowInfoDto.md @@ -0,0 +1,9 @@ +# EnvironmentVariableWorkflowInfoDto + + +## Fields + +| Field | Type | Required | Description | Example | +| ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | ------------------------------------- | +| `name` | *String* | :heavy_check_mark: | The name of the workflow | Welcome Email | +| `workflowId` | *String* | :heavy_check_mark: | The unique identifier of the workflow | welcome-email | \ No newline at end of file diff --git a/docs/models/components/EventBodyStatus.md b/docs/models/components/EventBodyStatus.md index 68c14004..379af4b1 100644 --- a/docs/models/components/EventBodyStatus.md +++ b/docs/models/components/EventBodyStatus.md @@ -2,6 +2,17 @@ Status of the event +## Example Usage + +```java +import co.novu.models.components.EventBodyStatus; + +EventBodyStatus value = EventBodyStatus.OPENED; + +// Open enum: use .of() to create instances from custom string values +EventBodyStatus custom = EventBodyStatus.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ExecutionDetailsSourceEnum.md b/docs/models/components/ExecutionDetailsSourceEnum.md index 91540db4..233b5392 100644 --- a/docs/models/components/ExecutionDetailsSourceEnum.md +++ b/docs/models/components/ExecutionDetailsSourceEnum.md @@ -2,6 +2,17 @@ Source of the execution detail +## Example Usage + +```java +import co.novu.models.components.ExecutionDetailsSourceEnum; + +ExecutionDetailsSourceEnum value = ExecutionDetailsSourceEnum.CREDENTIALS; + +// Open enum: use .of() to create instances from custom string values +ExecutionDetailsSourceEnum custom = ExecutionDetailsSourceEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ExecutionDetailsStatusEnum.md b/docs/models/components/ExecutionDetailsStatusEnum.md index 924bebab..39adfbfb 100644 --- a/docs/models/components/ExecutionDetailsStatusEnum.md +++ b/docs/models/components/ExecutionDetailsStatusEnum.md @@ -2,6 +2,17 @@ Status of the execution detail +## Example Usage + +```java +import co.novu.models.components.ExecutionDetailsStatusEnum; + +ExecutionDetailsStatusEnum value = ExecutionDetailsStatusEnum.SUCCESS; + +// Open enum: use .of() to create instances from custom string values +ExecutionDetailsStatusEnum custom = ExecutionDetailsStatusEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/FailedWorkflowDto.md b/docs/models/components/FailedWorkflowDto.md new file mode 100644 index 00000000..4aa4cbc0 --- /dev/null +++ b/docs/models/components/FailedWorkflowDto.md @@ -0,0 +1,12 @@ +# FailedWorkflowDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `resourceType` | [ResourceTypeEnum](../../models/components/ResourceTypeEnum.md) | :heavy_check_mark: | Type of the layout | +| `resourceId` | *String* | :heavy_check_mark: | Resource ID | +| `resourceName` | *String* | :heavy_check_mark: | Resource name | +| `error` | *String* | :heavy_check_mark: | Error message | +| `stack` | *Optional\* | :heavy_minus_sign: | Error stack trace | \ No newline at end of file diff --git a/docs/models/components/Filter.md b/docs/models/components/Filter.md new file mode 100644 index 00000000..c80e8255 --- /dev/null +++ b/docs/models/components/Filter.md @@ -0,0 +1,9 @@ +# Filter + +The filter applied to the notifications + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/GenerateLayoutPreviewResponseDto.md b/docs/models/components/GenerateLayoutPreviewResponseDto.md index 280181db..9e8cef82 100644 --- a/docs/models/components/GenerateLayoutPreviewResponseDto.md +++ b/docs/models/components/GenerateLayoutPreviewResponseDto.md @@ -3,8 +3,8 @@ ## Fields -| Field | Type | Required | Description | -| ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | -| `previewPayloadExample` | [LayoutPreviewPayloadDto](../../models/components/LayoutPreviewPayloadDto.md) | :heavy_check_mark: | Preview payload example | -| `schema` | Map\ | :heavy_minus_sign: | The payload schema that was used to generate the preview payload example | -| `result` | [ResultUnion](../../models/components/ResultUnion.md) | :heavy_check_mark: | Preview result | \ No newline at end of file +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- | +| `previewPayloadExample` | [LayoutPreviewPayloadDto](../../models/components/LayoutPreviewPayloadDto.md) | :heavy_check_mark: | Preview payload example | +| `schema` | Map\ | :heavy_minus_sign: | The payload schema that was used to generate the preview payload example | +| `result` | [GenerateLayoutPreviewResponseDtoResultUnion](../../models/components/GenerateLayoutPreviewResponseDtoResultUnion.md) | :heavy_check_mark: | Preview result | \ No newline at end of file diff --git a/docs/models/components/Result.md b/docs/models/components/GenerateLayoutPreviewResponseDtoResult.md similarity index 97% rename from docs/models/components/Result.md rename to docs/models/components/GenerateLayoutPreviewResponseDtoResult.md index bc50f5ce..4d7135a6 100644 --- a/docs/models/components/Result.md +++ b/docs/models/components/GenerateLayoutPreviewResponseDtoResult.md @@ -1,4 +1,4 @@ -# Result +# GenerateLayoutPreviewResponseDtoResult ## Fields diff --git a/docs/models/components/GenerateLayoutPreviewResponseDtoResultUnion.md b/docs/models/components/GenerateLayoutPreviewResponseDtoResultUnion.md new file mode 100644 index 00000000..19a7423c --- /dev/null +++ b/docs/models/components/GenerateLayoutPreviewResponseDtoResultUnion.md @@ -0,0 +1,4 @@ +# GenerateLayoutPreviewResponseDtoResultUnion + +Preview result + diff --git a/docs/models/components/GenerateLayoutPreviewResponseDtoType.md b/docs/models/components/GenerateLayoutPreviewResponseDtoType.md index 386efc3e..d5f479e1 100644 --- a/docs/models/components/GenerateLayoutPreviewResponseDtoType.md +++ b/docs/models/components/GenerateLayoutPreviewResponseDtoType.md @@ -1,5 +1,13 @@ # GenerateLayoutPreviewResponseDtoType +## Example Usage + +```java +import co.novu.models.components.GenerateLayoutPreviewResponseDtoType; + +GenerateLayoutPreviewResponseDtoType value = GenerateLayoutPreviewResponseDtoType.EMAIL; +``` + ## Values diff --git a/docs/models/components/GeneratePreviewRequestDto.md b/docs/models/components/GeneratePreviewRequestDto.md new file mode 100644 index 00000000..99c2a128 --- /dev/null +++ b/docs/models/components/GeneratePreviewRequestDto.md @@ -0,0 +1,9 @@ +# GeneratePreviewRequestDto + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `controlValues` | Map\ | :heavy_minus_sign: | Optional control values | +| `previewPayload` | [Optional\](../../models/components/PreviewPayloadDto.md) | :heavy_minus_sign: | Optional payload for preview generation | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDto.md b/docs/models/components/GeneratePreviewResponseDto.md new file mode 100644 index 00000000..0bc81fc0 --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDto.md @@ -0,0 +1,11 @@ +# GeneratePreviewResponseDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `previewPayloadExample` | [PreviewPayloadDto](../../models/components/PreviewPayloadDto.md) | :heavy_check_mark: | Preview payload example | +| `schema` | Map\ | :heavy_minus_sign: | The payload schema that was used to generate the preview payload example | +| `novuSignature` | *Optional\* | :heavy_minus_sign: | Sample novu-signature header value for HTTP request steps | +| `result` | [GeneratePreviewResponseDtoResultUnion](../../models/components/GeneratePreviewResponseDtoResultUnion.md) | :heavy_check_mark: | Preview result | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoResult1.md b/docs/models/components/GeneratePreviewResponseDtoResult1.md new file mode 100644 index 00000000..6e626e27 --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoResult1.md @@ -0,0 +1,10 @@ +# GeneratePreviewResponseDtoResult1 + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `type` | [Optional\](../../models/components/GeneratePreviewResponseDtoTypeEmail1.md) | :heavy_minus_sign: | N/A | +| `preview` | [Optional\](../../models/components/EmailRenderOutput.md) | :heavy_minus_sign: | N/A | +| `error` | [Optional\](../../models/components/PreviewErrorDto.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoResult2.md b/docs/models/components/GeneratePreviewResponseDtoResult2.md new file mode 100644 index 00000000..7aa679e9 --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoResult2.md @@ -0,0 +1,10 @@ +# GeneratePreviewResponseDtoResult2 + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | +| `type` | [Optional\](../../models/components/GeneratePreviewResponseDtoTypeEmail2.md) | :heavy_minus_sign: | N/A | +| `preview` | [Optional\](../../models/components/EmailRenderOutput.md) | :heavy_minus_sign: | N/A | +| `error` | [Optional\](../../models/components/PreviewErrorDto.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoResult3.md b/docs/models/components/GeneratePreviewResponseDtoResult3.md new file mode 100644 index 00000000..f3d665a9 --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoResult3.md @@ -0,0 +1,10 @@ +# GeneratePreviewResponseDtoResult3 + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | ---------------------------------------------------------------------------- | +| `type` | [Optional\](../../models/components/TypeInApp.md) | :heavy_minus_sign: | N/A | +| `preview` | [Optional\](../../models/components/InAppRenderOutput.md) | :heavy_minus_sign: | N/A | +| `error` | [Optional\](../../models/components/PreviewErrorDto.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoResult4.md b/docs/models/components/GeneratePreviewResponseDtoResult4.md new file mode 100644 index 00000000..4632590d --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoResult4.md @@ -0,0 +1,10 @@ +# GeneratePreviewResponseDtoResult4 + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | ------------------------------------------------------------------------ | +| `type` | [Optional\](../../models/components/TypeSms.md) | :heavy_minus_sign: | N/A | +| `preview` | [Optional\](../../models/components/SmsRenderOutput.md) | :heavy_minus_sign: | N/A | +| `error` | [Optional\](../../models/components/PreviewErrorDto.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoResult5.md b/docs/models/components/GeneratePreviewResponseDtoResult5.md new file mode 100644 index 00000000..a3ec0197 --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoResult5.md @@ -0,0 +1,10 @@ +# GeneratePreviewResponseDtoResult5 + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `type` | [Optional\](../../models/components/TypePush.md) | :heavy_minus_sign: | N/A | +| `preview` | [Optional\](../../models/components/PushRenderOutput.md) | :heavy_minus_sign: | N/A | +| `error` | [Optional\](../../models/components/PreviewErrorDto.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoResult6.md b/docs/models/components/GeneratePreviewResponseDtoResult6.md new file mode 100644 index 00000000..0e447147 --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoResult6.md @@ -0,0 +1,10 @@ +# GeneratePreviewResponseDtoResult6 + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `type` | [Optional\](../../models/components/TypeChat.md) | :heavy_minus_sign: | N/A | +| `preview` | [Optional\](../../models/components/ChatRenderOutput.md) | :heavy_minus_sign: | N/A | +| `error` | [Optional\](../../models/components/PreviewErrorDto.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoResult7.md b/docs/models/components/GeneratePreviewResponseDtoResult7.md new file mode 100644 index 00000000..bbcb7426 --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoResult7.md @@ -0,0 +1,9 @@ +# GeneratePreviewResponseDtoResult7 + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `type` | [Optional\](../../models/components/TypeDelay.md) | :heavy_minus_sign: | N/A | +| `preview` | [Optional\](../../models/components/DigestRegularOutput.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoResult8.md b/docs/models/components/GeneratePreviewResponseDtoResult8.md new file mode 100644 index 00000000..2a85a372 --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoResult8.md @@ -0,0 +1,9 @@ +# GeneratePreviewResponseDtoResult8 + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | -------------------------------------------------------------------------------- | +| `type` | [Optional\](../../models/components/TypeDigest.md) | :heavy_minus_sign: | N/A | +| `preview` | [Optional\](../../models/components/DigestRegularOutput.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoResultUnion.md b/docs/models/components/GeneratePreviewResponseDtoResultUnion.md new file mode 100644 index 00000000..34c1972e --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoResultUnion.md @@ -0,0 +1,4 @@ +# GeneratePreviewResponseDtoResultUnion + +Preview result + diff --git a/docs/models/components/GeneratePreviewResponseDtoTypeEmail1.md b/docs/models/components/GeneratePreviewResponseDtoTypeEmail1.md new file mode 100644 index 00000000..7ed7691e --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoTypeEmail1.md @@ -0,0 +1,16 @@ +# GeneratePreviewResponseDtoTypeEmail1 + +## Example Usage + +```java +import co.novu.models.components.GeneratePreviewResponseDtoTypeEmail1; + +GeneratePreviewResponseDtoTypeEmail1 value = GeneratePreviewResponseDtoTypeEmail1.EMAIL; +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `EMAIL` | email | \ No newline at end of file diff --git a/docs/models/components/GeneratePreviewResponseDtoTypeEmail2.md b/docs/models/components/GeneratePreviewResponseDtoTypeEmail2.md new file mode 100644 index 00000000..759c9434 --- /dev/null +++ b/docs/models/components/GeneratePreviewResponseDtoTypeEmail2.md @@ -0,0 +1,16 @@ +# GeneratePreviewResponseDtoTypeEmail2 + +## Example Usage + +```java +import co.novu.models.components.GeneratePreviewResponseDtoTypeEmail2; + +GeneratePreviewResponseDtoTypeEmail2 value = GeneratePreviewResponseDtoTypeEmail2.EMAIL; +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `EMAIL` | email | \ No newline at end of file diff --git a/docs/models/components/GetChannelConnectionResponseDtoChannel.md b/docs/models/components/GetChannelConnectionResponseDtoChannel.md index 6c63cb15..d9bf8ab7 100644 --- a/docs/models/components/GetChannelConnectionResponseDtoChannel.md +++ b/docs/models/components/GetChannelConnectionResponseDtoChannel.md @@ -2,6 +2,17 @@ The channel type (email, sms, push, chat, etc.). +## Example Usage + +```java +import co.novu.models.components.GetChannelConnectionResponseDtoChannel; + +GetChannelConnectionResponseDtoChannel value = GetChannelConnectionResponseDtoChannel.IN_APP; + +// Open enum: use .of() to create instances from custom string values +GetChannelConnectionResponseDtoChannel custom = GetChannelConnectionResponseDtoChannel.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/GetChannelConnectionResponseDtoProviderId.md b/docs/models/components/GetChannelConnectionResponseDtoProviderId.md index 72edf5ca..3ad7ba31 100644 --- a/docs/models/components/GetChannelConnectionResponseDtoProviderId.md +++ b/docs/models/components/GetChannelConnectionResponseDtoProviderId.md @@ -2,6 +2,17 @@ The provider identifier (e.g., sendgrid, twilio, slack, etc.). +## Example Usage + +```java +import co.novu.models.components.GetChannelConnectionResponseDtoProviderId; + +GetChannelConnectionResponseDtoProviderId value = GetChannelConnectionResponseDtoProviderId.EMAILJS; + +// Open enum: use .of() to create instances from custom string values +GetChannelConnectionResponseDtoProviderId custom = GetChannelConnectionResponseDtoProviderId.of("custom_value"); +``` + ## Values @@ -64,6 +75,7 @@ The provider identifier (e.g., sendgrid, twilio, slack, etc.). | `IMEDIA` | imedia | | `SINCH` | sinch | | `ISENDPRO_SMS` | isendpro-sms | +| `CM_TELECOM` | cm-telecom | | `FCM` | fcm | | `APNS` | apns | | `EXPO` | expo | diff --git a/docs/models/components/GetChannelEndpointResponseDtoChannel.md b/docs/models/components/GetChannelEndpointResponseDtoChannel.md index 4cac0681..e81d3fd5 100644 --- a/docs/models/components/GetChannelEndpointResponseDtoChannel.md +++ b/docs/models/components/GetChannelEndpointResponseDtoChannel.md @@ -2,6 +2,17 @@ The channel type (email, sms, push, chat, etc.). +## Example Usage + +```java +import co.novu.models.components.GetChannelEndpointResponseDtoChannel; + +GetChannelEndpointResponseDtoChannel value = GetChannelEndpointResponseDtoChannel.IN_APP; + +// Open enum: use .of() to create instances from custom string values +GetChannelEndpointResponseDtoChannel custom = GetChannelEndpointResponseDtoChannel.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/GetChannelEndpointResponseDtoProviderId.md b/docs/models/components/GetChannelEndpointResponseDtoProviderId.md index c940c5f5..4a8931b3 100644 --- a/docs/models/components/GetChannelEndpointResponseDtoProviderId.md +++ b/docs/models/components/GetChannelEndpointResponseDtoProviderId.md @@ -2,6 +2,17 @@ The provider identifier (e.g., sendgrid, twilio, slack, etc.). +## Example Usage + +```java +import co.novu.models.components.GetChannelEndpointResponseDtoProviderId; + +GetChannelEndpointResponseDtoProviderId value = GetChannelEndpointResponseDtoProviderId.EMAILJS; + +// Open enum: use .of() to create instances from custom string values +GetChannelEndpointResponseDtoProviderId custom = GetChannelEndpointResponseDtoProviderId.of("custom_value"); +``` + ## Values @@ -64,6 +75,7 @@ The provider identifier (e.g., sendgrid, twilio, slack, etc.). | `IMEDIA` | imedia | | `SINCH` | sinch | | `ISENDPRO_SMS` | isendpro-sms | +| `CM_TELECOM` | cm-telecom | | `FCM` | fcm | | `APNS` | apns | | `EXPO` | expo | diff --git a/docs/models/components/GetChannelEndpointResponseDtoType.md b/docs/models/components/GetChannelEndpointResponseDtoType.md index 171d3115..4d4cd706 100644 --- a/docs/models/components/GetChannelEndpointResponseDtoType.md +++ b/docs/models/components/GetChannelEndpointResponseDtoType.md @@ -2,6 +2,17 @@ Type of channel endpoint +## Example Usage + +```java +import co.novu.models.components.GetChannelEndpointResponseDtoType; + +GetChannelEndpointResponseDtoType value = GetChannelEndpointResponseDtoType.SLACK_CHANNEL; + +// Open enum: use .of() to create instances from custom string values +GetChannelEndpointResponseDtoType custom = GetChannelEndpointResponseDtoType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/GetEnvironmentVariableUsageResponseDto.md b/docs/models/components/GetEnvironmentVariableUsageResponseDto.md new file mode 100644 index 00000000..73802962 --- /dev/null +++ b/docs/models/components/GetEnvironmentVariableUsageResponseDto.md @@ -0,0 +1,8 @@ +# GetEnvironmentVariableUsageResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | +| `workflows` | List\<[EnvironmentVariableWorkflowInfoDto](../../models/components/EnvironmentVariableWorkflowInfoDto.md)> | :heavy_check_mark: | Array of workflows that reference this environment variable | \ No newline at end of file diff --git a/docs/models/components/GetSubscriberNotificationsCountResponseDto.md b/docs/models/components/GetSubscriberNotificationsCountResponseDto.md new file mode 100644 index 00000000..0222a4e4 --- /dev/null +++ b/docs/models/components/GetSubscriberNotificationsCountResponseDto.md @@ -0,0 +1,9 @@ +# GetSubscriberNotificationsCountResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `count` | *double* | :heavy_check_mark: | The count of notifications matching the filter | +| `filter` | Map\ | :heavy_check_mark: | The filter applied | \ No newline at end of file diff --git a/docs/models/components/GetSubscriberNotificationsResponseDto.md b/docs/models/components/GetSubscriberNotificationsResponseDto.md new file mode 100644 index 00000000..ef210cb3 --- /dev/null +++ b/docs/models/components/GetSubscriberNotificationsResponseDto.md @@ -0,0 +1,10 @@ +# GetSubscriberNotificationsResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------ | +| `data` | List\<[InboxNotificationDto](../../models/components/InboxNotificationDto.md)> | :heavy_check_mark: | Array of notifications | +| `hasMore` | *boolean* | :heavy_check_mark: | Indicates if there are more notifications available | +| `filter` | [Filter](../../models/components/Filter.md) | :heavy_check_mark: | The filter applied to the notifications | \ No newline at end of file diff --git a/docs/models/components/HttpMethodEnum.md b/docs/models/components/HttpMethodEnum.md new file mode 100644 index 00000000..04c331f1 --- /dev/null +++ b/docs/models/components/HttpMethodEnum.md @@ -0,0 +1,25 @@ +# HttpMethodEnum + +HTTP method + +## Example Usage + +```java +import co.novu.models.components.HttpMethodEnum; + +HttpMethodEnum value = HttpMethodEnum.GET; + +// Open enum: use .of() to create instances from custom string values +HttpMethodEnum custom = HttpMethodEnum.of("custom_value"); +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `GET` | GET | +| `POST` | POST | +| `PUT` | PUT | +| `DELETE` | DELETE | +| `PATCH` | PATCH | \ No newline at end of file diff --git a/docs/models/components/HttpRequestControlDto.md b/docs/models/components/HttpRequestControlDto.md new file mode 100644 index 00000000..042d0fbe --- /dev/null +++ b/docs/models/components/HttpRequestControlDto.md @@ -0,0 +1,14 @@ +# HttpRequestControlDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `method` | [HttpMethodEnum](../../models/components/HttpMethodEnum.md) | :heavy_check_mark: | HTTP method | +| `url` | *String* | :heavy_check_mark: | Target URL for the HTTP request | +| `headers` | List\<[HttpRequestKeyValuePairDto](../../models/components/HttpRequestKeyValuePairDto.md)> | :heavy_minus_sign: | Request headers as key-value pairs | +| `body` | List\<[HttpRequestKeyValuePairDto](../../models/components/HttpRequestKeyValuePairDto.md)> | :heavy_minus_sign: | Request body as key-value pairs | +| `responseBodySchema` | Map\ | :heavy_minus_sign: | JSON schema to validate response body against | +| `enforceSchemaValidation` | *Optional\* | :heavy_minus_sign: | Whether to enforce response body schema validation | +| `continueOnFailure` | *Optional\* | :heavy_minus_sign: | Whether to continue workflow execution on failure | \ No newline at end of file diff --git a/docs/models/components/HttpRequestControlsMetadataResponseDto.md b/docs/models/components/HttpRequestControlsMetadataResponseDto.md new file mode 100644 index 00000000..e908afc7 --- /dev/null +++ b/docs/models/components/HttpRequestControlsMetadataResponseDto.md @@ -0,0 +1,10 @@ +# HttpRequestControlsMetadataResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------------- | +| `dataSchema` | Map\ | :heavy_minus_sign: | JSON Schema for data | +| `uiSchema` | [Optional\](../../models/components/UiSchema.md) | :heavy_minus_sign: | UI Schema for rendering | +| `values` | [HttpRequestControlDto](../../models/components/HttpRequestControlDto.md) | :heavy_check_mark: | Control values specific to HTTP Request step | \ No newline at end of file diff --git a/docs/models/components/HttpRequestKeyValuePairDto.md b/docs/models/components/HttpRequestKeyValuePairDto.md new file mode 100644 index 00000000..56ab7b45 --- /dev/null +++ b/docs/models/components/HttpRequestKeyValuePairDto.md @@ -0,0 +1,9 @@ +# HttpRequestKeyValuePairDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------- | --------------------------- | --------------------------- | --------------------------- | +| `key` | *String* | :heavy_check_mark: | Key of the key-value pair | +| `value` | *String* | :heavy_check_mark: | Value of the key-value pair | \ No newline at end of file diff --git a/docs/models/components/HttpRequestStepResponseDto.md b/docs/models/components/HttpRequestStepResponseDto.md new file mode 100644 index 00000000..b65df2e9 --- /dev/null +++ b/docs/models/components/HttpRequestStepResponseDto.md @@ -0,0 +1,20 @@ +# HttpRequestStepResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `controls` | [HttpRequestControlsMetadataResponseDto](../../models/components/HttpRequestControlsMetadataResponseDto.md) | :heavy_check_mark: | Controls metadata for the HTTP request step | +| `controlValues` | [Optional\](../../models/components/HttpRequestStepResponseDtoControlValues.md) | :heavy_minus_sign: | Control values for the HTTP request step | +| `variables` | Map\ | :heavy_check_mark: | JSON Schema for variables, follows the JSON Schema standard | +| `stepId` | *String* | :heavy_check_mark: | Unique identifier of the step | +| `id` | *String* | :heavy_check_mark: | Database identifier of the step | +| `name` | *String* | :heavy_check_mark: | Name of the step | +| `slug` | *String* | :heavy_check_mark: | Slug of the step | +| `type` | [StepTypeEnum](../../models/components/StepTypeEnum.md) | :heavy_check_mark: | Type of the step | +| `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | +| `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | +| `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/HttpRequestStepResponseDtoControlValues.md b/docs/models/components/HttpRequestStepResponseDtoControlValues.md new file mode 100644 index 00000000..e08d3cba --- /dev/null +++ b/docs/models/components/HttpRequestStepResponseDtoControlValues.md @@ -0,0 +1,17 @@ +# HttpRequestStepResponseDtoControlValues + +Control values for the HTTP request step + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | +| `method` | [HttpMethodEnum](../../models/components/HttpMethodEnum.md) | :heavy_check_mark: | HTTP method | +| `url` | *String* | :heavy_check_mark: | Target URL for the HTTP request | +| `headers` | List\<[HttpRequestKeyValuePairDto](../../models/components/HttpRequestKeyValuePairDto.md)> | :heavy_minus_sign: | Request headers as key-value pairs | +| `body` | List\<[HttpRequestKeyValuePairDto](../../models/components/HttpRequestKeyValuePairDto.md)> | :heavy_minus_sign: | Request body as key-value pairs | +| `responseBodySchema` | Map\ | :heavy_minus_sign: | JSON schema to validate response body against | +| `enforceSchemaValidation` | *Optional\* | :heavy_minus_sign: | Whether to enforce response body schema validation | +| `continueOnFailure` | *Optional\* | :heavy_minus_sign: | Whether to continue workflow execution on failure | +| `additionalProperties` | Map\ | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/HttpRequestStepUpsertDto.md b/docs/models/components/HttpRequestStepUpsertDto.md new file mode 100644 index 00000000..e224fdf4 --- /dev/null +++ b/docs/models/components/HttpRequestStepUpsertDto.md @@ -0,0 +1,12 @@ +# HttpRequestStepUpsertDto + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `id` | *Optional\* | :heavy_minus_sign: | Database identifier of the step. Used for updating the step. | +| `stepId` | *Optional\* | :heavy_minus_sign: | Unique identifier for the step | +| `name` | *String* | :heavy_check_mark: | Name of the step | +| `type` | [StepTypeEnum](../../models/components/StepTypeEnum.md) | :heavy_check_mark: | Type of the step | +| `controlValues` | [Optional\](../../models/components/HttpRequestStepUpsertDtoControlValues.md) | :heavy_minus_sign: | Control values for the HTTP Request step. | \ No newline at end of file diff --git a/docs/models/components/HttpRequestStepUpsertDtoControlValues.md b/docs/models/components/HttpRequestStepUpsertDtoControlValues.md new file mode 100644 index 00000000..cc7cceaf --- /dev/null +++ b/docs/models/components/HttpRequestStepUpsertDtoControlValues.md @@ -0,0 +1,4 @@ +# HttpRequestStepUpsertDtoControlValues + +Control values for the HTTP Request step. + diff --git a/docs/models/components/InAppRenderOutput.md b/docs/models/components/InAppRenderOutput.md new file mode 100644 index 00000000..c7840d4f --- /dev/null +++ b/docs/models/components/InAppRenderOutput.md @@ -0,0 +1,14 @@ +# InAppRenderOutput + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `subject` | *Optional\* | :heavy_minus_sign: | Subject of the in-app notification | +| `body` | *String* | :heavy_check_mark: | Body of the in-app notification | +| `avatar` | *Optional\* | :heavy_minus_sign: | Avatar for the in-app notification | +| `primaryAction` | [Optional\](../../models/components/ActionDto.md) | :heavy_minus_sign: | Primary action details | +| `secondaryAction` | [Optional\](../../models/components/ActionDto.md) | :heavy_minus_sign: | Secondary action details | +| `data` | Map\ | :heavy_minus_sign: | Additional data | +| `redirect` | [Optional\](../../models/components/RedirectDto.md) | :heavy_minus_sign: | Redirect details | \ No newline at end of file diff --git a/docs/models/components/InAppStepResponseDto.md b/docs/models/components/InAppStepResponseDto.md index 71dadfa0..58334681 100644 --- a/docs/models/components/InAppStepResponseDto.md +++ b/docs/models/components/InAppStepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/InboxActionDto.md b/docs/models/components/InboxActionDto.md new file mode 100644 index 00000000..659ce312 --- /dev/null +++ b/docs/models/components/InboxActionDto.md @@ -0,0 +1,10 @@ +# InboxActionDto + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | +| `label` | *String* | :heavy_check_mark: | Label of the action button | +| `isCompleted` | *boolean* | :heavy_check_mark: | Whether the action has been completed | +| `redirect` | [Optional\](../../models/components/RedirectDto.md) | :heavy_minus_sign: | Redirect configuration for the action | \ No newline at end of file diff --git a/docs/models/components/InboxNotificationDto.md b/docs/models/components/InboxNotificationDto.md new file mode 100644 index 00000000..3fe9244f --- /dev/null +++ b/docs/models/components/InboxNotificationDto.md @@ -0,0 +1,31 @@ +# InboxNotificationDto + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | Unique identifier of the notification | +| `transactionId` | *String* | :heavy_check_mark: | Transaction identifier of the notification | +| `subject` | *Optional\* | :heavy_minus_sign: | Subject of the notification | +| `body` | *String* | :heavy_check_mark: | Body content of the notification | +| `to` | [InboxSubscriberResponseDto](../../models/components/InboxSubscriberResponseDto.md) | :heavy_check_mark: | Subscriber this notification was sent to | +| `isRead` | *boolean* | :heavy_check_mark: | Whether the notification has been read | +| `isSeen` | *boolean* | :heavy_check_mark: | Whether the notification has been seen | +| `isArchived` | *boolean* | :heavy_check_mark: | Whether the notification has been archived | +| `isSnoozed` | *boolean* | :heavy_check_mark: | Whether the notification is snoozed | +| `snoozedUntil` | *JsonNullable\* | :heavy_minus_sign: | ISO timestamp when the notification will be unsnoozed | +| `deliveredAt` | List\<*String*> | :heavy_minus_sign: | Timestamps when the notification was delivered | +| `createdAt` | *String* | :heavy_check_mark: | ISO timestamp when the notification was created | +| `readAt` | *JsonNullable\* | :heavy_minus_sign: | ISO timestamp when the notification was read | +| `firstSeenAt` | *JsonNullable\* | :heavy_minus_sign: | ISO timestamp when the notification was first seen | +| `archivedAt` | *JsonNullable\* | :heavy_minus_sign: | ISO timestamp when the notification was archived | +| `avatar` | *Optional\* | :heavy_minus_sign: | Avatar URL for the notification | +| `primaryAction` | [Optional\](../../models/components/InboxActionDto.md) | :heavy_minus_sign: | Primary action button for the notification | +| `secondaryAction` | [Optional\](../../models/components/InboxActionDto.md) | :heavy_minus_sign: | Secondary action button for the notification | +| `channelType` | [ChannelTypeEnum](../../models/components/ChannelTypeEnum.md) | :heavy_check_mark: | Channel type through which the message is sent | +| `tags` | List\<*String*> | :heavy_minus_sign: | Tags associated with the notification | +| `data` | Map\ | :heavy_minus_sign: | Custom data payload of the notification | +| `redirect` | [Optional\](../../models/components/RedirectDto.md) | :heavy_minus_sign: | Redirect configuration for the notification | +| `workflow` | [Optional\](../../models/components/NotificationWorkflowDto.md) | :heavy_minus_sign: | Workflow associated with the notification | +| `severity` | [SeverityLevelEnum](../../models/components/SeverityLevelEnum.md) | :heavy_check_mark: | Severity of the workflow | \ No newline at end of file diff --git a/docs/models/components/InboxSubscriberResponseDto.md b/docs/models/components/InboxSubscriberResponseDto.md new file mode 100644 index 00000000..e8f0f436 --- /dev/null +++ b/docs/models/components/InboxSubscriberResponseDto.md @@ -0,0 +1,12 @@ +# InboxSubscriberResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------- | ----------------------------------- | ----------------------------------- | ----------------------------------- | +| `id` | *String* | :heavy_check_mark: | Unique identifier of the subscriber | +| `firstName` | *Optional\* | :heavy_minus_sign: | First name of the subscriber | +| `lastName` | *Optional\* | :heavy_minus_sign: | Last name of the subscriber | +| `avatar` | *Optional\* | :heavy_minus_sign: | Avatar URL of the subscriber | +| `subscriberId` | *String* | :heavy_check_mark: | External subscriber identifier | \ No newline at end of file diff --git a/docs/models/components/IntegrationIssueEnum.md b/docs/models/components/IntegrationIssueEnum.md index 3148ce51..04e7ec7f 100644 --- a/docs/models/components/IntegrationIssueEnum.md +++ b/docs/models/components/IntegrationIssueEnum.md @@ -2,6 +2,17 @@ Type of integration issue +## Example Usage + +```java +import co.novu.models.components.IntegrationIssueEnum; + +IntegrationIssueEnum value = IntegrationIssueEnum.MISSING_INTEGRATION; + +// Open enum: use .of() to create instances from custom string values +IntegrationIssueEnum custom = IntegrationIssueEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/IntegrationResponseDto.md b/docs/models/components/IntegrationResponseDto.md index b2336b2b..78285b14 100644 --- a/docs/models/components/IntegrationResponseDto.md +++ b/docs/models/components/IntegrationResponseDto.md @@ -11,7 +11,7 @@ | `name` | *String* | :heavy_check_mark: | The name of the integration, which is used to identify it in the user interface. | | `identifier` | *String* | :heavy_check_mark: | A unique string identifier for the integration, often used for API calls or internal references. | | `providerId` | *String* | :heavy_check_mark: | The identifier for the provider of the integration (e.g., "mailgun", "twilio"). | -| `channel` | [IntegrationResponseDtoChannel](../../models/components/IntegrationResponseDtoChannel.md) | :heavy_check_mark: | The channel type for the integration, which defines how the integration communicates (e.g., email, SMS). | +| `channel` | [IntegrationResponseDtoChannel](../../models/components/IntegrationResponseDtoChannel.md) | :heavy_check_mark: | The channel type for the integration, which defines how it communicates (e.g., email, SMS). | | `credentials` | [CredentialsDto](../../models/components/CredentialsDto.md) | :heavy_check_mark: | The credentials required for the integration to function, including API keys and other sensitive information. | | `configurations` | [Optional\](../../models/components/ConfigurationsDto.md) | :heavy_minus_sign: | The configurations required for enabling the additional configurations of the integration. | | `active` | *boolean* | :heavy_check_mark: | Indicates whether the integration is currently active. An active integration will process events and messages. | diff --git a/docs/models/components/IntegrationResponseDtoChannel.md b/docs/models/components/IntegrationResponseDtoChannel.md index 25e24d23..f7c6be61 100644 --- a/docs/models/components/IntegrationResponseDtoChannel.md +++ b/docs/models/components/IntegrationResponseDtoChannel.md @@ -1,6 +1,17 @@ # IntegrationResponseDtoChannel -The channel type for the integration, which defines how the integration communicates (e.g., email, SMS). +The channel type for the integration, which defines how it communicates (e.g., email, SMS). + +## Example Usage + +```java +import co.novu.models.components.IntegrationResponseDtoChannel; + +IntegrationResponseDtoChannel value = IntegrationResponseDtoChannel.IN_APP; + +// Open enum: use .of() to create instances from custom string values +IntegrationResponseDtoChannel custom = IntegrationResponseDtoChannel.of("custom_value"); +``` ## Values diff --git a/docs/models/components/IssueType.md b/docs/models/components/IssueType.md deleted file mode 100644 index 40c79175..00000000 --- a/docs/models/components/IssueType.md +++ /dev/null @@ -1,12 +0,0 @@ -# IssueType - - -## Values - -| Name | Value | -| ---------------------------- | ---------------------------- | -| `MISSING_VALUE` | MISSING_VALUE | -| `MAX_LENGTH_ACCESSED` | MAX_LENGTH_ACCESSED | -| `WORKFLOW_ID_ALREADY_EXISTS` | WORKFLOW_ID_ALREADY_EXISTS | -| `DUPLICATED_VALUE` | DUPLICATED_VALUE | -| `LIMIT_REACHED` | LIMIT_REACHED | \ No newline at end of file diff --git a/docs/models/components/LayoutCreationSourceEnum.md b/docs/models/components/LayoutCreationSourceEnum.md index e00f6ca6..5d7b5ac7 100644 --- a/docs/models/components/LayoutCreationSourceEnum.md +++ b/docs/models/components/LayoutCreationSourceEnum.md @@ -2,6 +2,14 @@ Source of layout creation +## Example Usage + +```java +import co.novu.models.components.LayoutCreationSourceEnum; + +LayoutCreationSourceEnum value = LayoutCreationSourceEnum.DASHBOARD; +``` + ## Values diff --git a/docs/models/components/LayoutResponseDtoSortField.md b/docs/models/components/LayoutResponseDtoSortField.md index bf7c7b78..ba3b0338 100644 --- a/docs/models/components/LayoutResponseDtoSortField.md +++ b/docs/models/components/LayoutResponseDtoSortField.md @@ -1,5 +1,13 @@ # LayoutResponseDtoSortField +## Example Usage + +```java +import co.novu.models.components.LayoutResponseDtoSortField; + +LayoutResponseDtoSortField value = LayoutResponseDtoSortField.CREATED_AT; +``` + ## Values diff --git a/docs/models/components/LookBackWindow.md b/docs/models/components/LookBackWindow.md new file mode 100644 index 00000000..958bf272 --- /dev/null +++ b/docs/models/components/LookBackWindow.md @@ -0,0 +1,9 @@ +# LookBackWindow + +Look back window configuration + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/LookBackWindowDtoUnit.md b/docs/models/components/LookBackWindowDtoUnit.md index 8c87e1c1..7b2fb3cc 100644 --- a/docs/models/components/LookBackWindowDtoUnit.md +++ b/docs/models/components/LookBackWindowDtoUnit.md @@ -2,6 +2,17 @@ Unit of time for the look-back window. +## Example Usage + +```java +import co.novu.models.components.LookBackWindowDtoUnit; + +LookBackWindowDtoUnit value = LookBackWindowDtoUnit.SECONDS; + +// Open enum: use .of() to create instances from custom string values +LookBackWindowDtoUnit custom = LookBackWindowDtoUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/MarkAllMessageAsRequestDtoMarkAs.md b/docs/models/components/MarkAllMessageAsRequestDtoMarkAs.md index 5f3ec2f4..fa6007ab 100644 --- a/docs/models/components/MarkAllMessageAsRequestDtoMarkAs.md +++ b/docs/models/components/MarkAllMessageAsRequestDtoMarkAs.md @@ -2,6 +2,14 @@ Mark all subscriber messages as read, unread, seen or unseen +## Example Usage + +```java +import co.novu.models.components.MarkAllMessageAsRequestDtoMarkAs; + +MarkAllMessageAsRequestDtoMarkAs value = MarkAllMessageAsRequestDtoMarkAs.READ; +``` + ## Values diff --git a/docs/models/components/MarkMessageActionAsSeenDtoStatus.md b/docs/models/components/MarkMessageActionAsSeenDtoStatus.md index 0178991e..c72a1d80 100644 --- a/docs/models/components/MarkMessageActionAsSeenDtoStatus.md +++ b/docs/models/components/MarkMessageActionAsSeenDtoStatus.md @@ -2,6 +2,14 @@ Message action status +## Example Usage + +```java +import co.novu.models.components.MarkMessageActionAsSeenDtoStatus; + +MarkMessageActionAsSeenDtoStatus value = MarkMessageActionAsSeenDtoStatus.PENDING; +``` + ## Values diff --git a/docs/models/components/MarkSubscriberNotificationsAsSeenDto.md b/docs/models/components/MarkSubscriberNotificationsAsSeenDto.md new file mode 100644 index 00000000..b6bcdb8b --- /dev/null +++ b/docs/models/components/MarkSubscriberNotificationsAsSeenDto.md @@ -0,0 +1,11 @@ +# MarkSubscriberNotificationsAsSeenDto + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `notificationIds` | List\<*String*> | :heavy_minus_sign: | Specific notification IDs to mark as seen | +| `tags` | [Optional\](../../models/components/MarkSubscriberNotificationsAsSeenDtoTags.md) | :heavy_minus_sign: | Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND of OR-groups). | +| `data` | *Optional\* | :heavy_minus_sign: | Filter notifications by data attributes (JSON string) | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering notifications | \ No newline at end of file diff --git a/docs/models/components/MarkSubscriberNotificationsAsSeenDtoTags.md b/docs/models/components/MarkSubscriberNotificationsAsSeenDtoTags.md new file mode 100644 index 00000000..3abb5be5 --- /dev/null +++ b/docs/models/components/MarkSubscriberNotificationsAsSeenDtoTags.md @@ -0,0 +1,9 @@ +# MarkSubscriberNotificationsAsSeenDtoTags + +Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND of OR-groups). + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/MessageActionStatusEnum.md b/docs/models/components/MessageActionStatusEnum.md index 5836499c..5d4ebf35 100644 --- a/docs/models/components/MessageActionStatusEnum.md +++ b/docs/models/components/MessageActionStatusEnum.md @@ -2,6 +2,17 @@ Status of the message action +## Example Usage + +```java +import co.novu.models.components.MessageActionStatusEnum; + +MessageActionStatusEnum value = MessageActionStatusEnum.PENDING; + +// Open enum: use .of() to create instances from custom string values +MessageActionStatusEnum custom = MessageActionStatusEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/MessageMarkAsRequestDtoMarkAs.md b/docs/models/components/MessageMarkAsRequestDtoMarkAs.md index 13c5a1df..38c2d026 100644 --- a/docs/models/components/MessageMarkAsRequestDtoMarkAs.md +++ b/docs/models/components/MessageMarkAsRequestDtoMarkAs.md @@ -1,5 +1,13 @@ # MessageMarkAsRequestDtoMarkAs +## Example Usage + +```java +import co.novu.models.components.MessageMarkAsRequestDtoMarkAs; + +MessageMarkAsRequestDtoMarkAs value = MessageMarkAsRequestDtoMarkAs.READ; +``` + ## Values diff --git a/docs/models/components/MessageStatusEnum.md b/docs/models/components/MessageStatusEnum.md index 8aa4778a..f816ae97 100644 --- a/docs/models/components/MessageStatusEnum.md +++ b/docs/models/components/MessageStatusEnum.md @@ -2,6 +2,17 @@ Status of the message +## Example Usage + +```java +import co.novu.models.components.MessageStatusEnum; + +MessageStatusEnum value = MessageStatusEnum.SENT; + +// Open enum: use .of() to create instances from custom string values +MessageStatusEnum custom = MessageStatusEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/MonthlyType.md b/docs/models/components/MonthlyType.md index 2f4c06e0..80120b52 100644 --- a/docs/models/components/MonthlyType.md +++ b/docs/models/components/MonthlyType.md @@ -1,5 +1,16 @@ # MonthlyType +## Example Usage + +```java +import co.novu.models.components.MonthlyType; + +MonthlyType value = MonthlyType.EACH; + +// Open enum: use .of() to create instances from custom string values +MonthlyType custom = MonthlyType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/MonthlyTypeEnum.md b/docs/models/components/MonthlyTypeEnum.md index f70026fc..d8d592dc 100644 --- a/docs/models/components/MonthlyTypeEnum.md +++ b/docs/models/components/MonthlyTypeEnum.md @@ -2,6 +2,17 @@ Type of monthly schedule +## Example Usage + +```java +import co.novu.models.components.MonthlyTypeEnum; + +MonthlyTypeEnum value = MonthlyTypeEnum.EACH; + +// Open enum: use .of() to create instances from custom string values +MonthlyTypeEnum custom = MonthlyTypeEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/NotificationFeedItemDtoStatus.md b/docs/models/components/NotificationFeedItemDtoStatus.md index 6d53216c..c98bcf62 100644 --- a/docs/models/components/NotificationFeedItemDtoStatus.md +++ b/docs/models/components/NotificationFeedItemDtoStatus.md @@ -2,6 +2,17 @@ Current status of the notification. +## Example Usage + +```java +import co.novu.models.components.NotificationFeedItemDtoStatus; + +NotificationFeedItemDtoStatus value = NotificationFeedItemDtoStatus.SENT; + +// Open enum: use .of() to create instances from custom string values +NotificationFeedItemDtoStatus custom = NotificationFeedItemDtoStatus.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/NotificationTriggerDtoType.md b/docs/models/components/NotificationTriggerDtoType.md index c4dc40bb..a7a5c3ea 100644 --- a/docs/models/components/NotificationTriggerDtoType.md +++ b/docs/models/components/NotificationTriggerDtoType.md @@ -2,6 +2,14 @@ Type of the trigger +## Example Usage + +```java +import co.novu.models.components.NotificationTriggerDtoType; + +NotificationTriggerDtoType value = NotificationTriggerDtoType.EVENT; +``` + ## Values diff --git a/docs/models/components/NotificationTriggerType.md b/docs/models/components/NotificationTriggerType.md index 39c83667..9e834870 100644 --- a/docs/models/components/NotificationTriggerType.md +++ b/docs/models/components/NotificationTriggerType.md @@ -1,5 +1,13 @@ # NotificationTriggerType +## Example Usage + +```java +import co.novu.models.components.NotificationTriggerType; + +NotificationTriggerType value = NotificationTriggerType.EVENT; +``` + ## Values diff --git a/docs/models/components/NotificationWorkflowDto.md b/docs/models/components/NotificationWorkflowDto.md new file mode 100644 index 00000000..e11370a2 --- /dev/null +++ b/docs/models/components/NotificationWorkflowDto.md @@ -0,0 +1,14 @@ +# NotificationWorkflowDto + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | Unique identifier of the workflow | +| `identifier` | *String* | :heavy_check_mark: | Workflow identifier used for triggering | +| `name` | *String* | :heavy_check_mark: | Human-readable name of the workflow | +| `critical` | *boolean* | :heavy_check_mark: | Whether this workflow is marked as critical | +| `tags` | List\<*String*> | :heavy_minus_sign: | Tags associated with the workflow | +| `data` | Map\ | :heavy_minus_sign: | Custom data associated with the workflow | +| `severity` | [SeverityLevelEnum](../../models/components/SeverityLevelEnum.md) | :heavy_check_mark: | Severity of the workflow | \ No newline at end of file diff --git a/docs/models/components/On.md b/docs/models/components/On.md index 3efe5278..6b843d27 100644 --- a/docs/models/components/On.md +++ b/docs/models/components/On.md @@ -1,5 +1,16 @@ # On +## Example Usage + +```java +import co.novu.models.components.On; + +On value = On.SUBSCRIBER; + +// Open enum: use .of() to create instances from custom string values +On custom = On.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/Operator.md b/docs/models/components/Operator.md index f6e85862..9e9442f6 100644 --- a/docs/models/components/Operator.md +++ b/docs/models/components/Operator.md @@ -1,5 +1,16 @@ # Operator +## Example Usage + +```java +import co.novu.models.components.Operator; + +Operator value = Operator.LARGER; + +// Open enum: use .of() to create instances from custom string values +Operator custom = Operator.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/Ordinal.md b/docs/models/components/Ordinal.md index aa626726..1a4cb798 100644 --- a/docs/models/components/Ordinal.md +++ b/docs/models/components/Ordinal.md @@ -1,5 +1,16 @@ # Ordinal +## Example Usage + +```java +import co.novu.models.components.Ordinal; + +Ordinal value = Ordinal.ONE; + +// Open enum: use .of() to create instances from custom string values +Ordinal custom = Ordinal.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/OrdinalEnum.md b/docs/models/components/OrdinalEnum.md index 55025aac..48f18e0f 100644 --- a/docs/models/components/OrdinalEnum.md +++ b/docs/models/components/OrdinalEnum.md @@ -2,6 +2,17 @@ Ordinal position for the digest +## Example Usage + +```java +import co.novu.models.components.OrdinalEnum; + +OrdinalEnum value = OrdinalEnum.ONE; + +// Open enum: use .of() to create instances from custom string values +OrdinalEnum custom = OrdinalEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/OrdinalValue.md b/docs/models/components/OrdinalValue.md index 06729367..d6b3eabb 100644 --- a/docs/models/components/OrdinalValue.md +++ b/docs/models/components/OrdinalValue.md @@ -1,5 +1,16 @@ # OrdinalValue +## Example Usage + +```java +import co.novu.models.components.OrdinalValue; + +OrdinalValue value = OrdinalValue.DAY; + +// Open enum: use .of() to create instances from custom string values +OrdinalValue custom = OrdinalValue.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/OrdinalValueEnum.md b/docs/models/components/OrdinalValueEnum.md index 514d50a1..44a4355d 100644 --- a/docs/models/components/OrdinalValueEnum.md +++ b/docs/models/components/OrdinalValueEnum.md @@ -2,6 +2,17 @@ Value of the ordinal +## Example Usage + +```java +import co.novu.models.components.OrdinalValueEnum; + +OrdinalValueEnum value = OrdinalValueEnum.DAY; + +// Open enum: use .of() to create instances from custom string values +OrdinalValueEnum custom = OrdinalValueEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/PreferenceLevelEnum.md b/docs/models/components/PreferenceLevelEnum.md index 5d81dc2b..fd308fe8 100644 --- a/docs/models/components/PreferenceLevelEnum.md +++ b/docs/models/components/PreferenceLevelEnum.md @@ -2,6 +2,17 @@ The level of the preference (global or template) +## Example Usage + +```java +import co.novu.models.components.PreferenceLevelEnum; + +PreferenceLevelEnum value = PreferenceLevelEnum.GLOBAL; + +// Open enum: use .of() to create instances from custom string values +PreferenceLevelEnum custom = PreferenceLevelEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/PreferenceOverrideSourceEnum.md b/docs/models/components/PreferenceOverrideSourceEnum.md index 679580b3..25c2f40e 100644 --- a/docs/models/components/PreferenceOverrideSourceEnum.md +++ b/docs/models/components/PreferenceOverrideSourceEnum.md @@ -2,6 +2,17 @@ The source of overrides +## Example Usage + +```java +import co.novu.models.components.PreferenceOverrideSourceEnum; + +PreferenceOverrideSourceEnum value = PreferenceOverrideSourceEnum.SUBSCRIBER; + +// Open enum: use .of() to create instances from custom string values +PreferenceOverrideSourceEnum custom = PreferenceOverrideSourceEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/PreviewErrorDto.md b/docs/models/components/PreviewErrorDto.md new file mode 100644 index 00000000..1f21c7b4 --- /dev/null +++ b/docs/models/components/PreviewErrorDto.md @@ -0,0 +1,10 @@ +# PreviewErrorDto + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------- | ---------------------------- | ---------------------------- | ---------------------------- | +| `title` | *String* | :heavy_check_mark: | Short error title | +| `message` | *String* | :heavy_check_mark: | Detailed error message | +| `hint` | *String* | :heavy_check_mark: | Actionable hint for the user | \ No newline at end of file diff --git a/docs/models/components/PreviewPayloadDto.md b/docs/models/components/PreviewPayloadDto.md new file mode 100644 index 00000000..e0f9212d --- /dev/null +++ b/docs/models/components/PreviewPayloadDto.md @@ -0,0 +1,12 @@ +# PreviewPayloadDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `subscriber` | [Optional\](../../models/components/SubscriberResponseDtoOptional.md) | :heavy_minus_sign: | Partial subscriber information | +| `payload` | Map\ | :heavy_minus_sign: | Payload data | +| `steps` | Map\ | :heavy_minus_sign: | Steps data | +| `context` | Map\ | :heavy_minus_sign: | N/A | +| `env` | Map\ | :heavy_minus_sign: | Environment variables data | \ No newline at end of file diff --git a/docs/models/components/PreviewPayloadDtoContext.md b/docs/models/components/PreviewPayloadDtoContext.md new file mode 100644 index 00000000..13b8a2d5 --- /dev/null +++ b/docs/models/components/PreviewPayloadDtoContext.md @@ -0,0 +1,11 @@ +# PreviewPayloadDtoContext + +Rich context object with id and optional data + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `id` | *String* | :heavy_check_mark: | N/A | org-acme | +| `data` | Map\ | :heavy_minus_sign: | Optional additional context data | {
"name": "Acme Corp",
"region": "us-east-1"
} | \ No newline at end of file diff --git a/docs/models/components/PreviewPayloadDtoContextUnion.md b/docs/models/components/PreviewPayloadDtoContextUnion.md new file mode 100644 index 00000000..c8d2201a --- /dev/null +++ b/docs/models/components/PreviewPayloadDtoContextUnion.md @@ -0,0 +1,2 @@ +# PreviewPayloadDtoContextUnion + diff --git a/docs/models/components/ProvidersIdEnum.md b/docs/models/components/ProvidersIdEnum.md index 552acd8c..1be6727e 100644 --- a/docs/models/components/ProvidersIdEnum.md +++ b/docs/models/components/ProvidersIdEnum.md @@ -2,6 +2,17 @@ Provider ID of the job +## Example Usage + +```java +import co.novu.models.components.ProvidersIdEnum; + +ProvidersIdEnum value = ProvidersIdEnum.EMAILJS; + +// Open enum: use .of() to create instances from custom string values +ProvidersIdEnum custom = ProvidersIdEnum.of("custom_value"); +``` + ## Values @@ -64,6 +75,7 @@ Provider ID of the job | `IMEDIA` | imedia | | `SINCH` | sinch | | `ISENDPRO_SMS` | isendpro-sms | +| `CM_TELECOM` | cm-telecom | | `FCM` | fcm | | `APNS` | apns | | `EXPO` | expo | diff --git a/docs/models/components/PublishEnvironmentRequestDto.md b/docs/models/components/PublishEnvironmentRequestDto.md new file mode 100644 index 00000000..4f8f3af4 --- /dev/null +++ b/docs/models/components/PublishEnvironmentRequestDto.md @@ -0,0 +1,10 @@ +# PublishEnvironmentRequestDto + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | +| `sourceEnvironmentId` | *Optional\* | :heavy_minus_sign: | Source environment ID to sync from. Defaults to the Development environment if not provided. | 507f1f77bcf86cd799439011 | +| `dryRun` | *Optional\* | :heavy_minus_sign: | Perform a dry run without making actual changes | | +| `resources` | List\<[ResourceToPublishDto](../../models/components/ResourceToPublishDto.md)> | :heavy_minus_sign: | Array of specific resources to publish. If not provided, all resources will be published. | | \ No newline at end of file diff --git a/docs/models/components/PublishEnvironmentResponseDto.md b/docs/models/components/PublishEnvironmentResponseDto.md new file mode 100644 index 00000000..0cb4cff3 --- /dev/null +++ b/docs/models/components/PublishEnvironmentResponseDto.md @@ -0,0 +1,9 @@ +# PublishEnvironmentResponseDto + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------- | +| `results` | List\<[SyncResultDto](../../models/components/SyncResultDto.md)> | :heavy_check_mark: | Sync results by resource type | +| `summary` | [PublishSummaryDto](../../models/components/PublishSummaryDto.md) | :heavy_check_mark: | Summary of the sync operation | \ No newline at end of file diff --git a/docs/models/components/PublishSummaryDto.md b/docs/models/components/PublishSummaryDto.md new file mode 100644 index 00000000..9a1976ac --- /dev/null +++ b/docs/models/components/PublishSummaryDto.md @@ -0,0 +1,11 @@ +# PublishSummaryDto + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------- | ----------------------------- | ----------------------------- | ----------------------------- | +| `resources` | *double* | :heavy_check_mark: | Number of resources processed | +| `successful` | *double* | :heavy_check_mark: | Number of successful syncs | +| `failed` | *double* | :heavy_check_mark: | Number of failed syncs | +| `skipped` | *double* | :heavy_check_mark: | Number of skipped resources | \ No newline at end of file diff --git a/docs/models/components/PushRenderOutput.md b/docs/models/components/PushRenderOutput.md new file mode 100644 index 00000000..1f28279a --- /dev/null +++ b/docs/models/components/PushRenderOutput.md @@ -0,0 +1,9 @@ +# PushRenderOutput + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------- | -------------------------------- | -------------------------------- | -------------------------------- | +| `subject` | *String* | :heavy_check_mark: | Subject of the push notification | +| `body` | *String* | :heavy_check_mark: | Body of the push notification | \ No newline at end of file diff --git a/docs/models/components/PushStepResponseDto.md b/docs/models/components/PushStepResponseDto.md index 57502828..67898d0e 100644 --- a/docs/models/components/PushStepResponseDto.md +++ b/docs/models/components/PushStepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/RedirectDto.md b/docs/models/components/RedirectDto.md index 607b4d5a..e6381a98 100644 --- a/docs/models/components/RedirectDto.md +++ b/docs/models/components/RedirectDto.md @@ -3,7 +3,7 @@ ## Fields -| Field | Type | Required | Description | -| --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | -| `url` | *Optional\* | :heavy_minus_sign: | URL for redirection. Must be a valid URL or start with / or {{ variable }}. | -| `target` | [Optional\](../../models/components/Target.md) | :heavy_minus_sign: | Target window for the redirection. | \ No newline at end of file +| Field | Type | Required | Description | +| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | +| `url` | *String* | :heavy_check_mark: | URL to redirect to | +| `target` | [Optional\](../../models/components/Target.md) | :heavy_minus_sign: | Target attribute for the redirect link | \ No newline at end of file diff --git a/docs/models/components/ResourceDependencyDto.md b/docs/models/components/ResourceDependencyDto.md new file mode 100644 index 00000000..45ca1583 --- /dev/null +++ b/docs/models/components/ResourceDependencyDto.md @@ -0,0 +1,12 @@ +# ResourceDependencyDto + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | ----------------------------------------------------------------------- | +| `resourceType` | [ResourceTypeEnum](../../models/components/ResourceTypeEnum.md) | :heavy_check_mark: | Type of the layout | +| `resourceId` | *String* | :heavy_check_mark: | ID of the dependent resource | +| `resourceName` | *String* | :heavy_check_mark: | Name of the dependent resource | +| `isBlocking` | *boolean* | :heavy_check_mark: | Whether this dependency blocks the operation | +| `reason` | [DependencyReasonEnum](../../models/components/DependencyReasonEnum.md) | :heavy_check_mark: | Reason for the dependency | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffDto.md b/docs/models/components/ResourceDiffDto.md new file mode 100644 index 00000000..8c1838ac --- /dev/null +++ b/docs/models/components/ResourceDiffDto.md @@ -0,0 +1,15 @@ +# ResourceDiffDto + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- | +| `sourceResource` | [JsonNullable\](../../models/components/ResourceDiffDtoSourceResource.md) | :heavy_minus_sign: | Source resource information | +| `targetResource` | [JsonNullable\](../../models/components/ResourceDiffDtoTargetResource.md) | :heavy_minus_sign: | Target resource information | +| `resourceType` | [ResourceTypeEnum](../../models/components/ResourceTypeEnum.md) | :heavy_check_mark: | Type of the layout | +| `action` | [DiffActionEnum](../../models/components/DiffActionEnum.md) | :heavy_check_mark: | Type of change | +| `diffs` | [Optional\](../../models/components/Diffs.md) | :heavy_minus_sign: | Detailed changes (only for modified resources) | +| `stepType` | *Optional\* | :heavy_minus_sign: | Step type (only for step resources) | +| `previousIndex` | *Optional\* | :heavy_minus_sign: | Previous index in steps array (for moved/deleted steps) | +| `newIndex` | *Optional\* | :heavy_minus_sign: | New index in steps array (for moved/added steps) | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffDtoSourceResource.md b/docs/models/components/ResourceDiffDtoSourceResource.md new file mode 100644 index 00000000..c434b7b8 --- /dev/null +++ b/docs/models/components/ResourceDiffDtoSourceResource.md @@ -0,0 +1,13 @@ +# ResourceDiffDtoSourceResource + +Source resource information + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `id` | *JsonNullable\* | :heavy_minus_sign: | Resource ID (workflow ID or step ID) | | +| `name` | *JsonNullable\* | :heavy_minus_sign: | Resource name (workflow name or step name) | | +| `updatedBy` | [JsonNullable\](../../models/components/ResourceDiffDtoSourceResourceUpdatedBy.md) | :heavy_minus_sign: | User who last updated the resource | | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | When the resource was last updated | 2024-01-15T10:30:00.000Z | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffDtoSourceResourceUpdatedBy.md b/docs/models/components/ResourceDiffDtoSourceResourceUpdatedBy.md new file mode 100644 index 00000000..50585bc1 --- /dev/null +++ b/docs/models/components/ResourceDiffDtoSourceResourceUpdatedBy.md @@ -0,0 +1,13 @@ +# ResourceDiffDtoSourceResourceUpdatedBy + +User who last updated the resource + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `id` | *String* | :heavy_check_mark: | User ID | +| `firstName` | *String* | :heavy_check_mark: | User first name | +| `lastName` | *JsonNullable\* | :heavy_minus_sign: | User last name | +| `externalId` | *Optional\* | :heavy_minus_sign: | User external ID | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffDtoTargetResource.md b/docs/models/components/ResourceDiffDtoTargetResource.md new file mode 100644 index 00000000..e0f00800 --- /dev/null +++ b/docs/models/components/ResourceDiffDtoTargetResource.md @@ -0,0 +1,13 @@ +# ResourceDiffDtoTargetResource + +Target resource information + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `id` | *JsonNullable\* | :heavy_minus_sign: | Resource ID (workflow ID or step ID) | | +| `name` | *JsonNullable\* | :heavy_minus_sign: | Resource name (workflow name or step name) | | +| `updatedBy` | [JsonNullable\](../../models/components/ResourceDiffDtoTargetResourceUpdatedBy.md) | :heavy_minus_sign: | User who last updated the resource | | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | When the resource was last updated | 2024-01-15T10:30:00.000Z | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffDtoTargetResourceUpdatedBy.md b/docs/models/components/ResourceDiffDtoTargetResourceUpdatedBy.md new file mode 100644 index 00000000..3fa5c91d --- /dev/null +++ b/docs/models/components/ResourceDiffDtoTargetResourceUpdatedBy.md @@ -0,0 +1,13 @@ +# ResourceDiffDtoTargetResourceUpdatedBy + +User who last updated the resource + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `id` | *String* | :heavy_check_mark: | User ID | +| `firstName` | *String* | :heavy_check_mark: | User first name | +| `lastName` | *JsonNullable\* | :heavy_minus_sign: | User last name | +| `externalId` | *Optional\* | :heavy_minus_sign: | User external ID | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffResultDto.md b/docs/models/components/ResourceDiffResultDto.md new file mode 100644 index 00000000..ab2cbdf6 --- /dev/null +++ b/docs/models/components/ResourceDiffResultDto.md @@ -0,0 +1,13 @@ +# ResourceDiffResultDto + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `resourceType` | [ResourceTypeEnum](../../models/components/ResourceTypeEnum.md) | :heavy_check_mark: | Type of the layout | +| `sourceResource` | [JsonNullable\](../../models/components/ResourceDiffResultDtoSourceResource.md) | :heavy_minus_sign: | Source resource information | +| `targetResource` | [JsonNullable\](../../models/components/ResourceDiffResultDtoTargetResource.md) | :heavy_minus_sign: | Target resource information | +| `changes` | List\<[ResourceDiffDto](../../models/components/ResourceDiffDto.md)> | :heavy_check_mark: | List of specific changes for this resource | +| `summary` | [DiffSummaryDto](../../models/components/DiffSummaryDto.md) | :heavy_check_mark: | Summary of changes for this resource | +| `dependencies` | List\<[ResourceDependencyDto](../../models/components/ResourceDependencyDto.md)> | :heavy_minus_sign: | Dependencies that affect this resource | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffResultDtoSourceResource.md b/docs/models/components/ResourceDiffResultDtoSourceResource.md new file mode 100644 index 00000000..5eb0d32a --- /dev/null +++ b/docs/models/components/ResourceDiffResultDtoSourceResource.md @@ -0,0 +1,13 @@ +# ResourceDiffResultDtoSourceResource + +Source resource information + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *JsonNullable\* | :heavy_minus_sign: | Resource ID (workflow ID or step ID) | | +| `name` | *JsonNullable\* | :heavy_minus_sign: | Resource name (workflow name or step name) | | +| `updatedBy` | [JsonNullable\](../../models/components/ResourceDiffResultDtoSourceResourceUpdatedBy.md) | :heavy_minus_sign: | User who last updated the resource | | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | When the resource was last updated | 2024-01-15T10:30:00.000Z | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffResultDtoSourceResourceUpdatedBy.md b/docs/models/components/ResourceDiffResultDtoSourceResourceUpdatedBy.md new file mode 100644 index 00000000..715b8626 --- /dev/null +++ b/docs/models/components/ResourceDiffResultDtoSourceResourceUpdatedBy.md @@ -0,0 +1,13 @@ +# ResourceDiffResultDtoSourceResourceUpdatedBy + +User who last updated the resource + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `id` | *String* | :heavy_check_mark: | User ID | +| `firstName` | *String* | :heavy_check_mark: | User first name | +| `lastName` | *JsonNullable\* | :heavy_minus_sign: | User last name | +| `externalId` | *Optional\* | :heavy_minus_sign: | User external ID | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffResultDtoTargetResource.md b/docs/models/components/ResourceDiffResultDtoTargetResource.md new file mode 100644 index 00000000..facc6e3c --- /dev/null +++ b/docs/models/components/ResourceDiffResultDtoTargetResource.md @@ -0,0 +1,13 @@ +# ResourceDiffResultDtoTargetResource + +Target resource information + + +## Fields + +| Field | Type | Required | Description | Example | +| -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| `id` | *JsonNullable\* | :heavy_minus_sign: | Resource ID (workflow ID or step ID) | | +| `name` | *JsonNullable\* | :heavy_minus_sign: | Resource name (workflow name or step name) | | +| `updatedBy` | [JsonNullable\](../../models/components/ResourceDiffResultDtoTargetResourceUpdatedBy.md) | :heavy_minus_sign: | User who last updated the resource | | +| `updatedAt` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_minus_sign: | When the resource was last updated | 2024-01-15T10:30:00.000Z | \ No newline at end of file diff --git a/docs/models/components/ResourceDiffResultDtoTargetResourceUpdatedBy.md b/docs/models/components/ResourceDiffResultDtoTargetResourceUpdatedBy.md new file mode 100644 index 00000000..0cac739c --- /dev/null +++ b/docs/models/components/ResourceDiffResultDtoTargetResourceUpdatedBy.md @@ -0,0 +1,13 @@ +# ResourceDiffResultDtoTargetResourceUpdatedBy + +User who last updated the resource + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `id` | *String* | :heavy_check_mark: | User ID | +| `firstName` | *String* | :heavy_check_mark: | User first name | +| `lastName` | *JsonNullable\* | :heavy_minus_sign: | User last name | +| `externalId` | *Optional\* | :heavy_minus_sign: | User external ID | \ No newline at end of file diff --git a/docs/models/components/ResourceOriginEnum.md b/docs/models/components/ResourceOriginEnum.md index d13caba5..eddc819a 100644 --- a/docs/models/components/ResourceOriginEnum.md +++ b/docs/models/components/ResourceOriginEnum.md @@ -2,6 +2,17 @@ Origin of the layout +## Example Usage + +```java +import co.novu.models.components.ResourceOriginEnum; + +ResourceOriginEnum value = ResourceOriginEnum.NOVU_CLOUD; + +// Open enum: use .of() to create instances from custom string values +ResourceOriginEnum custom = ResourceOriginEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ResourceToPublishDto.md b/docs/models/components/ResourceToPublishDto.md new file mode 100644 index 00000000..b7def35e --- /dev/null +++ b/docs/models/components/ResourceToPublishDto.md @@ -0,0 +1,9 @@ +# ResourceToPublishDto + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `resourceType` | [ResourceTypeEnum](../../models/components/ResourceTypeEnum.md) | :heavy_check_mark: | Type of the layout | | +| `resourceId` | *String* | :heavy_check_mark: | Unique identifier of the resource to publish | workflow-id-1 | \ No newline at end of file diff --git a/docs/models/components/ResourceTypeEnum.md b/docs/models/components/ResourceTypeEnum.md index f512fb04..905c66f0 100644 --- a/docs/models/components/ResourceTypeEnum.md +++ b/docs/models/components/ResourceTypeEnum.md @@ -2,6 +2,17 @@ Type of the layout +## Example Usage + +```java +import co.novu.models.components.ResourceTypeEnum; + +ResourceTypeEnum value = ResourceTypeEnum.REGULAR; + +// Open enum: use .of() to create instances from custom string values +ResourceTypeEnum custom = ResourceTypeEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ResultUnion.md b/docs/models/components/ResultUnion.md deleted file mode 100644 index 2b409a56..00000000 --- a/docs/models/components/ResultUnion.md +++ /dev/null @@ -1,4 +0,0 @@ -# ResultUnion - -Preview result - diff --git a/docs/models/components/RuntimeIssueDto.md b/docs/models/components/RuntimeIssueDto.md index edadbd70..ad21f87d 100644 --- a/docs/models/components/RuntimeIssueDto.md +++ b/docs/models/components/RuntimeIssueDto.md @@ -3,8 +3,5 @@ ## Fields -| Field | Type | Required | Description | -| ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | ------------------------------------------------- | -| `issueType` | [IssueType](../../models/components/IssueType.md) | :heavy_check_mark: | N/A | -| `variableName` | *Optional\* | :heavy_minus_sign: | N/A | -| `message` | *String* | :heavy_check_mark: | N/A | \ No newline at end of file +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/SeverityLevelEnum.md b/docs/models/components/SeverityLevelEnum.md index 833bae2f..7f52615e 100644 --- a/docs/models/components/SeverityLevelEnum.md +++ b/docs/models/components/SeverityLevelEnum.md @@ -2,6 +2,17 @@ Severity of the workflow +## Example Usage + +```java +import co.novu.models.components.SeverityLevelEnum; + +SeverityLevelEnum value = SeverityLevelEnum.HIGH; + +// Open enum: use .of() to create instances from custom string values +SeverityLevelEnum custom = SeverityLevelEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/SkippedWorkflowDto.md b/docs/models/components/SkippedWorkflowDto.md new file mode 100644 index 00000000..e5b156c6 --- /dev/null +++ b/docs/models/components/SkippedWorkflowDto.md @@ -0,0 +1,11 @@ +# SkippedWorkflowDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `resourceType` | [ResourceTypeEnum](../../models/components/ResourceTypeEnum.md) | :heavy_check_mark: | Type of the layout | +| `resourceId` | *String* | :heavy_check_mark: | Resource ID | +| `resourceName` | *String* | :heavy_check_mark: | Resource name | +| `reason` | *String* | :heavy_check_mark: | Reason for skipping | \ No newline at end of file diff --git a/docs/models/components/SmsRenderOutput.md b/docs/models/components/SmsRenderOutput.md new file mode 100644 index 00000000..221da058 --- /dev/null +++ b/docs/models/components/SmsRenderOutput.md @@ -0,0 +1,8 @@ +# SmsRenderOutput + + +## Fields + +| Field | Type | Required | Description | +| ----------------------- | ----------------------- | ----------------------- | ----------------------- | +| `body` | *String* | :heavy_check_mark: | Body of the SMS message | \ No newline at end of file diff --git a/docs/models/components/SmsStepResponseDto.md b/docs/models/components/SmsStepResponseDto.md index ecf5ad71..756f5a91 100644 --- a/docs/models/components/SmsStepResponseDto.md +++ b/docs/models/components/SmsStepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/SnoozeSubscriberNotificationDto.md b/docs/models/components/SnoozeSubscriberNotificationDto.md new file mode 100644 index 00000000..e370aa9c --- /dev/null +++ b/docs/models/components/SnoozeSubscriberNotificationDto.md @@ -0,0 +1,8 @@ +# SnoozeSubscriberNotificationDto + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `snoozeUntil` | [OffsetDateTime](https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html) | :heavy_check_mark: | The date and time until which the notification should be snoozed | 2026-03-01T10:00:00Z | \ No newline at end of file diff --git a/docs/models/components/StepResponseDto.md b/docs/models/components/StepResponseDto.md index d8dfda71..f7bc441e 100644 --- a/docs/models/components/StepResponseDto.md +++ b/docs/models/components/StepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/StepTypeEnum.md b/docs/models/components/StepTypeEnum.md index e789781e..2e474213 100644 --- a/docs/models/components/StepTypeEnum.md +++ b/docs/models/components/StepTypeEnum.md @@ -2,18 +2,30 @@ Type of the step +## Example Usage + +```java +import co.novu.models.components.StepTypeEnum; + +StepTypeEnum value = StepTypeEnum.IN_APP; + +// Open enum: use .of() to create instances from custom string values +StepTypeEnum custom = StepTypeEnum.of("custom_value"); +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `IN_APP` | in_app | -| `EMAIL` | email | -| `SMS` | sms | -| `CHAT` | chat | -| `PUSH` | push | -| `DIGEST` | digest | -| `TRIGGER` | trigger | -| `DELAY` | delay | -| `THROTTLE` | throttle | -| `CUSTOM` | custom | \ No newline at end of file +| Name | Value | +| -------------- | -------------- | +| `IN_APP` | in_app | +| `EMAIL` | email | +| `SMS` | sms | +| `CHAT` | chat | +| `PUSH` | push | +| `DIGEST` | digest | +| `TRIGGER` | trigger | +| `DELAY` | delay | +| `THROTTLE` | throttle | +| `CUSTOM` | custom | +| `HTTP_REQUEST` | http_request | \ No newline at end of file diff --git a/docs/models/components/SubscriberChannelDtoProviderId.md b/docs/models/components/SubscriberChannelDtoProviderId.md index c80ebd8b..6b9961a4 100644 --- a/docs/models/components/SubscriberChannelDtoProviderId.md +++ b/docs/models/components/SubscriberChannelDtoProviderId.md @@ -2,6 +2,14 @@ The ID of the chat or push provider. +## Example Usage + +```java +import co.novu.models.components.SubscriberChannelDtoProviderId; + +SubscriberChannelDtoProviderId value = SubscriberChannelDtoProviderId.SLACK; +``` + ## Values diff --git a/docs/models/components/SyncActionEnum.md b/docs/models/components/SyncActionEnum.md new file mode 100644 index 00000000..d29ea6eb --- /dev/null +++ b/docs/models/components/SyncActionEnum.md @@ -0,0 +1,24 @@ +# SyncActionEnum + +Sync action performed + +## Example Usage + +```java +import co.novu.models.components.SyncActionEnum; + +SyncActionEnum value = SyncActionEnum.CREATED; + +// Open enum: use .of() to create instances from custom string values +SyncActionEnum custom = SyncActionEnum.of("custom_value"); +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `CREATED` | created | +| `UPDATED` | updated | +| `SKIPPED` | skipped | +| `DELETED` | deleted | \ No newline at end of file diff --git a/docs/models/components/SyncResultDto.md b/docs/models/components/SyncResultDto.md new file mode 100644 index 00000000..fc7c15e1 --- /dev/null +++ b/docs/models/components/SyncResultDto.md @@ -0,0 +1,12 @@ +# SyncResultDto + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | -------------------------------------------------------------------------- | +| `resourceType` | [ResourceTypeEnum](../../models/components/ResourceTypeEnum.md) | :heavy_check_mark: | Type of the layout | +| `successful` | List\<[SyncedWorkflowDto](../../models/components/SyncedWorkflowDto.md)> | :heavy_check_mark: | Successfully synced resources | +| `failed` | List\<[FailedWorkflowDto](../../models/components/FailedWorkflowDto.md)> | :heavy_check_mark: | Failed resource syncs | +| `skipped` | List\<[SkippedWorkflowDto](../../models/components/SkippedWorkflowDto.md)> | :heavy_check_mark: | Skipped resources | +| `totalProcessed` | *double* | :heavy_check_mark: | Total number of resources processed | \ No newline at end of file diff --git a/docs/models/components/SyncedWorkflowDto.md b/docs/models/components/SyncedWorkflowDto.md new file mode 100644 index 00000000..81ae88b5 --- /dev/null +++ b/docs/models/components/SyncedWorkflowDto.md @@ -0,0 +1,11 @@ +# SyncedWorkflowDto + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | --------------------------------------------------------------- | +| `resourceType` | [ResourceTypeEnum](../../models/components/ResourceTypeEnum.md) | :heavy_check_mark: | Type of the layout | +| `resourceId` | *String* | :heavy_check_mark: | Resource ID | +| `resourceName` | *String* | :heavy_check_mark: | Resource name | +| `action` | [SyncActionEnum](../../models/components/SyncActionEnum.md) | :heavy_check_mark: | Sync action performed | \ No newline at end of file diff --git a/docs/models/components/Target.md b/docs/models/components/Target.md index f287baf5..cd607395 100644 --- a/docs/models/components/Target.md +++ b/docs/models/components/Target.md @@ -1,6 +1,17 @@ # Target -Target window for the redirection. +Target attribute for the redirect link + +## Example Usage + +```java +import co.novu.models.components.Target; + +Target value = Target.SELF; + +// Open enum: use .of() to create instances from custom string values +Target custom = Target.of("custom_value"); +``` ## Values diff --git a/docs/models/components/TextAlignEnum.md b/docs/models/components/TextAlignEnum.md index b1c901a7..f5bc3491 100644 --- a/docs/models/components/TextAlignEnum.md +++ b/docs/models/components/TextAlignEnum.md @@ -2,6 +2,17 @@ Text alignment for the email block +## Example Usage + +```java +import co.novu.models.components.TextAlignEnum; + +TextAlignEnum value = TextAlignEnum.CENTER; + +// Open enum: use .of() to create instances from custom string values +TextAlignEnum custom = TextAlignEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ThrottleControlDtoType.md b/docs/models/components/ThrottleControlDtoType.md index 82ae3296..f753a7e0 100644 --- a/docs/models/components/ThrottleControlDtoType.md +++ b/docs/models/components/ThrottleControlDtoType.md @@ -2,6 +2,17 @@ The type of throttle window. +## Example Usage + +```java +import co.novu.models.components.ThrottleControlDtoType; + +ThrottleControlDtoType value = ThrottleControlDtoType.FIXED; + +// Open enum: use .of() to create instances from custom string values +ThrottleControlDtoType custom = ThrottleControlDtoType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ThrottleControlDtoUnit.md b/docs/models/components/ThrottleControlDtoUnit.md index 83b05cef..3ac5786a 100644 --- a/docs/models/components/ThrottleControlDtoUnit.md +++ b/docs/models/components/ThrottleControlDtoUnit.md @@ -2,6 +2,17 @@ The unit of time for the throttle window (required for fixed type). +## Example Usage + +```java +import co.novu.models.components.ThrottleControlDtoUnit; + +ThrottleControlDtoUnit value = ThrottleControlDtoUnit.MINUTES; + +// Open enum: use .of() to create instances from custom string values +ThrottleControlDtoUnit custom = ThrottleControlDtoUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ThrottleStepResponseDto.md b/docs/models/components/ThrottleStepResponseDto.md index dbb2a018..0b39a4c9 100644 --- a/docs/models/components/ThrottleStepResponseDto.md +++ b/docs/models/components/ThrottleStepResponseDto.md @@ -16,4 +16,5 @@ | `origin` | [ResourceOriginEnum](../../models/components/ResourceOriginEnum.md) | :heavy_check_mark: | Origin of the layout | | `workflowId` | *String* | :heavy_check_mark: | Workflow identifier | | `workflowDatabaseId` | *String* | :heavy_check_mark: | Workflow database identifier | -| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | \ No newline at end of file +| `issues` | [Optional\](../../models/components/StepIssuesDto.md) | :heavy_minus_sign: | Issues associated with the step | +| `stepResolverHash` | *Optional\* | :heavy_minus_sign: | Hash identifying the deployed Cloudflare Worker for this step | \ No newline at end of file diff --git a/docs/models/components/ThrottleStepResponseDtoType.md b/docs/models/components/ThrottleStepResponseDtoType.md index 6cd98260..7b672d51 100644 --- a/docs/models/components/ThrottleStepResponseDtoType.md +++ b/docs/models/components/ThrottleStepResponseDtoType.md @@ -2,6 +2,17 @@ The type of throttle window. +## Example Usage + +```java +import co.novu.models.components.ThrottleStepResponseDtoType; + +ThrottleStepResponseDtoType value = ThrottleStepResponseDtoType.FIXED; + +// Open enum: use .of() to create instances from custom string values +ThrottleStepResponseDtoType custom = ThrottleStepResponseDtoType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/ThrottleStepResponseDtoUnit.md b/docs/models/components/ThrottleStepResponseDtoUnit.md index 4dbf78b7..bd2cd84b 100644 --- a/docs/models/components/ThrottleStepResponseDtoUnit.md +++ b/docs/models/components/ThrottleStepResponseDtoUnit.md @@ -2,6 +2,17 @@ The unit of time for the throttle window (required for fixed type). +## Example Usage + +```java +import co.novu.models.components.ThrottleStepResponseDtoUnit; + +ThrottleStepResponseDtoUnit value = ThrottleStepResponseDtoUnit.MINUTES; + +// Open enum: use .of() to create instances from custom string values +ThrottleStepResponseDtoUnit custom = ThrottleStepResponseDtoUnit.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/TimeUnitEnum.md b/docs/models/components/TimeUnitEnum.md new file mode 100644 index 00000000..69a34f5d --- /dev/null +++ b/docs/models/components/TimeUnitEnum.md @@ -0,0 +1,26 @@ +# TimeUnitEnum + +Time unit + +## Example Usage + +```java +import co.novu.models.components.TimeUnitEnum; + +TimeUnitEnum value = TimeUnitEnum.SECONDS; + +// Open enum: use .of() to create instances from custom string values +TimeUnitEnum custom = TimeUnitEnum.of("custom_value"); +``` + + +## Values + +| Name | Value | +| --------- | --------- | +| `SECONDS` | seconds | +| `MINUTES` | minutes | +| `HOURS` | hours | +| `DAYS` | days | +| `WEEKS` | weeks | +| `MONTHS` | months | \ No newline at end of file diff --git a/docs/models/components/TimedConfigWeekDay.md b/docs/models/components/TimedConfigWeekDay.md index 48ddd5d3..8f6e0db4 100644 --- a/docs/models/components/TimedConfigWeekDay.md +++ b/docs/models/components/TimedConfigWeekDay.md @@ -1,5 +1,13 @@ # TimedConfigWeekDay +## Example Usage + +```java +import co.novu.models.components.TimedConfigWeekDay; + +TimedConfigWeekDay value = TimedConfigWeekDay.MONDAY; +``` + ## Values diff --git a/docs/models/components/TranslationGroupDtoResourceType.md b/docs/models/components/TranslationGroupDtoResourceType.md index c54b21d9..6a5221e0 100644 --- a/docs/models/components/TranslationGroupDtoResourceType.md +++ b/docs/models/components/TranslationGroupDtoResourceType.md @@ -2,6 +2,17 @@ Resource type +## Example Usage + +```java +import co.novu.models.components.TranslationGroupDtoResourceType; + +TranslationGroupDtoResourceType value = TranslationGroupDtoResourceType.WORKFLOW; + +// Open enum: use .of() to create instances from custom string values +TranslationGroupDtoResourceType custom = TranslationGroupDtoResourceType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/TranslationResponseDtoResourceType.md b/docs/models/components/TranslationResponseDtoResourceType.md index ce1a7f35..a8803a41 100644 --- a/docs/models/components/TranslationResponseDtoResourceType.md +++ b/docs/models/components/TranslationResponseDtoResourceType.md @@ -2,6 +2,17 @@ Resource type +## Example Usage + +```java +import co.novu.models.components.TranslationResponseDtoResourceType; + +TranslationResponseDtoResourceType value = TranslationResponseDtoResourceType.WORKFLOW; + +// Open enum: use .of() to create instances from custom string values +TranslationResponseDtoResourceType custom = TranslationResponseDtoResourceType.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/TriggerEventResponseDto.md b/docs/models/components/TriggerEventResponseDto.md index 817e77f4..f8a910d0 100644 --- a/docs/models/components/TriggerEventResponseDto.md +++ b/docs/models/components/TriggerEventResponseDto.md @@ -9,4 +9,5 @@ | `status` | [TriggerEventResponseDtoStatus](../../models/components/TriggerEventResponseDtoStatus.md) | :heavy_check_mark: | Status of the trigger | | `error` | List\<*String*> | :heavy_minus_sign: | In case of an error, this field will contain the error message(s) | | `transactionId` | *Optional\* | :heavy_minus_sign: | The returned transaction ID of the trigger | +| `activityFeedLink` | *Optional\* | :heavy_minus_sign: | Link to the activity feed for this trigger event | | `jobData` | [Optional\](../../models/components/JobData.md) | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/TriggerEventResponseDtoStatus.md b/docs/models/components/TriggerEventResponseDtoStatus.md index 92140d74..1654d4e5 100644 --- a/docs/models/components/TriggerEventResponseDtoStatus.md +++ b/docs/models/components/TriggerEventResponseDtoStatus.md @@ -2,6 +2,17 @@ Status of the trigger +## Example Usage + +```java +import co.novu.models.components.TriggerEventResponseDtoStatus; + +TriggerEventResponseDtoStatus value = TriggerEventResponseDtoStatus.ERROR; + +// Open enum: use .of() to create instances from custom string values +TriggerEventResponseDtoStatus custom = TriggerEventResponseDtoStatus.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/TriggerRecipientsTypeEnum.md b/docs/models/components/TriggerRecipientsTypeEnum.md index 3e2f1d58..d6273c0b 100644 --- a/docs/models/components/TriggerRecipientsTypeEnum.md +++ b/docs/models/components/TriggerRecipientsTypeEnum.md @@ -1,5 +1,13 @@ # TriggerRecipientsTypeEnum +## Example Usage + +```java +import co.novu.models.components.TriggerRecipientsTypeEnum; + +TriggerRecipientsTypeEnum value = TriggerRecipientsTypeEnum.SUBSCRIBER; +``` + ## Values diff --git a/docs/models/components/TypeChat.md b/docs/models/components/TypeChat.md new file mode 100644 index 00000000..c22918e5 --- /dev/null +++ b/docs/models/components/TypeChat.md @@ -0,0 +1,16 @@ +# TypeChat + +## Example Usage + +```java +import co.novu.models.components.TypeChat; + +TypeChat value = TypeChat.CHAT; +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `CHAT` | chat | \ No newline at end of file diff --git a/docs/models/components/TypeDelay.md b/docs/models/components/TypeDelay.md new file mode 100644 index 00000000..5de88064 --- /dev/null +++ b/docs/models/components/TypeDelay.md @@ -0,0 +1,16 @@ +# TypeDelay + +## Example Usage + +```java +import co.novu.models.components.TypeDelay; + +TypeDelay value = TypeDelay.DELAY; +``` + + +## Values + +| Name | Value | +| ------- | ------- | +| `DELAY` | delay | \ No newline at end of file diff --git a/docs/models/components/TypeDigest.md b/docs/models/components/TypeDigest.md new file mode 100644 index 00000000..ff24c71e --- /dev/null +++ b/docs/models/components/TypeDigest.md @@ -0,0 +1,16 @@ +# TypeDigest + +## Example Usage + +```java +import co.novu.models.components.TypeDigest; + +TypeDigest value = TypeDigest.DIGEST; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `DIGEST` | digest | \ No newline at end of file diff --git a/docs/models/components/TypeInApp.md b/docs/models/components/TypeInApp.md new file mode 100644 index 00000000..b4fa0162 --- /dev/null +++ b/docs/models/components/TypeInApp.md @@ -0,0 +1,16 @@ +# TypeInApp + +## Example Usage + +```java +import co.novu.models.components.TypeInApp; + +TypeInApp value = TypeInApp.IN_APP; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `IN_APP` | in_app | \ No newline at end of file diff --git a/docs/models/components/TypePush.md b/docs/models/components/TypePush.md new file mode 100644 index 00000000..42e33253 --- /dev/null +++ b/docs/models/components/TypePush.md @@ -0,0 +1,16 @@ +# TypePush + +## Example Usage + +```java +import co.novu.models.components.TypePush; + +TypePush value = TypePush.PUSH; +``` + + +## Values + +| Name | Value | +| ------ | ------ | +| `PUSH` | push | \ No newline at end of file diff --git a/docs/models/components/TypeSms.md b/docs/models/components/TypeSms.md new file mode 100644 index 00000000..95ba1f46 --- /dev/null +++ b/docs/models/components/TypeSms.md @@ -0,0 +1,16 @@ +# TypeSms + +## Example Usage + +```java +import co.novu.models.components.TypeSms; + +TypeSms value = TypeSms.SMS; +``` + + +## Values + +| Name | Value | +| ----- | ----- | +| `SMS` | sms | \ No newline at end of file diff --git a/docs/models/components/UiComponentEnum.md b/docs/models/components/UiComponentEnum.md index cb80dce5..572fcb11 100644 --- a/docs/models/components/UiComponentEnum.md +++ b/docs/models/components/UiComponentEnum.md @@ -2,46 +2,64 @@ Component type for the UI Schema Property +## Example Usage + +```java +import co.novu.models.components.UiComponentEnum; + +UiComponentEnum value = UiComponentEnum.EMAIL_EDITOR_SELECT; + +// Open enum: use .of() to create instances from custom string values +UiComponentEnum custom = UiComponentEnum.of("custom_value"); +``` + ## Values -| Name | Value | -| ------------------------------------ | ------------------------------------ | -| `EMAIL_EDITOR_SELECT` | EMAIL_EDITOR_SELECT | -| `LAYOUT_SELECT` | LAYOUT_SELECT | -| `EMAIL_RENDERER_SELECT` | EMAIL_RENDERER_SELECT | -| `BLOCK_EDITOR` | BLOCK_EDITOR | -| `EMAIL_BODY` | EMAIL_BODY | -| `TEXT_FULL_LINE` | TEXT_FULL_LINE | -| `TEXT_INLINE_LABEL` | TEXT_INLINE_LABEL | -| `IN_APP_BODY` | IN_APP_BODY | -| `IN_APP_AVATAR` | IN_APP_AVATAR | -| `IN_APP_PRIMARY_SUBJECT` | IN_APP_PRIMARY_SUBJECT | -| `IN_APP_BUTTON_DROPDOWN` | IN_APP_BUTTON_DROPDOWN | -| `IN_APP_DISABLE_SANITIZATION_SWITCH` | IN_APP_DISABLE_SANITIZATION_SWITCH | -| `DISABLE_SANITIZATION_SWITCH` | DISABLE_SANITIZATION_SWITCH | -| `URL_TEXT_BOX` | URL_TEXT_BOX | -| `DIGEST_AMOUNT` | DIGEST_AMOUNT | -| `DIGEST_UNIT` | DIGEST_UNIT | -| `DIGEST_TYPE` | DIGEST_TYPE | -| `DIGEST_KEY` | DIGEST_KEY | -| `DIGEST_CRON` | DIGEST_CRON | -| `DELAY_AMOUNT` | DELAY_AMOUNT | -| `DELAY_UNIT` | DELAY_UNIT | -| `DELAY_TYPE` | DELAY_TYPE | -| `DELAY_CRON` | DELAY_CRON | -| `DELAY_DYNAMIC_KEY` | DELAY_DYNAMIC_KEY | -| `THROTTLE_TYPE` | THROTTLE_TYPE | -| `THROTTLE_WINDOW` | THROTTLE_WINDOW | -| `THROTTLE_UNIT` | THROTTLE_UNIT | -| `THROTTLE_DYNAMIC_KEY` | THROTTLE_DYNAMIC_KEY | -| `THROTTLE_THRESHOLD` | THROTTLE_THRESHOLD | -| `THROTTLE_KEY` | THROTTLE_KEY | -| `EXTEND_TO_SCHEDULE` | EXTEND_TO_SCHEDULE | -| `SMS_BODY` | SMS_BODY | -| `CHAT_BODY` | CHAT_BODY | -| `PUSH_BODY` | PUSH_BODY | -| `PUSH_SUBJECT` | PUSH_SUBJECT | -| `QUERY_EDITOR` | QUERY_EDITOR | -| `DATA` | DATA | -| `LAYOUT_EMAIL` | LAYOUT_EMAIL | \ No newline at end of file +| Name | Value | +| --------------------------------------- | --------------------------------------- | +| `EMAIL_EDITOR_SELECT` | EMAIL_EDITOR_SELECT | +| `LAYOUT_SELECT` | LAYOUT_SELECT | +| `BLOCK_EDITOR` | BLOCK_EDITOR | +| `EMAIL_BODY` | EMAIL_BODY | +| `TEXT_FULL_LINE` | TEXT_FULL_LINE | +| `TEXT_INLINE_LABEL` | TEXT_INLINE_LABEL | +| `IN_APP_BODY` | IN_APP_BODY | +| `IN_APP_AVATAR` | IN_APP_AVATAR | +| `IN_APP_PRIMARY_SUBJECT` | IN_APP_PRIMARY_SUBJECT | +| `IN_APP_BUTTON_DROPDOWN` | IN_APP_BUTTON_DROPDOWN | +| `IN_APP_DISABLE_SANITIZATION_SWITCH` | IN_APP_DISABLE_SANITIZATION_SWITCH | +| `DISABLE_SANITIZATION_SWITCH` | DISABLE_SANITIZATION_SWITCH | +| `URL_TEXT_BOX` | URL_TEXT_BOX | +| `DIGEST_AMOUNT` | DIGEST_AMOUNT | +| `DIGEST_UNIT` | DIGEST_UNIT | +| `DIGEST_TYPE` | DIGEST_TYPE | +| `DIGEST_KEY` | DIGEST_KEY | +| `DIGEST_CRON` | DIGEST_CRON | +| `DELAY_AMOUNT` | DELAY_AMOUNT | +| `DELAY_UNIT` | DELAY_UNIT | +| `DELAY_TYPE` | DELAY_TYPE | +| `DELAY_CRON` | DELAY_CRON | +| `DELAY_DYNAMIC_KEY` | DELAY_DYNAMIC_KEY | +| `THROTTLE_TYPE` | THROTTLE_TYPE | +| `THROTTLE_WINDOW` | THROTTLE_WINDOW | +| `THROTTLE_UNIT` | THROTTLE_UNIT | +| `THROTTLE_DYNAMIC_KEY` | THROTTLE_DYNAMIC_KEY | +| `THROTTLE_THRESHOLD` | THROTTLE_THRESHOLD | +| `THROTTLE_KEY` | THROTTLE_KEY | +| `EXTEND_TO_SCHEDULE` | EXTEND_TO_SCHEDULE | +| `SMS_BODY` | SMS_BODY | +| `CHAT_BODY` | CHAT_BODY | +| `PUSH_BODY` | PUSH_BODY | +| `PUSH_SUBJECT` | PUSH_SUBJECT | +| `QUERY_EDITOR` | QUERY_EDITOR | +| `DATA` | DATA | +| `LAYOUT_EMAIL` | LAYOUT_EMAIL | +| `DESTINATION_METHOD` | DESTINATION_METHOD | +| `DESTINATION_URL` | DESTINATION_URL | +| `DESTINATION_HEADERS` | DESTINATION_HEADERS | +| `DESTINATION_BODY` | DESTINATION_BODY | +| `DESTINATION_RESPONSE_BODY_SCHEMA` | DESTINATION_RESPONSE_BODY_SCHEMA | +| `DESTINATION_ENFORCE_SCHEMA_VALIDATION` | DESTINATION_ENFORCE_SCHEMA_VALIDATION | +| `DESTINATION_CONTINUE_ON_FAILURE` | DESTINATION_CONTINUE_ON_FAILURE | +| `DESTINATION_TIMEOUT` | DESTINATION_TIMEOUT | \ No newline at end of file diff --git a/docs/models/components/UiSchemaGroupEnum.md b/docs/models/components/UiSchemaGroupEnum.md index 1106a519..b5604712 100644 --- a/docs/models/components/UiSchemaGroupEnum.md +++ b/docs/models/components/UiSchemaGroupEnum.md @@ -2,18 +2,30 @@ Group of the UI Schema +## Example Usage + +```java +import co.novu.models.components.UiSchemaGroupEnum; + +UiSchemaGroupEnum value = UiSchemaGroupEnum.IN_APP; + +// Open enum: use .of() to create instances from custom string values +UiSchemaGroupEnum custom = UiSchemaGroupEnum.of("custom_value"); +``` + ## Values -| Name | Value | -| ---------- | ---------- | -| `IN_APP` | IN_APP | -| `EMAIL` | EMAIL | -| `DIGEST` | DIGEST | -| `DELAY` | DELAY | -| `THROTTLE` | THROTTLE | -| `SMS` | SMS | -| `CHAT` | CHAT | -| `PUSH` | PUSH | -| `SKIP` | SKIP | -| `LAYOUT` | LAYOUT | \ No newline at end of file +| Name | Value | +| -------------- | -------------- | +| `IN_APP` | IN_APP | +| `EMAIL` | EMAIL | +| `DIGEST` | DIGEST | +| `DELAY` | DELAY | +| `THROTTLE` | THROTTLE | +| `SMS` | SMS | +| `CHAT` | CHAT | +| `PUSH` | PUSH | +| `SKIP` | SKIP | +| `LAYOUT` | LAYOUT | +| `HTTP_REQUEST` | HTTP_REQUEST | \ No newline at end of file diff --git a/docs/models/components/UpdateAllSubscriberNotificationsDto.md b/docs/models/components/UpdateAllSubscriberNotificationsDto.md new file mode 100644 index 00000000..a9781f31 --- /dev/null +++ b/docs/models/components/UpdateAllSubscriberNotificationsDto.md @@ -0,0 +1,10 @@ +# UpdateAllSubscriberNotificationsDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `tags` | [Optional\](../../models/components/UpdateAllSubscriberNotificationsDtoTags.md) | :heavy_minus_sign: | Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND of OR-groups). | +| `data` | *Optional\* | :heavy_minus_sign: | Filter notifications by data attributes (JSON string) | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering notifications | \ No newline at end of file diff --git a/docs/models/components/UpdateAllSubscriberNotificationsDtoTags.md b/docs/models/components/UpdateAllSubscriberNotificationsDtoTags.md new file mode 100644 index 00000000..434fbf59 --- /dev/null +++ b/docs/models/components/UpdateAllSubscriberNotificationsDtoTags.md @@ -0,0 +1,9 @@ +# UpdateAllSubscriberNotificationsDtoTags + +Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND of OR-groups). + + +## Fields + +| Field | Type | Required | Description | +| ----------- | ----------- | ----------- | ----------- | \ No newline at end of file diff --git a/docs/models/components/UpdateEnvironmentVariableRequestDto.md b/docs/models/components/UpdateEnvironmentVariableRequestDto.md new file mode 100644 index 00000000..13dd329c --- /dev/null +++ b/docs/models/components/UpdateEnvironmentVariableRequestDto.md @@ -0,0 +1,11 @@ +# UpdateEnvironmentVariableRequestDto + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | +| `key` | *Optional\* | :heavy_minus_sign: | Unique key for the variable. Must start with a letter and contain only letters, digits, and underscores. | +| `type` | [Optional\](../../models/components/UpdateEnvironmentVariableRequestDtoType.md) | :heavy_minus_sign: | The type of the variable | +| `isSecret` | *Optional\* | :heavy_minus_sign: | N/A | +| `values` | List\<[EnvironmentVariableValueDto](../../models/components/EnvironmentVariableValueDto.md)> | :heavy_minus_sign: | N/A | \ No newline at end of file diff --git a/docs/models/components/UpdateEnvironmentVariableRequestDtoType.md b/docs/models/components/UpdateEnvironmentVariableRequestDtoType.md new file mode 100644 index 00000000..ccadb9ac --- /dev/null +++ b/docs/models/components/UpdateEnvironmentVariableRequestDtoType.md @@ -0,0 +1,18 @@ +# UpdateEnvironmentVariableRequestDtoType + +The type of the variable + +## Example Usage + +```java +import co.novu.models.components.UpdateEnvironmentVariableRequestDtoType; + +UpdateEnvironmentVariableRequestDtoType value = UpdateEnvironmentVariableRequestDtoType.STRING; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `STRING` | string | \ No newline at end of file diff --git a/docs/models/components/UpdateLayoutDto.md b/docs/models/components/UpdateLayoutDto.md index b1064c13..0e7ea0a7 100644 --- a/docs/models/components/UpdateLayoutDto.md +++ b/docs/models/components/UpdateLayoutDto.md @@ -7,4 +7,4 @@ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------ | | `name` | *String* | :heavy_check_mark: | Name of the layout | | `isTranslationEnabled` | *Optional\* | :heavy_minus_sign: | Enable or disable translations for this layout | -| `controlValues` | [JsonNullable\](../../models/components/UpdateLayoutDtoControlValues.md) | :heavy_minus_sign: | Control values for the layout | \ No newline at end of file +| `controlValues` | [JsonNullable\](../../models/components/UpdateLayoutDtoControlValues.md) | :heavy_minus_sign: | Control values for the layout. Omit to leave unchanged, or set to null to clear stored control values. | \ No newline at end of file diff --git a/docs/models/components/UpdateLayoutDtoControlValues.md b/docs/models/components/UpdateLayoutDtoControlValues.md index fe4507ce..884d9c3b 100644 --- a/docs/models/components/UpdateLayoutDtoControlValues.md +++ b/docs/models/components/UpdateLayoutDtoControlValues.md @@ -1,6 +1,6 @@ # UpdateLayoutDtoControlValues -Control values for the layout +Control values for the layout. Omit to leave unchanged, or set to null to clear stored control values. ## Fields diff --git a/docs/models/components/ValueEnum.md b/docs/models/components/ValueEnum.md index 4f50a66d..8544099f 100644 --- a/docs/models/components/ValueEnum.md +++ b/docs/models/components/ValueEnum.md @@ -1,5 +1,16 @@ # ValueEnum +## Example Usage + +```java +import co.novu.models.components.ValueEnum; + +ValueEnum value = ValueEnum.AND; + +// Open enum: use .of() to create instances from custom string values +ValueEnum custom = ValueEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/components/WorkflowCreationSourceEnum.md b/docs/models/components/WorkflowCreationSourceEnum.md index 4bbff52a..d102e2df 100644 --- a/docs/models/components/WorkflowCreationSourceEnum.md +++ b/docs/models/components/WorkflowCreationSourceEnum.md @@ -2,6 +2,14 @@ Source of workflow creation +## Example Usage + +```java +import co.novu.models.components.WorkflowCreationSourceEnum; + +WorkflowCreationSourceEnum value = WorkflowCreationSourceEnum.TEMPLATE_STORE; +``` + ## Values diff --git a/docs/models/components/WorkflowResponseDtoSortField.md b/docs/models/components/WorkflowResponseDtoSortField.md index 322ef0dc..8809ee79 100644 --- a/docs/models/components/WorkflowResponseDtoSortField.md +++ b/docs/models/components/WorkflowResponseDtoSortField.md @@ -1,5 +1,13 @@ # WorkflowResponseDtoSortField +## Example Usage + +```java +import co.novu.models.components.WorkflowResponseDtoSortField; + +WorkflowResponseDtoSortField value = WorkflowResponseDtoSortField.CREATED_AT; +``` + ## Values diff --git a/docs/models/components/WorkflowStatusEnum.md b/docs/models/components/WorkflowStatusEnum.md index 9f790b32..f6e39f2e 100644 --- a/docs/models/components/WorkflowStatusEnum.md +++ b/docs/models/components/WorkflowStatusEnum.md @@ -2,6 +2,17 @@ Status of the workflow +## Example Usage + +```java +import co.novu.models.components.WorkflowStatusEnum; + +WorkflowStatusEnum value = WorkflowStatusEnum.ACTIVE; + +// Open enum: use .of() to create instances from custom string values +WorkflowStatusEnum custom = WorkflowStatusEnum.of("custom_value"); +``` + ## Values diff --git a/docs/models/operations/ChannelConnectionsControllerListChannelConnectionsChannel.md b/docs/models/operations/ChannelConnectionsControllerListChannelConnectionsChannel.md index 5cfae6ea..7004e698 100644 --- a/docs/models/operations/ChannelConnectionsControllerListChannelConnectionsChannel.md +++ b/docs/models/operations/ChannelConnectionsControllerListChannelConnectionsChannel.md @@ -2,6 +2,14 @@ Filter by channel type (email, sms, push, chat, etc.). +## Example Usage + +```java +import co.novu.models.operations.ChannelConnectionsControllerListChannelConnectionsChannel; + +ChannelConnectionsControllerListChannelConnectionsChannel value = ChannelConnectionsControllerListChannelConnectionsChannel.IN_APP; +``` + ## Values diff --git a/docs/models/operations/ChannelConnectionsControllerListChannelConnectionsOrderDirection.md b/docs/models/operations/ChannelConnectionsControllerListChannelConnectionsOrderDirection.md index 5d5ba4b7..c7d4fe2f 100644 --- a/docs/models/operations/ChannelConnectionsControllerListChannelConnectionsOrderDirection.md +++ b/docs/models/operations/ChannelConnectionsControllerListChannelConnectionsOrderDirection.md @@ -2,6 +2,14 @@ Direction of sorting +## Example Usage + +```java +import co.novu.models.operations.ChannelConnectionsControllerListChannelConnectionsOrderDirection; + +ChannelConnectionsControllerListChannelConnectionsOrderDirection value = ChannelConnectionsControllerListChannelConnectionsOrderDirection.ASC; +``` + ## Values diff --git a/docs/models/operations/ChannelEndpointsControllerListChannelEndpointsChannel.md b/docs/models/operations/ChannelEndpointsControllerListChannelEndpointsChannel.md index ed8e0371..e77a38a8 100644 --- a/docs/models/operations/ChannelEndpointsControllerListChannelEndpointsChannel.md +++ b/docs/models/operations/ChannelEndpointsControllerListChannelEndpointsChannel.md @@ -2,6 +2,14 @@ Channel type to filter results. +## Example Usage + +```java +import co.novu.models.operations.ChannelEndpointsControllerListChannelEndpointsChannel; + +ChannelEndpointsControllerListChannelEndpointsChannel value = ChannelEndpointsControllerListChannelEndpointsChannel.IN_APP; +``` + ## Values diff --git a/docs/models/operations/ChannelEndpointsControllerListChannelEndpointsOrderDirection.md b/docs/models/operations/ChannelEndpointsControllerListChannelEndpointsOrderDirection.md index 36ca608c..1dfcc292 100644 --- a/docs/models/operations/ChannelEndpointsControllerListChannelEndpointsOrderDirection.md +++ b/docs/models/operations/ChannelEndpointsControllerListChannelEndpointsOrderDirection.md @@ -2,6 +2,14 @@ Direction of sorting +## Example Usage + +```java +import co.novu.models.operations.ChannelEndpointsControllerListChannelEndpointsOrderDirection; + +ChannelEndpointsControllerListChannelEndpointsOrderDirection value = ChannelEndpointsControllerListChannelEndpointsOrderDirection.ASC; +``` + ## Values diff --git a/docs/models/operations/ContextsControllerListContextsOrderDirection.md b/docs/models/operations/ContextsControllerListContextsOrderDirection.md index da2e510b..29a98d9b 100644 --- a/docs/models/operations/ContextsControllerListContextsOrderDirection.md +++ b/docs/models/operations/ContextsControllerListContextsOrderDirection.md @@ -2,6 +2,14 @@ Direction of sorting +## Example Usage + +```java +import co.novu.models.operations.ContextsControllerListContextsOrderDirection; + +ContextsControllerListContextsOrderDirection value = ContextsControllerListContextsOrderDirection.ASC; +``` + ## Values diff --git a/docs/models/operations/Criticality.md b/docs/models/operations/Criticality.md index d4bc23b3..b7a367b7 100644 --- a/docs/models/operations/Criticality.md +++ b/docs/models/operations/Criticality.md @@ -1,5 +1,13 @@ # Criticality +## Example Usage + +```java +import co.novu.models.operations.Criticality; + +Criticality value = Criticality.CRITICAL; +``` + ## Values diff --git a/docs/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequest.md b/docs/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequest.md new file mode 100644 index 00000000..54d372c0 --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequest.md @@ -0,0 +1,9 @@ +# EnvironmentVariablesControllerCreateEnvironmentVariableRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [CreateEnvironmentVariableRequestDto](../../models/components/CreateEnvironmentVariableRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.md b/docs/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.md new file mode 100644 index 00000000..69dee01f --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.md @@ -0,0 +1,12 @@ +# EnvironmentVariablesControllerCreateEnvironmentVariableResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `environmentVariableResponseDto` | [Optional\](../../models/components/EnvironmentVariableResponseDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.md b/docs/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.md new file mode 100644 index 00000000..c784af6f --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.md @@ -0,0 +1,9 @@ +# EnvironmentVariablesControllerDeleteEnvironmentVariableRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `variableKey` | *String* | :heavy_check_mark: | The unique key of the environment variable (e.g. BASE_URL) | BASE_URL | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.md b/docs/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.md new file mode 100644 index 00000000..4bfab717 --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.md @@ -0,0 +1,11 @@ +# EnvironmentVariablesControllerDeleteEnvironmentVariableResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequest.md b/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequest.md new file mode 100644 index 00000000..710acfe4 --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequest.md @@ -0,0 +1,9 @@ +# EnvironmentVariablesControllerGetEnvironmentVariableRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `variableKey` | *String* | :heavy_check_mark: | The unique key of the environment variable (e.g. BASE_URL) | BASE_URL | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableResponse.md b/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableResponse.md new file mode 100644 index 00000000..f2731cad --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableResponse.md @@ -0,0 +1,12 @@ +# EnvironmentVariablesControllerGetEnvironmentVariableResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `environmentVariableResponseDto` | [Optional\](../../models/components/EnvironmentVariableResponseDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.md b/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.md new file mode 100644 index 00000000..d3c8833c --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.md @@ -0,0 +1,9 @@ +# EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `variableKey` | *String* | :heavy_check_mark: | The unique key of the environment variable (e.g. BASE_URL) | BASE_URL | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.md b/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.md new file mode 100644 index 00000000..87252fee --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.md @@ -0,0 +1,12 @@ +# EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `getEnvironmentVariableUsageResponseDto` | [Optional\](../../models/components/GetEnvironmentVariableUsageResponseDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequest.md b/docs/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequest.md new file mode 100644 index 00000000..876740b7 --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequest.md @@ -0,0 +1,9 @@ +# EnvironmentVariablesControllerListEnvironmentVariablesRequest + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `search` | *Optional\* | :heavy_minus_sign: | Filter variables by key (case-insensitive partial match) | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesResponse.md b/docs/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesResponse.md new file mode 100644 index 00000000..baf8f21a --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesResponse.md @@ -0,0 +1,12 @@ +# EnvironmentVariablesControllerListEnvironmentVariablesResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `environmentVariableResponseDtos` | List\<[EnvironmentVariableResponseDto](../../models/components/EnvironmentVariableResponseDto.md)> | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.md b/docs/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.md new file mode 100644 index 00000000..14e4c9ea --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.md @@ -0,0 +1,10 @@ +# EnvironmentVariablesControllerUpdateEnvironmentVariableRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `variableKey` | *String* | :heavy_check_mark: | The unique key of the environment variable (e.g. BASE_URL) | BASE_URL | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | +| `body` | [UpdateEnvironmentVariableRequestDto](../../models/components/UpdateEnvironmentVariableRequestDto.md) | :heavy_check_mark: | N/A | | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.md b/docs/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.md new file mode 100644 index 00000000..d870a3f0 --- /dev/null +++ b/docs/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.md @@ -0,0 +1,12 @@ +# EnvironmentVariablesControllerUpdateEnvironmentVariableResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `environmentVariableResponseDto` | [Optional\](../../models/components/EnvironmentVariableResponseDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentsControllerDiffEnvironmentRequest.md b/docs/models/operations/EnvironmentsControllerDiffEnvironmentRequest.md new file mode 100644 index 00000000..9fdf9b45 --- /dev/null +++ b/docs/models/operations/EnvironmentsControllerDiffEnvironmentRequest.md @@ -0,0 +1,10 @@ +# EnvironmentsControllerDiffEnvironmentRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `targetEnvironmentId` | *String* | :heavy_check_mark: | Target environment ID (MongoDB ObjectId) to compare against | 6615943e7ace93b0540ae377 | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | +| `body` | [DiffEnvironmentRequestDto](../../models/components/DiffEnvironmentRequestDto.md) | :heavy_check_mark: | Diff request configuration | | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentsControllerDiffEnvironmentResponse.md b/docs/models/operations/EnvironmentsControllerDiffEnvironmentResponse.md new file mode 100644 index 00000000..85739e6c --- /dev/null +++ b/docs/models/operations/EnvironmentsControllerDiffEnvironmentResponse.md @@ -0,0 +1,12 @@ +# EnvironmentsControllerDiffEnvironmentResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `diffEnvironmentResponseDto` | [Optional\](../../models/components/DiffEnvironmentResponseDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentsControllerPublishEnvironmentRequest.md b/docs/models/operations/EnvironmentsControllerPublishEnvironmentRequest.md new file mode 100644 index 00000000..99b8c6a1 --- /dev/null +++ b/docs/models/operations/EnvironmentsControllerPublishEnvironmentRequest.md @@ -0,0 +1,10 @@ +# EnvironmentsControllerPublishEnvironmentRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `targetEnvironmentId` | *String* | :heavy_check_mark: | Target environment ID (MongoDB ObjectId) to publish resources to | 6615943e7ace93b0540ae377 | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | +| `body` | [PublishEnvironmentRequestDto](../../models/components/PublishEnvironmentRequestDto.md) | :heavy_check_mark: | Publish request configuration | | \ No newline at end of file diff --git a/docs/models/operations/EnvironmentsControllerPublishEnvironmentResponse.md b/docs/models/operations/EnvironmentsControllerPublishEnvironmentResponse.md new file mode 100644 index 00000000..8872788b --- /dev/null +++ b/docs/models/operations/EnvironmentsControllerPublishEnvironmentResponse.md @@ -0,0 +1,12 @@ +# EnvironmentsControllerPublishEnvironmentResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `publishEnvironmentResponseDto` | [Optional\](../../models/components/PublishEnvironmentResponseDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/MessagesControllerDeleteMessagesByTransactionIdChannel.md b/docs/models/operations/MessagesControllerDeleteMessagesByTransactionIdChannel.md index 00d90934..4b7ddc26 100644 --- a/docs/models/operations/MessagesControllerDeleteMessagesByTransactionIdChannel.md +++ b/docs/models/operations/MessagesControllerDeleteMessagesByTransactionIdChannel.md @@ -2,6 +2,14 @@ The channel of the message to be deleted +## Example Usage + +```java +import co.novu.models.operations.MessagesControllerDeleteMessagesByTransactionIdChannel; + +MessagesControllerDeleteMessagesByTransactionIdChannel value = MessagesControllerDeleteMessagesByTransactionIdChannel.IN_APP; +``` + ## Values diff --git a/docs/models/operations/Severity.md b/docs/models/operations/Severity.md new file mode 100644 index 00000000..f15f3b5b --- /dev/null +++ b/docs/models/operations/Severity.md @@ -0,0 +1,19 @@ +# Severity + +## Example Usage + +```java +import co.novu.models.operations.Severity; + +Severity value = Severity.HIGH; +``` + + +## Values + +| Name | Value | +| -------- | -------- | +| `HIGH` | high | +| `MEDIUM` | medium | +| `LOW` | low | +| `NONE` | none | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerArchiveAllNotificationsRequest.md b/docs/models/operations/SubscribersControllerArchiveAllNotificationsRequest.md new file mode 100644 index 00000000..baadc0c9 --- /dev/null +++ b/docs/models/operations/SubscribersControllerArchiveAllNotificationsRequest.md @@ -0,0 +1,10 @@ +# SubscribersControllerArchiveAllNotificationsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [UpdateAllSubscriberNotificationsDto](../../models/components/UpdateAllSubscriberNotificationsDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerArchiveAllNotificationsResponse.md b/docs/models/operations/SubscribersControllerArchiveAllNotificationsResponse.md new file mode 100644 index 00000000..ee55cff3 --- /dev/null +++ b/docs/models/operations/SubscribersControllerArchiveAllNotificationsResponse.md @@ -0,0 +1,11 @@ +# SubscribersControllerArchiveAllNotificationsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerArchiveAllReadNotificationsRequest.md b/docs/models/operations/SubscribersControllerArchiveAllReadNotificationsRequest.md new file mode 100644 index 00000000..19e96f00 --- /dev/null +++ b/docs/models/operations/SubscribersControllerArchiveAllReadNotificationsRequest.md @@ -0,0 +1,10 @@ +# SubscribersControllerArchiveAllReadNotificationsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [UpdateAllSubscriberNotificationsDto](../../models/components/UpdateAllSubscriberNotificationsDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerArchiveAllReadNotificationsResponse.md b/docs/models/operations/SubscribersControllerArchiveAllReadNotificationsResponse.md new file mode 100644 index 00000000..7c2e52c3 --- /dev/null +++ b/docs/models/operations/SubscribersControllerArchiveAllReadNotificationsResponse.md @@ -0,0 +1,11 @@ +# SubscribersControllerArchiveAllReadNotificationsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerArchiveNotificationRequest.md b/docs/models/operations/SubscribersControllerArchiveNotificationRequest.md new file mode 100644 index 00000000..47150729 --- /dev/null +++ b/docs/models/operations/SubscribersControllerArchiveNotificationRequest.md @@ -0,0 +1,11 @@ +# SubscribersControllerArchiveNotificationRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerArchiveNotificationResponse.md b/docs/models/operations/SubscribersControllerArchiveNotificationResponse.md new file mode 100644 index 00000000..1b916421 --- /dev/null +++ b/docs/models/operations/SubscribersControllerArchiveNotificationResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerArchiveNotificationResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `inboxNotificationDto` | [Optional\](../../models/components/InboxNotificationDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.md b/docs/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.md index 7a6c9247..85e4ed9e 100644 --- a/docs/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.md +++ b/docs/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | `body` | [BulkUpdateSubscriberPreferencesDto](../../models/components/BulkUpdateSubscriberPreferencesDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerCompleteNotificationActionActionType.md b/docs/models/operations/SubscribersControllerCompleteNotificationActionActionType.md new file mode 100644 index 00000000..34db4431 --- /dev/null +++ b/docs/models/operations/SubscribersControllerCompleteNotificationActionActionType.md @@ -0,0 +1,19 @@ +# SubscribersControllerCompleteNotificationActionActionType + +The type of action (primary or secondary) + +## Example Usage + +```java +import co.novu.models.operations.SubscribersControllerCompleteNotificationActionActionType; + +SubscribersControllerCompleteNotificationActionActionType value = SubscribersControllerCompleteNotificationActionActionType.PRIMARY; +``` + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `PRIMARY` | primary | +| `SECONDARY` | secondary | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerCompleteNotificationActionRequest.md b/docs/models/operations/SubscribersControllerCompleteNotificationActionRequest.md new file mode 100644 index 00000000..595ba30e --- /dev/null +++ b/docs/models/operations/SubscribersControllerCompleteNotificationActionRequest.md @@ -0,0 +1,12 @@ +# SubscribersControllerCompleteNotificationActionRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `actionType` | [SubscribersControllerCompleteNotificationActionActionType](../../models/operations/SubscribersControllerCompleteNotificationActionActionType.md) | :heavy_check_mark: | The type of action (primary or secondary) | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerCompleteNotificationActionResponse.md b/docs/models/operations/SubscribersControllerCompleteNotificationActionResponse.md new file mode 100644 index 00000000..b29efa16 --- /dev/null +++ b/docs/models/operations/SubscribersControllerCompleteNotificationActionResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerCompleteNotificationActionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `inboxNotificationDto` | [Optional\](../../models/components/InboxNotificationDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerDeleteAllNotificationsRequest.md b/docs/models/operations/SubscribersControllerDeleteAllNotificationsRequest.md new file mode 100644 index 00000000..47a57869 --- /dev/null +++ b/docs/models/operations/SubscribersControllerDeleteAllNotificationsRequest.md @@ -0,0 +1,10 @@ +# SubscribersControllerDeleteAllNotificationsRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [UpdateAllSubscriberNotificationsDto](../../models/components/UpdateAllSubscriberNotificationsDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerDeleteAllNotificationsResponse.md b/docs/models/operations/SubscribersControllerDeleteAllNotificationsResponse.md new file mode 100644 index 00000000..57786696 --- /dev/null +++ b/docs/models/operations/SubscribersControllerDeleteAllNotificationsResponse.md @@ -0,0 +1,11 @@ +# SubscribersControllerDeleteAllNotificationsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerDeleteNotificationRequest.md b/docs/models/operations/SubscribersControllerDeleteNotificationRequest.md new file mode 100644 index 00000000..4e0da105 --- /dev/null +++ b/docs/models/operations/SubscribersControllerDeleteNotificationRequest.md @@ -0,0 +1,11 @@ +# SubscribersControllerDeleteNotificationRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerDeleteNotificationResponse.md b/docs/models/operations/SubscribersControllerDeleteNotificationResponse.md new file mode 100644 index 00000000..5ad5fb03 --- /dev/null +++ b/docs/models/operations/SubscribersControllerDeleteNotificationResponse.md @@ -0,0 +1,11 @@ +# SubscribersControllerDeleteNotificationResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequest.md b/docs/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequest.md new file mode 100644 index 00000000..5b6853ca --- /dev/null +++ b/docs/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequest.md @@ -0,0 +1,10 @@ +# SubscribersControllerGetSubscriberNotificationsCountRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | +| `filters` | *String* | :heavy_check_mark: | Array of filter objects (max 30) to count notifications by different criteria | [{"read":false,"archived":false},{"tags":["important"]},{"tags":{"and":[{"or":["a","b"]},{"or":["c"]}]}}] | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerGetSubscriberNotificationsCountResponse.md b/docs/models/operations/SubscribersControllerGetSubscriberNotificationsCountResponse.md new file mode 100644 index 00000000..8ffb90e3 --- /dev/null +++ b/docs/models/operations/SubscribersControllerGetSubscriberNotificationsCountResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerGetSubscriberNotificationsCountResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `getSubscriberNotificationsCountResponseDtos` | List\<[GetSubscriberNotificationsCountResponseDto](../../models/components/GetSubscriberNotificationsCountResponseDto.md)> | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerGetSubscriberNotificationsRequest.md b/docs/models/operations/SubscribersControllerGetSubscriberNotificationsRequest.md new file mode 100644 index 00000000..473b5e8f --- /dev/null +++ b/docs/models/operations/SubscribersControllerGetSubscriberNotificationsRequest.md @@ -0,0 +1,21 @@ +# SubscribersControllerGetSubscriberNotificationsRequest + + +## Fields + +| Field | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | +| `limit` | *Optional\* | :heavy_minus_sign: | N/A | 10 | +| `after` | *Optional\* | :heavy_minus_sign: | N/A | | +| `offset` | *Optional\* | :heavy_minus_sign: | N/A | 0 | +| `read` | *Optional\* | :heavy_minus_sign: | Filter by read/unread state | | +| `archived` | *Optional\* | :heavy_minus_sign: | Filter by archived state | | +| `snoozed` | *Optional\* | :heavy_minus_sign: | Filter by snoozed state | | +| `seen` | *Optional\* | :heavy_minus_sign: | Filter by seen state | | +| `data` | *Optional\* | :heavy_minus_sign: | Filter by data attributes (JSON string) | | +| `severity` | List\<[Severity](../../models/operations/Severity.md)> | :heavy_minus_sign: | Filter by severity levels | | +| `createdGte` | *Optional\* | :heavy_minus_sign: | Filter notifications created on or after this timestamp (Unix timestamp in milliseconds) | 1704067200000 | +| `createdLte` | *Optional\* | :heavy_minus_sign: | Filter notifications created on or before this timestamp (Unix timestamp in milliseconds) | 1735689599999 | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering notifications in multi-context scenarios | | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerGetSubscriberNotificationsResponse.md b/docs/models/operations/SubscribersControllerGetSubscriberNotificationsResponse.md new file mode 100644 index 00000000..643f1b9e --- /dev/null +++ b/docs/models/operations/SubscribersControllerGetSubscriberNotificationsResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerGetSubscriberNotificationsResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `getSubscriberNotificationsResponseDto` | [Optional\](../../models/components/GetSubscriberNotificationsResponseDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.md b/docs/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.md index c5f4f521..92c55d3a 100644 --- a/docs/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.md +++ b/docs/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.md @@ -5,7 +5,7 @@ | Field | Type | Required | Description | Example | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | | `criticality` | [Optional\](../../models/operations/Criticality.md) | :heavy_minus_sign: | N/A | | | `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering preferences (e.g., ["tenant:acme"]) | [
"tenant:acme"
] | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerGetSubscriberRequest.md b/docs/models/operations/SubscribersControllerGetSubscriberRequest.md index e4a0489b..2db24aa1 100644 --- a/docs/models/operations/SubscribersControllerGetSubscriberRequest.md +++ b/docs/models/operations/SubscribersControllerGetSubscriberRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerListSubscriberTopicsOrderDirection.md b/docs/models/operations/SubscribersControllerListSubscriberTopicsOrderDirection.md index a580c024..f1970b22 100644 --- a/docs/models/operations/SubscribersControllerListSubscriberTopicsOrderDirection.md +++ b/docs/models/operations/SubscribersControllerListSubscriberTopicsOrderDirection.md @@ -2,6 +2,14 @@ Direction of sorting +## Example Usage + +```java +import co.novu.models.operations.SubscribersControllerListSubscriberTopicsOrderDirection; + +SubscribersControllerListSubscriberTopicsOrderDirection value = SubscribersControllerListSubscriberTopicsOrderDirection.ASC; +``` + ## Values diff --git a/docs/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequest.md b/docs/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequest.md new file mode 100644 index 00000000..e0d1c698 --- /dev/null +++ b/docs/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequest.md @@ -0,0 +1,10 @@ +# SubscribersControllerMarkAllNotificationsAsReadRequest + + +## Fields + +| Field | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [UpdateAllSubscriberNotificationsDto](../../models/components/UpdateAllSubscriberNotificationsDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerMarkAllNotificationsAsReadResponse.md b/docs/models/operations/SubscribersControllerMarkAllNotificationsAsReadResponse.md new file mode 100644 index 00000000..e16de279 --- /dev/null +++ b/docs/models/operations/SubscribersControllerMarkAllNotificationsAsReadResponse.md @@ -0,0 +1,11 @@ +# SubscribersControllerMarkAllNotificationsAsReadResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerMarkNotificationAsReadRequest.md b/docs/models/operations/SubscribersControllerMarkNotificationAsReadRequest.md new file mode 100644 index 00000000..0043da2f --- /dev/null +++ b/docs/models/operations/SubscribersControllerMarkNotificationAsReadRequest.md @@ -0,0 +1,11 @@ +# SubscribersControllerMarkNotificationAsReadRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerMarkNotificationAsReadResponse.md b/docs/models/operations/SubscribersControllerMarkNotificationAsReadResponse.md new file mode 100644 index 00000000..588ee74c --- /dev/null +++ b/docs/models/operations/SubscribersControllerMarkNotificationAsReadResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerMarkNotificationAsReadResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `inboxNotificationDto` | [Optional\](../../models/components/InboxNotificationDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerMarkNotificationAsUnreadRequest.md b/docs/models/operations/SubscribersControllerMarkNotificationAsUnreadRequest.md new file mode 100644 index 00000000..d73c0026 --- /dev/null +++ b/docs/models/operations/SubscribersControllerMarkNotificationAsUnreadRequest.md @@ -0,0 +1,11 @@ +# SubscribersControllerMarkNotificationAsUnreadRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerMarkNotificationAsUnreadResponse.md b/docs/models/operations/SubscribersControllerMarkNotificationAsUnreadResponse.md new file mode 100644 index 00000000..d509b183 --- /dev/null +++ b/docs/models/operations/SubscribersControllerMarkNotificationAsUnreadResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerMarkNotificationAsUnreadResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `inboxNotificationDto` | [Optional\](../../models/components/InboxNotificationDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerMarkNotificationsAsSeenRequest.md b/docs/models/operations/SubscribersControllerMarkNotificationsAsSeenRequest.md new file mode 100644 index 00000000..20e48685 --- /dev/null +++ b/docs/models/operations/SubscribersControllerMarkNotificationsAsSeenRequest.md @@ -0,0 +1,10 @@ +# SubscribersControllerMarkNotificationsAsSeenRequest + + +## Fields + +| Field | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [MarkSubscriberNotificationsAsSeenDto](../../models/components/MarkSubscriberNotificationsAsSeenDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerMarkNotificationsAsSeenResponse.md b/docs/models/operations/SubscribersControllerMarkNotificationsAsSeenResponse.md new file mode 100644 index 00000000..01505160 --- /dev/null +++ b/docs/models/operations/SubscribersControllerMarkNotificationsAsSeenResponse.md @@ -0,0 +1,11 @@ +# SubscribersControllerMarkNotificationsAsSeenResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerPatchSubscriberRequest.md b/docs/models/operations/SubscribersControllerPatchSubscriberRequest.md index 25c981ec..f9ec7213 100644 --- a/docs/models/operations/SubscribersControllerPatchSubscriberRequest.md +++ b/docs/models/operations/SubscribersControllerPatchSubscriberRequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | `body` | [PatchSubscriberRequestDto](../../models/components/PatchSubscriberRequestDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerRemoveSubscriberRequest.md b/docs/models/operations/SubscribersControllerRemoveSubscriberRequest.md index 504d0c31..c0d58630 100644 --- a/docs/models/operations/SubscribersControllerRemoveSubscriberRequest.md +++ b/docs/models/operations/SubscribersControllerRemoveSubscriberRequest.md @@ -5,5 +5,5 @@ | Field | Type | Required | Description | | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerRevertNotificationActionActionType.md b/docs/models/operations/SubscribersControllerRevertNotificationActionActionType.md new file mode 100644 index 00000000..e3e2d52b --- /dev/null +++ b/docs/models/operations/SubscribersControllerRevertNotificationActionActionType.md @@ -0,0 +1,19 @@ +# SubscribersControllerRevertNotificationActionActionType + +The type of action (primary or secondary) + +## Example Usage + +```java +import co.novu.models.operations.SubscribersControllerRevertNotificationActionActionType; + +SubscribersControllerRevertNotificationActionActionType value = SubscribersControllerRevertNotificationActionActionType.PRIMARY; +``` + + +## Values + +| Name | Value | +| ----------- | ----------- | +| `PRIMARY` | primary | +| `SECONDARY` | secondary | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerRevertNotificationActionRequest.md b/docs/models/operations/SubscribersControllerRevertNotificationActionRequest.md new file mode 100644 index 00000000..cade8b27 --- /dev/null +++ b/docs/models/operations/SubscribersControllerRevertNotificationActionRequest.md @@ -0,0 +1,12 @@ +# SubscribersControllerRevertNotificationActionRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `actionType` | [SubscribersControllerRevertNotificationActionActionType](../../models/operations/SubscribersControllerRevertNotificationActionActionType.md) | :heavy_check_mark: | The type of action (primary or secondary) | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerRevertNotificationActionResponse.md b/docs/models/operations/SubscribersControllerRevertNotificationActionResponse.md new file mode 100644 index 00000000..cb3eb8b6 --- /dev/null +++ b/docs/models/operations/SubscribersControllerRevertNotificationActionResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerRevertNotificationActionResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `inboxNotificationDto` | [Optional\](../../models/components/InboxNotificationDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerSearchSubscribersOrderDirection.md b/docs/models/operations/SubscribersControllerSearchSubscribersOrderDirection.md index 9ef024ba..bb3fd8eb 100644 --- a/docs/models/operations/SubscribersControllerSearchSubscribersOrderDirection.md +++ b/docs/models/operations/SubscribersControllerSearchSubscribersOrderDirection.md @@ -2,6 +2,14 @@ Direction of sorting +## Example Usage + +```java +import co.novu.models.operations.SubscribersControllerSearchSubscribersOrderDirection; + +SubscribersControllerSearchSubscribersOrderDirection value = SubscribersControllerSearchSubscribersOrderDirection.ASC; +``` + ## Values diff --git a/docs/models/operations/SubscribersControllerSnoozeNotificationRequest.md b/docs/models/operations/SubscribersControllerSnoozeNotificationRequest.md new file mode 100644 index 00000000..67a5ace7 --- /dev/null +++ b/docs/models/operations/SubscribersControllerSnoozeNotificationRequest.md @@ -0,0 +1,12 @@ +# SubscribersControllerSnoozeNotificationRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [SnoozeSubscriberNotificationDto](../../models/components/SnoozeSubscriberNotificationDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerSnoozeNotificationResponse.md b/docs/models/operations/SubscribersControllerSnoozeNotificationResponse.md new file mode 100644 index 00000000..2d2d77de --- /dev/null +++ b/docs/models/operations/SubscribersControllerSnoozeNotificationResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerSnoozeNotificationResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `inboxNotificationDto` | [Optional\](../../models/components/InboxNotificationDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerUnarchiveNotificationRequest.md b/docs/models/operations/SubscribersControllerUnarchiveNotificationRequest.md new file mode 100644 index 00000000..d7a7bba8 --- /dev/null +++ b/docs/models/operations/SubscribersControllerUnarchiveNotificationRequest.md @@ -0,0 +1,11 @@ +# SubscribersControllerUnarchiveNotificationRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerUnarchiveNotificationResponse.md b/docs/models/operations/SubscribersControllerUnarchiveNotificationResponse.md new file mode 100644 index 00000000..e5c8968c --- /dev/null +++ b/docs/models/operations/SubscribersControllerUnarchiveNotificationResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerUnarchiveNotificationResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `inboxNotificationDto` | [Optional\](../../models/components/InboxNotificationDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerUnsnoozeNotificationRequest.md b/docs/models/operations/SubscribersControllerUnsnoozeNotificationRequest.md new file mode 100644 index 00000000..bc56669a --- /dev/null +++ b/docs/models/operations/SubscribersControllerUnsnoozeNotificationRequest.md @@ -0,0 +1,11 @@ +# SubscribersControllerUnsnoozeNotificationRequest + + +## Fields + +| Field | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerUnsnoozeNotificationResponse.md b/docs/models/operations/SubscribersControllerUnsnoozeNotificationResponse.md new file mode 100644 index 00000000..b9d96515 --- /dev/null +++ b/docs/models/operations/SubscribersControllerUnsnoozeNotificationResponse.md @@ -0,0 +1,12 @@ +# SubscribersControllerUnsnoozeNotificationResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `inboxNotificationDto` | [Optional\](../../models/components/InboxNotificationDto.md) | :heavy_minus_sign: | OK | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.md b/docs/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.md index e8e5c08f..36e463ce 100644 --- a/docs/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.md +++ b/docs/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.md @@ -5,6 +5,6 @@ | Field | Type | Required | Description | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | `body` | [PatchSubscriberPreferencesDto](../../models/components/PatchSubscriberPreferencesDto.md) | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/models/operations/TopicsControllerListTopicSubscriptionsOrderDirection.md b/docs/models/operations/TopicsControllerListTopicSubscriptionsOrderDirection.md index 429636ac..c16dd600 100644 --- a/docs/models/operations/TopicsControllerListTopicSubscriptionsOrderDirection.md +++ b/docs/models/operations/TopicsControllerListTopicSubscriptionsOrderDirection.md @@ -2,6 +2,14 @@ Direction of sorting +## Example Usage + +```java +import co.novu.models.operations.TopicsControllerListTopicSubscriptionsOrderDirection; + +TopicsControllerListTopicSubscriptionsOrderDirection value = TopicsControllerListTopicSubscriptionsOrderDirection.ASC; +``` + ## Values diff --git a/docs/models/operations/TopicsControllerListTopicsOrderDirection.md b/docs/models/operations/TopicsControllerListTopicsOrderDirection.md index bd5d5251..68035429 100644 --- a/docs/models/operations/TopicsControllerListTopicsOrderDirection.md +++ b/docs/models/operations/TopicsControllerListTopicsOrderDirection.md @@ -2,6 +2,14 @@ Direction of sorting +## Example Usage + +```java +import co.novu.models.operations.TopicsControllerListTopicsOrderDirection; + +TopicsControllerListTopicsOrderDirection value = TopicsControllerListTopicsOrderDirection.ASC; +``` + ## Values diff --git a/docs/models/operations/TranslationControllerDeleteTranslationEndpointResourceType.md b/docs/models/operations/TranslationControllerDeleteTranslationEndpointResourceType.md index a89d7b2b..f32d428e 100644 --- a/docs/models/operations/TranslationControllerDeleteTranslationEndpointResourceType.md +++ b/docs/models/operations/TranslationControllerDeleteTranslationEndpointResourceType.md @@ -2,6 +2,14 @@ Resource type +## Example Usage + +```java +import co.novu.models.operations.TranslationControllerDeleteTranslationEndpointResourceType; + +TranslationControllerDeleteTranslationEndpointResourceType value = TranslationControllerDeleteTranslationEndpointResourceType.WORKFLOW; +``` + ## Values diff --git a/docs/models/operations/TranslationControllerDeleteTranslationGroupEndpointResourceType.md b/docs/models/operations/TranslationControllerDeleteTranslationGroupEndpointResourceType.md index 81d0e79a..98ebe21f 100644 --- a/docs/models/operations/TranslationControllerDeleteTranslationGroupEndpointResourceType.md +++ b/docs/models/operations/TranslationControllerDeleteTranslationGroupEndpointResourceType.md @@ -2,6 +2,14 @@ Resource type +## Example Usage + +```java +import co.novu.models.operations.TranslationControllerDeleteTranslationGroupEndpointResourceType; + +TranslationControllerDeleteTranslationGroupEndpointResourceType value = TranslationControllerDeleteTranslationGroupEndpointResourceType.WORKFLOW; +``` + ## Values diff --git a/docs/models/operations/TranslationControllerGetSingleTranslationResourceType.md b/docs/models/operations/TranslationControllerGetSingleTranslationResourceType.md index 2601386f..b5715011 100644 --- a/docs/models/operations/TranslationControllerGetSingleTranslationResourceType.md +++ b/docs/models/operations/TranslationControllerGetSingleTranslationResourceType.md @@ -2,6 +2,14 @@ Resource type +## Example Usage + +```java +import co.novu.models.operations.TranslationControllerGetSingleTranslationResourceType; + +TranslationControllerGetSingleTranslationResourceType value = TranslationControllerGetSingleTranslationResourceType.WORKFLOW; +``` + ## Values diff --git a/docs/models/operations/TranslationControllerGetTranslationGroupEndpointResourceType.md b/docs/models/operations/TranslationControllerGetTranslationGroupEndpointResourceType.md index 15d8bca7..ea22aac9 100644 --- a/docs/models/operations/TranslationControllerGetTranslationGroupEndpointResourceType.md +++ b/docs/models/operations/TranslationControllerGetTranslationGroupEndpointResourceType.md @@ -2,6 +2,14 @@ Resource type +## Example Usage + +```java +import co.novu.models.operations.TranslationControllerGetTranslationGroupEndpointResourceType; + +TranslationControllerGetTranslationGroupEndpointResourceType value = TranslationControllerGetTranslationGroupEndpointResourceType.WORKFLOW; +``` + ## Values diff --git a/docs/models/operations/TranslationControllerUploadTranslationFilesResourceType.md b/docs/models/operations/TranslationControllerUploadTranslationFilesResourceType.md index bf6ad52b..4ad783f8 100644 --- a/docs/models/operations/TranslationControllerUploadTranslationFilesResourceType.md +++ b/docs/models/operations/TranslationControllerUploadTranslationFilesResourceType.md @@ -2,6 +2,14 @@ The resource type to associate localizations with +## Example Usage + +```java +import co.novu.models.operations.TranslationControllerUploadTranslationFilesResourceType; + +TranslationControllerUploadTranslationFilesResourceType value = TranslationControllerUploadTranslationFilesResourceType.WORKFLOW; +``` + ## Values diff --git a/docs/models/operations/WorkflowControllerGeneratePreviewRequest.md b/docs/models/operations/WorkflowControllerGeneratePreviewRequest.md new file mode 100644 index 00000000..978a3d80 --- /dev/null +++ b/docs/models/operations/WorkflowControllerGeneratePreviewRequest.md @@ -0,0 +1,11 @@ +# WorkflowControllerGeneratePreviewRequest + + +## Fields + +| Field | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `workflowId` | *String* | :heavy_check_mark: | N/A | +| `stepId` | *String* | :heavy_check_mark: | N/A | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [GeneratePreviewRequestDto](../../models/components/GeneratePreviewRequestDto.md) | :heavy_check_mark: | Preview generation details | \ No newline at end of file diff --git a/docs/models/operations/WorkflowControllerGeneratePreviewResponse.md b/docs/models/operations/WorkflowControllerGeneratePreviewResponse.md new file mode 100644 index 00000000..83841e46 --- /dev/null +++ b/docs/models/operations/WorkflowControllerGeneratePreviewResponse.md @@ -0,0 +1,12 @@ +# WorkflowControllerGeneratePreviewResponse + + +## Fields + +| Field | Type | Required | Description | +| -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- | +| `contentType` | *String* | :heavy_check_mark: | HTTP response content type for this operation | +| `statusCode` | *int* | :heavy_check_mark: | HTTP response status code for this operation | +| `rawResponse` | [HttpResponse\](https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpResponse.html) | :heavy_check_mark: | Raw HTTP response; suitable for custom response parsing | +| `generatePreviewResponseDto` | [Optional\](../../models/components/GeneratePreviewResponseDto.md) | :heavy_minus_sign: | Created | +| `headers` | Map\> | :heavy_check_mark: | N/A | \ No newline at end of file diff --git a/docs/sdks/activity/README.md b/docs/sdks/activity/README.md index b376b327..1d1718a8 100644 --- a/docs/sdks/activity/README.md +++ b/docs/sdks/activity/README.md @@ -4,7 +4,7 @@ ### Available Operations -* [track](#track) - Track activity and engagement events +* [track](#track) - Track provider activity and engagement events ## track @@ -37,7 +37,7 @@ public class Application { .call(); if (res.webhookResultDtos().isPresent()) { - // handle response + System.out.println(res.webhookResultDtos().get()); } } } diff --git a/docs/sdks/channelconnections/README.md b/docs/sdks/channelconnections/README.md index 589f1d94..aed9ad35 100644 --- a/docs/sdks/channelconnections/README.md +++ b/docs/sdks/channelconnections/README.md @@ -52,7 +52,7 @@ public class Application { .call(); if (res.listChannelConnectionsResponseDto().isPresent()) { - // handle response + System.out.println(res.listChannelConnectionsResponseDto().get()); } } } @@ -122,7 +122,7 @@ public class Application { .call(); if (res.getChannelConnectionResponseDto().isPresent()) { - // handle response + System.out.println(res.getChannelConnectionResponseDto().get()); } } } @@ -178,7 +178,7 @@ public class Application { .call(); if (res.getChannelConnectionResponseDto().isPresent()) { - // handle response + System.out.println(res.getChannelConnectionResponseDto().get()); } } } @@ -244,7 +244,7 @@ public class Application { .call(); if (res.getChannelConnectionResponseDto().isPresent()) { - // handle response + System.out.println(res.getChannelConnectionResponseDto().get()); } } } diff --git a/docs/sdks/channelendpoints/README.md b/docs/sdks/channelendpoints/README.md index 2aa81990..ca08f282 100644 --- a/docs/sdks/channelendpoints/README.md +++ b/docs/sdks/channelendpoints/README.md @@ -53,7 +53,7 @@ public class Application { .call(); if (res.listChannelEndpointsResponseDto().isPresent()) { - // handle response + System.out.println(res.listChannelEndpointsResponseDto().get()); } } } @@ -116,7 +116,7 @@ public class Application { .call(); if (res.getChannelEndpointResponseDto().isPresent()) { - // handle response + System.out.println(res.getChannelEndpointResponseDto().get()); } } } @@ -172,7 +172,7 @@ public class Application { .call(); if (res.getChannelEndpointResponseDto().isPresent()) { - // handle response + System.out.println(res.getChannelEndpointResponseDto().get()); } } } @@ -234,7 +234,7 @@ public class Application { .call(); if (res.getChannelEndpointResponseDto().isPresent()) { - // handle response + System.out.println(res.getChannelEndpointResponseDto().get()); } } } diff --git a/docs/sdks/contexts/README.md b/docs/sdks/contexts/README.md index f3a7a975..4ac43936 100644 --- a/docs/sdks/contexts/README.md +++ b/docs/sdks/contexts/README.md @@ -51,7 +51,7 @@ public class Application { .call(); if (res.getContextResponseDto().isPresent()) { - // handle response + System.out.println(res.getContextResponseDto().get()); } } } @@ -118,7 +118,7 @@ public class Application { .call(); if (res.listContextsResponseDto().isPresent()) { - // handle response + System.out.println(res.listContextsResponseDto().get()); } } } @@ -185,7 +185,7 @@ public class Application { .call(); if (res.getContextResponseDto().isPresent()) { - // handle response + System.out.println(res.getContextResponseDto().get()); } } } @@ -245,7 +245,7 @@ public class Application { .call(); if (res.getContextResponseDto().isPresent()) { - // handle response + System.out.println(res.getContextResponseDto().get()); } } } diff --git a/docs/sdks/credentials/README.md b/docs/sdks/credentials/README.md index f6a7f1f9..5ac4241c 100644 --- a/docs/sdks/credentials/README.md +++ b/docs/sdks/credentials/README.md @@ -54,7 +54,7 @@ public class Application { .call(); if (res.subscriberResponseDto().isPresent()) { - // handle response + System.out.println(res.subscriberResponseDto().get()); } } } diff --git a/docs/sdks/environments/README.md b/docs/sdks/environments/README.md index 8e079dfd..cd9b8b1b 100644 --- a/docs/sdks/environments/README.md +++ b/docs/sdks/environments/README.md @@ -7,11 +7,141 @@ Environments allow you to manage different stages of your application developmen ### Available Operations +* [diff](#diff) - Compare resources between environments +* [publish](#publish) - Publish resources to target environment * [create](#create) - Create an environment * [list](#list) - List all environments * [update](#update) - Update an environment * [delete](#delete) - Delete an environment +## diff + +Compares workflows and other resources between the source and target environments, returning detailed diff information including additions, modifications, and deletions. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.DiffEnvironmentRequestDto; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentsControllerDiffEnvironmentResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + EnvironmentsControllerDiffEnvironmentResponse res = sdk.environments().diff() + .targetEnvironmentId("6615943e7ace93b0540ae377") + .body(DiffEnvironmentRequestDto.builder() + .sourceEnvironmentId("507f1f77bcf86cd799439011") + .build()) + .call(); + + if (res.diffEnvironmentResponseDto().isPresent()) { + System.out.println(res.diffEnvironmentResponseDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `targetEnvironmentId` | *String* | :heavy_check_mark: | Target environment ID (MongoDB ObjectId) to compare against | 6615943e7ace93b0540ae377 | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | +| `body` | [DiffEnvironmentRequestDto](../../models/components/DiffEnvironmentRequestDto.md) | :heavy_check_mark: | Diff request configuration | | + +### Response + +**[EnvironmentsControllerDiffEnvironmentResponse](../../models/operations/EnvironmentsControllerDiffEnvironmentResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## publish + +Publishes all workflows and resources from the source environment to the target environment. Optionally specify specific resources to publish or use dryRun mode to preview changes. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.*; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentsControllerPublishEnvironmentResponse; +import java.lang.Exception; +import java.util.List; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + EnvironmentsControllerPublishEnvironmentResponse res = sdk.environments().publish() + .targetEnvironmentId("6615943e7ace93b0540ae377") + .body(PublishEnvironmentRequestDto.builder() + .sourceEnvironmentId("507f1f77bcf86cd799439011") + .resources(List.of( + ResourceToPublishDto.builder() + .resourceType(ResourceTypeEnum.REGULAR) + .resourceId("workflow-id-1") + .build())) + .build()) + .call(); + + if (res.publishEnvironmentResponseDto().isPresent()) { + System.out.println(res.publishEnvironmentResponseDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | +| `targetEnvironmentId` | *String* | :heavy_check_mark: | Target environment ID (MongoDB ObjectId) to publish resources to | 6615943e7ace93b0540ae377 | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | +| `body` | [PublishEnvironmentRequestDto](../../models/components/PublishEnvironmentRequestDto.md) | :heavy_check_mark: | Publish request configuration | | + +### Response + +**[EnvironmentsControllerPublishEnvironmentResponse](../../models/operations/EnvironmentsControllerPublishEnvironmentResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + ## create Creates a new environment within the current organization. @@ -48,7 +178,7 @@ public class Application { .call(); if (res.environmentResponseDto().isPresent()) { - // handle response + System.out.println(res.environmentResponseDto().get()); } } } @@ -104,7 +234,7 @@ public class Application { .call(); if (res.environmentResponseDtos().isPresent()) { - // handle response + System.out.println(res.environmentResponseDtos().get()); } } } @@ -163,7 +293,7 @@ public class Application { .call(); if (res.environmentResponseDto().isPresent()) { - // handle response + System.out.println(res.environmentResponseDto().get()); } } } diff --git a/docs/sdks/environmentvariables/README.md b/docs/sdks/environmentvariables/README.md new file mode 100644 index 00000000..6cacdb85 --- /dev/null +++ b/docs/sdks/environmentvariables/README.md @@ -0,0 +1,352 @@ +# EnvironmentVariables + +## Overview + +### Available Operations + +* [list](#list) - List all variables +* [create](#create) - Create a variable +* [retrieve](#retrieve) - Get environment variable +* [update](#update) - Update a variable +* [delete](#delete) - Delete environment variable +* [usage](#usage) - Retrieve a variable usage + +## list + +Returns all environment variables for the current organization. Secret values are masked. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerListEnvironmentVariablesResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + EnvironmentVariablesControllerListEnvironmentVariablesResponse res = sdk.environmentVariables().list() + .call(); + + if (res.environmentVariableResponseDtos().isPresent()) { + System.out.println(res.environmentVariableResponseDtos().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | -------------------------------------------------------- | +| `search` | *Optional\* | :heavy_minus_sign: | Filter variables by key (case-insensitive partial match) | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | + +### Response + +**[EnvironmentVariablesControllerListEnvironmentVariablesResponse](../../models/operations/EnvironmentVariablesControllerListEnvironmentVariablesResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## create + +Creates a new environment variable. Keys must be uppercase with underscores only (e.g. BASE_URL). Secret variables are encrypted at rest and masked in API responses. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.CreateEnvironmentVariableRequestDto; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerCreateEnvironmentVariableResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + EnvironmentVariablesControllerCreateEnvironmentVariableResponse res = sdk.environmentVariables().create() + .body(CreateEnvironmentVariableRequestDto.builder() + .key("") + .build()) + .call(); + + if (res.environmentVariableResponseDto().isPresent()) { + System.out.println(res.environmentVariableResponseDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [CreateEnvironmentVariableRequestDto](../../models/components/CreateEnvironmentVariableRequestDto.md) | :heavy_check_mark: | N/A | + +### Response + +**[EnvironmentVariablesControllerCreateEnvironmentVariableResponse](../../models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## retrieve + +Returns a single environment variable by key. Secret values are masked. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + EnvironmentVariablesControllerGetEnvironmentVariableResponse res = sdk.environmentVariables().retrieve() + .variableKey("BASE_URL") + .call(); + + if (res.environmentVariableResponseDto().isPresent()) { + System.out.println(res.environmentVariableResponseDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `variableKey` | *String* | :heavy_check_mark: | The unique key of the environment variable (e.g. BASE_URL) | BASE_URL | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | + +### Response + +**[EnvironmentVariablesControllerGetEnvironmentVariableResponse](../../models/operations/EnvironmentVariablesControllerGetEnvironmentVariableResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## update + +Updates an existing environment variable. Providing values replaces all existing per-environment values. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.UpdateEnvironmentVariableRequestDto; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerUpdateEnvironmentVariableResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + EnvironmentVariablesControllerUpdateEnvironmentVariableResponse res = sdk.environmentVariables().update() + .variableKey("BASE_URL") + .body(UpdateEnvironmentVariableRequestDto.builder() + .build()) + .call(); + + if (res.environmentVariableResponseDto().isPresent()) { + System.out.println(res.environmentVariableResponseDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `variableKey` | *String* | :heavy_check_mark: | The unique key of the environment variable (e.g. BASE_URL) | BASE_URL | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | +| `body` | [UpdateEnvironmentVariableRequestDto](../../models/components/UpdateEnvironmentVariableRequestDto.md) | :heavy_check_mark: | N/A | | + +### Response + +**[EnvironmentVariablesControllerUpdateEnvironmentVariableResponse](../../models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## delete + +Deletes an environment variable by key. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerDeleteEnvironmentVariableResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + EnvironmentVariablesControllerDeleteEnvironmentVariableResponse res = sdk.environmentVariables().delete() + .variableKey("BASE_URL") + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `variableKey` | *String* | :heavy_check_mark: | The unique key of the environment variable (e.g. BASE_URL) | BASE_URL | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | + +### Response + +**[EnvironmentVariablesControllerDeleteEnvironmentVariableResponse](../../models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## usage + +Returns the workflows that reference this environment variable via `{{env.KEY}}` in their step controls. **variableId** is required. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse res = sdk.environmentVariables().usage() + .variableKey("BASE_URL") + .call(); + + if (res.getEnvironmentVariableUsageResponseDto().isPresent()) { + System.out.println(res.getEnvironmentVariableUsageResponseDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | ---------------------------------------------------------- | +| `variableKey` | *String* | :heavy_check_mark: | The unique key of the environment variable (e.g. BASE_URL) | BASE_URL | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | + +### Response + +**[EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse](../../models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| --------------------------------- | --------------------------------- | --------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/docs/sdks/integrations/README.md b/docs/sdks/integrations/README.md index 81f187b9..645e6b99 100644 --- a/docs/sdks/integrations/README.md +++ b/docs/sdks/integrations/README.md @@ -44,7 +44,7 @@ public class Application { .call(); if (res.integrationResponseDtos().isPresent()) { - // handle response + System.out.println(res.integrationResponseDtos().get()); } } } @@ -105,7 +105,7 @@ public class Application { .call(); if (res.integrationResponseDto().isPresent()) { - // handle response + System.out.println(res.integrationResponseDto().get()); } } } @@ -165,7 +165,7 @@ public class Application { .call(); if (res.integrationResponseDto().isPresent()) { - // handle response + System.out.println(res.integrationResponseDto().get()); } } } @@ -223,7 +223,7 @@ public class Application { .call(); if (res.integrationResponseDtos().isPresent()) { - // handle response + System.out.println(res.integrationResponseDtos().get()); } } } @@ -280,7 +280,7 @@ public class Application { .call(); if (res.autoConfigureIntegrationResponseDto().isPresent()) { - // handle response + System.out.println(res.autoConfigureIntegrationResponseDto().get()); } } } @@ -338,7 +338,7 @@ public class Application { .call(); if (res.integrationResponseDto().isPresent()) { - // handle response + System.out.println(res.integrationResponseDto().get()); } } } @@ -393,7 +393,7 @@ public class Application { .call(); if (res.integrationResponseDtos().isPresent()) { - // handle response + System.out.println(res.integrationResponseDtos().get()); } } } @@ -468,7 +468,7 @@ public class Application { .call(); if (res.generateChatOAuthUrlResponseDto().isPresent()) { - // handle response + System.out.println(res.generateChatOAuthUrlResponseDto().get()); } } } diff --git a/docs/sdks/layouts/README.md b/docs/sdks/layouts/README.md index e8542ca8..6bad2dc2 100644 --- a/docs/sdks/layouts/README.md +++ b/docs/sdks/layouts/README.md @@ -49,7 +49,7 @@ public class Application { .call(); if (res.layoutResponseDto().isPresent()) { - // handle response + System.out.println(res.layoutResponseDto().get()); } } } @@ -111,7 +111,7 @@ public class Application { .call(); if (res.listLayoutResponseDto().isPresent()) { - // handle response + System.out.println(res.listLayoutResponseDto().get()); } } } @@ -170,7 +170,7 @@ public class Application { .call(); if (res.layoutResponseDto().isPresent()) { - // handle response + System.out.println(res.layoutResponseDto().get()); } } } @@ -227,7 +227,7 @@ public class Application { .call(); if (res.layoutResponseDto().isPresent()) { - // handle response + System.out.println(res.layoutResponseDto().get()); } } } @@ -341,7 +341,7 @@ public class Application { .call(); if (res.layoutResponseDto().isPresent()) { - // handle response + System.out.println(res.layoutResponseDto().get()); } } } @@ -424,7 +424,7 @@ public class Application { .call(); if (res.generateLayoutPreviewResponseDto().isPresent()) { - // handle response + System.out.println(res.generateLayoutPreviewResponseDto().get()); } } } @@ -481,7 +481,7 @@ public class Application { .call(); if (res.getLayoutUsageResponseDto().isPresent()) { - // handle response + System.out.println(res.getLayoutUsageResponseDto().get()); } } } diff --git a/docs/sdks/messages/README.md b/docs/sdks/messages/README.md index 6063db6a..b2dab8a4 100644 --- a/docs/sdks/messages/README.md +++ b/docs/sdks/messages/README.md @@ -50,7 +50,7 @@ public class Application { .call(); if (res.messagesResponseDto().isPresent()) { - // handle response + System.out.println(res.messagesResponseDto().get()); } } } @@ -106,7 +106,7 @@ public class Application { .call(); if (res.deleteMessageResponseDto().isPresent()) { - // handle response + System.out.println(res.deleteMessageResponseDto().get()); } } } diff --git a/docs/sdks/notifications/README.md b/docs/sdks/notifications/README.md index b72c1dee..0ff92249 100644 --- a/docs/sdks/notifications/README.md +++ b/docs/sdks/notifications/README.md @@ -43,7 +43,7 @@ public class Application { .call(); if (res.activitiesResponseDto().isPresent()) { - // handle response + System.out.println(res.activitiesResponseDto().get()); } } } @@ -100,7 +100,7 @@ public class Application { .call(); if (res.activityNotificationResponseDto().isPresent()) { - // handle response + System.out.println(res.activityNotificationResponseDto().get()); } } } diff --git a/docs/sdks/novu/README.md b/docs/sdks/novu/README.md index 41292f9e..6ae66f6a 100644 --- a/docs/sdks/novu/README.md +++ b/docs/sdks/novu/README.md @@ -57,7 +57,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -117,7 +117,7 @@ public class Application { .call(); if (res.boolean_().isPresent()) { - // handle response + System.out.println(res.boolean_().get()); } } } @@ -200,7 +200,7 @@ public class Application { .call(); if (res.triggerEventResponseDto().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDto().get()); } } } @@ -286,7 +286,7 @@ public class Application { .call(); if (res.triggerEventResponseDtos().isPresent()) { - // handle response + System.out.println(res.triggerEventResponseDtos().get()); } } } diff --git a/docs/sdks/preferences/README.md b/docs/sdks/preferences/README.md index de3241c2..d2909300 100644 --- a/docs/sdks/preferences/README.md +++ b/docs/sdks/preferences/README.md @@ -42,7 +42,7 @@ public class Application { .call(); if (res.getSubscriberPreferencesDto().isPresent()) { - // handle response + System.out.println(res.getSubscriberPreferencesDto().get()); } } } @@ -52,7 +52,7 @@ public class Application { | Parameter | Type | Required | Description | Example | | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | ---------------------------------------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | | `criticality` | [Optional\](../../models/operations/Criticality.md) | :heavy_minus_sign: | N/A | | | `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering preferences (e.g., ["tenant:acme"]) | [
"tenant:acme"
] | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | @@ -110,7 +110,7 @@ public class Application { .call(); if (res.getPreferencesResponseDtos().isPresent()) { - // handle response + System.out.println(res.getPreferencesResponseDtos().get()); } } } @@ -120,7 +120,7 @@ public class Application { | Parameter | Type | Required | Description | | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | `body` | [BulkUpdateSubscriberPreferencesDto](../../models/components/BulkUpdateSubscriberPreferencesDto.md) | :heavy_check_mark: | N/A | diff --git a/docs/sdks/steps/README.md b/docs/sdks/steps/README.md index 0484b0b1..a641bf92 100644 --- a/docs/sdks/steps/README.md +++ b/docs/sdks/steps/README.md @@ -36,7 +36,7 @@ public class Application { .call(); if (res.stepResponseDto().isPresent()) { - // handle response + System.out.println(res.stepResponseDto().get()); } } } diff --git a/docs/sdks/subscribers/README.md b/docs/sdks/subscribers/README.md index 5fa94aef..a29ca102 100644 --- a/docs/sdks/subscribers/README.md +++ b/docs/sdks/subscribers/README.md @@ -53,7 +53,7 @@ public class Application { .call(); if (res.listSubscribersResponseDto().isPresent()) { - // handle response + System.out.println(res.listSubscribersResponseDto().get()); } } } @@ -118,7 +118,7 @@ public class Application { .call(); if (res.subscriberResponseDto().isPresent()) { - // handle response + System.out.println(res.subscriberResponseDto().get()); } } } @@ -177,7 +177,7 @@ public class Application { .call(); if (res.subscriberResponseDto().isPresent()) { - // handle response + System.out.println(res.subscriberResponseDto().get()); } } } @@ -187,7 +187,7 @@ public class Application { | Parameter | Type | Required | Description | | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | ### Response @@ -244,7 +244,7 @@ public class Application { .call(); if (res.subscriberResponseDto().isPresent()) { - // handle response + System.out.println(res.subscriberResponseDto().get()); } } } @@ -254,7 +254,7 @@ public class Application { | Parameter | Type | Required | Description | | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | `body` | [PatchSubscriberRequestDto](../../models/components/PatchSubscriberRequestDto.md) | :heavy_check_mark: | N/A | @@ -302,7 +302,7 @@ public class Application { .call(); if (res.removeSubscriberResponseDto().isPresent()) { - // handle response + System.out.println(res.removeSubscriberResponseDto().get()); } } } @@ -312,7 +312,7 @@ public class Application { | Parameter | Type | Required | Description | | --------------------------------- | --------------------------------- | --------------------------------- | --------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | ### Response @@ -364,7 +364,7 @@ public class Application { .call(); if (res.bulkCreateSubscriberResponseDto().isPresent()) { - // handle response + System.out.println(res.bulkCreateSubscriberResponseDto().get()); } } } @@ -490,7 +490,7 @@ public class Application { .call(); if (res.getSubscriberPreferencesDto().isPresent()) { - // handle response + System.out.println(res.getSubscriberPreferencesDto().get()); } } } @@ -500,7 +500,7 @@ public class Application { | Parameter | Type | Required | Description | | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | `body` | [PatchSubscriberPreferencesDto](../../models/components/PatchSubscriberPreferencesDto.md) | :heavy_check_mark: | N/A | @@ -566,7 +566,7 @@ public class Application { .call(); if (res.subscriberResponseDto().isPresent()) { - // handle response + System.out.println(res.subscriberResponseDto().get()); } } } @@ -685,7 +685,7 @@ public class Application { .call(); if (res.number().isPresent()) { - // handle response + System.out.println(res.number().get()); } } } diff --git a/docs/sdks/subscribersmessages1/README.md b/docs/sdks/subscribersmessages1/README.md index 5e5e5313..069b8d34 100644 --- a/docs/sdks/subscribersmessages1/README.md +++ b/docs/sdks/subscribersmessages1/README.md @@ -48,7 +48,7 @@ public class Application { .call(); if (res.messageResponseDto().isPresent()) { - // handle response + System.out.println(res.messageResponseDto().get()); } } } diff --git a/docs/sdks/subscribersmessages2/README.md b/docs/sdks/subscribersmessages2/README.md index b349f6f2..7493615d 100644 --- a/docs/sdks/subscribersmessages2/README.md +++ b/docs/sdks/subscribersmessages2/README.md @@ -42,7 +42,7 @@ public class Application { .call(); if (res.messageResponseDtos().isPresent()) { - // handle response + System.out.println(res.messageResponseDtos().get()); } } } diff --git a/docs/sdks/subscribersnotifications1/README.md b/docs/sdks/subscribersnotifications1/README.md index f743de8f..69ace30e 100644 --- a/docs/sdks/subscribersnotifications1/README.md +++ b/docs/sdks/subscribersnotifications1/README.md @@ -1,26 +1,43 @@ -# SubscribersNotifications +# Subscribers.Notifications ## Overview ### Available Operations -* [getFeed](#getfeed) - Retrieve subscriber notifications +* [list](#list) - Retrieve subscriber notifications +* [delete](#delete) - Delete a notification +* [completeAction](#completeaction) - Complete a notification action +* [revertAction](#revertaction) - Revert a notification action +* [archive](#archive) - Archive a notification +* [markAsRead](#markasread) - Mark a notification as read +* [snooze](#snooze) - Snooze a notification +* [unarchive](#unarchive) - Unarchive a notification +* [markAsUnread](#markasunread) - Mark a notification as unread +* [unsnooze](#unsnooze) - Unsnooze a notification +* [archiveAll](#archiveall) - Archive all notifications +* [count](#count) - Retrieve subscriber notifications count +* [deleteAll](#deleteall) - Delete all notifications +* [markAllAsRead](#markallasread) - Mark all notifications as read +* [archiveAllRead](#archiveallread) - Archive all read notifications +* [markAsSeen](#markasseen) - Mark notifications as seen +* [getUnseenCount](#getunseencount) - Retrieve unseen notifications count -## getFeed +## list -Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. +Retrieve in-app (inbox) notifications for a subscriber by its unique key identifier **subscriberId**. + Supports filtering by tags, read/archived/snoozed/seen state, data attributes, severity, date range, and context keys. ### Example Usage - + ```java package hello.world; import co.novu.Novu; import co.novu.models.errors.ErrorDto; import co.novu.models.errors.ValidationErrorDto; -import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedRequest; -import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedResponse; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsRequest; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsResponse; import java.lang.Exception; public class Application { @@ -31,18 +48,19 @@ public class Application { .secretKey("YOUR_SECRET_KEY_HERE") .build(); - SubscribersV1ControllerGetNotificationsFeedRequest req = SubscribersV1ControllerGetNotificationsFeedRequest.builder() + SubscribersControllerGetSubscriberNotificationsRequest req = SubscribersControllerGetSubscriberNotificationsRequest.builder() .subscriberId("") - .page(0d) - .payload("btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=") + .offset(0d) + .createdGte(1704067200000d) + .createdLte(1735689599999d) .build(); - SubscribersV1ControllerGetNotificationsFeedResponse res = sdk.subscribersNotifications().getFeed() + SubscribersControllerGetSubscriberNotificationsResponse res = sdk.subscribers().notifications().list() .request(req) .call(); - if (res.feedResponseDto().isPresent()) { - // handle response + if (res.getSubscriberNotificationsResponseDto().isPresent()) { + System.out.println(res.getSubscriberNotificationsResponseDto().get()); } } } @@ -50,13 +68,962 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | -| `request` | [SubscribersV1ControllerGetNotificationsFeedRequest](../../models/operations/SubscribersV1ControllerGetNotificationsFeedRequest.md) | :heavy_check_mark: | The request object to use for the request. | +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [SubscribersControllerGetSubscriberNotificationsRequest](../../models/operations/SubscribersControllerGetSubscriberNotificationsRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[SubscribersV1ControllerGetNotificationsFeedResponse](../../models/operations/SubscribersV1ControllerGetNotificationsFeedResponse.md)** +**[SubscribersControllerGetSubscriberNotificationsResponse](../../models/operations/SubscribersControllerGetSubscriberNotificationsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## delete + +Delete a specific in-app (inbox) notification permanently by its unique identifier **notificationId**. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerDeleteNotificationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerDeleteNotificationResponse res = sdk.subscribers().notifications().delete() + .subscriberId("") + .notificationId("") + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | + +### Response + +**[SubscribersControllerDeleteNotificationResponse](../../models/operations/SubscribersControllerDeleteNotificationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## completeAction + +Mark a single in-app (inbox) notification's action (primary or secondary) as completed by its unique identifier **notificationId** and action type **actionType**. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.*; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerCompleteNotificationActionRequest req = SubscribersControllerCompleteNotificationActionRequest.builder() + .subscriberId("") + .notificationId("") + .actionType(SubscribersControllerCompleteNotificationActionActionType.SECONDARY) + .build(); + + SubscribersControllerCompleteNotificationActionResponse res = sdk.subscribers().notifications().completeAction() + .request(req) + .call(); + + if (res.inboxNotificationDto().isPresent()) { + System.out.println(res.inboxNotificationDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [SubscribersControllerCompleteNotificationActionRequest](../../models/operations/SubscribersControllerCompleteNotificationActionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SubscribersControllerCompleteNotificationActionResponse](../../models/operations/SubscribersControllerCompleteNotificationActionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## revertAction + +Revert a single in-app (inbox) notification's action (primary or secondary) to pending state by its unique identifier **notificationId** and action type **actionType**. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.*; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerRevertNotificationActionRequest req = SubscribersControllerRevertNotificationActionRequest.builder() + .subscriberId("") + .notificationId("") + .actionType(SubscribersControllerRevertNotificationActionActionType.PRIMARY) + .build(); + + SubscribersControllerRevertNotificationActionResponse res = sdk.subscribers().notifications().revertAction() + .request(req) + .call(); + + if (res.inboxNotificationDto().isPresent()) { + System.out.println(res.inboxNotificationDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [SubscribersControllerRevertNotificationActionRequest](../../models/operations/SubscribersControllerRevertNotificationActionRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SubscribersControllerRevertNotificationActionResponse](../../models/operations/SubscribersControllerRevertNotificationActionResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## archive + +Archive a specific in-app (inbox) notification by its unique identifier **notificationId**. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerArchiveNotificationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerArchiveNotificationResponse res = sdk.subscribers().notifications().archive() + .subscriberId("") + .notificationId("") + .call(); + + if (res.inboxNotificationDto().isPresent()) { + System.out.println(res.inboxNotificationDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | + +### Response + +**[SubscribersControllerArchiveNotificationResponse](../../models/operations/SubscribersControllerArchiveNotificationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## markAsRead + +Mark a specific in-app (inbox) notification as read by its unique identifier **notificationId**. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsReadResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerMarkNotificationAsReadResponse res = sdk.subscribers().notifications().markAsRead() + .subscriberId("") + .notificationId("") + .call(); + + if (res.inboxNotificationDto().isPresent()) { + System.out.println(res.inboxNotificationDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | + +### Response + +**[SubscribersControllerMarkNotificationAsReadResponse](../../models/operations/SubscribersControllerMarkNotificationAsReadResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## snooze + +Snooze a specific in-app (inbox) notification by its unique identifier **notificationId** until a specified time. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.SnoozeSubscriberNotificationDto; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerSnoozeNotificationRequest; +import co.novu.models.operations.SubscribersControllerSnoozeNotificationResponse; +import java.lang.Exception; +import java.time.OffsetDateTime; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerSnoozeNotificationRequest req = SubscribersControllerSnoozeNotificationRequest.builder() + .subscriberId("") + .notificationId("") + .body(SnoozeSubscriberNotificationDto.builder() + .snoozeUntil(OffsetDateTime.parse("2026-03-01T10:00:00Z")) + .build()) + .build(); + + SubscribersControllerSnoozeNotificationResponse res = sdk.subscribers().notifications().snooze() + .request(req) + .call(); + + if (res.inboxNotificationDto().isPresent()) { + System.out.println(res.inboxNotificationDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- | +| `request` | [SubscribersControllerSnoozeNotificationRequest](../../models/operations/SubscribersControllerSnoozeNotificationRequest.md) | :heavy_check_mark: | The request object to use for the request. | + +### Response + +**[SubscribersControllerSnoozeNotificationResponse](../../models/operations/SubscribersControllerSnoozeNotificationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## unarchive + +Unarchive a specific in-app (inbox) notification by its unique identifier **notificationId**. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerUnarchiveNotificationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerUnarchiveNotificationResponse res = sdk.subscribers().notifications().unarchive() + .subscriberId("") + .notificationId("") + .call(); + + if (res.inboxNotificationDto().isPresent()) { + System.out.println(res.inboxNotificationDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | + +### Response + +**[SubscribersControllerUnarchiveNotificationResponse](../../models/operations/SubscribersControllerUnarchiveNotificationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## markAsUnread + +Mark a specific in-app (inbox) notification as unread by its unique identifier **notificationId**. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsUnreadResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerMarkNotificationAsUnreadResponse res = sdk.subscribers().notifications().markAsUnread() + .subscriberId("") + .notificationId("") + .call(); + + if (res.inboxNotificationDto().isPresent()) { + System.out.println(res.inboxNotificationDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | + +### Response + +**[SubscribersControllerMarkNotificationAsUnreadResponse](../../models/operations/SubscribersControllerMarkNotificationAsUnreadResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## unsnooze + +Unsnooze a specific in-app (inbox) notification by its unique identifier **notificationId**. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerUnsnoozeNotificationResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerUnsnoozeNotificationResponse res = sdk.subscribers().notifications().unsnooze() + .subscriberId("") + .notificationId("") + .call(); + + if (res.inboxNotificationDto().isPresent()) { + System.out.println(res.inboxNotificationDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------- | ---------------------------------- | ---------------------------------- | ---------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `notificationId` | *String* | :heavy_check_mark: | The identifier of the notification | +| `contextKeys` | List\<*String*> | :heavy_minus_sign: | Context keys for filtering | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | + +### Response + +**[SubscribersControllerUnsnoozeNotificationResponse](../../models/operations/SubscribersControllerUnsnoozeNotificationResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## archiveAll + +Archive all in-app (inbox) notifications matching the specified filters. Supports context-based filtering. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerArchiveAllNotificationsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerArchiveAllNotificationsResponse res = sdk.subscribers().notifications().archiveAll() + .subscriberId("") + .body(UpdateAllSubscriberNotificationsDto.builder() + .build()) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [UpdateAllSubscriberNotificationsDto](../../models/components/UpdateAllSubscriberNotificationsDto.md) | :heavy_check_mark: | N/A | + +### Response + +**[SubscribersControllerArchiveAllNotificationsResponse](../../models/operations/SubscribersControllerArchiveAllNotificationsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## count + +Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier **subscriberId**. + Supports multiple filters to count in-app (inbox) notifications by different criteria, including context keys. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsCountResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerGetSubscriberNotificationsCountResponse res = sdk.subscribers().notifications().count() + .subscriberId("") + .filters("[{\"read\":false,\"archived\":false},{\"tags\":[\"important\"]},{\"tags\":{\"and\":[{\"or\":[\"a\",\"b\"]},{\"or\":[\"c\"]}]}}]") + .call(); + + if (res.getSubscriberNotificationsCountResponseDtos().isPresent()) { + System.out.println(res.getSubscriberNotificationsCountResponseDtos().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | Example | +| --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | | +| `filters` | *String* | :heavy_check_mark: | Array of filter objects (max 30) to count notifications by different criteria | [{"read":false,"archived":false},{"tags":["important"]},{"tags":{"and":[{"or":["a","b"]},{"or":["c"]}]}}] | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | | + +### Response + +**[SubscribersControllerGetSubscriberNotificationsCountResponse](../../models/operations/SubscribersControllerGetSubscriberNotificationsCountResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## deleteAll + +Permanently delete all in-app (inbox) notifications matching the specified filters. Supports context-based filtering. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerDeleteAllNotificationsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerDeleteAllNotificationsResponse res = sdk.subscribers().notifications().deleteAll() + .subscriberId("") + .body(UpdateAllSubscriberNotificationsDto.builder() + .build()) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [UpdateAllSubscriberNotificationsDto](../../models/components/UpdateAllSubscriberNotificationsDto.md) | :heavy_check_mark: | N/A | + +### Response + +**[SubscribersControllerDeleteAllNotificationsResponse](../../models/operations/SubscribersControllerDeleteAllNotificationsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## markAllAsRead + +Mark all in-app (inbox) notifications matching the specified filters as read. Supports context-based filtering. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerMarkAllNotificationsAsReadResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerMarkAllNotificationsAsReadResponse res = sdk.subscribers().notifications().markAllAsRead() + .subscriberId("") + .body(UpdateAllSubscriberNotificationsDto.builder() + .build()) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [UpdateAllSubscriberNotificationsDto](../../models/components/UpdateAllSubscriberNotificationsDto.md) | :heavy_check_mark: | N/A | + +### Response + +**[SubscribersControllerMarkAllNotificationsAsReadResponse](../../models/operations/SubscribersControllerMarkAllNotificationsAsReadResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## archiveAllRead + +Archive all read in-app (inbox) notifications matching the specified filters. Supports context-based filtering. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerArchiveAllReadNotificationsResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerArchiveAllReadNotificationsResponse res = sdk.subscribers().notifications().archiveAllRead() + .subscriberId("") + .body(UpdateAllSubscriberNotificationsDto.builder() + .build()) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [UpdateAllSubscriberNotificationsDto](../../models/components/UpdateAllSubscriberNotificationsDto.md) | :heavy_check_mark: | N/A | + +### Response + +**[SubscribersControllerArchiveAllReadNotificationsResponse](../../models/operations/SubscribersControllerArchiveAllReadNotificationsResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## markAsSeen + +Mark specific and multiple in-app (inbox) notifications as seen. Supports context-based filtering. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.MarkSubscriberNotificationsAsSeenDto; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerMarkNotificationsAsSeenResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersControllerMarkNotificationsAsSeenResponse res = sdk.subscribers().notifications().markAsSeen() + .subscriberId("") + .body(MarkSubscriberNotificationsAsSeenDto.builder() + .build()) + .call(); + + // handle response + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | The identifier of the subscriber | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [MarkSubscriberNotificationsAsSeenDto](../../models/components/MarkSubscriberNotificationsAsSeenDto.md) | :heavy_check_mark: | N/A | + +### Response + +**[SubscribersControllerMarkNotificationsAsSeenResponse](../../models/operations/SubscribersControllerMarkNotificationsAsSeenResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | + +## getUnseenCount + +Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier **subscriberId**. + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersV1ControllerGetUnseenCountResponse; +import java.lang.Exception; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + SubscribersV1ControllerGetUnseenCountResponse res = sdk.subscribers().notifications().getUnseenCount() + .subscriberId("") + .seen(false) + .limit(100d) + .call(); + + if (res.unseenCountResponse().isPresent()) { + System.out.println(res.unseenCountResponse().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | +| `subscriberId` | *String* | :heavy_check_mark: | N/A | +| `seen` | *Optional\* | :heavy_minus_sign: | Indicates whether to count seen notifications. | +| `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of notifications to return. | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | + +### Response + +**[SubscribersV1ControllerGetUnseenCountResponse](../../models/operations/SubscribersV1ControllerGetUnseenCountResponse.md)** ### Errors diff --git a/docs/sdks/subscribersnotifications2/README.md b/docs/sdks/subscribersnotifications2/README.md index 23b7343c..f531b935 100644 --- a/docs/sdks/subscribersnotifications2/README.md +++ b/docs/sdks/subscribersnotifications2/README.md @@ -1,25 +1,26 @@ -# Subscribers.Notifications +# SubscribersNotifications ## Overview ### Available Operations -* [getUnseenCount](#getunseencount) - Retrieve unseen notifications count +* [getFeed](#getfeed) - Retrieve subscriber notifications -## getUnseenCount +## getFeed -Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier **subscriberId**. +Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. ### Example Usage - + ```java package hello.world; import co.novu.Novu; import co.novu.models.errors.ErrorDto; import co.novu.models.errors.ValidationErrorDto; -import co.novu.models.operations.SubscribersV1ControllerGetUnseenCountResponse; +import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedRequest; +import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedResponse; import java.lang.Exception; public class Application { @@ -30,14 +31,18 @@ public class Application { .secretKey("YOUR_SECRET_KEY_HERE") .build(); - SubscribersV1ControllerGetUnseenCountResponse res = sdk.subscribers().notifications().getUnseenCount() + SubscribersV1ControllerGetNotificationsFeedRequest req = SubscribersV1ControllerGetNotificationsFeedRequest.builder() .subscriberId("") - .seen(false) - .limit(100d) + .page(0d) + .payload("btoa(JSON.stringify({ foo: 123 })) results in base64 encoded string like eyJmb28iOjEyM30=") + .build(); + + SubscribersV1ControllerGetNotificationsFeedResponse res = sdk.subscribersNotifications().getFeed() + .request(req) .call(); - if (res.unseenCountResponse().isPresent()) { - // handle response + if (res.feedResponseDto().isPresent()) { + System.out.println(res.feedResponseDto().get()); } } } @@ -45,16 +50,13 @@ public class Application { ### Parameters -| Parameter | Type | Required | Description | -| ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | ---------------------------------------------- | -| `subscriberId` | *String* | :heavy_check_mark: | N/A | -| `seen` | *Optional\* | :heavy_minus_sign: | Indicates whether to count seen notifications. | -| `limit` | *Optional\* | :heavy_minus_sign: | The maximum number of notifications to return. | -| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| Parameter | Type | Required | Description | +| ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | +| `request` | [SubscribersV1ControllerGetNotificationsFeedRequest](../../models/operations/SubscribersV1ControllerGetNotificationsFeedRequest.md) | :heavy_check_mark: | The request object to use for the request. | ### Response -**[SubscribersV1ControllerGetUnseenCountResponse](../../models/operations/SubscribersV1ControllerGetUnseenCountResponse.md)** +**[SubscribersV1ControllerGetNotificationsFeedResponse](../../models/operations/SubscribersV1ControllerGetNotificationsFeedResponse.md)** ### Errors diff --git a/docs/sdks/subscribersproperties/README.md b/docs/sdks/subscribersproperties/README.md index c535587d..a020a45a 100644 --- a/docs/sdks/subscribersproperties/README.md +++ b/docs/sdks/subscribersproperties/README.md @@ -39,7 +39,7 @@ public class Application { .call(); if (res.subscriberResponseDto().isPresent()) { - // handle response + System.out.println(res.subscriberResponseDto().get()); } } } diff --git a/docs/sdks/subscriberstopics/README.md b/docs/sdks/subscriberstopics/README.md index f7b0aaba..20c15ac0 100644 --- a/docs/sdks/subscriberstopics/README.md +++ b/docs/sdks/subscriberstopics/README.md @@ -46,7 +46,7 @@ public class Application { .call(); if (res.listTopicSubscriptionsResponseDto().isPresent()) { - // handle response + System.out.println(res.listTopicSubscriptionsResponseDto().get()); } } } diff --git a/docs/sdks/subscriptions/README.md b/docs/sdks/subscriptions/README.md index 7bacb7be..67deea65 100644 --- a/docs/sdks/subscriptions/README.md +++ b/docs/sdks/subscriptions/README.md @@ -48,7 +48,7 @@ public class Application { .call(); if (res.listTopicSubscriptionsResponseDto().isPresent()) { - // handle response + System.out.println(res.listTopicSubscriptionsResponseDto().get()); } } } @@ -118,7 +118,7 @@ public class Application { .call(); if (res.deleteTopicSubscriptionsResponseDto().isPresent()) { - // handle response + System.out.println(res.deleteTopicSubscriptionsResponseDto().get()); } } } @@ -191,7 +191,7 @@ public class Application { .call(); if (res.subscriptionResponseDto().isPresent()) { - // handle response + System.out.println(res.subscriptionResponseDto().get()); } } } diff --git a/docs/sdks/tags/README.md b/docs/sdks/tags/README.md index 81c64ed9..5d5a5f96 100644 --- a/docs/sdks/tags/README.md +++ b/docs/sdks/tags/README.md @@ -35,7 +35,7 @@ public class Application { .call(); if (res.getEnvironmentTagsDtos().isPresent()) { - // handle response + System.out.println(res.getEnvironmentTagsDtos().get()); } } } diff --git a/docs/sdks/topics/README.md b/docs/sdks/topics/README.md index e92ec42a..2641efea 100644 --- a/docs/sdks/topics/README.md +++ b/docs/sdks/topics/README.md @@ -51,7 +51,7 @@ public class Application { .call(); if (res.listTopicsResponseDto().isPresent()) { - // handle response + System.out.println(res.listTopicsResponseDto().get()); } } } @@ -109,7 +109,7 @@ public class Application { .call(); if (res.topicResponseDto().isPresent()) { - // handle response + System.out.println(res.topicResponseDto().get()); } } } @@ -167,7 +167,7 @@ public class Application { .call(); if (res.topicResponseDto().isPresent()) { - // handle response + System.out.println(res.topicResponseDto().get()); } } } @@ -227,7 +227,7 @@ public class Application { .call(); if (res.topicResponseDto().isPresent()) { - // handle response + System.out.println(res.topicResponseDto().get()); } } } @@ -285,7 +285,7 @@ public class Application { .call(); if (res.deleteTopicResponseDto().isPresent()) { - // handle response + System.out.println(res.deleteTopicResponseDto().get()); } } } @@ -368,7 +368,7 @@ public class Application { .call(); if (res.createSubscriptionsResponseDto().isPresent()) { - // handle response + System.out.println(res.createSubscriptionsResponseDto().get()); } } } @@ -426,7 +426,7 @@ public class Application { .call(); if (res.subscriptionDetailsResponseDto().isPresent()) { - // handle response + System.out.println(res.subscriptionDetailsResponseDto().get()); } } } diff --git a/docs/sdks/topicssubscribers/README.md b/docs/sdks/topicssubscribers/README.md index 847d737d..144f1e26 100644 --- a/docs/sdks/topicssubscribers/README.md +++ b/docs/sdks/topicssubscribers/README.md @@ -36,7 +36,7 @@ public class Application { .call(); if (res.topicSubscriberDto().isPresent()) { - // handle response + System.out.println(res.topicSubscriberDto().get()); } } } diff --git a/docs/sdks/translations/README.md b/docs/sdks/translations/README.md index 34cdbe0e..1aca2b5d 100644 --- a/docs/sdks/translations/README.md +++ b/docs/sdks/translations/README.md @@ -54,7 +54,7 @@ public class Application { .call(); if (res.translationResponseDto().isPresent()) { - // handle response + System.out.println(res.translationResponseDto().get()); } } } @@ -107,7 +107,7 @@ public class Application { .call(); if (res.translationResponseDto().isPresent()) { - // handle response + System.out.println(res.translationResponseDto().get()); } } } @@ -317,7 +317,7 @@ public class Application { .call(); if (res.translationGroupDto().isPresent()) { - // handle response + System.out.println(res.translationGroupDto().get()); } } } @@ -368,7 +368,7 @@ public class Application { .call(); if (res.getMasterJsonResponseDto().isPresent()) { - // handle response + System.out.println(res.getMasterJsonResponseDto().get()); } } } @@ -430,7 +430,7 @@ public class Application { .call(); if (res.importMasterJsonResponseDto().isPresent()) { - // handle response + System.out.println(res.importMasterJsonResponseDto().get()); } } } diff --git a/docs/sdks/workflows/README.md b/docs/sdks/workflows/README.md index 2f15f645..2d38124c 100644 --- a/docs/sdks/workflows/README.md +++ b/docs/sdks/workflows/README.md @@ -73,7 +73,7 @@ public class Application { .call(); if (res.workflowResponseDto().isPresent()) { - // handle response + System.out.println(res.workflowResponseDto().get()); } } } @@ -135,7 +135,7 @@ public class Application { .call(); if (res.listWorkflowResponse().isPresent()) { - // handle response + System.out.println(res.listWorkflowResponse().get()); } } } @@ -220,7 +220,7 @@ public class Application { .call(); if (res.workflowResponseDto().isPresent()) { - // handle response + System.out.println(res.workflowResponseDto().get()); } } } @@ -277,7 +277,7 @@ public class Application { .call(); if (res.workflowResponseDto().isPresent()) { - // handle response + System.out.println(res.workflowResponseDto().get()); } } } @@ -391,7 +391,7 @@ public class Application { .call(); if (res.workflowResponseDto().isPresent()) { - // handle response + System.out.println(res.workflowResponseDto().get()); } } } @@ -452,7 +452,7 @@ public class Application { .call(); if (res.workflowResponseDto().isPresent()) { - // handle response + System.out.println(res.workflowResponseDto().get()); } } } diff --git a/docs/sdks/workflowssteps/README.md b/docs/sdks/workflowssteps/README.md new file mode 100644 index 00000000..a8998cb1 --- /dev/null +++ b/docs/sdks/workflowssteps/README.md @@ -0,0 +1,95 @@ +# WorkflowsSteps + +## Overview + +### Available Operations + +* [generatePreview](#generatepreview) - Generate a step preview + +## generatePreview + +Generates a preview for a specific workflow step by its unique identifier **stepId** + +### Example Usage + + +```java +package hello.world; + +import co.novu.Novu; +import co.novu.models.components.*; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.WorkflowControllerGeneratePreviewResponse; +import java.lang.Exception; +import java.util.List; +import java.util.Map; + +public class Application { + + public static void main(String[] args) throws ErrorDto, ValidationErrorDto, Exception { + + Novu sdk = Novu.builder() + .secretKey("YOUR_SECRET_KEY_HERE") + .build(); + + WorkflowControllerGeneratePreviewResponse res = sdk.workflowsSteps().generatePreview() + .workflowId("") + .stepId("") + .body(GeneratePreviewRequestDto.builder() + .previewPayload(PreviewPayloadDto.builder() + .subscriber(SubscriberResponseDtoOptional.builder() + .channels(List.of( + ChannelSettingsDto.builder() + .providerId(ChatOrPushProviderEnum.NOVU_SLACK) + .credentials(ChannelCredentials.builder() + .webhookUrl("https://example.com/webhook") + .channel("general") + .deviceTokens(List.of( + "token1", + "token2", + "token3")) + .alertUid("12345-abcde") + .title("Critical Alert") + .imageUrl("https://example.com/image.png") + .state("resolved") + .externalUrl("https://example.com/details") + .build()) + .integrationId("") + .build())) + .build()) + .context(Map.ofEntries( + Map.entry("key", PreviewPayloadDtoContextUnion.of("org-acme")))) + .build()) + .build()) + .call(); + + if (res.generatePreviewResponseDto().isPresent()) { + System.out.println(res.generatePreviewResponseDto().get()); + } + } +} +``` + +### Parameters + +| Parameter | Type | Required | Description | +| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | --------------------------------------------------------------------------------- | +| `workflowId` | *String* | :heavy_check_mark: | N/A | +| `stepId` | *String* | :heavy_check_mark: | N/A | +| `idempotencyKey` | *Optional\* | :heavy_minus_sign: | A header for idempotency purposes | +| `body` | [GeneratePreviewRequestDto](../../models/components/GeneratePreviewRequestDto.md) | :heavy_check_mark: | Preview generation details | + +### Response + +**[WorkflowControllerGeneratePreviewResponse](../../models/operations/WorkflowControllerGeneratePreviewResponse.md)** + +### Errors + +| Error Type | Status Code | Content Type | +| -------------------------------------- | -------------------------------------- | -------------------------------------- | +| models/errors/ErrorDto | 414 | application/json | +| models/errors/ErrorDto | 400, 401, 403, 404, 405, 409, 413, 415 | application/json | +| models/errors/ValidationErrorDto | 422 | application/json | +| models/errors/ErrorDto | 500 | application/json | +| models/errors/APIException | 4XX, 5XX | \*/\* | \ No newline at end of file diff --git a/gradle.properties b/gradle.properties index 7b03c511..1894a86f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ groupId=co.novu artifactId=novu-java -version=3.14.0 +version=3.15.0 org.gradle.jvmargs=-Xmx4g -XX:MaxMetaspaceSize=1g diff --git a/spring/novu-java-spring-boot-autoconfigure/src/main/java/co/novu/NovuJavaAutoConfig.java b/spring/novu-java-spring-boot-autoconfigure/src/main/java/co/novu/NovuJavaAutoConfig.java index ced9ed7a..2b5615d1 100644 --- a/spring/novu-java-spring-boot-autoconfigure/src/main/java/co/novu/NovuJavaAutoConfig.java +++ b/spring/novu-java-spring-boot-autoconfigure/src/main/java/co/novu/NovuJavaAutoConfig.java @@ -300,6 +300,17 @@ public Translations translations(Novu novu) { public Workflows workflows(Novu novu) { return novu.workflows(); } + /** + * Creates a WorkflowsSteps sub-SDK bean if none exists. + * + * @param novu the main SDK instance + * @return A configured WorkflowsSteps instance + */ + @Bean + @ConditionalOnMissingBean + public WorkflowsSteps workflowsSteps(Novu novu) { + return novu.workflowsSteps(); + } /** * Creates a ChannelConnections sub-SDK bean if none exists. * @@ -322,6 +333,17 @@ public ChannelConnections channelConnections(Novu novu) { public ChannelEndpoints channelEndpoints(Novu novu) { return novu.channelEndpoints(); } + /** + * Creates a EnvironmentVariables sub-SDK bean if none exists. + * + * @param novu the main SDK instance + * @return A configured EnvironmentVariables instance + */ + @Bean + @ConditionalOnMissingBean + public EnvironmentVariables environmentVariables(Novu novu) { + return novu.environmentVariables(); + } /** * Creates a Integrations sub-SDK bean if none exists. * @@ -367,14 +389,14 @@ public SubscribersMessages2 subscribersMessages(Novu novu) { return novu.subscribersMessages(); } /** - * Creates a SubscribersNotifications1 sub-SDK bean if none exists. + * Creates a SubscribersNotifications2 sub-SDK bean if none exists. * * @param novu the main SDK instance - * @return A configured SubscribersNotifications1 instance + * @return A configured SubscribersNotifications2 instance */ @Bean @ConditionalOnMissingBean - public SubscribersNotifications1 subscribersNotifications(Novu novu) { + public SubscribersNotifications2 subscribersNotifications(Novu novu) { return novu.subscribersNotifications(); } /** @@ -500,6 +522,17 @@ public AsyncTranslations asyncTranslations(AsyncNovu asyncNovu) { public AsyncWorkflows asyncWorkflows(AsyncNovu asyncNovu) { return asyncNovu.workflows(); } + /** + * Creates an AsyncWorkflowsSteps sub-SDK bean if none exists. + * + * @param asyncNovu the async SDK instance + * @return A configured AsyncWorkflowsSteps instance + */ + @Bean + @ConditionalOnMissingBean + public AsyncWorkflowsSteps asyncWorkflowsSteps(AsyncNovu asyncNovu) { + return asyncNovu.workflowsSteps(); + } /** * Creates an AsyncChannelConnections sub-SDK bean if none exists. * @@ -522,6 +555,17 @@ public AsyncChannelConnections asyncChannelConnections(AsyncNovu asyncNovu) { public AsyncChannelEndpoints asyncChannelEndpoints(AsyncNovu asyncNovu) { return asyncNovu.channelEndpoints(); } + /** + * Creates an AsyncEnvironmentVariables sub-SDK bean if none exists. + * + * @param asyncNovu the async SDK instance + * @return A configured AsyncEnvironmentVariables instance + */ + @Bean + @ConditionalOnMissingBean + public AsyncEnvironmentVariables asyncEnvironmentVariables(AsyncNovu asyncNovu) { + return asyncNovu.environmentVariables(); + } /** * Creates an AsyncIntegrations sub-SDK bean if none exists. * @@ -567,14 +611,14 @@ public AsyncSubscribersMessages2 asyncSubscribersMessages2(AsyncNovu asyncNovu) return asyncNovu.subscribersMessages(); } /** - * Creates an AsyncSubscribersNotifications1 sub-SDK bean if none exists. + * Creates an AsyncSubscribersNotifications2 sub-SDK bean if none exists. * * @param asyncNovu the async SDK instance - * @return A configured AsyncSubscribersNotifications1 instance + * @return A configured AsyncSubscribersNotifications2 instance */ @Bean @ConditionalOnMissingBean - public AsyncSubscribersNotifications1 asyncSubscribersNotifications1(AsyncNovu asyncNovu) { + public AsyncSubscribersNotifications2 asyncSubscribersNotifications2(AsyncNovu asyncNovu) { return asyncNovu.subscribersNotifications(); } /** diff --git a/src/main/java/co/novu/Activity.java b/src/main/java/co/novu/Activity.java index 9321e1ea..c97a62d9 100644 --- a/src/main/java/co/novu/Activity.java +++ b/src/main/java/co/novu/Activity.java @@ -38,7 +38,7 @@ public AsyncActivity async() { } /** - * Track activity and engagement events + * Track provider activity and engagement events * *

Track activity and engagement events for a specific delivery provider * @@ -49,7 +49,7 @@ public InboundWebhooksControllerHandleWebhookRequestBuilder track() { } /** - * Track activity and engagement events + * Track provider activity and engagement events * *

Track activity and engagement events for a specific delivery provider * @@ -67,7 +67,7 @@ public InboundWebhooksControllerHandleWebhookResponse track( } /** - * Track activity and engagement events + * Track provider activity and engagement events * *

Track activity and engagement events for a specific delivery provider * diff --git a/src/main/java/co/novu/AsyncActivity.java b/src/main/java/co/novu/AsyncActivity.java index 70da879d..da699f03 100644 --- a/src/main/java/co/novu/AsyncActivity.java +++ b/src/main/java/co/novu/AsyncActivity.java @@ -40,7 +40,7 @@ public Activity sync() { /** - * Track activity and engagement events + * Track provider activity and engagement events * *

Track activity and engagement events for a specific delivery provider * @@ -51,7 +51,7 @@ public InboundWebhooksControllerHandleWebhookRequestBuilder track() { } /** - * Track activity and engagement events + * Track provider activity and engagement events * *

Track activity and engagement events for a specific delivery provider * @@ -69,7 +69,7 @@ public CompletableFuture track( } /** - * Track activity and engagement events + * Track provider activity and engagement events * *

Track activity and engagement events for a specific delivery provider * diff --git a/src/main/java/co/novu/AsyncChannelEndpoints.java b/src/main/java/co/novu/AsyncChannelEndpoints.java index 9832cd9d..063573b3 100644 --- a/src/main/java/co/novu/AsyncChannelEndpoints.java +++ b/src/main/java/co/novu/AsyncChannelEndpoints.java @@ -60,6 +60,9 @@ public ChannelEndpoints sync() { * *

List all channel endpoints for a resource based on query filters. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public ChannelEndpointsControllerListChannelEndpointsRequestBuilder list() { @@ -71,6 +74,9 @@ public ChannelEndpointsControllerListChannelEndpointsRequestBuilder list() { * *

List all channel endpoints for a resource based on query filters. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param request The request object containing all the parameters for the API call. * @return {@code CompletableFuture} - The async response */ @@ -83,6 +89,9 @@ public CompletableFuture * *

List all channel endpoints for a resource based on query filters. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param request The request object containing all the parameters for the API call. * @param options additional options * @return {@code CompletableFuture} - The async response @@ -102,6 +111,9 @@ public CompletableFuture * *

Create a new channel endpoint for a resource. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public ChannelEndpointsControllerCreateChannelEndpointRequestBuilder create() { @@ -113,6 +125,9 @@ public ChannelEndpointsControllerCreateChannelEndpointRequestBuilder create() { * *

Create a new channel endpoint for a resource. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body Channel endpoint creation request. The structure varies based on the type field. * @return {@code CompletableFuture} - The async response */ @@ -125,6 +140,9 @@ public CompletableFutureCreate a new channel endpoint for a resource. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body Channel endpoint creation request. The structure varies based on the type field. * @param options additional options @@ -148,6 +166,9 @@ public CompletableFutureRetrieve a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public ChannelEndpointsControllerGetChannelEndpointRequestBuilder get() { @@ -159,6 +180,9 @@ public ChannelEndpointsControllerGetChannelEndpointRequestBuilder get() { * *

Retrieve a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @return {@code CompletableFuture} - The async response */ @@ -171,6 +195,9 @@ public CompletableFuture g * *

Retrieve a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @param idempotencyKey A header for idempotency purposes * @param options additional options @@ -194,6 +221,9 @@ public CompletableFuture g * *

Update an existing channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public ChannelEndpointsControllerUpdateChannelEndpointRequestBuilder update() { @@ -205,6 +235,9 @@ public ChannelEndpointsControllerUpdateChannelEndpointRequestBuilder update() { * *

Update an existing channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @param body * @return {@code CompletableFuture} - The async response @@ -220,6 +253,9 @@ public CompletableFutureUpdate an existing channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @param idempotencyKey A header for idempotency purposes * @param body @@ -244,6 +280,9 @@ public CompletableFutureDelete a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public ChannelEndpointsControllerDeleteChannelEndpointRequestBuilder delete() { @@ -255,6 +294,9 @@ public ChannelEndpointsControllerDeleteChannelEndpointRequestBuilder delete() { * *

Delete a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @return {@code CompletableFuture} - The async response */ @@ -267,6 +309,9 @@ public CompletableFutureDelete a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @param idempotencyKey A header for idempotency purposes * @param options additional options diff --git a/src/main/java/co/novu/AsyncEnvironmentVariables.java b/src/main/java/co/novu/AsyncEnvironmentVariables.java new file mode 100644 index 00000000..73aff985 --- /dev/null +++ b/src/main/java/co/novu/AsyncEnvironmentVariables.java @@ -0,0 +1,352 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.models.components.CreateEnvironmentVariableRequestDto; +import co.novu.models.components.UpdateEnvironmentVariableRequestDto; +import co.novu.models.operations.EnvironmentVariablesControllerCreateEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerDeleteEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest; +import co.novu.models.operations.EnvironmentVariablesControllerListEnvironmentVariablesRequest; +import co.novu.models.operations.EnvironmentVariablesControllerUpdateEnvironmentVariableRequest; +import co.novu.models.operations.async.EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder; +import co.novu.models.operations.async.EnvironmentVariablesControllerCreateEnvironmentVariableResponse; +import co.novu.models.operations.async.EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder; +import co.novu.models.operations.async.EnvironmentVariablesControllerDeleteEnvironmentVariableResponse; +import co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder; +import co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableResponse; +import co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder; +import co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse; +import co.novu.models.operations.async.EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder; +import co.novu.models.operations.async.EnvironmentVariablesControllerListEnvironmentVariablesResponse; +import co.novu.models.operations.async.EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder; +import co.novu.models.operations.async.EnvironmentVariablesControllerUpdateEnvironmentVariableResponse; +import co.novu.operations.EnvironmentVariablesControllerCreateEnvironmentVariable; +import co.novu.operations.EnvironmentVariablesControllerDeleteEnvironmentVariable; +import co.novu.operations.EnvironmentVariablesControllerGetEnvironmentVariable; +import co.novu.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsage; +import co.novu.operations.EnvironmentVariablesControllerListEnvironmentVariables; +import co.novu.operations.EnvironmentVariablesControllerUpdateEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + + +public class AsyncEnvironmentVariables { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final EnvironmentVariables syncSDK; + + AsyncEnvironmentVariables(EnvironmentVariables syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public EnvironmentVariables sync() { + return syncSDK; + } + + + /** + * List all variables + * + *

Returns all environment variables for the current organization. Secret values are masked. + * + * @return The async call builder + */ + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder list() { + return new EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder(sdkConfiguration); + } + + /** + * List all variables + * + *

Returns all environment variables for the current organization. Secret values are masked. + * + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture listDirect() { + return list(null, null, null); + } + + /** + * List all variables + * + *

Returns all environment variables for the current organization. Secret values are masked. + * + * @param search Filter variables by key (case-insensitive partial match) + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture list( + @Nullable String search, @Nullable String idempotencyKey, + @Nullable Options options) { + EnvironmentVariablesControllerListEnvironmentVariablesRequest request = new EnvironmentVariablesControllerListEnvironmentVariablesRequest(search, idempotencyKey); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerListEnvironmentVariables.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Create a variable + * + *

Creates a new environment variable. Keys must be uppercase with underscores only (e.g. BASE_URL). + * + *

Secret variables are encrypted at rest and masked in API responses. + * + * @return The async call builder + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder create() { + return new EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder(sdkConfiguration); + } + + /** + * Create a variable + * + *

Creates a new environment variable. Keys must be uppercase with underscores only (e.g. BASE_URL). + * + *

Secret variables are encrypted at rest and masked in API responses. + * + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture create(@Nonnull CreateEnvironmentVariableRequestDto body) { + return create(null, body, null); + } + + /** + * Create a variable + * + *

Creates a new environment variable. Keys must be uppercase with underscores only (e.g. BASE_URL). + * + *

Secret variables are encrypted at rest and masked in API responses. + * + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture create( + @Nullable String idempotencyKey, @Nonnull CreateEnvironmentVariableRequestDto body, + @Nullable Options options) { + EnvironmentVariablesControllerCreateEnvironmentVariableRequest request = new EnvironmentVariablesControllerCreateEnvironmentVariableRequest(idempotencyKey, body); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerCreateEnvironmentVariable.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Get environment variable + * + *

Returns a single environment variable by key. Secret values are masked. + * + * @return The async call builder + */ + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder retrieve() { + return new EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder(sdkConfiguration); + } + + /** + * Get environment variable + * + *

Returns a single environment variable by key. Secret values are masked. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture retrieve(@Nonnull String variableKey) { + return retrieve(variableKey, null, null); + } + + /** + * Get environment variable + * + *

Returns a single environment variable by key. Secret values are masked. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture retrieve( + @Nonnull String variableKey, @Nullable String idempotencyKey, + @Nullable Options options) { + EnvironmentVariablesControllerGetEnvironmentVariableRequest request = new EnvironmentVariablesControllerGetEnvironmentVariableRequest(variableKey, idempotencyKey); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerGetEnvironmentVariable.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Update a variable + * + *

Updates an existing environment variable. Providing values replaces all existing per-environment + * values. + * + * @return The async call builder + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder update() { + return new EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder(sdkConfiguration); + } + + /** + * Update a variable + * + *

Updates an existing environment variable. Providing values replaces all existing per-environment + * values. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture update(@Nonnull String variableKey, @Nonnull UpdateEnvironmentVariableRequestDto body) { + return update( + variableKey, null, body, + null); + } + + /** + * Update a variable + * + *

Updates an existing environment variable. Providing values replaces all existing per-environment + * values. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture update( + @Nonnull String variableKey, @Nullable String idempotencyKey, + @Nonnull UpdateEnvironmentVariableRequestDto body, @Nullable Options options) { + EnvironmentVariablesControllerUpdateEnvironmentVariableRequest request = new EnvironmentVariablesControllerUpdateEnvironmentVariableRequest(variableKey, idempotencyKey, body); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerUpdateEnvironmentVariable.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete environment variable + * + *

Deletes an environment variable by key. + * + * @return The async call builder + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder delete() { + return new EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder(sdkConfiguration); + } + + /** + * Delete environment variable + * + *

Deletes an environment variable by key. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture delete(@Nonnull String variableKey) { + return delete(variableKey, null, null); + } + + /** + * Delete environment variable + * + *

Deletes an environment variable by key. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture delete( + @Nonnull String variableKey, @Nullable String idempotencyKey, + @Nullable Options options) { + EnvironmentVariablesControllerDeleteEnvironmentVariableRequest request = new EnvironmentVariablesControllerDeleteEnvironmentVariableRequest(variableKey, idempotencyKey); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerDeleteEnvironmentVariable.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Retrieve a variable usage + * + *

Returns the workflows that reference this environment variable via `{{env.KEY}}` in their step + * controls. **variableId** is required. + * + * @return The async call builder + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder usage() { + return new EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve a variable usage + * + *

Returns the workflows that reference this environment variable via `{{env.KEY}}` in their step + * controls. **variableId** is required. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture usage(@Nonnull String variableKey) { + return usage(variableKey, null, null); + } + + /** + * Retrieve a variable usage + * + *

Returns the workflows that reference this environment variable via `{{env.KEY}}` in their step + * controls. **variableId** is required. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture usage( + @Nonnull String variableKey, @Nullable String idempotencyKey, + @Nullable Options options) { + EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest request = new EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest(variableKey, idempotencyKey); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerGetEnvironmentVariableUsage.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/co/novu/AsyncEnvironments.java b/src/main/java/co/novu/AsyncEnvironments.java index db1f1f0f..f3afdef6 100644 --- a/src/main/java/co/novu/AsyncEnvironments.java +++ b/src/main/java/co/novu/AsyncEnvironments.java @@ -6,11 +6,19 @@ import static co.novu.operations.Operations.AsyncRequestOperation; import co.novu.models.components.CreateEnvironmentRequestDto; +import co.novu.models.components.DiffEnvironmentRequestDto; +import co.novu.models.components.PublishEnvironmentRequestDto; import co.novu.models.components.UpdateEnvironmentRequestDto; +import co.novu.models.operations.EnvironmentsControllerDiffEnvironmentRequest; +import co.novu.models.operations.EnvironmentsControllerPublishEnvironmentRequest; import co.novu.models.operations.EnvironmentsControllerV1CreateEnvironmentRequest; import co.novu.models.operations.EnvironmentsControllerV1DeleteEnvironmentRequest; import co.novu.models.operations.EnvironmentsControllerV1ListMyEnvironmentsRequest; import co.novu.models.operations.EnvironmentsControllerV1UpdateMyEnvironmentRequest; +import co.novu.models.operations.async.EnvironmentsControllerDiffEnvironmentRequestBuilder; +import co.novu.models.operations.async.EnvironmentsControllerDiffEnvironmentResponse; +import co.novu.models.operations.async.EnvironmentsControllerPublishEnvironmentRequestBuilder; +import co.novu.models.operations.async.EnvironmentsControllerPublishEnvironmentResponse; import co.novu.models.operations.async.EnvironmentsControllerV1CreateEnvironmentRequestBuilder; import co.novu.models.operations.async.EnvironmentsControllerV1CreateEnvironmentResponse; import co.novu.models.operations.async.EnvironmentsControllerV1DeleteEnvironmentRequestBuilder; @@ -19,6 +27,8 @@ import co.novu.models.operations.async.EnvironmentsControllerV1ListMyEnvironmentsResponse; import co.novu.models.operations.async.EnvironmentsControllerV1UpdateMyEnvironmentRequestBuilder; import co.novu.models.operations.async.EnvironmentsControllerV1UpdateMyEnvironmentResponse; +import co.novu.operations.EnvironmentsControllerDiffEnvironment; +import co.novu.operations.EnvironmentsControllerPublishEnvironment; import co.novu.operations.EnvironmentsControllerV1CreateEnvironment; import co.novu.operations.EnvironmentsControllerV1DeleteEnvironment; import co.novu.operations.EnvironmentsControllerV1ListMyEnvironments; @@ -63,6 +73,112 @@ public Environments sync() { } + /** + * Compare resources between environments + * + *

Compares workflows and other resources between the source and target environments, returning + * detailed diff information including additions, modifications, and deletions. + * + * @return The async call builder + */ + public EnvironmentsControllerDiffEnvironmentRequestBuilder diff() { + return new EnvironmentsControllerDiffEnvironmentRequestBuilder(sdkConfiguration); + } + + /** + * Compare resources between environments + * + *

Compares workflows and other resources between the source and target environments, returning + * detailed diff information including additions, modifications, and deletions. + * + * @param targetEnvironmentId Target environment ID (MongoDB ObjectId) to compare against + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture diff(@Nonnull String targetEnvironmentId, @Nonnull DiffEnvironmentRequestDto body) { + return diff( + targetEnvironmentId, null, body, + null); + } + + /** + * Compare resources between environments + * + *

Compares workflows and other resources between the source and target environments, returning + * detailed diff information including additions, modifications, and deletions. + * + * @param targetEnvironmentId Target environment ID (MongoDB ObjectId) to compare against + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture diff( + @Nonnull String targetEnvironmentId, @Nullable String idempotencyKey, + @Nonnull DiffEnvironmentRequestDto body, @Nullable Options options) { + EnvironmentsControllerDiffEnvironmentRequest request = new EnvironmentsControllerDiffEnvironmentRequest(targetEnvironmentId, idempotencyKey, body); + AsyncRequestOperation operation + = new EnvironmentsControllerDiffEnvironment.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Publish resources to target environment + * + *

Publishes all workflows and resources from the source environment to the target environment. + * Optionally specify specific resources to publish or use dryRun mode to preview changes. + * + * @return The async call builder + */ + public EnvironmentsControllerPublishEnvironmentRequestBuilder publish() { + return new EnvironmentsControllerPublishEnvironmentRequestBuilder(sdkConfiguration); + } + + /** + * Publish resources to target environment + * + *

Publishes all workflows and resources from the source environment to the target environment. + * Optionally specify specific resources to publish or use dryRun mode to preview changes. + * + * @param targetEnvironmentId Target environment ID (MongoDB ObjectId) to publish resources to + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture publish(@Nonnull String targetEnvironmentId, @Nonnull PublishEnvironmentRequestDto body) { + return publish( + targetEnvironmentId, null, body, + null); + } + + /** + * Publish resources to target environment + * + *

Publishes all workflows and resources from the source environment to the target environment. + * Optionally specify specific resources to publish or use dryRun mode to preview changes. + * + * @param targetEnvironmentId Target environment ID (MongoDB ObjectId) to publish resources to + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture publish( + @Nonnull String targetEnvironmentId, @Nullable String idempotencyKey, + @Nonnull PublishEnvironmentRequestDto body, @Nullable Options options) { + EnvironmentsControllerPublishEnvironmentRequest request = new EnvironmentsControllerPublishEnvironmentRequest(targetEnvironmentId, idempotencyKey, body); + AsyncRequestOperation operation + = new EnvironmentsControllerPublishEnvironment.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + /** * Create an environment * diff --git a/src/main/java/co/novu/AsyncNovu.java b/src/main/java/co/novu/AsyncNovu.java index b65137ef..15e36b8f 100644 --- a/src/main/java/co/novu/AsyncNovu.java +++ b/src/main/java/co/novu/AsyncNovu.java @@ -92,9 +92,13 @@ public class AsyncNovu { */ private final AsyncWorkflows workflows; + private final AsyncWorkflowsSteps workflowsSteps; + private final AsyncChannelConnections channelConnections; private final AsyncChannelEndpoints channelEndpoints; + + private final AsyncEnvironmentVariables environmentVariables; /** * With the help of the Integration Store, you can easily integrate your favorite delivery provider. * During the runtime of the API, the Integrations Store is responsible for storing the configurations @@ -116,7 +120,7 @@ public class AsyncNovu { private final AsyncSubscribersMessages2 subscribersMessages; - private final AsyncSubscribersNotifications1 subscribersNotifications; + private final AsyncSubscribersNotifications2 subscribersNotifications; private final AsyncSubscribersProperties subscribersProperties; @@ -191,6 +195,10 @@ public AsyncWorkflows workflows() { return workflows; } + public AsyncWorkflowsSteps workflowsSteps() { + return workflowsSteps; + } + public AsyncChannelConnections channelConnections() { return channelConnections; } @@ -198,6 +206,10 @@ public AsyncChannelConnections channelConnections() { public AsyncChannelEndpoints channelEndpoints() { return channelEndpoints; } + + public AsyncEnvironmentVariables environmentVariables() { + return environmentVariables; + } /** * With the help of the Integration Store, you can easily integrate your favorite delivery provider. * During the runtime of the API, the Integrations Store is responsible for storing the configurations @@ -227,7 +239,7 @@ public AsyncSubscribersMessages2 subscribersMessages() { return subscribersMessages; } - public AsyncSubscribersNotifications1 subscribersNotifications() { + public AsyncSubscribersNotifications2 subscribersNotifications() { return subscribersNotifications; } @@ -250,13 +262,15 @@ public AsyncSubscribersProperties subscribersProperties() { this.topics = new AsyncTopics(syncSDK.topics(), sdkConfiguration); this.translations = new AsyncTranslations(syncSDK.translations(), sdkConfiguration); this.workflows = new AsyncWorkflows(syncSDK.workflows(), sdkConfiguration); + this.workflowsSteps = new AsyncWorkflowsSteps(syncSDK.workflowsSteps(), sdkConfiguration); this.channelConnections = new AsyncChannelConnections(syncSDK.channelConnections(), sdkConfiguration); this.channelEndpoints = new AsyncChannelEndpoints(syncSDK.channelEndpoints(), sdkConfiguration); + this.environmentVariables = new AsyncEnvironmentVariables(syncSDK.environmentVariables(), sdkConfiguration); this.integrations = new AsyncIntegrations(syncSDK.integrations(), sdkConfiguration); this.messages = new AsyncMessages(syncSDK.messages(), sdkConfiguration); this.notifications = new AsyncNotifications(syncSDK.notifications(), sdkConfiguration); this.subscribersMessages = new AsyncSubscribersMessages2(syncSDK.subscribersMessages(), sdkConfiguration); - this.subscribersNotifications = new AsyncSubscribersNotifications1(syncSDK.subscribersNotifications(), sdkConfiguration); + this.subscribersNotifications = new AsyncSubscribersNotifications2(syncSDK.subscribersNotifications(), sdkConfiguration); this.subscribersProperties = new AsyncSubscribersProperties(syncSDK.subscribersProperties(), sdkConfiguration); } diff --git a/src/main/java/co/novu/AsyncPreferences.java b/src/main/java/co/novu/AsyncPreferences.java index aa257af3..d5aeb209 100644 --- a/src/main/java/co/novu/AsyncPreferences.java +++ b/src/main/java/co/novu/AsyncPreferences.java @@ -62,7 +62,7 @@ public SubscribersControllerGetSubscriberPreferencesRequestBuilder list() { *

Retrieve subscriber channel preferences by its unique key identifier **subscriberId**. * This API returns all five channels preferences for all workflows and global preferences. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @return {@code CompletableFuture} - The async response */ public CompletableFuture list(@Nonnull String subscriberId) { @@ -77,7 +77,7 @@ public CompletableFuture *

Retrieve subscriber channel preferences by its unique key identifier **subscriberId**. * This API returns all five channels preferences for all workflows and global preferences. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param criticality * @param contextKeys Context keys for filtering preferences (e.g., ["tenant:acme"]) * @param idempotencyKey A header for idempotency purposes @@ -118,7 +118,7 @@ public SubscribersControllerBulkUpdateSubscriberPreferencesRequestBuilder bulkUp *

Bulk update subscriber preferences by its unique key identifier **subscriberId**. * This API allows updating multiple workflow preferences in a single request. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param body * @return {@code CompletableFuture} - The async response */ @@ -134,7 +134,7 @@ public CompletableFutureBulk update subscriber preferences by its unique key identifier **subscriberId**. * This API allows updating multiple workflow preferences in a single request. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options diff --git a/src/main/java/co/novu/AsyncSubscribers.java b/src/main/java/co/novu/AsyncSubscribers.java index 1084cd5a..06c3c1bf 100644 --- a/src/main/java/co/novu/AsyncSubscribers.java +++ b/src/main/java/co/novu/AsyncSubscribers.java @@ -70,21 +70,25 @@ public class AsyncSubscribers { private static final Headers _headers = Headers.EMPTY; private final SDKConfiguration sdkConfiguration; + private final AsyncSubscribersNotifications1 notifications; private final AsyncPreferences preferences; private final AsyncCredentials credentials; private final AsyncSubscribersMessages1 messages; - private final AsyncSubscribersNotifications2 notifications; private final Subscribers syncSDK; AsyncSubscribers(Subscribers syncSDK, SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; + this.notifications = new AsyncSubscribersNotifications1(syncSDK.notifications(), this.sdkConfiguration); this.preferences = new AsyncPreferences(syncSDK.preferences(), this.sdkConfiguration); this.credentials = new AsyncCredentials(syncSDK.credentials(), this.sdkConfiguration); this.messages = new AsyncSubscribersMessages1(syncSDK.messages(), this.sdkConfiguration); - this.notifications = new AsyncSubscribersNotifications2(syncSDK.notifications(), this.sdkConfiguration); this.syncSDK = syncSDK; } + public final AsyncSubscribersNotifications1 notifications() { + return notifications; + } + public final AsyncPreferences preferences() { return preferences; } @@ -97,10 +101,6 @@ public final AsyncSubscribersMessages1 messages() { return messages; } - public final AsyncSubscribersNotifications2 notifications() { - return notifications; - } - /** * Switches to the sync SDK. * @@ -232,7 +232,7 @@ public SubscribersControllerGetSubscriberRequestBuilder get() { *

Retrieve a subscriber by its unique key identifier **subscriberId**. * **subscriberId** field is required. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @return {@code CompletableFuture} - The async response */ public CompletableFuture get(@Nonnull String subscriberId) { @@ -245,7 +245,7 @@ public CompletableFuture get(@Nonnul *

Retrieve a subscriber by its unique key identifier **subscriberId**. * **subscriberId** field is required. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param idempotencyKey A header for idempotency purposes * @param options additional options * @return {@code CompletableFuture} - The async response @@ -281,7 +281,7 @@ public SubscribersControllerPatchSubscriberRequestBuilder update() { *

Update a subscriber by its unique key identifier **subscriberId**. * **subscriberId** is a required field, rest other fields are optional * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param body * @return {@code CompletableFuture} - The async response */ @@ -297,7 +297,7 @@ public CompletableFuture update(@N *

Update a subscriber by its unique key identifier **subscriberId**. * **subscriberId** is a required field, rest other fields are optional * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options @@ -336,7 +336,7 @@ public SubscribersControllerRemoveSubscriberRequestBuilder delete() { * topic subscriptions. * **subscriberId** is a required field. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @return {@code CompletableFuture} - The async response */ public CompletableFuture delete(@Nonnull String subscriberId) { @@ -350,7 +350,7 @@ public CompletableFuture delete(@ * topic subscriptions. * **subscriberId** is a required field. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param idempotencyKey A header for idempotency purposes * @param options additional options * @return {@code CompletableFuture} - The async response @@ -437,7 +437,7 @@ public SubscribersControllerUpdateSubscriberPreferencesRequestBuilder updatePref * **workflowId** is optional field, if provided, this API will update that workflow preference, * otherwise it will update global preferences * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param body * @return {@code CompletableFuture} - The async response */ @@ -454,7 +454,7 @@ public CompletableFutureRetrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. + *

Retrieve in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports filtering by tags, read/archived/snoozed/seen state, data attributes, severity, date range, + * and context keys. * * @return The async call builder */ - public SubscribersV1ControllerGetNotificationsFeedRequestBuilder getFeed() { - return new SubscribersV1ControllerGetNotificationsFeedRequestBuilder(sdkConfiguration); + public SubscribersControllerGetSubscriberNotificationsRequestBuilder list() { + return new SubscribersControllerGetSubscriberNotificationsRequestBuilder(sdkConfiguration); } /** * Retrieve subscriber notifications * - *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. + *

Retrieve in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports filtering by tags, read/archived/snoozed/seen state, data attributes, severity, date range, + * and context keys. * * @param request The request object containing all the parameters for the API call. - * @return {@code CompletableFuture} - The async response + * @return {@code CompletableFuture} - The async response */ - public CompletableFuture getFeed(@Nonnull SubscribersV1ControllerGetNotificationsFeedRequest request) { - return getFeed(request, null); + public CompletableFuture list(@Nonnull SubscribersControllerGetSubscriberNotificationsRequest request) { + return list(request, null); } /** * Retrieve subscriber notifications * - *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. + *

Retrieve in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports filtering by tags, read/archived/snoozed/seen state, data attributes, severity, date range, + * and context keys. * * @param request The request object containing all the parameters for the API call. * @param options additional options - * @return {@code CompletableFuture} - The async response + * @return {@code CompletableFuture} - The async response */ - public CompletableFuture getFeed(@Nonnull SubscribersV1ControllerGetNotificationsFeedRequest request, @Nullable Options options) { - AsyncRequestOperation operation - = new SubscribersV1ControllerGetNotificationsFeed.Async( + public CompletableFuture list(@Nonnull SubscribersControllerGetSubscriberNotificationsRequest request, @Nullable Options options) { + AsyncRequestOperation operation + = new SubscribersControllerGetSubscriberNotifications.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete a notification + * + *

Delete a specific in-app (inbox) notification permanently by its unique identifier + * **notificationId**. + * + * @return The async call builder + */ + public SubscribersControllerDeleteNotificationRequestBuilder delete() { + return new SubscribersControllerDeleteNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Delete a notification + * + *

Delete a specific in-app (inbox) notification permanently by its unique identifier + * **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture delete(@Nonnull String subscriberId, @Nonnull String notificationId) { + return delete( + subscriberId, notificationId, null, + null, null); + } + + /** + * Delete a notification + * + *

Delete a specific in-app (inbox) notification permanently by its unique identifier + * **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture delete( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerDeleteNotificationRequest request = new SubscribersControllerDeleteNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + AsyncRequestOperation operation + = new SubscribersControllerDeleteNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Complete a notification action + * + *

Mark a single in-app (inbox) notification's action (primary or secondary) as completed by its unique + * identifier **notificationId** and action type **actionType**. + * + * @return The async call builder + */ + public SubscribersControllerCompleteNotificationActionRequestBuilder completeAction() { + return new SubscribersControllerCompleteNotificationActionRequestBuilder(sdkConfiguration); + } + + /** + * Complete a notification action + * + *

Mark a single in-app (inbox) notification's action (primary or secondary) as completed by its unique + * identifier **notificationId** and action type **actionType**. + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture completeAction(@Nonnull SubscribersControllerCompleteNotificationActionRequest request) { + return completeAction(request, null); + } + + /** + * Complete a notification action + * + *

Mark a single in-app (inbox) notification's action (primary or secondary) as completed by its unique + * identifier **notificationId** and action type **actionType**. + * + * @param request The request object containing all the parameters for the API call. + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture completeAction(@Nonnull SubscribersControllerCompleteNotificationActionRequest request, @Nullable Options options) { + AsyncRequestOperation operation + = new SubscribersControllerCompleteNotificationAction.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Revert a notification action + * + *

Revert a single in-app (inbox) notification's action (primary or secondary) to pending state by its + * unique identifier **notificationId** and action type **actionType**. + * + * @return The async call builder + */ + public SubscribersControllerRevertNotificationActionRequestBuilder revertAction() { + return new SubscribersControllerRevertNotificationActionRequestBuilder(sdkConfiguration); + } + + /** + * Revert a notification action + * + *

Revert a single in-app (inbox) notification's action (primary or secondary) to pending state by its + * unique identifier **notificationId** and action type **actionType**. + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture revertAction(@Nonnull SubscribersControllerRevertNotificationActionRequest request) { + return revertAction(request, null); + } + + /** + * Revert a notification action + * + *

Revert a single in-app (inbox) notification's action (primary or secondary) to pending state by its + * unique identifier **notificationId** and action type **actionType**. + * + * @param request The request object containing all the parameters for the API call. + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture revertAction(@Nonnull SubscribersControllerRevertNotificationActionRequest request, @Nullable Options options) { + AsyncRequestOperation operation + = new SubscribersControllerRevertNotificationAction.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Archive a notification + * + *

Archive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @return The async call builder + */ + public SubscribersControllerArchiveNotificationRequestBuilder archive() { + return new SubscribersControllerArchiveNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Archive a notification + * + *

Archive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture archive(@Nonnull String subscriberId, @Nonnull String notificationId) { + return archive( + subscriberId, notificationId, null, + null, null); + } + + /** + * Archive a notification + * + *

Archive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture archive( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerArchiveNotificationRequest request = new SubscribersControllerArchiveNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + AsyncRequestOperation operation + = new SubscribersControllerArchiveNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Mark a notification as read + * + *

Mark a specific in-app (inbox) notification as read by its unique identifier **notificationId**. + * + * @return The async call builder + */ + public SubscribersControllerMarkNotificationAsReadRequestBuilder markAsRead() { + return new SubscribersControllerMarkNotificationAsReadRequestBuilder(sdkConfiguration); + } + + /** + * Mark a notification as read + * + *

Mark a specific in-app (inbox) notification as read by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture markAsRead(@Nonnull String subscriberId, @Nonnull String notificationId) { + return markAsRead( + subscriberId, notificationId, null, + null, null); + } + + /** + * Mark a notification as read + * + *

Mark a specific in-app (inbox) notification as read by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture markAsRead( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerMarkNotificationAsReadRequest request = new SubscribersControllerMarkNotificationAsReadRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + AsyncRequestOperation operation + = new SubscribersControllerMarkNotificationAsRead.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Snooze a notification + * + *

Snooze a specific in-app (inbox) notification by its unique identifier **notificationId** until a + * specified time. + * + * @return The async call builder + */ + public SubscribersControllerSnoozeNotificationRequestBuilder snooze() { + return new SubscribersControllerSnoozeNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Snooze a notification + * + *

Snooze a specific in-app (inbox) notification by its unique identifier **notificationId** until a + * specified time. + * + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture snooze(@Nonnull SubscribersControllerSnoozeNotificationRequest request) { + return snooze(request, null); + } + + /** + * Snooze a notification + * + *

Snooze a specific in-app (inbox) notification by its unique identifier **notificationId** until a + * specified time. + * + * @param request The request object containing all the parameters for the API call. + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture snooze(@Nonnull SubscribersControllerSnoozeNotificationRequest request, @Nullable Options options) { + AsyncRequestOperation operation + = new SubscribersControllerSnoozeNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Unarchive a notification + * + *

Unarchive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @return The async call builder + */ + public SubscribersControllerUnarchiveNotificationRequestBuilder unarchive() { + return new SubscribersControllerUnarchiveNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Unarchive a notification + * + *

Unarchive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture unarchive(@Nonnull String subscriberId, @Nonnull String notificationId) { + return unarchive( + subscriberId, notificationId, null, + null, null); + } + + /** + * Unarchive a notification + * + *

Unarchive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture unarchive( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerUnarchiveNotificationRequest request = new SubscribersControllerUnarchiveNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + AsyncRequestOperation operation + = new SubscribersControllerUnarchiveNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Mark a notification as unread + * + *

Mark a specific in-app (inbox) notification as unread by its unique identifier **notificationId**. + * + * @return The async call builder + */ + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder markAsUnread() { + return new SubscribersControllerMarkNotificationAsUnreadRequestBuilder(sdkConfiguration); + } + + /** + * Mark a notification as unread + * + *

Mark a specific in-app (inbox) notification as unread by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture markAsUnread(@Nonnull String subscriberId, @Nonnull String notificationId) { + return markAsUnread( + subscriberId, notificationId, null, + null, null); + } + + /** + * Mark a notification as unread + * + *

Mark a specific in-app (inbox) notification as unread by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture markAsUnread( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerMarkNotificationAsUnreadRequest request = new SubscribersControllerMarkNotificationAsUnreadRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + AsyncRequestOperation operation + = new SubscribersControllerMarkNotificationAsUnread.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Unsnooze a notification + * + *

Unsnooze a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @return The async call builder + */ + public SubscribersControllerUnsnoozeNotificationRequestBuilder unsnooze() { + return new SubscribersControllerUnsnoozeNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Unsnooze a notification + * + *

Unsnooze a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture unsnooze(@Nonnull String subscriberId, @Nonnull String notificationId) { + return unsnooze( + subscriberId, notificationId, null, + null, null); + } + + /** + * Unsnooze a notification + * + *

Unsnooze a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture unsnooze( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerUnsnoozeNotificationRequest request = new SubscribersControllerUnsnoozeNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + AsyncRequestOperation operation + = new SubscribersControllerUnsnoozeNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Archive all notifications + * + *

Archive all in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @return The async call builder + */ + public SubscribersControllerArchiveAllNotificationsRequestBuilder archiveAll() { + return new SubscribersControllerArchiveAllNotificationsRequestBuilder(sdkConfiguration); + } + + /** + * Archive all notifications + * + *

Archive all in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture archiveAll(@Nonnull String subscriberId, @Nonnull UpdateAllSubscriberNotificationsDto body) { + return archiveAll( + subscriberId, null, body, + null); + } + + /** + * Archive all notifications + * + *

Archive all in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture archiveAll( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body, @Nullable Options options) { + SubscribersControllerArchiveAllNotificationsRequest request = new SubscribersControllerArchiveAllNotificationsRequest(subscriberId, idempotencyKey, body); + AsyncRequestOperation operation + = new SubscribersControllerArchiveAllNotifications.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Retrieve subscriber notifications count + * + *

Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports multiple filters to count in-app (inbox) notifications by different criteria, including + * context keys. + * + * @return The async call builder + */ + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder count() { + return new SubscribersControllerGetSubscriberNotificationsCountRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve subscriber notifications count + * + *

Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports multiple filters to count in-app (inbox) notifications by different criteria, including + * context keys. + * + * @param subscriberId The identifier of the subscriber + * @param filters Array of filter objects (max 30) to count notifications by different criteria + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture count(@Nonnull String subscriberId, @Nonnull String filters) { + return count( + subscriberId, filters, null, + null); + } + + /** + * Retrieve subscriber notifications count + * + *

Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports multiple filters to count in-app (inbox) notifications by different criteria, including + * context keys. + * + * @param subscriberId The identifier of the subscriber + * @param filters Array of filter objects (max 30) to count notifications by different criteria + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture count( + @Nonnull String subscriberId, @Nonnull String filters, + @Nullable String idempotencyKey, @Nullable Options options) { + SubscribersControllerGetSubscriberNotificationsCountRequest request = new SubscribersControllerGetSubscriberNotificationsCountRequest(subscriberId, filters, idempotencyKey); + AsyncRequestOperation operation + = new SubscribersControllerGetSubscriberNotificationsCount.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Delete all notifications + * + *

Permanently delete all in-app (inbox) notifications matching the specified filters. Supports + * context-based filtering. + * + * @return The async call builder + */ + public SubscribersControllerDeleteAllNotificationsRequestBuilder deleteAll() { + return new SubscribersControllerDeleteAllNotificationsRequestBuilder(sdkConfiguration); + } + + /** + * Delete all notifications + * + *

Permanently delete all in-app (inbox) notifications matching the specified filters. Supports + * context-based filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture deleteAll(@Nonnull String subscriberId, @Nonnull UpdateAllSubscriberNotificationsDto body) { + return deleteAll( + subscriberId, null, body, + null); + } + + /** + * Delete all notifications + * + *

Permanently delete all in-app (inbox) notifications matching the specified filters. Supports + * context-based filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture deleteAll( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body, @Nullable Options options) { + SubscribersControllerDeleteAllNotificationsRequest request = new SubscribersControllerDeleteAllNotificationsRequest(subscriberId, idempotencyKey, body); + AsyncRequestOperation operation + = new SubscribersControllerDeleteAllNotifications.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Mark all notifications as read + * + *

Mark all in-app (inbox) notifications matching the specified filters as read. Supports context-based + * filtering. + * + * @return The async call builder + */ + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder markAllAsRead() { + return new SubscribersControllerMarkAllNotificationsAsReadRequestBuilder(sdkConfiguration); + } + + /** + * Mark all notifications as read + * + *

Mark all in-app (inbox) notifications matching the specified filters as read. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture markAllAsRead(@Nonnull String subscriberId, @Nonnull UpdateAllSubscriberNotificationsDto body) { + return markAllAsRead( + subscriberId, null, body, + null); + } + + /** + * Mark all notifications as read + * + *

Mark all in-app (inbox) notifications matching the specified filters as read. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture markAllAsRead( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body, @Nullable Options options) { + SubscribersControllerMarkAllNotificationsAsReadRequest request = new SubscribersControllerMarkAllNotificationsAsReadRequest(subscriberId, idempotencyKey, body); + AsyncRequestOperation operation + = new SubscribersControllerMarkAllNotificationsAsRead.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Archive all read notifications + * + *

Archive all read in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @return The async call builder + */ + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder archiveAllRead() { + return new SubscribersControllerArchiveAllReadNotificationsRequestBuilder(sdkConfiguration); + } + + /** + * Archive all read notifications + * + *

Archive all read in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture archiveAllRead(@Nonnull String subscriberId, @Nonnull UpdateAllSubscriberNotificationsDto body) { + return archiveAllRead( + subscriberId, null, body, + null); + } + + /** + * Archive all read notifications + * + *

Archive all read in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture archiveAllRead( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body, @Nullable Options options) { + SubscribersControllerArchiveAllReadNotificationsRequest request = new SubscribersControllerArchiveAllReadNotificationsRequest(subscriberId, idempotencyKey, body); + AsyncRequestOperation operation + = new SubscribersControllerArchiveAllReadNotifications.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Mark notifications as seen + * + *

Mark specific and multiple in-app (inbox) notifications as seen. Supports context-based filtering. + * + * @return The async call builder + */ + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder markAsSeen() { + return new SubscribersControllerMarkNotificationsAsSeenRequestBuilder(sdkConfiguration); + } + + /** + * Mark notifications as seen + * + *

Mark specific and multiple in-app (inbox) notifications as seen. Supports context-based filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture markAsSeen(@Nonnull String subscriberId, @Nonnull MarkSubscriberNotificationsAsSeenDto body) { + return markAsSeen( + subscriberId, null, body, + null); + } + + /** + * Mark notifications as seen + * + *

Mark specific and multiple in-app (inbox) notifications as seen. Supports context-based filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture markAsSeen( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull MarkSubscriberNotificationsAsSeenDto body, @Nullable Options options) { + SubscribersControllerMarkNotificationsAsSeenRequest request = new SubscribersControllerMarkNotificationsAsSeenRequest(subscriberId, idempotencyKey, body); + AsyncRequestOperation operation + = new SubscribersControllerMarkNotificationsAsSeen.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + + + /** + * Retrieve unseen notifications count + * + *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier + * **subscriberId**. + * + * @return The async call builder + */ + public SubscribersV1ControllerGetUnseenCountRequestBuilder getUnseenCount() { + return new SubscribersV1ControllerGetUnseenCountRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve unseen notifications count + * + *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier + * **subscriberId**. + * + * @param subscriberId + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture getUnseenCount(@Nonnull String subscriberId) { + return getUnseenCount( + subscriberId, null, null, + null, null); + } + + /** + * Retrieve unseen notifications count + * + *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier + * **subscriberId**. + * + * @param subscriberId + * @param seen Indicates whether to count seen notifications. + * @param limit The maximum number of notifications to return. + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture getUnseenCount( + @Nonnull String subscriberId, @Nullable Boolean seen, + @Nullable Double limit, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersV1ControllerGetUnseenCountRequest request = new SubscribersV1ControllerGetUnseenCountRequest( + subscriberId, seen, limit, + idempotencyKey); + AsyncRequestOperation operation + = new SubscribersV1ControllerGetUnseenCount.Async( sdkConfiguration, options, sdkConfiguration.retryScheduler(), _headers); return operation.doRequest(request) diff --git a/src/main/java/co/novu/AsyncSubscribersNotifications2.java b/src/main/java/co/novu/AsyncSubscribersNotifications2.java index dcadf90d..8b53ad1e 100644 --- a/src/main/java/co/novu/AsyncSubscribersNotifications2.java +++ b/src/main/java/co/novu/AsyncSubscribersNotifications2.java @@ -5,17 +5,14 @@ import static co.novu.operations.Operations.AsyncRequestOperation; -import co.novu.models.operations.SubscribersV1ControllerGetUnseenCountRequest; -import co.novu.models.operations.async.SubscribersV1ControllerGetUnseenCountRequestBuilder; -import co.novu.models.operations.async.SubscribersV1ControllerGetUnseenCountResponse; -import co.novu.operations.SubscribersV1ControllerGetUnseenCount; +import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedRequest; +import co.novu.models.operations.async.SubscribersV1ControllerGetNotificationsFeedRequestBuilder; +import co.novu.models.operations.async.SubscribersV1ControllerGetNotificationsFeedResponse; +import co.novu.operations.SubscribersV1ControllerGetNotificationsFeed; import co.novu.utils.Headers; import co.novu.utils.Options; import jakarta.annotation.Nonnull; import jakarta.annotation.Nullable; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.String; import java.util.concurrent.CompletableFuture; @@ -40,54 +37,40 @@ public SubscribersNotifications2 sync() { /** - * Retrieve unseen notifications count + * Retrieve subscriber notifications * - *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier - * **subscriberId**. + *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. * * @return The async call builder */ - public SubscribersV1ControllerGetUnseenCountRequestBuilder getUnseenCount() { - return new SubscribersV1ControllerGetUnseenCountRequestBuilder(sdkConfiguration); + public SubscribersV1ControllerGetNotificationsFeedRequestBuilder getFeed() { + return new SubscribersV1ControllerGetNotificationsFeedRequestBuilder(sdkConfiguration); } /** - * Retrieve unseen notifications count + * Retrieve subscriber notifications * - *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier - * **subscriberId**. + *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. * - * @param subscriberId - * @return {@code CompletableFuture} - The async response + * @param request The request object containing all the parameters for the API call. + * @return {@code CompletableFuture} - The async response */ - public CompletableFuture getUnseenCount(@Nonnull String subscriberId) { - return getUnseenCount( - subscriberId, null, null, - null, null); + public CompletableFuture getFeed(@Nonnull SubscribersV1ControllerGetNotificationsFeedRequest request) { + return getFeed(request, null); } /** - * Retrieve unseen notifications count + * Retrieve subscriber notifications * - *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier - * **subscriberId**. + *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. * - * @param subscriberId - * @param seen Indicates whether to count seen notifications. - * @param limit The maximum number of notifications to return. - * @param idempotencyKey A header for idempotency purposes + * @param request The request object containing all the parameters for the API call. * @param options additional options - * @return {@code CompletableFuture} - The async response + * @return {@code CompletableFuture} - The async response */ - public CompletableFuture getUnseenCount( - @Nonnull String subscriberId, @Nullable Boolean seen, - @Nullable Double limit, @Nullable String idempotencyKey, - @Nullable Options options) { - SubscribersV1ControllerGetUnseenCountRequest request = new SubscribersV1ControllerGetUnseenCountRequest( - subscriberId, seen, limit, - idempotencyKey); - AsyncRequestOperation operation - = new SubscribersV1ControllerGetUnseenCount.Async( + public CompletableFuture getFeed(@Nonnull SubscribersV1ControllerGetNotificationsFeedRequest request, @Nullable Options options) { + AsyncRequestOperation operation + = new SubscribersV1ControllerGetNotificationsFeed.Async( sdkConfiguration, options, sdkConfiguration.retryScheduler(), _headers); return operation.doRequest(request) diff --git a/src/main/java/co/novu/AsyncTranslations.java b/src/main/java/co/novu/AsyncTranslations.java index 5887350d..6100cc86 100644 --- a/src/main/java/co/novu/AsyncTranslations.java +++ b/src/main/java/co/novu/AsyncTranslations.java @@ -87,6 +87,9 @@ public Translations sync() { *

Create a translation for a specific workflow and locale, if the translation already exists, it will * be updated * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public TranslationControllerCreateTranslationEndpointRequestBuilder create() { @@ -99,6 +102,9 @@ public TranslationControllerCreateTranslationEndpointRequestBuilder create() { *

Create a translation for a specific workflow and locale, if the translation already exists, it will * be updated * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body * @return {@code CompletableFuture} - The async response */ @@ -112,6 +118,9 @@ public CompletableFuture *

Create a translation for a specific workflow and locale, if the translation already exists, it will * be updated * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options @@ -135,6 +144,9 @@ public CompletableFuture * *

Retrieve a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public TranslationControllerGetSingleTranslationRequestBuilder get() { @@ -146,6 +158,9 @@ public TranslationControllerGetSingleTranslationRequestBuilder get() { * *

Retrieve a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param locale Locale code @@ -164,6 +179,9 @@ public CompletableFuture get( * *

Retrieve a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param locale Locale code @@ -192,6 +210,9 @@ public CompletableFuture get( * *

Delete a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public TranslationControllerDeleteTranslationEndpointRequestBuilder delete() { @@ -203,6 +224,9 @@ public TranslationControllerDeleteTranslationEndpointRequestBuilder delete() { * *

Delete a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param locale Locale code @@ -221,6 +245,9 @@ public CompletableFuture * *

Delete a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param locale Locale code @@ -252,6 +279,9 @@ public CompletableFuture * *

Supports both "files" and "files[]" field names for backwards compatibility. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public TranslationControllerUploadTranslationFilesRequestBuilder uploadFiles() { @@ -266,6 +296,9 @@ public TranslationControllerUploadTranslationFilesRequestBuilder uploadFiles() { * *

Supports both "files" and "files[]" field names for backwards compatibility. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body * @return {@code CompletableFuture} - The async response */ @@ -281,6 +314,9 @@ public CompletableFuture up * *

Supports both "files" and "files[]" field names for backwards compatibility. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options @@ -304,6 +340,9 @@ public CompletableFuture up * *

Delete an entire translation group and all its translations * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public TranslationControllerDeleteTranslationGroupEndpointRequestBuilder removeGroup() { @@ -315,6 +354,9 @@ public TranslationControllerDeleteTranslationGroupEndpointRequestBuilder removeG * *

Delete an entire translation group and all its translations * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @return {@code CompletableFuture} - The async response @@ -330,6 +372,9 @@ public CompletableFutureDelete an entire translation group and all its translations * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param idempotencyKey A header for idempotency purposes @@ -355,6 +400,9 @@ public CompletableFutureRetrieves a single translation group by resource type (workflow, layout) and resource ID * (workflowId, layoutId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public TranslationControllerGetTranslationGroupEndpointRequestBuilder groupDetails() { @@ -367,6 +415,9 @@ public TranslationControllerGetTranslationGroupEndpointRequestBuilder groupDetai *

Retrieves a single translation group by resource type (workflow, layout) and resource ID * (workflowId, layoutId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @return {@code CompletableFuture} - The async response @@ -383,6 +434,9 @@ public CompletableFutureRetrieves a single translation group by resource type (workflow, layout) and resource ID * (workflowId, layoutId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param idempotencyKey A header for idempotency purposes @@ -407,6 +461,9 @@ public CompletableFutureRetrieve all translations for a locale in master JSON format organized by resourceId (workflowId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public TranslationControllerGetMasterJsonEndpointRequestBuilder getMaster() { @@ -418,6 +475,9 @@ public TranslationControllerGetMasterJsonEndpointRequestBuilder getMaster() { * *

Retrieve all translations for a locale in master JSON format organized by resourceId (workflowId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return {@code CompletableFuture} - The async response */ public CompletableFuture getMasterDirect() { @@ -429,6 +489,9 @@ public CompletableFuture get * *

Retrieve all translations for a locale in master JSON format organized by resourceId (workflowId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param locale Locale to export. If not provided, exports organization default locale * @param idempotencyKey A header for idempotency purposes * @param options additional options @@ -452,6 +515,9 @@ public CompletableFuture get * *

Import translations for multiple workflows from master JSON format for a specific locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public TranslationControllerImportMasterJsonEndpointRequestBuilder importMaster() { @@ -463,6 +529,9 @@ public TranslationControllerImportMasterJsonEndpointRequestBuilder importMaster( * *

Import translations for multiple workflows from master JSON format for a specific locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body * @return {@code CompletableFuture} - The async response */ @@ -475,6 +544,9 @@ public CompletableFuture * *

Import translations for multiple workflows from master JSON format for a specific locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options @@ -499,6 +571,9 @@ public CompletableFuture *

Upload a master JSON file containing translations for multiple workflows. Locale is automatically * detected from filename (e.g., en_US.json) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The async call builder */ public TranslationControllerUploadMasterJsonEndpointRequestBuilder masterUpload() { @@ -511,6 +586,9 @@ public TranslationControllerUploadMasterJsonEndpointRequestBuilder masterUpload( *

Upload a master JSON file containing translations for multiple workflows. Locale is automatically * detected from filename (e.g., en_US.json) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body * @return {@code CompletableFuture} - The async response */ @@ -524,6 +602,9 @@ public CompletableFuture *

Upload a master JSON file containing translations for multiple workflows. Locale is automatically * detected from filename (e.g., en_US.json) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options diff --git a/src/main/java/co/novu/AsyncWorkflowsSteps.java b/src/main/java/co/novu/AsyncWorkflowsSteps.java new file mode 100644 index 00000000..8aa1102b --- /dev/null +++ b/src/main/java/co/novu/AsyncWorkflowsSteps.java @@ -0,0 +1,97 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.models.components.GeneratePreviewRequestDto; +import co.novu.models.operations.WorkflowControllerGeneratePreviewRequest; +import co.novu.models.operations.async.WorkflowControllerGeneratePreviewRequestBuilder; +import co.novu.models.operations.async.WorkflowControllerGeneratePreviewResponse; +import co.novu.operations.WorkflowControllerGeneratePreview; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + + +public class AsyncWorkflowsSteps { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final WorkflowsSteps syncSDK; + + AsyncWorkflowsSteps(WorkflowsSteps syncSDK, SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.syncSDK = syncSDK; + } + + /** + * Switches to the sync SDK. + * + * @return The sync SDK + */ + public WorkflowsSteps sync() { + return syncSDK; + } + + + /** + * Generate a step preview + * + *

Generates a preview for a specific workflow step by its unique identifier **stepId** + * + * @return The async call builder + */ + public WorkflowControllerGeneratePreviewRequestBuilder generatePreview() { + return new WorkflowControllerGeneratePreviewRequestBuilder(sdkConfiguration); + } + + /** + * Generate a step preview + * + *

Generates a preview for a specific workflow step by its unique identifier **stepId** + * + * @param workflowId + * @param stepId + * @param body + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture generatePreview( + @Nonnull String workflowId, @Nonnull String stepId, + @Nonnull GeneratePreviewRequestDto body) { + return generatePreview( + workflowId, stepId, null, + body, null); + } + + /** + * Generate a step preview + * + *

Generates a preview for a specific workflow step by its unique identifier **stepId** + * + * @param workflowId + * @param stepId + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return {@code CompletableFuture} - The async response + */ + public CompletableFuture generatePreview( + @Nonnull String workflowId, @Nonnull String stepId, + @Nullable String idempotencyKey, @Nonnull GeneratePreviewRequestDto body, + @Nullable Options options) { + WorkflowControllerGeneratePreviewRequest request = new WorkflowControllerGeneratePreviewRequest( + workflowId, stepId, idempotencyKey, + body); + AsyncRequestOperation operation + = new WorkflowControllerGeneratePreview.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(request) + .thenCompose(operation::handleResponse); + } + +} diff --git a/src/main/java/co/novu/ChannelEndpoints.java b/src/main/java/co/novu/ChannelEndpoints.java index 27084444..151e3038 100644 --- a/src/main/java/co/novu/ChannelEndpoints.java +++ b/src/main/java/co/novu/ChannelEndpoints.java @@ -58,6 +58,9 @@ public AsyncChannelEndpoints async() { * *

List all channel endpoints for a resource based on query filters. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public ChannelEndpointsControllerListChannelEndpointsRequestBuilder list() { @@ -69,6 +72,9 @@ public ChannelEndpointsControllerListChannelEndpointsRequestBuilder list() { * *

List all channel endpoints for a resource based on query filters. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -82,6 +88,9 @@ public ChannelEndpointsControllerListChannelEndpointsResponse list(@Nonnull Chan * *

List all channel endpoints for a resource based on query filters. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param request The request object containing all the parameters for the API call. * @param options additional options * @return The response from the API call @@ -98,6 +107,9 @@ public ChannelEndpointsControllerListChannelEndpointsResponse list(@Nonnull Chan * *

Create a new channel endpoint for a resource. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public ChannelEndpointsControllerCreateChannelEndpointRequestBuilder create() { @@ -109,6 +121,9 @@ public ChannelEndpointsControllerCreateChannelEndpointRequestBuilder create() { * *

Create a new channel endpoint for a resource. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body Channel endpoint creation request. The structure varies based on the type field. * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -122,6 +137,9 @@ public ChannelEndpointsControllerCreateChannelEndpointResponse create(@Nonnull C * *

Create a new channel endpoint for a resource. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body Channel endpoint creation request. The structure varies based on the type field. * @param options additional options @@ -142,6 +160,9 @@ public ChannelEndpointsControllerCreateChannelEndpointResponse create( * *

Retrieve a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public ChannelEndpointsControllerGetChannelEndpointRequestBuilder get() { @@ -153,6 +174,9 @@ public ChannelEndpointsControllerGetChannelEndpointRequestBuilder get() { * *

Retrieve a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -166,6 +190,9 @@ public ChannelEndpointsControllerGetChannelEndpointResponse get(@Nonnull String * *

Retrieve a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @param idempotencyKey A header for idempotency purposes * @param options additional options @@ -186,6 +213,9 @@ public ChannelEndpointsControllerGetChannelEndpointResponse get( * *

Update an existing channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public ChannelEndpointsControllerUpdateChannelEndpointRequestBuilder update() { @@ -197,6 +227,9 @@ public ChannelEndpointsControllerUpdateChannelEndpointRequestBuilder update() { * *

Update an existing channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @param body * @return The response from the API call @@ -212,6 +245,9 @@ public ChannelEndpointsControllerUpdateChannelEndpointResponse update(@Nonnull S * *

Update an existing channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @param idempotencyKey A header for idempotency purposes * @param body @@ -233,6 +269,9 @@ public ChannelEndpointsControllerUpdateChannelEndpointResponse update( * *

Delete a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public ChannelEndpointsControllerDeleteChannelEndpointRequestBuilder delete() { @@ -244,6 +283,9 @@ public ChannelEndpointsControllerDeleteChannelEndpointRequestBuilder delete() { * *

Delete a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -257,6 +299,9 @@ public ChannelEndpointsControllerDeleteChannelEndpointResponse delete(@Nonnull S * *

Delete a specific channel endpoint by its unique identifier. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param identifier The unique identifier of the channel endpoint * @param idempotencyKey A header for idempotency purposes * @param options additional options diff --git a/src/main/java/co/novu/EnvironmentVariables.java b/src/main/java/co/novu/EnvironmentVariables.java new file mode 100644 index 00000000..934ba1ee --- /dev/null +++ b/src/main/java/co/novu/EnvironmentVariables.java @@ -0,0 +1,338 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.models.components.CreateEnvironmentVariableRequestDto; +import co.novu.models.components.UpdateEnvironmentVariableRequestDto; +import co.novu.models.operations.EnvironmentVariablesControllerCreateEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder; +import co.novu.models.operations.EnvironmentVariablesControllerCreateEnvironmentVariableResponse; +import co.novu.models.operations.EnvironmentVariablesControllerDeleteEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder; +import co.novu.models.operations.EnvironmentVariablesControllerDeleteEnvironmentVariableResponse; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableResponse; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse; +import co.novu.models.operations.EnvironmentVariablesControllerListEnvironmentVariablesRequest; +import co.novu.models.operations.EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder; +import co.novu.models.operations.EnvironmentVariablesControllerListEnvironmentVariablesResponse; +import co.novu.models.operations.EnvironmentVariablesControllerUpdateEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder; +import co.novu.models.operations.EnvironmentVariablesControllerUpdateEnvironmentVariableResponse; +import co.novu.operations.EnvironmentVariablesControllerCreateEnvironmentVariable; +import co.novu.operations.EnvironmentVariablesControllerDeleteEnvironmentVariable; +import co.novu.operations.EnvironmentVariablesControllerGetEnvironmentVariable; +import co.novu.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsage; +import co.novu.operations.EnvironmentVariablesControllerListEnvironmentVariables; +import co.novu.operations.EnvironmentVariablesControllerUpdateEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + + +public class EnvironmentVariables { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final AsyncEnvironmentVariables asyncSDK; + + EnvironmentVariables(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncEnvironmentVariables(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncEnvironmentVariables async() { + return asyncSDK; + } + + /** + * List all variables + * + *

Returns all environment variables for the current organization. Secret values are masked. + * + * @return The call builder + */ + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder list() { + return new EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder(sdkConfiguration); + } + + /** + * List all variables + * + *

Returns all environment variables for the current organization. Secret values are masked. + * + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse listDirect() { + return list(null, null, null); + } + + /** + * List all variables + * + *

Returns all environment variables for the current organization. Secret values are masked. + * + * @param search Filter variables by key (case-insensitive partial match) + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse list( + @Nullable String search, @Nullable String idempotencyKey, + @Nullable Options options) { + EnvironmentVariablesControllerListEnvironmentVariablesRequest request = new EnvironmentVariablesControllerListEnvironmentVariablesRequest(search, idempotencyKey); + RequestOperation operation + = new EnvironmentVariablesControllerListEnvironmentVariables.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Create a variable + * + *

Creates a new environment variable. Keys must be uppercase with underscores only (e.g. BASE_URL). + * + *

Secret variables are encrypted at rest and masked in API responses. + * + * @return The call builder + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder create() { + return new EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder(sdkConfiguration); + } + + /** + * Create a variable + * + *

Creates a new environment variable. Keys must be uppercase with underscores only (e.g. BASE_URL). + * + *

Secret variables are encrypted at rest and masked in API responses. + * + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse create(@Nonnull CreateEnvironmentVariableRequestDto body) { + return create(null, body, null); + } + + /** + * Create a variable + * + *

Creates a new environment variable. Keys must be uppercase with underscores only (e.g. BASE_URL). + * + *

Secret variables are encrypted at rest and masked in API responses. + * + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse create( + @Nullable String idempotencyKey, @Nonnull CreateEnvironmentVariableRequestDto body, + @Nullable Options options) { + EnvironmentVariablesControllerCreateEnvironmentVariableRequest request = new EnvironmentVariablesControllerCreateEnvironmentVariableRequest(idempotencyKey, body); + RequestOperation operation + = new EnvironmentVariablesControllerCreateEnvironmentVariable.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Get environment variable + * + *

Returns a single environment variable by key. Secret values are masked. + * + * @return The call builder + */ + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder retrieve() { + return new EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder(sdkConfiguration); + } + + /** + * Get environment variable + * + *

Returns a single environment variable by key. Secret values are masked. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse retrieve(@Nonnull String variableKey) { + return retrieve(variableKey, null, null); + } + + /** + * Get environment variable + * + *

Returns a single environment variable by key. Secret values are masked. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse retrieve( + @Nonnull String variableKey, @Nullable String idempotencyKey, + @Nullable Options options) { + EnvironmentVariablesControllerGetEnvironmentVariableRequest request = new EnvironmentVariablesControllerGetEnvironmentVariableRequest(variableKey, idempotencyKey); + RequestOperation operation + = new EnvironmentVariablesControllerGetEnvironmentVariable.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Update a variable + * + *

Updates an existing environment variable. Providing values replaces all existing per-environment + * values. + * + * @return The call builder + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder update() { + return new EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder(sdkConfiguration); + } + + /** + * Update a variable + * + *

Updates an existing environment variable. Providing values replaces all existing per-environment + * values. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse update(@Nonnull String variableKey, @Nonnull UpdateEnvironmentVariableRequestDto body) { + return update(variableKey, null, body, + null); + } + + /** + * Update a variable + * + *

Updates an existing environment variable. Providing values replaces all existing per-environment + * values. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse update( + @Nonnull String variableKey, @Nullable String idempotencyKey, + @Nonnull UpdateEnvironmentVariableRequestDto body, @Nullable Options options) { + EnvironmentVariablesControllerUpdateEnvironmentVariableRequest request = new EnvironmentVariablesControllerUpdateEnvironmentVariableRequest(variableKey, idempotencyKey, body); + RequestOperation operation + = new EnvironmentVariablesControllerUpdateEnvironmentVariable.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete environment variable + * + *

Deletes an environment variable by key. + * + * @return The call builder + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder delete() { + return new EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder(sdkConfiguration); + } + + /** + * Delete environment variable + * + *

Deletes an environment variable by key. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse delete(@Nonnull String variableKey) { + return delete(variableKey, null, null); + } + + /** + * Delete environment variable + * + *

Deletes an environment variable by key. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse delete( + @Nonnull String variableKey, @Nullable String idempotencyKey, + @Nullable Options options) { + EnvironmentVariablesControllerDeleteEnvironmentVariableRequest request = new EnvironmentVariablesControllerDeleteEnvironmentVariableRequest(variableKey, idempotencyKey); + RequestOperation operation + = new EnvironmentVariablesControllerDeleteEnvironmentVariable.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Retrieve a variable usage + * + *

Returns the workflows that reference this environment variable via `{{env.KEY}}` in their step + * controls. **variableId** is required. + * + * @return The call builder + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder usage() { + return new EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve a variable usage + * + *

Returns the workflows that reference this environment variable via `{{env.KEY}}` in their step + * controls. **variableId** is required. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse usage(@Nonnull String variableKey) { + return usage(variableKey, null, null); + } + + /** + * Retrieve a variable usage + * + *

Returns the workflows that reference this environment variable via `{{env.KEY}}` in their step + * controls. **variableId** is required. + * + * @param variableKey The unique key of the environment variable (e.g. BASE_URL) + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse usage( + @Nonnull String variableKey, @Nullable String idempotencyKey, + @Nullable Options options) { + EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest request = new EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest(variableKey, idempotencyKey); + RequestOperation operation + = new EnvironmentVariablesControllerGetEnvironmentVariableUsage.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/co/novu/Environments.java b/src/main/java/co/novu/Environments.java index 6ee468d5..af39c704 100644 --- a/src/main/java/co/novu/Environments.java +++ b/src/main/java/co/novu/Environments.java @@ -6,7 +6,15 @@ import static co.novu.operations.Operations.RequestOperation; import co.novu.models.components.CreateEnvironmentRequestDto; +import co.novu.models.components.DiffEnvironmentRequestDto; +import co.novu.models.components.PublishEnvironmentRequestDto; import co.novu.models.components.UpdateEnvironmentRequestDto; +import co.novu.models.operations.EnvironmentsControllerDiffEnvironmentRequest; +import co.novu.models.operations.EnvironmentsControllerDiffEnvironmentRequestBuilder; +import co.novu.models.operations.EnvironmentsControllerDiffEnvironmentResponse; +import co.novu.models.operations.EnvironmentsControllerPublishEnvironmentRequest; +import co.novu.models.operations.EnvironmentsControllerPublishEnvironmentRequestBuilder; +import co.novu.models.operations.EnvironmentsControllerPublishEnvironmentResponse; import co.novu.models.operations.EnvironmentsControllerV1CreateEnvironmentRequest; import co.novu.models.operations.EnvironmentsControllerV1CreateEnvironmentRequestBuilder; import co.novu.models.operations.EnvironmentsControllerV1CreateEnvironmentResponse; @@ -19,6 +27,8 @@ import co.novu.models.operations.EnvironmentsControllerV1UpdateMyEnvironmentRequest; import co.novu.models.operations.EnvironmentsControllerV1UpdateMyEnvironmentRequestBuilder; import co.novu.models.operations.EnvironmentsControllerV1UpdateMyEnvironmentResponse; +import co.novu.operations.EnvironmentsControllerDiffEnvironment; +import co.novu.operations.EnvironmentsControllerPublishEnvironment; import co.novu.operations.EnvironmentsControllerV1CreateEnvironment; import co.novu.operations.EnvironmentsControllerV1DeleteEnvironment; import co.novu.operations.EnvironmentsControllerV1ListMyEnvironments; @@ -61,6 +71,106 @@ public AsyncEnvironments async() { return asyncSDK; } + /** + * Compare resources between environments + * + *

Compares workflows and other resources between the source and target environments, returning + * detailed diff information including additions, modifications, and deletions. + * + * @return The call builder + */ + public EnvironmentsControllerDiffEnvironmentRequestBuilder diff() { + return new EnvironmentsControllerDiffEnvironmentRequestBuilder(sdkConfiguration); + } + + /** + * Compare resources between environments + * + *

Compares workflows and other resources between the source and target environments, returning + * detailed diff information including additions, modifications, and deletions. + * + * @param targetEnvironmentId Target environment ID (MongoDB ObjectId) to compare against + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentsControllerDiffEnvironmentResponse diff(@Nonnull String targetEnvironmentId, @Nonnull DiffEnvironmentRequestDto body) { + return diff(targetEnvironmentId, null, body, + null); + } + + /** + * Compare resources between environments + * + *

Compares workflows and other resources between the source and target environments, returning + * detailed diff information including additions, modifications, and deletions. + * + * @param targetEnvironmentId Target environment ID (MongoDB ObjectId) to compare against + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentsControllerDiffEnvironmentResponse diff( + @Nonnull String targetEnvironmentId, @Nullable String idempotencyKey, + @Nonnull DiffEnvironmentRequestDto body, @Nullable Options options) { + EnvironmentsControllerDiffEnvironmentRequest request = new EnvironmentsControllerDiffEnvironmentRequest(targetEnvironmentId, idempotencyKey, body); + RequestOperation operation + = new EnvironmentsControllerDiffEnvironment.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Publish resources to target environment + * + *

Publishes all workflows and resources from the source environment to the target environment. + * Optionally specify specific resources to publish or use dryRun mode to preview changes. + * + * @return The call builder + */ + public EnvironmentsControllerPublishEnvironmentRequestBuilder publish() { + return new EnvironmentsControllerPublishEnvironmentRequestBuilder(sdkConfiguration); + } + + /** + * Publish resources to target environment + * + *

Publishes all workflows and resources from the source environment to the target environment. + * Optionally specify specific resources to publish or use dryRun mode to preview changes. + * + * @param targetEnvironmentId Target environment ID (MongoDB ObjectId) to publish resources to + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentsControllerPublishEnvironmentResponse publish(@Nonnull String targetEnvironmentId, @Nonnull PublishEnvironmentRequestDto body) { + return publish(targetEnvironmentId, null, body, + null); + } + + /** + * Publish resources to target environment + * + *

Publishes all workflows and resources from the source environment to the target environment. + * Optionally specify specific resources to publish or use dryRun mode to preview changes. + * + * @param targetEnvironmentId Target environment ID (MongoDB ObjectId) to publish resources to + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public EnvironmentsControllerPublishEnvironmentResponse publish( + @Nonnull String targetEnvironmentId, @Nullable String idempotencyKey, + @Nonnull PublishEnvironmentRequestDto body, @Nullable Options options) { + EnvironmentsControllerPublishEnvironmentRequest request = new EnvironmentsControllerPublishEnvironmentRequest(targetEnvironmentId, idempotencyKey, body); + RequestOperation operation + = new EnvironmentsControllerPublishEnvironment.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + /** * Create an environment * diff --git a/src/main/java/co/novu/Novu.java b/src/main/java/co/novu/Novu.java index 8c8f8691..346146f4 100644 --- a/src/main/java/co/novu/Novu.java +++ b/src/main/java/co/novu/Novu.java @@ -120,11 +120,17 @@ public class Novu { private final Workflows workflows; + private final WorkflowsSteps workflowsSteps; + + private final ChannelConnections channelConnections; private final ChannelEndpoints channelEndpoints; + + private final EnvironmentVariables environmentVariables; + /** * With the help of the Integration Store, you can easily integrate your favorite delivery provider. * During the runtime of the API, the Integrations Store is responsible for storing the configurations @@ -150,7 +156,7 @@ public class Novu { private final SubscribersMessages2 subscribersMessages; - private final SubscribersNotifications1 subscribersNotifications; + private final SubscribersNotifications2 subscribersNotifications; private final SubscribersProperties subscribersProperties; @@ -236,6 +242,11 @@ public Workflows workflows() { } + public WorkflowsSteps workflowsSteps() { + return workflowsSteps; + } + + public ChannelConnections channelConnections() { return channelConnections; } @@ -245,6 +256,11 @@ public ChannelEndpoints channelEndpoints() { return channelEndpoints; } + + public EnvironmentVariables environmentVariables() { + return environmentVariables; + } + /** * With the help of the Integration Store, you can easily integrate your favorite delivery provider. * During the runtime of the API, the Integrations Store is responsible for storing the configurations @@ -278,7 +294,7 @@ public SubscribersMessages2 subscribersMessages() { } - public SubscribersNotifications1 subscribersNotifications() { + public SubscribersNotifications2 subscribersNotifications() { return subscribersNotifications; } @@ -445,13 +461,15 @@ public Novu(SDKConfiguration sdkConfiguration) { this.topics = new Topics(sdkConfiguration); this.translations = new Translations(sdkConfiguration); this.workflows = new Workflows(sdkConfiguration); + this.workflowsSteps = new WorkflowsSteps(sdkConfiguration); this.channelConnections = new ChannelConnections(sdkConfiguration); this.channelEndpoints = new ChannelEndpoints(sdkConfiguration); + this.environmentVariables = new EnvironmentVariables(sdkConfiguration); this.integrations = new Integrations(sdkConfiguration); this.messages = new Messages(sdkConfiguration); this.notifications = new Notifications(sdkConfiguration); this.subscribersMessages = new SubscribersMessages2(sdkConfiguration); - this.subscribersNotifications = new SubscribersNotifications1(sdkConfiguration); + this.subscribersNotifications = new SubscribersNotifications2(sdkConfiguration); this.subscribersProperties = new SubscribersProperties(sdkConfiguration); sdkConfiguration = sdkConfiguration.hooks().sdkInit(sdkConfiguration); this.asyncSDK = new AsyncNovu(this, sdkConfiguration); diff --git a/src/main/java/co/novu/Preferences.java b/src/main/java/co/novu/Preferences.java index 1b5f7ce4..de99c6f6 100644 --- a/src/main/java/co/novu/Preferences.java +++ b/src/main/java/co/novu/Preferences.java @@ -60,7 +60,7 @@ public SubscribersControllerGetSubscriberPreferencesRequestBuilder list() { *

Retrieve subscriber channel preferences by its unique key identifier **subscriberId**. * This API returns all five channels preferences for all workflows and global preferences. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ @@ -75,7 +75,7 @@ public SubscribersControllerGetSubscriberPreferencesResponse list(@Nonnull Strin *

Retrieve subscriber channel preferences by its unique key identifier **subscriberId**. * This API returns all five channels preferences for all workflows and global preferences. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param criticality * @param contextKeys Context keys for filtering preferences (e.g., ["tenant:acme"]) * @param idempotencyKey A header for idempotency purposes @@ -113,7 +113,7 @@ public SubscribersControllerBulkUpdateSubscriberPreferencesRequestBuilder bulkUp *

Bulk update subscriber preferences by its unique key identifier **subscriberId**. * This API allows updating multiple workflow preferences in a single request. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param body * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -129,7 +129,7 @@ public SubscribersControllerBulkUpdateSubscriberPreferencesResponse bulkUpdate(@ *

Bulk update subscriber preferences by its unique key identifier **subscriberId**. * This API allows updating multiple workflow preferences in a single request. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options diff --git a/src/main/java/co/novu/SDKConfiguration.java b/src/main/java/co/novu/SDKConfiguration.java index 992ece48..8e65b871 100644 --- a/src/main/java/co/novu/SDKConfiguration.java +++ b/src/main/java/co/novu/SDKConfiguration.java @@ -18,9 +18,9 @@ public class SDKConfiguration { private static final String LANGUAGE = "java"; - public static final String OPENAPI_DOC_VERSION = "3.14.0"; - public static final String SDK_VERSION = "3.14.0"; - public static final String GEN_VERSION = "2.845.10"; + public static final String OPENAPI_DOC_VERSION = "3.15.0"; + public static final String SDK_VERSION = "3.15.0"; + public static final String GEN_VERSION = "2.879.11"; private static final String BASE_PACKAGE = "co.novu"; public static final String USER_AGENT = String.format("speakeasy-sdk/%s %s %s %s %s", diff --git a/src/main/java/co/novu/Subscribers.java b/src/main/java/co/novu/Subscribers.java index abdbca9d..6722b11f 100644 --- a/src/main/java/co/novu/Subscribers.java +++ b/src/main/java/co/novu/Subscribers.java @@ -70,20 +70,24 @@ public class Subscribers { private static final Headers _headers = Headers.EMPTY; private final SDKConfiguration sdkConfiguration; private final AsyncSubscribers asyncSDK; + private final SubscribersNotifications1 notifications; private final Preferences preferences; private final Credentials credentials; private final SubscribersMessages1 messages; - private final SubscribersNotifications2 notifications; Subscribers(SDKConfiguration sdkConfiguration) { this.sdkConfiguration = sdkConfiguration; + this.notifications = new SubscribersNotifications1(this.sdkConfiguration); this.preferences = new Preferences(this.sdkConfiguration); this.credentials = new Credentials(this.sdkConfiguration); this.messages = new SubscribersMessages1(this.sdkConfiguration); - this.notifications = new SubscribersNotifications2(this.sdkConfiguration); this.asyncSDK = new AsyncSubscribers(this, sdkConfiguration); } + public final SubscribersNotifications1 notifications() { + return notifications; + } + public final Preferences preferences() { return preferences; } @@ -96,10 +100,6 @@ public final SubscribersMessages1 messages() { return messages; } - public final SubscribersNotifications2 notifications() { - return notifications; - } - /** * Switches to the async SDK. * @@ -225,7 +225,7 @@ public SubscribersControllerGetSubscriberRequestBuilder get() { *

Retrieve a subscriber by its unique key identifier **subscriberId**. * **subscriberId** field is required. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ @@ -239,7 +239,7 @@ public SubscribersControllerGetSubscriberResponse get(@Nonnull String subscriber *

Retrieve a subscriber by its unique key identifier **subscriberId**. * **subscriberId** field is required. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param idempotencyKey A header for idempotency purposes * @param options additional options * @return The response from the API call @@ -272,7 +272,7 @@ public SubscribersControllerPatchSubscriberRequestBuilder update() { *

Update a subscriber by its unique key identifier **subscriberId**. * **subscriberId** is a required field, rest other fields are optional * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param body * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -288,7 +288,7 @@ public SubscribersControllerPatchSubscriberResponse update(@Nonnull String subsc *

Update a subscriber by its unique key identifier **subscriberId**. * **subscriberId** is a required field, rest other fields are optional * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options @@ -324,7 +324,7 @@ public SubscribersControllerRemoveSubscriberRequestBuilder delete() { * topic subscriptions. * **subscriberId** is a required field. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ @@ -339,7 +339,7 @@ public SubscribersControllerRemoveSubscriberResponse delete(@Nonnull String subs * topic subscriptions. * **subscriberId** is a required field. * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param idempotencyKey A header for idempotency purposes * @param options additional options * @return The response from the API call @@ -421,7 +421,7 @@ public SubscribersControllerUpdateSubscriberPreferencesRequestBuilder updatePref * **workflowId** is optional field, if provided, this API will update that workflow preference, * otherwise it will update global preferences * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param body * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -438,7 +438,7 @@ public SubscribersControllerUpdateSubscriberPreferencesResponse updatePreference * **workflowId** is optional field, if provided, this API will update that workflow preference, * otherwise it will update global preferences * - * @param subscriberId + * @param subscriberId The identifier of the subscriber * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options diff --git a/src/main/java/co/novu/SubscribersNotifications1.java b/src/main/java/co/novu/SubscribersNotifications1.java index 69501ce4..82c5c969 100644 --- a/src/main/java/co/novu/SubscribersNotifications1.java +++ b/src/main/java/co/novu/SubscribersNotifications1.java @@ -5,14 +5,84 @@ import static co.novu.operations.Operations.RequestOperation; -import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedRequest; -import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedRequestBuilder; -import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedResponse; -import co.novu.operations.SubscribersV1ControllerGetNotificationsFeed; +import co.novu.models.components.MarkSubscriberNotificationsAsSeenDto; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.models.operations.SubscribersControllerArchiveAllNotificationsRequest; +import co.novu.models.operations.SubscribersControllerArchiveAllNotificationsRequestBuilder; +import co.novu.models.operations.SubscribersControllerArchiveAllNotificationsResponse; +import co.novu.models.operations.SubscribersControllerArchiveAllReadNotificationsRequest; +import co.novu.models.operations.SubscribersControllerArchiveAllReadNotificationsRequestBuilder; +import co.novu.models.operations.SubscribersControllerArchiveAllReadNotificationsResponse; +import co.novu.models.operations.SubscribersControllerArchiveNotificationRequest; +import co.novu.models.operations.SubscribersControllerArchiveNotificationRequestBuilder; +import co.novu.models.operations.SubscribersControllerArchiveNotificationResponse; +import co.novu.models.operations.SubscribersControllerCompleteNotificationActionRequest; +import co.novu.models.operations.SubscribersControllerCompleteNotificationActionRequestBuilder; +import co.novu.models.operations.SubscribersControllerCompleteNotificationActionResponse; +import co.novu.models.operations.SubscribersControllerDeleteAllNotificationsRequest; +import co.novu.models.operations.SubscribersControllerDeleteAllNotificationsRequestBuilder; +import co.novu.models.operations.SubscribersControllerDeleteAllNotificationsResponse; +import co.novu.models.operations.SubscribersControllerDeleteNotificationRequest; +import co.novu.models.operations.SubscribersControllerDeleteNotificationRequestBuilder; +import co.novu.models.operations.SubscribersControllerDeleteNotificationResponse; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsCountRequest; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsCountRequestBuilder; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsCountResponse; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsRequest; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsRequestBuilder; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsResponse; +import co.novu.models.operations.SubscribersControllerMarkAllNotificationsAsReadRequest; +import co.novu.models.operations.SubscribersControllerMarkAllNotificationsAsReadRequestBuilder; +import co.novu.models.operations.SubscribersControllerMarkAllNotificationsAsReadResponse; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsReadRequest; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsReadRequestBuilder; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsReadResponse; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsUnreadRequest; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsUnreadRequestBuilder; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsUnreadResponse; +import co.novu.models.operations.SubscribersControllerMarkNotificationsAsSeenRequest; +import co.novu.models.operations.SubscribersControllerMarkNotificationsAsSeenRequestBuilder; +import co.novu.models.operations.SubscribersControllerMarkNotificationsAsSeenResponse; +import co.novu.models.operations.SubscribersControllerRevertNotificationActionRequest; +import co.novu.models.operations.SubscribersControllerRevertNotificationActionRequestBuilder; +import co.novu.models.operations.SubscribersControllerRevertNotificationActionResponse; +import co.novu.models.operations.SubscribersControllerSnoozeNotificationRequest; +import co.novu.models.operations.SubscribersControllerSnoozeNotificationRequestBuilder; +import co.novu.models.operations.SubscribersControllerSnoozeNotificationResponse; +import co.novu.models.operations.SubscribersControllerUnarchiveNotificationRequest; +import co.novu.models.operations.SubscribersControllerUnarchiveNotificationRequestBuilder; +import co.novu.models.operations.SubscribersControllerUnarchiveNotificationResponse; +import co.novu.models.operations.SubscribersControllerUnsnoozeNotificationRequest; +import co.novu.models.operations.SubscribersControllerUnsnoozeNotificationRequestBuilder; +import co.novu.models.operations.SubscribersControllerUnsnoozeNotificationResponse; +import co.novu.models.operations.SubscribersV1ControllerGetUnseenCountRequest; +import co.novu.models.operations.SubscribersV1ControllerGetUnseenCountRequestBuilder; +import co.novu.models.operations.SubscribersV1ControllerGetUnseenCountResponse; +import co.novu.operations.SubscribersControllerArchiveAllNotifications; +import co.novu.operations.SubscribersControllerArchiveAllReadNotifications; +import co.novu.operations.SubscribersControllerArchiveNotification; +import co.novu.operations.SubscribersControllerCompleteNotificationAction; +import co.novu.operations.SubscribersControllerDeleteAllNotifications; +import co.novu.operations.SubscribersControllerDeleteNotification; +import co.novu.operations.SubscribersControllerGetSubscriberNotifications; +import co.novu.operations.SubscribersControllerGetSubscriberNotificationsCount; +import co.novu.operations.SubscribersControllerMarkAllNotificationsAsRead; +import co.novu.operations.SubscribersControllerMarkNotificationAsRead; +import co.novu.operations.SubscribersControllerMarkNotificationAsUnread; +import co.novu.operations.SubscribersControllerMarkNotificationsAsSeen; +import co.novu.operations.SubscribersControllerRevertNotificationAction; +import co.novu.operations.SubscribersControllerSnoozeNotification; +import co.novu.operations.SubscribersControllerUnarchiveNotification; +import co.novu.operations.SubscribersControllerUnsnoozeNotification; +import co.novu.operations.SubscribersV1ControllerGetUnseenCount; import co.novu.utils.Headers; import co.novu.utils.Options; import jakarta.annotation.Nonnull; import jakarta.annotation.Nullable; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.String; +import java.util.List; public class SubscribersNotifications1 { @@ -37,40 +107,843 @@ public AsyncSubscribersNotifications1 async() { /** * Retrieve subscriber notifications * - *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. + *

Retrieve in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports filtering by tags, read/archived/snoozed/seen state, data attributes, severity, date range, + * and context keys. * * @return The call builder */ - public SubscribersV1ControllerGetNotificationsFeedRequestBuilder getFeed() { - return new SubscribersV1ControllerGetNotificationsFeedRequestBuilder(sdkConfiguration); + public SubscribersControllerGetSubscriberNotificationsRequestBuilder list() { + return new SubscribersControllerGetSubscriberNotificationsRequestBuilder(sdkConfiguration); } /** * Retrieve subscriber notifications * - *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. + *

Retrieve in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports filtering by tags, read/archived/snoozed/seen state, data attributes, severity, date range, + * and context keys. * * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public SubscribersV1ControllerGetNotificationsFeedResponse getFeed(@Nonnull SubscribersV1ControllerGetNotificationsFeedRequest request) { - return getFeed(request, null); + public SubscribersControllerGetSubscriberNotificationsResponse list(@Nonnull SubscribersControllerGetSubscriberNotificationsRequest request) { + return list(request, null); } /** * Retrieve subscriber notifications * - *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. + *

Retrieve in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports filtering by tags, read/archived/snoozed/seen state, data attributes, severity, date range, + * and context keys. * * @param request The request object containing all the parameters for the API call. * @param options additional options * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public SubscribersV1ControllerGetNotificationsFeedResponse getFeed(@Nonnull SubscribersV1ControllerGetNotificationsFeedRequest request, @Nullable Options options) { - RequestOperation operation - = new SubscribersV1ControllerGetNotificationsFeed.Sync(sdkConfiguration, options, _headers); + public SubscribersControllerGetSubscriberNotificationsResponse list(@Nonnull SubscribersControllerGetSubscriberNotificationsRequest request, @Nullable Options options) { + RequestOperation operation + = new SubscribersControllerGetSubscriberNotifications.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete a notification + * + *

Delete a specific in-app (inbox) notification permanently by its unique identifier + * **notificationId**. + * + * @return The call builder + */ + public SubscribersControllerDeleteNotificationRequestBuilder delete() { + return new SubscribersControllerDeleteNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Delete a notification + * + *

Delete a specific in-app (inbox) notification permanently by its unique identifier + * **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerDeleteNotificationResponse delete(@Nonnull String subscriberId, @Nonnull String notificationId) { + return delete(subscriberId, notificationId, null, + null, null); + } + + /** + * Delete a notification + * + *

Delete a specific in-app (inbox) notification permanently by its unique identifier + * **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerDeleteNotificationResponse delete( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerDeleteNotificationRequest request = new SubscribersControllerDeleteNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + RequestOperation operation + = new SubscribersControllerDeleteNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Complete a notification action + * + *

Mark a single in-app (inbox) notification's action (primary or secondary) as completed by its unique + * identifier **notificationId** and action type **actionType**. + * + * @return The call builder + */ + public SubscribersControllerCompleteNotificationActionRequestBuilder completeAction() { + return new SubscribersControllerCompleteNotificationActionRequestBuilder(sdkConfiguration); + } + + /** + * Complete a notification action + * + *

Mark a single in-app (inbox) notification's action (primary or secondary) as completed by its unique + * identifier **notificationId** and action type **actionType**. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerCompleteNotificationActionResponse completeAction(@Nonnull SubscribersControllerCompleteNotificationActionRequest request) { + return completeAction(request, null); + } + + /** + * Complete a notification action + * + *

Mark a single in-app (inbox) notification's action (primary or secondary) as completed by its unique + * identifier **notificationId** and action type **actionType**. + * + * @param request The request object containing all the parameters for the API call. + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerCompleteNotificationActionResponse completeAction(@Nonnull SubscribersControllerCompleteNotificationActionRequest request, @Nullable Options options) { + RequestOperation operation + = new SubscribersControllerCompleteNotificationAction.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Revert a notification action + * + *

Revert a single in-app (inbox) notification's action (primary or secondary) to pending state by its + * unique identifier **notificationId** and action type **actionType**. + * + * @return The call builder + */ + public SubscribersControllerRevertNotificationActionRequestBuilder revertAction() { + return new SubscribersControllerRevertNotificationActionRequestBuilder(sdkConfiguration); + } + + /** + * Revert a notification action + * + *

Revert a single in-app (inbox) notification's action (primary or secondary) to pending state by its + * unique identifier **notificationId** and action type **actionType**. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerRevertNotificationActionResponse revertAction(@Nonnull SubscribersControllerRevertNotificationActionRequest request) { + return revertAction(request, null); + } + + /** + * Revert a notification action + * + *

Revert a single in-app (inbox) notification's action (primary or secondary) to pending state by its + * unique identifier **notificationId** and action type **actionType**. + * + * @param request The request object containing all the parameters for the API call. + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerRevertNotificationActionResponse revertAction(@Nonnull SubscribersControllerRevertNotificationActionRequest request, @Nullable Options options) { + RequestOperation operation + = new SubscribersControllerRevertNotificationAction.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Archive a notification + * + *

Archive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @return The call builder + */ + public SubscribersControllerArchiveNotificationRequestBuilder archive() { + return new SubscribersControllerArchiveNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Archive a notification + * + *

Archive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerArchiveNotificationResponse archive(@Nonnull String subscriberId, @Nonnull String notificationId) { + return archive(subscriberId, notificationId, null, + null, null); + } + + /** + * Archive a notification + * + *

Archive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerArchiveNotificationResponse archive( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerArchiveNotificationRequest request = new SubscribersControllerArchiveNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + RequestOperation operation + = new SubscribersControllerArchiveNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Mark a notification as read + * + *

Mark a specific in-app (inbox) notification as read by its unique identifier **notificationId**. + * + * @return The call builder + */ + public SubscribersControllerMarkNotificationAsReadRequestBuilder markAsRead() { + return new SubscribersControllerMarkNotificationAsReadRequestBuilder(sdkConfiguration); + } + + /** + * Mark a notification as read + * + *

Mark a specific in-app (inbox) notification as read by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerMarkNotificationAsReadResponse markAsRead(@Nonnull String subscriberId, @Nonnull String notificationId) { + return markAsRead(subscriberId, notificationId, null, + null, null); + } + + /** + * Mark a notification as read + * + *

Mark a specific in-app (inbox) notification as read by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerMarkNotificationAsReadResponse markAsRead( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerMarkNotificationAsReadRequest request = new SubscribersControllerMarkNotificationAsReadRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + RequestOperation operation + = new SubscribersControllerMarkNotificationAsRead.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Snooze a notification + * + *

Snooze a specific in-app (inbox) notification by its unique identifier **notificationId** until a + * specified time. + * + * @return The call builder + */ + public SubscribersControllerSnoozeNotificationRequestBuilder snooze() { + return new SubscribersControllerSnoozeNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Snooze a notification + * + *

Snooze a specific in-app (inbox) notification by its unique identifier **notificationId** until a + * specified time. + * + * @param request The request object containing all the parameters for the API call. + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerSnoozeNotificationResponse snooze(@Nonnull SubscribersControllerSnoozeNotificationRequest request) { + return snooze(request, null); + } + + /** + * Snooze a notification + * + *

Snooze a specific in-app (inbox) notification by its unique identifier **notificationId** until a + * specified time. + * + * @param request The request object containing all the parameters for the API call. + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerSnoozeNotificationResponse snooze(@Nonnull SubscribersControllerSnoozeNotificationRequest request, @Nullable Options options) { + RequestOperation operation + = new SubscribersControllerSnoozeNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Unarchive a notification + * + *

Unarchive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @return The call builder + */ + public SubscribersControllerUnarchiveNotificationRequestBuilder unarchive() { + return new SubscribersControllerUnarchiveNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Unarchive a notification + * + *

Unarchive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerUnarchiveNotificationResponse unarchive(@Nonnull String subscriberId, @Nonnull String notificationId) { + return unarchive(subscriberId, notificationId, null, + null, null); + } + + /** + * Unarchive a notification + * + *

Unarchive a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerUnarchiveNotificationResponse unarchive( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerUnarchiveNotificationRequest request = new SubscribersControllerUnarchiveNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + RequestOperation operation + = new SubscribersControllerUnarchiveNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Mark a notification as unread + * + *

Mark a specific in-app (inbox) notification as unread by its unique identifier **notificationId**. + * + * @return The call builder + */ + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder markAsUnread() { + return new SubscribersControllerMarkNotificationAsUnreadRequestBuilder(sdkConfiguration); + } + + /** + * Mark a notification as unread + * + *

Mark a specific in-app (inbox) notification as unread by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerMarkNotificationAsUnreadResponse markAsUnread(@Nonnull String subscriberId, @Nonnull String notificationId) { + return markAsUnread(subscriberId, notificationId, null, + null, null); + } + + /** + * Mark a notification as unread + * + *

Mark a specific in-app (inbox) notification as unread by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerMarkNotificationAsUnreadResponse markAsUnread( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerMarkNotificationAsUnreadRequest request = new SubscribersControllerMarkNotificationAsUnreadRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + RequestOperation operation + = new SubscribersControllerMarkNotificationAsUnread.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Unsnooze a notification + * + *

Unsnooze a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @return The call builder + */ + public SubscribersControllerUnsnoozeNotificationRequestBuilder unsnooze() { + return new SubscribersControllerUnsnoozeNotificationRequestBuilder(sdkConfiguration); + } + + /** + * Unsnooze a notification + * + *

Unsnooze a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerUnsnoozeNotificationResponse unsnooze(@Nonnull String subscriberId, @Nonnull String notificationId) { + return unsnooze(subscriberId, notificationId, null, + null, null); + } + + /** + * Unsnooze a notification + * + *

Unsnooze a specific in-app (inbox) notification by its unique identifier **notificationId**. + * + * @param subscriberId The identifier of the subscriber + * @param notificationId The identifier of the notification + * @param contextKeys Context keys for filtering + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerUnsnoozeNotificationResponse unsnooze( + @Nonnull String subscriberId, @Nonnull String notificationId, + @Nullable List contextKeys, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersControllerUnsnoozeNotificationRequest request = new SubscribersControllerUnsnoozeNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + RequestOperation operation + = new SubscribersControllerUnsnoozeNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Archive all notifications + * + *

Archive all in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @return The call builder + */ + public SubscribersControllerArchiveAllNotificationsRequestBuilder archiveAll() { + return new SubscribersControllerArchiveAllNotificationsRequestBuilder(sdkConfiguration); + } + + /** + * Archive all notifications + * + *

Archive all in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerArchiveAllNotificationsResponse archiveAll(@Nonnull String subscriberId, @Nonnull UpdateAllSubscriberNotificationsDto body) { + return archiveAll(subscriberId, null, body, + null); + } + + /** + * Archive all notifications + * + *

Archive all in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerArchiveAllNotificationsResponse archiveAll( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body, @Nullable Options options) { + SubscribersControllerArchiveAllNotificationsRequest request = new SubscribersControllerArchiveAllNotificationsRequest(subscriberId, idempotencyKey, body); + RequestOperation operation + = new SubscribersControllerArchiveAllNotifications.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Retrieve subscriber notifications count + * + *

Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports multiple filters to count in-app (inbox) notifications by different criteria, including + * context keys. + * + * @return The call builder + */ + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder count() { + return new SubscribersControllerGetSubscriberNotificationsCountRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve subscriber notifications count + * + *

Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports multiple filters to count in-app (inbox) notifications by different criteria, including + * context keys. + * + * @param subscriberId The identifier of the subscriber + * @param filters Array of filter objects (max 30) to count notifications by different criteria + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse count(@Nonnull String subscriberId, @Nonnull String filters) { + return count(subscriberId, filters, null, + null); + } + + /** + * Retrieve subscriber notifications count + * + *

Retrieve count of in-app (inbox) notifications for a subscriber by its unique key identifier + * **subscriberId**. + * Supports multiple filters to count in-app (inbox) notifications by different criteria, including + * context keys. + * + * @param subscriberId The identifier of the subscriber + * @param filters Array of filter objects (max 30) to count notifications by different criteria + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse count( + @Nonnull String subscriberId, @Nonnull String filters, + @Nullable String idempotencyKey, @Nullable Options options) { + SubscribersControllerGetSubscriberNotificationsCountRequest request = new SubscribersControllerGetSubscriberNotificationsCountRequest(subscriberId, filters, idempotencyKey); + RequestOperation operation + = new SubscribersControllerGetSubscriberNotificationsCount.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Delete all notifications + * + *

Permanently delete all in-app (inbox) notifications matching the specified filters. Supports + * context-based filtering. + * + * @return The call builder + */ + public SubscribersControllerDeleteAllNotificationsRequestBuilder deleteAll() { + return new SubscribersControllerDeleteAllNotificationsRequestBuilder(sdkConfiguration); + } + + /** + * Delete all notifications + * + *

Permanently delete all in-app (inbox) notifications matching the specified filters. Supports + * context-based filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerDeleteAllNotificationsResponse deleteAll(@Nonnull String subscriberId, @Nonnull UpdateAllSubscriberNotificationsDto body) { + return deleteAll(subscriberId, null, body, + null); + } + + /** + * Delete all notifications + * + *

Permanently delete all in-app (inbox) notifications matching the specified filters. Supports + * context-based filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerDeleteAllNotificationsResponse deleteAll( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body, @Nullable Options options) { + SubscribersControllerDeleteAllNotificationsRequest request = new SubscribersControllerDeleteAllNotificationsRequest(subscriberId, idempotencyKey, body); + RequestOperation operation + = new SubscribersControllerDeleteAllNotifications.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Mark all notifications as read + * + *

Mark all in-app (inbox) notifications matching the specified filters as read. Supports context-based + * filtering. + * + * @return The call builder + */ + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder markAllAsRead() { + return new SubscribersControllerMarkAllNotificationsAsReadRequestBuilder(sdkConfiguration); + } + + /** + * Mark all notifications as read + * + *

Mark all in-app (inbox) notifications matching the specified filters as read. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerMarkAllNotificationsAsReadResponse markAllAsRead(@Nonnull String subscriberId, @Nonnull UpdateAllSubscriberNotificationsDto body) { + return markAllAsRead(subscriberId, null, body, + null); + } + + /** + * Mark all notifications as read + * + *

Mark all in-app (inbox) notifications matching the specified filters as read. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerMarkAllNotificationsAsReadResponse markAllAsRead( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body, @Nullable Options options) { + SubscribersControllerMarkAllNotificationsAsReadRequest request = new SubscribersControllerMarkAllNotificationsAsReadRequest(subscriberId, idempotencyKey, body); + RequestOperation operation + = new SubscribersControllerMarkAllNotificationsAsRead.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Archive all read notifications + * + *

Archive all read in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @return The call builder + */ + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder archiveAllRead() { + return new SubscribersControllerArchiveAllReadNotificationsRequestBuilder(sdkConfiguration); + } + + /** + * Archive all read notifications + * + *

Archive all read in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerArchiveAllReadNotificationsResponse archiveAllRead(@Nonnull String subscriberId, @Nonnull UpdateAllSubscriberNotificationsDto body) { + return archiveAllRead(subscriberId, null, body, + null); + } + + /** + * Archive all read notifications + * + *

Archive all read in-app (inbox) notifications matching the specified filters. Supports context-based + * filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerArchiveAllReadNotificationsResponse archiveAllRead( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body, @Nullable Options options) { + SubscribersControllerArchiveAllReadNotificationsRequest request = new SubscribersControllerArchiveAllReadNotificationsRequest(subscriberId, idempotencyKey, body); + RequestOperation operation + = new SubscribersControllerArchiveAllReadNotifications.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Mark notifications as seen + * + *

Mark specific and multiple in-app (inbox) notifications as seen. Supports context-based filtering. + * + * @return The call builder + */ + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder markAsSeen() { + return new SubscribersControllerMarkNotificationsAsSeenRequestBuilder(sdkConfiguration); + } + + /** + * Mark notifications as seen + * + *

Mark specific and multiple in-app (inbox) notifications as seen. Supports context-based filtering. + * + * @param subscriberId The identifier of the subscriber + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerMarkNotificationsAsSeenResponse markAsSeen(@Nonnull String subscriberId, @Nonnull MarkSubscriberNotificationsAsSeenDto body) { + return markAsSeen(subscriberId, null, body, + null); + } + + /** + * Mark notifications as seen + * + *

Mark specific and multiple in-app (inbox) notifications as seen. Supports context-based filtering. + * + * @param subscriberId The identifier of the subscriber + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersControllerMarkNotificationsAsSeenResponse markAsSeen( + @Nonnull String subscriberId, @Nullable String idempotencyKey, + @Nonnull MarkSubscriberNotificationsAsSeenDto body, @Nullable Options options) { + SubscribersControllerMarkNotificationsAsSeenRequest request = new SubscribersControllerMarkNotificationsAsSeenRequest(subscriberId, idempotencyKey, body); + RequestOperation operation + = new SubscribersControllerMarkNotificationsAsSeen.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + + /** + * Retrieve unseen notifications count + * + *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier + * **subscriberId**. + * + * @return The call builder + */ + public SubscribersV1ControllerGetUnseenCountRequestBuilder getUnseenCount() { + return new SubscribersV1ControllerGetUnseenCountRequestBuilder(sdkConfiguration); + } + + /** + * Retrieve unseen notifications count + * + *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier + * **subscriberId**. + * + * @param subscriberId + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersV1ControllerGetUnseenCountResponse getUnseenCount(@Nonnull String subscriberId) { + return getUnseenCount(subscriberId, null, null, + null, null); + } + + /** + * Retrieve unseen notifications count + * + *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier + * **subscriberId**. + * + * @param subscriberId + * @param seen Indicates whether to count seen notifications. + * @param limit The maximum number of notifications to return. + * @param idempotencyKey A header for idempotency purposes + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public SubscribersV1ControllerGetUnseenCountResponse getUnseenCount( + @Nonnull String subscriberId, @Nullable Boolean seen, + @Nullable Double limit, @Nullable String idempotencyKey, + @Nullable Options options) { + SubscribersV1ControllerGetUnseenCountRequest request = new SubscribersV1ControllerGetUnseenCountRequest( + subscriberId, seen, limit, + idempotencyKey); + RequestOperation operation + = new SubscribersV1ControllerGetUnseenCount.Sync(sdkConfiguration, options, _headers); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/co/novu/SubscribersNotifications2.java b/src/main/java/co/novu/SubscribersNotifications2.java index 017b68c0..013ca882 100644 --- a/src/main/java/co/novu/SubscribersNotifications2.java +++ b/src/main/java/co/novu/SubscribersNotifications2.java @@ -5,17 +5,14 @@ import static co.novu.operations.Operations.RequestOperation; -import co.novu.models.operations.SubscribersV1ControllerGetUnseenCountRequest; -import co.novu.models.operations.SubscribersV1ControllerGetUnseenCountRequestBuilder; -import co.novu.models.operations.SubscribersV1ControllerGetUnseenCountResponse; -import co.novu.operations.SubscribersV1ControllerGetUnseenCount; +import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedRequest; +import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedRequestBuilder; +import co.novu.models.operations.SubscribersV1ControllerGetNotificationsFeedResponse; +import co.novu.operations.SubscribersV1ControllerGetNotificationsFeed; import co.novu.utils.Headers; import co.novu.utils.Options; import jakarta.annotation.Nonnull; import jakarta.annotation.Nullable; -import java.lang.Boolean; -import java.lang.Double; -import java.lang.String; public class SubscribersNotifications2 { @@ -38,55 +35,42 @@ public AsyncSubscribersNotifications2 async() { } /** - * Retrieve unseen notifications count + * Retrieve subscriber notifications * - *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier - * **subscriberId**. + *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. * * @return The call builder */ - public SubscribersV1ControllerGetUnseenCountRequestBuilder getUnseenCount() { - return new SubscribersV1ControllerGetUnseenCountRequestBuilder(sdkConfiguration); + public SubscribersV1ControllerGetNotificationsFeedRequestBuilder getFeed() { + return new SubscribersV1ControllerGetNotificationsFeedRequestBuilder(sdkConfiguration); } /** - * Retrieve unseen notifications count + * Retrieve subscriber notifications * - *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier - * **subscriberId**. + *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. * - * @param subscriberId + * @param request The request object containing all the parameters for the API call. * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public SubscribersV1ControllerGetUnseenCountResponse getUnseenCount(@Nonnull String subscriberId) { - return getUnseenCount(subscriberId, null, null, - null, null); + public SubscribersV1ControllerGetNotificationsFeedResponse getFeed(@Nonnull SubscribersV1ControllerGetNotificationsFeedRequest request) { + return getFeed(request, null); } /** - * Retrieve unseen notifications count + * Retrieve subscriber notifications * - *

Retrieve unseen in-app (inbox) notifications count for a subscriber by its unique key identifier - * **subscriberId**. + *

Retrieve subscriber in-app (inbox) notifications by its unique key identifier **subscriberId**. * - * @param subscriberId - * @param seen Indicates whether to count seen notifications. - * @param limit The maximum number of notifications to return. - * @param idempotencyKey A header for idempotency purposes + * @param request The request object containing all the parameters for the API call. * @param options additional options * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ - public SubscribersV1ControllerGetUnseenCountResponse getUnseenCount( - @Nonnull String subscriberId, @Nullable Boolean seen, - @Nullable Double limit, @Nullable String idempotencyKey, - @Nullable Options options) { - SubscribersV1ControllerGetUnseenCountRequest request = new SubscribersV1ControllerGetUnseenCountRequest( - subscriberId, seen, limit, - idempotencyKey); - RequestOperation operation - = new SubscribersV1ControllerGetUnseenCount.Sync(sdkConfiguration, options, _headers); + public SubscribersV1ControllerGetNotificationsFeedResponse getFeed(@Nonnull SubscribersV1ControllerGetNotificationsFeedRequest request, @Nullable Options options) { + RequestOperation operation + = new SubscribersV1ControllerGetNotificationsFeed.Sync(sdkConfiguration, options, _headers); return operation.handleResponse(operation.doRequest(request)); } diff --git a/src/main/java/co/novu/Translations.java b/src/main/java/co/novu/Translations.java index b3360209..387c4d94 100644 --- a/src/main/java/co/novu/Translations.java +++ b/src/main/java/co/novu/Translations.java @@ -85,6 +85,9 @@ public AsyncTranslations async() { *

Create a translation for a specific workflow and locale, if the translation already exists, it will * be updated * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public TranslationControllerCreateTranslationEndpointRequestBuilder create() { @@ -97,6 +100,9 @@ public TranslationControllerCreateTranslationEndpointRequestBuilder create() { *

Create a translation for a specific workflow and locale, if the translation already exists, it will * be updated * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -111,6 +117,9 @@ public TranslationControllerCreateTranslationEndpointResponse create(@Nonnull Cr *

Create a translation for a specific workflow and locale, if the translation already exists, it will * be updated * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options @@ -131,6 +140,9 @@ public TranslationControllerCreateTranslationEndpointResponse create( * *

Retrieve a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public TranslationControllerGetSingleTranslationRequestBuilder get() { @@ -142,6 +154,9 @@ public TranslationControllerGetSingleTranslationRequestBuilder get() { * *

Retrieve a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param locale Locale code @@ -160,6 +175,9 @@ public TranslationControllerGetSingleTranslationResponse get( * *

Retrieve a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param locale Locale code @@ -185,6 +203,9 @@ public TranslationControllerGetSingleTranslationResponse get( * *

Delete a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public TranslationControllerDeleteTranslationEndpointRequestBuilder delete() { @@ -196,6 +217,9 @@ public TranslationControllerDeleteTranslationEndpointRequestBuilder delete() { * *

Delete a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param locale Locale code @@ -214,6 +238,9 @@ public TranslationControllerDeleteTranslationEndpointResponse delete( * *

Delete a specific translation by resource type, resource ID and locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param locale Locale code @@ -242,6 +269,9 @@ public TranslationControllerDeleteTranslationEndpointResponse delete( * *

Supports both "files" and "files[]" field names for backwards compatibility. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public TranslationControllerUploadTranslationFilesRequestBuilder uploadFiles() { @@ -256,6 +286,9 @@ public TranslationControllerUploadTranslationFilesRequestBuilder uploadFiles() { * *

Supports both "files" and "files[]" field names for backwards compatibility. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -272,6 +305,9 @@ public TranslationControllerUploadTranslationFilesResponse uploadFiles(@Nonnull * *

Supports both "files" and "files[]" field names for backwards compatibility. * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options @@ -292,6 +328,9 @@ public TranslationControllerUploadTranslationFilesResponse uploadFiles( * *

Delete an entire translation group and all its translations * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public TranslationControllerDeleteTranslationGroupEndpointRequestBuilder removeGroup() { @@ -303,6 +342,9 @@ public TranslationControllerDeleteTranslationGroupEndpointRequestBuilder removeG * *

Delete an entire translation group and all its translations * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @return The response from the API call @@ -318,6 +360,9 @@ public TranslationControllerDeleteTranslationGroupEndpointResponse removeGroup(@ * *

Delete an entire translation group and all its translations * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param idempotencyKey A header for idempotency purposes @@ -340,6 +385,9 @@ public TranslationControllerDeleteTranslationGroupEndpointResponse removeGroup( *

Retrieves a single translation group by resource type (workflow, layout) and resource ID * (workflowId, layoutId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public TranslationControllerGetTranslationGroupEndpointRequestBuilder groupDetails() { @@ -352,6 +400,9 @@ public TranslationControllerGetTranslationGroupEndpointRequestBuilder groupDetai *

Retrieves a single translation group by resource type (workflow, layout) and resource ID * (workflowId, layoutId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @return The response from the API call @@ -368,6 +419,9 @@ public TranslationControllerGetTranslationGroupEndpointResponse groupDetails(@No *

Retrieves a single translation group by resource type (workflow, layout) and resource ID * (workflowId, layoutId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param resourceType Resource type * @param resourceId Resource ID * @param idempotencyKey A header for idempotency purposes @@ -389,6 +443,9 @@ public TranslationControllerGetTranslationGroupEndpointResponse groupDetails( * *

Retrieve all translations for a locale in master JSON format organized by resourceId (workflowId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public TranslationControllerGetMasterJsonEndpointRequestBuilder getMaster() { @@ -400,6 +457,9 @@ public TranslationControllerGetMasterJsonEndpointRequestBuilder getMaster() { * *

Retrieve all translations for a locale in master JSON format organized by resourceId (workflowId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The response from the API call * @throws RuntimeException subclass if the API call fails */ @@ -412,6 +472,9 @@ public TranslationControllerGetMasterJsonEndpointResponse getMasterDirect() { * *

Retrieve all translations for a locale in master JSON format organized by resourceId (workflowId) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param locale Locale to export. If not provided, exports organization default locale * @param idempotencyKey A header for idempotency purposes * @param options additional options @@ -432,6 +495,9 @@ public TranslationControllerGetMasterJsonEndpointResponse getMaster( * *

Import translations for multiple workflows from master JSON format for a specific locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public TranslationControllerImportMasterJsonEndpointRequestBuilder importMaster() { @@ -443,6 +509,9 @@ public TranslationControllerImportMasterJsonEndpointRequestBuilder importMaster( * *

Import translations for multiple workflows from master JSON format for a specific locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -456,6 +525,9 @@ public TranslationControllerImportMasterJsonEndpointResponse importMaster(@Nonnu * *

Import translations for multiple workflows from master JSON format for a specific locale * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options @@ -477,6 +549,9 @@ public TranslationControllerImportMasterJsonEndpointResponse importMaster( *

Upload a master JSON file containing translations for multiple workflows. Locale is automatically * detected from filename (e.g., en_US.json) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @return The call builder */ public TranslationControllerUploadMasterJsonEndpointRequestBuilder masterUpload() { @@ -489,6 +564,9 @@ public TranslationControllerUploadMasterJsonEndpointRequestBuilder masterUpload( *

Upload a master JSON file containing translations for multiple workflows. Locale is automatically * detected from filename (e.g., en_US.json) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param body * @return The response from the API call * @throws RuntimeException subclass if the API call fails @@ -503,6 +581,9 @@ public TranslationControllerUploadMasterJsonEndpointResponse masterUpload(@Nonnu *

Upload a master JSON file containing translations for multiple workflows. Locale is automatically * detected from filename (e.g., en_US.json) * + *

This operation requires either Security#secretKey or Security#secretKey to be set via the {@code + * security} builder method when initializing the SDK. + * * @param idempotencyKey A header for idempotency purposes * @param body * @param options additional options diff --git a/src/main/java/co/novu/WorkflowsSteps.java b/src/main/java/co/novu/WorkflowsSteps.java new file mode 100644 index 00000000..a0c7f387 --- /dev/null +++ b/src/main/java/co/novu/WorkflowsSteps.java @@ -0,0 +1,93 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.models.components.GeneratePreviewRequestDto; +import co.novu.models.operations.WorkflowControllerGeneratePreviewRequest; +import co.novu.models.operations.WorkflowControllerGeneratePreviewRequestBuilder; +import co.novu.models.operations.WorkflowControllerGeneratePreviewResponse; +import co.novu.operations.WorkflowControllerGeneratePreview; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + + +public class WorkflowsSteps { + private static final Headers _headers = Headers.EMPTY; + private final SDKConfiguration sdkConfiguration; + private final AsyncWorkflowsSteps asyncSDK; + + WorkflowsSteps(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.asyncSDK = new AsyncWorkflowsSteps(this, sdkConfiguration); + } + + /** + * Switches to the async SDK. + * + * @return The async SDK + */ + public AsyncWorkflowsSteps async() { + return asyncSDK; + } + + /** + * Generate a step preview + * + *

Generates a preview for a specific workflow step by its unique identifier **stepId** + * + * @return The call builder + */ + public WorkflowControllerGeneratePreviewRequestBuilder generatePreview() { + return new WorkflowControllerGeneratePreviewRequestBuilder(sdkConfiguration); + } + + /** + * Generate a step preview + * + *

Generates a preview for a specific workflow step by its unique identifier **stepId** + * + * @param workflowId + * @param stepId + * @param body + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public WorkflowControllerGeneratePreviewResponse generatePreview( + @Nonnull String workflowId, @Nonnull String stepId, + @Nonnull GeneratePreviewRequestDto body) { + return generatePreview(workflowId, stepId, null, + body, null); + } + + /** + * Generate a step preview + * + *

Generates a preview for a specific workflow step by its unique identifier **stepId** + * + * @param workflowId + * @param stepId + * @param idempotencyKey A header for idempotency purposes + * @param body + * @param options additional options + * @return The response from the API call + * @throws RuntimeException subclass if the API call fails + */ + public WorkflowControllerGeneratePreviewResponse generatePreview( + @Nonnull String workflowId, @Nonnull String stepId, + @Nullable String idempotencyKey, @Nonnull GeneratePreviewRequestDto body, + @Nullable Options options) { + WorkflowControllerGeneratePreviewRequest request = new WorkflowControllerGeneratePreviewRequest( + workflowId, stepId, idempotencyKey, + body); + RequestOperation operation + = new WorkflowControllerGeneratePreview.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(request)); + } + +} diff --git a/src/main/java/co/novu/models/components/ActivityNotificationJobResponseDtoType.java b/src/main/java/co/novu/models/components/ActivityNotificationJobResponseDtoType.java index eb6d8d54..e7396b39 100644 --- a/src/main/java/co/novu/models/components/ActivityNotificationJobResponseDtoType.java +++ b/src/main/java/co/novu/models/components/ActivityNotificationJobResponseDtoType.java @@ -35,6 +35,7 @@ public class ActivityNotificationJobResponseDtoType { public static final ActivityNotificationJobResponseDtoType DELAY = new ActivityNotificationJobResponseDtoType("delay"); public static final ActivityNotificationJobResponseDtoType THROTTLE = new ActivityNotificationJobResponseDtoType("throttle"); public static final ActivityNotificationJobResponseDtoType CUSTOM = new ActivityNotificationJobResponseDtoType("custom"); + public static final ActivityNotificationJobResponseDtoType HTTP_REQUEST = new ActivityNotificationJobResponseDtoType("http_request"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -118,6 +119,7 @@ private static final Map createV map.put("delay", DELAY); map.put("throttle", THROTTLE); map.put("custom", CUSTOM); + map.put("http_request", HTTP_REQUEST); return map; } @@ -133,6 +135,7 @@ private static final Map cre map.put("delay", ActivityNotificationJobResponseDtoTypeEnum.DELAY); map.put("throttle", ActivityNotificationJobResponseDtoTypeEnum.THROTTLE); map.put("custom", ActivityNotificationJobResponseDtoTypeEnum.CUSTOM); + map.put("http_request", ActivityNotificationJobResponseDtoTypeEnum.HTTP_REQUEST); return map; } @@ -148,7 +151,8 @@ public enum ActivityNotificationJobResponseDtoTypeEnum { TRIGGER("trigger"), DELAY("delay"), THROTTLE("throttle"), - CUSTOM("custom"),; + CUSTOM("custom"), + HTTP_REQUEST("http_request"),; private final String value; diff --git a/src/main/java/co/novu/models/components/ChatRenderOutput.java b/src/main/java/co/novu/models/components/ChatRenderOutput.java new file mode 100644 index 00000000..24a9745b --- /dev/null +++ b/src/main/java/co/novu/models/components/ChatRenderOutput.java @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class ChatRenderOutput { + /** + * Body of the chat message + */ + @JsonProperty("body") + private String body; + + @JsonCreator + public ChatRenderOutput( + @JsonProperty("body") @Nonnull String body) { + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + /** + * Body of the chat message + */ + public String body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Body of the chat message + */ + public ChatRenderOutput withBody(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ChatRenderOutput other = (ChatRenderOutput) o; + return + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + body); + } + + @Override + public String toString() { + return Utils.toString(ChatRenderOutput.class, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String body; + + private Builder() { + // force use of static builder() method + } + + /** + * Body of the chat message + */ + public Builder body(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public ChatRenderOutput build() { + return new ChatRenderOutput( + body); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ChatStepResponseDto.java b/src/main/java/co/novu/models/components/ChatStepResponseDto.java index 7dad35d2..bc41099f 100644 --- a/src/main/java/co/novu/models/components/ChatStepResponseDto.java +++ b/src/main/java/co/novu/models/components/ChatStepResponseDto.java @@ -92,6 +92,13 @@ public class ChatStepResponseDto implements WorkflowResponseDtoStep { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public ChatStepResponseDto( @JsonProperty("controls") @Nonnull ChatControlsMetadataResponseDto controls, @@ -105,7 +112,8 @@ public ChatStepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public ChatStepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public ChatStepResponseDto( @@ -145,7 +154,8 @@ public ChatStepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -233,6 +243,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -346,6 +363,15 @@ public ChatStepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public ChatStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -367,7 +393,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -376,7 +403,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -393,7 +421,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -423,6 +452,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -523,12 +554,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public ChatStepResponseDto build() { return new ChatStepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/ContentIssueEnum.java b/src/main/java/co/novu/models/components/ContentIssueEnum.java index 634d583c..e6645997 100644 --- a/src/main/java/co/novu/models/components/ContentIssueEnum.java +++ b/src/main/java/co/novu/models/components/ContentIssueEnum.java @@ -27,6 +27,7 @@ public class ContentIssueEnum { public static final ContentIssueEnum ILLEGAL_VARIABLE_IN_CONTROL_VALUE = new ContentIssueEnum("ILLEGAL_VARIABLE_IN_CONTROL_VALUE"); public static final ContentIssueEnum INVALID_FILTER_ARG_IN_VARIABLE = new ContentIssueEnum("INVALID_FILTER_ARG_IN_VARIABLE"); + public static final ContentIssueEnum INVALID_URL = new ContentIssueEnum("INVALID_URL"); public static final ContentIssueEnum MISSING_VALUE = new ContentIssueEnum("MISSING_VALUE"); public static final ContentIssueEnum TIER_LIMIT_EXCEEDED = new ContentIssueEnum("TIER_LIMIT_EXCEEDED"); @@ -104,6 +105,7 @@ private static final Map createValuesMap() { Map map = new LinkedHashMap<>(); map.put("ILLEGAL_VARIABLE_IN_CONTROL_VALUE", ILLEGAL_VARIABLE_IN_CONTROL_VALUE); map.put("INVALID_FILTER_ARG_IN_VARIABLE", INVALID_FILTER_ARG_IN_VARIABLE); + map.put("INVALID_URL", INVALID_URL); map.put("MISSING_VALUE", MISSING_VALUE); map.put("TIER_LIMIT_EXCEEDED", TIER_LIMIT_EXCEEDED); return map; @@ -113,6 +115,7 @@ private static final Map createEnumsMap() { Map map = new HashMap<>(); map.put("ILLEGAL_VARIABLE_IN_CONTROL_VALUE", ContentIssueEnumEnum.ILLEGAL_VARIABLE_IN_CONTROL_VALUE); map.put("INVALID_FILTER_ARG_IN_VARIABLE", ContentIssueEnumEnum.INVALID_FILTER_ARG_IN_VARIABLE); + map.put("INVALID_URL", ContentIssueEnumEnum.INVALID_URL); map.put("MISSING_VALUE", ContentIssueEnumEnum.MISSING_VALUE); map.put("TIER_LIMIT_EXCEEDED", ContentIssueEnumEnum.TIER_LIMIT_EXCEEDED); return map; @@ -123,6 +126,7 @@ public enum ContentIssueEnumEnum { ILLEGAL_VARIABLE_IN_CONTROL_VALUE("ILLEGAL_VARIABLE_IN_CONTROL_VALUE"), INVALID_FILTER_ARG_IN_VARIABLE("INVALID_FILTER_ARG_IN_VARIABLE"), + INVALID_URL("INVALID_URL"), MISSING_VALUE("MISSING_VALUE"), TIER_LIMIT_EXCEEDED("TIER_LIMIT_EXCEEDED"),; diff --git a/src/main/java/co/novu/models/components/CreateEnvironmentVariableRequestDto.java b/src/main/java/co/novu/models/components/CreateEnvironmentVariableRequestDto.java new file mode 100644 index 00000000..2fc116d4 --- /dev/null +++ b/src/main/java/co/novu/models/components/CreateEnvironmentVariableRequestDto.java @@ -0,0 +1,215 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class CreateEnvironmentVariableRequestDto { + /** + * Unique key for the variable. Must start with a letter and contain only letters, digits, and + * underscores. + */ + @JsonProperty("key") + private String key; + + /** + * The type of the variable + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private CreateEnvironmentVariableRequestDtoType type; + + /** + * Whether this variable is a secret (encrypted at rest, masked in responses) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("isSecret") + private Boolean isSecret; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("values") + private List values; + + @JsonCreator + public CreateEnvironmentVariableRequestDto( + @JsonProperty("key") @Nonnull String key, + @JsonProperty("type") @Nullable CreateEnvironmentVariableRequestDtoType type, + @JsonProperty("isSecret") @Nullable Boolean isSecret, + @JsonProperty("values") @Nullable List values) { + this.key = Optional.ofNullable(key) + .orElseThrow(() -> new IllegalArgumentException("key cannot be null")); + this.type = type; + this.isSecret = isSecret; + this.values = values; + } + + public CreateEnvironmentVariableRequestDto( + @Nonnull String key) { + this(key, null, null, + null); + } + + /** + * Unique key for the variable. Must start with a letter and contain only letters, digits, and + * underscores. + */ + public String key() { + return this.key; + } + + /** + * The type of the variable + */ + public Optional type() { + return Optional.ofNullable(this.type); + } + + /** + * Whether this variable is a secret (encrypted at rest, masked in responses) + */ + public Optional isSecret() { + return Optional.ofNullable(this.isSecret); + } + + public Optional> values() { + return Optional.ofNullable(this.values); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Unique key for the variable. Must start with a letter and contain only letters, digits, and + * underscores. + */ + public CreateEnvironmentVariableRequestDto withKey(@Nonnull String key) { + this.key = Utils.checkNotNull(key, "key"); + return this; + } + + + /** + * The type of the variable + */ + public CreateEnvironmentVariableRequestDto withType(@Nullable CreateEnvironmentVariableRequestDtoType type) { + this.type = type; + return this; + } + + + /** + * Whether this variable is a secret (encrypted at rest, masked in responses) + */ + public CreateEnvironmentVariableRequestDto withIsSecret(@Nullable Boolean isSecret) { + this.isSecret = isSecret; + return this; + } + + + public CreateEnvironmentVariableRequestDto withValues(@Nullable List values) { + this.values = values; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + CreateEnvironmentVariableRequestDto other = (CreateEnvironmentVariableRequestDto) o; + return + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.isSecret, other.isSecret) && + Utils.enhancedDeepEquals(this.values, other.values); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + key, type, isSecret, + values); + } + + @Override + public String toString() { + return Utils.toString(CreateEnvironmentVariableRequestDto.class, + "key", key, + "type", type, + "isSecret", isSecret, + "values", values); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String key; + + private CreateEnvironmentVariableRequestDtoType type; + + private Boolean isSecret; + + private List values; + + private Builder() { + // force use of static builder() method + } + + /** + * Unique key for the variable. Must start with a letter and contain only letters, digits, and + * underscores. + */ + public Builder key(@Nonnull String key) { + this.key = Utils.checkNotNull(key, "key"); + return this; + } + + /** + * The type of the variable + */ + public Builder type(@Nullable CreateEnvironmentVariableRequestDtoType type) { + this.type = type; + return this; + } + + /** + * Whether this variable is a secret (encrypted at rest, masked in responses) + */ + public Builder isSecret(@Nullable Boolean isSecret) { + this.isSecret = isSecret; + return this; + } + + public Builder values(@Nullable List values) { + this.values = values; + return this; + } + + public CreateEnvironmentVariableRequestDto build() { + return new CreateEnvironmentVariableRequestDto( + key, type, isSecret, + values); + } + + } +} diff --git a/src/main/java/co/novu/models/components/CreateEnvironmentVariableRequestDtoType.java b/src/main/java/co/novu/models/components/CreateEnvironmentVariableRequestDtoType.java new file mode 100644 index 00000000..c78544f8 --- /dev/null +++ b/src/main/java/co/novu/models/components/CreateEnvironmentVariableRequestDtoType.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * CreateEnvironmentVariableRequestDtoType + * + *

The type of the variable + */ +public enum CreateEnvironmentVariableRequestDtoType { + STRING("string"); + + @JsonValue + private final String value; + + CreateEnvironmentVariableRequestDtoType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (CreateEnvironmentVariableRequestDtoType o: CreateEnvironmentVariableRequestDtoType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/co/novu/models/components/CreateWorkflowDtoStepTypeIdResolver.java b/src/main/java/co/novu/models/components/CreateWorkflowDtoStepTypeIdResolver.java index 074b6fb3..d9df8b27 100644 --- a/src/main/java/co/novu/models/components/CreateWorkflowDtoStepTypeIdResolver.java +++ b/src/main/java/co/novu/models/components/CreateWorkflowDtoStepTypeIdResolver.java @@ -28,6 +28,7 @@ private void initializeTypeMap() { registerType("digest", DigestStepUpsertDto.class); registerType("throttle", ThrottleStepUpsertDto.class); registerType("custom", CustomStepUpsertDto.class); + registerType("http_request", HttpRequestStepUpsertDto.class); } @Override diff --git a/src/main/java/co/novu/models/components/CustomStepResponseDto.java b/src/main/java/co/novu/models/components/CustomStepResponseDto.java index 8223618c..410c26a2 100644 --- a/src/main/java/co/novu/models/components/CustomStepResponseDto.java +++ b/src/main/java/co/novu/models/components/CustomStepResponseDto.java @@ -92,6 +92,13 @@ public class CustomStepResponseDto implements WorkflowResponseDtoStep { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public CustomStepResponseDto( @JsonProperty("controls") @Nonnull CustomControlsMetadataResponseDto controls, @@ -105,7 +112,8 @@ public CustomStepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public CustomStepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public CustomStepResponseDto( @@ -145,7 +154,8 @@ public CustomStepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -233,6 +243,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -346,6 +363,15 @@ public CustomStepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public CustomStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -367,7 +393,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -376,7 +403,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -393,7 +421,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -423,6 +452,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -523,12 +554,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public CustomStepResponseDto build() { return new CustomStepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/DelayStepResponseDto.java b/src/main/java/co/novu/models/components/DelayStepResponseDto.java index ff75e120..8581e27b 100644 --- a/src/main/java/co/novu/models/components/DelayStepResponseDto.java +++ b/src/main/java/co/novu/models/components/DelayStepResponseDto.java @@ -92,6 +92,13 @@ public class DelayStepResponseDto implements WorkflowResponseDtoStep { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public DelayStepResponseDto( @JsonProperty("controls") @Nonnull DelayControlsMetadataResponseDto controls, @@ -105,7 +112,8 @@ public DelayStepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public DelayStepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public DelayStepResponseDto( @@ -145,7 +154,8 @@ public DelayStepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -233,6 +243,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -346,6 +363,15 @@ public DelayStepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public DelayStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -367,7 +393,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -376,7 +403,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -393,7 +421,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -423,6 +452,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -523,12 +554,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public DelayStepResponseDto build() { return new DelayStepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/DependencyReasonEnum.java b/src/main/java/co/novu/models/components/DependencyReasonEnum.java new file mode 100644 index 00000000..c55cbb21 --- /dev/null +++ b/src/main/java/co/novu/models/components/DependencyReasonEnum.java @@ -0,0 +1,132 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * DependencyReasonEnum + * + *

Reason for the dependency + */ +public class DependencyReasonEnum { + + public static final DependencyReasonEnum LAYOUT_REQUIRED_FOR_WORKFLOW = new DependencyReasonEnum("LAYOUT_REQUIRED_FOR_WORKFLOW"); + public static final DependencyReasonEnum LAYOUT_EXISTS_IN_TARGET = new DependencyReasonEnum("LAYOUT_EXISTS_IN_TARGET"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private DependencyReasonEnum(String value) { + this.value = value; + } + + /** + * Returns a DependencyReasonEnum with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as DependencyReasonEnum + */ + @JsonCreator + public static DependencyReasonEnum of(String value) { + synchronized (DependencyReasonEnum.class) { + return values.computeIfAbsent(value, v -> new DependencyReasonEnum(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + DependencyReasonEnum other = (DependencyReasonEnum) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "DependencyReasonEnum [value=" + value + "]"; + } + + // return an array just like an enum + public static DependencyReasonEnum[] values() { + synchronized (DependencyReasonEnum.class) { + return values.values().toArray(new DependencyReasonEnum[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("LAYOUT_REQUIRED_FOR_WORKFLOW", LAYOUT_REQUIRED_FOR_WORKFLOW); + map.put("LAYOUT_EXISTS_IN_TARGET", LAYOUT_EXISTS_IN_TARGET); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("LAYOUT_REQUIRED_FOR_WORKFLOW", DependencyReasonEnumEnum.LAYOUT_REQUIRED_FOR_WORKFLOW); + map.put("LAYOUT_EXISTS_IN_TARGET", DependencyReasonEnumEnum.LAYOUT_EXISTS_IN_TARGET); + return map; + } + + + public enum DependencyReasonEnumEnum { + + LAYOUT_REQUIRED_FOR_WORKFLOW("LAYOUT_REQUIRED_FOR_WORKFLOW"), + LAYOUT_EXISTS_IN_TARGET("LAYOUT_EXISTS_IN_TARGET"),; + + private final String value; + + private DependencyReasonEnumEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/DiffActionEnum.java b/src/main/java/co/novu/models/components/DiffActionEnum.java new file mode 100644 index 00000000..a6a5ab00 --- /dev/null +++ b/src/main/java/co/novu/models/components/DiffActionEnum.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * DiffActionEnum + * + *

Type of change + */ +public class DiffActionEnum { + + public static final DiffActionEnum ADDED = new DiffActionEnum("added"); + public static final DiffActionEnum MODIFIED = new DiffActionEnum("modified"); + public static final DiffActionEnum DELETED = new DiffActionEnum("deleted"); + public static final DiffActionEnum UNCHANGED = new DiffActionEnum("unchanged"); + public static final DiffActionEnum MOVED = new DiffActionEnum("moved"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private DiffActionEnum(String value) { + this.value = value; + } + + /** + * Returns a DiffActionEnum with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as DiffActionEnum + */ + @JsonCreator + public static DiffActionEnum of(String value) { + synchronized (DiffActionEnum.class) { + return values.computeIfAbsent(value, v -> new DiffActionEnum(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + DiffActionEnum other = (DiffActionEnum) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "DiffActionEnum [value=" + value + "]"; + } + + // return an array just like an enum + public static DiffActionEnum[] values() { + synchronized (DiffActionEnum.class) { + return values.values().toArray(new DiffActionEnum[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("added", ADDED); + map.put("modified", MODIFIED); + map.put("deleted", DELETED); + map.put("unchanged", UNCHANGED); + map.put("moved", MOVED); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("added", DiffActionEnumEnum.ADDED); + map.put("modified", DiffActionEnumEnum.MODIFIED); + map.put("deleted", DiffActionEnumEnum.DELETED); + map.put("unchanged", DiffActionEnumEnum.UNCHANGED); + map.put("moved", DiffActionEnumEnum.MOVED); + return map; + } + + + public enum DiffActionEnumEnum { + + ADDED("added"), + MODIFIED("modified"), + DELETED("deleted"), + UNCHANGED("unchanged"), + MOVED("moved"),; + + private final String value; + + private DiffActionEnumEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/DiffEnvironmentRequestDto.java b/src/main/java/co/novu/models/components/DiffEnvironmentRequestDto.java new file mode 100644 index 00000000..e3b13030 --- /dev/null +++ b/src/main/java/co/novu/models/components/DiffEnvironmentRequestDto.java @@ -0,0 +1,104 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class DiffEnvironmentRequestDto { + /** + * Source environment ID to compare from. Defaults to the Development environment if not provided. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sourceEnvironmentId") + private String sourceEnvironmentId; + + @JsonCreator + public DiffEnvironmentRequestDto( + @JsonProperty("sourceEnvironmentId") @Nullable String sourceEnvironmentId) { + this.sourceEnvironmentId = sourceEnvironmentId; + } + + public DiffEnvironmentRequestDto() { + this(null); + } + + /** + * Source environment ID to compare from. Defaults to the Development environment if not provided. + */ + public Optional sourceEnvironmentId() { + return Optional.ofNullable(this.sourceEnvironmentId); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Source environment ID to compare from. Defaults to the Development environment if not provided. + */ + public DiffEnvironmentRequestDto withSourceEnvironmentId(@Nullable String sourceEnvironmentId) { + this.sourceEnvironmentId = sourceEnvironmentId; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DiffEnvironmentRequestDto other = (DiffEnvironmentRequestDto) o; + return + Utils.enhancedDeepEquals(this.sourceEnvironmentId, other.sourceEnvironmentId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + sourceEnvironmentId); + } + + @Override + public String toString() { + return Utils.toString(DiffEnvironmentRequestDto.class, + "sourceEnvironmentId", sourceEnvironmentId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String sourceEnvironmentId; + + private Builder() { + // force use of static builder() method + } + + /** + * Source environment ID to compare from. Defaults to the Development environment if not provided. + */ + public Builder sourceEnvironmentId(@Nullable String sourceEnvironmentId) { + this.sourceEnvironmentId = sourceEnvironmentId; + return this; + } + + public DiffEnvironmentRequestDto build() { + return new DiffEnvironmentRequestDto( + sourceEnvironmentId); + } + + } +} diff --git a/src/main/java/co/novu/models/components/DiffEnvironmentResponseDto.java b/src/main/java/co/novu/models/components/DiffEnvironmentResponseDto.java new file mode 100644 index 00000000..584590fb --- /dev/null +++ b/src/main/java/co/novu/models/components/DiffEnvironmentResponseDto.java @@ -0,0 +1,212 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class DiffEnvironmentResponseDto { + /** + * Source environment ID + */ + @JsonProperty("sourceEnvironmentId") + private String sourceEnvironmentId; + + /** + * Target environment ID + */ + @JsonProperty("targetEnvironmentId") + private String targetEnvironmentId; + + /** + * Diff resources by resource type + */ + @JsonProperty("resources") + private List resources; + + /** + * Overall summary + */ + @JsonProperty("summary") + private EnvironmentDiffSummaryDto summary; + + @JsonCreator + public DiffEnvironmentResponseDto( + @JsonProperty("sourceEnvironmentId") @Nonnull String sourceEnvironmentId, + @JsonProperty("targetEnvironmentId") @Nonnull String targetEnvironmentId, + @JsonProperty("resources") @Nonnull List resources, + @JsonProperty("summary") @Nonnull EnvironmentDiffSummaryDto summary) { + this.sourceEnvironmentId = Optional.ofNullable(sourceEnvironmentId) + .orElseThrow(() -> new IllegalArgumentException("sourceEnvironmentId cannot be null")); + this.targetEnvironmentId = Optional.ofNullable(targetEnvironmentId) + .orElseThrow(() -> new IllegalArgumentException("targetEnvironmentId cannot be null")); + this.resources = Optional.ofNullable(resources) + .orElseThrow(() -> new IllegalArgumentException("resources cannot be null")); + this.summary = Optional.ofNullable(summary) + .orElseThrow(() -> new IllegalArgumentException("summary cannot be null")); + } + + /** + * Source environment ID + */ + public String sourceEnvironmentId() { + return this.sourceEnvironmentId; + } + + /** + * Target environment ID + */ + public String targetEnvironmentId() { + return this.targetEnvironmentId; + } + + /** + * Diff resources by resource type + */ + public List resources() { + return this.resources; + } + + /** + * Overall summary + */ + public EnvironmentDiffSummaryDto summary() { + return this.summary; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Source environment ID + */ + public DiffEnvironmentResponseDto withSourceEnvironmentId(@Nonnull String sourceEnvironmentId) { + this.sourceEnvironmentId = Utils.checkNotNull(sourceEnvironmentId, "sourceEnvironmentId"); + return this; + } + + + /** + * Target environment ID + */ + public DiffEnvironmentResponseDto withTargetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.targetEnvironmentId = Utils.checkNotNull(targetEnvironmentId, "targetEnvironmentId"); + return this; + } + + + /** + * Diff resources by resource type + */ + public DiffEnvironmentResponseDto withResources(@Nonnull List resources) { + this.resources = Utils.checkNotNull(resources, "resources"); + return this; + } + + + /** + * Overall summary + */ + public DiffEnvironmentResponseDto withSummary(@Nonnull EnvironmentDiffSummaryDto summary) { + this.summary = Utils.checkNotNull(summary, "summary"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DiffEnvironmentResponseDto other = (DiffEnvironmentResponseDto) o; + return + Utils.enhancedDeepEquals(this.sourceEnvironmentId, other.sourceEnvironmentId) && + Utils.enhancedDeepEquals(this.targetEnvironmentId, other.targetEnvironmentId) && + Utils.enhancedDeepEquals(this.resources, other.resources) && + Utils.enhancedDeepEquals(this.summary, other.summary); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + sourceEnvironmentId, targetEnvironmentId, resources, + summary); + } + + @Override + public String toString() { + return Utils.toString(DiffEnvironmentResponseDto.class, + "sourceEnvironmentId", sourceEnvironmentId, + "targetEnvironmentId", targetEnvironmentId, + "resources", resources, + "summary", summary); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String sourceEnvironmentId; + + private String targetEnvironmentId; + + private List resources; + + private EnvironmentDiffSummaryDto summary; + + private Builder() { + // force use of static builder() method + } + + /** + * Source environment ID + */ + public Builder sourceEnvironmentId(@Nonnull String sourceEnvironmentId) { + this.sourceEnvironmentId = Utils.checkNotNull(sourceEnvironmentId, "sourceEnvironmentId"); + return this; + } + + /** + * Target environment ID + */ + public Builder targetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.targetEnvironmentId = Utils.checkNotNull(targetEnvironmentId, "targetEnvironmentId"); + return this; + } + + /** + * Diff resources by resource type + */ + public Builder resources(@Nonnull List resources) { + this.resources = Utils.checkNotNull(resources, "resources"); + return this; + } + + /** + * Overall summary + */ + public Builder summary(@Nonnull EnvironmentDiffSummaryDto summary) { + this.summary = Utils.checkNotNull(summary, "summary"); + return this; + } + + public DiffEnvironmentResponseDto build() { + return new DiffEnvironmentResponseDto( + sourceEnvironmentId, targetEnvironmentId, resources, + summary); + } + + } +} diff --git a/src/main/java/co/novu/models/components/DiffSummaryDto.java b/src/main/java/co/novu/models/components/DiffSummaryDto.java new file mode 100644 index 00000000..caf12ed3 --- /dev/null +++ b/src/main/java/co/novu/models/components/DiffSummaryDto.java @@ -0,0 +1,205 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class DiffSummaryDto { + /** + * Number of added resources (workflows and steps) + */ + @JsonProperty("added") + private double added; + + /** + * Number of modified resources (workflows and steps) + */ + @JsonProperty("modified") + private double modified; + + /** + * Number of deleted resources (workflows and steps) + */ + @JsonProperty("deleted") + private double deleted; + + /** + * Number of unchanged resources (workflows and steps) + */ + @JsonProperty("unchanged") + private double unchanged; + + @JsonCreator + public DiffSummaryDto( + @JsonProperty("added") double added, + @JsonProperty("modified") double modified, + @JsonProperty("deleted") double deleted, + @JsonProperty("unchanged") double unchanged) { + this.added = added; + this.modified = modified; + this.deleted = deleted; + this.unchanged = unchanged; + } + + /** + * Number of added resources (workflows and steps) + */ + public double added() { + return this.added; + } + + /** + * Number of modified resources (workflows and steps) + */ + public double modified() { + return this.modified; + } + + /** + * Number of deleted resources (workflows and steps) + */ + public double deleted() { + return this.deleted; + } + + /** + * Number of unchanged resources (workflows and steps) + */ + public double unchanged() { + return this.unchanged; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Number of added resources (workflows and steps) + */ + public DiffSummaryDto withAdded(double added) { + this.added = added; + return this; + } + + + /** + * Number of modified resources (workflows and steps) + */ + public DiffSummaryDto withModified(double modified) { + this.modified = modified; + return this; + } + + + /** + * Number of deleted resources (workflows and steps) + */ + public DiffSummaryDto withDeleted(double deleted) { + this.deleted = deleted; + return this; + } + + + /** + * Number of unchanged resources (workflows and steps) + */ + public DiffSummaryDto withUnchanged(double unchanged) { + this.unchanged = unchanged; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DiffSummaryDto other = (DiffSummaryDto) o; + return + Utils.enhancedDeepEquals(this.added, other.added) && + Utils.enhancedDeepEquals(this.modified, other.modified) && + Utils.enhancedDeepEquals(this.deleted, other.deleted) && + Utils.enhancedDeepEquals(this.unchanged, other.unchanged); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + added, modified, deleted, + unchanged); + } + + @Override + public String toString() { + return Utils.toString(DiffSummaryDto.class, + "added", added, + "modified", modified, + "deleted", deleted, + "unchanged", unchanged); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private double added; + + private double modified; + + private double deleted; + + private double unchanged; + + private Builder() { + // force use of static builder() method + } + + /** + * Number of added resources (workflows and steps) + */ + public Builder added(double added) { + this.added = added; + return this; + } + + /** + * Number of modified resources (workflows and steps) + */ + public Builder modified(double modified) { + this.modified = modified; + return this; + } + + /** + * Number of deleted resources (workflows and steps) + */ + public Builder deleted(double deleted) { + this.deleted = deleted; + return this; + } + + /** + * Number of unchanged resources (workflows and steps) + */ + public Builder unchanged(double unchanged) { + this.unchanged = unchanged; + return this; + } + + public DiffSummaryDto build() { + return new DiffSummaryDto( + added, modified, deleted, + unchanged); + } + + } +} diff --git a/src/main/java/co/novu/models/components/Diffs.java b/src/main/java/co/novu/models/components/Diffs.java new file mode 100644 index 00000000..2bf096cc --- /dev/null +++ b/src/main/java/co/novu/models/components/Diffs.java @@ -0,0 +1,150 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * Diffs + * + *

Detailed changes (only for modified resources) + */ +public class Diffs { + /** + * Previous state of the resource (null for added resources) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("previous") + private JsonNullable> previous; + + /** + * New state of the resource (null for deleted resources) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("new") + private JsonNullable> new_; + + @JsonCreator + public Diffs( + @JsonProperty("previous") @Nullable JsonNullable> previous, + @JsonProperty("new") @Nullable JsonNullable> new_) { + this.previous = Optional.ofNullable(previous) + .orElse(JsonNullable.undefined()); + this.new_ = Optional.ofNullable(new_) + .orElse(JsonNullable.undefined()); + } + + public Diffs() { + this(null, null); + } + + /** + * Previous state of the resource (null for added resources) + */ + public JsonNullable> previous() { + return this.previous; + } + + /** + * New state of the resource (null for deleted resources) + */ + public JsonNullable> new_() { + return this.new_; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Previous state of the resource (null for added resources) + */ + public Diffs withPrevious(@Nullable Map previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + + /** + * New state of the resource (null for deleted resources) + */ + public Diffs withNew(@Nullable Map new_) { + this.new_ = JsonNullable.of(new_); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + Diffs other = (Diffs) o; + return + Utils.enhancedDeepEquals(this.previous, other.previous) && + Utils.enhancedDeepEquals(this.new_, other.new_); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + previous, new_); + } + + @Override + public String toString() { + return Utils.toString(Diffs.class, + "previous", previous, + "new_", new_); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable> previous; + + private JsonNullable> new_; + + private Builder() { + // force use of static builder() method + } + + /** + * Previous state of the resource (null for added resources) + */ + public Builder previous(@Nullable Map previous) { + this.previous = JsonNullable.of(previous); + return this; + } + + /** + * New state of the resource (null for deleted resources) + */ + public Builder new_(@Nullable Map new_) { + this.new_ = JsonNullable.of(new_); + return this; + } + + public Diffs build() { + return new Diffs( + previous, new_); + } + + } +} diff --git a/src/main/java/co/novu/models/components/DigestRegularOutput.java b/src/main/java/co/novu/models/components/DigestRegularOutput.java new file mode 100644 index 00000000..923d6695 --- /dev/null +++ b/src/main/java/co/novu/models/components/DigestRegularOutput.java @@ -0,0 +1,220 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class DigestRegularOutput { + /** + * Amount of time units + */ + @JsonProperty("amount") + private double amount; + + /** + * Time unit + */ + @JsonProperty("unit") + private TimeUnitEnum unit; + + /** + * Optional digest key + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("digestKey") + private String digestKey; + + /** + * Look back window configuration + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lookBackWindow") + private LookBackWindow lookBackWindow; + + @JsonCreator + public DigestRegularOutput( + @JsonProperty("amount") double amount, + @JsonProperty("unit") @Nonnull TimeUnitEnum unit, + @JsonProperty("digestKey") @Nullable String digestKey, + @JsonProperty("lookBackWindow") @Nullable LookBackWindow lookBackWindow) { + this.amount = amount; + this.unit = Optional.ofNullable(unit) + .orElseThrow(() -> new IllegalArgumentException("unit cannot be null")); + this.digestKey = digestKey; + this.lookBackWindow = lookBackWindow; + } + + public DigestRegularOutput( + double amount, + @Nonnull TimeUnitEnum unit) { + this(amount, unit, null, + null); + } + + /** + * Amount of time units + */ + public double amount() { + return this.amount; + } + + /** + * Time unit + */ + public TimeUnitEnum unit() { + return this.unit; + } + + /** + * Optional digest key + */ + public Optional digestKey() { + return Optional.ofNullable(this.digestKey); + } + + /** + * Look back window configuration + */ + public Optional lookBackWindow() { + return Optional.ofNullable(this.lookBackWindow); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Amount of time units + */ + public DigestRegularOutput withAmount(double amount) { + this.amount = amount; + return this; + } + + + /** + * Time unit + */ + public DigestRegularOutput withUnit(@Nonnull TimeUnitEnum unit) { + this.unit = Utils.checkNotNull(unit, "unit"); + return this; + } + + + /** + * Optional digest key + */ + public DigestRegularOutput withDigestKey(@Nullable String digestKey) { + this.digestKey = digestKey; + return this; + } + + + /** + * Look back window configuration + */ + public DigestRegularOutput withLookBackWindow(@Nullable LookBackWindow lookBackWindow) { + this.lookBackWindow = lookBackWindow; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + DigestRegularOutput other = (DigestRegularOutput) o; + return + Utils.enhancedDeepEquals(this.amount, other.amount) && + Utils.enhancedDeepEquals(this.unit, other.unit) && + Utils.enhancedDeepEquals(this.digestKey, other.digestKey) && + Utils.enhancedDeepEquals(this.lookBackWindow, other.lookBackWindow); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + amount, unit, digestKey, + lookBackWindow); + } + + @Override + public String toString() { + return Utils.toString(DigestRegularOutput.class, + "amount", amount, + "unit", unit, + "digestKey", digestKey, + "lookBackWindow", lookBackWindow); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private double amount; + + private TimeUnitEnum unit; + + private String digestKey; + + private LookBackWindow lookBackWindow; + + private Builder() { + // force use of static builder() method + } + + /** + * Amount of time units + */ + public Builder amount(double amount) { + this.amount = amount; + return this; + } + + /** + * Time unit + */ + public Builder unit(@Nonnull TimeUnitEnum unit) { + this.unit = Utils.checkNotNull(unit, "unit"); + return this; + } + + /** + * Optional digest key + */ + public Builder digestKey(@Nullable String digestKey) { + this.digestKey = digestKey; + return this; + } + + /** + * Look back window configuration + */ + public Builder lookBackWindow(@Nullable LookBackWindow lookBackWindow) { + this.lookBackWindow = lookBackWindow; + return this; + } + + public DigestRegularOutput build() { + return new DigestRegularOutput( + amount, unit, digestKey, + lookBackWindow); + } + + } +} diff --git a/src/main/java/co/novu/models/components/DigestStepResponseDto.java b/src/main/java/co/novu/models/components/DigestStepResponseDto.java index 69c402db..bab562a0 100644 --- a/src/main/java/co/novu/models/components/DigestStepResponseDto.java +++ b/src/main/java/co/novu/models/components/DigestStepResponseDto.java @@ -92,6 +92,13 @@ public class DigestStepResponseDto implements WorkflowResponseDtoStep { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public DigestStepResponseDto( @JsonProperty("controls") @Nonnull DigestControlsMetadataResponseDto controls, @@ -105,7 +112,8 @@ public DigestStepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public DigestStepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public DigestStepResponseDto( @@ -145,7 +154,8 @@ public DigestStepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -233,6 +243,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -346,6 +363,15 @@ public DigestStepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public DigestStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -367,7 +393,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -376,7 +403,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -393,7 +421,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -423,6 +452,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -523,12 +554,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public DigestStepResponseDto build() { return new DigestStepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/EmailControlDto.java b/src/main/java/co/novu/models/components/EmailControlDto.java index cf1876b1..15130c9e 100644 --- a/src/main/java/co/novu/models/components/EmailControlDto.java +++ b/src/main/java/co/novu/models/components/EmailControlDto.java @@ -51,13 +51,6 @@ public class EmailControlDto { @JsonProperty("editorType") private EmailControlDtoEditorType editorType; - /** - * Type of renderer to use (raw HTML or React Email step resolver) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("rendererType") - private EmailControlDtoRendererType rendererType; - /** * Disable sanitization of the output. */ @@ -78,7 +71,6 @@ public EmailControlDto( @JsonProperty("subject") @Nonnull String subject, @JsonProperty("body") @Nullable String body, @JsonProperty("editorType") @Nullable EmailControlDtoEditorType editorType, - @JsonProperty("rendererType") @Nullable EmailControlDtoRendererType rendererType, @JsonProperty("disableOutputSanitization") @Nullable Boolean disableOutputSanitization, @JsonProperty("layoutId") @Nullable JsonNullable layoutId) { this.skip = skip; @@ -88,8 +80,6 @@ public EmailControlDto( .orElse(Builder._SINGLETON_VALUE_Body.value()); this.editorType = Optional.ofNullable(editorType) .orElse(Builder._SINGLETON_VALUE_EditorType.value()); - this.rendererType = Optional.ofNullable(rendererType) - .orElse(Builder._SINGLETON_VALUE_RendererType.value()); this.disableOutputSanitization = Optional.ofNullable(disableOutputSanitization) .orElse(Builder._SINGLETON_VALUE_DisableOutputSanitization.value()); this.layoutId = Optional.ofNullable(layoutId) @@ -99,8 +89,7 @@ public EmailControlDto( public EmailControlDto( @Nonnull String subject) { this(null, subject, null, - null, null, null, - null); + null, null, null); } /** @@ -133,13 +122,6 @@ public Optional editorType() { return Optional.ofNullable(this.editorType); } - /** - * Type of renderer to use (raw HTML or React Email step resolver) - */ - public Optional rendererType() { - return Optional.ofNullable(this.rendererType); - } - /** * Disable sanitization of the output. */ @@ -197,15 +179,6 @@ public EmailControlDto withEditorType(@Nullable EmailControlDtoEditorType editor } - /** - * Type of renderer to use (raw HTML or React Email step resolver) - */ - public EmailControlDto withRendererType(@Nullable EmailControlDtoRendererType rendererType) { - this.rendererType = rendererType; - return this; - } - - /** * Disable sanitization of the output. */ @@ -238,7 +211,6 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.subject, other.subject) && Utils.enhancedDeepEquals(this.body, other.body) && Utils.enhancedDeepEquals(this.editorType, other.editorType) && - Utils.enhancedDeepEquals(this.rendererType, other.rendererType) && Utils.enhancedDeepEquals(this.disableOutputSanitization, other.disableOutputSanitization) && Utils.enhancedDeepEquals(this.layoutId, other.layoutId); } @@ -247,8 +219,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( skip, subject, body, - editorType, rendererType, disableOutputSanitization, - layoutId); + editorType, disableOutputSanitization, layoutId); } @Override @@ -258,7 +229,6 @@ public String toString() { "subject", subject, "body", body, "editorType", editorType, - "rendererType", rendererType, "disableOutputSanitization", disableOutputSanitization, "layoutId", layoutId); } @@ -274,8 +244,6 @@ public final static class Builder { private EmailControlDtoEditorType editorType; - private EmailControlDtoRendererType rendererType; - private Boolean disableOutputSanitization; private JsonNullable layoutId; @@ -318,14 +286,6 @@ public Builder editorType(@Nullable EmailControlDtoEditorType editorType) { return this; } - /** - * Type of renderer to use (raw HTML or React Email step resolver) - */ - public Builder rendererType(@Nullable EmailControlDtoRendererType rendererType) { - this.rendererType = rendererType; - return this; - } - /** * Disable sanitization of the output. */ @@ -345,8 +305,7 @@ public Builder layoutId(@Nullable String layoutId) { public EmailControlDto build() { return new EmailControlDto( skip, subject, body, - editorType, rendererType, disableOutputSanitization, - layoutId); + editorType, disableOutputSanitization, layoutId); } @@ -362,12 +321,6 @@ public EmailControlDto build() { "\"block\"", new TypeReference() {}); - private static final LazySingletonValue _SINGLETON_VALUE_RendererType = - new LazySingletonValue<>( - "rendererType", - "\"html\"", - new TypeReference() {}); - private static final LazySingletonValue _SINGLETON_VALUE_DisableOutputSanitization = new LazySingletonValue<>( "disableOutputSanitization", diff --git a/src/main/java/co/novu/models/components/EmailRenderOutput.java b/src/main/java/co/novu/models/components/EmailRenderOutput.java new file mode 100644 index 00000000..cf14fee7 --- /dev/null +++ b/src/main/java/co/novu/models/components/EmailRenderOutput.java @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EmailRenderOutput { + /** + * Subject of the email + */ + @JsonProperty("subject") + private String subject; + + /** + * Body of the email + */ + @JsonProperty("body") + private String body; + + @JsonCreator + public EmailRenderOutput( + @JsonProperty("subject") @Nonnull String subject, + @JsonProperty("body") @Nonnull String body) { + this.subject = Optional.ofNullable(subject) + .orElseThrow(() -> new IllegalArgumentException("subject cannot be null")); + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + /** + * Subject of the email + */ + public String subject() { + return this.subject; + } + + /** + * Body of the email + */ + public String body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Subject of the email + */ + public EmailRenderOutput withSubject(@Nonnull String subject) { + this.subject = Utils.checkNotNull(subject, "subject"); + return this; + } + + + /** + * Body of the email + */ + public EmailRenderOutput withBody(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EmailRenderOutput other = (EmailRenderOutput) o; + return + Utils.enhancedDeepEquals(this.subject, other.subject) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subject, body); + } + + @Override + public String toString() { + return Utils.toString(EmailRenderOutput.class, + "subject", subject, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subject; + + private String body; + + private Builder() { + // force use of static builder() method + } + + /** + * Subject of the email + */ + public Builder subject(@Nonnull String subject) { + this.subject = Utils.checkNotNull(subject, "subject"); + return this; + } + + /** + * Body of the email + */ + public Builder body(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public EmailRenderOutput build() { + return new EmailRenderOutput( + subject, body); + } + + } +} diff --git a/src/main/java/co/novu/models/components/EmailStepResponseDto.java b/src/main/java/co/novu/models/components/EmailStepResponseDto.java index 4cfb2bd8..8eb41665 100644 --- a/src/main/java/co/novu/models/components/EmailStepResponseDto.java +++ b/src/main/java/co/novu/models/components/EmailStepResponseDto.java @@ -92,6 +92,13 @@ public class EmailStepResponseDto implements WorkflowResponseDtoStep { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public EmailStepResponseDto( @JsonProperty("controls") @Nonnull EmailControlsMetadataResponseDto controls, @@ -105,7 +112,8 @@ public EmailStepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public EmailStepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public EmailStepResponseDto( @@ -145,7 +154,8 @@ public EmailStepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -233,6 +243,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -346,6 +363,15 @@ public EmailStepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public EmailStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -367,7 +393,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -376,7 +403,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -393,7 +421,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -423,6 +452,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -523,12 +554,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public EmailStepResponseDto build() { return new EmailStepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/EmailStepResponseDtoControlValues.java b/src/main/java/co/novu/models/components/EmailStepResponseDtoControlValues.java index 4972f01e..31c48bfd 100644 --- a/src/main/java/co/novu/models/components/EmailStepResponseDtoControlValues.java +++ b/src/main/java/co/novu/models/components/EmailStepResponseDtoControlValues.java @@ -59,13 +59,6 @@ public class EmailStepResponseDtoControlValues { @JsonProperty("editorType") private EmailStepResponseDtoEditorType editorType; - /** - * Type of renderer to use (raw HTML or React Email step resolver) - */ - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("rendererType") - private EmailStepResponseDtoRendererType rendererType; - /** * Disable sanitization of the output. */ @@ -90,7 +83,6 @@ public EmailStepResponseDtoControlValues( @JsonProperty("subject") @Nonnull String subject, @JsonProperty("body") @Nullable String body, @JsonProperty("editorType") @Nullable EmailStepResponseDtoEditorType editorType, - @JsonProperty("rendererType") @Nullable EmailStepResponseDtoRendererType rendererType, @JsonProperty("disableOutputSanitization") @Nullable Boolean disableOutputSanitization, @JsonProperty("layoutId") @Nullable JsonNullable layoutId) { this.skip = skip; @@ -100,8 +92,6 @@ public EmailStepResponseDtoControlValues( .orElse(Builder._SINGLETON_VALUE_Body.value()); this.editorType = Optional.ofNullable(editorType) .orElse(Builder._SINGLETON_VALUE_EditorType.value()); - this.rendererType = Optional.ofNullable(rendererType) - .orElse(Builder._SINGLETON_VALUE_RendererType.value()); this.disableOutputSanitization = Optional.ofNullable(disableOutputSanitization) .orElse(Builder._SINGLETON_VALUE_DisableOutputSanitization.value()); this.layoutId = Optional.ofNullable(layoutId) @@ -112,8 +102,7 @@ public EmailStepResponseDtoControlValues( public EmailStepResponseDtoControlValues( @Nonnull String subject) { this(null, subject, null, - null, null, null, - null); + null, null, null); } /** @@ -146,13 +135,6 @@ public Optional editorType() { return Optional.ofNullable(this.editorType); } - /** - * Type of renderer to use (raw HTML or React Email step resolver) - */ - public Optional rendererType() { - return Optional.ofNullable(this.rendererType); - } - /** * Disable sanitization of the output. */ @@ -215,15 +197,6 @@ public EmailStepResponseDtoControlValues withEditorType(@Nullable EmailStepRespo } - /** - * Type of renderer to use (raw HTML or React Email step resolver) - */ - public EmailStepResponseDtoControlValues withRendererType(@Nullable EmailStepResponseDtoRendererType rendererType) { - this.rendererType = rendererType; - return this; - } - - /** * Disable sanitization of the output. */ @@ -270,7 +243,6 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.subject, other.subject) && Utils.enhancedDeepEquals(this.body, other.body) && Utils.enhancedDeepEquals(this.editorType, other.editorType) && - Utils.enhancedDeepEquals(this.rendererType, other.rendererType) && Utils.enhancedDeepEquals(this.disableOutputSanitization, other.disableOutputSanitization) && Utils.enhancedDeepEquals(this.layoutId, other.layoutId) && Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); @@ -280,8 +252,8 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( skip, subject, body, - editorType, rendererType, disableOutputSanitization, - layoutId, additionalProperties); + editorType, disableOutputSanitization, layoutId, + additionalProperties); } @Override @@ -291,7 +263,6 @@ public String toString() { "subject", subject, "body", body, "editorType", editorType, - "rendererType", rendererType, "disableOutputSanitization", disableOutputSanitization, "layoutId", layoutId, "additionalProperties", additionalProperties); @@ -308,8 +279,6 @@ public final static class Builder { private EmailStepResponseDtoEditorType editorType; - private EmailStepResponseDtoRendererType rendererType; - private Boolean disableOutputSanitization; private JsonNullable layoutId; @@ -354,14 +323,6 @@ public Builder editorType(@Nullable EmailStepResponseDtoEditorType editorType) { return this; } - /** - * Type of renderer to use (raw HTML or React Email step resolver) - */ - public Builder rendererType(@Nullable EmailStepResponseDtoRendererType rendererType) { - this.rendererType = rendererType; - return this; - } - /** * Disable sanitization of the output. */ @@ -395,8 +356,7 @@ public Builder additionalProperties(@Nullable Map additionalProp public EmailStepResponseDtoControlValues build() { return new EmailStepResponseDtoControlValues( skip, subject, body, - editorType, rendererType, disableOutputSanitization, - layoutId) + editorType, disableOutputSanitization, layoutId) .withAdditionalProperties(additionalProperties); } @@ -413,12 +373,6 @@ public EmailStepResponseDtoControlValues build() { "\"block\"", new TypeReference() {}); - private static final LazySingletonValue _SINGLETON_VALUE_RendererType = - new LazySingletonValue<>( - "rendererType", - "\"html\"", - new TypeReference() {}); - private static final LazySingletonValue _SINGLETON_VALUE_DisableOutputSanitization = new LazySingletonValue<>( "disableOutputSanitization", diff --git a/src/main/java/co/novu/models/components/EmailStepResponseDtoRendererType.java b/src/main/java/co/novu/models/components/EmailStepResponseDtoRendererType.java deleted file mode 100644 index 3bc66322..00000000 --- a/src/main/java/co/novu/models/components/EmailStepResponseDtoRendererType.java +++ /dev/null @@ -1,132 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package co.novu.models.components; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.Override; -import java.lang.String; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - * Wrapper for an "open" enum that can handle unknown values from API responses - * without runtime errors. Instances are immutable singletons with reference equality. - * Use {@code asEnum()} for switch expressions. - */ -/** - * EmailStepResponseDtoRendererType - * - *

Type of renderer to use (raw HTML or React Email step resolver) - */ -public class EmailStepResponseDtoRendererType { - - public static final EmailStepResponseDtoRendererType HTML = new EmailStepResponseDtoRendererType("html"); - public static final EmailStepResponseDtoRendererType REACT_EMAIL = new EmailStepResponseDtoRendererType("react-email"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private EmailStepResponseDtoRendererType(String value) { - this.value = value; - } - - /** - * Returns a EmailStepResponseDtoRendererType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as EmailStepResponseDtoRendererType - */ - @JsonCreator - public static EmailStepResponseDtoRendererType of(String value) { - synchronized (EmailStepResponseDtoRendererType.class) { - return values.computeIfAbsent(value, v -> new EmailStepResponseDtoRendererType(v)); - } - } - - @JsonValue - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - EmailStepResponseDtoRendererType other = (EmailStepResponseDtoRendererType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "EmailStepResponseDtoRendererType [value=" + value + "]"; - } - - // return an array just like an enum - public static EmailStepResponseDtoRendererType[] values() { - synchronized (EmailStepResponseDtoRendererType.class) { - return values.values().toArray(new EmailStepResponseDtoRendererType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("html", HTML); - map.put("react-email", REACT_EMAIL); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("html", EmailStepResponseDtoRendererTypeEnum.HTML); - map.put("react-email", EmailStepResponseDtoRendererTypeEnum.REACT_EMAIL); - return map; - } - - - public enum EmailStepResponseDtoRendererTypeEnum { - - HTML("html"), - REACT_EMAIL("react-email"),; - - private final String value; - - private EmailStepResponseDtoRendererTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/co/novu/models/components/EnvironmentDiffSummaryDto.java b/src/main/java/co/novu/models/components/EnvironmentDiffSummaryDto.java new file mode 100644 index 00000000..2acb79cc --- /dev/null +++ b/src/main/java/co/novu/models/components/EnvironmentDiffSummaryDto.java @@ -0,0 +1,167 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class EnvironmentDiffSummaryDto { + /** + * Total number of entities compared + */ + @JsonProperty("totalEntities") + private double totalEntities; + + /** + * Total number of changes detected + */ + @JsonProperty("totalChanges") + private double totalChanges; + + /** + * Whether any changes were detected + */ + @JsonProperty("hasChanges") + private boolean hasChanges; + + @JsonCreator + public EnvironmentDiffSummaryDto( + @JsonProperty("totalEntities") double totalEntities, + @JsonProperty("totalChanges") double totalChanges, + @JsonProperty("hasChanges") boolean hasChanges) { + this.totalEntities = totalEntities; + this.totalChanges = totalChanges; + this.hasChanges = hasChanges; + } + + /** + * Total number of entities compared + */ + public double totalEntities() { + return this.totalEntities; + } + + /** + * Total number of changes detected + */ + public double totalChanges() { + return this.totalChanges; + } + + /** + * Whether any changes were detected + */ + public boolean hasChanges() { + return this.hasChanges; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Total number of entities compared + */ + public EnvironmentDiffSummaryDto withTotalEntities(double totalEntities) { + this.totalEntities = totalEntities; + return this; + } + + + /** + * Total number of changes detected + */ + public EnvironmentDiffSummaryDto withTotalChanges(double totalChanges) { + this.totalChanges = totalChanges; + return this; + } + + + /** + * Whether any changes were detected + */ + public EnvironmentDiffSummaryDto withHasChanges(boolean hasChanges) { + this.hasChanges = hasChanges; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentDiffSummaryDto other = (EnvironmentDiffSummaryDto) o; + return + Utils.enhancedDeepEquals(this.totalEntities, other.totalEntities) && + Utils.enhancedDeepEquals(this.totalChanges, other.totalChanges) && + Utils.enhancedDeepEquals(this.hasChanges, other.hasChanges); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + totalEntities, totalChanges, hasChanges); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentDiffSummaryDto.class, + "totalEntities", totalEntities, + "totalChanges", totalChanges, + "hasChanges", hasChanges); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private double totalEntities; + + private double totalChanges; + + private boolean hasChanges; + + private Builder() { + // force use of static builder() method + } + + /** + * Total number of entities compared + */ + public Builder totalEntities(double totalEntities) { + this.totalEntities = totalEntities; + return this; + } + + /** + * Total number of changes detected + */ + public Builder totalChanges(double totalChanges) { + this.totalChanges = totalChanges; + return this; + } + + /** + * Whether any changes were detected + */ + public Builder hasChanges(boolean hasChanges) { + this.hasChanges = hasChanges; + return this; + } + + public EnvironmentDiffSummaryDto build() { + return new EnvironmentDiffSummaryDto( + totalEntities, totalChanges, hasChanges); + } + + } +} diff --git a/src/main/java/co/novu/models/components/EnvironmentVariableResponseDto.java b/src/main/java/co/novu/models/components/EnvironmentVariableResponseDto.java new file mode 100644 index 00000000..5b225125 --- /dev/null +++ b/src/main/java/co/novu/models/components/EnvironmentVariableResponseDto.java @@ -0,0 +1,273 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class EnvironmentVariableResponseDto { + + @JsonProperty("_id") + private String id; + + + @JsonProperty("_organizationId") + private String organizationId; + + + @JsonProperty("key") + private String key; + + + @JsonProperty("type") + private EnvironmentVariableResponseDtoType type; + + + @JsonProperty("isSecret") + private boolean isSecret; + + + @JsonProperty("values") + private List values; + + + @JsonProperty("createdAt") + private String createdAt; + + + @JsonProperty("updatedAt") + private String updatedAt; + + @JsonCreator + public EnvironmentVariableResponseDto( + @JsonProperty("_id") @Nonnull String id, + @JsonProperty("_organizationId") @Nonnull String organizationId, + @JsonProperty("key") @Nonnull String key, + @JsonProperty("type") @Nonnull EnvironmentVariableResponseDtoType type, + @JsonProperty("isSecret") boolean isSecret, + @JsonProperty("values") @Nonnull List values, + @JsonProperty("createdAt") @Nonnull String createdAt, + @JsonProperty("updatedAt") @Nonnull String updatedAt) { + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.organizationId = Optional.ofNullable(organizationId) + .orElseThrow(() -> new IllegalArgumentException("organizationId cannot be null")); + this.key = Optional.ofNullable(key) + .orElseThrow(() -> new IllegalArgumentException("key cannot be null")); + this.type = Optional.ofNullable(type) + .orElseThrow(() -> new IllegalArgumentException("type cannot be null")); + this.isSecret = isSecret; + this.values = Optional.ofNullable(values) + .orElseThrow(() -> new IllegalArgumentException("values cannot be null")); + this.createdAt = Optional.ofNullable(createdAt) + .orElseThrow(() -> new IllegalArgumentException("createdAt cannot be null")); + this.updatedAt = Optional.ofNullable(updatedAt) + .orElseThrow(() -> new IllegalArgumentException("updatedAt cannot be null")); + } + + public String id() { + return this.id; + } + + public String organizationId() { + return this.organizationId; + } + + public String key() { + return this.key; + } + + public EnvironmentVariableResponseDtoType type() { + return this.type; + } + + public boolean isSecret() { + return this.isSecret; + } + + public List values() { + return this.values; + } + + public String createdAt() { + return this.createdAt; + } + + public String updatedAt() { + return this.updatedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + public EnvironmentVariableResponseDto withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + public EnvironmentVariableResponseDto withOrganizationId(@Nonnull String organizationId) { + this.organizationId = Utils.checkNotNull(organizationId, "organizationId"); + return this; + } + + + public EnvironmentVariableResponseDto withKey(@Nonnull String key) { + this.key = Utils.checkNotNull(key, "key"); + return this; + } + + + public EnvironmentVariableResponseDto withType(@Nonnull EnvironmentVariableResponseDtoType type) { + this.type = Utils.checkNotNull(type, "type"); + return this; + } + + + public EnvironmentVariableResponseDto withIsSecret(boolean isSecret) { + this.isSecret = isSecret; + return this; + } + + + public EnvironmentVariableResponseDto withValues(@Nonnull List values) { + this.values = Utils.checkNotNull(values, "values"); + return this; + } + + + public EnvironmentVariableResponseDto withCreatedAt(@Nonnull String createdAt) { + this.createdAt = Utils.checkNotNull(createdAt, "createdAt"); + return this; + } + + + public EnvironmentVariableResponseDto withUpdatedAt(@Nonnull String updatedAt) { + this.updatedAt = Utils.checkNotNull(updatedAt, "updatedAt"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariableResponseDto other = (EnvironmentVariableResponseDto) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.organizationId, other.organizationId) && + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.isSecret, other.isSecret) && + Utils.enhancedDeepEquals(this.values, other.values) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, organizationId, key, + type, isSecret, values, + createdAt, updatedAt); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariableResponseDto.class, + "id", id, + "organizationId", organizationId, + "key", key, + "type", type, + "isSecret", isSecret, + "values", values, + "createdAt", createdAt, + "updatedAt", updatedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String organizationId; + + private String key; + + private EnvironmentVariableResponseDtoType type; + + private boolean isSecret; + + private List values; + + private String createdAt; + + private String updatedAt; + + private Builder() { + // force use of static builder() method + } + + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + public Builder organizationId(@Nonnull String organizationId) { + this.organizationId = Utils.checkNotNull(organizationId, "organizationId"); + return this; + } + + public Builder key(@Nonnull String key) { + this.key = Utils.checkNotNull(key, "key"); + return this; + } + + public Builder type(@Nonnull EnvironmentVariableResponseDtoType type) { + this.type = Utils.checkNotNull(type, "type"); + return this; + } + + public Builder isSecret(boolean isSecret) { + this.isSecret = isSecret; + return this; + } + + public Builder values(@Nonnull List values) { + this.values = Utils.checkNotNull(values, "values"); + return this; + } + + public Builder createdAt(@Nonnull String createdAt) { + this.createdAt = Utils.checkNotNull(createdAt, "createdAt"); + return this; + } + + public Builder updatedAt(@Nonnull String updatedAt) { + this.updatedAt = Utils.checkNotNull(updatedAt, "updatedAt"); + return this; + } + + public EnvironmentVariableResponseDto build() { + return new EnvironmentVariableResponseDto( + id, organizationId, key, + type, isSecret, values, + createdAt, updatedAt); + } + + } +} diff --git a/src/main/java/co/novu/models/components/EnvironmentVariableResponseDtoType.java b/src/main/java/co/novu/models/components/EnvironmentVariableResponseDtoType.java new file mode 100644 index 00000000..6132202c --- /dev/null +++ b/src/main/java/co/novu/models/components/EnvironmentVariableResponseDtoType.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +public class EnvironmentVariableResponseDtoType { + + public static final EnvironmentVariableResponseDtoType STRING = new EnvironmentVariableResponseDtoType("string"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private EnvironmentVariableResponseDtoType(String value) { + this.value = value; + } + + /** + * Returns a EnvironmentVariableResponseDtoType with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as EnvironmentVariableResponseDtoType + */ + @JsonCreator + public static EnvironmentVariableResponseDtoType of(String value) { + synchronized (EnvironmentVariableResponseDtoType.class) { + return values.computeIfAbsent(value, v -> new EnvironmentVariableResponseDtoType(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + EnvironmentVariableResponseDtoType other = (EnvironmentVariableResponseDtoType) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "EnvironmentVariableResponseDtoType [value=" + value + "]"; + } + + // return an array just like an enum + public static EnvironmentVariableResponseDtoType[] values() { + synchronized (EnvironmentVariableResponseDtoType.class) { + return values.values().toArray(new EnvironmentVariableResponseDtoType[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("string", STRING); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("string", EnvironmentVariableResponseDtoTypeEnum.STRING); + return map; + } + + + public enum EnvironmentVariableResponseDtoTypeEnum { + + STRING("string"),; + + private final String value; + + private EnvironmentVariableResponseDtoTypeEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/EnvironmentVariableValueDto.java b/src/main/java/co/novu/models/components/EnvironmentVariableValueDto.java new file mode 100644 index 00000000..dcea43cb --- /dev/null +++ b/src/main/java/co/novu/models/components/EnvironmentVariableValueDto.java @@ -0,0 +1,113 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentVariableValueDto { + + @JsonProperty("_environmentId") + private String environmentId; + + + @JsonProperty("value") + private String value; + + @JsonCreator + public EnvironmentVariableValueDto( + @JsonProperty("_environmentId") @Nonnull String environmentId, + @JsonProperty("value") @Nonnull String value) { + this.environmentId = Optional.ofNullable(environmentId) + .orElseThrow(() -> new IllegalArgumentException("environmentId cannot be null")); + this.value = Optional.ofNullable(value) + .orElseThrow(() -> new IllegalArgumentException("value cannot be null")); + } + + public String environmentId() { + return this.environmentId; + } + + public String value() { + return this.value; + } + + public static Builder builder() { + return new Builder(); + } + + + public EnvironmentVariableValueDto withEnvironmentId(@Nonnull String environmentId) { + this.environmentId = Utils.checkNotNull(environmentId, "environmentId"); + return this; + } + + + public EnvironmentVariableValueDto withValue(@Nonnull String value) { + this.value = Utils.checkNotNull(value, "value"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariableValueDto other = (EnvironmentVariableValueDto) o; + return + Utils.enhancedDeepEquals(this.environmentId, other.environmentId) && + Utils.enhancedDeepEquals(this.value, other.value); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + environmentId, value); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariableValueDto.class, + "environmentId", environmentId, + "value", value); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String environmentId; + + private String value; + + private Builder() { + // force use of static builder() method + } + + public Builder environmentId(@Nonnull String environmentId) { + this.environmentId = Utils.checkNotNull(environmentId, "environmentId"); + return this; + } + + public Builder value(@Nonnull String value) { + this.value = Utils.checkNotNull(value, "value"); + return this; + } + + public EnvironmentVariableValueDto build() { + return new EnvironmentVariableValueDto( + environmentId, value); + } + + } +} diff --git a/src/main/java/co/novu/models/components/EnvironmentVariableValueResponseDto.java b/src/main/java/co/novu/models/components/EnvironmentVariableValueResponseDto.java new file mode 100644 index 00000000..ef522af2 --- /dev/null +++ b/src/main/java/co/novu/models/components/EnvironmentVariableValueResponseDto.java @@ -0,0 +1,124 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentVariableValueResponseDto { + + @JsonProperty("_environmentId") + private String environmentId; + + /** + * Value is masked (••••••••) for secret variables + */ + @JsonProperty("value") + private String value; + + @JsonCreator + public EnvironmentVariableValueResponseDto( + @JsonProperty("_environmentId") @Nonnull String environmentId, + @JsonProperty("value") @Nonnull String value) { + this.environmentId = Optional.ofNullable(environmentId) + .orElseThrow(() -> new IllegalArgumentException("environmentId cannot be null")); + this.value = Optional.ofNullable(value) + .orElseThrow(() -> new IllegalArgumentException("value cannot be null")); + } + + public String environmentId() { + return this.environmentId; + } + + /** + * Value is masked (••••••••) for secret variables + */ + public String value() { + return this.value; + } + + public static Builder builder() { + return new Builder(); + } + + + public EnvironmentVariableValueResponseDto withEnvironmentId(@Nonnull String environmentId) { + this.environmentId = Utils.checkNotNull(environmentId, "environmentId"); + return this; + } + + + /** + * Value is masked (••••••••) for secret variables + */ + public EnvironmentVariableValueResponseDto withValue(@Nonnull String value) { + this.value = Utils.checkNotNull(value, "value"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariableValueResponseDto other = (EnvironmentVariableValueResponseDto) o; + return + Utils.enhancedDeepEquals(this.environmentId, other.environmentId) && + Utils.enhancedDeepEquals(this.value, other.value); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + environmentId, value); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariableValueResponseDto.class, + "environmentId", environmentId, + "value", value); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String environmentId; + + private String value; + + private Builder() { + // force use of static builder() method + } + + public Builder environmentId(@Nonnull String environmentId) { + this.environmentId = Utils.checkNotNull(environmentId, "environmentId"); + return this; + } + + /** + * Value is masked (••••••••) for secret variables + */ + public Builder value(@Nonnull String value) { + this.value = Utils.checkNotNull(value, "value"); + return this; + } + + public EnvironmentVariableValueResponseDto build() { + return new EnvironmentVariableValueResponseDto( + environmentId, value); + } + + } +} diff --git a/src/main/java/co/novu/models/components/EnvironmentVariableWorkflowInfoDto.java b/src/main/java/co/novu/models/components/EnvironmentVariableWorkflowInfoDto.java new file mode 100644 index 00000000..a93d6aa8 --- /dev/null +++ b/src/main/java/co/novu/models/components/EnvironmentVariableWorkflowInfoDto.java @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentVariableWorkflowInfoDto { + /** + * The name of the workflow + */ + @JsonProperty("name") + private String name; + + /** + * The unique identifier of the workflow + */ + @JsonProperty("workflowId") + private String workflowId; + + @JsonCreator + public EnvironmentVariableWorkflowInfoDto( + @JsonProperty("name") @Nonnull String name, + @JsonProperty("workflowId") @Nonnull String workflowId) { + this.name = Optional.ofNullable(name) + .orElseThrow(() -> new IllegalArgumentException("name cannot be null")); + this.workflowId = Optional.ofNullable(workflowId) + .orElseThrow(() -> new IllegalArgumentException("workflowId cannot be null")); + } + + /** + * The name of the workflow + */ + public String name() { + return this.name; + } + + /** + * The unique identifier of the workflow + */ + public String workflowId() { + return this.workflowId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The name of the workflow + */ + public EnvironmentVariableWorkflowInfoDto withName(@Nonnull String name) { + this.name = Utils.checkNotNull(name, "name"); + return this; + } + + + /** + * The unique identifier of the workflow + */ + public EnvironmentVariableWorkflowInfoDto withWorkflowId(@Nonnull String workflowId) { + this.workflowId = Utils.checkNotNull(workflowId, "workflowId"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariableWorkflowInfoDto other = (EnvironmentVariableWorkflowInfoDto) o; + return + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.workflowId, other.workflowId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + name, workflowId); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariableWorkflowInfoDto.class, + "name", name, + "workflowId", workflowId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String name; + + private String workflowId; + + private Builder() { + // force use of static builder() method + } + + /** + * The name of the workflow + */ + public Builder name(@Nonnull String name) { + this.name = Utils.checkNotNull(name, "name"); + return this; + } + + /** + * The unique identifier of the workflow + */ + public Builder workflowId(@Nonnull String workflowId) { + this.workflowId = Utils.checkNotNull(workflowId, "workflowId"); + return this; + } + + public EnvironmentVariableWorkflowInfoDto build() { + return new EnvironmentVariableWorkflowInfoDto( + name, workflowId); + } + + } +} diff --git a/src/main/java/co/novu/models/components/FailedWorkflowDto.java b/src/main/java/co/novu/models/components/FailedWorkflowDto.java new file mode 100644 index 00000000..4f7af9cf --- /dev/null +++ b/src/main/java/co/novu/models/components/FailedWorkflowDto.java @@ -0,0 +1,260 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class FailedWorkflowDto { + /** + * Type of the layout + */ + @JsonProperty("resourceType") + private ResourceTypeEnum resourceType; + + /** + * Resource ID + */ + @JsonProperty("resourceId") + private String resourceId; + + /** + * Resource name + */ + @JsonProperty("resourceName") + private String resourceName; + + /** + * Error message + */ + @JsonProperty("error") + private String error; + + /** + * Error stack trace + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stack") + private String stack; + + @JsonCreator + public FailedWorkflowDto( + @JsonProperty("resourceType") @Nonnull ResourceTypeEnum resourceType, + @JsonProperty("resourceId") @Nonnull String resourceId, + @JsonProperty("resourceName") @Nonnull String resourceName, + @JsonProperty("error") @Nonnull String error, + @JsonProperty("stack") @Nullable String stack) { + this.resourceType = Optional.ofNullable(resourceType) + .orElseThrow(() -> new IllegalArgumentException("resourceType cannot be null")); + this.resourceId = Optional.ofNullable(resourceId) + .orElseThrow(() -> new IllegalArgumentException("resourceId cannot be null")); + this.resourceName = Optional.ofNullable(resourceName) + .orElseThrow(() -> new IllegalArgumentException("resourceName cannot be null")); + this.error = Optional.ofNullable(error) + .orElseThrow(() -> new IllegalArgumentException("error cannot be null")); + this.stack = stack; + } + + public FailedWorkflowDto( + @Nonnull ResourceTypeEnum resourceType, + @Nonnull String resourceId, + @Nonnull String resourceName, + @Nonnull String error) { + this(resourceType, resourceId, resourceName, + error, null); + } + + /** + * Type of the layout + */ + public ResourceTypeEnum resourceType() { + return this.resourceType; + } + + /** + * Resource ID + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Resource name + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Error message + */ + public String error() { + return this.error; + } + + /** + * Error stack trace + */ + public Optional stack() { + return Optional.ofNullable(this.stack); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Type of the layout + */ + public FailedWorkflowDto withResourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + + /** + * Resource ID + */ + public FailedWorkflowDto withResourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + + /** + * Resource name + */ + public FailedWorkflowDto withResourceName(@Nonnull String resourceName) { + this.resourceName = Utils.checkNotNull(resourceName, "resourceName"); + return this; + } + + + /** + * Error message + */ + public FailedWorkflowDto withError(@Nonnull String error) { + this.error = Utils.checkNotNull(error, "error"); + return this; + } + + + /** + * Error stack trace + */ + public FailedWorkflowDto withStack(@Nullable String stack) { + this.stack = stack; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + FailedWorkflowDto other = (FailedWorkflowDto) o; + return + Utils.enhancedDeepEquals(this.resourceType, other.resourceType) && + Utils.enhancedDeepEquals(this.resourceId, other.resourceId) && + Utils.enhancedDeepEquals(this.resourceName, other.resourceName) && + Utils.enhancedDeepEquals(this.error, other.error) && + Utils.enhancedDeepEquals(this.stack, other.stack); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + resourceType, resourceId, resourceName, + error, stack); + } + + @Override + public String toString() { + return Utils.toString(FailedWorkflowDto.class, + "resourceType", resourceType, + "resourceId", resourceId, + "resourceName", resourceName, + "error", error, + "stack", stack); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private ResourceTypeEnum resourceType; + + private String resourceId; + + private String resourceName; + + private String error; + + private String stack; + + private Builder() { + // force use of static builder() method + } + + /** + * Type of the layout + */ + public Builder resourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + /** + * Resource ID + */ + public Builder resourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + /** + * Resource name + */ + public Builder resourceName(@Nonnull String resourceName) { + this.resourceName = Utils.checkNotNull(resourceName, "resourceName"); + return this; + } + + /** + * Error message + */ + public Builder error(@Nonnull String error) { + this.error = Utils.checkNotNull(error, "error"); + return this; + } + + /** + * Error stack trace + */ + public Builder stack(@Nullable String stack) { + this.stack = stack; + return this; + } + + public FailedWorkflowDto build() { + return new FailedWorkflowDto( + resourceType, resourceId, resourceName, + error, stack); + } + + } +} diff --git a/src/main/java/co/novu/models/components/Filter.java b/src/main/java/co/novu/models/components/Filter.java new file mode 100644 index 00000000..77ffd4f4 --- /dev/null +++ b/src/main/java/co/novu/models/components/Filter.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.lang.Override; +import java.lang.String; + +/** + * Filter + * + *

The filter applied to the notifications + */ +public class Filter { + @JsonCreator + public Filter() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(Filter.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public Filter build() { + return new Filter( + ); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDto.java b/src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDto.java index 226f2110..e4600f75 100644 --- a/src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDto.java +++ b/src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDto.java @@ -36,13 +36,13 @@ public class GenerateLayoutPreviewResponseDto { * Preview result */ @JsonProperty("result") - private ResultUnion result; + private GenerateLayoutPreviewResponseDtoResultUnion result; @JsonCreator public GenerateLayoutPreviewResponseDto( @JsonProperty("previewPayloadExample") @Nonnull LayoutPreviewPayloadDto previewPayloadExample, @JsonProperty("schema") @Nullable JsonNullable> schema, - @JsonProperty("result") @Nonnull ResultUnion result) { + @JsonProperty("result") @Nonnull GenerateLayoutPreviewResponseDtoResultUnion result) { this.previewPayloadExample = Optional.ofNullable(previewPayloadExample) .orElseThrow(() -> new IllegalArgumentException("previewPayloadExample cannot be null")); this.schema = Optional.ofNullable(schema) @@ -53,7 +53,7 @@ public GenerateLayoutPreviewResponseDto( public GenerateLayoutPreviewResponseDto( @Nonnull LayoutPreviewPayloadDto previewPayloadExample, - @Nonnull ResultUnion result) { + @Nonnull GenerateLayoutPreviewResponseDtoResultUnion result) { this(previewPayloadExample, null, result); } @@ -74,7 +74,7 @@ public JsonNullable> schema() { /** * Preview result */ - public ResultUnion result() { + public GenerateLayoutPreviewResponseDtoResultUnion result() { return this.result; } @@ -104,7 +104,7 @@ public GenerateLayoutPreviewResponseDto withSchema(@Nullable Map /** * Preview result */ - public GenerateLayoutPreviewResponseDto withResult(@Nonnull ResultUnion result) { + public GenerateLayoutPreviewResponseDto withResult(@Nonnull GenerateLayoutPreviewResponseDtoResultUnion result) { this.result = Utils.checkNotNull(result, "result"); return this; } @@ -146,7 +146,7 @@ public final static class Builder { private JsonNullable> schema; - private ResultUnion result; + private GenerateLayoutPreviewResponseDtoResultUnion result; private Builder() { // force use of static builder() method @@ -171,7 +171,7 @@ public Builder schema(@Nullable Map schema) { /** * Preview result */ - public Builder result(@Nonnull ResultUnion result) { + public Builder result(@Nonnull GenerateLayoutPreviewResponseDtoResultUnion result) { this.result = Utils.checkNotNull(result, "result"); return this; } diff --git a/src/main/java/co/novu/models/components/Result.java b/src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDtoResult.java similarity index 79% rename from src/main/java/co/novu/models/components/Result.java rename to src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDtoResult.java index 5d63754b..a2395a44 100644 --- a/src/main/java/co/novu/models/components/Result.java +++ b/src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDtoResult.java @@ -14,7 +14,7 @@ import java.util.Optional; -public class Result { +public class GenerateLayoutPreviewResponseDtoResult { @JsonInclude(Include.NON_ABSENT) @JsonProperty("type") @@ -26,14 +26,14 @@ public class Result { private EmailLayoutRenderOutput preview; @JsonCreator - public Result( + public GenerateLayoutPreviewResponseDtoResult( @JsonProperty("type") @Nullable GenerateLayoutPreviewResponseDtoType type, @JsonProperty("preview") @Nullable EmailLayoutRenderOutput preview) { this.type = type; this.preview = preview; } - public Result() { + public GenerateLayoutPreviewResponseDtoResult() { this(null, null); } @@ -50,13 +50,13 @@ public static Builder builder() { } - public Result withType(@Nullable GenerateLayoutPreviewResponseDtoType type) { + public GenerateLayoutPreviewResponseDtoResult withType(@Nullable GenerateLayoutPreviewResponseDtoType type) { this.type = type; return this; } - public Result withPreview(@Nullable EmailLayoutRenderOutput preview) { + public GenerateLayoutPreviewResponseDtoResult withPreview(@Nullable EmailLayoutRenderOutput preview) { this.preview = preview; return this; } @@ -70,7 +70,7 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - Result other = (Result) o; + GenerateLayoutPreviewResponseDtoResult other = (GenerateLayoutPreviewResponseDtoResult) o; return Utils.enhancedDeepEquals(this.type, other.type) && Utils.enhancedDeepEquals(this.preview, other.preview); @@ -84,7 +84,7 @@ public int hashCode() { @Override public String toString() { - return Utils.toString(Result.class, + return Utils.toString(GenerateLayoutPreviewResponseDtoResult.class, "type", type, "preview", preview); } @@ -110,8 +110,8 @@ public Builder preview(@Nullable EmailLayoutRenderOutput preview) { return this; } - public Result build() { - return new Result( + public GenerateLayoutPreviewResponseDtoResult build() { + return new GenerateLayoutPreviewResponseDtoResult( type, preview); } diff --git a/src/main/java/co/novu/models/components/ResultUnion.java b/src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDtoResultUnion.java similarity index 60% rename from src/main/java/co/novu/models/components/ResultUnion.java rename to src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDtoResultUnion.java index 82a0102f..ead2b508 100644 --- a/src/main/java/co/novu/models/components/ResultUnion.java +++ b/src/main/java/co/novu/models/components/GenerateLayoutPreviewResponseDtoResultUnion.java @@ -18,34 +18,34 @@ import java.util.Optional; /** - * ResultUnion + * GenerateLayoutPreviewResponseDtoResultUnion * *

Preview result */ -@JsonDeserialize(using = ResultUnion._Deserializer.class) -public class ResultUnion { +@JsonDeserialize(using = GenerateLayoutPreviewResponseDtoResultUnion._Deserializer.class) +public class GenerateLayoutPreviewResponseDtoResultUnion { @JsonValue private final TypedObject value; - private ResultUnion(TypedObject value) { + private GenerateLayoutPreviewResponseDtoResultUnion(TypedObject value) { this.value = value; } - public static ResultUnion of(Result value) { + public static GenerateLayoutPreviewResponseDtoResultUnion of(GenerateLayoutPreviewResponseDtoResult value) { Utils.checkNotNull(value, "value"); - return new ResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + return new GenerateLayoutPreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); } /** - * Returns an {@link Optional} containing the value if it is of type {@code Result}, + * Returns an {@link Optional} containing the value if it is of type {@code GenerateLayoutPreviewResponseDtoResult}, * otherwise returns an empty {@link Optional}. * - * @return an {@link Optional} containing the {@code Result} value, or empty if not of this type + * @return an {@link Optional} containing the {@code GenerateLayoutPreviewResponseDtoResult} value, or empty if not of this type */ - public Optional result() { - if (value.value() instanceof Result) { - return Optional.of((Result) value.value()); + public Optional generateLayoutPreviewResponseDtoResult() { + if (value.value() instanceof GenerateLayoutPreviewResponseDtoResult) { + return Optional.of((GenerateLayoutPreviewResponseDtoResult) value.value()); } return Optional.empty(); } @@ -70,7 +70,7 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - ResultUnion other = (ResultUnion) o; + GenerateLayoutPreviewResponseDtoResultUnion other = (GenerateLayoutPreviewResponseDtoResultUnion) o; return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); } @@ -80,17 +80,17 @@ public int hashCode() { } @SuppressWarnings("serial") - public static final class _Deserializer extends OneOfDeserializer { + public static final class _Deserializer extends OneOfDeserializer { public _Deserializer() { - super(ResultUnion.class, false, - TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + super(GenerateLayoutPreviewResponseDtoResultUnion.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); } } @Override public String toString() { - return Utils.toString(ResultUnion.class, + return Utils.toString(GenerateLayoutPreviewResponseDtoResultUnion.class, "value", value); } diff --git a/src/main/java/co/novu/models/components/GeneratePreviewRequestDto.java b/src/main/java/co/novu/models/components/GeneratePreviewRequestDto.java new file mode 100644 index 00000000..893c35ed --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewRequestDto.java @@ -0,0 +1,143 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; +import java.util.Optional; + + +public class GeneratePreviewRequestDto { + /** + * Optional control values + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("controlValues") + private Map controlValues; + + /** + * Optional payload for preview generation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("previewPayload") + private PreviewPayloadDto previewPayload; + + @JsonCreator + public GeneratePreviewRequestDto( + @JsonProperty("controlValues") @Nullable Map controlValues, + @JsonProperty("previewPayload") @Nullable PreviewPayloadDto previewPayload) { + this.controlValues = controlValues; + this.previewPayload = previewPayload; + } + + public GeneratePreviewRequestDto() { + this(null, null); + } + + /** + * Optional control values + */ + public Optional> controlValues() { + return Optional.ofNullable(this.controlValues); + } + + /** + * Optional payload for preview generation + */ + public Optional previewPayload() { + return Optional.ofNullable(this.previewPayload); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Optional control values + */ + public GeneratePreviewRequestDto withControlValues(@Nullable Map controlValues) { + this.controlValues = controlValues; + return this; + } + + + /** + * Optional payload for preview generation + */ + public GeneratePreviewRequestDto withPreviewPayload(@Nullable PreviewPayloadDto previewPayload) { + this.previewPayload = previewPayload; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewRequestDto other = (GeneratePreviewRequestDto) o; + return + Utils.enhancedDeepEquals(this.controlValues, other.controlValues) && + Utils.enhancedDeepEquals(this.previewPayload, other.previewPayload); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + controlValues, previewPayload); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewRequestDto.class, + "controlValues", controlValues, + "previewPayload", previewPayload); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Map controlValues; + + private PreviewPayloadDto previewPayload; + + private Builder() { + // force use of static builder() method + } + + /** + * Optional control values + */ + public Builder controlValues(@Nullable Map controlValues) { + this.controlValues = controlValues; + return this; + } + + /** + * Optional payload for preview generation + */ + public Builder previewPayload(@Nullable PreviewPayloadDto previewPayload) { + this.previewPayload = previewPayload; + return this; + } + + public GeneratePreviewRequestDto build() { + return new GeneratePreviewRequestDto( + controlValues, previewPayload); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDto.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDto.java new file mode 100644 index 00000000..bdf6fa9b --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDto.java @@ -0,0 +1,225 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class GeneratePreviewResponseDto { + /** + * Preview payload example + */ + @JsonProperty("previewPayloadExample") + private PreviewPayloadDto previewPayloadExample; + + /** + * The payload schema that was used to generate the preview payload example + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("schema") + private JsonNullable> schema; + + /** + * Sample novu-signature header value for HTTP request steps + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("novuSignature") + private String novuSignature; + + /** + * Preview result + */ + @JsonProperty("result") + private GeneratePreviewResponseDtoResultUnion result; + + @JsonCreator + public GeneratePreviewResponseDto( + @JsonProperty("previewPayloadExample") @Nonnull PreviewPayloadDto previewPayloadExample, + @JsonProperty("schema") @Nullable JsonNullable> schema, + @JsonProperty("novuSignature") @Nullable String novuSignature, + @JsonProperty("result") @Nonnull GeneratePreviewResponseDtoResultUnion result) { + this.previewPayloadExample = Optional.ofNullable(previewPayloadExample) + .orElseThrow(() -> new IllegalArgumentException("previewPayloadExample cannot be null")); + this.schema = Optional.ofNullable(schema) + .orElse(JsonNullable.undefined()); + this.novuSignature = novuSignature; + this.result = Optional.ofNullable(result) + .orElseThrow(() -> new IllegalArgumentException("result cannot be null")); + } + + public GeneratePreviewResponseDto( + @Nonnull PreviewPayloadDto previewPayloadExample, + @Nonnull GeneratePreviewResponseDtoResultUnion result) { + this(previewPayloadExample, null, null, + result); + } + + /** + * Preview payload example + */ + public PreviewPayloadDto previewPayloadExample() { + return this.previewPayloadExample; + } + + /** + * The payload schema that was used to generate the preview payload example + */ + public JsonNullable> schema() { + return this.schema; + } + + /** + * Sample novu-signature header value for HTTP request steps + */ + public Optional novuSignature() { + return Optional.ofNullable(this.novuSignature); + } + + /** + * Preview result + */ + public GeneratePreviewResponseDtoResultUnion result() { + return this.result; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Preview payload example + */ + public GeneratePreviewResponseDto withPreviewPayloadExample(@Nonnull PreviewPayloadDto previewPayloadExample) { + this.previewPayloadExample = Utils.checkNotNull(previewPayloadExample, "previewPayloadExample"); + return this; + } + + + /** + * The payload schema that was used to generate the preview payload example + */ + public GeneratePreviewResponseDto withSchema(@Nullable Map schema) { + this.schema = JsonNullable.of(schema); + return this; + } + + + /** + * Sample novu-signature header value for HTTP request steps + */ + public GeneratePreviewResponseDto withNovuSignature(@Nullable String novuSignature) { + this.novuSignature = novuSignature; + return this; + } + + + /** + * Preview result + */ + public GeneratePreviewResponseDto withResult(@Nonnull GeneratePreviewResponseDtoResultUnion result) { + this.result = Utils.checkNotNull(result, "result"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDto other = (GeneratePreviewResponseDto) o; + return + Utils.enhancedDeepEquals(this.previewPayloadExample, other.previewPayloadExample) && + Utils.enhancedDeepEquals(this.schema, other.schema) && + Utils.enhancedDeepEquals(this.novuSignature, other.novuSignature) && + Utils.enhancedDeepEquals(this.result, other.result); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + previewPayloadExample, schema, novuSignature, + result); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDto.class, + "previewPayloadExample", previewPayloadExample, + "schema", schema, + "novuSignature", novuSignature, + "result", result); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private PreviewPayloadDto previewPayloadExample; + + private JsonNullable> schema; + + private String novuSignature; + + private GeneratePreviewResponseDtoResultUnion result; + + private Builder() { + // force use of static builder() method + } + + /** + * Preview payload example + */ + public Builder previewPayloadExample(@Nonnull PreviewPayloadDto previewPayloadExample) { + this.previewPayloadExample = Utils.checkNotNull(previewPayloadExample, "previewPayloadExample"); + return this; + } + + /** + * The payload schema that was used to generate the preview payload example + */ + public Builder schema(@Nullable Map schema) { + this.schema = JsonNullable.of(schema); + return this; + } + + /** + * Sample novu-signature header value for HTTP request steps + */ + public Builder novuSignature(@Nullable String novuSignature) { + this.novuSignature = novuSignature; + return this; + } + + /** + * Preview result + */ + public Builder result(@Nonnull GeneratePreviewResponseDtoResultUnion result) { + this.result = Utils.checkNotNull(result, "result"); + return this; + } + + public GeneratePreviewResponseDto build() { + return new GeneratePreviewResponseDto( + previewPayloadExample, schema, novuSignature, + result); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult1.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult1.java new file mode 100644 index 00000000..d0bd36cc --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult1.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GeneratePreviewResponseDtoResult1 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private GeneratePreviewResponseDtoTypeEmail1 type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("preview") + private EmailRenderOutput preview; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private PreviewErrorDto error; + + @JsonCreator + public GeneratePreviewResponseDtoResult1( + @JsonProperty("type") @Nullable GeneratePreviewResponseDtoTypeEmail1 type, + @JsonProperty("preview") @Nullable EmailRenderOutput preview, + @JsonProperty("error") @Nullable PreviewErrorDto error) { + this.type = type; + this.preview = preview; + this.error = error; + } + + public GeneratePreviewResponseDtoResult1() { + this(null, null, null); + } + + public Optional type() { + return Optional.ofNullable(this.type); + } + + public Optional preview() { + return Optional.ofNullable(this.preview); + } + + public Optional error() { + return Optional.ofNullable(this.error); + } + + public static Builder builder() { + return new Builder(); + } + + + public GeneratePreviewResponseDtoResult1 withType(@Nullable GeneratePreviewResponseDtoTypeEmail1 type) { + this.type = type; + return this; + } + + + public GeneratePreviewResponseDtoResult1 withPreview(@Nullable EmailRenderOutput preview) { + this.preview = preview; + return this; + } + + + public GeneratePreviewResponseDtoResult1 withError(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDtoResult1 other = (GeneratePreviewResponseDtoResult1) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.preview, other.preview) && + Utils.enhancedDeepEquals(this.error, other.error); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, preview, error); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDtoResult1.class, + "type", type, + "preview", preview, + "error", error); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private GeneratePreviewResponseDtoTypeEmail1 type; + + private EmailRenderOutput preview; + + private PreviewErrorDto error; + + private Builder() { + // force use of static builder() method + } + + public Builder type(@Nullable GeneratePreviewResponseDtoTypeEmail1 type) { + this.type = type; + return this; + } + + public Builder preview(@Nullable EmailRenderOutput preview) { + this.preview = preview; + return this; + } + + public Builder error(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + public GeneratePreviewResponseDtoResult1 build() { + return new GeneratePreviewResponseDtoResult1( + type, preview, error); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult2.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult2.java new file mode 100644 index 00000000..f3b8902a --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult2.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GeneratePreviewResponseDtoResult2 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private GeneratePreviewResponseDtoTypeEmail2 type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("preview") + private EmailRenderOutput preview; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private PreviewErrorDto error; + + @JsonCreator + public GeneratePreviewResponseDtoResult2( + @JsonProperty("type") @Nullable GeneratePreviewResponseDtoTypeEmail2 type, + @JsonProperty("preview") @Nullable EmailRenderOutput preview, + @JsonProperty("error") @Nullable PreviewErrorDto error) { + this.type = type; + this.preview = preview; + this.error = error; + } + + public GeneratePreviewResponseDtoResult2() { + this(null, null, null); + } + + public Optional type() { + return Optional.ofNullable(this.type); + } + + public Optional preview() { + return Optional.ofNullable(this.preview); + } + + public Optional error() { + return Optional.ofNullable(this.error); + } + + public static Builder builder() { + return new Builder(); + } + + + public GeneratePreviewResponseDtoResult2 withType(@Nullable GeneratePreviewResponseDtoTypeEmail2 type) { + this.type = type; + return this; + } + + + public GeneratePreviewResponseDtoResult2 withPreview(@Nullable EmailRenderOutput preview) { + this.preview = preview; + return this; + } + + + public GeneratePreviewResponseDtoResult2 withError(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDtoResult2 other = (GeneratePreviewResponseDtoResult2) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.preview, other.preview) && + Utils.enhancedDeepEquals(this.error, other.error); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, preview, error); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDtoResult2.class, + "type", type, + "preview", preview, + "error", error); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private GeneratePreviewResponseDtoTypeEmail2 type; + + private EmailRenderOutput preview; + + private PreviewErrorDto error; + + private Builder() { + // force use of static builder() method + } + + public Builder type(@Nullable GeneratePreviewResponseDtoTypeEmail2 type) { + this.type = type; + return this; + } + + public Builder preview(@Nullable EmailRenderOutput preview) { + this.preview = preview; + return this; + } + + public Builder error(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + public GeneratePreviewResponseDtoResult2 build() { + return new GeneratePreviewResponseDtoResult2( + type, preview, error); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult3.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult3.java new file mode 100644 index 00000000..7d6fe0b7 --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult3.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GeneratePreviewResponseDtoResult3 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private TypeInApp type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("preview") + private InAppRenderOutput preview; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private PreviewErrorDto error; + + @JsonCreator + public GeneratePreviewResponseDtoResult3( + @JsonProperty("type") @Nullable TypeInApp type, + @JsonProperty("preview") @Nullable InAppRenderOutput preview, + @JsonProperty("error") @Nullable PreviewErrorDto error) { + this.type = type; + this.preview = preview; + this.error = error; + } + + public GeneratePreviewResponseDtoResult3() { + this(null, null, null); + } + + public Optional type() { + return Optional.ofNullable(this.type); + } + + public Optional preview() { + return Optional.ofNullable(this.preview); + } + + public Optional error() { + return Optional.ofNullable(this.error); + } + + public static Builder builder() { + return new Builder(); + } + + + public GeneratePreviewResponseDtoResult3 withType(@Nullable TypeInApp type) { + this.type = type; + return this; + } + + + public GeneratePreviewResponseDtoResult3 withPreview(@Nullable InAppRenderOutput preview) { + this.preview = preview; + return this; + } + + + public GeneratePreviewResponseDtoResult3 withError(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDtoResult3 other = (GeneratePreviewResponseDtoResult3) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.preview, other.preview) && + Utils.enhancedDeepEquals(this.error, other.error); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, preview, error); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDtoResult3.class, + "type", type, + "preview", preview, + "error", error); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private TypeInApp type; + + private InAppRenderOutput preview; + + private PreviewErrorDto error; + + private Builder() { + // force use of static builder() method + } + + public Builder type(@Nullable TypeInApp type) { + this.type = type; + return this; + } + + public Builder preview(@Nullable InAppRenderOutput preview) { + this.preview = preview; + return this; + } + + public Builder error(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + public GeneratePreviewResponseDtoResult3 build() { + return new GeneratePreviewResponseDtoResult3( + type, preview, error); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult4.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult4.java new file mode 100644 index 00000000..fdc8a5e6 --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult4.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GeneratePreviewResponseDtoResult4 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private TypeSms type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("preview") + private SmsRenderOutput preview; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private PreviewErrorDto error; + + @JsonCreator + public GeneratePreviewResponseDtoResult4( + @JsonProperty("type") @Nullable TypeSms type, + @JsonProperty("preview") @Nullable SmsRenderOutput preview, + @JsonProperty("error") @Nullable PreviewErrorDto error) { + this.type = type; + this.preview = preview; + this.error = error; + } + + public GeneratePreviewResponseDtoResult4() { + this(null, null, null); + } + + public Optional type() { + return Optional.ofNullable(this.type); + } + + public Optional preview() { + return Optional.ofNullable(this.preview); + } + + public Optional error() { + return Optional.ofNullable(this.error); + } + + public static Builder builder() { + return new Builder(); + } + + + public GeneratePreviewResponseDtoResult4 withType(@Nullable TypeSms type) { + this.type = type; + return this; + } + + + public GeneratePreviewResponseDtoResult4 withPreview(@Nullable SmsRenderOutput preview) { + this.preview = preview; + return this; + } + + + public GeneratePreviewResponseDtoResult4 withError(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDtoResult4 other = (GeneratePreviewResponseDtoResult4) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.preview, other.preview) && + Utils.enhancedDeepEquals(this.error, other.error); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, preview, error); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDtoResult4.class, + "type", type, + "preview", preview, + "error", error); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private TypeSms type; + + private SmsRenderOutput preview; + + private PreviewErrorDto error; + + private Builder() { + // force use of static builder() method + } + + public Builder type(@Nullable TypeSms type) { + this.type = type; + return this; + } + + public Builder preview(@Nullable SmsRenderOutput preview) { + this.preview = preview; + return this; + } + + public Builder error(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + public GeneratePreviewResponseDtoResult4 build() { + return new GeneratePreviewResponseDtoResult4( + type, preview, error); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult5.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult5.java new file mode 100644 index 00000000..f510d579 --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult5.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GeneratePreviewResponseDtoResult5 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private TypePush type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("preview") + private PushRenderOutput preview; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private PreviewErrorDto error; + + @JsonCreator + public GeneratePreviewResponseDtoResult5( + @JsonProperty("type") @Nullable TypePush type, + @JsonProperty("preview") @Nullable PushRenderOutput preview, + @JsonProperty("error") @Nullable PreviewErrorDto error) { + this.type = type; + this.preview = preview; + this.error = error; + } + + public GeneratePreviewResponseDtoResult5() { + this(null, null, null); + } + + public Optional type() { + return Optional.ofNullable(this.type); + } + + public Optional preview() { + return Optional.ofNullable(this.preview); + } + + public Optional error() { + return Optional.ofNullable(this.error); + } + + public static Builder builder() { + return new Builder(); + } + + + public GeneratePreviewResponseDtoResult5 withType(@Nullable TypePush type) { + this.type = type; + return this; + } + + + public GeneratePreviewResponseDtoResult5 withPreview(@Nullable PushRenderOutput preview) { + this.preview = preview; + return this; + } + + + public GeneratePreviewResponseDtoResult5 withError(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDtoResult5 other = (GeneratePreviewResponseDtoResult5) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.preview, other.preview) && + Utils.enhancedDeepEquals(this.error, other.error); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, preview, error); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDtoResult5.class, + "type", type, + "preview", preview, + "error", error); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private TypePush type; + + private PushRenderOutput preview; + + private PreviewErrorDto error; + + private Builder() { + // force use of static builder() method + } + + public Builder type(@Nullable TypePush type) { + this.type = type; + return this; + } + + public Builder preview(@Nullable PushRenderOutput preview) { + this.preview = preview; + return this; + } + + public Builder error(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + public GeneratePreviewResponseDtoResult5 build() { + return new GeneratePreviewResponseDtoResult5( + type, preview, error); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult6.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult6.java new file mode 100644 index 00000000..f3addd2a --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult6.java @@ -0,0 +1,145 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GeneratePreviewResponseDtoResult6 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private TypeChat type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("preview") + private ChatRenderOutput preview; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("error") + private PreviewErrorDto error; + + @JsonCreator + public GeneratePreviewResponseDtoResult6( + @JsonProperty("type") @Nullable TypeChat type, + @JsonProperty("preview") @Nullable ChatRenderOutput preview, + @JsonProperty("error") @Nullable PreviewErrorDto error) { + this.type = type; + this.preview = preview; + this.error = error; + } + + public GeneratePreviewResponseDtoResult6() { + this(null, null, null); + } + + public Optional type() { + return Optional.ofNullable(this.type); + } + + public Optional preview() { + return Optional.ofNullable(this.preview); + } + + public Optional error() { + return Optional.ofNullable(this.error); + } + + public static Builder builder() { + return new Builder(); + } + + + public GeneratePreviewResponseDtoResult6 withType(@Nullable TypeChat type) { + this.type = type; + return this; + } + + + public GeneratePreviewResponseDtoResult6 withPreview(@Nullable ChatRenderOutput preview) { + this.preview = preview; + return this; + } + + + public GeneratePreviewResponseDtoResult6 withError(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDtoResult6 other = (GeneratePreviewResponseDtoResult6) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.preview, other.preview) && + Utils.enhancedDeepEquals(this.error, other.error); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, preview, error); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDtoResult6.class, + "type", type, + "preview", preview, + "error", error); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private TypeChat type; + + private ChatRenderOutput preview; + + private PreviewErrorDto error; + + private Builder() { + // force use of static builder() method + } + + public Builder type(@Nullable TypeChat type) { + this.type = type; + return this; + } + + public Builder preview(@Nullable ChatRenderOutput preview) { + this.preview = preview; + return this; + } + + public Builder error(@Nullable PreviewErrorDto error) { + this.error = error; + return this; + } + + public GeneratePreviewResponseDtoResult6 build() { + return new GeneratePreviewResponseDtoResult6( + type, preview, error); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult7.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult7.java new file mode 100644 index 00000000..c13870cf --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult7.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GeneratePreviewResponseDtoResult7 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private TypeDelay type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("preview") + private DigestRegularOutput preview; + + @JsonCreator + public GeneratePreviewResponseDtoResult7( + @JsonProperty("type") @Nullable TypeDelay type, + @JsonProperty("preview") @Nullable DigestRegularOutput preview) { + this.type = type; + this.preview = preview; + } + + public GeneratePreviewResponseDtoResult7() { + this(null, null); + } + + public Optional type() { + return Optional.ofNullable(this.type); + } + + public Optional preview() { + return Optional.ofNullable(this.preview); + } + + public static Builder builder() { + return new Builder(); + } + + + public GeneratePreviewResponseDtoResult7 withType(@Nullable TypeDelay type) { + this.type = type; + return this; + } + + + public GeneratePreviewResponseDtoResult7 withPreview(@Nullable DigestRegularOutput preview) { + this.preview = preview; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDtoResult7 other = (GeneratePreviewResponseDtoResult7) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.preview, other.preview); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, preview); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDtoResult7.class, + "type", type, + "preview", preview); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private TypeDelay type; + + private DigestRegularOutput preview; + + private Builder() { + // force use of static builder() method + } + + public Builder type(@Nullable TypeDelay type) { + this.type = type; + return this; + } + + public Builder preview(@Nullable DigestRegularOutput preview) { + this.preview = preview; + return this; + } + + public GeneratePreviewResponseDtoResult7 build() { + return new GeneratePreviewResponseDtoResult7( + type, preview); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult8.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult8.java new file mode 100644 index 00000000..1bbfd710 --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResult8.java @@ -0,0 +1,119 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class GeneratePreviewResponseDtoResult8 { + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private TypeDigest type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("preview") + private DigestRegularOutput preview; + + @JsonCreator + public GeneratePreviewResponseDtoResult8( + @JsonProperty("type") @Nullable TypeDigest type, + @JsonProperty("preview") @Nullable DigestRegularOutput preview) { + this.type = type; + this.preview = preview; + } + + public GeneratePreviewResponseDtoResult8() { + this(null, null); + } + + public Optional type() { + return Optional.ofNullable(this.type); + } + + public Optional preview() { + return Optional.ofNullable(this.preview); + } + + public static Builder builder() { + return new Builder(); + } + + + public GeneratePreviewResponseDtoResult8 withType(@Nullable TypeDigest type) { + this.type = type; + return this; + } + + + public GeneratePreviewResponseDtoResult8 withPreview(@Nullable DigestRegularOutput preview) { + this.preview = preview; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDtoResult8 other = (GeneratePreviewResponseDtoResult8) o; + return + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.preview, other.preview); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + type, preview); + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDtoResult8.class, + "type", type, + "preview", preview); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private TypeDigest type; + + private DigestRegularOutput preview; + + private Builder() { + // force use of static builder() method + } + + public Builder type(@Nullable TypeDigest type) { + this.type = type; + return this; + } + + public Builder preview(@Nullable DigestRegularOutput preview) { + this.preview = preview; + return this; + } + + public GeneratePreviewResponseDtoResult8 build() { + return new GeneratePreviewResponseDtoResult8( + type, preview); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResultUnion.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResultUnion.java new file mode 100644 index 00000000..f259cc29 --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoResultUnion.java @@ -0,0 +1,253 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.OneOfDeserializer; +import co.novu.utils.TypedObject; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils.TypeReferenceWithShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Optional; + +/** + * GeneratePreviewResponseDtoResultUnion + * + *

Preview result + */ +@JsonDeserialize(using = GeneratePreviewResponseDtoResultUnion._Deserializer.class) +public class GeneratePreviewResponseDtoResultUnion { + + @JsonValue + private final TypedObject value; + + private GeneratePreviewResponseDtoResultUnion(TypedObject value) { + this.value = value; + } + + public static GeneratePreviewResponseDtoResultUnion of(Map value) { + Utils.checkNotNull(value, "value"); + return new GeneratePreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static GeneratePreviewResponseDtoResultUnion of(GeneratePreviewResponseDtoResult1 value) { + Utils.checkNotNull(value, "value"); + return new GeneratePreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static GeneratePreviewResponseDtoResultUnion of(GeneratePreviewResponseDtoResult2 value) { + Utils.checkNotNull(value, "value"); + return new GeneratePreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static GeneratePreviewResponseDtoResultUnion of(GeneratePreviewResponseDtoResult3 value) { + Utils.checkNotNull(value, "value"); + return new GeneratePreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static GeneratePreviewResponseDtoResultUnion of(GeneratePreviewResponseDtoResult4 value) { + Utils.checkNotNull(value, "value"); + return new GeneratePreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static GeneratePreviewResponseDtoResultUnion of(GeneratePreviewResponseDtoResult5 value) { + Utils.checkNotNull(value, "value"); + return new GeneratePreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static GeneratePreviewResponseDtoResultUnion of(GeneratePreviewResponseDtoResult6 value) { + Utils.checkNotNull(value, "value"); + return new GeneratePreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static GeneratePreviewResponseDtoResultUnion of(GeneratePreviewResponseDtoResult7 value) { + Utils.checkNotNull(value, "value"); + return new GeneratePreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static GeneratePreviewResponseDtoResultUnion of(GeneratePreviewResponseDtoResult8 value) { + Utils.checkNotNull(value, "value"); + return new GeneratePreviewResponseDtoResultUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code Map}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code Map} value, or empty if not of this type + */ + @SuppressWarnings("unchecked") + public Optional> mapOfObject() { + if (value.value() instanceof Map) { + return Optional.of((Map) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code GeneratePreviewResponseDtoResult1}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code GeneratePreviewResponseDtoResult1} value, or empty if not of this type + */ + public Optional generatePreviewResponseDtoResult1() { + if (value.value() instanceof GeneratePreviewResponseDtoResult1) { + return Optional.of((GeneratePreviewResponseDtoResult1) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code GeneratePreviewResponseDtoResult2}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code GeneratePreviewResponseDtoResult2} value, or empty if not of this type + */ + public Optional generatePreviewResponseDtoResult2() { + if (value.value() instanceof GeneratePreviewResponseDtoResult2) { + return Optional.of((GeneratePreviewResponseDtoResult2) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code GeneratePreviewResponseDtoResult3}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code GeneratePreviewResponseDtoResult3} value, or empty if not of this type + */ + public Optional generatePreviewResponseDtoResult3() { + if (value.value() instanceof GeneratePreviewResponseDtoResult3) { + return Optional.of((GeneratePreviewResponseDtoResult3) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code GeneratePreviewResponseDtoResult4}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code GeneratePreviewResponseDtoResult4} value, or empty if not of this type + */ + public Optional generatePreviewResponseDtoResult4() { + if (value.value() instanceof GeneratePreviewResponseDtoResult4) { + return Optional.of((GeneratePreviewResponseDtoResult4) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code GeneratePreviewResponseDtoResult5}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code GeneratePreviewResponseDtoResult5} value, or empty if not of this type + */ + public Optional generatePreviewResponseDtoResult5() { + if (value.value() instanceof GeneratePreviewResponseDtoResult5) { + return Optional.of((GeneratePreviewResponseDtoResult5) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code GeneratePreviewResponseDtoResult6}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code GeneratePreviewResponseDtoResult6} value, or empty if not of this type + */ + public Optional generatePreviewResponseDtoResult6() { + if (value.value() instanceof GeneratePreviewResponseDtoResult6) { + return Optional.of((GeneratePreviewResponseDtoResult6) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code GeneratePreviewResponseDtoResult7}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code GeneratePreviewResponseDtoResult7} value, or empty if not of this type + */ + public Optional generatePreviewResponseDtoResult7() { + if (value.value() instanceof GeneratePreviewResponseDtoResult7) { + return Optional.of((GeneratePreviewResponseDtoResult7) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code GeneratePreviewResponseDtoResult8}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code GeneratePreviewResponseDtoResult8} value, or empty if not of this type + */ + public Optional generatePreviewResponseDtoResult8() { + if (value.value() instanceof GeneratePreviewResponseDtoResult8) { + return Optional.of((GeneratePreviewResponseDtoResult8) value.value()); + } + return Optional.empty(); + } + /** + * Returns an {@link Optional} containing the value as a {@code JsonNode}. + * This accessor returns the raw JSON when the value doesn't match any of the defined union types. + * + * @return an {@link Optional} containing the {@code JsonNode} value, or empty if value matched a known type + */ + public Optional asJson() { + if (value.value() instanceof JsonNode) { + return Optional.of((JsonNode) value.value()); + } + return Optional.empty(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GeneratePreviewResponseDtoResultUnion other = (GeneratePreviewResponseDtoResultUnion) o; + return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); + } + + @Override + public int hashCode() { + return Utils.enhancedHash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends OneOfDeserializer { + + public _Deserializer() { + super(GeneratePreviewResponseDtoResultUnion.class, false, + TypeReferenceWithShape.of(new TypeReference>() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(GeneratePreviewResponseDtoResultUnion.class, + "value", value); + } + +} + diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoTypeEmail1.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoTypeEmail1.java new file mode 100644 index 00000000..d1b3d962 --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoTypeEmail1.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +public class GeneratePreviewResponseDtoTypeEmail1 { + + public static final GeneratePreviewResponseDtoTypeEmail1 EMAIL = new GeneratePreviewResponseDtoTypeEmail1("email"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private GeneratePreviewResponseDtoTypeEmail1(String value) { + this.value = value; + } + + /** + * Returns a GeneratePreviewResponseDtoTypeEmail1 with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as GeneratePreviewResponseDtoTypeEmail1 + */ + @JsonCreator + public static GeneratePreviewResponseDtoTypeEmail1 of(String value) { + synchronized (GeneratePreviewResponseDtoTypeEmail1.class) { + return values.computeIfAbsent(value, v -> new GeneratePreviewResponseDtoTypeEmail1(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + GeneratePreviewResponseDtoTypeEmail1 other = (GeneratePreviewResponseDtoTypeEmail1) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "GeneratePreviewResponseDtoTypeEmail1 [value=" + value + "]"; + } + + // return an array just like an enum + public static GeneratePreviewResponseDtoTypeEmail1[] values() { + synchronized (GeneratePreviewResponseDtoTypeEmail1.class) { + return values.values().toArray(new GeneratePreviewResponseDtoTypeEmail1[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("email", EMAIL); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("email", GeneratePreviewResponseDtoTypeEmail1Enum.EMAIL); + return map; + } + + + public enum GeneratePreviewResponseDtoTypeEmail1Enum { + + EMAIL("email"),; + + private final String value; + + private GeneratePreviewResponseDtoTypeEmail1Enum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoTypeEmail2.java b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoTypeEmail2.java new file mode 100644 index 00000000..fff71b63 --- /dev/null +++ b/src/main/java/co/novu/models/components/GeneratePreviewResponseDtoTypeEmail2.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +public class GeneratePreviewResponseDtoTypeEmail2 { + + public static final GeneratePreviewResponseDtoTypeEmail2 EMAIL = new GeneratePreviewResponseDtoTypeEmail2("email"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private GeneratePreviewResponseDtoTypeEmail2(String value) { + this.value = value; + } + + /** + * Returns a GeneratePreviewResponseDtoTypeEmail2 with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as GeneratePreviewResponseDtoTypeEmail2 + */ + @JsonCreator + public static GeneratePreviewResponseDtoTypeEmail2 of(String value) { + synchronized (GeneratePreviewResponseDtoTypeEmail2.class) { + return values.computeIfAbsent(value, v -> new GeneratePreviewResponseDtoTypeEmail2(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + GeneratePreviewResponseDtoTypeEmail2 other = (GeneratePreviewResponseDtoTypeEmail2) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "GeneratePreviewResponseDtoTypeEmail2 [value=" + value + "]"; + } + + // return an array just like an enum + public static GeneratePreviewResponseDtoTypeEmail2[] values() { + synchronized (GeneratePreviewResponseDtoTypeEmail2.class) { + return values.values().toArray(new GeneratePreviewResponseDtoTypeEmail2[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("email", EMAIL); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("email", GeneratePreviewResponseDtoTypeEmail2Enum.EMAIL); + return map; + } + + + public enum GeneratePreviewResponseDtoTypeEmail2Enum { + + EMAIL("email"),; + + private final String value; + + private GeneratePreviewResponseDtoTypeEmail2Enum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/GetChannelConnectionResponseDtoProviderId.java b/src/main/java/co/novu/models/components/GetChannelConnectionResponseDtoProviderId.java index 3725e08d..e652c121 100644 --- a/src/main/java/co/novu/models/components/GetChannelConnectionResponseDtoProviderId.java +++ b/src/main/java/co/novu/models/components/GetChannelConnectionResponseDtoProviderId.java @@ -82,6 +82,7 @@ public class GetChannelConnectionResponseDtoProviderId { public static final GetChannelConnectionResponseDtoProviderId IMEDIA = new GetChannelConnectionResponseDtoProviderId("imedia"); public static final GetChannelConnectionResponseDtoProviderId SINCH = new GetChannelConnectionResponseDtoProviderId("sinch"); public static final GetChannelConnectionResponseDtoProviderId ISENDPRO_SMS = new GetChannelConnectionResponseDtoProviderId("isendpro-sms"); + public static final GetChannelConnectionResponseDtoProviderId CM_TELECOM = new GetChannelConnectionResponseDtoProviderId("cm-telecom"); public static final GetChannelConnectionResponseDtoProviderId FCM = new GetChannelConnectionResponseDtoProviderId("fcm"); public static final GetChannelConnectionResponseDtoProviderId APNS = new GetChannelConnectionResponseDtoProviderId("apns"); public static final GetChannelConnectionResponseDtoProviderId EXPO = new GetChannelConnectionResponseDtoProviderId("expo"); @@ -233,6 +234,7 @@ private static final Map crea map.put("imedia", IMEDIA); map.put("sinch", SINCH); map.put("isendpro-sms", ISENDPRO_SMS); + map.put("cm-telecom", CM_TELECOM); map.put("fcm", FCM); map.put("apns", APNS); map.put("expo", EXPO); @@ -316,6 +318,7 @@ private static final Map map.put("imedia", GetChannelConnectionResponseDtoProviderIdEnum.IMEDIA); map.put("sinch", GetChannelConnectionResponseDtoProviderIdEnum.SINCH); map.put("isendpro-sms", GetChannelConnectionResponseDtoProviderIdEnum.ISENDPRO_SMS); + map.put("cm-telecom", GetChannelConnectionResponseDtoProviderIdEnum.CM_TELECOM); map.put("fcm", GetChannelConnectionResponseDtoProviderIdEnum.FCM); map.put("apns", GetChannelConnectionResponseDtoProviderIdEnum.APNS); map.put("expo", GetChannelConnectionResponseDtoProviderIdEnum.EXPO); @@ -400,6 +403,7 @@ public enum GetChannelConnectionResponseDtoProviderIdEnum { IMEDIA("imedia"), SINCH("sinch"), ISENDPRO_SMS("isendpro-sms"), + CM_TELECOM("cm-telecom"), FCM("fcm"), APNS("apns"), EXPO("expo"), diff --git a/src/main/java/co/novu/models/components/GetChannelEndpointResponseDtoProviderId.java b/src/main/java/co/novu/models/components/GetChannelEndpointResponseDtoProviderId.java index c8365373..cf0bb16a 100644 --- a/src/main/java/co/novu/models/components/GetChannelEndpointResponseDtoProviderId.java +++ b/src/main/java/co/novu/models/components/GetChannelEndpointResponseDtoProviderId.java @@ -82,6 +82,7 @@ public class GetChannelEndpointResponseDtoProviderId { public static final GetChannelEndpointResponseDtoProviderId IMEDIA = new GetChannelEndpointResponseDtoProviderId("imedia"); public static final GetChannelEndpointResponseDtoProviderId SINCH = new GetChannelEndpointResponseDtoProviderId("sinch"); public static final GetChannelEndpointResponseDtoProviderId ISENDPRO_SMS = new GetChannelEndpointResponseDtoProviderId("isendpro-sms"); + public static final GetChannelEndpointResponseDtoProviderId CM_TELECOM = new GetChannelEndpointResponseDtoProviderId("cm-telecom"); public static final GetChannelEndpointResponseDtoProviderId FCM = new GetChannelEndpointResponseDtoProviderId("fcm"); public static final GetChannelEndpointResponseDtoProviderId APNS = new GetChannelEndpointResponseDtoProviderId("apns"); public static final GetChannelEndpointResponseDtoProviderId EXPO = new GetChannelEndpointResponseDtoProviderId("expo"); @@ -233,6 +234,7 @@ private static final Map create map.put("imedia", IMEDIA); map.put("sinch", SINCH); map.put("isendpro-sms", ISENDPRO_SMS); + map.put("cm-telecom", CM_TELECOM); map.put("fcm", FCM); map.put("apns", APNS); map.put("expo", EXPO); @@ -316,6 +318,7 @@ private static final Map cr map.put("imedia", GetChannelEndpointResponseDtoProviderIdEnum.IMEDIA); map.put("sinch", GetChannelEndpointResponseDtoProviderIdEnum.SINCH); map.put("isendpro-sms", GetChannelEndpointResponseDtoProviderIdEnum.ISENDPRO_SMS); + map.put("cm-telecom", GetChannelEndpointResponseDtoProviderIdEnum.CM_TELECOM); map.put("fcm", GetChannelEndpointResponseDtoProviderIdEnum.FCM); map.put("apns", GetChannelEndpointResponseDtoProviderIdEnum.APNS); map.put("expo", GetChannelEndpointResponseDtoProviderIdEnum.EXPO); @@ -400,6 +403,7 @@ public enum GetChannelEndpointResponseDtoProviderIdEnum { IMEDIA("imedia"), SINCH("sinch"), ISENDPRO_SMS("isendpro-sms"), + CM_TELECOM("cm-telecom"), FCM("fcm"), APNS("apns"), EXPO("expo"), diff --git a/src/main/java/co/novu/models/components/GetEnvironmentVariableUsageResponseDto.java b/src/main/java/co/novu/models/components/GetEnvironmentVariableUsageResponseDto.java new file mode 100644 index 00000000..80f0813f --- /dev/null +++ b/src/main/java/co/novu/models/components/GetEnvironmentVariableUsageResponseDto.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class GetEnvironmentVariableUsageResponseDto { + /** + * Array of workflows that reference this environment variable + */ + @JsonProperty("workflows") + private List workflows; + + @JsonCreator + public GetEnvironmentVariableUsageResponseDto( + @JsonProperty("workflows") @Nonnull List workflows) { + this.workflows = Optional.ofNullable(workflows) + .orElseThrow(() -> new IllegalArgumentException("workflows cannot be null")); + } + + /** + * Array of workflows that reference this environment variable + */ + public List workflows() { + return this.workflows; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Array of workflows that reference this environment variable + */ + public GetEnvironmentVariableUsageResponseDto withWorkflows(@Nonnull List workflows) { + this.workflows = Utils.checkNotNull(workflows, "workflows"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetEnvironmentVariableUsageResponseDto other = (GetEnvironmentVariableUsageResponseDto) o; + return + Utils.enhancedDeepEquals(this.workflows, other.workflows); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + workflows); + } + + @Override + public String toString() { + return Utils.toString(GetEnvironmentVariableUsageResponseDto.class, + "workflows", workflows); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List workflows; + + private Builder() { + // force use of static builder() method + } + + /** + * Array of workflows that reference this environment variable + */ + public Builder workflows(@Nonnull List workflows) { + this.workflows = Utils.checkNotNull(workflows, "workflows"); + return this; + } + + public GetEnvironmentVariableUsageResponseDto build() { + return new GetEnvironmentVariableUsageResponseDto( + workflows); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GetSubscriberNotificationsCountResponseDto.java b/src/main/java/co/novu/models/components/GetSubscriberNotificationsCountResponseDto.java new file mode 100644 index 00000000..3225c455 --- /dev/null +++ b/src/main/java/co/novu/models/components/GetSubscriberNotificationsCountResponseDto.java @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; +import java.util.Optional; + + +public class GetSubscriberNotificationsCountResponseDto { + /** + * The count of notifications matching the filter + */ + @JsonProperty("count") + private double count; + + /** + * The filter applied + */ + @JsonProperty("filter") + private Map filter; + + @JsonCreator + public GetSubscriberNotificationsCountResponseDto( + @JsonProperty("count") double count, + @JsonProperty("filter") @Nonnull Map filter) { + filter = Utils.emptyMapIfNull(filter); + this.count = count; + this.filter = Optional.ofNullable(filter) + .orElseThrow(() -> new IllegalArgumentException("filter cannot be null")); + } + + /** + * The count of notifications matching the filter + */ + public double count() { + return this.count; + } + + /** + * The filter applied + */ + public Map filter() { + return this.filter; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The count of notifications matching the filter + */ + public GetSubscriberNotificationsCountResponseDto withCount(double count) { + this.count = count; + return this; + } + + + /** + * The filter applied + */ + public GetSubscriberNotificationsCountResponseDto withFilter(@Nonnull Map filter) { + this.filter = Utils.checkNotNull(filter, "filter"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSubscriberNotificationsCountResponseDto other = (GetSubscriberNotificationsCountResponseDto) o; + return + Utils.enhancedDeepEquals(this.count, other.count) && + Utils.enhancedDeepEquals(this.filter, other.filter); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + count, filter); + } + + @Override + public String toString() { + return Utils.toString(GetSubscriberNotificationsCountResponseDto.class, + "count", count, + "filter", filter); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private double count; + + private Map filter; + + private Builder() { + // force use of static builder() method + } + + /** + * The count of notifications matching the filter + */ + public Builder count(double count) { + this.count = count; + return this; + } + + /** + * The filter applied + */ + public Builder filter(@Nonnull Map filter) { + this.filter = Utils.checkNotNull(filter, "filter"); + return this; + } + + public GetSubscriberNotificationsCountResponseDto build() { + return new GetSubscriberNotificationsCountResponseDto( + count, filter); + } + + } +} diff --git a/src/main/java/co/novu/models/components/GetSubscriberNotificationsResponseDto.java b/src/main/java/co/novu/models/components/GetSubscriberNotificationsResponseDto.java new file mode 100644 index 00000000..89d7e5a7 --- /dev/null +++ b/src/main/java/co/novu/models/components/GetSubscriberNotificationsResponseDto.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class GetSubscriberNotificationsResponseDto { + /** + * Array of notifications + */ + @JsonProperty("data") + private List data; + + /** + * Indicates if there are more notifications available + */ + @JsonProperty("hasMore") + private boolean hasMore; + + /** + * The filter applied to the notifications + */ + @JsonProperty("filter") + private Filter filter; + + @JsonCreator + public GetSubscriberNotificationsResponseDto( + @JsonProperty("data") @Nonnull List data, + @JsonProperty("hasMore") boolean hasMore, + @JsonProperty("filter") @Nonnull Filter filter) { + this.data = Optional.ofNullable(data) + .orElseThrow(() -> new IllegalArgumentException("data cannot be null")); + this.hasMore = hasMore; + this.filter = Optional.ofNullable(filter) + .orElseThrow(() -> new IllegalArgumentException("filter cannot be null")); + } + + /** + * Array of notifications + */ + public List data() { + return this.data; + } + + /** + * Indicates if there are more notifications available + */ + public boolean hasMore() { + return this.hasMore; + } + + /** + * The filter applied to the notifications + */ + public Filter filter() { + return this.filter; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Array of notifications + */ + public GetSubscriberNotificationsResponseDto withData(@Nonnull List data) { + this.data = Utils.checkNotNull(data, "data"); + return this; + } + + + /** + * Indicates if there are more notifications available + */ + public GetSubscriberNotificationsResponseDto withHasMore(boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + + /** + * The filter applied to the notifications + */ + public GetSubscriberNotificationsResponseDto withFilter(@Nonnull Filter filter) { + this.filter = Utils.checkNotNull(filter, "filter"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + GetSubscriberNotificationsResponseDto other = (GetSubscriberNotificationsResponseDto) o; + return + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.hasMore, other.hasMore) && + Utils.enhancedDeepEquals(this.filter, other.filter); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + data, hasMore, filter); + } + + @Override + public String toString() { + return Utils.toString(GetSubscriberNotificationsResponseDto.class, + "data", data, + "hasMore", hasMore, + "filter", filter); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List data; + + private boolean hasMore; + + private Filter filter; + + private Builder() { + // force use of static builder() method + } + + /** + * Array of notifications + */ + public Builder data(@Nonnull List data) { + this.data = Utils.checkNotNull(data, "data"); + return this; + } + + /** + * Indicates if there are more notifications available + */ + public Builder hasMore(boolean hasMore) { + this.hasMore = hasMore; + return this; + } + + /** + * The filter applied to the notifications + */ + public Builder filter(@Nonnull Filter filter) { + this.filter = Utils.checkNotNull(filter, "filter"); + return this; + } + + public GetSubscriberNotificationsResponseDto build() { + return new GetSubscriberNotificationsResponseDto( + data, hasMore, filter); + } + + } +} diff --git a/src/main/java/co/novu/models/components/HttpMethodEnum.java b/src/main/java/co/novu/models/components/HttpMethodEnum.java new file mode 100644 index 00000000..fed7064a --- /dev/null +++ b/src/main/java/co/novu/models/components/HttpMethodEnum.java @@ -0,0 +1,144 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * HttpMethodEnum + * + *

HTTP method + */ +public class HttpMethodEnum { + + public static final HttpMethodEnum GET = new HttpMethodEnum("GET"); + public static final HttpMethodEnum POST = new HttpMethodEnum("POST"); + public static final HttpMethodEnum PUT = new HttpMethodEnum("PUT"); + public static final HttpMethodEnum DELETE = new HttpMethodEnum("DELETE"); + public static final HttpMethodEnum PATCH = new HttpMethodEnum("PATCH"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private HttpMethodEnum(String value) { + this.value = value; + } + + /** + * Returns a HttpMethodEnum with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as HttpMethodEnum + */ + @JsonCreator + public static HttpMethodEnum of(String value) { + synchronized (HttpMethodEnum.class) { + return values.computeIfAbsent(value, v -> new HttpMethodEnum(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + HttpMethodEnum other = (HttpMethodEnum) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "HttpMethodEnum [value=" + value + "]"; + } + + // return an array just like an enum + public static HttpMethodEnum[] values() { + synchronized (HttpMethodEnum.class) { + return values.values().toArray(new HttpMethodEnum[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("GET", GET); + map.put("POST", POST); + map.put("PUT", PUT); + map.put("DELETE", DELETE); + map.put("PATCH", PATCH); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("GET", HttpMethodEnumEnum.GET); + map.put("POST", HttpMethodEnumEnum.POST); + map.put("PUT", HttpMethodEnumEnum.PUT); + map.put("DELETE", HttpMethodEnumEnum.DELETE); + map.put("PATCH", HttpMethodEnumEnum.PATCH); + return map; + } + + + public enum HttpMethodEnumEnum { + + GET("GET"), + POST("POST"), + PUT("PUT"), + DELETE("DELETE"), + PATCH("PATCH"),; + + private final String value; + + private HttpMethodEnumEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/HttpRequestControlDto.java b/src/main/java/co/novu/models/components/HttpRequestControlDto.java new file mode 100644 index 00000000..52529109 --- /dev/null +++ b/src/main/java/co/novu/models/components/HttpRequestControlDto.java @@ -0,0 +1,339 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Boolean; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class HttpRequestControlDto { + /** + * HTTP method + */ + @JsonProperty("method") + private HttpMethodEnum method; + + /** + * Target URL for the HTTP request + */ + @JsonProperty("url") + private String url; + + /** + * Request headers as key-value pairs + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("headers") + private List headers; + + /** + * Request body as key-value pairs + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("body") + private List body; + + /** + * JSON schema to validate response body against + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("responseBodySchema") + private Map responseBodySchema; + + /** + * Whether to enforce response body schema validation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("enforceSchemaValidation") + private Boolean enforceSchemaValidation; + + /** + * Whether to continue workflow execution on failure + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("continueOnFailure") + private Boolean continueOnFailure; + + @JsonCreator + public HttpRequestControlDto( + @JsonProperty("method") @Nonnull HttpMethodEnum method, + @JsonProperty("url") @Nonnull String url, + @JsonProperty("headers") @Nullable List headers, + @JsonProperty("body") @Nullable List body, + @JsonProperty("responseBodySchema") @Nullable Map responseBodySchema, + @JsonProperty("enforceSchemaValidation") @Nullable Boolean enforceSchemaValidation, + @JsonProperty("continueOnFailure") @Nullable Boolean continueOnFailure) { + this.method = Optional.ofNullable(method) + .orElseThrow(() -> new IllegalArgumentException("method cannot be null")); + this.url = Optional.ofNullable(url) + .orElseThrow(() -> new IllegalArgumentException("url cannot be null")); + this.headers = headers; + this.body = body; + this.responseBodySchema = responseBodySchema; + this.enforceSchemaValidation = enforceSchemaValidation; + this.continueOnFailure = continueOnFailure; + } + + public HttpRequestControlDto( + @Nonnull HttpMethodEnum method, + @Nonnull String url) { + this(method, url, null, + null, null, null, + null); + } + + /** + * HTTP method + */ + public HttpMethodEnum method() { + return this.method; + } + + /** + * Target URL for the HTTP request + */ + public String url() { + return this.url; + } + + /** + * Request headers as key-value pairs + */ + public Optional> headers() { + return Optional.ofNullable(this.headers); + } + + /** + * Request body as key-value pairs + */ + public Optional> body() { + return Optional.ofNullable(this.body); + } + + /** + * JSON schema to validate response body against + */ + public Optional> responseBodySchema() { + return Optional.ofNullable(this.responseBodySchema); + } + + /** + * Whether to enforce response body schema validation + */ + public Optional enforceSchemaValidation() { + return Optional.ofNullable(this.enforceSchemaValidation); + } + + /** + * Whether to continue workflow execution on failure + */ + public Optional continueOnFailure() { + return Optional.ofNullable(this.continueOnFailure); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP method + */ + public HttpRequestControlDto withMethod(@Nonnull HttpMethodEnum method) { + this.method = Utils.checkNotNull(method, "method"); + return this; + } + + + /** + * Target URL for the HTTP request + */ + public HttpRequestControlDto withUrl(@Nonnull String url) { + this.url = Utils.checkNotNull(url, "url"); + return this; + } + + + /** + * Request headers as key-value pairs + */ + public HttpRequestControlDto withHeaders(@Nullable List headers) { + this.headers = headers; + return this; + } + + + /** + * Request body as key-value pairs + */ + public HttpRequestControlDto withBody(@Nullable List body) { + this.body = body; + return this; + } + + + /** + * JSON schema to validate response body against + */ + public HttpRequestControlDto withResponseBodySchema(@Nullable Map responseBodySchema) { + this.responseBodySchema = responseBodySchema; + return this; + } + + + /** + * Whether to enforce response body schema validation + */ + public HttpRequestControlDto withEnforceSchemaValidation(@Nullable Boolean enforceSchemaValidation) { + this.enforceSchemaValidation = enforceSchemaValidation; + return this; + } + + + /** + * Whether to continue workflow execution on failure + */ + public HttpRequestControlDto withContinueOnFailure(@Nullable Boolean continueOnFailure) { + this.continueOnFailure = continueOnFailure; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HttpRequestControlDto other = (HttpRequestControlDto) o; + return + Utils.enhancedDeepEquals(this.method, other.method) && + Utils.enhancedDeepEquals(this.url, other.url) && + Utils.enhancedDeepEquals(this.headers, other.headers) && + Utils.enhancedDeepEquals(this.body, other.body) && + Utils.enhancedDeepEquals(this.responseBodySchema, other.responseBodySchema) && + Utils.enhancedDeepEquals(this.enforceSchemaValidation, other.enforceSchemaValidation) && + Utils.enhancedDeepEquals(this.continueOnFailure, other.continueOnFailure); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + method, url, headers, + body, responseBodySchema, enforceSchemaValidation, + continueOnFailure); + } + + @Override + public String toString() { + return Utils.toString(HttpRequestControlDto.class, + "method", method, + "url", url, + "headers", headers, + "body", body, + "responseBodySchema", responseBodySchema, + "enforceSchemaValidation", enforceSchemaValidation, + "continueOnFailure", continueOnFailure); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private HttpMethodEnum method; + + private String url; + + private List headers; + + private List body; + + private Map responseBodySchema; + + private Boolean enforceSchemaValidation; + + private Boolean continueOnFailure; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP method + */ + public Builder method(@Nonnull HttpMethodEnum method) { + this.method = Utils.checkNotNull(method, "method"); + return this; + } + + /** + * Target URL for the HTTP request + */ + public Builder url(@Nonnull String url) { + this.url = Utils.checkNotNull(url, "url"); + return this; + } + + /** + * Request headers as key-value pairs + */ + public Builder headers(@Nullable List headers) { + this.headers = headers; + return this; + } + + /** + * Request body as key-value pairs + */ + public Builder body(@Nullable List body) { + this.body = body; + return this; + } + + /** + * JSON schema to validate response body against + */ + public Builder responseBodySchema(@Nullable Map responseBodySchema) { + this.responseBodySchema = responseBodySchema; + return this; + } + + /** + * Whether to enforce response body schema validation + */ + public Builder enforceSchemaValidation(@Nullable Boolean enforceSchemaValidation) { + this.enforceSchemaValidation = enforceSchemaValidation; + return this; + } + + /** + * Whether to continue workflow execution on failure + */ + public Builder continueOnFailure(@Nullable Boolean continueOnFailure) { + this.continueOnFailure = continueOnFailure; + return this; + } + + public HttpRequestControlDto build() { + return new HttpRequestControlDto( + method, url, headers, + body, responseBodySchema, enforceSchemaValidation, + continueOnFailure); + } + + } +} diff --git a/src/main/java/co/novu/models/components/HttpRequestControlsMetadataResponseDto.java b/src/main/java/co/novu/models/components/HttpRequestControlsMetadataResponseDto.java new file mode 100644 index 00000000..9c667ade --- /dev/null +++ b/src/main/java/co/novu/models/components/HttpRequestControlsMetadataResponseDto.java @@ -0,0 +1,182 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; +import java.util.Optional; + + +public class HttpRequestControlsMetadataResponseDto { + /** + * JSON Schema for data + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("dataSchema") + private Map dataSchema; + + /** + * UI Schema for rendering + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("uiSchema") + private UiSchema uiSchema; + + /** + * Control values specific to HTTP Request step + */ + @JsonProperty("values") + private HttpRequestControlDto values; + + @JsonCreator + public HttpRequestControlsMetadataResponseDto( + @JsonProperty("dataSchema") @Nullable Map dataSchema, + @JsonProperty("uiSchema") @Nullable UiSchema uiSchema, + @JsonProperty("values") @Nonnull HttpRequestControlDto values) { + this.dataSchema = dataSchema; + this.uiSchema = uiSchema; + this.values = Optional.ofNullable(values) + .orElseThrow(() -> new IllegalArgumentException("values cannot be null")); + } + + public HttpRequestControlsMetadataResponseDto( + @Nonnull HttpRequestControlDto values) { + this(null, null, values); + } + + /** + * JSON Schema for data + */ + public Optional> dataSchema() { + return Optional.ofNullable(this.dataSchema); + } + + /** + * UI Schema for rendering + */ + public Optional uiSchema() { + return Optional.ofNullable(this.uiSchema); + } + + /** + * Control values specific to HTTP Request step + */ + public HttpRequestControlDto values() { + return this.values; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * JSON Schema for data + */ + public HttpRequestControlsMetadataResponseDto withDataSchema(@Nullable Map dataSchema) { + this.dataSchema = dataSchema; + return this; + } + + + /** + * UI Schema for rendering + */ + public HttpRequestControlsMetadataResponseDto withUiSchema(@Nullable UiSchema uiSchema) { + this.uiSchema = uiSchema; + return this; + } + + + /** + * Control values specific to HTTP Request step + */ + public HttpRequestControlsMetadataResponseDto withValues(@Nonnull HttpRequestControlDto values) { + this.values = Utils.checkNotNull(values, "values"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HttpRequestControlsMetadataResponseDto other = (HttpRequestControlsMetadataResponseDto) o; + return + Utils.enhancedDeepEquals(this.dataSchema, other.dataSchema) && + Utils.enhancedDeepEquals(this.uiSchema, other.uiSchema) && + Utils.enhancedDeepEquals(this.values, other.values); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + dataSchema, uiSchema, values); + } + + @Override + public String toString() { + return Utils.toString(HttpRequestControlsMetadataResponseDto.class, + "dataSchema", dataSchema, + "uiSchema", uiSchema, + "values", values); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Map dataSchema; + + private UiSchema uiSchema; + + private HttpRequestControlDto values; + + private Builder() { + // force use of static builder() method + } + + /** + * JSON Schema for data + */ + public Builder dataSchema(@Nullable Map dataSchema) { + this.dataSchema = dataSchema; + return this; + } + + /** + * UI Schema for rendering + */ + public Builder uiSchema(@Nullable UiSchema uiSchema) { + this.uiSchema = uiSchema; + return this; + } + + /** + * Control values specific to HTTP Request step + */ + public Builder values(@Nonnull HttpRequestControlDto values) { + this.values = Utils.checkNotNull(values, "values"); + return this; + } + + public HttpRequestControlsMetadataResponseDto build() { + return new HttpRequestControlsMetadataResponseDto( + dataSchema, uiSchema, values); + } + + } +} diff --git a/src/main/java/co/novu/models/components/HttpRequestKeyValuePairDto.java b/src/main/java/co/novu/models/components/HttpRequestKeyValuePairDto.java new file mode 100644 index 00000000..77ac36ef --- /dev/null +++ b/src/main/java/co/novu/models/components/HttpRequestKeyValuePairDto.java @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class HttpRequestKeyValuePairDto { + /** + * Key of the key-value pair + */ + @JsonProperty("key") + private String key; + + /** + * Value of the key-value pair + */ + @JsonProperty("value") + private String value; + + @JsonCreator + public HttpRequestKeyValuePairDto( + @JsonProperty("key") @Nonnull String key, + @JsonProperty("value") @Nonnull String value) { + this.key = Optional.ofNullable(key) + .orElseThrow(() -> new IllegalArgumentException("key cannot be null")); + this.value = Optional.ofNullable(value) + .orElseThrow(() -> new IllegalArgumentException("value cannot be null")); + } + + /** + * Key of the key-value pair + */ + public String key() { + return this.key; + } + + /** + * Value of the key-value pair + */ + public String value() { + return this.value; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Key of the key-value pair + */ + public HttpRequestKeyValuePairDto withKey(@Nonnull String key) { + this.key = Utils.checkNotNull(key, "key"); + return this; + } + + + /** + * Value of the key-value pair + */ + public HttpRequestKeyValuePairDto withValue(@Nonnull String value) { + this.value = Utils.checkNotNull(value, "value"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HttpRequestKeyValuePairDto other = (HttpRequestKeyValuePairDto) o; + return + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.value, other.value); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + key, value); + } + + @Override + public String toString() { + return Utils.toString(HttpRequestKeyValuePairDto.class, + "key", key, + "value", value); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String key; + + private String value; + + private Builder() { + // force use of static builder() method + } + + /** + * Key of the key-value pair + */ + public Builder key(@Nonnull String key) { + this.key = Utils.checkNotNull(key, "key"); + return this; + } + + /** + * Value of the key-value pair + */ + public Builder value(@Nonnull String value) { + this.value = Utils.checkNotNull(value, "value"); + return this; + } + + public HttpRequestKeyValuePairDto build() { + return new HttpRequestKeyValuePairDto( + key, value); + } + + } +} diff --git a/src/main/java/co/novu/models/components/HttpRequestStepResponseDto.java b/src/main/java/co/novu/models/components/HttpRequestStepResponseDto.java new file mode 100644 index 00000000..75d0955b --- /dev/null +++ b/src/main/java/co/novu/models/components/HttpRequestStepResponseDto.java @@ -0,0 +1,575 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; +import java.util.Optional; + + +public class HttpRequestStepResponseDto implements WorkflowResponseDtoStep { + /** + * Controls metadata for the HTTP request step + */ + @JsonProperty("controls") + private HttpRequestControlsMetadataResponseDto controls; + + /** + * Control values for the HTTP request step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("controlValues") + private HttpRequestStepResponseDtoControlValues controlValues; + + /** + * JSON Schema for variables, follows the JSON Schema standard + */ + @JsonProperty("variables") + private Map variables; + + /** + * Unique identifier of the step + */ + @JsonProperty("stepId") + private String stepId; + + /** + * Database identifier of the step + */ + @JsonProperty("_id") + private String id; + + /** + * Name of the step + */ + @JsonProperty("name") + private String name; + + /** + * Slug of the step + */ + @JsonProperty("slug") + private String slug; + + /** + * Type of the step + */ + @JsonProperty("type") + private StepTypeEnum type; + + /** + * Origin of the layout + */ + @JsonProperty("origin") + private ResourceOriginEnum origin; + + /** + * Workflow identifier + */ + @JsonProperty("workflowId") + private String workflowId; + + /** + * Workflow database identifier + */ + @JsonProperty("workflowDatabaseId") + private String workflowDatabaseId; + + /** + * Issues associated with the step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("issues") + private StepIssuesDto issues; + + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + + @JsonCreator + public HttpRequestStepResponseDto( + @JsonProperty("controls") @Nonnull HttpRequestControlsMetadataResponseDto controls, + @JsonProperty("controlValues") @Nullable HttpRequestStepResponseDtoControlValues controlValues, + @JsonProperty("variables") @Nonnull Map variables, + @JsonProperty("stepId") @Nonnull String stepId, + @JsonProperty("_id") @Nonnull String id, + @JsonProperty("name") @Nonnull String name, + @JsonProperty("slug") @Nonnull String slug, + @JsonProperty("type") @Nonnull StepTypeEnum type, + @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, + @JsonProperty("workflowId") @Nonnull String workflowId, + @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { + variables = Utils.emptyMapIfNull(variables); + this.controls = Optional.ofNullable(controls) + .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); + this.controlValues = controlValues; + this.variables = Optional.ofNullable(variables) + .orElseThrow(() -> new IllegalArgumentException("variables cannot be null")); + this.stepId = Optional.ofNullable(stepId) + .orElseThrow(() -> new IllegalArgumentException("stepId cannot be null")); + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.name = Optional.ofNullable(name) + .orElseThrow(() -> new IllegalArgumentException("name cannot be null")); + this.slug = Optional.ofNullable(slug) + .orElseThrow(() -> new IllegalArgumentException("slug cannot be null")); + this.type = Optional.ofNullable(type) + .orElseThrow(() -> new IllegalArgumentException("type cannot be null")); + this.origin = Optional.ofNullable(origin) + .orElseThrow(() -> new IllegalArgumentException("origin cannot be null")); + this.workflowId = Optional.ofNullable(workflowId) + .orElseThrow(() -> new IllegalArgumentException("workflowId cannot be null")); + this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) + .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); + this.issues = issues; + this.stepResolverHash = stepResolverHash; + } + + public HttpRequestStepResponseDto( + @Nonnull HttpRequestControlsMetadataResponseDto controls, + @Nonnull Map variables, + @Nonnull String stepId, + @Nonnull String id, + @Nonnull String name, + @Nonnull String slug, + @Nonnull StepTypeEnum type, + @Nonnull ResourceOriginEnum origin, + @Nonnull String workflowId, + @Nonnull String workflowDatabaseId) { + this(controls, null, variables, + stepId, id, name, + slug, type, origin, + workflowId, workflowDatabaseId, null, + null); + } + + /** + * Controls metadata for the HTTP request step + */ + public HttpRequestControlsMetadataResponseDto controls() { + return this.controls; + } + + /** + * Control values for the HTTP request step + */ + public Optional controlValues() { + return Optional.ofNullable(this.controlValues); + } + + /** + * JSON Schema for variables, follows the JSON Schema standard + */ + public Map variables() { + return this.variables; + } + + /** + * Unique identifier of the step + */ + public String stepId() { + return this.stepId; + } + + /** + * Database identifier of the step + */ + public String id() { + return this.id; + } + + /** + * Name of the step + */ + public String name() { + return this.name; + } + + /** + * Slug of the step + */ + public String slug() { + return this.slug; + } + + /** + * Type of the step + */ + @Override + public String type() { + return Utils.discriminatorToString(type); + } + + /** + * Origin of the layout + */ + public ResourceOriginEnum origin() { + return this.origin; + } + + /** + * Workflow identifier + */ + public String workflowId() { + return this.workflowId; + } + + /** + * Workflow database identifier + */ + public String workflowDatabaseId() { + return this.workflowDatabaseId; + } + + /** + * Issues associated with the step + */ + public Optional issues() { + return Optional.ofNullable(this.issues); + } + + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Controls metadata for the HTTP request step + */ + public HttpRequestStepResponseDto withControls(@Nonnull HttpRequestControlsMetadataResponseDto controls) { + this.controls = Utils.checkNotNull(controls, "controls"); + return this; + } + + + /** + * Control values for the HTTP request step + */ + public HttpRequestStepResponseDto withControlValues(@Nullable HttpRequestStepResponseDtoControlValues controlValues) { + this.controlValues = controlValues; + return this; + } + + + /** + * JSON Schema for variables, follows the JSON Schema standard + */ + public HttpRequestStepResponseDto withVariables(@Nonnull Map variables) { + this.variables = Utils.checkNotNull(variables, "variables"); + return this; + } + + + /** + * Unique identifier of the step + */ + public HttpRequestStepResponseDto withStepId(@Nonnull String stepId) { + this.stepId = Utils.checkNotNull(stepId, "stepId"); + return this; + } + + + /** + * Database identifier of the step + */ + public HttpRequestStepResponseDto withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + /** + * Name of the step + */ + public HttpRequestStepResponseDto withName(@Nonnull String name) { + this.name = Utils.checkNotNull(name, "name"); + return this; + } + + + /** + * Slug of the step + */ + public HttpRequestStepResponseDto withSlug(@Nonnull String slug) { + this.slug = Utils.checkNotNull(slug, "slug"); + return this; + } + + + /** + * Type of the step + */ + public HttpRequestStepResponseDto withType(@Nonnull StepTypeEnum type) { + this.type = Utils.checkNotNull(type, "type"); + return this; + } + + + /** + * Origin of the layout + */ + public HttpRequestStepResponseDto withOrigin(@Nonnull ResourceOriginEnum origin) { + this.origin = Utils.checkNotNull(origin, "origin"); + return this; + } + + + /** + * Workflow identifier + */ + public HttpRequestStepResponseDto withWorkflowId(@Nonnull String workflowId) { + this.workflowId = Utils.checkNotNull(workflowId, "workflowId"); + return this; + } + + + /** + * Workflow database identifier + */ + public HttpRequestStepResponseDto withWorkflowDatabaseId(@Nonnull String workflowDatabaseId) { + this.workflowDatabaseId = Utils.checkNotNull(workflowDatabaseId, "workflowDatabaseId"); + return this; + } + + + /** + * Issues associated with the step + */ + public HttpRequestStepResponseDto withIssues(@Nullable StepIssuesDto issues) { + this.issues = issues; + return this; + } + + + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public HttpRequestStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HttpRequestStepResponseDto other = (HttpRequestStepResponseDto) o; + return + Utils.enhancedDeepEquals(this.controls, other.controls) && + Utils.enhancedDeepEquals(this.controlValues, other.controlValues) && + Utils.enhancedDeepEquals(this.variables, other.variables) && + Utils.enhancedDeepEquals(this.stepId, other.stepId) && + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.slug, other.slug) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.origin, other.origin) && + Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && + Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + controls, controlValues, variables, + stepId, id, name, + slug, type, origin, + workflowId, workflowDatabaseId, issues, + stepResolverHash); + } + + @Override + public String toString() { + return Utils.toString(HttpRequestStepResponseDto.class, + "controls", controls, + "controlValues", controlValues, + "variables", variables, + "stepId", stepId, + "id", id, + "name", name, + "slug", slug, + "type", type, + "origin", origin, + "workflowId", workflowId, + "workflowDatabaseId", workflowDatabaseId, + "issues", issues, + "stepResolverHash", stepResolverHash); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private HttpRequestControlsMetadataResponseDto controls; + + private HttpRequestStepResponseDtoControlValues controlValues; + + private Map variables; + + private String stepId; + + private String id; + + private String name; + + private String slug; + + private StepTypeEnum type; + + private ResourceOriginEnum origin; + + private String workflowId; + + private String workflowDatabaseId; + + private StepIssuesDto issues; + + private String stepResolverHash; + + private Builder() { + // force use of static builder() method + } + + /** + * Controls metadata for the HTTP request step + */ + public Builder controls(@Nonnull HttpRequestControlsMetadataResponseDto controls) { + this.controls = Utils.checkNotNull(controls, "controls"); + return this; + } + + /** + * Control values for the HTTP request step + */ + public Builder controlValues(@Nullable HttpRequestStepResponseDtoControlValues controlValues) { + this.controlValues = controlValues; + return this; + } + + /** + * JSON Schema for variables, follows the JSON Schema standard + */ + public Builder variables(@Nonnull Map variables) { + this.variables = Utils.checkNotNull(variables, "variables"); + return this; + } + + /** + * Unique identifier of the step + */ + public Builder stepId(@Nonnull String stepId) { + this.stepId = Utils.checkNotNull(stepId, "stepId"); + return this; + } + + /** + * Database identifier of the step + */ + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + /** + * Name of the step + */ + public Builder name(@Nonnull String name) { + this.name = Utils.checkNotNull(name, "name"); + return this; + } + + /** + * Slug of the step + */ + public Builder slug(@Nonnull String slug) { + this.slug = Utils.checkNotNull(slug, "slug"); + return this; + } + + /** + * Type of the step + */ + public Builder type(@Nonnull StepTypeEnum type) { + this.type = Utils.checkNotNull(type, "type"); + return this; + } + + /** + * Origin of the layout + */ + public Builder origin(@Nonnull ResourceOriginEnum origin) { + this.origin = Utils.checkNotNull(origin, "origin"); + return this; + } + + /** + * Workflow identifier + */ + public Builder workflowId(@Nonnull String workflowId) { + this.workflowId = Utils.checkNotNull(workflowId, "workflowId"); + return this; + } + + /** + * Workflow database identifier + */ + public Builder workflowDatabaseId(@Nonnull String workflowDatabaseId) { + this.workflowDatabaseId = Utils.checkNotNull(workflowDatabaseId, "workflowDatabaseId"); + return this; + } + + /** + * Issues associated with the step + */ + public Builder issues(@Nullable StepIssuesDto issues) { + this.issues = issues; + return this; + } + + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + public HttpRequestStepResponseDto build() { + return new HttpRequestStepResponseDto( + controls, controlValues, variables, + stepId, id, name, + slug, type, origin, + workflowId, workflowDatabaseId, issues, + stepResolverHash); + } + + } +} diff --git a/src/main/java/co/novu/models/components/HttpRequestStepResponseDtoControlValues.java b/src/main/java/co/novu/models/components/HttpRequestStepResponseDtoControlValues.java new file mode 100644 index 00000000..b9b35a3e --- /dev/null +++ b/src/main/java/co/novu/models/components/HttpRequestStepResponseDtoControlValues.java @@ -0,0 +1,390 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Boolean; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; + +/** + * HttpRequestStepResponseDtoControlValues + * + *

Control values for the HTTP request step + */ +public class HttpRequestStepResponseDtoControlValues { + /** + * HTTP method + */ + @JsonProperty("method") + private HttpMethodEnum method; + + /** + * Target URL for the HTTP request + */ + @JsonProperty("url") + private String url; + + /** + * Request headers as key-value pairs + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("headers") + private List headers; + + /** + * Request body as key-value pairs + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("body") + private List body; + + /** + * JSON schema to validate response body against + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("responseBodySchema") + private Map responseBodySchema; + + /** + * Whether to enforce response body schema validation + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("enforceSchemaValidation") + private Boolean enforceSchemaValidation; + + /** + * Whether to continue workflow execution on failure + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("continueOnFailure") + private Boolean continueOnFailure; + + + @JsonIgnore + private Map additionalProperties; + + @JsonCreator + public HttpRequestStepResponseDtoControlValues( + @JsonProperty("method") @Nonnull HttpMethodEnum method, + @JsonProperty("url") @Nonnull String url, + @JsonProperty("headers") @Nullable List headers, + @JsonProperty("body") @Nullable List body, + @JsonProperty("responseBodySchema") @Nullable Map responseBodySchema, + @JsonProperty("enforceSchemaValidation") @Nullable Boolean enforceSchemaValidation, + @JsonProperty("continueOnFailure") @Nullable Boolean continueOnFailure) { + this.method = Optional.ofNullable(method) + .orElseThrow(() -> new IllegalArgumentException("method cannot be null")); + this.url = Optional.ofNullable(url) + .orElseThrow(() -> new IllegalArgumentException("url cannot be null")); + this.headers = headers; + this.body = body; + this.responseBodySchema = responseBodySchema; + this.enforceSchemaValidation = enforceSchemaValidation; + this.continueOnFailure = continueOnFailure; + this.additionalProperties = new HashMap<>(); + } + + public HttpRequestStepResponseDtoControlValues( + @Nonnull HttpMethodEnum method, + @Nonnull String url) { + this(method, url, null, + null, null, null, + null); + } + + /** + * HTTP method + */ + public HttpMethodEnum method() { + return this.method; + } + + /** + * Target URL for the HTTP request + */ + public String url() { + return this.url; + } + + /** + * Request headers as key-value pairs + */ + public Optional> headers() { + return Optional.ofNullable(this.headers); + } + + /** + * Request body as key-value pairs + */ + public Optional> body() { + return Optional.ofNullable(this.body); + } + + /** + * JSON schema to validate response body against + */ + public Optional> responseBodySchema() { + return Optional.ofNullable(this.responseBodySchema); + } + + /** + * Whether to enforce response body schema validation + */ + public Optional enforceSchemaValidation() { + return Optional.ofNullable(this.enforceSchemaValidation); + } + + /** + * Whether to continue workflow execution on failure + */ + public Optional continueOnFailure() { + return Optional.ofNullable(this.continueOnFailure); + } + + @JsonAnyGetter + public Map additionalProperties() { + return additionalProperties; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP method + */ + public HttpRequestStepResponseDtoControlValues withMethod(@Nonnull HttpMethodEnum method) { + this.method = Utils.checkNotNull(method, "method"); + return this; + } + + + /** + * Target URL for the HTTP request + */ + public HttpRequestStepResponseDtoControlValues withUrl(@Nonnull String url) { + this.url = Utils.checkNotNull(url, "url"); + return this; + } + + + /** + * Request headers as key-value pairs + */ + public HttpRequestStepResponseDtoControlValues withHeaders(@Nullable List headers) { + this.headers = headers; + return this; + } + + + /** + * Request body as key-value pairs + */ + public HttpRequestStepResponseDtoControlValues withBody(@Nullable List body) { + this.body = body; + return this; + } + + + /** + * JSON schema to validate response body against + */ + public HttpRequestStepResponseDtoControlValues withResponseBodySchema(@Nullable Map responseBodySchema) { + this.responseBodySchema = responseBodySchema; + return this; + } + + + /** + * Whether to enforce response body schema validation + */ + public HttpRequestStepResponseDtoControlValues withEnforceSchemaValidation(@Nullable Boolean enforceSchemaValidation) { + this.enforceSchemaValidation = enforceSchemaValidation; + return this; + } + + + /** + * Whether to continue workflow execution on failure + */ + public HttpRequestStepResponseDtoControlValues withContinueOnFailure(@Nullable Boolean continueOnFailure) { + this.continueOnFailure = continueOnFailure; + return this; + } + + + @JsonAnySetter + public HttpRequestStepResponseDtoControlValues withAdditionalProperty(String key, Object value) { + // note that value can be null because of the way JsonAnySetter works + Utils.checkNotNull(key, "key"); + additionalProperties.put(key, value); + return this; + } + + public HttpRequestStepResponseDtoControlValues withAdditionalProperties(@Nullable Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HttpRequestStepResponseDtoControlValues other = (HttpRequestStepResponseDtoControlValues) o; + return + Utils.enhancedDeepEquals(this.method, other.method) && + Utils.enhancedDeepEquals(this.url, other.url) && + Utils.enhancedDeepEquals(this.headers, other.headers) && + Utils.enhancedDeepEquals(this.body, other.body) && + Utils.enhancedDeepEquals(this.responseBodySchema, other.responseBodySchema) && + Utils.enhancedDeepEquals(this.enforceSchemaValidation, other.enforceSchemaValidation) && + Utils.enhancedDeepEquals(this.continueOnFailure, other.continueOnFailure) && + Utils.enhancedDeepEquals(this.additionalProperties, other.additionalProperties); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + method, url, headers, + body, responseBodySchema, enforceSchemaValidation, + continueOnFailure, additionalProperties); + } + + @Override + public String toString() { + return Utils.toString(HttpRequestStepResponseDtoControlValues.class, + "method", method, + "url", url, + "headers", headers, + "body", body, + "responseBodySchema", responseBodySchema, + "enforceSchemaValidation", enforceSchemaValidation, + "continueOnFailure", continueOnFailure, + "additionalProperties", additionalProperties); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private HttpMethodEnum method; + + private String url; + + private List headers; + + private List body; + + private Map responseBodySchema; + + private Boolean enforceSchemaValidation; + + private Boolean continueOnFailure; + + private Map additionalProperties = new HashMap<>(); + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP method + */ + public Builder method(@Nonnull HttpMethodEnum method) { + this.method = Utils.checkNotNull(method, "method"); + return this; + } + + /** + * Target URL for the HTTP request + */ + public Builder url(@Nonnull String url) { + this.url = Utils.checkNotNull(url, "url"); + return this; + } + + /** + * Request headers as key-value pairs + */ + public Builder headers(@Nullable List headers) { + this.headers = headers; + return this; + } + + /** + * Request body as key-value pairs + */ + public Builder body(@Nullable List body) { + this.body = body; + return this; + } + + /** + * JSON schema to validate response body against + */ + public Builder responseBodySchema(@Nullable Map responseBodySchema) { + this.responseBodySchema = responseBodySchema; + return this; + } + + /** + * Whether to enforce response body schema validation + */ + public Builder enforceSchemaValidation(@Nullable Boolean enforceSchemaValidation) { + this.enforceSchemaValidation = enforceSchemaValidation; + return this; + } + + /** + * Whether to continue workflow execution on failure + */ + public Builder continueOnFailure(@Nullable Boolean continueOnFailure) { + this.continueOnFailure = continueOnFailure; + return this; + } + + public Builder additionalProperty(String key, Object value) { + Utils.checkNotNull(key, "key"); + // we could be strict about null values (force the user + // to pass `JsonNullable.of(null)`) but likely to be a bit + // annoying for additional properties building so we'll + // relax preconditions. + this.additionalProperties.put(key, value); + return this; + } + public Builder additionalProperties(@Nullable Map additionalProperties) { + this.additionalProperties = additionalProperties; + return this; + } + + public HttpRequestStepResponseDtoControlValues build() { + return new HttpRequestStepResponseDtoControlValues( + method, url, headers, + body, responseBodySchema, enforceSchemaValidation, + continueOnFailure) + .withAdditionalProperties(additionalProperties); + } + + } +} diff --git a/src/main/java/co/novu/models/components/HttpRequestStepUpsertDto.java b/src/main/java/co/novu/models/components/HttpRequestStepUpsertDto.java new file mode 100644 index 00000000..b1a9b65e --- /dev/null +++ b/src/main/java/co/novu/models/components/HttpRequestStepUpsertDto.java @@ -0,0 +1,259 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class HttpRequestStepUpsertDto implements CreateWorkflowDtoStep, UpdateWorkflowDtoStep { + /** + * Database identifier of the step. Used for updating the step. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("_id") + private String id; + + /** + * Unique identifier for the step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepId") + private String stepId; + + /** + * Name of the step + */ + @JsonProperty("name") + private String name; + + /** + * Type of the step + */ + @JsonProperty("type") + private StepTypeEnum type; + + /** + * Control values for the HTTP Request step. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("controlValues") + private HttpRequestStepUpsertDtoControlValues controlValues; + + @JsonCreator + public HttpRequestStepUpsertDto( + @JsonProperty("_id") @Nullable String id, + @JsonProperty("stepId") @Nullable String stepId, + @JsonProperty("name") @Nonnull String name, + @JsonProperty("type") @Nonnull StepTypeEnum type, + @JsonProperty("controlValues") @Nullable HttpRequestStepUpsertDtoControlValues controlValues) { + this.id = id; + this.stepId = stepId; + this.name = Optional.ofNullable(name) + .orElseThrow(() -> new IllegalArgumentException("name cannot be null")); + this.type = Optional.ofNullable(type) + .orElseThrow(() -> new IllegalArgumentException("type cannot be null")); + this.controlValues = controlValues; + } + + public HttpRequestStepUpsertDto( + @Nonnull String name, + @Nonnull StepTypeEnum type) { + this(null, null, name, + type, null); + } + + /** + * Database identifier of the step. Used for updating the step. + */ + public Optional id() { + return Optional.ofNullable(this.id); + } + + /** + * Unique identifier for the step + */ + public Optional stepId() { + return Optional.ofNullable(this.stepId); + } + + /** + * Name of the step + */ + public String name() { + return this.name; + } + + /** + * Type of the step + */ + @Override + public String type() { + return Utils.discriminatorToString(type); + } + + /** + * Control values for the HTTP Request step. + */ + public Optional controlValues() { + return Optional.ofNullable(this.controlValues); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Database identifier of the step. Used for updating the step. + */ + public HttpRequestStepUpsertDto withId(@Nullable String id) { + this.id = id; + return this; + } + + + /** + * Unique identifier for the step + */ + public HttpRequestStepUpsertDto withStepId(@Nullable String stepId) { + this.stepId = stepId; + return this; + } + + + /** + * Name of the step + */ + public HttpRequestStepUpsertDto withName(@Nonnull String name) { + this.name = Utils.checkNotNull(name, "name"); + return this; + } + + + /** + * Type of the step + */ + public HttpRequestStepUpsertDto withType(@Nonnull StepTypeEnum type) { + this.type = Utils.checkNotNull(type, "type"); + return this; + } + + + /** + * Control values for the HTTP Request step. + */ + public HttpRequestStepUpsertDto withControlValues(@Nullable HttpRequestStepUpsertDtoControlValues controlValues) { + this.controlValues = controlValues; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HttpRequestStepUpsertDto other = (HttpRequestStepUpsertDto) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.stepId, other.stepId) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.controlValues, other.controlValues); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, stepId, name, + type, controlValues); + } + + @Override + public String toString() { + return Utils.toString(HttpRequestStepUpsertDto.class, + "id", id, + "stepId", stepId, + "name", name, + "type", type, + "controlValues", controlValues); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String stepId; + + private String name; + + private StepTypeEnum type; + + private HttpRequestStepUpsertDtoControlValues controlValues; + + private Builder() { + // force use of static builder() method + } + + /** + * Database identifier of the step. Used for updating the step. + */ + public Builder id(@Nullable String id) { + this.id = id; + return this; + } + + /** + * Unique identifier for the step + */ + public Builder stepId(@Nullable String stepId) { + this.stepId = stepId; + return this; + } + + /** + * Name of the step + */ + public Builder name(@Nonnull String name) { + this.name = Utils.checkNotNull(name, "name"); + return this; + } + + /** + * Type of the step + */ + public Builder type(@Nonnull StepTypeEnum type) { + this.type = Utils.checkNotNull(type, "type"); + return this; + } + + /** + * Control values for the HTTP Request step. + */ + public Builder controlValues(@Nullable HttpRequestStepUpsertDtoControlValues controlValues) { + this.controlValues = controlValues; + return this; + } + + public HttpRequestStepUpsertDto build() { + return new HttpRequestStepUpsertDto( + id, stepId, name, + type, controlValues); + } + + } +} diff --git a/src/main/java/co/novu/models/components/HttpRequestStepUpsertDtoControlValues.java b/src/main/java/co/novu/models/components/HttpRequestStepUpsertDtoControlValues.java new file mode 100644 index 00000000..040c4252 --- /dev/null +++ b/src/main/java/co/novu/models/components/HttpRequestStepUpsertDtoControlValues.java @@ -0,0 +1,120 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.OneOfDeserializer; +import co.novu.utils.TypedObject; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils.TypeReferenceWithShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Map; +import java.util.Optional; + +/** + * HttpRequestStepUpsertDtoControlValues + * + *

Control values for the HTTP Request step. + */ +@JsonDeserialize(using = HttpRequestStepUpsertDtoControlValues._Deserializer.class) +public class HttpRequestStepUpsertDtoControlValues { + + @JsonValue + private final TypedObject value; + + private HttpRequestStepUpsertDtoControlValues(TypedObject value) { + this.value = value; + } + + public static HttpRequestStepUpsertDtoControlValues of(HttpRequestControlDto value) { + Utils.checkNotNull(value, "value"); + return new HttpRequestStepUpsertDtoControlValues(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static HttpRequestStepUpsertDtoControlValues of(Map value) { + Utils.checkNotNull(value, "value"); + return new HttpRequestStepUpsertDtoControlValues(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code HttpRequestControlDto}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code HttpRequestControlDto} value, or empty if not of this type + */ + public Optional httpRequestControlDto() { + if (value.value() instanceof HttpRequestControlDto) { + return Optional.of((HttpRequestControlDto) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code Map}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code Map} value, or empty if not of this type + */ + @SuppressWarnings("unchecked") + public Optional> mapOfObject() { + if (value.value() instanceof Map) { + return Optional.of((Map) value.value()); + } + return Optional.empty(); + } + /** + * Returns an {@link Optional} containing the value as a {@code JsonNode}. + * This accessor returns the raw JSON when the value doesn't match any of the defined union types. + * + * @return an {@link Optional} containing the {@code JsonNode} value, or empty if value matched a known type + */ + public Optional asJson() { + if (value.value() instanceof JsonNode) { + return Optional.of((JsonNode) value.value()); + } + return Optional.empty(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + HttpRequestStepUpsertDtoControlValues other = (HttpRequestStepUpsertDtoControlValues) o; + return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); + } + + @Override + public int hashCode() { + return Utils.enhancedHash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends OneOfDeserializer { + + public _Deserializer() { + super(HttpRequestStepUpsertDtoControlValues.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference>() {}, JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(HttpRequestStepUpsertDtoControlValues.class, + "value", value); + } + +} + diff --git a/src/main/java/co/novu/models/components/InAppRenderOutput.java b/src/main/java/co/novu/models/components/InAppRenderOutput.java new file mode 100644 index 00000000..8604256d --- /dev/null +++ b/src/main/java/co/novu/models/components/InAppRenderOutput.java @@ -0,0 +1,336 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; +import java.util.Optional; + + +public class InAppRenderOutput { + /** + * Subject of the in-app notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subject") + private String subject; + + /** + * Body of the in-app notification + */ + @JsonProperty("body") + private String body; + + /** + * Avatar for the in-app notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("avatar") + private String avatar; + + /** + * Primary action details + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryAction") + private ActionDto primaryAction; + + /** + * Secondary action details + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondaryAction") + private ActionDto secondaryAction; + + /** + * Additional data + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("data") + private Map data; + + /** + * Redirect details + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("redirect") + private RedirectDto redirect; + + @JsonCreator + public InAppRenderOutput( + @JsonProperty("subject") @Nullable String subject, + @JsonProperty("body") @Nonnull String body, + @JsonProperty("avatar") @Nullable String avatar, + @JsonProperty("primaryAction") @Nullable ActionDto primaryAction, + @JsonProperty("secondaryAction") @Nullable ActionDto secondaryAction, + @JsonProperty("data") @Nullable Map data, + @JsonProperty("redirect") @Nullable RedirectDto redirect) { + this.subject = subject; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + this.avatar = avatar; + this.primaryAction = primaryAction; + this.secondaryAction = secondaryAction; + this.data = data; + this.redirect = redirect; + } + + public InAppRenderOutput( + @Nonnull String body) { + this(null, body, null, + null, null, null, + null); + } + + /** + * Subject of the in-app notification + */ + public Optional subject() { + return Optional.ofNullable(this.subject); + } + + /** + * Body of the in-app notification + */ + public String body() { + return this.body; + } + + /** + * Avatar for the in-app notification + */ + public Optional avatar() { + return Optional.ofNullable(this.avatar); + } + + /** + * Primary action details + */ + public Optional primaryAction() { + return Optional.ofNullable(this.primaryAction); + } + + /** + * Secondary action details + */ + public Optional secondaryAction() { + return Optional.ofNullable(this.secondaryAction); + } + + /** + * Additional data + */ + public Optional> data() { + return Optional.ofNullable(this.data); + } + + /** + * Redirect details + */ + public Optional redirect() { + return Optional.ofNullable(this.redirect); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Subject of the in-app notification + */ + public InAppRenderOutput withSubject(@Nullable String subject) { + this.subject = subject; + return this; + } + + + /** + * Body of the in-app notification + */ + public InAppRenderOutput withBody(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + /** + * Avatar for the in-app notification + */ + public InAppRenderOutput withAvatar(@Nullable String avatar) { + this.avatar = avatar; + return this; + } + + + /** + * Primary action details + */ + public InAppRenderOutput withPrimaryAction(@Nullable ActionDto primaryAction) { + this.primaryAction = primaryAction; + return this; + } + + + /** + * Secondary action details + */ + public InAppRenderOutput withSecondaryAction(@Nullable ActionDto secondaryAction) { + this.secondaryAction = secondaryAction; + return this; + } + + + /** + * Additional data + */ + public InAppRenderOutput withData(@Nullable Map data) { + this.data = data; + return this; + } + + + /** + * Redirect details + */ + public InAppRenderOutput withRedirect(@Nullable RedirectDto redirect) { + this.redirect = redirect; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InAppRenderOutput other = (InAppRenderOutput) o; + return + Utils.enhancedDeepEquals(this.subject, other.subject) && + Utils.enhancedDeepEquals(this.body, other.body) && + Utils.enhancedDeepEquals(this.avatar, other.avatar) && + Utils.enhancedDeepEquals(this.primaryAction, other.primaryAction) && + Utils.enhancedDeepEquals(this.secondaryAction, other.secondaryAction) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.redirect, other.redirect); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subject, body, avatar, + primaryAction, secondaryAction, data, + redirect); + } + + @Override + public String toString() { + return Utils.toString(InAppRenderOutput.class, + "subject", subject, + "body", body, + "avatar", avatar, + "primaryAction", primaryAction, + "secondaryAction", secondaryAction, + "data", data, + "redirect", redirect); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subject; + + private String body; + + private String avatar; + + private ActionDto primaryAction; + + private ActionDto secondaryAction; + + private Map data; + + private RedirectDto redirect; + + private Builder() { + // force use of static builder() method + } + + /** + * Subject of the in-app notification + */ + public Builder subject(@Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * Body of the in-app notification + */ + public Builder body(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + /** + * Avatar for the in-app notification + */ + public Builder avatar(@Nullable String avatar) { + this.avatar = avatar; + return this; + } + + /** + * Primary action details + */ + public Builder primaryAction(@Nullable ActionDto primaryAction) { + this.primaryAction = primaryAction; + return this; + } + + /** + * Secondary action details + */ + public Builder secondaryAction(@Nullable ActionDto secondaryAction) { + this.secondaryAction = secondaryAction; + return this; + } + + /** + * Additional data + */ + public Builder data(@Nullable Map data) { + this.data = data; + return this; + } + + /** + * Redirect details + */ + public Builder redirect(@Nullable RedirectDto redirect) { + this.redirect = redirect; + return this; + } + + public InAppRenderOutput build() { + return new InAppRenderOutput( + subject, body, avatar, + primaryAction, secondaryAction, data, + redirect); + } + + } +} diff --git a/src/main/java/co/novu/models/components/InAppStepResponseDto.java b/src/main/java/co/novu/models/components/InAppStepResponseDto.java index acccaa2c..8c2dcafe 100644 --- a/src/main/java/co/novu/models/components/InAppStepResponseDto.java +++ b/src/main/java/co/novu/models/components/InAppStepResponseDto.java @@ -92,6 +92,13 @@ public class InAppStepResponseDto implements WorkflowResponseDtoStep { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public InAppStepResponseDto( @JsonProperty("controls") @Nonnull InAppControlsMetadataResponseDto controls, @@ -105,7 +112,8 @@ public InAppStepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public InAppStepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public InAppStepResponseDto( @@ -145,7 +154,8 @@ public InAppStepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -233,6 +243,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -346,6 +363,15 @@ public InAppStepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public InAppStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -367,7 +393,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -376,7 +403,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -393,7 +421,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -423,6 +452,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -523,12 +554,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public InAppStepResponseDto build() { return new InAppStepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/InboxActionDto.java b/src/main/java/co/novu/models/components/InboxActionDto.java new file mode 100644 index 00000000..d02356fc --- /dev/null +++ b/src/main/java/co/novu/models/components/InboxActionDto.java @@ -0,0 +1,180 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class InboxActionDto { + /** + * Label of the action button + */ + @JsonProperty("label") + private String label; + + /** + * Whether the action has been completed + */ + @JsonProperty("isCompleted") + private boolean isCompleted; + + /** + * Redirect configuration for the action + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("redirect") + private RedirectDto redirect; + + @JsonCreator + public InboxActionDto( + @JsonProperty("label") @Nonnull String label, + @JsonProperty("isCompleted") boolean isCompleted, + @JsonProperty("redirect") @Nullable RedirectDto redirect) { + this.label = Optional.ofNullable(label) + .orElseThrow(() -> new IllegalArgumentException("label cannot be null")); + this.isCompleted = isCompleted; + this.redirect = redirect; + } + + public InboxActionDto( + @Nonnull String label, + boolean isCompleted) { + this(label, isCompleted, null); + } + + /** + * Label of the action button + */ + public String label() { + return this.label; + } + + /** + * Whether the action has been completed + */ + public boolean isCompleted() { + return this.isCompleted; + } + + /** + * Redirect configuration for the action + */ + public Optional redirect() { + return Optional.ofNullable(this.redirect); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Label of the action button + */ + public InboxActionDto withLabel(@Nonnull String label) { + this.label = Utils.checkNotNull(label, "label"); + return this; + } + + + /** + * Whether the action has been completed + */ + public InboxActionDto withIsCompleted(boolean isCompleted) { + this.isCompleted = isCompleted; + return this; + } + + + /** + * Redirect configuration for the action + */ + public InboxActionDto withRedirect(@Nullable RedirectDto redirect) { + this.redirect = redirect; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InboxActionDto other = (InboxActionDto) o; + return + Utils.enhancedDeepEquals(this.label, other.label) && + Utils.enhancedDeepEquals(this.isCompleted, other.isCompleted) && + Utils.enhancedDeepEquals(this.redirect, other.redirect); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + label, isCompleted, redirect); + } + + @Override + public String toString() { + return Utils.toString(InboxActionDto.class, + "label", label, + "isCompleted", isCompleted, + "redirect", redirect); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String label; + + private boolean isCompleted; + + private RedirectDto redirect; + + private Builder() { + // force use of static builder() method + } + + /** + * Label of the action button + */ + public Builder label(@Nonnull String label) { + this.label = Utils.checkNotNull(label, "label"); + return this; + } + + /** + * Whether the action has been completed + */ + public Builder isCompleted(boolean isCompleted) { + this.isCompleted = isCompleted; + return this; + } + + /** + * Redirect configuration for the action + */ + public Builder redirect(@Nullable RedirectDto redirect) { + this.redirect = redirect; + return this; + } + + public InboxActionDto build() { + return new InboxActionDto( + label, isCompleted, redirect); + } + + } +} diff --git a/src/main/java/co/novu/models/components/InboxNotificationDto.java b/src/main/java/co/novu/models/components/InboxNotificationDto.java new file mode 100644 index 00000000..c3e89d55 --- /dev/null +++ b/src/main/java/co/novu/models/components/InboxNotificationDto.java @@ -0,0 +1,992 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class InboxNotificationDto { + /** + * Unique identifier of the notification + */ + @JsonProperty("id") + private String id; + + /** + * Transaction identifier of the notification + */ + @JsonProperty("transactionId") + private String transactionId; + + /** + * Subject of the notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subject") + private String subject; + + /** + * Body content of the notification + */ + @JsonProperty("body") + private String body; + + /** + * Subscriber this notification was sent to + */ + @JsonProperty("to") + private InboxSubscriberResponseDto to; + + /** + * Whether the notification has been read + */ + @JsonProperty("isRead") + private boolean isRead; + + /** + * Whether the notification has been seen + */ + @JsonProperty("isSeen") + private boolean isSeen; + + /** + * Whether the notification has been archived + */ + @JsonProperty("isArchived") + private boolean isArchived; + + /** + * Whether the notification is snoozed + */ + @JsonProperty("isSnoozed") + private boolean isSnoozed; + + /** + * ISO timestamp when the notification will be unsnoozed + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("snoozedUntil") + private JsonNullable snoozedUntil; + + /** + * Timestamps when the notification was delivered + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("deliveredAt") + private List deliveredAt; + + /** + * ISO timestamp when the notification was created + */ + @JsonProperty("createdAt") + private String createdAt; + + /** + * ISO timestamp when the notification was read + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("readAt") + private JsonNullable readAt; + + /** + * ISO timestamp when the notification was first seen + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("firstSeenAt") + private JsonNullable firstSeenAt; + + /** + * ISO timestamp when the notification was archived + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("archivedAt") + private JsonNullable archivedAt; + + /** + * Avatar URL for the notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("avatar") + private String avatar; + + /** + * Primary action button for the notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("primaryAction") + private InboxActionDto primaryAction; + + /** + * Secondary action button for the notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("secondaryAction") + private InboxActionDto secondaryAction; + + /** + * Channel type through which the message is sent + */ + @JsonProperty("channelType") + private ChannelTypeEnum channelType; + + /** + * Tags associated with the notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tags") + private List tags; + + /** + * Custom data payload of the notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("data") + private Map data; + + /** + * Redirect configuration for the notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("redirect") + private RedirectDto redirect; + + /** + * Workflow associated with the notification + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("workflow") + private NotificationWorkflowDto workflow; + + /** + * Severity of the workflow + */ + @JsonProperty("severity") + private SeverityLevelEnum severity; + + @JsonCreator + public InboxNotificationDto( + @JsonProperty("id") @Nonnull String id, + @JsonProperty("transactionId") @Nonnull String transactionId, + @JsonProperty("subject") @Nullable String subject, + @JsonProperty("body") @Nonnull String body, + @JsonProperty("to") @Nonnull InboxSubscriberResponseDto to, + @JsonProperty("isRead") boolean isRead, + @JsonProperty("isSeen") boolean isSeen, + @JsonProperty("isArchived") boolean isArchived, + @JsonProperty("isSnoozed") boolean isSnoozed, + @JsonProperty("snoozedUntil") @Nullable JsonNullable snoozedUntil, + @JsonProperty("deliveredAt") @Nullable List deliveredAt, + @JsonProperty("createdAt") @Nonnull String createdAt, + @JsonProperty("readAt") @Nullable JsonNullable readAt, + @JsonProperty("firstSeenAt") @Nullable JsonNullable firstSeenAt, + @JsonProperty("archivedAt") @Nullable JsonNullable archivedAt, + @JsonProperty("avatar") @Nullable String avatar, + @JsonProperty("primaryAction") @Nullable InboxActionDto primaryAction, + @JsonProperty("secondaryAction") @Nullable InboxActionDto secondaryAction, + @JsonProperty("channelType") @Nonnull ChannelTypeEnum channelType, + @JsonProperty("tags") @Nullable List tags, + @JsonProperty("data") @Nullable Map data, + @JsonProperty("redirect") @Nullable RedirectDto redirect, + @JsonProperty("workflow") @Nullable NotificationWorkflowDto workflow, + @JsonProperty("severity") @Nonnull SeverityLevelEnum severity) { + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.transactionId = Optional.ofNullable(transactionId) + .orElseThrow(() -> new IllegalArgumentException("transactionId cannot be null")); + this.subject = subject; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + this.to = Optional.ofNullable(to) + .orElseThrow(() -> new IllegalArgumentException("to cannot be null")); + this.isRead = isRead; + this.isSeen = isSeen; + this.isArchived = isArchived; + this.isSnoozed = isSnoozed; + this.snoozedUntil = Optional.ofNullable(snoozedUntil) + .orElse(JsonNullable.undefined()); + this.deliveredAt = deliveredAt; + this.createdAt = Optional.ofNullable(createdAt) + .orElseThrow(() -> new IllegalArgumentException("createdAt cannot be null")); + this.readAt = Optional.ofNullable(readAt) + .orElse(JsonNullable.undefined()); + this.firstSeenAt = Optional.ofNullable(firstSeenAt) + .orElse(JsonNullable.undefined()); + this.archivedAt = Optional.ofNullable(archivedAt) + .orElse(JsonNullable.undefined()); + this.avatar = avatar; + this.primaryAction = primaryAction; + this.secondaryAction = secondaryAction; + this.channelType = Optional.ofNullable(channelType) + .orElseThrow(() -> new IllegalArgumentException("channelType cannot be null")); + this.tags = tags; + this.data = data; + this.redirect = redirect; + this.workflow = workflow; + this.severity = Optional.ofNullable(severity) + .orElseThrow(() -> new IllegalArgumentException("severity cannot be null")); + } + + public InboxNotificationDto( + @Nonnull String id, + @Nonnull String transactionId, + @Nonnull String body, + @Nonnull InboxSubscriberResponseDto to, + boolean isRead, + boolean isSeen, + boolean isArchived, + boolean isSnoozed, + @Nonnull String createdAt, + @Nonnull ChannelTypeEnum channelType, + @Nonnull SeverityLevelEnum severity) { + this(id, transactionId, null, + body, to, isRead, + isSeen, isArchived, isSnoozed, + null, null, createdAt, + null, null, null, + null, null, null, + channelType, null, null, + null, null, severity); + } + + /** + * Unique identifier of the notification + */ + public String id() { + return this.id; + } + + /** + * Transaction identifier of the notification + */ + public String transactionId() { + return this.transactionId; + } + + /** + * Subject of the notification + */ + public Optional subject() { + return Optional.ofNullable(this.subject); + } + + /** + * Body content of the notification + */ + public String body() { + return this.body; + } + + /** + * Subscriber this notification was sent to + */ + public InboxSubscriberResponseDto to() { + return this.to; + } + + /** + * Whether the notification has been read + */ + public boolean isRead() { + return this.isRead; + } + + /** + * Whether the notification has been seen + */ + public boolean isSeen() { + return this.isSeen; + } + + /** + * Whether the notification has been archived + */ + public boolean isArchived() { + return this.isArchived; + } + + /** + * Whether the notification is snoozed + */ + public boolean isSnoozed() { + return this.isSnoozed; + } + + /** + * ISO timestamp when the notification will be unsnoozed + */ + public JsonNullable snoozedUntil() { + return this.snoozedUntil; + } + + /** + * Timestamps when the notification was delivered + */ + public Optional> deliveredAt() { + return Optional.ofNullable(this.deliveredAt); + } + + /** + * ISO timestamp when the notification was created + */ + public String createdAt() { + return this.createdAt; + } + + /** + * ISO timestamp when the notification was read + */ + public JsonNullable readAt() { + return this.readAt; + } + + /** + * ISO timestamp when the notification was first seen + */ + public JsonNullable firstSeenAt() { + return this.firstSeenAt; + } + + /** + * ISO timestamp when the notification was archived + */ + public JsonNullable archivedAt() { + return this.archivedAt; + } + + /** + * Avatar URL for the notification + */ + public Optional avatar() { + return Optional.ofNullable(this.avatar); + } + + /** + * Primary action button for the notification + */ + public Optional primaryAction() { + return Optional.ofNullable(this.primaryAction); + } + + /** + * Secondary action button for the notification + */ + public Optional secondaryAction() { + return Optional.ofNullable(this.secondaryAction); + } + + /** + * Channel type through which the message is sent + */ + public ChannelTypeEnum channelType() { + return this.channelType; + } + + /** + * Tags associated with the notification + */ + public Optional> tags() { + return Optional.ofNullable(this.tags); + } + + /** + * Custom data payload of the notification + */ + public Optional> data() { + return Optional.ofNullable(this.data); + } + + /** + * Redirect configuration for the notification + */ + public Optional redirect() { + return Optional.ofNullable(this.redirect); + } + + /** + * Workflow associated with the notification + */ + public Optional workflow() { + return Optional.ofNullable(this.workflow); + } + + /** + * Severity of the workflow + */ + public SeverityLevelEnum severity() { + return this.severity; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Unique identifier of the notification + */ + public InboxNotificationDto withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + /** + * Transaction identifier of the notification + */ + public InboxNotificationDto withTransactionId(@Nonnull String transactionId) { + this.transactionId = Utils.checkNotNull(transactionId, "transactionId"); + return this; + } + + + /** + * Subject of the notification + */ + public InboxNotificationDto withSubject(@Nullable String subject) { + this.subject = subject; + return this; + } + + + /** + * Body content of the notification + */ + public InboxNotificationDto withBody(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + /** + * Subscriber this notification was sent to + */ + public InboxNotificationDto withTo(@Nonnull InboxSubscriberResponseDto to) { + this.to = Utils.checkNotNull(to, "to"); + return this; + } + + + /** + * Whether the notification has been read + */ + public InboxNotificationDto withIsRead(boolean isRead) { + this.isRead = isRead; + return this; + } + + + /** + * Whether the notification has been seen + */ + public InboxNotificationDto withIsSeen(boolean isSeen) { + this.isSeen = isSeen; + return this; + } + + + /** + * Whether the notification has been archived + */ + public InboxNotificationDto withIsArchived(boolean isArchived) { + this.isArchived = isArchived; + return this; + } + + + /** + * Whether the notification is snoozed + */ + public InboxNotificationDto withIsSnoozed(boolean isSnoozed) { + this.isSnoozed = isSnoozed; + return this; + } + + + /** + * ISO timestamp when the notification will be unsnoozed + */ + public InboxNotificationDto withSnoozedUntil(@Nullable String snoozedUntil) { + this.snoozedUntil = JsonNullable.of(snoozedUntil); + return this; + } + + + /** + * Timestamps when the notification was delivered + */ + public InboxNotificationDto withDeliveredAt(@Nullable List deliveredAt) { + this.deliveredAt = deliveredAt; + return this; + } + + + /** + * ISO timestamp when the notification was created + */ + public InboxNotificationDto withCreatedAt(@Nonnull String createdAt) { + this.createdAt = Utils.checkNotNull(createdAt, "createdAt"); + return this; + } + + + /** + * ISO timestamp when the notification was read + */ + public InboxNotificationDto withReadAt(@Nullable String readAt) { + this.readAt = JsonNullable.of(readAt); + return this; + } + + + /** + * ISO timestamp when the notification was first seen + */ + public InboxNotificationDto withFirstSeenAt(@Nullable String firstSeenAt) { + this.firstSeenAt = JsonNullable.of(firstSeenAt); + return this; + } + + + /** + * ISO timestamp when the notification was archived + */ + public InboxNotificationDto withArchivedAt(@Nullable String archivedAt) { + this.archivedAt = JsonNullable.of(archivedAt); + return this; + } + + + /** + * Avatar URL for the notification + */ + public InboxNotificationDto withAvatar(@Nullable String avatar) { + this.avatar = avatar; + return this; + } + + + /** + * Primary action button for the notification + */ + public InboxNotificationDto withPrimaryAction(@Nullable InboxActionDto primaryAction) { + this.primaryAction = primaryAction; + return this; + } + + + /** + * Secondary action button for the notification + */ + public InboxNotificationDto withSecondaryAction(@Nullable InboxActionDto secondaryAction) { + this.secondaryAction = secondaryAction; + return this; + } + + + /** + * Channel type through which the message is sent + */ + public InboxNotificationDto withChannelType(@Nonnull ChannelTypeEnum channelType) { + this.channelType = Utils.checkNotNull(channelType, "channelType"); + return this; + } + + + /** + * Tags associated with the notification + */ + public InboxNotificationDto withTags(@Nullable List tags) { + this.tags = tags; + return this; + } + + + /** + * Custom data payload of the notification + */ + public InboxNotificationDto withData(@Nullable Map data) { + this.data = data; + return this; + } + + + /** + * Redirect configuration for the notification + */ + public InboxNotificationDto withRedirect(@Nullable RedirectDto redirect) { + this.redirect = redirect; + return this; + } + + + /** + * Workflow associated with the notification + */ + public InboxNotificationDto withWorkflow(@Nullable NotificationWorkflowDto workflow) { + this.workflow = workflow; + return this; + } + + + /** + * Severity of the workflow + */ + public InboxNotificationDto withSeverity(@Nonnull SeverityLevelEnum severity) { + this.severity = Utils.checkNotNull(severity, "severity"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InboxNotificationDto other = (InboxNotificationDto) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.transactionId, other.transactionId) && + Utils.enhancedDeepEquals(this.subject, other.subject) && + Utils.enhancedDeepEquals(this.body, other.body) && + Utils.enhancedDeepEquals(this.to, other.to) && + Utils.enhancedDeepEquals(this.isRead, other.isRead) && + Utils.enhancedDeepEquals(this.isSeen, other.isSeen) && + Utils.enhancedDeepEquals(this.isArchived, other.isArchived) && + Utils.enhancedDeepEquals(this.isSnoozed, other.isSnoozed) && + Utils.enhancedDeepEquals(this.snoozedUntil, other.snoozedUntil) && + Utils.enhancedDeepEquals(this.deliveredAt, other.deliveredAt) && + Utils.enhancedDeepEquals(this.createdAt, other.createdAt) && + Utils.enhancedDeepEquals(this.readAt, other.readAt) && + Utils.enhancedDeepEquals(this.firstSeenAt, other.firstSeenAt) && + Utils.enhancedDeepEquals(this.archivedAt, other.archivedAt) && + Utils.enhancedDeepEquals(this.avatar, other.avatar) && + Utils.enhancedDeepEquals(this.primaryAction, other.primaryAction) && + Utils.enhancedDeepEquals(this.secondaryAction, other.secondaryAction) && + Utils.enhancedDeepEquals(this.channelType, other.channelType) && + Utils.enhancedDeepEquals(this.tags, other.tags) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.redirect, other.redirect) && + Utils.enhancedDeepEquals(this.workflow, other.workflow) && + Utils.enhancedDeepEquals(this.severity, other.severity); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, transactionId, subject, + body, to, isRead, + isSeen, isArchived, isSnoozed, + snoozedUntil, deliveredAt, createdAt, + readAt, firstSeenAt, archivedAt, + avatar, primaryAction, secondaryAction, + channelType, tags, data, + redirect, workflow, severity); + } + + @Override + public String toString() { + return Utils.toString(InboxNotificationDto.class, + "id", id, + "transactionId", transactionId, + "subject", subject, + "body", body, + "to", to, + "isRead", isRead, + "isSeen", isSeen, + "isArchived", isArchived, + "isSnoozed", isSnoozed, + "snoozedUntil", snoozedUntil, + "deliveredAt", deliveredAt, + "createdAt", createdAt, + "readAt", readAt, + "firstSeenAt", firstSeenAt, + "archivedAt", archivedAt, + "avatar", avatar, + "primaryAction", primaryAction, + "secondaryAction", secondaryAction, + "channelType", channelType, + "tags", tags, + "data", data, + "redirect", redirect, + "workflow", workflow, + "severity", severity); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String transactionId; + + private String subject; + + private String body; + + private InboxSubscriberResponseDto to; + + private boolean isRead; + + private boolean isSeen; + + private boolean isArchived; + + private boolean isSnoozed; + + private JsonNullable snoozedUntil; + + private List deliveredAt; + + private String createdAt; + + private JsonNullable readAt; + + private JsonNullable firstSeenAt; + + private JsonNullable archivedAt; + + private String avatar; + + private InboxActionDto primaryAction; + + private InboxActionDto secondaryAction; + + private ChannelTypeEnum channelType; + + private List tags; + + private Map data; + + private RedirectDto redirect; + + private NotificationWorkflowDto workflow; + + private SeverityLevelEnum severity; + + private Builder() { + // force use of static builder() method + } + + /** + * Unique identifier of the notification + */ + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + /** + * Transaction identifier of the notification + */ + public Builder transactionId(@Nonnull String transactionId) { + this.transactionId = Utils.checkNotNull(transactionId, "transactionId"); + return this; + } + + /** + * Subject of the notification + */ + public Builder subject(@Nullable String subject) { + this.subject = subject; + return this; + } + + /** + * Body content of the notification + */ + public Builder body(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + /** + * Subscriber this notification was sent to + */ + public Builder to(@Nonnull InboxSubscriberResponseDto to) { + this.to = Utils.checkNotNull(to, "to"); + return this; + } + + /** + * Whether the notification has been read + */ + public Builder isRead(boolean isRead) { + this.isRead = isRead; + return this; + } + + /** + * Whether the notification has been seen + */ + public Builder isSeen(boolean isSeen) { + this.isSeen = isSeen; + return this; + } + + /** + * Whether the notification has been archived + */ + public Builder isArchived(boolean isArchived) { + this.isArchived = isArchived; + return this; + } + + /** + * Whether the notification is snoozed + */ + public Builder isSnoozed(boolean isSnoozed) { + this.isSnoozed = isSnoozed; + return this; + } + + /** + * ISO timestamp when the notification will be unsnoozed + */ + public Builder snoozedUntil(@Nullable String snoozedUntil) { + this.snoozedUntil = JsonNullable.of(snoozedUntil); + return this; + } + + /** + * Timestamps when the notification was delivered + */ + public Builder deliveredAt(@Nullable List deliveredAt) { + this.deliveredAt = deliveredAt; + return this; + } + + /** + * ISO timestamp when the notification was created + */ + public Builder createdAt(@Nonnull String createdAt) { + this.createdAt = Utils.checkNotNull(createdAt, "createdAt"); + return this; + } + + /** + * ISO timestamp when the notification was read + */ + public Builder readAt(@Nullable String readAt) { + this.readAt = JsonNullable.of(readAt); + return this; + } + + /** + * ISO timestamp when the notification was first seen + */ + public Builder firstSeenAt(@Nullable String firstSeenAt) { + this.firstSeenAt = JsonNullable.of(firstSeenAt); + return this; + } + + /** + * ISO timestamp when the notification was archived + */ + public Builder archivedAt(@Nullable String archivedAt) { + this.archivedAt = JsonNullable.of(archivedAt); + return this; + } + + /** + * Avatar URL for the notification + */ + public Builder avatar(@Nullable String avatar) { + this.avatar = avatar; + return this; + } + + /** + * Primary action button for the notification + */ + public Builder primaryAction(@Nullable InboxActionDto primaryAction) { + this.primaryAction = primaryAction; + return this; + } + + /** + * Secondary action button for the notification + */ + public Builder secondaryAction(@Nullable InboxActionDto secondaryAction) { + this.secondaryAction = secondaryAction; + return this; + } + + /** + * Channel type through which the message is sent + */ + public Builder channelType(@Nonnull ChannelTypeEnum channelType) { + this.channelType = Utils.checkNotNull(channelType, "channelType"); + return this; + } + + /** + * Tags associated with the notification + */ + public Builder tags(@Nullable List tags) { + this.tags = tags; + return this; + } + + /** + * Custom data payload of the notification + */ + public Builder data(@Nullable Map data) { + this.data = data; + return this; + } + + /** + * Redirect configuration for the notification + */ + public Builder redirect(@Nullable RedirectDto redirect) { + this.redirect = redirect; + return this; + } + + /** + * Workflow associated with the notification + */ + public Builder workflow(@Nullable NotificationWorkflowDto workflow) { + this.workflow = workflow; + return this; + } + + /** + * Severity of the workflow + */ + public Builder severity(@Nonnull SeverityLevelEnum severity) { + this.severity = Utils.checkNotNull(severity, "severity"); + return this; + } + + public InboxNotificationDto build() { + return new InboxNotificationDto( + id, transactionId, subject, + body, to, isRead, + isSeen, isArchived, isSnoozed, + snoozedUntil, deliveredAt, createdAt, + readAt, firstSeenAt, archivedAt, + avatar, primaryAction, secondaryAction, + channelType, tags, data, + redirect, workflow, severity); + } + + } +} diff --git a/src/main/java/co/novu/models/components/InboxSubscriberResponseDto.java b/src/main/java/co/novu/models/components/InboxSubscriberResponseDto.java new file mode 100644 index 00000000..cd697e29 --- /dev/null +++ b/src/main/java/co/novu/models/components/InboxSubscriberResponseDto.java @@ -0,0 +1,258 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class InboxSubscriberResponseDto { + /** + * Unique identifier of the subscriber + */ + @JsonProperty("id") + private String id; + + /** + * First name of the subscriber + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("firstName") + private String firstName; + + /** + * Last name of the subscriber + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastName") + private String lastName; + + /** + * Avatar URL of the subscriber + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("avatar") + private String avatar; + + /** + * External subscriber identifier + */ + @JsonProperty("subscriberId") + private String subscriberId; + + @JsonCreator + public InboxSubscriberResponseDto( + @JsonProperty("id") @Nonnull String id, + @JsonProperty("firstName") @Nullable String firstName, + @JsonProperty("lastName") @Nullable String lastName, + @JsonProperty("avatar") @Nullable String avatar, + @JsonProperty("subscriberId") @Nonnull String subscriberId) { + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.firstName = firstName; + this.lastName = lastName; + this.avatar = avatar; + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + } + + public InboxSubscriberResponseDto( + @Nonnull String id, + @Nonnull String subscriberId) { + this(id, null, null, + null, subscriberId); + } + + /** + * Unique identifier of the subscriber + */ + public String id() { + return this.id; + } + + /** + * First name of the subscriber + */ + public Optional firstName() { + return Optional.ofNullable(this.firstName); + } + + /** + * Last name of the subscriber + */ + public Optional lastName() { + return Optional.ofNullable(this.lastName); + } + + /** + * Avatar URL of the subscriber + */ + public Optional avatar() { + return Optional.ofNullable(this.avatar); + } + + /** + * External subscriber identifier + */ + public String subscriberId() { + return this.subscriberId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Unique identifier of the subscriber + */ + public InboxSubscriberResponseDto withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + /** + * First name of the subscriber + */ + public InboxSubscriberResponseDto withFirstName(@Nullable String firstName) { + this.firstName = firstName; + return this; + } + + + /** + * Last name of the subscriber + */ + public InboxSubscriberResponseDto withLastName(@Nullable String lastName) { + this.lastName = lastName; + return this; + } + + + /** + * Avatar URL of the subscriber + */ + public InboxSubscriberResponseDto withAvatar(@Nullable String avatar) { + this.avatar = avatar; + return this; + } + + + /** + * External subscriber identifier + */ + public InboxSubscriberResponseDto withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + InboxSubscriberResponseDto other = (InboxSubscriberResponseDto) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.firstName, other.firstName) && + Utils.enhancedDeepEquals(this.lastName, other.lastName) && + Utils.enhancedDeepEquals(this.avatar, other.avatar) && + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, firstName, lastName, + avatar, subscriberId); + } + + @Override + public String toString() { + return Utils.toString(InboxSubscriberResponseDto.class, + "id", id, + "firstName", firstName, + "lastName", lastName, + "avatar", avatar, + "subscriberId", subscriberId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String firstName; + + private String lastName; + + private String avatar; + + private String subscriberId; + + private Builder() { + // force use of static builder() method + } + + /** + * Unique identifier of the subscriber + */ + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + /** + * First name of the subscriber + */ + public Builder firstName(@Nullable String firstName) { + this.firstName = firstName; + return this; + } + + /** + * Last name of the subscriber + */ + public Builder lastName(@Nullable String lastName) { + this.lastName = lastName; + return this; + } + + /** + * Avatar URL of the subscriber + */ + public Builder avatar(@Nullable String avatar) { + this.avatar = avatar; + return this; + } + + /** + * External subscriber identifier + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + public InboxSubscriberResponseDto build() { + return new InboxSubscriberResponseDto( + id, firstName, lastName, + avatar, subscriberId); + } + + } +} diff --git a/src/main/java/co/novu/models/components/IntegrationResponseDto.java b/src/main/java/co/novu/models/components/IntegrationResponseDto.java index 19727270..355b6930 100644 --- a/src/main/java/co/novu/models/components/IntegrationResponseDto.java +++ b/src/main/java/co/novu/models/components/IntegrationResponseDto.java @@ -57,8 +57,7 @@ public class IntegrationResponseDto { private String providerId; /** - * The channel type for the integration, which defines how the integration communicates (e.g., email, - * SMS). + * The channel type for the integration, which defines how it communicates (e.g., email, SMS). */ @JsonProperty("channel") private IntegrationResponseDtoChannel channel; @@ -224,8 +223,7 @@ public String providerId() { } /** - * The channel type for the integration, which defines how the integration communicates (e.g., email, - * SMS). + * The channel type for the integration, which defines how it communicates (e.g., email, SMS). */ public IntegrationResponseDtoChannel channel() { return this.channel; @@ -354,8 +352,7 @@ public IntegrationResponseDto withProviderId(@Nonnull String providerId) { /** - * The channel type for the integration, which defines how the integration communicates (e.g., email, - * SMS). + * The channel type for the integration, which defines how it communicates (e.g., email, SMS). */ public IntegrationResponseDto withChannel(@Nonnull IntegrationResponseDtoChannel channel) { this.channel = Utils.checkNotNull(channel, "channel"); @@ -585,8 +582,7 @@ public Builder providerId(@Nonnull String providerId) { } /** - * The channel type for the integration, which defines how the integration communicates (e.g., email, - * SMS). + * The channel type for the integration, which defines how it communicates (e.g., email, SMS). */ public Builder channel(@Nonnull IntegrationResponseDtoChannel channel) { this.channel = Utils.checkNotNull(channel, "channel"); diff --git a/src/main/java/co/novu/models/components/IntegrationResponseDtoChannel.java b/src/main/java/co/novu/models/components/IntegrationResponseDtoChannel.java index a3714578..b61e2e8e 100644 --- a/src/main/java/co/novu/models/components/IntegrationResponseDtoChannel.java +++ b/src/main/java/co/novu/models/components/IntegrationResponseDtoChannel.java @@ -21,8 +21,7 @@ /** * IntegrationResponseDtoChannel * - *

The channel type for the integration, which defines how the integration communicates (e.g., email, - * SMS). + *

The channel type for the integration, which defines how it communicates (e.g., email, SMS). */ public class IntegrationResponseDtoChannel { diff --git a/src/main/java/co/novu/models/components/IssueType.java b/src/main/java/co/novu/models/components/IssueType.java deleted file mode 100644 index 87ecb4d7..00000000 --- a/src/main/java/co/novu/models/components/IssueType.java +++ /dev/null @@ -1,139 +0,0 @@ -/* - * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. - */ -package co.novu.models.components; - -import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonValue; -import java.lang.Override; -import java.lang.String; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.Objects; -import java.util.Optional; - -/** - * Wrapper for an "open" enum that can handle unknown values from API responses - * without runtime errors. Instances are immutable singletons with reference equality. - * Use {@code asEnum()} for switch expressions. - */ -public class IssueType { - - public static final IssueType MISSING_VALUE = new IssueType("MISSING_VALUE"); - public static final IssueType MAX_LENGTH_ACCESSED = new IssueType("MAX_LENGTH_ACCESSED"); - public static final IssueType WORKFLOW_ID_ALREADY_EXISTS = new IssueType("WORKFLOW_ID_ALREADY_EXISTS"); - public static final IssueType DUPLICATED_VALUE = new IssueType("DUPLICATED_VALUE"); - public static final IssueType LIMIT_REACHED = new IssueType("LIMIT_REACHED"); - - // This map will grow whenever a Color gets created with a new - // unrecognized value (a potential memory leak if the user is not - // careful). Keep this field lower case to avoid clashing with - // generated member names which will always be upper cased (Java - // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); - - private final String value; - - private IssueType(String value) { - this.value = value; - } - - /** - * Returns a IssueType with the given value. For a specific value the - * returned object will always be a singleton so reference equality - * is satisfied when the values are the same. - * - * @param value value to be wrapped as IssueType - */ - @JsonCreator - public static IssueType of(String value) { - synchronized (IssueType.class) { - return values.computeIfAbsent(value, v -> new IssueType(v)); - } - } - - @JsonValue - public String value() { - return value; - } - - public Optional asEnum() { - return Optional.ofNullable(enums.getOrDefault(value, null)); - } - - public boolean isKnown() { - return asEnum().isPresent(); - } - - @Override - public int hashCode() { - return Objects.hash(value); - } - - @Override - public boolean equals(java.lang.Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - IssueType other = (IssueType) obj; - return Objects.equals(value, other.value); - } - - @Override - public String toString() { - return "IssueType [value=" + value + "]"; - } - - // return an array just like an enum - public static IssueType[] values() { - synchronized (IssueType.class) { - return values.values().toArray(new IssueType[] {}); - } - } - - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("MISSING_VALUE", MISSING_VALUE); - map.put("MAX_LENGTH_ACCESSED", MAX_LENGTH_ACCESSED); - map.put("WORKFLOW_ID_ALREADY_EXISTS", WORKFLOW_ID_ALREADY_EXISTS); - map.put("DUPLICATED_VALUE", DUPLICATED_VALUE); - map.put("LIMIT_REACHED", LIMIT_REACHED); - return map; - } - - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("MISSING_VALUE", IssueTypeEnum.MISSING_VALUE); - map.put("MAX_LENGTH_ACCESSED", IssueTypeEnum.MAX_LENGTH_ACCESSED); - map.put("WORKFLOW_ID_ALREADY_EXISTS", IssueTypeEnum.WORKFLOW_ID_ALREADY_EXISTS); - map.put("DUPLICATED_VALUE", IssueTypeEnum.DUPLICATED_VALUE); - map.put("LIMIT_REACHED", IssueTypeEnum.LIMIT_REACHED); - return map; - } - - - public enum IssueTypeEnum { - - MISSING_VALUE("MISSING_VALUE"), - MAX_LENGTH_ACCESSED("MAX_LENGTH_ACCESSED"), - WORKFLOW_ID_ALREADY_EXISTS("WORKFLOW_ID_ALREADY_EXISTS"), - DUPLICATED_VALUE("DUPLICATED_VALUE"), - LIMIT_REACHED("LIMIT_REACHED"),; - - private final String value; - - private IssueTypeEnum(String value) { - this.value = value; - } - - public String value() { - return value; - } - } -} - diff --git a/src/main/java/co/novu/models/components/LookBackWindow.java b/src/main/java/co/novu/models/components/LookBackWindow.java new file mode 100644 index 00000000..151e1478 --- /dev/null +++ b/src/main/java/co/novu/models/components/LookBackWindow.java @@ -0,0 +1,61 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.lang.Override; +import java.lang.String; + +/** + * LookBackWindow + * + *

Look back window configuration + */ +public class LookBackWindow { + @JsonCreator + public LookBackWindow() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(LookBackWindow.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public LookBackWindow build() { + return new LookBackWindow( + ); + } + + } +} diff --git a/src/main/java/co/novu/models/components/MarkSubscriberNotificationsAsSeenDto.java b/src/main/java/co/novu/models/components/MarkSubscriberNotificationsAsSeenDto.java new file mode 100644 index 00000000..73ae9df7 --- /dev/null +++ b/src/main/java/co/novu/models/components/MarkSubscriberNotificationsAsSeenDto.java @@ -0,0 +1,223 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class MarkSubscriberNotificationsAsSeenDto { + /** + * Specific notification IDs to mark as seen + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("notificationIds") + private List notificationIds; + + /** + * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tags") + private MarkSubscriberNotificationsAsSeenDtoTags tags; + + /** + * Filter notifications by data attributes (JSON string) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("data") + private String data; + + /** + * Context keys for filtering notifications + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contextKeys") + private List contextKeys; + + @JsonCreator + public MarkSubscriberNotificationsAsSeenDto( + @JsonProperty("notificationIds") @Nullable List notificationIds, + @JsonProperty("tags") @Nullable MarkSubscriberNotificationsAsSeenDtoTags tags, + @JsonProperty("data") @Nullable String data, + @JsonProperty("contextKeys") @Nullable List contextKeys) { + this.notificationIds = notificationIds; + this.tags = tags; + this.data = data; + this.contextKeys = contextKeys; + } + + public MarkSubscriberNotificationsAsSeenDto() { + this(null, null, null, + null); + } + + /** + * Specific notification IDs to mark as seen + */ + public Optional> notificationIds() { + return Optional.ofNullable(this.notificationIds); + } + + /** + * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ + public Optional tags() { + return Optional.ofNullable(this.tags); + } + + /** + * Filter notifications by data attributes (JSON string) + */ + public Optional data() { + return Optional.ofNullable(this.data); + } + + /** + * Context keys for filtering notifications + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Specific notification IDs to mark as seen + */ + public MarkSubscriberNotificationsAsSeenDto withNotificationIds(@Nullable List notificationIds) { + this.notificationIds = notificationIds; + return this; + } + + + /** + * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ + public MarkSubscriberNotificationsAsSeenDto withTags(@Nullable MarkSubscriberNotificationsAsSeenDtoTags tags) { + this.tags = tags; + return this; + } + + + /** + * Filter notifications by data attributes (JSON string) + */ + public MarkSubscriberNotificationsAsSeenDto withData(@Nullable String data) { + this.data = data; + return this; + } + + + /** + * Context keys for filtering notifications + */ + public MarkSubscriberNotificationsAsSeenDto withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + MarkSubscriberNotificationsAsSeenDto other = (MarkSubscriberNotificationsAsSeenDto) o; + return + Utils.enhancedDeepEquals(this.notificationIds, other.notificationIds) && + Utils.enhancedDeepEquals(this.tags, other.tags) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + notificationIds, tags, data, + contextKeys); + } + + @Override + public String toString() { + return Utils.toString(MarkSubscriberNotificationsAsSeenDto.class, + "notificationIds", notificationIds, + "tags", tags, + "data", data, + "contextKeys", contextKeys); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List notificationIds; + + private MarkSubscriberNotificationsAsSeenDtoTags tags; + + private String data; + + private List contextKeys; + + private Builder() { + // force use of static builder() method + } + + /** + * Specific notification IDs to mark as seen + */ + public Builder notificationIds(@Nullable List notificationIds) { + this.notificationIds = notificationIds; + return this; + } + + /** + * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ + public Builder tags(@Nullable MarkSubscriberNotificationsAsSeenDtoTags tags) { + this.tags = tags; + return this; + } + + /** + * Filter notifications by data attributes (JSON string) + */ + public Builder data(@Nullable String data) { + this.data = data; + return this; + } + + /** + * Context keys for filtering notifications + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + public MarkSubscriberNotificationsAsSeenDto build() { + return new MarkSubscriberNotificationsAsSeenDto( + notificationIds, tags, data, + contextKeys); + } + + } +} diff --git a/src/main/java/co/novu/models/components/MarkSubscriberNotificationsAsSeenDtoTags.java b/src/main/java/co/novu/models/components/MarkSubscriberNotificationsAsSeenDtoTags.java new file mode 100644 index 00000000..aa0b6c00 --- /dev/null +++ b/src/main/java/co/novu/models/components/MarkSubscriberNotificationsAsSeenDtoTags.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.lang.Override; +import java.lang.String; + +/** + * MarkSubscriberNotificationsAsSeenDtoTags + * + *

Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ +public class MarkSubscriberNotificationsAsSeenDtoTags { + @JsonCreator + public MarkSubscriberNotificationsAsSeenDtoTags() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(MarkSubscriberNotificationsAsSeenDtoTags.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public MarkSubscriberNotificationsAsSeenDtoTags build() { + return new MarkSubscriberNotificationsAsSeenDtoTags( + ); + } + + } +} diff --git a/src/main/java/co/novu/models/components/NotificationWorkflowDto.java b/src/main/java/co/novu/models/components/NotificationWorkflowDto.java new file mode 100644 index 00000000..7c087919 --- /dev/null +++ b/src/main/java/co/novu/models/components/NotificationWorkflowDto.java @@ -0,0 +1,340 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class NotificationWorkflowDto { + /** + * Unique identifier of the workflow + */ + @JsonProperty("id") + private String id; + + /** + * Workflow identifier used for triggering + */ + @JsonProperty("identifier") + private String identifier; + + /** + * Human-readable name of the workflow + */ + @JsonProperty("name") + private String name; + + /** + * Whether this workflow is marked as critical + */ + @JsonProperty("critical") + private boolean critical; + + /** + * Tags associated with the workflow + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tags") + private List tags; + + /** + * Custom data associated with the workflow + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("data") + private Map data; + + /** + * Severity of the workflow + */ + @JsonProperty("severity") + private SeverityLevelEnum severity; + + @JsonCreator + public NotificationWorkflowDto( + @JsonProperty("id") @Nonnull String id, + @JsonProperty("identifier") @Nonnull String identifier, + @JsonProperty("name") @Nonnull String name, + @JsonProperty("critical") boolean critical, + @JsonProperty("tags") @Nullable List tags, + @JsonProperty("data") @Nullable Map data, + @JsonProperty("severity") @Nonnull SeverityLevelEnum severity) { + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.identifier = Optional.ofNullable(identifier) + .orElseThrow(() -> new IllegalArgumentException("identifier cannot be null")); + this.name = Optional.ofNullable(name) + .orElseThrow(() -> new IllegalArgumentException("name cannot be null")); + this.critical = critical; + this.tags = tags; + this.data = data; + this.severity = Optional.ofNullable(severity) + .orElseThrow(() -> new IllegalArgumentException("severity cannot be null")); + } + + public NotificationWorkflowDto( + @Nonnull String id, + @Nonnull String identifier, + @Nonnull String name, + boolean critical, + @Nonnull SeverityLevelEnum severity) { + this(id, identifier, name, + critical, null, null, + severity); + } + + /** + * Unique identifier of the workflow + */ + public String id() { + return this.id; + } + + /** + * Workflow identifier used for triggering + */ + public String identifier() { + return this.identifier; + } + + /** + * Human-readable name of the workflow + */ + public String name() { + return this.name; + } + + /** + * Whether this workflow is marked as critical + */ + public boolean critical() { + return this.critical; + } + + /** + * Tags associated with the workflow + */ + public Optional> tags() { + return Optional.ofNullable(this.tags); + } + + /** + * Custom data associated with the workflow + */ + public Optional> data() { + return Optional.ofNullable(this.data); + } + + /** + * Severity of the workflow + */ + public SeverityLevelEnum severity() { + return this.severity; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Unique identifier of the workflow + */ + public NotificationWorkflowDto withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + /** + * Workflow identifier used for triggering + */ + public NotificationWorkflowDto withIdentifier(@Nonnull String identifier) { + this.identifier = Utils.checkNotNull(identifier, "identifier"); + return this; + } + + + /** + * Human-readable name of the workflow + */ + public NotificationWorkflowDto withName(@Nonnull String name) { + this.name = Utils.checkNotNull(name, "name"); + return this; + } + + + /** + * Whether this workflow is marked as critical + */ + public NotificationWorkflowDto withCritical(boolean critical) { + this.critical = critical; + return this; + } + + + /** + * Tags associated with the workflow + */ + public NotificationWorkflowDto withTags(@Nullable List tags) { + this.tags = tags; + return this; + } + + + /** + * Custom data associated with the workflow + */ + public NotificationWorkflowDto withData(@Nullable Map data) { + this.data = data; + return this; + } + + + /** + * Severity of the workflow + */ + public NotificationWorkflowDto withSeverity(@Nonnull SeverityLevelEnum severity) { + this.severity = Utils.checkNotNull(severity, "severity"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + NotificationWorkflowDto other = (NotificationWorkflowDto) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.identifier, other.identifier) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.critical, other.critical) && + Utils.enhancedDeepEquals(this.tags, other.tags) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.severity, other.severity); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, identifier, name, + critical, tags, data, + severity); + } + + @Override + public String toString() { + return Utils.toString(NotificationWorkflowDto.class, + "id", id, + "identifier", identifier, + "name", name, + "critical", critical, + "tags", tags, + "data", data, + "severity", severity); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String identifier; + + private String name; + + private boolean critical; + + private List tags; + + private Map data; + + private SeverityLevelEnum severity; + + private Builder() { + // force use of static builder() method + } + + /** + * Unique identifier of the workflow + */ + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + /** + * Workflow identifier used for triggering + */ + public Builder identifier(@Nonnull String identifier) { + this.identifier = Utils.checkNotNull(identifier, "identifier"); + return this; + } + + /** + * Human-readable name of the workflow + */ + public Builder name(@Nonnull String name) { + this.name = Utils.checkNotNull(name, "name"); + return this; + } + + /** + * Whether this workflow is marked as critical + */ + public Builder critical(boolean critical) { + this.critical = critical; + return this; + } + + /** + * Tags associated with the workflow + */ + public Builder tags(@Nullable List tags) { + this.tags = tags; + return this; + } + + /** + * Custom data associated with the workflow + */ + public Builder data(@Nullable Map data) { + this.data = data; + return this; + } + + /** + * Severity of the workflow + */ + public Builder severity(@Nonnull SeverityLevelEnum severity) { + this.severity = Utils.checkNotNull(severity, "severity"); + return this; + } + + public NotificationWorkflowDto build() { + return new NotificationWorkflowDto( + id, identifier, name, + critical, tags, data, + severity); + } + + } +} diff --git a/src/main/java/co/novu/models/components/PreviewErrorDto.java b/src/main/java/co/novu/models/components/PreviewErrorDto.java new file mode 100644 index 00000000..be46c41e --- /dev/null +++ b/src/main/java/co/novu/models/components/PreviewErrorDto.java @@ -0,0 +1,172 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class PreviewErrorDto { + /** + * Short error title + */ + @JsonProperty("title") + private String title; + + /** + * Detailed error message + */ + @JsonProperty("message") + private String message; + + /** + * Actionable hint for the user + */ + @JsonProperty("hint") + private String hint; + + @JsonCreator + public PreviewErrorDto( + @JsonProperty("title") @Nonnull String title, + @JsonProperty("message") @Nonnull String message, + @JsonProperty("hint") @Nonnull String hint) { + this.title = Optional.ofNullable(title) + .orElseThrow(() -> new IllegalArgumentException("title cannot be null")); + this.message = Optional.ofNullable(message) + .orElseThrow(() -> new IllegalArgumentException("message cannot be null")); + this.hint = Optional.ofNullable(hint) + .orElseThrow(() -> new IllegalArgumentException("hint cannot be null")); + } + + /** + * Short error title + */ + public String title() { + return this.title; + } + + /** + * Detailed error message + */ + public String message() { + return this.message; + } + + /** + * Actionable hint for the user + */ + public String hint() { + return this.hint; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Short error title + */ + public PreviewErrorDto withTitle(@Nonnull String title) { + this.title = Utils.checkNotNull(title, "title"); + return this; + } + + + /** + * Detailed error message + */ + public PreviewErrorDto withMessage(@Nonnull String message) { + this.message = Utils.checkNotNull(message, "message"); + return this; + } + + + /** + * Actionable hint for the user + */ + public PreviewErrorDto withHint(@Nonnull String hint) { + this.hint = Utils.checkNotNull(hint, "hint"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewErrorDto other = (PreviewErrorDto) o; + return + Utils.enhancedDeepEquals(this.title, other.title) && + Utils.enhancedDeepEquals(this.message, other.message) && + Utils.enhancedDeepEquals(this.hint, other.hint); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + title, message, hint); + } + + @Override + public String toString() { + return Utils.toString(PreviewErrorDto.class, + "title", title, + "message", message, + "hint", hint); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String title; + + private String message; + + private String hint; + + private Builder() { + // force use of static builder() method + } + + /** + * Short error title + */ + public Builder title(@Nonnull String title) { + this.title = Utils.checkNotNull(title, "title"); + return this; + } + + /** + * Detailed error message + */ + public Builder message(@Nonnull String message) { + this.message = Utils.checkNotNull(message, "message"); + return this; + } + + /** + * Actionable hint for the user + */ + public Builder hint(@Nonnull String hint) { + this.hint = Utils.checkNotNull(hint, "hint"); + return this; + } + + public PreviewErrorDto build() { + return new PreviewErrorDto( + title, message, hint); + } + + } +} diff --git a/src/main/java/co/novu/models/components/PreviewPayloadDto.java b/src/main/java/co/novu/models/components/PreviewPayloadDto.java new file mode 100644 index 00000000..202e4ac1 --- /dev/null +++ b/src/main/java/co/novu/models/components/PreviewPayloadDto.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; +import java.util.Optional; + + +public class PreviewPayloadDto { + /** + * Partial subscriber information + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("subscriber") + private SubscriberResponseDtoOptional subscriber; + + /** + * Payload data + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("payload") + private Map payload; + + /** + * Steps data + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("steps") + private Map steps; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("context") + private Map context; + + /** + * Environment variables data + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("env") + private Map env; + + @JsonCreator + public PreviewPayloadDto( + @JsonProperty("subscriber") @Nullable SubscriberResponseDtoOptional subscriber, + @JsonProperty("payload") @Nullable Map payload, + @JsonProperty("steps") @Nullable Map steps, + @JsonProperty("context") @Nullable Map context, + @JsonProperty("env") @Nullable Map env) { + this.subscriber = subscriber; + this.payload = payload; + this.steps = steps; + this.context = context; + this.env = env; + } + + public PreviewPayloadDto() { + this(null, null, null, + null, null); + } + + /** + * Partial subscriber information + */ + public Optional subscriber() { + return Optional.ofNullable(this.subscriber); + } + + /** + * Payload data + */ + public Optional> payload() { + return Optional.ofNullable(this.payload); + } + + /** + * Steps data + */ + public Optional> steps() { + return Optional.ofNullable(this.steps); + } + + public Optional> context() { + return Optional.ofNullable(this.context); + } + + /** + * Environment variables data + */ + public Optional> env() { + return Optional.ofNullable(this.env); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Partial subscriber information + */ + public PreviewPayloadDto withSubscriber(@Nullable SubscriberResponseDtoOptional subscriber) { + this.subscriber = subscriber; + return this; + } + + + /** + * Payload data + */ + public PreviewPayloadDto withPayload(@Nullable Map payload) { + this.payload = payload; + return this; + } + + + /** + * Steps data + */ + public PreviewPayloadDto withSteps(@Nullable Map steps) { + this.steps = steps; + return this; + } + + + public PreviewPayloadDto withContext(@Nullable Map context) { + this.context = context; + return this; + } + + + /** + * Environment variables data + */ + public PreviewPayloadDto withEnv(@Nullable Map env) { + this.env = env; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewPayloadDto other = (PreviewPayloadDto) o; + return + Utils.enhancedDeepEquals(this.subscriber, other.subscriber) && + Utils.enhancedDeepEquals(this.payload, other.payload) && + Utils.enhancedDeepEquals(this.steps, other.steps) && + Utils.enhancedDeepEquals(this.context, other.context) && + Utils.enhancedDeepEquals(this.env, other.env); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriber, payload, steps, + context, env); + } + + @Override + public String toString() { + return Utils.toString(PreviewPayloadDto.class, + "subscriber", subscriber, + "payload", payload, + "steps", steps, + "context", context, + "env", env); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private SubscriberResponseDtoOptional subscriber; + + private Map payload; + + private Map steps; + + private Map context; + + private Map env; + + private Builder() { + // force use of static builder() method + } + + /** + * Partial subscriber information + */ + public Builder subscriber(@Nullable SubscriberResponseDtoOptional subscriber) { + this.subscriber = subscriber; + return this; + } + + /** + * Payload data + */ + public Builder payload(@Nullable Map payload) { + this.payload = payload; + return this; + } + + /** + * Steps data + */ + public Builder steps(@Nullable Map steps) { + this.steps = steps; + return this; + } + + public Builder context(@Nullable Map context) { + this.context = context; + return this; + } + + /** + * Environment variables data + */ + public Builder env(@Nullable Map env) { + this.env = env; + return this; + } + + public PreviewPayloadDto build() { + return new PreviewPayloadDto( + subscriber, payload, steps, + context, env); + } + + } +} diff --git a/src/main/java/co/novu/models/components/PreviewPayloadDtoContext.java b/src/main/java/co/novu/models/components/PreviewPayloadDtoContext.java new file mode 100644 index 00000000..1c6b2eb4 --- /dev/null +++ b/src/main/java/co/novu/models/components/PreviewPayloadDtoContext.java @@ -0,0 +1,138 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Object; +import java.lang.Override; +import java.lang.String; +import java.util.Map; +import java.util.Optional; + +/** + * PreviewPayloadDtoContext + * + *

Rich context object with id and optional data + */ +public class PreviewPayloadDtoContext { + + @JsonProperty("id") + private String id; + + /** + * Optional additional context data + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("data") + private Map data; + + @JsonCreator + public PreviewPayloadDtoContext( + @JsonProperty("id") @Nonnull String id, + @JsonProperty("data") @Nullable Map data) { + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.data = data; + } + + public PreviewPayloadDtoContext( + @Nonnull String id) { + this(id, null); + } + + public String id() { + return this.id; + } + + /** + * Optional additional context data + */ + public Optional> data() { + return Optional.ofNullable(this.data); + } + + public static Builder builder() { + return new Builder(); + } + + + public PreviewPayloadDtoContext withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + /** + * Optional additional context data + */ + public PreviewPayloadDtoContext withData(@Nullable Map data) { + this.data = data; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewPayloadDtoContext other = (PreviewPayloadDtoContext) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.data, other.data); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, data); + } + + @Override + public String toString() { + return Utils.toString(PreviewPayloadDtoContext.class, + "id", id, + "data", data); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private Map data; + + private Builder() { + // force use of static builder() method + } + + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + /** + * Optional additional context data + */ + public Builder data(@Nullable Map data) { + this.data = data; + return this; + } + + public PreviewPayloadDtoContext build() { + return new PreviewPayloadDtoContext( + id, data); + } + + } +} diff --git a/src/main/java/co/novu/models/components/PreviewPayloadDtoContextUnion.java b/src/main/java/co/novu/models/components/PreviewPayloadDtoContextUnion.java new file mode 100644 index 00000000..c2cbf779 --- /dev/null +++ b/src/main/java/co/novu/models/components/PreviewPayloadDtoContextUnion.java @@ -0,0 +1,112 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.OneOfDeserializer; +import co.novu.utils.TypedObject; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils.TypeReferenceWithShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.lang.Override; +import java.lang.String; +import java.lang.SuppressWarnings; +import java.util.Optional; + +@JsonDeserialize(using = PreviewPayloadDtoContextUnion._Deserializer.class) +public class PreviewPayloadDtoContextUnion { + + @JsonValue + private final TypedObject value; + + private PreviewPayloadDtoContextUnion(TypedObject value) { + this.value = value; + } + + public static PreviewPayloadDtoContextUnion of(String value) { + Utils.checkNotNull(value, "value"); + return new PreviewPayloadDtoContextUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + public static PreviewPayloadDtoContextUnion of(PreviewPayloadDtoContext value) { + Utils.checkNotNull(value, "value"); + return new PreviewPayloadDtoContextUnion(TypedObject.of(value, JsonShape.DEFAULT, new TypeReference<>(){})); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code String}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code String} value, or empty if not of this type + */ + public Optional string() { + if (value.value() instanceof String) { + return Optional.of((String) value.value()); + } + return Optional.empty(); + } + + /** + * Returns an {@link Optional} containing the value if it is of type {@code PreviewPayloadDtoContext}, + * otherwise returns an empty {@link Optional}. + * + * @return an {@link Optional} containing the {@code PreviewPayloadDtoContext} value, or empty if not of this type + */ + public Optional previewPayloadDtoContext() { + if (value.value() instanceof PreviewPayloadDtoContext) { + return Optional.of((PreviewPayloadDtoContext) value.value()); + } + return Optional.empty(); + } + /** + * Returns an {@link Optional} containing the value as a {@code JsonNode}. + * This accessor returns the raw JSON when the value doesn't match any of the defined union types. + * + * @return an {@link Optional} containing the {@code JsonNode} value, or empty if value matched a known type + */ + public Optional asJson() { + if (value.value() instanceof JsonNode) { + return Optional.of((JsonNode) value.value()); + } + return Optional.empty(); + } + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewPayloadDtoContextUnion other = (PreviewPayloadDtoContextUnion) o; + return Utils.enhancedDeepEquals(this.value.value(), other.value.value()); + } + + @Override + public int hashCode() { + return Utils.enhancedHash(value.value()); + } + + @SuppressWarnings("serial") + public static final class _Deserializer extends OneOfDeserializer { + + public _Deserializer() { + super(PreviewPayloadDtoContextUnion.class, false, + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT), + TypeReferenceWithShape.of(new TypeReference() {}, JsonShape.DEFAULT)); + } + } + + @Override + public String toString() { + return Utils.toString(PreviewPayloadDtoContextUnion.class, + "value", value); + } + +} + diff --git a/src/main/java/co/novu/models/components/ProvidersIdEnum.java b/src/main/java/co/novu/models/components/ProvidersIdEnum.java index 81b481bd..6de8a6c7 100644 --- a/src/main/java/co/novu/models/components/ProvidersIdEnum.java +++ b/src/main/java/co/novu/models/components/ProvidersIdEnum.java @@ -82,6 +82,7 @@ public class ProvidersIdEnum { public static final ProvidersIdEnum IMEDIA = new ProvidersIdEnum("imedia"); public static final ProvidersIdEnum SINCH = new ProvidersIdEnum("sinch"); public static final ProvidersIdEnum ISENDPRO_SMS = new ProvidersIdEnum("isendpro-sms"); + public static final ProvidersIdEnum CM_TELECOM = new ProvidersIdEnum("cm-telecom"); public static final ProvidersIdEnum FCM = new ProvidersIdEnum("fcm"); public static final ProvidersIdEnum APNS = new ProvidersIdEnum("apns"); public static final ProvidersIdEnum EXPO = new ProvidersIdEnum("expo"); @@ -233,6 +234,7 @@ private static final Map createValuesMap() { map.put("imedia", IMEDIA); map.put("sinch", SINCH); map.put("isendpro-sms", ISENDPRO_SMS); + map.put("cm-telecom", CM_TELECOM); map.put("fcm", FCM); map.put("apns", APNS); map.put("expo", EXPO); @@ -316,6 +318,7 @@ private static final Map createEnumsMap() { map.put("imedia", ProvidersIdEnumEnum.IMEDIA); map.put("sinch", ProvidersIdEnumEnum.SINCH); map.put("isendpro-sms", ProvidersIdEnumEnum.ISENDPRO_SMS); + map.put("cm-telecom", ProvidersIdEnumEnum.CM_TELECOM); map.put("fcm", ProvidersIdEnumEnum.FCM); map.put("apns", ProvidersIdEnumEnum.APNS); map.put("expo", ProvidersIdEnumEnum.EXPO); @@ -400,6 +403,7 @@ public enum ProvidersIdEnumEnum { IMEDIA("imedia"), SINCH("sinch"), ISENDPRO_SMS("isendpro-sms"), + CM_TELECOM("cm-telecom"), FCM("fcm"), APNS("apns"), EXPO("expo"), diff --git a/src/main/java/co/novu/models/components/PublishEnvironmentRequestDto.java b/src/main/java/co/novu/models/components/PublishEnvironmentRequestDto.java new file mode 100644 index 00000000..3c26d510 --- /dev/null +++ b/src/main/java/co/novu/models/components/PublishEnvironmentRequestDto.java @@ -0,0 +1,189 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.LazySingletonValue; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nullable; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class PublishEnvironmentRequestDto { + /** + * Source environment ID to sync from. Defaults to the Development environment if not provided. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sourceEnvironmentId") + private String sourceEnvironmentId; + + /** + * Perform a dry run without making actual changes + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("dryRun") + private Boolean dryRun; + + /** + * Array of specific resources to publish. If not provided, all resources will be published. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("resources") + private List resources; + + @JsonCreator + public PublishEnvironmentRequestDto( + @JsonProperty("sourceEnvironmentId") @Nullable String sourceEnvironmentId, + @JsonProperty("dryRun") @Nullable Boolean dryRun, + @JsonProperty("resources") @Nullable List resources) { + this.sourceEnvironmentId = sourceEnvironmentId; + this.dryRun = Optional.ofNullable(dryRun) + .orElse(Builder._SINGLETON_VALUE_DryRun.value()); + this.resources = resources; + } + + public PublishEnvironmentRequestDto() { + this(null, null, null); + } + + /** + * Source environment ID to sync from. Defaults to the Development environment if not provided. + */ + public Optional sourceEnvironmentId() { + return Optional.ofNullable(this.sourceEnvironmentId); + } + + /** + * Perform a dry run without making actual changes + */ + public Optional dryRun() { + return Optional.ofNullable(this.dryRun); + } + + /** + * Array of specific resources to publish. If not provided, all resources will be published. + */ + public Optional> resources() { + return Optional.ofNullable(this.resources); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Source environment ID to sync from. Defaults to the Development environment if not provided. + */ + public PublishEnvironmentRequestDto withSourceEnvironmentId(@Nullable String sourceEnvironmentId) { + this.sourceEnvironmentId = sourceEnvironmentId; + return this; + } + + + /** + * Perform a dry run without making actual changes + */ + public PublishEnvironmentRequestDto withDryRun(@Nullable Boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + + /** + * Array of specific resources to publish. If not provided, all resources will be published. + */ + public PublishEnvironmentRequestDto withResources(@Nullable List resources) { + this.resources = resources; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublishEnvironmentRequestDto other = (PublishEnvironmentRequestDto) o; + return + Utils.enhancedDeepEquals(this.sourceEnvironmentId, other.sourceEnvironmentId) && + Utils.enhancedDeepEquals(this.dryRun, other.dryRun) && + Utils.enhancedDeepEquals(this.resources, other.resources); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + sourceEnvironmentId, dryRun, resources); + } + + @Override + public String toString() { + return Utils.toString(PublishEnvironmentRequestDto.class, + "sourceEnvironmentId", sourceEnvironmentId, + "dryRun", dryRun, + "resources", resources); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String sourceEnvironmentId; + + private Boolean dryRun; + + private List resources; + + private Builder() { + // force use of static builder() method + } + + /** + * Source environment ID to sync from. Defaults to the Development environment if not provided. + */ + public Builder sourceEnvironmentId(@Nullable String sourceEnvironmentId) { + this.sourceEnvironmentId = sourceEnvironmentId; + return this; + } + + /** + * Perform a dry run without making actual changes + */ + public Builder dryRun(@Nullable Boolean dryRun) { + this.dryRun = dryRun; + return this; + } + + /** + * Array of specific resources to publish. If not provided, all resources will be published. + */ + public Builder resources(@Nullable List resources) { + this.resources = resources; + return this; + } + + public PublishEnvironmentRequestDto build() { + return new PublishEnvironmentRequestDto( + sourceEnvironmentId, dryRun, resources); + } + + + private static final LazySingletonValue _SINGLETON_VALUE_DryRun = + new LazySingletonValue<>( + "dryRun", + "false", + new TypeReference() {}); + } +} diff --git a/src/main/java/co/novu/models/components/PublishEnvironmentResponseDto.java b/src/main/java/co/novu/models/components/PublishEnvironmentResponseDto.java new file mode 100644 index 00000000..a048fd3a --- /dev/null +++ b/src/main/java/co/novu/models/components/PublishEnvironmentResponseDto.java @@ -0,0 +1,136 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class PublishEnvironmentResponseDto { + /** + * Sync results by resource type + */ + @JsonProperty("results") + private List results; + + /** + * Summary of the sync operation + */ + @JsonProperty("summary") + private PublishSummaryDto summary; + + @JsonCreator + public PublishEnvironmentResponseDto( + @JsonProperty("results") @Nonnull List results, + @JsonProperty("summary") @Nonnull PublishSummaryDto summary) { + this.results = Optional.ofNullable(results) + .orElseThrow(() -> new IllegalArgumentException("results cannot be null")); + this.summary = Optional.ofNullable(summary) + .orElseThrow(() -> new IllegalArgumentException("summary cannot be null")); + } + + /** + * Sync results by resource type + */ + public List results() { + return this.results; + } + + /** + * Summary of the sync operation + */ + public PublishSummaryDto summary() { + return this.summary; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Sync results by resource type + */ + public PublishEnvironmentResponseDto withResults(@Nonnull List results) { + this.results = Utils.checkNotNull(results, "results"); + return this; + } + + + /** + * Summary of the sync operation + */ + public PublishEnvironmentResponseDto withSummary(@Nonnull PublishSummaryDto summary) { + this.summary = Utils.checkNotNull(summary, "summary"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublishEnvironmentResponseDto other = (PublishEnvironmentResponseDto) o; + return + Utils.enhancedDeepEquals(this.results, other.results) && + Utils.enhancedDeepEquals(this.summary, other.summary); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + results, summary); + } + + @Override + public String toString() { + return Utils.toString(PublishEnvironmentResponseDto.class, + "results", results, + "summary", summary); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private List results; + + private PublishSummaryDto summary; + + private Builder() { + // force use of static builder() method + } + + /** + * Sync results by resource type + */ + public Builder results(@Nonnull List results) { + this.results = Utils.checkNotNull(results, "results"); + return this; + } + + /** + * Summary of the sync operation + */ + public Builder summary(@Nonnull PublishSummaryDto summary) { + this.summary = Utils.checkNotNull(summary, "summary"); + return this; + } + + public PublishEnvironmentResponseDto build() { + return new PublishEnvironmentResponseDto( + results, summary); + } + + } +} diff --git a/src/main/java/co/novu/models/components/PublishSummaryDto.java b/src/main/java/co/novu/models/components/PublishSummaryDto.java new file mode 100644 index 00000000..e4067f38 --- /dev/null +++ b/src/main/java/co/novu/models/components/PublishSummaryDto.java @@ -0,0 +1,205 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.lang.Override; +import java.lang.String; + + +public class PublishSummaryDto { + /** + * Number of resources processed + */ + @JsonProperty("resources") + private double resources; + + /** + * Number of successful syncs + */ + @JsonProperty("successful") + private double successful; + + /** + * Number of failed syncs + */ + @JsonProperty("failed") + private double failed; + + /** + * Number of skipped resources + */ + @JsonProperty("skipped") + private double skipped; + + @JsonCreator + public PublishSummaryDto( + @JsonProperty("resources") double resources, + @JsonProperty("successful") double successful, + @JsonProperty("failed") double failed, + @JsonProperty("skipped") double skipped) { + this.resources = resources; + this.successful = successful; + this.failed = failed; + this.skipped = skipped; + } + + /** + * Number of resources processed + */ + public double resources() { + return this.resources; + } + + /** + * Number of successful syncs + */ + public double successful() { + return this.successful; + } + + /** + * Number of failed syncs + */ + public double failed() { + return this.failed; + } + + /** + * Number of skipped resources + */ + public double skipped() { + return this.skipped; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Number of resources processed + */ + public PublishSummaryDto withResources(double resources) { + this.resources = resources; + return this; + } + + + /** + * Number of successful syncs + */ + public PublishSummaryDto withSuccessful(double successful) { + this.successful = successful; + return this; + } + + + /** + * Number of failed syncs + */ + public PublishSummaryDto withFailed(double failed) { + this.failed = failed; + return this; + } + + + /** + * Number of skipped resources + */ + public PublishSummaryDto withSkipped(double skipped) { + this.skipped = skipped; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PublishSummaryDto other = (PublishSummaryDto) o; + return + Utils.enhancedDeepEquals(this.resources, other.resources) && + Utils.enhancedDeepEquals(this.successful, other.successful) && + Utils.enhancedDeepEquals(this.failed, other.failed) && + Utils.enhancedDeepEquals(this.skipped, other.skipped); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + resources, successful, failed, + skipped); + } + + @Override + public String toString() { + return Utils.toString(PublishSummaryDto.class, + "resources", resources, + "successful", successful, + "failed", failed, + "skipped", skipped); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private double resources; + + private double successful; + + private double failed; + + private double skipped; + + private Builder() { + // force use of static builder() method + } + + /** + * Number of resources processed + */ + public Builder resources(double resources) { + this.resources = resources; + return this; + } + + /** + * Number of successful syncs + */ + public Builder successful(double successful) { + this.successful = successful; + return this; + } + + /** + * Number of failed syncs + */ + public Builder failed(double failed) { + this.failed = failed; + return this; + } + + /** + * Number of skipped resources + */ + public Builder skipped(double skipped) { + this.skipped = skipped; + return this; + } + + public PublishSummaryDto build() { + return new PublishSummaryDto( + resources, successful, failed, + skipped); + } + + } +} diff --git a/src/main/java/co/novu/models/components/PushRenderOutput.java b/src/main/java/co/novu/models/components/PushRenderOutput.java new file mode 100644 index 00000000..17aad2bf --- /dev/null +++ b/src/main/java/co/novu/models/components/PushRenderOutput.java @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class PushRenderOutput { + /** + * Subject of the push notification + */ + @JsonProperty("subject") + private String subject; + + /** + * Body of the push notification + */ + @JsonProperty("body") + private String body; + + @JsonCreator + public PushRenderOutput( + @JsonProperty("subject") @Nonnull String subject, + @JsonProperty("body") @Nonnull String body) { + this.subject = Optional.ofNullable(subject) + .orElseThrow(() -> new IllegalArgumentException("subject cannot be null")); + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + /** + * Subject of the push notification + */ + public String subject() { + return this.subject; + } + + /** + * Body of the push notification + */ + public String body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Subject of the push notification + */ + public PushRenderOutput withSubject(@Nonnull String subject) { + this.subject = Utils.checkNotNull(subject, "subject"); + return this; + } + + + /** + * Body of the push notification + */ + public PushRenderOutput withBody(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PushRenderOutput other = (PushRenderOutput) o; + return + Utils.enhancedDeepEquals(this.subject, other.subject) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subject, body); + } + + @Override + public String toString() { + return Utils.toString(PushRenderOutput.class, + "subject", subject, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subject; + + private String body; + + private Builder() { + // force use of static builder() method + } + + /** + * Subject of the push notification + */ + public Builder subject(@Nonnull String subject) { + this.subject = Utils.checkNotNull(subject, "subject"); + return this; + } + + /** + * Body of the push notification + */ + public Builder body(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public PushRenderOutput build() { + return new PushRenderOutput( + subject, body); + } + + } +} diff --git a/src/main/java/co/novu/models/components/PushStepResponseDto.java b/src/main/java/co/novu/models/components/PushStepResponseDto.java index a7430e65..6a9c8367 100644 --- a/src/main/java/co/novu/models/components/PushStepResponseDto.java +++ b/src/main/java/co/novu/models/components/PushStepResponseDto.java @@ -92,6 +92,13 @@ public class PushStepResponseDto implements WorkflowResponseDtoStep { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public PushStepResponseDto( @JsonProperty("controls") @Nonnull PushControlsMetadataResponseDto controls, @@ -105,7 +112,8 @@ public PushStepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public PushStepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public PushStepResponseDto( @@ -145,7 +154,8 @@ public PushStepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -233,6 +243,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -346,6 +363,15 @@ public PushStepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public PushStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -367,7 +393,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -376,7 +403,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -393,7 +421,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -423,6 +452,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -523,12 +554,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public PushStepResponseDto build() { return new PushStepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/RedirectDto.java b/src/main/java/co/novu/models/components/RedirectDto.java index 3f390602..f153078e 100644 --- a/src/main/java/co/novu/models/components/RedirectDto.java +++ b/src/main/java/co/novu/models/components/RedirectDto.java @@ -3,13 +3,12 @@ */ package co.novu.models.components; -import co.novu.utils.LazySingletonValue; import co.novu.utils.Utils; import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; import jakarta.annotation.Nullable; import java.lang.Override; import java.lang.String; @@ -18,14 +17,13 @@ public class RedirectDto { /** - * URL for redirection. Must be a valid URL or start with / or {{ variable }}. + * URL to redirect to */ - @JsonInclude(Include.NON_ABSENT) @JsonProperty("url") private String url; /** - * Target window for the redirection. + * Target attribute for the redirect link */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("target") @@ -33,26 +31,27 @@ public class RedirectDto { @JsonCreator public RedirectDto( - @JsonProperty("url") @Nullable String url, + @JsonProperty("url") @Nonnull String url, @JsonProperty("target") @Nullable Target target) { - this.url = url; - this.target = Optional.ofNullable(target) - .orElse(Builder._SINGLETON_VALUE_Target.value()); + this.url = Optional.ofNullable(url) + .orElseThrow(() -> new IllegalArgumentException("url cannot be null")); + this.target = target; } - public RedirectDto() { - this(null, null); + public RedirectDto( + @Nonnull String url) { + this(url, null); } /** - * URL for redirection. Must be a valid URL or start with / or {{ variable }}. + * URL to redirect to */ - public Optional url() { - return Optional.ofNullable(this.url); + public String url() { + return this.url; } /** - * Target window for the redirection. + * Target attribute for the redirect link */ public Optional target() { return Optional.ofNullable(this.target); @@ -64,16 +63,16 @@ public static Builder builder() { /** - * URL for redirection. Must be a valid URL or start with / or {{ variable }}. + * URL to redirect to */ - public RedirectDto withUrl(@Nullable String url) { - this.url = url; + public RedirectDto withUrl(@Nonnull String url) { + this.url = Utils.checkNotNull(url, "url"); return this; } /** - * Target window for the redirection. + * Target attribute for the redirect link */ public RedirectDto withTarget(@Nullable Target target) { this.target = target; @@ -120,15 +119,15 @@ private Builder() { } /** - * URL for redirection. Must be a valid URL or start with / or {{ variable }}. + * URL to redirect to */ - public Builder url(@Nullable String url) { - this.url = url; + public Builder url(@Nonnull String url) { + this.url = Utils.checkNotNull(url, "url"); return this; } /** - * Target window for the redirection. + * Target attribute for the redirect link */ public Builder target(@Nullable Target target) { this.target = target; @@ -140,11 +139,5 @@ public RedirectDto build() { url, target); } - - private static final LazySingletonValue _SINGLETON_VALUE_Target = - new LazySingletonValue<>( - "target", - "\"_self\"", - new TypeReference() {}); } } diff --git a/src/main/java/co/novu/models/components/ResourceDependencyDto.java b/src/main/java/co/novu/models/components/ResourceDependencyDto.java new file mode 100644 index 00000000..e526ae2b --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDependencyDto.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class ResourceDependencyDto { + /** + * Type of the layout + */ + @JsonProperty("resourceType") + private ResourceTypeEnum resourceType; + + /** + * ID of the dependent resource + */ + @JsonProperty("resourceId") + private String resourceId; + + /** + * Name of the dependent resource + */ + @JsonProperty("resourceName") + private String resourceName; + + /** + * Whether this dependency blocks the operation + */ + @JsonProperty("isBlocking") + private boolean isBlocking; + + /** + * Reason for the dependency + */ + @JsonProperty("reason") + private DependencyReasonEnum reason; + + @JsonCreator + public ResourceDependencyDto( + @JsonProperty("resourceType") @Nonnull ResourceTypeEnum resourceType, + @JsonProperty("resourceId") @Nonnull String resourceId, + @JsonProperty("resourceName") @Nonnull String resourceName, + @JsonProperty("isBlocking") boolean isBlocking, + @JsonProperty("reason") @Nonnull DependencyReasonEnum reason) { + this.resourceType = Optional.ofNullable(resourceType) + .orElseThrow(() -> new IllegalArgumentException("resourceType cannot be null")); + this.resourceId = Optional.ofNullable(resourceId) + .orElseThrow(() -> new IllegalArgumentException("resourceId cannot be null")); + this.resourceName = Optional.ofNullable(resourceName) + .orElseThrow(() -> new IllegalArgumentException("resourceName cannot be null")); + this.isBlocking = isBlocking; + this.reason = Optional.ofNullable(reason) + .orElseThrow(() -> new IllegalArgumentException("reason cannot be null")); + } + + /** + * Type of the layout + */ + public ResourceTypeEnum resourceType() { + return this.resourceType; + } + + /** + * ID of the dependent resource + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Name of the dependent resource + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Whether this dependency blocks the operation + */ + public boolean isBlocking() { + return this.isBlocking; + } + + /** + * Reason for the dependency + */ + public DependencyReasonEnum reason() { + return this.reason; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Type of the layout + */ + public ResourceDependencyDto withResourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + + /** + * ID of the dependent resource + */ + public ResourceDependencyDto withResourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + + /** + * Name of the dependent resource + */ + public ResourceDependencyDto withResourceName(@Nonnull String resourceName) { + this.resourceName = Utils.checkNotNull(resourceName, "resourceName"); + return this; + } + + + /** + * Whether this dependency blocks the operation + */ + public ResourceDependencyDto withIsBlocking(boolean isBlocking) { + this.isBlocking = isBlocking; + return this; + } + + + /** + * Reason for the dependency + */ + public ResourceDependencyDto withReason(@Nonnull DependencyReasonEnum reason) { + this.reason = Utils.checkNotNull(reason, "reason"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDependencyDto other = (ResourceDependencyDto) o; + return + Utils.enhancedDeepEquals(this.resourceType, other.resourceType) && + Utils.enhancedDeepEquals(this.resourceId, other.resourceId) && + Utils.enhancedDeepEquals(this.resourceName, other.resourceName) && + Utils.enhancedDeepEquals(this.isBlocking, other.isBlocking) && + Utils.enhancedDeepEquals(this.reason, other.reason); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + resourceType, resourceId, resourceName, + isBlocking, reason); + } + + @Override + public String toString() { + return Utils.toString(ResourceDependencyDto.class, + "resourceType", resourceType, + "resourceId", resourceId, + "resourceName", resourceName, + "isBlocking", isBlocking, + "reason", reason); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private ResourceTypeEnum resourceType; + + private String resourceId; + + private String resourceName; + + private boolean isBlocking; + + private DependencyReasonEnum reason; + + private Builder() { + // force use of static builder() method + } + + /** + * Type of the layout + */ + public Builder resourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + /** + * ID of the dependent resource + */ + public Builder resourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + /** + * Name of the dependent resource + */ + public Builder resourceName(@Nonnull String resourceName) { + this.resourceName = Utils.checkNotNull(resourceName, "resourceName"); + return this; + } + + /** + * Whether this dependency blocks the operation + */ + public Builder isBlocking(boolean isBlocking) { + this.isBlocking = isBlocking; + return this; + } + + /** + * Reason for the dependency + */ + public Builder reason(@Nonnull DependencyReasonEnum reason) { + this.reason = Utils.checkNotNull(reason, "reason"); + return this; + } + + public ResourceDependencyDto build() { + return new ResourceDependencyDto( + resourceType, resourceId, resourceName, + isBlocking, reason); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffDto.java b/src/main/java/co/novu/models/components/ResourceDiffDto.java new file mode 100644 index 00000000..3d69907d --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffDto.java @@ -0,0 +1,376 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class ResourceDiffDto { + /** + * Source resource information + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sourceResource") + private JsonNullable sourceResource; + + /** + * Target resource information + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("targetResource") + private JsonNullable targetResource; + + /** + * Type of the layout + */ + @JsonProperty("resourceType") + private ResourceTypeEnum resourceType; + + /** + * Type of change + */ + @JsonProperty("action") + private DiffActionEnum action; + + /** + * Detailed changes (only for modified resources) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("diffs") + private Diffs diffs; + + /** + * Step type (only for step resources) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepType") + private String stepType; + + /** + * Previous index in steps array (for moved/deleted steps) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("previousIndex") + private Double previousIndex; + + /** + * New index in steps array (for moved/added steps) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("newIndex") + private Double newIndex; + + @JsonCreator + public ResourceDiffDto( + @JsonProperty("sourceResource") @Nullable JsonNullable sourceResource, + @JsonProperty("targetResource") @Nullable JsonNullable targetResource, + @JsonProperty("resourceType") @Nonnull ResourceTypeEnum resourceType, + @JsonProperty("action") @Nonnull DiffActionEnum action, + @JsonProperty("diffs") @Nullable Diffs diffs, + @JsonProperty("stepType") @Nullable String stepType, + @JsonProperty("previousIndex") @Nullable Double previousIndex, + @JsonProperty("newIndex") @Nullable Double newIndex) { + this.sourceResource = Optional.ofNullable(sourceResource) + .orElse(JsonNullable.undefined()); + this.targetResource = Optional.ofNullable(targetResource) + .orElse(JsonNullable.undefined()); + this.resourceType = Optional.ofNullable(resourceType) + .orElseThrow(() -> new IllegalArgumentException("resourceType cannot be null")); + this.action = Optional.ofNullable(action) + .orElseThrow(() -> new IllegalArgumentException("action cannot be null")); + this.diffs = diffs; + this.stepType = stepType; + this.previousIndex = previousIndex; + this.newIndex = newIndex; + } + + public ResourceDiffDto( + @Nonnull ResourceTypeEnum resourceType, + @Nonnull DiffActionEnum action) { + this(null, null, resourceType, + action, null, null, + null, null); + } + + /** + * Source resource information + */ + public JsonNullable sourceResource() { + return this.sourceResource; + } + + /** + * Target resource information + */ + public JsonNullable targetResource() { + return this.targetResource; + } + + /** + * Type of the layout + */ + public ResourceTypeEnum resourceType() { + return this.resourceType; + } + + /** + * Type of change + */ + public DiffActionEnum action() { + return this.action; + } + + /** + * Detailed changes (only for modified resources) + */ + public Optional diffs() { + return Optional.ofNullable(this.diffs); + } + + /** + * Step type (only for step resources) + */ + public Optional stepType() { + return Optional.ofNullable(this.stepType); + } + + /** + * Previous index in steps array (for moved/deleted steps) + */ + public Optional previousIndex() { + return Optional.ofNullable(this.previousIndex); + } + + /** + * New index in steps array (for moved/added steps) + */ + public Optional newIndex() { + return Optional.ofNullable(this.newIndex); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Source resource information + */ + public ResourceDiffDto withSourceResource(@Nullable ResourceDiffDtoSourceResource sourceResource) { + this.sourceResource = JsonNullable.of(sourceResource); + return this; + } + + + /** + * Target resource information + */ + public ResourceDiffDto withTargetResource(@Nullable ResourceDiffDtoTargetResource targetResource) { + this.targetResource = JsonNullable.of(targetResource); + return this; + } + + + /** + * Type of the layout + */ + public ResourceDiffDto withResourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + + /** + * Type of change + */ + public ResourceDiffDto withAction(@Nonnull DiffActionEnum action) { + this.action = Utils.checkNotNull(action, "action"); + return this; + } + + + /** + * Detailed changes (only for modified resources) + */ + public ResourceDiffDto withDiffs(@Nullable Diffs diffs) { + this.diffs = diffs; + return this; + } + + + /** + * Step type (only for step resources) + */ + public ResourceDiffDto withStepType(@Nullable String stepType) { + this.stepType = stepType; + return this; + } + + + /** + * Previous index in steps array (for moved/deleted steps) + */ + public ResourceDiffDto withPreviousIndex(@Nullable Double previousIndex) { + this.previousIndex = previousIndex; + return this; + } + + + /** + * New index in steps array (for moved/added steps) + */ + public ResourceDiffDto withNewIndex(@Nullable Double newIndex) { + this.newIndex = newIndex; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffDto other = (ResourceDiffDto) o; + return + Utils.enhancedDeepEquals(this.sourceResource, other.sourceResource) && + Utils.enhancedDeepEquals(this.targetResource, other.targetResource) && + Utils.enhancedDeepEquals(this.resourceType, other.resourceType) && + Utils.enhancedDeepEquals(this.action, other.action) && + Utils.enhancedDeepEquals(this.diffs, other.diffs) && + Utils.enhancedDeepEquals(this.stepType, other.stepType) && + Utils.enhancedDeepEquals(this.previousIndex, other.previousIndex) && + Utils.enhancedDeepEquals(this.newIndex, other.newIndex); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + sourceResource, targetResource, resourceType, + action, diffs, stepType, + previousIndex, newIndex); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffDto.class, + "sourceResource", sourceResource, + "targetResource", targetResource, + "resourceType", resourceType, + "action", action, + "diffs", diffs, + "stepType", stepType, + "previousIndex", previousIndex, + "newIndex", newIndex); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable sourceResource; + + private JsonNullable targetResource; + + private ResourceTypeEnum resourceType; + + private DiffActionEnum action; + + private Diffs diffs; + + private String stepType; + + private Double previousIndex; + + private Double newIndex; + + private Builder() { + // force use of static builder() method + } + + /** + * Source resource information + */ + public Builder sourceResource(@Nullable ResourceDiffDtoSourceResource sourceResource) { + this.sourceResource = JsonNullable.of(sourceResource); + return this; + } + + /** + * Target resource information + */ + public Builder targetResource(@Nullable ResourceDiffDtoTargetResource targetResource) { + this.targetResource = JsonNullable.of(targetResource); + return this; + } + + /** + * Type of the layout + */ + public Builder resourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + /** + * Type of change + */ + public Builder action(@Nonnull DiffActionEnum action) { + this.action = Utils.checkNotNull(action, "action"); + return this; + } + + /** + * Detailed changes (only for modified resources) + */ + public Builder diffs(@Nullable Diffs diffs) { + this.diffs = diffs; + return this; + } + + /** + * Step type (only for step resources) + */ + public Builder stepType(@Nullable String stepType) { + this.stepType = stepType; + return this; + } + + /** + * Previous index in steps array (for moved/deleted steps) + */ + public Builder previousIndex(@Nullable Double previousIndex) { + this.previousIndex = previousIndex; + return this; + } + + /** + * New index in steps array (for moved/added steps) + */ + public Builder newIndex(@Nullable Double newIndex) { + this.newIndex = newIndex; + return this; + } + + public ResourceDiffDto build() { + return new ResourceDiffDto( + sourceResource, targetResource, resourceType, + action, diffs, stepType, + previousIndex, newIndex); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffDtoSourceResource.java b/src/main/java/co/novu/models/components/ResourceDiffDtoSourceResource.java new file mode 100644 index 00000000..25dc704d --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffDtoSourceResource.java @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ResourceDiffDtoSourceResource + * + *

Source resource information + */ +public class ResourceDiffDtoSourceResource { + /** + * Resource ID (workflow ID or step ID) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private JsonNullable id; + + /** + * Resource name (workflow name or step name) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private JsonNullable name; + + /** + * User who last updated the resource + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedBy") + private JsonNullable updatedBy; + + /** + * When the resource was last updated + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private JsonNullable updatedAt; + + @JsonCreator + public ResourceDiffDtoSourceResource( + @JsonProperty("id") @Nullable JsonNullable id, + @JsonProperty("name") @Nullable JsonNullable name, + @JsonProperty("updatedBy") @Nullable JsonNullable updatedBy, + @JsonProperty("updatedAt") @Nullable JsonNullable updatedAt) { + this.id = Optional.ofNullable(id) + .orElse(JsonNullable.undefined()); + this.name = Optional.ofNullable(name) + .orElse(JsonNullable.undefined()); + this.updatedBy = Optional.ofNullable(updatedBy) + .orElse(JsonNullable.undefined()); + this.updatedAt = Optional.ofNullable(updatedAt) + .orElse(JsonNullable.undefined()); + } + + public ResourceDiffDtoSourceResource() { + this(null, null, null, + null); + } + + /** + * Resource ID (workflow ID or step ID) + */ + public JsonNullable id() { + return this.id; + } + + /** + * Resource name (workflow name or step name) + */ + public JsonNullable name() { + return this.name; + } + + /** + * User who last updated the resource + */ + public JsonNullable updatedBy() { + return this.updatedBy; + } + + /** + * When the resource was last updated + */ + public JsonNullable updatedAt() { + return this.updatedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Resource ID (workflow ID or step ID) + */ + public ResourceDiffDtoSourceResource withId(@Nullable String id) { + this.id = JsonNullable.of(id); + return this; + } + + + /** + * Resource name (workflow name or step name) + */ + public ResourceDiffDtoSourceResource withName(@Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + + /** + * User who last updated the resource + */ + public ResourceDiffDtoSourceResource withUpdatedBy(@Nullable ResourceDiffDtoSourceResourceUpdatedBy updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + + /** + * When the resource was last updated + */ + public ResourceDiffDtoSourceResource withUpdatedAt(@Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffDtoSourceResource other = (ResourceDiffDtoSourceResource) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, name, updatedBy, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffDtoSourceResource.class, + "id", id, + "name", name, + "updatedBy", updatedBy, + "updatedAt", updatedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable id; + + private JsonNullable name; + + private JsonNullable updatedBy; + + private JsonNullable updatedAt; + + private Builder() { + // force use of static builder() method + } + + /** + * Resource ID (workflow ID or step ID) + */ + public Builder id(@Nullable String id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Resource name (workflow name or step name) + */ + public Builder name(@Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * User who last updated the resource + */ + public Builder updatedBy(@Nullable ResourceDiffDtoSourceResourceUpdatedBy updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * When the resource was last updated + */ + public Builder updatedAt(@Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + public ResourceDiffDtoSourceResource build() { + return new ResourceDiffDtoSourceResource( + id, name, updatedBy, + updatedAt); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffDtoSourceResourceUpdatedBy.java b/src/main/java/co/novu/models/components/ResourceDiffDtoSourceResourceUpdatedBy.java new file mode 100644 index 00000000..02318184 --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffDtoSourceResourceUpdatedBy.java @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ResourceDiffDtoSourceResourceUpdatedBy + * + *

User who last updated the resource + */ +public class ResourceDiffDtoSourceResourceUpdatedBy { + /** + * User ID + */ + @JsonProperty("_id") + private String id; + + /** + * User first name + */ + @JsonProperty("firstName") + private String firstName; + + /** + * User last name + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastName") + private JsonNullable lastName; + + /** + * User external ID + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("externalId") + private String externalId; + + @JsonCreator + public ResourceDiffDtoSourceResourceUpdatedBy( + @JsonProperty("_id") @Nonnull String id, + @JsonProperty("firstName") @Nonnull String firstName, + @JsonProperty("lastName") @Nullable JsonNullable lastName, + @JsonProperty("externalId") @Nullable String externalId) { + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.firstName = Optional.ofNullable(firstName) + .orElseThrow(() -> new IllegalArgumentException("firstName cannot be null")); + this.lastName = Optional.ofNullable(lastName) + .orElse(JsonNullable.undefined()); + this.externalId = externalId; + } + + public ResourceDiffDtoSourceResourceUpdatedBy( + @Nonnull String id, + @Nonnull String firstName) { + this(id, firstName, null, + null); + } + + /** + * User ID + */ + public String id() { + return this.id; + } + + /** + * User first name + */ + public String firstName() { + return this.firstName; + } + + /** + * User last name + */ + public JsonNullable lastName() { + return this.lastName; + } + + /** + * User external ID + */ + public Optional externalId() { + return Optional.ofNullable(this.externalId); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * User ID + */ + public ResourceDiffDtoSourceResourceUpdatedBy withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + /** + * User first name + */ + public ResourceDiffDtoSourceResourceUpdatedBy withFirstName(@Nonnull String firstName) { + this.firstName = Utils.checkNotNull(firstName, "firstName"); + return this; + } + + + /** + * User last name + */ + public ResourceDiffDtoSourceResourceUpdatedBy withLastName(@Nullable String lastName) { + this.lastName = JsonNullable.of(lastName); + return this; + } + + + /** + * User external ID + */ + public ResourceDiffDtoSourceResourceUpdatedBy withExternalId(@Nullable String externalId) { + this.externalId = externalId; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffDtoSourceResourceUpdatedBy other = (ResourceDiffDtoSourceResourceUpdatedBy) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.firstName, other.firstName) && + Utils.enhancedDeepEquals(this.lastName, other.lastName) && + Utils.enhancedDeepEquals(this.externalId, other.externalId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, firstName, lastName, + externalId); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffDtoSourceResourceUpdatedBy.class, + "id", id, + "firstName", firstName, + "lastName", lastName, + "externalId", externalId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String firstName; + + private JsonNullable lastName; + + private String externalId; + + private Builder() { + // force use of static builder() method + } + + /** + * User ID + */ + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + /** + * User first name + */ + public Builder firstName(@Nonnull String firstName) { + this.firstName = Utils.checkNotNull(firstName, "firstName"); + return this; + } + + /** + * User last name + */ + public Builder lastName(@Nullable String lastName) { + this.lastName = JsonNullable.of(lastName); + return this; + } + + /** + * User external ID + */ + public Builder externalId(@Nullable String externalId) { + this.externalId = externalId; + return this; + } + + public ResourceDiffDtoSourceResourceUpdatedBy build() { + return new ResourceDiffDtoSourceResourceUpdatedBy( + id, firstName, lastName, + externalId); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffDtoTargetResource.java b/src/main/java/co/novu/models/components/ResourceDiffDtoTargetResource.java new file mode 100644 index 00000000..1603d37c --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffDtoTargetResource.java @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ResourceDiffDtoTargetResource + * + *

Target resource information + */ +public class ResourceDiffDtoTargetResource { + /** + * Resource ID (workflow ID or step ID) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private JsonNullable id; + + /** + * Resource name (workflow name or step name) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private JsonNullable name; + + /** + * User who last updated the resource + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedBy") + private JsonNullable updatedBy; + + /** + * When the resource was last updated + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private JsonNullable updatedAt; + + @JsonCreator + public ResourceDiffDtoTargetResource( + @JsonProperty("id") @Nullable JsonNullable id, + @JsonProperty("name") @Nullable JsonNullable name, + @JsonProperty("updatedBy") @Nullable JsonNullable updatedBy, + @JsonProperty("updatedAt") @Nullable JsonNullable updatedAt) { + this.id = Optional.ofNullable(id) + .orElse(JsonNullable.undefined()); + this.name = Optional.ofNullable(name) + .orElse(JsonNullable.undefined()); + this.updatedBy = Optional.ofNullable(updatedBy) + .orElse(JsonNullable.undefined()); + this.updatedAt = Optional.ofNullable(updatedAt) + .orElse(JsonNullable.undefined()); + } + + public ResourceDiffDtoTargetResource() { + this(null, null, null, + null); + } + + /** + * Resource ID (workflow ID or step ID) + */ + public JsonNullable id() { + return this.id; + } + + /** + * Resource name (workflow name or step name) + */ + public JsonNullable name() { + return this.name; + } + + /** + * User who last updated the resource + */ + public JsonNullable updatedBy() { + return this.updatedBy; + } + + /** + * When the resource was last updated + */ + public JsonNullable updatedAt() { + return this.updatedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Resource ID (workflow ID or step ID) + */ + public ResourceDiffDtoTargetResource withId(@Nullable String id) { + this.id = JsonNullable.of(id); + return this; + } + + + /** + * Resource name (workflow name or step name) + */ + public ResourceDiffDtoTargetResource withName(@Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + + /** + * User who last updated the resource + */ + public ResourceDiffDtoTargetResource withUpdatedBy(@Nullable ResourceDiffDtoTargetResourceUpdatedBy updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + + /** + * When the resource was last updated + */ + public ResourceDiffDtoTargetResource withUpdatedAt(@Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffDtoTargetResource other = (ResourceDiffDtoTargetResource) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, name, updatedBy, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffDtoTargetResource.class, + "id", id, + "name", name, + "updatedBy", updatedBy, + "updatedAt", updatedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable id; + + private JsonNullable name; + + private JsonNullable updatedBy; + + private JsonNullable updatedAt; + + private Builder() { + // force use of static builder() method + } + + /** + * Resource ID (workflow ID or step ID) + */ + public Builder id(@Nullable String id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Resource name (workflow name or step name) + */ + public Builder name(@Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * User who last updated the resource + */ + public Builder updatedBy(@Nullable ResourceDiffDtoTargetResourceUpdatedBy updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * When the resource was last updated + */ + public Builder updatedAt(@Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + public ResourceDiffDtoTargetResource build() { + return new ResourceDiffDtoTargetResource( + id, name, updatedBy, + updatedAt); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffDtoTargetResourceUpdatedBy.java b/src/main/java/co/novu/models/components/ResourceDiffDtoTargetResourceUpdatedBy.java new file mode 100644 index 00000000..a825637c --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffDtoTargetResourceUpdatedBy.java @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ResourceDiffDtoTargetResourceUpdatedBy + * + *

User who last updated the resource + */ +public class ResourceDiffDtoTargetResourceUpdatedBy { + /** + * User ID + */ + @JsonProperty("_id") + private String id; + + /** + * User first name + */ + @JsonProperty("firstName") + private String firstName; + + /** + * User last name + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastName") + private JsonNullable lastName; + + /** + * User external ID + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("externalId") + private String externalId; + + @JsonCreator + public ResourceDiffDtoTargetResourceUpdatedBy( + @JsonProperty("_id") @Nonnull String id, + @JsonProperty("firstName") @Nonnull String firstName, + @JsonProperty("lastName") @Nullable JsonNullable lastName, + @JsonProperty("externalId") @Nullable String externalId) { + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.firstName = Optional.ofNullable(firstName) + .orElseThrow(() -> new IllegalArgumentException("firstName cannot be null")); + this.lastName = Optional.ofNullable(lastName) + .orElse(JsonNullable.undefined()); + this.externalId = externalId; + } + + public ResourceDiffDtoTargetResourceUpdatedBy( + @Nonnull String id, + @Nonnull String firstName) { + this(id, firstName, null, + null); + } + + /** + * User ID + */ + public String id() { + return this.id; + } + + /** + * User first name + */ + public String firstName() { + return this.firstName; + } + + /** + * User last name + */ + public JsonNullable lastName() { + return this.lastName; + } + + /** + * User external ID + */ + public Optional externalId() { + return Optional.ofNullable(this.externalId); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * User ID + */ + public ResourceDiffDtoTargetResourceUpdatedBy withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + /** + * User first name + */ + public ResourceDiffDtoTargetResourceUpdatedBy withFirstName(@Nonnull String firstName) { + this.firstName = Utils.checkNotNull(firstName, "firstName"); + return this; + } + + + /** + * User last name + */ + public ResourceDiffDtoTargetResourceUpdatedBy withLastName(@Nullable String lastName) { + this.lastName = JsonNullable.of(lastName); + return this; + } + + + /** + * User external ID + */ + public ResourceDiffDtoTargetResourceUpdatedBy withExternalId(@Nullable String externalId) { + this.externalId = externalId; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffDtoTargetResourceUpdatedBy other = (ResourceDiffDtoTargetResourceUpdatedBy) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.firstName, other.firstName) && + Utils.enhancedDeepEquals(this.lastName, other.lastName) && + Utils.enhancedDeepEquals(this.externalId, other.externalId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, firstName, lastName, + externalId); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffDtoTargetResourceUpdatedBy.class, + "id", id, + "firstName", firstName, + "lastName", lastName, + "externalId", externalId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String firstName; + + private JsonNullable lastName; + + private String externalId; + + private Builder() { + // force use of static builder() method + } + + /** + * User ID + */ + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + /** + * User first name + */ + public Builder firstName(@Nonnull String firstName) { + this.firstName = Utils.checkNotNull(firstName, "firstName"); + return this; + } + + /** + * User last name + */ + public Builder lastName(@Nullable String lastName) { + this.lastName = JsonNullable.of(lastName); + return this; + } + + /** + * User external ID + */ + public Builder externalId(@Nullable String externalId) { + this.externalId = externalId; + return this; + } + + public ResourceDiffDtoTargetResourceUpdatedBy build() { + return new ResourceDiffDtoTargetResourceUpdatedBy( + id, firstName, lastName, + externalId); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffResultDto.java b/src/main/java/co/novu/models/components/ResourceDiffResultDto.java new file mode 100644 index 00000000..0a17c66d --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffResultDto.java @@ -0,0 +1,300 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + + +public class ResourceDiffResultDto { + /** + * Type of the layout + */ + @JsonProperty("resourceType") + private ResourceTypeEnum resourceType; + + /** + * Source resource information + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("sourceResource") + private JsonNullable sourceResource; + + /** + * Target resource information + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("targetResource") + private JsonNullable targetResource; + + /** + * List of specific changes for this resource + */ + @JsonProperty("changes") + private List changes; + + /** + * Summary of changes for this resource + */ + @JsonProperty("summary") + private DiffSummaryDto summary; + + /** + * Dependencies that affect this resource + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("dependencies") + private List dependencies; + + @JsonCreator + public ResourceDiffResultDto( + @JsonProperty("resourceType") @Nonnull ResourceTypeEnum resourceType, + @JsonProperty("sourceResource") @Nullable JsonNullable sourceResource, + @JsonProperty("targetResource") @Nullable JsonNullable targetResource, + @JsonProperty("changes") @Nonnull List changes, + @JsonProperty("summary") @Nonnull DiffSummaryDto summary, + @JsonProperty("dependencies") @Nullable List dependencies) { + this.resourceType = Optional.ofNullable(resourceType) + .orElseThrow(() -> new IllegalArgumentException("resourceType cannot be null")); + this.sourceResource = Optional.ofNullable(sourceResource) + .orElse(JsonNullable.undefined()); + this.targetResource = Optional.ofNullable(targetResource) + .orElse(JsonNullable.undefined()); + this.changes = Optional.ofNullable(changes) + .orElseThrow(() -> new IllegalArgumentException("changes cannot be null")); + this.summary = Optional.ofNullable(summary) + .orElseThrow(() -> new IllegalArgumentException("summary cannot be null")); + this.dependencies = dependencies; + } + + public ResourceDiffResultDto( + @Nonnull ResourceTypeEnum resourceType, + @Nonnull List changes, + @Nonnull DiffSummaryDto summary) { + this(resourceType, null, null, + changes, summary, null); + } + + /** + * Type of the layout + */ + public ResourceTypeEnum resourceType() { + return this.resourceType; + } + + /** + * Source resource information + */ + public JsonNullable sourceResource() { + return this.sourceResource; + } + + /** + * Target resource information + */ + public JsonNullable targetResource() { + return this.targetResource; + } + + /** + * List of specific changes for this resource + */ + public List changes() { + return this.changes; + } + + /** + * Summary of changes for this resource + */ + public DiffSummaryDto summary() { + return this.summary; + } + + /** + * Dependencies that affect this resource + */ + public Optional> dependencies() { + return Optional.ofNullable(this.dependencies); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Type of the layout + */ + public ResourceDiffResultDto withResourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + + /** + * Source resource information + */ + public ResourceDiffResultDto withSourceResource(@Nullable ResourceDiffResultDtoSourceResource sourceResource) { + this.sourceResource = JsonNullable.of(sourceResource); + return this; + } + + + /** + * Target resource information + */ + public ResourceDiffResultDto withTargetResource(@Nullable ResourceDiffResultDtoTargetResource targetResource) { + this.targetResource = JsonNullable.of(targetResource); + return this; + } + + + /** + * List of specific changes for this resource + */ + public ResourceDiffResultDto withChanges(@Nonnull List changes) { + this.changes = Utils.checkNotNull(changes, "changes"); + return this; + } + + + /** + * Summary of changes for this resource + */ + public ResourceDiffResultDto withSummary(@Nonnull DiffSummaryDto summary) { + this.summary = Utils.checkNotNull(summary, "summary"); + return this; + } + + + /** + * Dependencies that affect this resource + */ + public ResourceDiffResultDto withDependencies(@Nullable List dependencies) { + this.dependencies = dependencies; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffResultDto other = (ResourceDiffResultDto) o; + return + Utils.enhancedDeepEquals(this.resourceType, other.resourceType) && + Utils.enhancedDeepEquals(this.sourceResource, other.sourceResource) && + Utils.enhancedDeepEquals(this.targetResource, other.targetResource) && + Utils.enhancedDeepEquals(this.changes, other.changes) && + Utils.enhancedDeepEquals(this.summary, other.summary) && + Utils.enhancedDeepEquals(this.dependencies, other.dependencies); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + resourceType, sourceResource, targetResource, + changes, summary, dependencies); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffResultDto.class, + "resourceType", resourceType, + "sourceResource", sourceResource, + "targetResource", targetResource, + "changes", changes, + "summary", summary, + "dependencies", dependencies); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private ResourceTypeEnum resourceType; + + private JsonNullable sourceResource; + + private JsonNullable targetResource; + + private List changes; + + private DiffSummaryDto summary; + + private List dependencies; + + private Builder() { + // force use of static builder() method + } + + /** + * Type of the layout + */ + public Builder resourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + /** + * Source resource information + */ + public Builder sourceResource(@Nullable ResourceDiffResultDtoSourceResource sourceResource) { + this.sourceResource = JsonNullable.of(sourceResource); + return this; + } + + /** + * Target resource information + */ + public Builder targetResource(@Nullable ResourceDiffResultDtoTargetResource targetResource) { + this.targetResource = JsonNullable.of(targetResource); + return this; + } + + /** + * List of specific changes for this resource + */ + public Builder changes(@Nonnull List changes) { + this.changes = Utils.checkNotNull(changes, "changes"); + return this; + } + + /** + * Summary of changes for this resource + */ + public Builder summary(@Nonnull DiffSummaryDto summary) { + this.summary = Utils.checkNotNull(summary, "summary"); + return this; + } + + /** + * Dependencies that affect this resource + */ + public Builder dependencies(@Nullable List dependencies) { + this.dependencies = dependencies; + return this; + } + + public ResourceDiffResultDto build() { + return new ResourceDiffResultDto( + resourceType, sourceResource, targetResource, + changes, summary, dependencies); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffResultDtoSourceResource.java b/src/main/java/co/novu/models/components/ResourceDiffResultDtoSourceResource.java new file mode 100644 index 00000000..99d431ad --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffResultDtoSourceResource.java @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ResourceDiffResultDtoSourceResource + * + *

Source resource information + */ +public class ResourceDiffResultDtoSourceResource { + /** + * Resource ID (workflow ID or step ID) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private JsonNullable id; + + /** + * Resource name (workflow name or step name) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private JsonNullable name; + + /** + * User who last updated the resource + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedBy") + private JsonNullable updatedBy; + + /** + * When the resource was last updated + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private JsonNullable updatedAt; + + @JsonCreator + public ResourceDiffResultDtoSourceResource( + @JsonProperty("id") @Nullable JsonNullable id, + @JsonProperty("name") @Nullable JsonNullable name, + @JsonProperty("updatedBy") @Nullable JsonNullable updatedBy, + @JsonProperty("updatedAt") @Nullable JsonNullable updatedAt) { + this.id = Optional.ofNullable(id) + .orElse(JsonNullable.undefined()); + this.name = Optional.ofNullable(name) + .orElse(JsonNullable.undefined()); + this.updatedBy = Optional.ofNullable(updatedBy) + .orElse(JsonNullable.undefined()); + this.updatedAt = Optional.ofNullable(updatedAt) + .orElse(JsonNullable.undefined()); + } + + public ResourceDiffResultDtoSourceResource() { + this(null, null, null, + null); + } + + /** + * Resource ID (workflow ID or step ID) + */ + public JsonNullable id() { + return this.id; + } + + /** + * Resource name (workflow name or step name) + */ + public JsonNullable name() { + return this.name; + } + + /** + * User who last updated the resource + */ + public JsonNullable updatedBy() { + return this.updatedBy; + } + + /** + * When the resource was last updated + */ + public JsonNullable updatedAt() { + return this.updatedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Resource ID (workflow ID or step ID) + */ + public ResourceDiffResultDtoSourceResource withId(@Nullable String id) { + this.id = JsonNullable.of(id); + return this; + } + + + /** + * Resource name (workflow name or step name) + */ + public ResourceDiffResultDtoSourceResource withName(@Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + + /** + * User who last updated the resource + */ + public ResourceDiffResultDtoSourceResource withUpdatedBy(@Nullable ResourceDiffResultDtoSourceResourceUpdatedBy updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + + /** + * When the resource was last updated + */ + public ResourceDiffResultDtoSourceResource withUpdatedAt(@Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffResultDtoSourceResource other = (ResourceDiffResultDtoSourceResource) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, name, updatedBy, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffResultDtoSourceResource.class, + "id", id, + "name", name, + "updatedBy", updatedBy, + "updatedAt", updatedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable id; + + private JsonNullable name; + + private JsonNullable updatedBy; + + private JsonNullable updatedAt; + + private Builder() { + // force use of static builder() method + } + + /** + * Resource ID (workflow ID or step ID) + */ + public Builder id(@Nullable String id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Resource name (workflow name or step name) + */ + public Builder name(@Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * User who last updated the resource + */ + public Builder updatedBy(@Nullable ResourceDiffResultDtoSourceResourceUpdatedBy updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * When the resource was last updated + */ + public Builder updatedAt(@Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + public ResourceDiffResultDtoSourceResource build() { + return new ResourceDiffResultDtoSourceResource( + id, name, updatedBy, + updatedAt); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffResultDtoSourceResourceUpdatedBy.java b/src/main/java/co/novu/models/components/ResourceDiffResultDtoSourceResourceUpdatedBy.java new file mode 100644 index 00000000..3379fe25 --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffResultDtoSourceResourceUpdatedBy.java @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ResourceDiffResultDtoSourceResourceUpdatedBy + * + *

User who last updated the resource + */ +public class ResourceDiffResultDtoSourceResourceUpdatedBy { + /** + * User ID + */ + @JsonProperty("_id") + private String id; + + /** + * User first name + */ + @JsonProperty("firstName") + private String firstName; + + /** + * User last name + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastName") + private JsonNullable lastName; + + /** + * User external ID + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("externalId") + private String externalId; + + @JsonCreator + public ResourceDiffResultDtoSourceResourceUpdatedBy( + @JsonProperty("_id") @Nonnull String id, + @JsonProperty("firstName") @Nonnull String firstName, + @JsonProperty("lastName") @Nullable JsonNullable lastName, + @JsonProperty("externalId") @Nullable String externalId) { + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.firstName = Optional.ofNullable(firstName) + .orElseThrow(() -> new IllegalArgumentException("firstName cannot be null")); + this.lastName = Optional.ofNullable(lastName) + .orElse(JsonNullable.undefined()); + this.externalId = externalId; + } + + public ResourceDiffResultDtoSourceResourceUpdatedBy( + @Nonnull String id, + @Nonnull String firstName) { + this(id, firstName, null, + null); + } + + /** + * User ID + */ + public String id() { + return this.id; + } + + /** + * User first name + */ + public String firstName() { + return this.firstName; + } + + /** + * User last name + */ + public JsonNullable lastName() { + return this.lastName; + } + + /** + * User external ID + */ + public Optional externalId() { + return Optional.ofNullable(this.externalId); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * User ID + */ + public ResourceDiffResultDtoSourceResourceUpdatedBy withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + /** + * User first name + */ + public ResourceDiffResultDtoSourceResourceUpdatedBy withFirstName(@Nonnull String firstName) { + this.firstName = Utils.checkNotNull(firstName, "firstName"); + return this; + } + + + /** + * User last name + */ + public ResourceDiffResultDtoSourceResourceUpdatedBy withLastName(@Nullable String lastName) { + this.lastName = JsonNullable.of(lastName); + return this; + } + + + /** + * User external ID + */ + public ResourceDiffResultDtoSourceResourceUpdatedBy withExternalId(@Nullable String externalId) { + this.externalId = externalId; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffResultDtoSourceResourceUpdatedBy other = (ResourceDiffResultDtoSourceResourceUpdatedBy) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.firstName, other.firstName) && + Utils.enhancedDeepEquals(this.lastName, other.lastName) && + Utils.enhancedDeepEquals(this.externalId, other.externalId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, firstName, lastName, + externalId); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffResultDtoSourceResourceUpdatedBy.class, + "id", id, + "firstName", firstName, + "lastName", lastName, + "externalId", externalId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String firstName; + + private JsonNullable lastName; + + private String externalId; + + private Builder() { + // force use of static builder() method + } + + /** + * User ID + */ + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + /** + * User first name + */ + public Builder firstName(@Nonnull String firstName) { + this.firstName = Utils.checkNotNull(firstName, "firstName"); + return this; + } + + /** + * User last name + */ + public Builder lastName(@Nullable String lastName) { + this.lastName = JsonNullable.of(lastName); + return this; + } + + /** + * User external ID + */ + public Builder externalId(@Nullable String externalId) { + this.externalId = externalId; + return this; + } + + public ResourceDiffResultDtoSourceResourceUpdatedBy build() { + return new ResourceDiffResultDtoSourceResourceUpdatedBy( + id, firstName, lastName, + externalId); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffResultDtoTargetResource.java b/src/main/java/co/novu/models/components/ResourceDiffResultDtoTargetResource.java new file mode 100644 index 00000000..abe8f6f4 --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffResultDtoTargetResource.java @@ -0,0 +1,228 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ResourceDiffResultDtoTargetResource + * + *

Target resource information + */ +public class ResourceDiffResultDtoTargetResource { + /** + * Resource ID (workflow ID or step ID) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("id") + private JsonNullable id; + + /** + * Resource name (workflow name or step name) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("name") + private JsonNullable name; + + /** + * User who last updated the resource + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedBy") + private JsonNullable updatedBy; + + /** + * When the resource was last updated + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("updatedAt") + private JsonNullable updatedAt; + + @JsonCreator + public ResourceDiffResultDtoTargetResource( + @JsonProperty("id") @Nullable JsonNullable id, + @JsonProperty("name") @Nullable JsonNullable name, + @JsonProperty("updatedBy") @Nullable JsonNullable updatedBy, + @JsonProperty("updatedAt") @Nullable JsonNullable updatedAt) { + this.id = Optional.ofNullable(id) + .orElse(JsonNullable.undefined()); + this.name = Optional.ofNullable(name) + .orElse(JsonNullable.undefined()); + this.updatedBy = Optional.ofNullable(updatedBy) + .orElse(JsonNullable.undefined()); + this.updatedAt = Optional.ofNullable(updatedAt) + .orElse(JsonNullable.undefined()); + } + + public ResourceDiffResultDtoTargetResource() { + this(null, null, null, + null); + } + + /** + * Resource ID (workflow ID or step ID) + */ + public JsonNullable id() { + return this.id; + } + + /** + * Resource name (workflow name or step name) + */ + public JsonNullable name() { + return this.name; + } + + /** + * User who last updated the resource + */ + public JsonNullable updatedBy() { + return this.updatedBy; + } + + /** + * When the resource was last updated + */ + public JsonNullable updatedAt() { + return this.updatedAt; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Resource ID (workflow ID or step ID) + */ + public ResourceDiffResultDtoTargetResource withId(@Nullable String id) { + this.id = JsonNullable.of(id); + return this; + } + + + /** + * Resource name (workflow name or step name) + */ + public ResourceDiffResultDtoTargetResource withName(@Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + + /** + * User who last updated the resource + */ + public ResourceDiffResultDtoTargetResource withUpdatedBy(@Nullable ResourceDiffResultDtoTargetResourceUpdatedBy updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + + /** + * When the resource was last updated + */ + public ResourceDiffResultDtoTargetResource withUpdatedAt(@Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffResultDtoTargetResource other = (ResourceDiffResultDtoTargetResource) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.name, other.name) && + Utils.enhancedDeepEquals(this.updatedBy, other.updatedBy) && + Utils.enhancedDeepEquals(this.updatedAt, other.updatedAt); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, name, updatedBy, + updatedAt); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffResultDtoTargetResource.class, + "id", id, + "name", name, + "updatedBy", updatedBy, + "updatedAt", updatedAt); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private JsonNullable id; + + private JsonNullable name; + + private JsonNullable updatedBy; + + private JsonNullable updatedAt; + + private Builder() { + // force use of static builder() method + } + + /** + * Resource ID (workflow ID or step ID) + */ + public Builder id(@Nullable String id) { + this.id = JsonNullable.of(id); + return this; + } + + /** + * Resource name (workflow name or step name) + */ + public Builder name(@Nullable String name) { + this.name = JsonNullable.of(name); + return this; + } + + /** + * User who last updated the resource + */ + public Builder updatedBy(@Nullable ResourceDiffResultDtoTargetResourceUpdatedBy updatedBy) { + this.updatedBy = JsonNullable.of(updatedBy); + return this; + } + + /** + * When the resource was last updated + */ + public Builder updatedAt(@Nullable OffsetDateTime updatedAt) { + this.updatedAt = JsonNullable.of(updatedAt); + return this; + } + + public ResourceDiffResultDtoTargetResource build() { + return new ResourceDiffResultDtoTargetResource( + id, name, updatedBy, + updatedAt); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceDiffResultDtoTargetResourceUpdatedBy.java b/src/main/java/co/novu/models/components/ResourceDiffResultDtoTargetResourceUpdatedBy.java new file mode 100644 index 00000000..637ba43a --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceDiffResultDtoTargetResourceUpdatedBy.java @@ -0,0 +1,227 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; +import org.openapitools.jackson.nullable.JsonNullable; + +/** + * ResourceDiffResultDtoTargetResourceUpdatedBy + * + *

User who last updated the resource + */ +public class ResourceDiffResultDtoTargetResourceUpdatedBy { + /** + * User ID + */ + @JsonProperty("_id") + private String id; + + /** + * User first name + */ + @JsonProperty("firstName") + private String firstName; + + /** + * User last name + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("lastName") + private JsonNullable lastName; + + /** + * User external ID + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("externalId") + private String externalId; + + @JsonCreator + public ResourceDiffResultDtoTargetResourceUpdatedBy( + @JsonProperty("_id") @Nonnull String id, + @JsonProperty("firstName") @Nonnull String firstName, + @JsonProperty("lastName") @Nullable JsonNullable lastName, + @JsonProperty("externalId") @Nullable String externalId) { + this.id = Optional.ofNullable(id) + .orElseThrow(() -> new IllegalArgumentException("id cannot be null")); + this.firstName = Optional.ofNullable(firstName) + .orElseThrow(() -> new IllegalArgumentException("firstName cannot be null")); + this.lastName = Optional.ofNullable(lastName) + .orElse(JsonNullable.undefined()); + this.externalId = externalId; + } + + public ResourceDiffResultDtoTargetResourceUpdatedBy( + @Nonnull String id, + @Nonnull String firstName) { + this(id, firstName, null, + null); + } + + /** + * User ID + */ + public String id() { + return this.id; + } + + /** + * User first name + */ + public String firstName() { + return this.firstName; + } + + /** + * User last name + */ + public JsonNullable lastName() { + return this.lastName; + } + + /** + * User external ID + */ + public Optional externalId() { + return Optional.ofNullable(this.externalId); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * User ID + */ + public ResourceDiffResultDtoTargetResourceUpdatedBy withId(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + + /** + * User first name + */ + public ResourceDiffResultDtoTargetResourceUpdatedBy withFirstName(@Nonnull String firstName) { + this.firstName = Utils.checkNotNull(firstName, "firstName"); + return this; + } + + + /** + * User last name + */ + public ResourceDiffResultDtoTargetResourceUpdatedBy withLastName(@Nullable String lastName) { + this.lastName = JsonNullable.of(lastName); + return this; + } + + + /** + * User external ID + */ + public ResourceDiffResultDtoTargetResourceUpdatedBy withExternalId(@Nullable String externalId) { + this.externalId = externalId; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceDiffResultDtoTargetResourceUpdatedBy other = (ResourceDiffResultDtoTargetResourceUpdatedBy) o; + return + Utils.enhancedDeepEquals(this.id, other.id) && + Utils.enhancedDeepEquals(this.firstName, other.firstName) && + Utils.enhancedDeepEquals(this.lastName, other.lastName) && + Utils.enhancedDeepEquals(this.externalId, other.externalId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + id, firstName, lastName, + externalId); + } + + @Override + public String toString() { + return Utils.toString(ResourceDiffResultDtoTargetResourceUpdatedBy.class, + "id", id, + "firstName", firstName, + "lastName", lastName, + "externalId", externalId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String id; + + private String firstName; + + private JsonNullable lastName; + + private String externalId; + + private Builder() { + // force use of static builder() method + } + + /** + * User ID + */ + public Builder id(@Nonnull String id) { + this.id = Utils.checkNotNull(id, "id"); + return this; + } + + /** + * User first name + */ + public Builder firstName(@Nonnull String firstName) { + this.firstName = Utils.checkNotNull(firstName, "firstName"); + return this; + } + + /** + * User last name + */ + public Builder lastName(@Nullable String lastName) { + this.lastName = JsonNullable.of(lastName); + return this; + } + + /** + * User external ID + */ + public Builder externalId(@Nullable String externalId) { + this.externalId = externalId; + return this; + } + + public ResourceDiffResultDtoTargetResourceUpdatedBy build() { + return new ResourceDiffResultDtoTargetResourceUpdatedBy( + id, firstName, lastName, + externalId); + } + + } +} diff --git a/src/main/java/co/novu/models/components/ResourceToPublishDto.java b/src/main/java/co/novu/models/components/ResourceToPublishDto.java new file mode 100644 index 00000000..bb6caadc --- /dev/null +++ b/src/main/java/co/novu/models/components/ResourceToPublishDto.java @@ -0,0 +1,135 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class ResourceToPublishDto { + /** + * Type of the layout + */ + @JsonProperty("resourceType") + private ResourceTypeEnum resourceType; + + /** + * Unique identifier of the resource to publish + */ + @JsonProperty("resourceId") + private String resourceId; + + @JsonCreator + public ResourceToPublishDto( + @JsonProperty("resourceType") @Nonnull ResourceTypeEnum resourceType, + @JsonProperty("resourceId") @Nonnull String resourceId) { + this.resourceType = Optional.ofNullable(resourceType) + .orElseThrow(() -> new IllegalArgumentException("resourceType cannot be null")); + this.resourceId = Optional.ofNullable(resourceId) + .orElseThrow(() -> new IllegalArgumentException("resourceId cannot be null")); + } + + /** + * Type of the layout + */ + public ResourceTypeEnum resourceType() { + return this.resourceType; + } + + /** + * Unique identifier of the resource to publish + */ + public String resourceId() { + return this.resourceId; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Type of the layout + */ + public ResourceToPublishDto withResourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + + /** + * Unique identifier of the resource to publish + */ + public ResourceToPublishDto withResourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + ResourceToPublishDto other = (ResourceToPublishDto) o; + return + Utils.enhancedDeepEquals(this.resourceType, other.resourceType) && + Utils.enhancedDeepEquals(this.resourceId, other.resourceId); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + resourceType, resourceId); + } + + @Override + public String toString() { + return Utils.toString(ResourceToPublishDto.class, + "resourceType", resourceType, + "resourceId", resourceId); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private ResourceTypeEnum resourceType; + + private String resourceId; + + private Builder() { + // force use of static builder() method + } + + /** + * Type of the layout + */ + public Builder resourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + /** + * Unique identifier of the resource to publish + */ + public Builder resourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + public ResourceToPublishDto build() { + return new ResourceToPublishDto( + resourceType, resourceId); + } + + } +} diff --git a/src/main/java/co/novu/models/components/RuntimeIssueDto.java b/src/main/java/co/novu/models/components/RuntimeIssueDto.java index 99605a81..c0ff9c5a 100644 --- a/src/main/java/co/novu/models/components/RuntimeIssueDto.java +++ b/src/main/java/co/novu/models/components/RuntimeIssueDto.java @@ -5,58 +5,13 @@ import co.novu.utils.Utils; import com.fasterxml.jackson.annotation.JsonCreator; -import com.fasterxml.jackson.annotation.JsonInclude.Include; -import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; -import jakarta.annotation.Nonnull; -import jakarta.annotation.Nullable; import java.lang.Override; import java.lang.String; -import java.util.Optional; public class RuntimeIssueDto { - - @JsonProperty("issueType") - private IssueType issueType; - - - @JsonInclude(Include.NON_ABSENT) - @JsonProperty("variableName") - private String variableName; - - - @JsonProperty("message") - private String message; - @JsonCreator - public RuntimeIssueDto( - @JsonProperty("issueType") @Nonnull IssueType issueType, - @JsonProperty("variableName") @Nullable String variableName, - @JsonProperty("message") @Nonnull String message) { - this.issueType = Optional.ofNullable(issueType) - .orElseThrow(() -> new IllegalArgumentException("issueType cannot be null")); - this.variableName = variableName; - this.message = Optional.ofNullable(message) - .orElseThrow(() -> new IllegalArgumentException("message cannot be null")); - } - - public RuntimeIssueDto( - @Nonnull IssueType issueType, - @Nonnull String message) { - this(issueType, null, message); - } - - public IssueType issueType() { - return this.issueType; - } - - public Optional variableName() { - return Optional.ofNullable(this.variableName); - } - - public String message() { - return this.message; + public RuntimeIssueDto() { } public static Builder builder() { @@ -64,24 +19,6 @@ public static Builder builder() { } - public RuntimeIssueDto withIssueType(@Nonnull IssueType issueType) { - this.issueType = Utils.checkNotNull(issueType, "issueType"); - return this; - } - - - public RuntimeIssueDto withVariableName(@Nullable String variableName) { - this.variableName = variableName; - return this; - } - - - public RuntimeIssueDto withMessage(@Nonnull String message) { - this.message = Utils.checkNotNull(message, "message"); - return this; - } - - @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -90,58 +27,30 @@ public boolean equals(java.lang.Object o) { if (o == null || getClass() != o.getClass()) { return false; } - RuntimeIssueDto other = (RuntimeIssueDto) o; - return - Utils.enhancedDeepEquals(this.issueType, other.issueType) && - Utils.enhancedDeepEquals(this.variableName, other.variableName) && - Utils.enhancedDeepEquals(this.message, other.message); + return true; } @Override public int hashCode() { return Utils.enhancedHash( - issueType, variableName, message); + ); } @Override public String toString() { - return Utils.toString(RuntimeIssueDto.class, - "issueType", issueType, - "variableName", variableName, - "message", message); + return Utils.toString(RuntimeIssueDto.class); } @SuppressWarnings("UnusedReturnValue") public final static class Builder { - private IssueType issueType; - - private String variableName; - - private String message; - private Builder() { // force use of static builder() method } - public Builder issueType(@Nonnull IssueType issueType) { - this.issueType = Utils.checkNotNull(issueType, "issueType"); - return this; - } - - public Builder variableName(@Nullable String variableName) { - this.variableName = variableName; - return this; - } - - public Builder message(@Nonnull String message) { - this.message = Utils.checkNotNull(message, "message"); - return this; - } - public RuntimeIssueDto build() { return new RuntimeIssueDto( - issueType, variableName, message); + ); } } diff --git a/src/main/java/co/novu/models/components/SkippedWorkflowDto.java b/src/main/java/co/novu/models/components/SkippedWorkflowDto.java new file mode 100644 index 00000000..830555c4 --- /dev/null +++ b/src/main/java/co/novu/models/components/SkippedWorkflowDto.java @@ -0,0 +1,211 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class SkippedWorkflowDto { + /** + * Type of the layout + */ + @JsonProperty("resourceType") + private ResourceTypeEnum resourceType; + + /** + * Resource ID + */ + @JsonProperty("resourceId") + private String resourceId; + + /** + * Resource name + */ + @JsonProperty("resourceName") + private String resourceName; + + /** + * Reason for skipping + */ + @JsonProperty("reason") + private String reason; + + @JsonCreator + public SkippedWorkflowDto( + @JsonProperty("resourceType") @Nonnull ResourceTypeEnum resourceType, + @JsonProperty("resourceId") @Nonnull String resourceId, + @JsonProperty("resourceName") @Nonnull String resourceName, + @JsonProperty("reason") @Nonnull String reason) { + this.resourceType = Optional.ofNullable(resourceType) + .orElseThrow(() -> new IllegalArgumentException("resourceType cannot be null")); + this.resourceId = Optional.ofNullable(resourceId) + .orElseThrow(() -> new IllegalArgumentException("resourceId cannot be null")); + this.resourceName = Optional.ofNullable(resourceName) + .orElseThrow(() -> new IllegalArgumentException("resourceName cannot be null")); + this.reason = Optional.ofNullable(reason) + .orElseThrow(() -> new IllegalArgumentException("reason cannot be null")); + } + + /** + * Type of the layout + */ + public ResourceTypeEnum resourceType() { + return this.resourceType; + } + + /** + * Resource ID + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Resource name + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Reason for skipping + */ + public String reason() { + return this.reason; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Type of the layout + */ + public SkippedWorkflowDto withResourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + + /** + * Resource ID + */ + public SkippedWorkflowDto withResourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + + /** + * Resource name + */ + public SkippedWorkflowDto withResourceName(@Nonnull String resourceName) { + this.resourceName = Utils.checkNotNull(resourceName, "resourceName"); + return this; + } + + + /** + * Reason for skipping + */ + public SkippedWorkflowDto withReason(@Nonnull String reason) { + this.reason = Utils.checkNotNull(reason, "reason"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SkippedWorkflowDto other = (SkippedWorkflowDto) o; + return + Utils.enhancedDeepEquals(this.resourceType, other.resourceType) && + Utils.enhancedDeepEquals(this.resourceId, other.resourceId) && + Utils.enhancedDeepEquals(this.resourceName, other.resourceName) && + Utils.enhancedDeepEquals(this.reason, other.reason); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + resourceType, resourceId, resourceName, + reason); + } + + @Override + public String toString() { + return Utils.toString(SkippedWorkflowDto.class, + "resourceType", resourceType, + "resourceId", resourceId, + "resourceName", resourceName, + "reason", reason); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private ResourceTypeEnum resourceType; + + private String resourceId; + + private String resourceName; + + private String reason; + + private Builder() { + // force use of static builder() method + } + + /** + * Type of the layout + */ + public Builder resourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + /** + * Resource ID + */ + public Builder resourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + /** + * Resource name + */ + public Builder resourceName(@Nonnull String resourceName) { + this.resourceName = Utils.checkNotNull(resourceName, "resourceName"); + return this; + } + + /** + * Reason for skipping + */ + public Builder reason(@Nonnull String reason) { + this.reason = Utils.checkNotNull(reason, "reason"); + return this; + } + + public SkippedWorkflowDto build() { + return new SkippedWorkflowDto( + resourceType, resourceId, resourceName, + reason); + } + + } +} diff --git a/src/main/java/co/novu/models/components/SmsRenderOutput.java b/src/main/java/co/novu/models/components/SmsRenderOutput.java new file mode 100644 index 00000000..49a9e12a --- /dev/null +++ b/src/main/java/co/novu/models/components/SmsRenderOutput.java @@ -0,0 +1,98 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class SmsRenderOutput { + /** + * Body of the SMS message + */ + @JsonProperty("body") + private String body; + + @JsonCreator + public SmsRenderOutput( + @JsonProperty("body") @Nonnull String body) { + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + /** + * Body of the SMS message + */ + public String body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Body of the SMS message + */ + public SmsRenderOutput withBody(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SmsRenderOutput other = (SmsRenderOutput) o; + return + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + body); + } + + @Override + public String toString() { + return Utils.toString(SmsRenderOutput.class, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String body; + + private Builder() { + // force use of static builder() method + } + + /** + * Body of the SMS message + */ + public Builder body(@Nonnull String body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public SmsRenderOutput build() { + return new SmsRenderOutput( + body); + } + + } +} diff --git a/src/main/java/co/novu/models/components/SmsStepResponseDto.java b/src/main/java/co/novu/models/components/SmsStepResponseDto.java index d48a6dc8..dd449d2e 100644 --- a/src/main/java/co/novu/models/components/SmsStepResponseDto.java +++ b/src/main/java/co/novu/models/components/SmsStepResponseDto.java @@ -92,6 +92,13 @@ public class SmsStepResponseDto implements WorkflowResponseDtoStep { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public SmsStepResponseDto( @JsonProperty("controls") @Nonnull SmsControlsMetadataResponseDto controls, @@ -105,7 +112,8 @@ public SmsStepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public SmsStepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public SmsStepResponseDto( @@ -145,7 +154,8 @@ public SmsStepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -233,6 +243,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -346,6 +363,15 @@ public SmsStepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public SmsStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -367,7 +393,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -376,7 +403,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -393,7 +421,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -423,6 +452,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -523,12 +554,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public SmsStepResponseDto build() { return new SmsStepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/SnoozeSubscriberNotificationDto.java b/src/main/java/co/novu/models/components/SnoozeSubscriberNotificationDto.java new file mode 100644 index 00000000..e3a9d3cf --- /dev/null +++ b/src/main/java/co/novu/models/components/SnoozeSubscriberNotificationDto.java @@ -0,0 +1,99 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.time.OffsetDateTime; +import java.util.Optional; + + +public class SnoozeSubscriberNotificationDto { + /** + * The date and time until which the notification should be snoozed + */ + @JsonProperty("snoozeUntil") + private OffsetDateTime snoozeUntil; + + @JsonCreator + public SnoozeSubscriberNotificationDto( + @JsonProperty("snoozeUntil") @Nonnull OffsetDateTime snoozeUntil) { + this.snoozeUntil = Optional.ofNullable(snoozeUntil) + .orElseThrow(() -> new IllegalArgumentException("snoozeUntil cannot be null")); + } + + /** + * The date and time until which the notification should be snoozed + */ + public OffsetDateTime snoozeUntil() { + return this.snoozeUntil; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The date and time until which the notification should be snoozed + */ + public SnoozeSubscriberNotificationDto withSnoozeUntil(@Nonnull OffsetDateTime snoozeUntil) { + this.snoozeUntil = Utils.checkNotNull(snoozeUntil, "snoozeUntil"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SnoozeSubscriberNotificationDto other = (SnoozeSubscriberNotificationDto) o; + return + Utils.enhancedDeepEquals(this.snoozeUntil, other.snoozeUntil); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + snoozeUntil); + } + + @Override + public String toString() { + return Utils.toString(SnoozeSubscriberNotificationDto.class, + "snoozeUntil", snoozeUntil); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private OffsetDateTime snoozeUntil; + + private Builder() { + // force use of static builder() method + } + + /** + * The date and time until which the notification should be snoozed + */ + public Builder snoozeUntil(@Nonnull OffsetDateTime snoozeUntil) { + this.snoozeUntil = Utils.checkNotNull(snoozeUntil, "snoozeUntil"); + return this; + } + + public SnoozeSubscriberNotificationDto build() { + return new SnoozeSubscriberNotificationDto( + snoozeUntil); + } + + } +} diff --git a/src/main/java/co/novu/models/components/StepResponseDto.java b/src/main/java/co/novu/models/components/StepResponseDto.java index e8d5490e..4054c342 100644 --- a/src/main/java/co/novu/models/components/StepResponseDto.java +++ b/src/main/java/co/novu/models/components/StepResponseDto.java @@ -92,6 +92,13 @@ public class StepResponseDto { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public StepResponseDto( @JsonProperty("controls") @Nonnull ControlsMetadataDto controls, @@ -105,7 +112,8 @@ public StepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public StepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public StepResponseDto( @@ -145,7 +154,8 @@ public StepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -232,6 +242,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -345,6 +362,15 @@ public StepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public StepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -366,7 +392,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -375,7 +402,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -392,7 +420,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -422,6 +451,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -522,12 +553,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public StepResponseDto build() { return new StepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/StepTypeEnum.java b/src/main/java/co/novu/models/components/StepTypeEnum.java index 7dcdb8d7..b1205c23 100644 --- a/src/main/java/co/novu/models/components/StepTypeEnum.java +++ b/src/main/java/co/novu/models/components/StepTypeEnum.java @@ -35,6 +35,7 @@ public class StepTypeEnum { public static final StepTypeEnum DELAY = new StepTypeEnum("delay"); public static final StepTypeEnum THROTTLE = new StepTypeEnum("throttle"); public static final StepTypeEnum CUSTOM = new StepTypeEnum("custom"); + public static final StepTypeEnum HTTP_REQUEST = new StepTypeEnum("http_request"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -118,6 +119,7 @@ private static final Map createValuesMap() { map.put("delay", DELAY); map.put("throttle", THROTTLE); map.put("custom", CUSTOM); + map.put("http_request", HTTP_REQUEST); return map; } @@ -133,6 +135,7 @@ private static final Map createEnumsMap() { map.put("delay", StepTypeEnumEnum.DELAY); map.put("throttle", StepTypeEnumEnum.THROTTLE); map.put("custom", StepTypeEnumEnum.CUSTOM); + map.put("http_request", StepTypeEnumEnum.HTTP_REQUEST); return map; } @@ -148,7 +151,8 @@ public enum StepTypeEnumEnum { TRIGGER("trigger"), DELAY("delay"), THROTTLE("throttle"), - CUSTOM("custom"),; + CUSTOM("custom"), + HTTP_REQUEST("http_request"),; private final String value; diff --git a/src/main/java/co/novu/models/components/EmailControlDtoRendererType.java b/src/main/java/co/novu/models/components/SyncActionEnum.java similarity index 50% rename from src/main/java/co/novu/models/components/EmailControlDtoRendererType.java rename to src/main/java/co/novu/models/components/SyncActionEnum.java index 7ba34b4d..5976614c 100644 --- a/src/main/java/co/novu/models/components/EmailControlDtoRendererType.java +++ b/src/main/java/co/novu/models/components/SyncActionEnum.java @@ -19,40 +19,42 @@ * Use {@code asEnum()} for switch expressions. */ /** - * EmailControlDtoRendererType + * SyncActionEnum * - *

Type of renderer to use (raw HTML or React Email step resolver) + *

Sync action performed */ -public class EmailControlDtoRendererType { +public class SyncActionEnum { - public static final EmailControlDtoRendererType HTML = new EmailControlDtoRendererType("html"); - public static final EmailControlDtoRendererType REACT_EMAIL = new EmailControlDtoRendererType("react-email"); + public static final SyncActionEnum CREATED = new SyncActionEnum("created"); + public static final SyncActionEnum UPDATED = new SyncActionEnum("updated"); + public static final SyncActionEnum SKIPPED = new SyncActionEnum("skipped"); + public static final SyncActionEnum DELETED = new SyncActionEnum("deleted"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not // careful). Keep this field lower case to avoid clashing with // generated member names which will always be upper cased (Java // convention) - private static final Map values = createValuesMap(); - private static final Map enums = createEnumsMap(); + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); private final String value; - private EmailControlDtoRendererType(String value) { + private SyncActionEnum(String value) { this.value = value; } /** - * Returns a EmailControlDtoRendererType with the given value. For a specific value the + * Returns a SyncActionEnum with the given value. For a specific value the * returned object will always be a singleton so reference equality * is satisfied when the values are the same. * - * @param value value to be wrapped as EmailControlDtoRendererType + * @param value value to be wrapped as SyncActionEnum */ @JsonCreator - public static EmailControlDtoRendererType of(String value) { - synchronized (EmailControlDtoRendererType.class) { - return values.computeIfAbsent(value, v -> new EmailControlDtoRendererType(v)); + public static SyncActionEnum of(String value) { + synchronized (SyncActionEnum.class) { + return values.computeIfAbsent(value, v -> new SyncActionEnum(v)); } } @@ -61,7 +63,7 @@ public String value() { return value; } - public Optional asEnum() { + public Optional asEnum() { return Optional.ofNullable(enums.getOrDefault(value, null)); } @@ -82,45 +84,51 @@ public boolean equals(java.lang.Object obj) { return false; if (getClass() != obj.getClass()) return false; - EmailControlDtoRendererType other = (EmailControlDtoRendererType) obj; + SyncActionEnum other = (SyncActionEnum) obj; return Objects.equals(value, other.value); } @Override public String toString() { - return "EmailControlDtoRendererType [value=" + value + "]"; + return "SyncActionEnum [value=" + value + "]"; } // return an array just like an enum - public static EmailControlDtoRendererType[] values() { - synchronized (EmailControlDtoRendererType.class) { - return values.values().toArray(new EmailControlDtoRendererType[] {}); + public static SyncActionEnum[] values() { + synchronized (SyncActionEnum.class) { + return values.values().toArray(new SyncActionEnum[] {}); } } - private static final Map createValuesMap() { - Map map = new LinkedHashMap<>(); - map.put("html", HTML); - map.put("react-email", REACT_EMAIL); + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("created", CREATED); + map.put("updated", UPDATED); + map.put("skipped", SKIPPED); + map.put("deleted", DELETED); return map; } - private static final Map createEnumsMap() { - Map map = new HashMap<>(); - map.put("html", EmailControlDtoRendererTypeEnum.HTML); - map.put("react-email", EmailControlDtoRendererTypeEnum.REACT_EMAIL); + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("created", SyncActionEnumEnum.CREATED); + map.put("updated", SyncActionEnumEnum.UPDATED); + map.put("skipped", SyncActionEnumEnum.SKIPPED); + map.put("deleted", SyncActionEnumEnum.DELETED); return map; } - public enum EmailControlDtoRendererTypeEnum { + public enum SyncActionEnumEnum { - HTML("html"), - REACT_EMAIL("react-email"),; + CREATED("created"), + UPDATED("updated"), + SKIPPED("skipped"), + DELETED("deleted"),; private final String value; - private EmailControlDtoRendererTypeEnum(String value) { + private SyncActionEnumEnum(String value) { this.value = value; } diff --git a/src/main/java/co/novu/models/components/SyncResultDto.java b/src/main/java/co/novu/models/components/SyncResultDto.java new file mode 100644 index 00000000..9ba4e948 --- /dev/null +++ b/src/main/java/co/novu/models/components/SyncResultDto.java @@ -0,0 +1,248 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SyncResultDto { + /** + * Type of the layout + */ + @JsonProperty("resourceType") + private ResourceTypeEnum resourceType; + + /** + * Successfully synced resources + */ + @JsonProperty("successful") + private List successful; + + /** + * Failed resource syncs + */ + @JsonProperty("failed") + private List failed; + + /** + * Skipped resources + */ + @JsonProperty("skipped") + private List skipped; + + /** + * Total number of resources processed + */ + @JsonProperty("totalProcessed") + private double totalProcessed; + + @JsonCreator + public SyncResultDto( + @JsonProperty("resourceType") @Nonnull ResourceTypeEnum resourceType, + @JsonProperty("successful") @Nonnull List successful, + @JsonProperty("failed") @Nonnull List failed, + @JsonProperty("skipped") @Nonnull List skipped, + @JsonProperty("totalProcessed") double totalProcessed) { + this.resourceType = Optional.ofNullable(resourceType) + .orElseThrow(() -> new IllegalArgumentException("resourceType cannot be null")); + this.successful = Optional.ofNullable(successful) + .orElseThrow(() -> new IllegalArgumentException("successful cannot be null")); + this.failed = Optional.ofNullable(failed) + .orElseThrow(() -> new IllegalArgumentException("failed cannot be null")); + this.skipped = Optional.ofNullable(skipped) + .orElseThrow(() -> new IllegalArgumentException("skipped cannot be null")); + this.totalProcessed = totalProcessed; + } + + /** + * Type of the layout + */ + public ResourceTypeEnum resourceType() { + return this.resourceType; + } + + /** + * Successfully synced resources + */ + public List successful() { + return this.successful; + } + + /** + * Failed resource syncs + */ + public List failed() { + return this.failed; + } + + /** + * Skipped resources + */ + public List skipped() { + return this.skipped; + } + + /** + * Total number of resources processed + */ + public double totalProcessed() { + return this.totalProcessed; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Type of the layout + */ + public SyncResultDto withResourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + + /** + * Successfully synced resources + */ + public SyncResultDto withSuccessful(@Nonnull List successful) { + this.successful = Utils.checkNotNull(successful, "successful"); + return this; + } + + + /** + * Failed resource syncs + */ + public SyncResultDto withFailed(@Nonnull List failed) { + this.failed = Utils.checkNotNull(failed, "failed"); + return this; + } + + + /** + * Skipped resources + */ + public SyncResultDto withSkipped(@Nonnull List skipped) { + this.skipped = Utils.checkNotNull(skipped, "skipped"); + return this; + } + + + /** + * Total number of resources processed + */ + public SyncResultDto withTotalProcessed(double totalProcessed) { + this.totalProcessed = totalProcessed; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyncResultDto other = (SyncResultDto) o; + return + Utils.enhancedDeepEquals(this.resourceType, other.resourceType) && + Utils.enhancedDeepEquals(this.successful, other.successful) && + Utils.enhancedDeepEquals(this.failed, other.failed) && + Utils.enhancedDeepEquals(this.skipped, other.skipped) && + Utils.enhancedDeepEquals(this.totalProcessed, other.totalProcessed); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + resourceType, successful, failed, + skipped, totalProcessed); + } + + @Override + public String toString() { + return Utils.toString(SyncResultDto.class, + "resourceType", resourceType, + "successful", successful, + "failed", failed, + "skipped", skipped, + "totalProcessed", totalProcessed); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private ResourceTypeEnum resourceType; + + private List successful; + + private List failed; + + private List skipped; + + private double totalProcessed; + + private Builder() { + // force use of static builder() method + } + + /** + * Type of the layout + */ + public Builder resourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + /** + * Successfully synced resources + */ + public Builder successful(@Nonnull List successful) { + this.successful = Utils.checkNotNull(successful, "successful"); + return this; + } + + /** + * Failed resource syncs + */ + public Builder failed(@Nonnull List failed) { + this.failed = Utils.checkNotNull(failed, "failed"); + return this; + } + + /** + * Skipped resources + */ + public Builder skipped(@Nonnull List skipped) { + this.skipped = Utils.checkNotNull(skipped, "skipped"); + return this; + } + + /** + * Total number of resources processed + */ + public Builder totalProcessed(double totalProcessed) { + this.totalProcessed = totalProcessed; + return this; + } + + public SyncResultDto build() { + return new SyncResultDto( + resourceType, successful, failed, + skipped, totalProcessed); + } + + } +} diff --git a/src/main/java/co/novu/models/components/SyncedWorkflowDto.java b/src/main/java/co/novu/models/components/SyncedWorkflowDto.java new file mode 100644 index 00000000..e41d810d --- /dev/null +++ b/src/main/java/co/novu/models/components/SyncedWorkflowDto.java @@ -0,0 +1,211 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nonnull; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class SyncedWorkflowDto { + /** + * Type of the layout + */ + @JsonProperty("resourceType") + private ResourceTypeEnum resourceType; + + /** + * Resource ID + */ + @JsonProperty("resourceId") + private String resourceId; + + /** + * Resource name + */ + @JsonProperty("resourceName") + private String resourceName; + + /** + * Sync action performed + */ + @JsonProperty("action") + private SyncActionEnum action; + + @JsonCreator + public SyncedWorkflowDto( + @JsonProperty("resourceType") @Nonnull ResourceTypeEnum resourceType, + @JsonProperty("resourceId") @Nonnull String resourceId, + @JsonProperty("resourceName") @Nonnull String resourceName, + @JsonProperty("action") @Nonnull SyncActionEnum action) { + this.resourceType = Optional.ofNullable(resourceType) + .orElseThrow(() -> new IllegalArgumentException("resourceType cannot be null")); + this.resourceId = Optional.ofNullable(resourceId) + .orElseThrow(() -> new IllegalArgumentException("resourceId cannot be null")); + this.resourceName = Optional.ofNullable(resourceName) + .orElseThrow(() -> new IllegalArgumentException("resourceName cannot be null")); + this.action = Optional.ofNullable(action) + .orElseThrow(() -> new IllegalArgumentException("action cannot be null")); + } + + /** + * Type of the layout + */ + public ResourceTypeEnum resourceType() { + return this.resourceType; + } + + /** + * Resource ID + */ + public String resourceId() { + return this.resourceId; + } + + /** + * Resource name + */ + public String resourceName() { + return this.resourceName; + } + + /** + * Sync action performed + */ + public SyncActionEnum action() { + return this.action; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Type of the layout + */ + public SyncedWorkflowDto withResourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + + /** + * Resource ID + */ + public SyncedWorkflowDto withResourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + + /** + * Resource name + */ + public SyncedWorkflowDto withResourceName(@Nonnull String resourceName) { + this.resourceName = Utils.checkNotNull(resourceName, "resourceName"); + return this; + } + + + /** + * Sync action performed + */ + public SyncedWorkflowDto withAction(@Nonnull SyncActionEnum action) { + this.action = Utils.checkNotNull(action, "action"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SyncedWorkflowDto other = (SyncedWorkflowDto) o; + return + Utils.enhancedDeepEquals(this.resourceType, other.resourceType) && + Utils.enhancedDeepEquals(this.resourceId, other.resourceId) && + Utils.enhancedDeepEquals(this.resourceName, other.resourceName) && + Utils.enhancedDeepEquals(this.action, other.action); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + resourceType, resourceId, resourceName, + action); + } + + @Override + public String toString() { + return Utils.toString(SyncedWorkflowDto.class, + "resourceType", resourceType, + "resourceId", resourceId, + "resourceName", resourceName, + "action", action); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private ResourceTypeEnum resourceType; + + private String resourceId; + + private String resourceName; + + private SyncActionEnum action; + + private Builder() { + // force use of static builder() method + } + + /** + * Type of the layout + */ + public Builder resourceType(@Nonnull ResourceTypeEnum resourceType) { + this.resourceType = Utils.checkNotNull(resourceType, "resourceType"); + return this; + } + + /** + * Resource ID + */ + public Builder resourceId(@Nonnull String resourceId) { + this.resourceId = Utils.checkNotNull(resourceId, "resourceId"); + return this; + } + + /** + * Resource name + */ + public Builder resourceName(@Nonnull String resourceName) { + this.resourceName = Utils.checkNotNull(resourceName, "resourceName"); + return this; + } + + /** + * Sync action performed + */ + public Builder action(@Nonnull SyncActionEnum action) { + this.action = Utils.checkNotNull(action, "action"); + return this; + } + + public SyncedWorkflowDto build() { + return new SyncedWorkflowDto( + resourceType, resourceId, resourceName, + action); + } + + } +} diff --git a/src/main/java/co/novu/models/components/Target.java b/src/main/java/co/novu/models/components/Target.java index 19198825..c449c8ac 100644 --- a/src/main/java/co/novu/models/components/Target.java +++ b/src/main/java/co/novu/models/components/Target.java @@ -21,7 +21,7 @@ /** * Target * - *

Target window for the redirection. + *

Target attribute for the redirect link */ public class Target { diff --git a/src/main/java/co/novu/models/components/ThrottleStepResponseDto.java b/src/main/java/co/novu/models/components/ThrottleStepResponseDto.java index 2af063c7..4d4c564b 100644 --- a/src/main/java/co/novu/models/components/ThrottleStepResponseDto.java +++ b/src/main/java/co/novu/models/components/ThrottleStepResponseDto.java @@ -92,6 +92,13 @@ public class ThrottleStepResponseDto implements WorkflowResponseDtoStep { @JsonProperty("issues") private StepIssuesDto issues; + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("stepResolverHash") + private String stepResolverHash; + @JsonCreator public ThrottleStepResponseDto( @JsonProperty("controls") @Nonnull ThrottleControlsMetadataResponseDto controls, @@ -105,7 +112,8 @@ public ThrottleStepResponseDto( @JsonProperty("origin") @Nonnull ResourceOriginEnum origin, @JsonProperty("workflowId") @Nonnull String workflowId, @JsonProperty("workflowDatabaseId") @Nonnull String workflowDatabaseId, - @JsonProperty("issues") @Nullable StepIssuesDto issues) { + @JsonProperty("issues") @Nullable StepIssuesDto issues, + @JsonProperty("stepResolverHash") @Nullable String stepResolverHash) { variables = Utils.emptyMapIfNull(variables); this.controls = Optional.ofNullable(controls) .orElseThrow(() -> new IllegalArgumentException("controls cannot be null")); @@ -129,6 +137,7 @@ public ThrottleStepResponseDto( this.workflowDatabaseId = Optional.ofNullable(workflowDatabaseId) .orElseThrow(() -> new IllegalArgumentException("workflowDatabaseId cannot be null")); this.issues = issues; + this.stepResolverHash = stepResolverHash; } public ThrottleStepResponseDto( @@ -145,7 +154,8 @@ public ThrottleStepResponseDto( this(controls, null, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, null); + workflowId, workflowDatabaseId, null, + null); } /** @@ -233,6 +243,13 @@ public Optional issues() { return Optional.ofNullable(this.issues); } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Optional stepResolverHash() { + return Optional.ofNullable(this.stepResolverHash); + } + public static Builder builder() { return new Builder(); } @@ -346,6 +363,15 @@ public ThrottleStepResponseDto withIssues(@Nullable StepIssuesDto issues) { } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public ThrottleStepResponseDto withStepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + + @Override public boolean equals(java.lang.Object o) { if (this == o) { @@ -367,7 +393,8 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.origin, other.origin) && Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && Utils.enhancedDeepEquals(this.workflowDatabaseId, other.workflowDatabaseId) && - Utils.enhancedDeepEquals(this.issues, other.issues); + Utils.enhancedDeepEquals(this.issues, other.issues) && + Utils.enhancedDeepEquals(this.stepResolverHash, other.stepResolverHash); } @Override @@ -376,7 +403,8 @@ public int hashCode() { controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } @Override @@ -393,7 +421,8 @@ public String toString() { "origin", origin, "workflowId", workflowId, "workflowDatabaseId", workflowDatabaseId, - "issues", issues); + "issues", issues, + "stepResolverHash", stepResolverHash); } @SuppressWarnings("UnusedReturnValue") @@ -423,6 +452,8 @@ public final static class Builder { private StepIssuesDto issues; + private String stepResolverHash; + private Builder() { // force use of static builder() method } @@ -523,12 +554,21 @@ public Builder issues(@Nullable StepIssuesDto issues) { return this; } + /** + * Hash identifying the deployed Cloudflare Worker for this step + */ + public Builder stepResolverHash(@Nullable String stepResolverHash) { + this.stepResolverHash = stepResolverHash; + return this; + } + public ThrottleStepResponseDto build() { return new ThrottleStepResponseDto( controls, controlValues, variables, stepId, id, name, slug, type, origin, - workflowId, workflowDatabaseId, issues); + workflowId, workflowDatabaseId, issues, + stepResolverHash); } } diff --git a/src/main/java/co/novu/models/components/TimeUnitEnum.java b/src/main/java/co/novu/models/components/TimeUnitEnum.java new file mode 100644 index 00000000..b0f27e7d --- /dev/null +++ b/src/main/java/co/novu/models/components/TimeUnitEnum.java @@ -0,0 +1,148 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +/** + * TimeUnitEnum + * + *

Time unit + */ +public class TimeUnitEnum { + + public static final TimeUnitEnum SECONDS = new TimeUnitEnum("seconds"); + public static final TimeUnitEnum MINUTES = new TimeUnitEnum("minutes"); + public static final TimeUnitEnum HOURS = new TimeUnitEnum("hours"); + public static final TimeUnitEnum DAYS = new TimeUnitEnum("days"); + public static final TimeUnitEnum WEEKS = new TimeUnitEnum("weeks"); + public static final TimeUnitEnum MONTHS = new TimeUnitEnum("months"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private TimeUnitEnum(String value) { + this.value = value; + } + + /** + * Returns a TimeUnitEnum with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as TimeUnitEnum + */ + @JsonCreator + public static TimeUnitEnum of(String value) { + synchronized (TimeUnitEnum.class) { + return values.computeIfAbsent(value, v -> new TimeUnitEnum(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + TimeUnitEnum other = (TimeUnitEnum) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "TimeUnitEnum [value=" + value + "]"; + } + + // return an array just like an enum + public static TimeUnitEnum[] values() { + synchronized (TimeUnitEnum.class) { + return values.values().toArray(new TimeUnitEnum[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("seconds", SECONDS); + map.put("minutes", MINUTES); + map.put("hours", HOURS); + map.put("days", DAYS); + map.put("weeks", WEEKS); + map.put("months", MONTHS); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("seconds", TimeUnitEnumEnum.SECONDS); + map.put("minutes", TimeUnitEnumEnum.MINUTES); + map.put("hours", TimeUnitEnumEnum.HOURS); + map.put("days", TimeUnitEnumEnum.DAYS); + map.put("weeks", TimeUnitEnumEnum.WEEKS); + map.put("months", TimeUnitEnumEnum.MONTHS); + return map; + } + + + public enum TimeUnitEnumEnum { + + SECONDS("seconds"), + MINUTES("minutes"), + HOURS("hours"), + DAYS("days"), + WEEKS("weeks"), + MONTHS("months"),; + + private final String value; + + private TimeUnitEnumEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/TriggerEventResponseDto.java b/src/main/java/co/novu/models/components/TriggerEventResponseDto.java index 2c67de0a..38455b15 100644 --- a/src/main/java/co/novu/models/components/TriggerEventResponseDto.java +++ b/src/main/java/co/novu/models/components/TriggerEventResponseDto.java @@ -43,6 +43,13 @@ public class TriggerEventResponseDto { @JsonProperty("transactionId") private String transactionId; + /** + * Link to the activity feed for this trigger event + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("activityFeedLink") + private String activityFeedLink; + @JsonInclude(Include.NON_ABSENT) @JsonProperty("jobData") @@ -54,12 +61,14 @@ public TriggerEventResponseDto( @JsonProperty("status") @Nonnull TriggerEventResponseDtoStatus status, @JsonProperty("error") @Nullable List error, @JsonProperty("transactionId") @Nullable String transactionId, + @JsonProperty("activityFeedLink") @Nullable String activityFeedLink, @JsonProperty("jobData") @Nullable JobData jobData) { this.acknowledged = acknowledged; this.status = Optional.ofNullable(status) .orElseThrow(() -> new IllegalArgumentException("status cannot be null")); this.error = error; this.transactionId = transactionId; + this.activityFeedLink = activityFeedLink; this.jobData = jobData; } @@ -67,7 +76,7 @@ public TriggerEventResponseDto( boolean acknowledged, @Nonnull TriggerEventResponseDtoStatus status) { this(acknowledged, status, null, - null, null); + null, null, null); } /** @@ -98,6 +107,13 @@ public Optional transactionId() { return Optional.ofNullable(this.transactionId); } + /** + * Link to the activity feed for this trigger event + */ + public Optional activityFeedLink() { + return Optional.ofNullable(this.activityFeedLink); + } + public Optional jobData() { return Optional.ofNullable(this.jobData); } @@ -143,6 +159,15 @@ public TriggerEventResponseDto withTransactionId(@Nullable String transactionId) } + /** + * Link to the activity feed for this trigger event + */ + public TriggerEventResponseDto withActivityFeedLink(@Nullable String activityFeedLink) { + this.activityFeedLink = activityFeedLink; + return this; + } + + public TriggerEventResponseDto withJobData(@Nullable JobData jobData) { this.jobData = jobData; return this; @@ -163,6 +188,7 @@ public boolean equals(java.lang.Object o) { Utils.enhancedDeepEquals(this.status, other.status) && Utils.enhancedDeepEquals(this.error, other.error) && Utils.enhancedDeepEquals(this.transactionId, other.transactionId) && + Utils.enhancedDeepEquals(this.activityFeedLink, other.activityFeedLink) && Utils.enhancedDeepEquals(this.jobData, other.jobData); } @@ -170,7 +196,7 @@ public boolean equals(java.lang.Object o) { public int hashCode() { return Utils.enhancedHash( acknowledged, status, error, - transactionId, jobData); + transactionId, activityFeedLink, jobData); } @Override @@ -180,6 +206,7 @@ public String toString() { "status", status, "error", error, "transactionId", transactionId, + "activityFeedLink", activityFeedLink, "jobData", jobData); } @@ -194,6 +221,8 @@ public final static class Builder { private String transactionId; + private String activityFeedLink; + private JobData jobData; private Builder() { @@ -232,6 +261,14 @@ public Builder transactionId(@Nullable String transactionId) { return this; } + /** + * Link to the activity feed for this trigger event + */ + public Builder activityFeedLink(@Nullable String activityFeedLink) { + this.activityFeedLink = activityFeedLink; + return this; + } + public Builder jobData(@Nullable JobData jobData) { this.jobData = jobData; return this; @@ -240,7 +277,7 @@ public Builder jobData(@Nullable JobData jobData) { public TriggerEventResponseDto build() { return new TriggerEventResponseDto( acknowledged, status, error, - transactionId, jobData); + transactionId, activityFeedLink, jobData); } } diff --git a/src/main/java/co/novu/models/components/TypeChat.java b/src/main/java/co/novu/models/components/TypeChat.java new file mode 100644 index 00000000..8b231352 --- /dev/null +++ b/src/main/java/co/novu/models/components/TypeChat.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +public class TypeChat { + + public static final TypeChat CHAT = new TypeChat("chat"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private TypeChat(String value) { + this.value = value; + } + + /** + * Returns a TypeChat with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as TypeChat + */ + @JsonCreator + public static TypeChat of(String value) { + synchronized (TypeChat.class) { + return values.computeIfAbsent(value, v -> new TypeChat(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + TypeChat other = (TypeChat) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "TypeChat [value=" + value + "]"; + } + + // return an array just like an enum + public static TypeChat[] values() { + synchronized (TypeChat.class) { + return values.values().toArray(new TypeChat[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("chat", CHAT); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("chat", TypeChatEnum.CHAT); + return map; + } + + + public enum TypeChatEnum { + + CHAT("chat"),; + + private final String value; + + private TypeChatEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/TypeDelay.java b/src/main/java/co/novu/models/components/TypeDelay.java new file mode 100644 index 00000000..ae16db27 --- /dev/null +++ b/src/main/java/co/novu/models/components/TypeDelay.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +public class TypeDelay { + + public static final TypeDelay DELAY = new TypeDelay("delay"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private TypeDelay(String value) { + this.value = value; + } + + /** + * Returns a TypeDelay with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as TypeDelay + */ + @JsonCreator + public static TypeDelay of(String value) { + synchronized (TypeDelay.class) { + return values.computeIfAbsent(value, v -> new TypeDelay(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + TypeDelay other = (TypeDelay) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "TypeDelay [value=" + value + "]"; + } + + // return an array just like an enum + public static TypeDelay[] values() { + synchronized (TypeDelay.class) { + return values.values().toArray(new TypeDelay[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("delay", DELAY); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("delay", TypeDelayEnum.DELAY); + return map; + } + + + public enum TypeDelayEnum { + + DELAY("delay"),; + + private final String value; + + private TypeDelayEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/TypeDigest.java b/src/main/java/co/novu/models/components/TypeDigest.java new file mode 100644 index 00000000..e610b87e --- /dev/null +++ b/src/main/java/co/novu/models/components/TypeDigest.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +public class TypeDigest { + + public static final TypeDigest DIGEST = new TypeDigest("digest"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private TypeDigest(String value) { + this.value = value; + } + + /** + * Returns a TypeDigest with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as TypeDigest + */ + @JsonCreator + public static TypeDigest of(String value) { + synchronized (TypeDigest.class) { + return values.computeIfAbsent(value, v -> new TypeDigest(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + TypeDigest other = (TypeDigest) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "TypeDigest [value=" + value + "]"; + } + + // return an array just like an enum + public static TypeDigest[] values() { + synchronized (TypeDigest.class) { + return values.values().toArray(new TypeDigest[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("digest", DIGEST); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("digest", TypeDigestEnum.DIGEST); + return map; + } + + + public enum TypeDigestEnum { + + DIGEST("digest"),; + + private final String value; + + private TypeDigestEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/TypeInApp.java b/src/main/java/co/novu/models/components/TypeInApp.java new file mode 100644 index 00000000..65b0bc54 --- /dev/null +++ b/src/main/java/co/novu/models/components/TypeInApp.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +public class TypeInApp { + + public static final TypeInApp IN_APP = new TypeInApp("in_app"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private TypeInApp(String value) { + this.value = value; + } + + /** + * Returns a TypeInApp with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as TypeInApp + */ + @JsonCreator + public static TypeInApp of(String value) { + synchronized (TypeInApp.class) { + return values.computeIfAbsent(value, v -> new TypeInApp(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + TypeInApp other = (TypeInApp) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "TypeInApp [value=" + value + "]"; + } + + // return an array just like an enum + public static TypeInApp[] values() { + synchronized (TypeInApp.class) { + return values.values().toArray(new TypeInApp[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("in_app", IN_APP); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("in_app", TypeInAppEnum.IN_APP); + return map; + } + + + public enum TypeInAppEnum { + + IN_APP("in_app"),; + + private final String value; + + private TypeInAppEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/TypePush.java b/src/main/java/co/novu/models/components/TypePush.java new file mode 100644 index 00000000..df838e06 --- /dev/null +++ b/src/main/java/co/novu/models/components/TypePush.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +public class TypePush { + + public static final TypePush PUSH = new TypePush("push"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private TypePush(String value) { + this.value = value; + } + + /** + * Returns a TypePush with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as TypePush + */ + @JsonCreator + public static TypePush of(String value) { + synchronized (TypePush.class) { + return values.computeIfAbsent(value, v -> new TypePush(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + TypePush other = (TypePush) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "TypePush [value=" + value + "]"; + } + + // return an array just like an enum + public static TypePush[] values() { + synchronized (TypePush.class) { + return values.values().toArray(new TypePush[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("push", PUSH); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("push", TypePushEnum.PUSH); + return map; + } + + + public enum TypePushEnum { + + PUSH("push"),; + + private final String value; + + private TypePushEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/TypeSms.java b/src/main/java/co/novu/models/components/TypeSms.java new file mode 100644 index 00000000..4b7ac141 --- /dev/null +++ b/src/main/java/co/novu/models/components/TypeSms.java @@ -0,0 +1,123 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.Override; +import java.lang.String; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wrapper for an "open" enum that can handle unknown values from API responses + * without runtime errors. Instances are immutable singletons with reference equality. + * Use {@code asEnum()} for switch expressions. + */ +public class TypeSms { + + public static final TypeSms SMS = new TypeSms("sms"); + + // This map will grow whenever a Color gets created with a new + // unrecognized value (a potential memory leak if the user is not + // careful). Keep this field lower case to avoid clashing with + // generated member names which will always be upper cased (Java + // convention) + private static final Map values = createValuesMap(); + private static final Map enums = createEnumsMap(); + + private final String value; + + private TypeSms(String value) { + this.value = value; + } + + /** + * Returns a TypeSms with the given value. For a specific value the + * returned object will always be a singleton so reference equality + * is satisfied when the values are the same. + * + * @param value value to be wrapped as TypeSms + */ + @JsonCreator + public static TypeSms of(String value) { + synchronized (TypeSms.class) { + return values.computeIfAbsent(value, v -> new TypeSms(v)); + } + } + + @JsonValue + public String value() { + return value; + } + + public Optional asEnum() { + return Optional.ofNullable(enums.getOrDefault(value, null)); + } + + public boolean isKnown() { + return asEnum().isPresent(); + } + + @Override + public int hashCode() { + return Objects.hash(value); + } + + @Override + public boolean equals(java.lang.Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + TypeSms other = (TypeSms) obj; + return Objects.equals(value, other.value); + } + + @Override + public String toString() { + return "TypeSms [value=" + value + "]"; + } + + // return an array just like an enum + public static TypeSms[] values() { + synchronized (TypeSms.class) { + return values.values().toArray(new TypeSms[] {}); + } + } + + private static final Map createValuesMap() { + Map map = new LinkedHashMap<>(); + map.put("sms", SMS); + return map; + } + + private static final Map createEnumsMap() { + Map map = new HashMap<>(); + map.put("sms", TypeSmsEnum.SMS); + return map; + } + + + public enum TypeSmsEnum { + + SMS("sms"),; + + private final String value; + + private TypeSmsEnum(String value) { + this.value = value; + } + + public String value() { + return value; + } + } +} + diff --git a/src/main/java/co/novu/models/components/UiComponentEnum.java b/src/main/java/co/novu/models/components/UiComponentEnum.java index fc53abcc..a0d4628c 100644 --- a/src/main/java/co/novu/models/components/UiComponentEnum.java +++ b/src/main/java/co/novu/models/components/UiComponentEnum.java @@ -27,7 +27,6 @@ public class UiComponentEnum { public static final UiComponentEnum EMAIL_EDITOR_SELECT = new UiComponentEnum("EMAIL_EDITOR_SELECT"); public static final UiComponentEnum LAYOUT_SELECT = new UiComponentEnum("LAYOUT_SELECT"); - public static final UiComponentEnum EMAIL_RENDERER_SELECT = new UiComponentEnum("EMAIL_RENDERER_SELECT"); public static final UiComponentEnum BLOCK_EDITOR = new UiComponentEnum("BLOCK_EDITOR"); public static final UiComponentEnum EMAIL_BODY = new UiComponentEnum("EMAIL_BODY"); public static final UiComponentEnum TEXT_FULL_LINE = new UiComponentEnum("TEXT_FULL_LINE"); @@ -63,6 +62,14 @@ public class UiComponentEnum { public static final UiComponentEnum QUERY_EDITOR = new UiComponentEnum("QUERY_EDITOR"); public static final UiComponentEnum DATA = new UiComponentEnum("DATA"); public static final UiComponentEnum LAYOUT_EMAIL = new UiComponentEnum("LAYOUT_EMAIL"); + public static final UiComponentEnum DESTINATION_METHOD = new UiComponentEnum("DESTINATION_METHOD"); + public static final UiComponentEnum DESTINATION_URL = new UiComponentEnum("DESTINATION_URL"); + public static final UiComponentEnum DESTINATION_HEADERS = new UiComponentEnum("DESTINATION_HEADERS"); + public static final UiComponentEnum DESTINATION_BODY = new UiComponentEnum("DESTINATION_BODY"); + public static final UiComponentEnum DESTINATION_RESPONSE_BODY_SCHEMA = new UiComponentEnum("DESTINATION_RESPONSE_BODY_SCHEMA"); + public static final UiComponentEnum DESTINATION_ENFORCE_SCHEMA_VALIDATION = new UiComponentEnum("DESTINATION_ENFORCE_SCHEMA_VALIDATION"); + public static final UiComponentEnum DESTINATION_CONTINUE_ON_FAILURE = new UiComponentEnum("DESTINATION_CONTINUE_ON_FAILURE"); + public static final UiComponentEnum DESTINATION_TIMEOUT = new UiComponentEnum("DESTINATION_TIMEOUT"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -138,7 +145,6 @@ private static final Map createValuesMap() { Map map = new LinkedHashMap<>(); map.put("EMAIL_EDITOR_SELECT", EMAIL_EDITOR_SELECT); map.put("LAYOUT_SELECT", LAYOUT_SELECT); - map.put("EMAIL_RENDERER_SELECT", EMAIL_RENDERER_SELECT); map.put("BLOCK_EDITOR", BLOCK_EDITOR); map.put("EMAIL_BODY", EMAIL_BODY); map.put("TEXT_FULL_LINE", TEXT_FULL_LINE); @@ -174,6 +180,14 @@ private static final Map createValuesMap() { map.put("QUERY_EDITOR", QUERY_EDITOR); map.put("DATA", DATA); map.put("LAYOUT_EMAIL", LAYOUT_EMAIL); + map.put("DESTINATION_METHOD", DESTINATION_METHOD); + map.put("DESTINATION_URL", DESTINATION_URL); + map.put("DESTINATION_HEADERS", DESTINATION_HEADERS); + map.put("DESTINATION_BODY", DESTINATION_BODY); + map.put("DESTINATION_RESPONSE_BODY_SCHEMA", DESTINATION_RESPONSE_BODY_SCHEMA); + map.put("DESTINATION_ENFORCE_SCHEMA_VALIDATION", DESTINATION_ENFORCE_SCHEMA_VALIDATION); + map.put("DESTINATION_CONTINUE_ON_FAILURE", DESTINATION_CONTINUE_ON_FAILURE); + map.put("DESTINATION_TIMEOUT", DESTINATION_TIMEOUT); return map; } @@ -181,7 +195,6 @@ private static final Map createEnumsMap() { Map map = new HashMap<>(); map.put("EMAIL_EDITOR_SELECT", UiComponentEnumEnum.EMAIL_EDITOR_SELECT); map.put("LAYOUT_SELECT", UiComponentEnumEnum.LAYOUT_SELECT); - map.put("EMAIL_RENDERER_SELECT", UiComponentEnumEnum.EMAIL_RENDERER_SELECT); map.put("BLOCK_EDITOR", UiComponentEnumEnum.BLOCK_EDITOR); map.put("EMAIL_BODY", UiComponentEnumEnum.EMAIL_BODY); map.put("TEXT_FULL_LINE", UiComponentEnumEnum.TEXT_FULL_LINE); @@ -217,6 +230,14 @@ private static final Map createEnumsMap() { map.put("QUERY_EDITOR", UiComponentEnumEnum.QUERY_EDITOR); map.put("DATA", UiComponentEnumEnum.DATA); map.put("LAYOUT_EMAIL", UiComponentEnumEnum.LAYOUT_EMAIL); + map.put("DESTINATION_METHOD", UiComponentEnumEnum.DESTINATION_METHOD); + map.put("DESTINATION_URL", UiComponentEnumEnum.DESTINATION_URL); + map.put("DESTINATION_HEADERS", UiComponentEnumEnum.DESTINATION_HEADERS); + map.put("DESTINATION_BODY", UiComponentEnumEnum.DESTINATION_BODY); + map.put("DESTINATION_RESPONSE_BODY_SCHEMA", UiComponentEnumEnum.DESTINATION_RESPONSE_BODY_SCHEMA); + map.put("DESTINATION_ENFORCE_SCHEMA_VALIDATION", UiComponentEnumEnum.DESTINATION_ENFORCE_SCHEMA_VALIDATION); + map.put("DESTINATION_CONTINUE_ON_FAILURE", UiComponentEnumEnum.DESTINATION_CONTINUE_ON_FAILURE); + map.put("DESTINATION_TIMEOUT", UiComponentEnumEnum.DESTINATION_TIMEOUT); return map; } @@ -225,7 +246,6 @@ public enum UiComponentEnumEnum { EMAIL_EDITOR_SELECT("EMAIL_EDITOR_SELECT"), LAYOUT_SELECT("LAYOUT_SELECT"), - EMAIL_RENDERER_SELECT("EMAIL_RENDERER_SELECT"), BLOCK_EDITOR("BLOCK_EDITOR"), EMAIL_BODY("EMAIL_BODY"), TEXT_FULL_LINE("TEXT_FULL_LINE"), @@ -260,7 +280,15 @@ public enum UiComponentEnumEnum { PUSH_SUBJECT("PUSH_SUBJECT"), QUERY_EDITOR("QUERY_EDITOR"), DATA("DATA"), - LAYOUT_EMAIL("LAYOUT_EMAIL"),; + LAYOUT_EMAIL("LAYOUT_EMAIL"), + DESTINATION_METHOD("DESTINATION_METHOD"), + DESTINATION_URL("DESTINATION_URL"), + DESTINATION_HEADERS("DESTINATION_HEADERS"), + DESTINATION_BODY("DESTINATION_BODY"), + DESTINATION_RESPONSE_BODY_SCHEMA("DESTINATION_RESPONSE_BODY_SCHEMA"), + DESTINATION_ENFORCE_SCHEMA_VALIDATION("DESTINATION_ENFORCE_SCHEMA_VALIDATION"), + DESTINATION_CONTINUE_ON_FAILURE("DESTINATION_CONTINUE_ON_FAILURE"), + DESTINATION_TIMEOUT("DESTINATION_TIMEOUT"),; private final String value; diff --git a/src/main/java/co/novu/models/components/UiSchemaGroupEnum.java b/src/main/java/co/novu/models/components/UiSchemaGroupEnum.java index 111cfa64..d3620cab 100644 --- a/src/main/java/co/novu/models/components/UiSchemaGroupEnum.java +++ b/src/main/java/co/novu/models/components/UiSchemaGroupEnum.java @@ -35,6 +35,7 @@ public class UiSchemaGroupEnum { public static final UiSchemaGroupEnum PUSH = new UiSchemaGroupEnum("PUSH"); public static final UiSchemaGroupEnum SKIP = new UiSchemaGroupEnum("SKIP"); public static final UiSchemaGroupEnum LAYOUT = new UiSchemaGroupEnum("LAYOUT"); + public static final UiSchemaGroupEnum HTTP_REQUEST = new UiSchemaGroupEnum("HTTP_REQUEST"); // This map will grow whenever a Color gets created with a new // unrecognized value (a potential memory leak if the user is not @@ -118,6 +119,7 @@ private static final Map createValuesMap() { map.put("PUSH", PUSH); map.put("SKIP", SKIP); map.put("LAYOUT", LAYOUT); + map.put("HTTP_REQUEST", HTTP_REQUEST); return map; } @@ -133,6 +135,7 @@ private static final Map createEnumsMap() { map.put("PUSH", UiSchemaGroupEnumEnum.PUSH); map.put("SKIP", UiSchemaGroupEnumEnum.SKIP); map.put("LAYOUT", UiSchemaGroupEnumEnum.LAYOUT); + map.put("HTTP_REQUEST", UiSchemaGroupEnumEnum.HTTP_REQUEST); return map; } @@ -148,7 +151,8 @@ public enum UiSchemaGroupEnumEnum { CHAT("CHAT"), PUSH("PUSH"), SKIP("SKIP"), - LAYOUT("LAYOUT"),; + LAYOUT("LAYOUT"), + HTTP_REQUEST("HTTP_REQUEST"),; private final String value; diff --git a/src/main/java/co/novu/models/components/UpdateAllSubscriberNotificationsDto.java b/src/main/java/co/novu/models/components/UpdateAllSubscriberNotificationsDto.java new file mode 100644 index 00000000..335654bc --- /dev/null +++ b/src/main/java/co/novu/models/components/UpdateAllSubscriberNotificationsDto.java @@ -0,0 +1,183 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class UpdateAllSubscriberNotificationsDto { + /** + * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("tags") + private UpdateAllSubscriberNotificationsDtoTags tags; + + /** + * Filter notifications by data attributes (JSON string) + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("data") + private String data; + + /** + * Context keys for filtering notifications + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("contextKeys") + private List contextKeys; + + @JsonCreator + public UpdateAllSubscriberNotificationsDto( + @JsonProperty("tags") @Nullable UpdateAllSubscriberNotificationsDtoTags tags, + @JsonProperty("data") @Nullable String data, + @JsonProperty("contextKeys") @Nullable List contextKeys) { + this.tags = tags; + this.data = data; + this.contextKeys = contextKeys; + } + + public UpdateAllSubscriberNotificationsDto() { + this(null, null, null); + } + + /** + * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ + public Optional tags() { + return Optional.ofNullable(this.tags); + } + + /** + * Filter notifications by data attributes (JSON string) + */ + public Optional data() { + return Optional.ofNullable(this.data); + } + + /** + * Context keys for filtering notifications + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ + public UpdateAllSubscriberNotificationsDto withTags(@Nullable UpdateAllSubscriberNotificationsDtoTags tags) { + this.tags = tags; + return this; + } + + + /** + * Filter notifications by data attributes (JSON string) + */ + public UpdateAllSubscriberNotificationsDto withData(@Nullable String data) { + this.data = data; + return this; + } + + + /** + * Context keys for filtering notifications + */ + public UpdateAllSubscriberNotificationsDto withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateAllSubscriberNotificationsDto other = (UpdateAllSubscriberNotificationsDto) o; + return + Utils.enhancedDeepEquals(this.tags, other.tags) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + tags, data, contextKeys); + } + + @Override + public String toString() { + return Utils.toString(UpdateAllSubscriberNotificationsDto.class, + "tags", tags, + "data", data, + "contextKeys", contextKeys); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private UpdateAllSubscriberNotificationsDtoTags tags; + + private String data; + + private List contextKeys; + + private Builder() { + // force use of static builder() method + } + + /** + * Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ + public Builder tags(@Nullable UpdateAllSubscriberNotificationsDtoTags tags) { + this.tags = tags; + return this; + } + + /** + * Filter notifications by data attributes (JSON string) + */ + public Builder data(@Nullable String data) { + this.data = data; + return this; + } + + /** + * Context keys for filtering notifications + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + public UpdateAllSubscriberNotificationsDto build() { + return new UpdateAllSubscriberNotificationsDto( + tags, data, contextKeys); + } + + } +} diff --git a/src/main/java/co/novu/models/components/UpdateAllSubscriberNotificationsDtoTags.java b/src/main/java/co/novu/models/components/UpdateAllSubscriberNotificationsDtoTags.java new file mode 100644 index 00000000..be74c138 --- /dev/null +++ b/src/main/java/co/novu/models/components/UpdateAllSubscriberNotificationsDtoTags.java @@ -0,0 +1,62 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import java.lang.Override; +import java.lang.String; + +/** + * UpdateAllSubscriberNotificationsDtoTags + * + *

Filter notifications by workflow tags (OR for string[], or { and: [{ or: string[] }, ...] } for AND + * of OR-groups). + */ +public class UpdateAllSubscriberNotificationsDtoTags { + @JsonCreator + public UpdateAllSubscriberNotificationsDtoTags() { + } + + public static Builder builder() { + return new Builder(); + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + return true; + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + ); + } + + @Override + public String toString() { + return Utils.toString(UpdateAllSubscriberNotificationsDtoTags.class); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private Builder() { + // force use of static builder() method + } + + public UpdateAllSubscriberNotificationsDtoTags build() { + return new UpdateAllSubscriberNotificationsDtoTags( + ); + } + + } +} diff --git a/src/main/java/co/novu/models/components/UpdateEnvironmentVariableRequestDto.java b/src/main/java/co/novu/models/components/UpdateEnvironmentVariableRequestDto.java new file mode 100644 index 00000000..74bab867 --- /dev/null +++ b/src/main/java/co/novu/models/components/UpdateEnvironmentVariableRequestDto.java @@ -0,0 +1,202 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonInclude.Include; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import jakarta.annotation.Nullable; +import java.lang.Boolean; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class UpdateEnvironmentVariableRequestDto { + /** + * Unique key for the variable. Must start with a letter and contain only letters, digits, and + * underscores. + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("key") + private String key; + + /** + * The type of the variable + */ + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("type") + private UpdateEnvironmentVariableRequestDtoType type; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("isSecret") + private Boolean isSecret; + + + @JsonInclude(Include.NON_ABSENT) + @JsonProperty("values") + private List values; + + @JsonCreator + public UpdateEnvironmentVariableRequestDto( + @JsonProperty("key") @Nullable String key, + @JsonProperty("type") @Nullable UpdateEnvironmentVariableRequestDtoType type, + @JsonProperty("isSecret") @Nullable Boolean isSecret, + @JsonProperty("values") @Nullable List values) { + this.key = key; + this.type = type; + this.isSecret = isSecret; + this.values = values; + } + + public UpdateEnvironmentVariableRequestDto() { + this(null, null, null, + null); + } + + /** + * Unique key for the variable. Must start with a letter and contain only letters, digits, and + * underscores. + */ + public Optional key() { + return Optional.ofNullable(this.key); + } + + /** + * The type of the variable + */ + public Optional type() { + return Optional.ofNullable(this.type); + } + + public Optional isSecret() { + return Optional.ofNullable(this.isSecret); + } + + public Optional> values() { + return Optional.ofNullable(this.values); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Unique key for the variable. Must start with a letter and contain only letters, digits, and + * underscores. + */ + public UpdateEnvironmentVariableRequestDto withKey(@Nullable String key) { + this.key = key; + return this; + } + + + /** + * The type of the variable + */ + public UpdateEnvironmentVariableRequestDto withType(@Nullable UpdateEnvironmentVariableRequestDtoType type) { + this.type = type; + return this; + } + + + public UpdateEnvironmentVariableRequestDto withIsSecret(@Nullable Boolean isSecret) { + this.isSecret = isSecret; + return this; + } + + + public UpdateEnvironmentVariableRequestDto withValues(@Nullable List values) { + this.values = values; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + UpdateEnvironmentVariableRequestDto other = (UpdateEnvironmentVariableRequestDto) o; + return + Utils.enhancedDeepEquals(this.key, other.key) && + Utils.enhancedDeepEquals(this.type, other.type) && + Utils.enhancedDeepEquals(this.isSecret, other.isSecret) && + Utils.enhancedDeepEquals(this.values, other.values); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + key, type, isSecret, + values); + } + + @Override + public String toString() { + return Utils.toString(UpdateEnvironmentVariableRequestDto.class, + "key", key, + "type", type, + "isSecret", isSecret, + "values", values); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String key; + + private UpdateEnvironmentVariableRequestDtoType type; + + private Boolean isSecret; + + private List values; + + private Builder() { + // force use of static builder() method + } + + /** + * Unique key for the variable. Must start with a letter and contain only letters, digits, and + * underscores. + */ + public Builder key(@Nullable String key) { + this.key = key; + return this; + } + + /** + * The type of the variable + */ + public Builder type(@Nullable UpdateEnvironmentVariableRequestDtoType type) { + this.type = type; + return this; + } + + public Builder isSecret(@Nullable Boolean isSecret) { + this.isSecret = isSecret; + return this; + } + + public Builder values(@Nullable List values) { + this.values = values; + return this; + } + + public UpdateEnvironmentVariableRequestDto build() { + return new UpdateEnvironmentVariableRequestDto( + key, type, isSecret, + values); + } + + } +} diff --git a/src/main/java/co/novu/models/components/UpdateEnvironmentVariableRequestDtoType.java b/src/main/java/co/novu/models/components/UpdateEnvironmentVariableRequestDtoType.java new file mode 100644 index 00000000..6eff66b4 --- /dev/null +++ b/src/main/java/co/novu/models/components/UpdateEnvironmentVariableRequestDtoType.java @@ -0,0 +1,39 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.components; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * UpdateEnvironmentVariableRequestDtoType + * + *

The type of the variable + */ +public enum UpdateEnvironmentVariableRequestDtoType { + STRING("string"); + + @JsonValue + private final String value; + + UpdateEnvironmentVariableRequestDtoType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (UpdateEnvironmentVariableRequestDtoType o: UpdateEnvironmentVariableRequestDtoType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/co/novu/models/components/UpdateLayoutDto.java b/src/main/java/co/novu/models/components/UpdateLayoutDto.java index 69447aa8..2d1d4999 100644 --- a/src/main/java/co/novu/models/components/UpdateLayoutDto.java +++ b/src/main/java/co/novu/models/components/UpdateLayoutDto.java @@ -34,7 +34,8 @@ public class UpdateLayoutDto { private Boolean isTranslationEnabled; /** - * Control values for the layout + * Control values for the layout. Omit to leave unchanged, or set to null to clear stored control + * values. */ @JsonInclude(Include.NON_ABSENT) @JsonProperty("controlValues") @@ -73,7 +74,8 @@ public Optional isTranslationEnabled() { } /** - * Control values for the layout + * Control values for the layout. Omit to leave unchanged, or set to null to clear stored control + * values. */ public JsonNullable controlValues() { return this.controlValues; @@ -103,7 +105,8 @@ public UpdateLayoutDto withIsTranslationEnabled(@Nullable Boolean isTranslationE /** - * Control values for the layout + * Control values for the layout. Omit to leave unchanged, or set to null to clear stored control + * values. */ public UpdateLayoutDto withControlValues(@Nullable UpdateLayoutDtoControlValues controlValues) { this.controlValues = JsonNullable.of(controlValues); @@ -170,7 +173,8 @@ public Builder isTranslationEnabled(@Nullable Boolean isTranslationEnabled) { } /** - * Control values for the layout + * Control values for the layout. Omit to leave unchanged, or set to null to clear stored control + * values. */ public Builder controlValues(@Nullable UpdateLayoutDtoControlValues controlValues) { this.controlValues = JsonNullable.of(controlValues); diff --git a/src/main/java/co/novu/models/components/UpdateLayoutDtoControlValues.java b/src/main/java/co/novu/models/components/UpdateLayoutDtoControlValues.java index 1609f968..90b59d7b 100644 --- a/src/main/java/co/novu/models/components/UpdateLayoutDtoControlValues.java +++ b/src/main/java/co/novu/models/components/UpdateLayoutDtoControlValues.java @@ -16,7 +16,8 @@ /** * UpdateLayoutDtoControlValues * - *

Control values for the layout + *

Control values for the layout. Omit to leave unchanged, or set to null to clear stored control + * values. */ public class UpdateLayoutDtoControlValues { /** diff --git a/src/main/java/co/novu/models/components/UpdateWorkflowDtoStepTypeIdResolver.java b/src/main/java/co/novu/models/components/UpdateWorkflowDtoStepTypeIdResolver.java index 06e94d8d..86f1b715 100644 --- a/src/main/java/co/novu/models/components/UpdateWorkflowDtoStepTypeIdResolver.java +++ b/src/main/java/co/novu/models/components/UpdateWorkflowDtoStepTypeIdResolver.java @@ -27,6 +27,7 @@ private void initializeTypeMap() { registerType("delay", DelayStepUpsertDto.class); registerType("digest", DigestStepUpsertDto.class); registerType("custom", CustomStepUpsertDto.class); + registerType("http_request", HttpRequestStepUpsertDto.class); } @Override diff --git a/src/main/java/co/novu/models/components/WorkflowResponseDtoStepTypeIdResolver.java b/src/main/java/co/novu/models/components/WorkflowResponseDtoStepTypeIdResolver.java index 51b11307..73d93e07 100644 --- a/src/main/java/co/novu/models/components/WorkflowResponseDtoStepTypeIdResolver.java +++ b/src/main/java/co/novu/models/components/WorkflowResponseDtoStepTypeIdResolver.java @@ -28,6 +28,7 @@ private void initializeTypeMap() { registerType("digest", DigestStepResponseDto.class); registerType("custom", CustomStepResponseDto.class); registerType("throttle", ThrottleStepResponseDto.class); + registerType("http_request", HttpRequestStepResponseDto.class); } @Override diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequest.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequest.java new file mode 100644 index 00000000..8789366c --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequest.java @@ -0,0 +1,130 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.CreateEnvironmentVariableRequestDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentVariablesControllerCreateEnvironmentVariableRequest { + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private CreateEnvironmentVariableRequestDto body; + + @JsonCreator + public EnvironmentVariablesControllerCreateEnvironmentVariableRequest( + @Nullable String idempotencyKey, + @Nonnull CreateEnvironmentVariableRequestDto body) { + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequest( + @Nonnull CreateEnvironmentVariableRequestDto body) { + this(null, body); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public CreateEnvironmentVariableRequestDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * A header for idempotency purposes + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequest withBody(@Nonnull CreateEnvironmentVariableRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerCreateEnvironmentVariableRequest other = (EnvironmentVariablesControllerCreateEnvironmentVariableRequest) o; + return + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerCreateEnvironmentVariableRequest.class, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String idempotencyKey; + + private CreateEnvironmentVariableRequestDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder body(@Nonnull CreateEnvironmentVariableRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequest build() { + return new EnvironmentVariablesControllerCreateEnvironmentVariableRequest( + idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder.java new file mode 100644 index 00000000..5619e8b0 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder.java @@ -0,0 +1,75 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.CreateEnvironmentVariableRequestDto; +import co.novu.operations.EnvironmentVariablesControllerCreateEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerCreateEnvironmentVariableRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerCreateEnvironmentVariableRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerCreateEnvironmentVariableRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder body(@Nonnull CreateEnvironmentVariableRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerCreateEnvironmentVariableRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new EnvironmentVariablesControllerCreateEnvironmentVariable.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.java new file mode 100644 index 00000000..415ab84d --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerCreateEnvironmentVariableResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable EnvironmentVariableResponseDto environmentVariableResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.environmentVariableResponseDto = environmentVariableResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional environmentVariableResponseDto() { + return Optional.ofNullable(this.environmentVariableResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withEnvironmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerCreateEnvironmentVariableResponse other = (EnvironmentVariablesControllerCreateEnvironmentVariableResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.environmentVariableResponseDto, other.environmentVariableResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerCreateEnvironmentVariableResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "environmentVariableResponseDto", environmentVariableResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder environmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse build() { + return new EnvironmentVariablesControllerCreateEnvironmentVariableResponse( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.java new file mode 100644 index 00000000..309c6ca6 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.java @@ -0,0 +1,140 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentVariablesControllerDeleteEnvironmentVariableRequest { + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=variableKey") + private String variableKey; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequest( + @Nonnull String variableKey, + @Nullable String idempotencyKey) { + this.variableKey = Optional.ofNullable(variableKey) + .orElseThrow(() -> new IllegalArgumentException("variableKey cannot be null")); + this.idempotencyKey = idempotencyKey; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequest( + @Nonnull String variableKey) { + this(variableKey, null); + } + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public String variableKey() { + return this.variableKey; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequest withVariableKey(@Nonnull String variableKey) { + this.variableKey = Utils.checkNotNull(variableKey, "variableKey"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerDeleteEnvironmentVariableRequest other = (EnvironmentVariablesControllerDeleteEnvironmentVariableRequest) o; + return + Utils.enhancedDeepEquals(this.variableKey, other.variableKey) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + variableKey, idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.class, + "variableKey", variableKey, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String variableKey; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public Builder variableKey(@Nonnull String variableKey) { + this.variableKey = Utils.checkNotNull(variableKey, "variableKey"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequest build() { + return new EnvironmentVariablesControllerDeleteEnvironmentVariableRequest( + variableKey, idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder.java new file mode 100644 index 00000000..b059f7ba --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder.java @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.EnvironmentVariablesControllerDeleteEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerDeleteEnvironmentVariableRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder variableKey(@Nonnull String variableKey) { + this.pojoBuilder.variableKey(variableKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerDeleteEnvironmentVariableRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new EnvironmentVariablesControllerDeleteEnvironmentVariable.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.java new file mode 100644 index 00000000..637808b3 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.java @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerDeleteEnvironmentVariableResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerDeleteEnvironmentVariableResponse other = (EnvironmentVariablesControllerDeleteEnvironmentVariableResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse build() { + return new EnvironmentVariablesControllerDeleteEnvironmentVariableResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequest.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequest.java new file mode 100644 index 00000000..ba4d9ca9 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequest.java @@ -0,0 +1,140 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentVariablesControllerGetEnvironmentVariableRequest { + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=variableKey") + private String variableKey; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public EnvironmentVariablesControllerGetEnvironmentVariableRequest( + @Nonnull String variableKey, + @Nullable String idempotencyKey) { + this.variableKey = Optional.ofNullable(variableKey) + .orElseThrow(() -> new IllegalArgumentException("variableKey cannot be null")); + this.idempotencyKey = idempotencyKey; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequest( + @Nonnull String variableKey) { + this(variableKey, null); + } + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public String variableKey() { + return this.variableKey; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public EnvironmentVariablesControllerGetEnvironmentVariableRequest withVariableKey(@Nonnull String variableKey) { + this.variableKey = Utils.checkNotNull(variableKey, "variableKey"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public EnvironmentVariablesControllerGetEnvironmentVariableRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerGetEnvironmentVariableRequest other = (EnvironmentVariablesControllerGetEnvironmentVariableRequest) o; + return + Utils.enhancedDeepEquals(this.variableKey, other.variableKey) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + variableKey, idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerGetEnvironmentVariableRequest.class, + "variableKey", variableKey, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String variableKey; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public Builder variableKey(@Nonnull String variableKey) { + this.variableKey = Utils.checkNotNull(variableKey, "variableKey"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequest build() { + return new EnvironmentVariablesControllerGetEnvironmentVariableRequest( + variableKey, idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder.java new file mode 100644 index 00000000..f3cb79a9 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder.java @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.EnvironmentVariablesControllerGetEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerGetEnvironmentVariableRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerGetEnvironmentVariableRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerGetEnvironmentVariableRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder variableKey(@Nonnull String variableKey) { + this.pojoBuilder.variableKey(variableKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerGetEnvironmentVariableRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new EnvironmentVariablesControllerGetEnvironmentVariable.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableResponse.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableResponse.java new file mode 100644 index 00000000..1b2a0ffe --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerGetEnvironmentVariableResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerGetEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable EnvironmentVariableResponseDto environmentVariableResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.environmentVariableResponseDto = environmentVariableResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerGetEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional environmentVariableResponseDto() { + return Optional.ofNullable(this.environmentVariableResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withEnvironmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerGetEnvironmentVariableResponse other = (EnvironmentVariablesControllerGetEnvironmentVariableResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.environmentVariableResponseDto, other.environmentVariableResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerGetEnvironmentVariableResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "environmentVariableResponseDto", environmentVariableResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder environmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableResponse build() { + return new EnvironmentVariablesControllerGetEnvironmentVariableResponse( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.java new file mode 100644 index 00000000..1494effc --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.java @@ -0,0 +1,140 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest { + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=variableKey") + private String variableKey; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest( + @Nonnull String variableKey, + @Nullable String idempotencyKey) { + this.variableKey = Optional.ofNullable(variableKey) + .orElseThrow(() -> new IllegalArgumentException("variableKey cannot be null")); + this.idempotencyKey = idempotencyKey; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest( + @Nonnull String variableKey) { + this(variableKey, null); + } + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public String variableKey() { + return this.variableKey; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest withVariableKey(@Nonnull String variableKey) { + this.variableKey = Utils.checkNotNull(variableKey, "variableKey"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest other = (EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest) o; + return + Utils.enhancedDeepEquals(this.variableKey, other.variableKey) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + variableKey, idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.class, + "variableKey", variableKey, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String variableKey; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public Builder variableKey(@Nonnull String variableKey) { + this.variableKey = Utils.checkNotNull(variableKey, "variableKey"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest build() { + return new EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest( + variableKey, idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder.java new file mode 100644 index 00000000..c4f9f966 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder.java @@ -0,0 +1,74 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsage; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder variableKey(@Nonnull String variableKey) { + this.pojoBuilder.variableKey(variableKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new EnvironmentVariablesControllerGetEnvironmentVariableUsage.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.java new file mode 100644 index 00000000..d7eb6ff6 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.GetEnvironmentVariableUsageResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.getEnvironmentVariableUsageResponseDto = getEnvironmentVariableUsageResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional getEnvironmentVariableUsageResponseDto() { + return Optional.ofNullable(this.getEnvironmentVariableUsageResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withGetEnvironmentVariableUsageResponseDto(@Nullable GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto) { + this.getEnvironmentVariableUsageResponseDto = getEnvironmentVariableUsageResponseDto; + return this; + } + + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse other = (EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getEnvironmentVariableUsageResponseDto, other.getEnvironmentVariableUsageResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getEnvironmentVariableUsageResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getEnvironmentVariableUsageResponseDto", getEnvironmentVariableUsageResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder getEnvironmentVariableUsageResponseDto(@Nullable GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto) { + this.getEnvironmentVariableUsageResponseDto = getEnvironmentVariableUsageResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse build() { + return new EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse( + contentType, statusCode, rawResponse, + getEnvironmentVariableUsageResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequest.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequest.java new file mode 100644 index 00000000..592c6975 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequest.java @@ -0,0 +1,137 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentVariablesControllerListEnvironmentVariablesRequest { + /** + * Filter variables by key (case-insensitive partial match) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=search") + private String search; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public EnvironmentVariablesControllerListEnvironmentVariablesRequest( + @Nullable String search, + @Nullable String idempotencyKey) { + this.search = search; + this.idempotencyKey = idempotencyKey; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequest() { + this(null, null); + } + + /** + * Filter variables by key (case-insensitive partial match) + */ + public Optional search() { + return Optional.ofNullable(this.search); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Filter variables by key (case-insensitive partial match) + */ + public EnvironmentVariablesControllerListEnvironmentVariablesRequest withSearch(@Nullable String search) { + this.search = search; + return this; + } + + + /** + * A header for idempotency purposes + */ + public EnvironmentVariablesControllerListEnvironmentVariablesRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerListEnvironmentVariablesRequest other = (EnvironmentVariablesControllerListEnvironmentVariablesRequest) o; + return + Utils.enhancedDeepEquals(this.search, other.search) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + search, idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerListEnvironmentVariablesRequest.class, + "search", search, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String search; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * Filter variables by key (case-insensitive partial match) + */ + public Builder search(@Nullable String search) { + this.search = search; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequest build() { + return new EnvironmentVariablesControllerListEnvironmentVariablesRequest( + search, idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder.java new file mode 100644 index 00000000..ee8505ac --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder.java @@ -0,0 +1,73 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.EnvironmentVariablesControllerListEnvironmentVariables; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerListEnvironmentVariablesRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerListEnvironmentVariablesRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerListEnvironmentVariablesRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder search(@Nullable String search) { + this.pojoBuilder.search(search); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerListEnvironmentVariablesRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new EnvironmentVariablesControllerListEnvironmentVariables.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesResponse.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesResponse.java new file mode 100644 index 00000000..2f5c6ed0 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerListEnvironmentVariablesResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerListEnvironmentVariablesResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private List environmentVariableResponseDtos; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerListEnvironmentVariablesResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable List environmentVariableResponseDtos, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.environmentVariableResponseDtos = environmentVariableResponseDtos; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerListEnvironmentVariablesResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional> environmentVariableResponseDtos() { + return Optional.ofNullable(this.environmentVariableResponseDtos); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withEnvironmentVariableResponseDtos(@Nullable List environmentVariableResponseDtos) { + this.environmentVariableResponseDtos = environmentVariableResponseDtos; + return this; + } + + + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerListEnvironmentVariablesResponse other = (EnvironmentVariablesControllerListEnvironmentVariablesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.environmentVariableResponseDtos, other.environmentVariableResponseDtos) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + environmentVariableResponseDtos, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerListEnvironmentVariablesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "environmentVariableResponseDtos", environmentVariableResponseDtos, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private List environmentVariableResponseDtos; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder environmentVariableResponseDtos(@Nullable List environmentVariableResponseDtos) { + this.environmentVariableResponseDtos = environmentVariableResponseDtos; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesResponse build() { + return new EnvironmentVariablesControllerListEnvironmentVariablesResponse( + contentType, statusCode, rawResponse, + environmentVariableResponseDtos, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.java new file mode 100644 index 00000000..702bfd99 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.java @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.UpdateEnvironmentVariableRequestDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentVariablesControllerUpdateEnvironmentVariableRequest { + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=variableKey") + private String variableKey; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private UpdateEnvironmentVariableRequestDto body; + + @JsonCreator + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequest( + @Nonnull String variableKey, + @Nullable String idempotencyKey, + @Nonnull UpdateEnvironmentVariableRequestDto body) { + this.variableKey = Optional.ofNullable(variableKey) + .orElseThrow(() -> new IllegalArgumentException("variableKey cannot be null")); + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequest( + @Nonnull String variableKey, + @Nonnull UpdateEnvironmentVariableRequestDto body) { + this(variableKey, null, body); + } + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public String variableKey() { + return this.variableKey; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public UpdateEnvironmentVariableRequestDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequest withVariableKey(@Nonnull String variableKey) { + this.variableKey = Utils.checkNotNull(variableKey, "variableKey"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequest withBody(@Nonnull UpdateEnvironmentVariableRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerUpdateEnvironmentVariableRequest other = (EnvironmentVariablesControllerUpdateEnvironmentVariableRequest) o; + return + Utils.enhancedDeepEquals(this.variableKey, other.variableKey) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + variableKey, idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.class, + "variableKey", variableKey, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String variableKey; + + private String idempotencyKey; + + private UpdateEnvironmentVariableRequestDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * The unique key of the environment variable (e.g. BASE_URL) + */ + public Builder variableKey(@Nonnull String variableKey) { + this.variableKey = Utils.checkNotNull(variableKey, "variableKey"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder body(@Nonnull UpdateEnvironmentVariableRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequest build() { + return new EnvironmentVariablesControllerUpdateEnvironmentVariableRequest( + variableKey, idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder.java new file mode 100644 index 00000000..c292d4f7 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder.java @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateEnvironmentVariableRequestDto; +import co.novu.operations.EnvironmentVariablesControllerUpdateEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerUpdateEnvironmentVariableRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder variableKey(@Nonnull String variableKey) { + this.pojoBuilder.variableKey(variableKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder body(@Nonnull UpdateEnvironmentVariableRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerUpdateEnvironmentVariableRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new EnvironmentVariablesControllerUpdateEnvironmentVariable.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.java b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.java new file mode 100644 index 00000000..3f444351 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerUpdateEnvironmentVariableResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable EnvironmentVariableResponseDto environmentVariableResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.environmentVariableResponseDto = environmentVariableResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional environmentVariableResponseDto() { + return Optional.ofNullable(this.environmentVariableResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withEnvironmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerUpdateEnvironmentVariableResponse other = (EnvironmentVariablesControllerUpdateEnvironmentVariableResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.environmentVariableResponseDto, other.environmentVariableResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "environmentVariableResponseDto", environmentVariableResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder environmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse build() { + return new EnvironmentVariablesControllerUpdateEnvironmentVariableResponse( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentRequest.java b/src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentRequest.java new file mode 100644 index 00000000..70954de9 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentRequest.java @@ -0,0 +1,179 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.DiffEnvironmentRequestDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentsControllerDiffEnvironmentRequest { + /** + * Target environment ID (MongoDB ObjectId) to compare against + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=targetEnvironmentId") + private String targetEnvironmentId; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + /** + * Diff request configuration + */ + @SpeakeasyMetadata("request:mediaType=application/json") + private DiffEnvironmentRequestDto body; + + @JsonCreator + public EnvironmentsControllerDiffEnvironmentRequest( + @Nonnull String targetEnvironmentId, + @Nullable String idempotencyKey, + @Nonnull DiffEnvironmentRequestDto body) { + this.targetEnvironmentId = Optional.ofNullable(targetEnvironmentId) + .orElseThrow(() -> new IllegalArgumentException("targetEnvironmentId cannot be null")); + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public EnvironmentsControllerDiffEnvironmentRequest( + @Nonnull String targetEnvironmentId, + @Nonnull DiffEnvironmentRequestDto body) { + this(targetEnvironmentId, null, body); + } + + /** + * Target environment ID (MongoDB ObjectId) to compare against + */ + public String targetEnvironmentId() { + return this.targetEnvironmentId; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + /** + * Diff request configuration + */ + public DiffEnvironmentRequestDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Target environment ID (MongoDB ObjectId) to compare against + */ + public EnvironmentsControllerDiffEnvironmentRequest withTargetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.targetEnvironmentId = Utils.checkNotNull(targetEnvironmentId, "targetEnvironmentId"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public EnvironmentsControllerDiffEnvironmentRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + /** + * Diff request configuration + */ + public EnvironmentsControllerDiffEnvironmentRequest withBody(@Nonnull DiffEnvironmentRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentsControllerDiffEnvironmentRequest other = (EnvironmentsControllerDiffEnvironmentRequest) o; + return + Utils.enhancedDeepEquals(this.targetEnvironmentId, other.targetEnvironmentId) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + targetEnvironmentId, idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentsControllerDiffEnvironmentRequest.class, + "targetEnvironmentId", targetEnvironmentId, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String targetEnvironmentId; + + private String idempotencyKey; + + private DiffEnvironmentRequestDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * Target environment ID (MongoDB ObjectId) to compare against + */ + public Builder targetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.targetEnvironmentId = Utils.checkNotNull(targetEnvironmentId, "targetEnvironmentId"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Diff request configuration + */ + public Builder body(@Nonnull DiffEnvironmentRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public EnvironmentsControllerDiffEnvironmentRequest build() { + return new EnvironmentsControllerDiffEnvironmentRequest( + targetEnvironmentId, idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentRequestBuilder.java b/src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentRequestBuilder.java new file mode 100644 index 00000000..c208be2b --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentRequestBuilder.java @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.DiffEnvironmentRequestDto; +import co.novu.operations.EnvironmentsControllerDiffEnvironment; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class EnvironmentsControllerDiffEnvironmentRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentsControllerDiffEnvironmentRequest.Builder pojoBuilder; + private EnvironmentsControllerDiffEnvironmentRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentsControllerDiffEnvironmentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentsControllerDiffEnvironmentRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder targetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.pojoBuilder.targetEnvironmentId(targetEnvironmentId); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder body(@Nonnull DiffEnvironmentRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentsControllerDiffEnvironmentRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public EnvironmentsControllerDiffEnvironmentResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new EnvironmentsControllerDiffEnvironment.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentResponse.java b/src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentResponse.java new file mode 100644 index 00000000..0543c63e --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentsControllerDiffEnvironmentResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.DiffEnvironmentResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentsControllerDiffEnvironmentResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private DiffEnvironmentResponseDto diffEnvironmentResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentsControllerDiffEnvironmentResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable DiffEnvironmentResponseDto diffEnvironmentResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.diffEnvironmentResponseDto = diffEnvironmentResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentsControllerDiffEnvironmentResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional diffEnvironmentResponseDto() { + return Optional.ofNullable(this.diffEnvironmentResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentsControllerDiffEnvironmentResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentsControllerDiffEnvironmentResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentsControllerDiffEnvironmentResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentsControllerDiffEnvironmentResponse withDiffEnvironmentResponseDto(@Nullable DiffEnvironmentResponseDto diffEnvironmentResponseDto) { + this.diffEnvironmentResponseDto = diffEnvironmentResponseDto; + return this; + } + + + public EnvironmentsControllerDiffEnvironmentResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentsControllerDiffEnvironmentResponse other = (EnvironmentsControllerDiffEnvironmentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.diffEnvironmentResponseDto, other.diffEnvironmentResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + diffEnvironmentResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentsControllerDiffEnvironmentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "diffEnvironmentResponseDto", diffEnvironmentResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private DiffEnvironmentResponseDto diffEnvironmentResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder diffEnvironmentResponseDto(@Nullable DiffEnvironmentResponseDto diffEnvironmentResponseDto) { + this.diffEnvironmentResponseDto = diffEnvironmentResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentsControllerDiffEnvironmentResponse build() { + return new EnvironmentsControllerDiffEnvironmentResponse( + contentType, statusCode, rawResponse, + diffEnvironmentResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentRequest.java b/src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentRequest.java new file mode 100644 index 00000000..0fab2aa5 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentRequest.java @@ -0,0 +1,179 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.PublishEnvironmentRequestDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class EnvironmentsControllerPublishEnvironmentRequest { + /** + * Target environment ID (MongoDB ObjectId) to publish resources to + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=targetEnvironmentId") + private String targetEnvironmentId; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + /** + * Publish request configuration + */ + @SpeakeasyMetadata("request:mediaType=application/json") + private PublishEnvironmentRequestDto body; + + @JsonCreator + public EnvironmentsControllerPublishEnvironmentRequest( + @Nonnull String targetEnvironmentId, + @Nullable String idempotencyKey, + @Nonnull PublishEnvironmentRequestDto body) { + this.targetEnvironmentId = Optional.ofNullable(targetEnvironmentId) + .orElseThrow(() -> new IllegalArgumentException("targetEnvironmentId cannot be null")); + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public EnvironmentsControllerPublishEnvironmentRequest( + @Nonnull String targetEnvironmentId, + @Nonnull PublishEnvironmentRequestDto body) { + this(targetEnvironmentId, null, body); + } + + /** + * Target environment ID (MongoDB ObjectId) to publish resources to + */ + public String targetEnvironmentId() { + return this.targetEnvironmentId; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + /** + * Publish request configuration + */ + public PublishEnvironmentRequestDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * Target environment ID (MongoDB ObjectId) to publish resources to + */ + public EnvironmentsControllerPublishEnvironmentRequest withTargetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.targetEnvironmentId = Utils.checkNotNull(targetEnvironmentId, "targetEnvironmentId"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public EnvironmentsControllerPublishEnvironmentRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + /** + * Publish request configuration + */ + public EnvironmentsControllerPublishEnvironmentRequest withBody(@Nonnull PublishEnvironmentRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentsControllerPublishEnvironmentRequest other = (EnvironmentsControllerPublishEnvironmentRequest) o; + return + Utils.enhancedDeepEquals(this.targetEnvironmentId, other.targetEnvironmentId) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + targetEnvironmentId, idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentsControllerPublishEnvironmentRequest.class, + "targetEnvironmentId", targetEnvironmentId, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String targetEnvironmentId; + + private String idempotencyKey; + + private PublishEnvironmentRequestDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * Target environment ID (MongoDB ObjectId) to publish resources to + */ + public Builder targetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.targetEnvironmentId = Utils.checkNotNull(targetEnvironmentId, "targetEnvironmentId"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Publish request configuration + */ + public Builder body(@Nonnull PublishEnvironmentRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public EnvironmentsControllerPublishEnvironmentRequest build() { + return new EnvironmentsControllerPublishEnvironmentRequest( + targetEnvironmentId, idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentRequestBuilder.java b/src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentRequestBuilder.java new file mode 100644 index 00000000..b903d2f5 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentRequestBuilder.java @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.PublishEnvironmentRequestDto; +import co.novu.operations.EnvironmentsControllerPublishEnvironment; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class EnvironmentsControllerPublishEnvironmentRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentsControllerPublishEnvironmentRequest.Builder pojoBuilder; + private EnvironmentsControllerPublishEnvironmentRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentsControllerPublishEnvironmentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentsControllerPublishEnvironmentRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder targetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.pojoBuilder.targetEnvironmentId(targetEnvironmentId); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder body(@Nonnull PublishEnvironmentRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentsControllerPublishEnvironmentRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public EnvironmentsControllerPublishEnvironmentResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new EnvironmentsControllerPublishEnvironment.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentResponse.java b/src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentResponse.java new file mode 100644 index 00000000..64d5bb53 --- /dev/null +++ b/src/main/java/co/novu/models/operations/EnvironmentsControllerPublishEnvironmentResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.PublishEnvironmentResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentsControllerPublishEnvironmentResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private PublishEnvironmentResponseDto publishEnvironmentResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentsControllerPublishEnvironmentResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable PublishEnvironmentResponseDto publishEnvironmentResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.publishEnvironmentResponseDto = publishEnvironmentResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentsControllerPublishEnvironmentResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional publishEnvironmentResponseDto() { + return Optional.ofNullable(this.publishEnvironmentResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentsControllerPublishEnvironmentResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentsControllerPublishEnvironmentResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentsControllerPublishEnvironmentResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentsControllerPublishEnvironmentResponse withPublishEnvironmentResponseDto(@Nullable PublishEnvironmentResponseDto publishEnvironmentResponseDto) { + this.publishEnvironmentResponseDto = publishEnvironmentResponseDto; + return this; + } + + + public EnvironmentsControllerPublishEnvironmentResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentsControllerPublishEnvironmentResponse other = (EnvironmentsControllerPublishEnvironmentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.publishEnvironmentResponseDto, other.publishEnvironmentResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + publishEnvironmentResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentsControllerPublishEnvironmentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "publishEnvironmentResponseDto", publishEnvironmentResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private PublishEnvironmentResponseDto publishEnvironmentResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder publishEnvironmentResponseDto(@Nullable PublishEnvironmentResponseDto publishEnvironmentResponseDto) { + this.publishEnvironmentResponseDto = publishEnvironmentResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentsControllerPublishEnvironmentResponse build() { + return new EnvironmentsControllerPublishEnvironmentResponse( + contentType, statusCode, rawResponse, + publishEnvironmentResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/Severity.java b/src/main/java/co/novu/models/operations/Severity.java new file mode 100644 index 00000000..c83f12b1 --- /dev/null +++ b/src/main/java/co/novu/models/operations/Severity.java @@ -0,0 +1,37 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +public enum Severity { + HIGH("high"), + MEDIUM("medium"), + LOW("low"), + NONE("none"); + + @JsonValue + private final String value; + + Severity(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (Severity o: Severity.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsRequest.java new file mode 100644 index 00000000..85e8f49e --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsRequest.java @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class SubscribersControllerArchiveAllNotificationsRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private UpdateAllSubscriberNotificationsDto body; + + @JsonCreator + public SubscribersControllerArchiveAllNotificationsRequest( + @Nonnull String subscriberId, + @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public SubscribersControllerArchiveAllNotificationsRequest( + @Nonnull String subscriberId, + @Nonnull UpdateAllSubscriberNotificationsDto body) { + this(subscriberId, null, body); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public UpdateAllSubscriberNotificationsDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerArchiveAllNotificationsRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerArchiveAllNotificationsRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + public SubscribersControllerArchiveAllNotificationsRequest withBody(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerArchiveAllNotificationsRequest other = (SubscribersControllerArchiveAllNotificationsRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerArchiveAllNotificationsRequest.class, + "subscriberId", subscriberId, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String idempotencyKey; + + private UpdateAllSubscriberNotificationsDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public SubscribersControllerArchiveAllNotificationsRequest build() { + return new SubscribersControllerArchiveAllNotificationsRequest( + subscriberId, idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsRequestBuilder.java new file mode 100644 index 00000000..1ba5ccdf --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsRequestBuilder.java @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.operations.SubscribersControllerArchiveAllNotifications; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class SubscribersControllerArchiveAllNotificationsRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerArchiveAllNotificationsRequest.Builder pojoBuilder; + private SubscribersControllerArchiveAllNotificationsRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerArchiveAllNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerArchiveAllNotificationsRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerArchiveAllNotificationsRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerArchiveAllNotificationsResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerArchiveAllNotifications.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsResponse.java new file mode 100644 index 00000000..e175133d --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllNotificationsResponse.java @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerArchiveAllNotificationsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerArchiveAllNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerArchiveAllNotificationsResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerArchiveAllNotificationsResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerArchiveAllNotificationsResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerArchiveAllNotificationsResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerArchiveAllNotificationsResponse other = (SubscribersControllerArchiveAllNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerArchiveAllNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerArchiveAllNotificationsResponse build() { + return new SubscribersControllerArchiveAllNotificationsResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsRequest.java new file mode 100644 index 00000000..065d96a1 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsRequest.java @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class SubscribersControllerArchiveAllReadNotificationsRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private UpdateAllSubscriberNotificationsDto body; + + @JsonCreator + public SubscribersControllerArchiveAllReadNotificationsRequest( + @Nonnull String subscriberId, + @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public SubscribersControllerArchiveAllReadNotificationsRequest( + @Nonnull String subscriberId, + @Nonnull UpdateAllSubscriberNotificationsDto body) { + this(subscriberId, null, body); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public UpdateAllSubscriberNotificationsDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerArchiveAllReadNotificationsRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerArchiveAllReadNotificationsRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + public SubscribersControllerArchiveAllReadNotificationsRequest withBody(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerArchiveAllReadNotificationsRequest other = (SubscribersControllerArchiveAllReadNotificationsRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerArchiveAllReadNotificationsRequest.class, + "subscriberId", subscriberId, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String idempotencyKey; + + private UpdateAllSubscriberNotificationsDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public SubscribersControllerArchiveAllReadNotificationsRequest build() { + return new SubscribersControllerArchiveAllReadNotificationsRequest( + subscriberId, idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsRequestBuilder.java new file mode 100644 index 00000000..90b15d68 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsRequestBuilder.java @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.operations.SubscribersControllerArchiveAllReadNotifications; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class SubscribersControllerArchiveAllReadNotificationsRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerArchiveAllReadNotificationsRequest.Builder pojoBuilder; + private SubscribersControllerArchiveAllReadNotificationsRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerArchiveAllReadNotificationsRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerArchiveAllReadNotificationsRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerArchiveAllReadNotificationsResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerArchiveAllReadNotifications.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsResponse.java new file mode 100644 index 00000000..204fb637 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveAllReadNotificationsResponse.java @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerArchiveAllReadNotificationsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerArchiveAllReadNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerArchiveAllReadNotificationsResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerArchiveAllReadNotificationsResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerArchiveAllReadNotificationsResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerArchiveAllReadNotificationsResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerArchiveAllReadNotificationsResponse other = (SubscribersControllerArchiveAllReadNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerArchiveAllReadNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerArchiveAllReadNotificationsResponse build() { + return new SubscribersControllerArchiveAllReadNotificationsResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationRequest.java new file mode 100644 index 00000000..ef7c611e --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationRequest.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerArchiveNotificationRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * The identifier of the notification + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=notificationId") + private String notificationId; + + /** + * Context keys for filtering + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerArchiveNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nullable List contextKeys, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.notificationId = Optional.ofNullable(notificationId) + .orElseThrow(() -> new IllegalArgumentException("notificationId cannot be null")); + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerArchiveNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId) { + this(subscriberId, notificationId, null, + null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * The identifier of the notification + */ + public String notificationId() { + return this.notificationId; + } + + /** + * Context keys for filtering + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerArchiveNotificationRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * The identifier of the notification + */ + public SubscribersControllerArchiveNotificationRequest withNotificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + + /** + * Context keys for filtering + */ + public SubscribersControllerArchiveNotificationRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerArchiveNotificationRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerArchiveNotificationRequest other = (SubscribersControllerArchiveNotificationRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.notificationId, other.notificationId) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerArchiveNotificationRequest.class, + "subscriberId", subscriberId, + "notificationId", notificationId, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String notificationId; + + private List contextKeys; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * The identifier of the notification + */ + public Builder notificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + /** + * Context keys for filtering + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerArchiveNotificationRequest build() { + return new SubscribersControllerArchiveNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationRequestBuilder.java new file mode 100644 index 00000000..9add097d --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationRequestBuilder.java @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerArchiveNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; + +public class SubscribersControllerArchiveNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerArchiveNotificationRequest.Builder pojoBuilder; + private SubscribersControllerArchiveNotificationRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerArchiveNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerArchiveNotificationRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerArchiveNotificationRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveNotificationRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveNotificationRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveNotificationRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerArchiveNotificationRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerArchiveNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerArchiveNotificationResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerArchiveNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationResponse.java new file mode 100644 index 00000000..5b15f0a5 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerArchiveNotificationResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerArchiveNotificationResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerArchiveNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerArchiveNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerArchiveNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerArchiveNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerArchiveNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerArchiveNotificationResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerArchiveNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerArchiveNotificationResponse other = (SubscribersControllerArchiveNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerArchiveNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerArchiveNotificationResponse build() { + return new SubscribersControllerArchiveNotificationResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.java index 18e2b2c2..3aa311ee 100644 --- a/src/main/java/co/novu/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.java +++ b/src/main/java/co/novu/models/operations/SubscribersControllerBulkUpdateSubscriberPreferencesRequest.java @@ -15,7 +15,9 @@ public class SubscribersControllerBulkUpdateSubscriberPreferencesRequest { - + /** + * The identifier of the subscriber + */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") private String subscriberId; @@ -47,6 +49,9 @@ public SubscribersControllerBulkUpdateSubscriberPreferencesRequest( this(subscriberId, null, body); } + /** + * The identifier of the subscriber + */ public String subscriberId() { return this.subscriberId; } @@ -67,6 +72,9 @@ public static Builder builder() { } + /** + * The identifier of the subscriber + */ public SubscribersControllerBulkUpdateSubscriberPreferencesRequest withSubscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; @@ -130,6 +138,9 @@ private Builder() { // force use of static builder() method } + /** + * The identifier of the subscriber + */ public Builder subscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionActionType.java b/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionActionType.java new file mode 100644 index 00000000..2f2c99d4 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionActionType.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * SubscribersControllerCompleteNotificationActionActionType + * + *

The type of action (primary or secondary) + */ +public enum SubscribersControllerCompleteNotificationActionActionType { + PRIMARY("primary"), + SECONDARY("secondary"); + + @JsonValue + private final String value; + + SubscribersControllerCompleteNotificationActionActionType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (SubscribersControllerCompleteNotificationActionActionType o: SubscribersControllerCompleteNotificationActionActionType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionRequest.java new file mode 100644 index 00000000..e555f666 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionRequest.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerCompleteNotificationActionRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * The identifier of the notification + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=notificationId") + private String notificationId; + + /** + * The type of action (primary or secondary) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=actionType") + private SubscribersControllerCompleteNotificationActionActionType actionType; + + /** + * Context keys for filtering + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerCompleteNotificationActionRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nonnull SubscribersControllerCompleteNotificationActionActionType actionType, + @Nullable List contextKeys, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.notificationId = Optional.ofNullable(notificationId) + .orElseThrow(() -> new IllegalArgumentException("notificationId cannot be null")); + this.actionType = Optional.ofNullable(actionType) + .orElseThrow(() -> new IllegalArgumentException("actionType cannot be null")); + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerCompleteNotificationActionRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nonnull SubscribersControllerCompleteNotificationActionActionType actionType) { + this(subscriberId, notificationId, actionType, + null, null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * The identifier of the notification + */ + public String notificationId() { + return this.notificationId; + } + + /** + * The type of action (primary or secondary) + */ + public SubscribersControllerCompleteNotificationActionActionType actionType() { + return this.actionType; + } + + /** + * Context keys for filtering + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerCompleteNotificationActionRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * The identifier of the notification + */ + public SubscribersControllerCompleteNotificationActionRequest withNotificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + + /** + * The type of action (primary or secondary) + */ + public SubscribersControllerCompleteNotificationActionRequest withActionType(@Nonnull SubscribersControllerCompleteNotificationActionActionType actionType) { + this.actionType = Utils.checkNotNull(actionType, "actionType"); + return this; + } + + + /** + * Context keys for filtering + */ + public SubscribersControllerCompleteNotificationActionRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerCompleteNotificationActionRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerCompleteNotificationActionRequest other = (SubscribersControllerCompleteNotificationActionRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.notificationId, other.notificationId) && + Utils.enhancedDeepEquals(this.actionType, other.actionType) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, notificationId, actionType, + contextKeys, idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerCompleteNotificationActionRequest.class, + "subscriberId", subscriberId, + "notificationId", notificationId, + "actionType", actionType, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String notificationId; + + private SubscribersControllerCompleteNotificationActionActionType actionType; + + private List contextKeys; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * The identifier of the notification + */ + public Builder notificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + /** + * The type of action (primary or secondary) + */ + public Builder actionType(@Nonnull SubscribersControllerCompleteNotificationActionActionType actionType) { + this.actionType = Utils.checkNotNull(actionType, "actionType"); + return this; + } + + /** + * Context keys for filtering + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerCompleteNotificationActionRequest build() { + return new SubscribersControllerCompleteNotificationActionRequest( + subscriberId, notificationId, actionType, + contextKeys, idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionRequestBuilder.java new file mode 100644 index 00000000..cb9bd7e0 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerCompleteNotificationAction; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; + +public class SubscribersControllerCompleteNotificationActionRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private SubscribersControllerCompleteNotificationActionRequest request; + private final Options.Builder optionsBuilder; + + public SubscribersControllerCompleteNotificationActionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerCompleteNotificationActionRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + public SubscribersControllerCompleteNotificationActionRequestBuilder request(@Nonnull SubscribersControllerCompleteNotificationActionRequest request) { + this.request = Utils.checkNotNull(request, "request"); + return this; + } + + private SubscribersControllerCompleteNotificationActionRequest _buildRequest() { + return this.request; + } + + public SubscribersControllerCompleteNotificationActionRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerCompleteNotificationActionResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerCompleteNotificationAction.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionResponse.java new file mode 100644 index 00000000..8bccb9f9 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerCompleteNotificationActionResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerCompleteNotificationActionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerCompleteNotificationActionResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerCompleteNotificationActionResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerCompleteNotificationActionResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerCompleteNotificationActionResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerCompleteNotificationActionResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerCompleteNotificationActionResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerCompleteNotificationActionResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerCompleteNotificationActionResponse other = (SubscribersControllerCompleteNotificationActionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerCompleteNotificationActionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerCompleteNotificationActionResponse build() { + return new SubscribersControllerCompleteNotificationActionResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsRequest.java new file mode 100644 index 00000000..bcc0de20 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsRequest.java @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class SubscribersControllerDeleteAllNotificationsRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private UpdateAllSubscriberNotificationsDto body; + + @JsonCreator + public SubscribersControllerDeleteAllNotificationsRequest( + @Nonnull String subscriberId, + @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public SubscribersControllerDeleteAllNotificationsRequest( + @Nonnull String subscriberId, + @Nonnull UpdateAllSubscriberNotificationsDto body) { + this(subscriberId, null, body); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public UpdateAllSubscriberNotificationsDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerDeleteAllNotificationsRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerDeleteAllNotificationsRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + public SubscribersControllerDeleteAllNotificationsRequest withBody(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerDeleteAllNotificationsRequest other = (SubscribersControllerDeleteAllNotificationsRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerDeleteAllNotificationsRequest.class, + "subscriberId", subscriberId, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String idempotencyKey; + + private UpdateAllSubscriberNotificationsDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public SubscribersControllerDeleteAllNotificationsRequest build() { + return new SubscribersControllerDeleteAllNotificationsRequest( + subscriberId, idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsRequestBuilder.java new file mode 100644 index 00000000..7cdbf09b --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsRequestBuilder.java @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.operations.SubscribersControllerDeleteAllNotifications; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class SubscribersControllerDeleteAllNotificationsRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerDeleteAllNotificationsRequest.Builder pojoBuilder; + private SubscribersControllerDeleteAllNotificationsRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerDeleteAllNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerDeleteAllNotificationsRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerDeleteAllNotificationsRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerDeleteAllNotificationsResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerDeleteAllNotifications.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsResponse.java new file mode 100644 index 00000000..92839a65 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteAllNotificationsResponse.java @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerDeleteAllNotificationsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerDeleteAllNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerDeleteAllNotificationsResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerDeleteAllNotificationsResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerDeleteAllNotificationsResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerDeleteAllNotificationsResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerDeleteAllNotificationsResponse other = (SubscribersControllerDeleteAllNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerDeleteAllNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerDeleteAllNotificationsResponse build() { + return new SubscribersControllerDeleteAllNotificationsResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationRequest.java new file mode 100644 index 00000000..37f68f32 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationRequest.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerDeleteNotificationRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * The identifier of the notification + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=notificationId") + private String notificationId; + + /** + * Context keys for filtering + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerDeleteNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nullable List contextKeys, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.notificationId = Optional.ofNullable(notificationId) + .orElseThrow(() -> new IllegalArgumentException("notificationId cannot be null")); + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerDeleteNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId) { + this(subscriberId, notificationId, null, + null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * The identifier of the notification + */ + public String notificationId() { + return this.notificationId; + } + + /** + * Context keys for filtering + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerDeleteNotificationRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * The identifier of the notification + */ + public SubscribersControllerDeleteNotificationRequest withNotificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + + /** + * Context keys for filtering + */ + public SubscribersControllerDeleteNotificationRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerDeleteNotificationRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerDeleteNotificationRequest other = (SubscribersControllerDeleteNotificationRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.notificationId, other.notificationId) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerDeleteNotificationRequest.class, + "subscriberId", subscriberId, + "notificationId", notificationId, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String notificationId; + + private List contextKeys; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * The identifier of the notification + */ + public Builder notificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + /** + * Context keys for filtering + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerDeleteNotificationRequest build() { + return new SubscribersControllerDeleteNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationRequestBuilder.java new file mode 100644 index 00000000..6fea0188 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationRequestBuilder.java @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerDeleteNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; + +public class SubscribersControllerDeleteNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerDeleteNotificationRequest.Builder pojoBuilder; + private SubscribersControllerDeleteNotificationRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerDeleteNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerDeleteNotificationRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerDeleteNotificationRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteNotificationRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteNotificationRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteNotificationRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerDeleteNotificationRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerDeleteNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerDeleteNotificationResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerDeleteNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationResponse.java new file mode 100644 index 00000000..97925c5d --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerDeleteNotificationResponse.java @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerDeleteNotificationResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerDeleteNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerDeleteNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerDeleteNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerDeleteNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerDeleteNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerDeleteNotificationResponse other = (SubscribersControllerDeleteNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerDeleteNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerDeleteNotificationResponse build() { + return new SubscribersControllerDeleteNotificationResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequest.java new file mode 100644 index 00000000..17ad5738 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequest.java @@ -0,0 +1,178 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class SubscribersControllerGetSubscriberNotificationsCountRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * Array of filter objects (max 30) to count notifications by different criteria + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=filters") + private String filters; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerGetSubscriberNotificationsCountRequest( + @Nonnull String subscriberId, + @Nonnull String filters, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.filters = Optional.ofNullable(filters) + .orElseThrow(() -> new IllegalArgumentException("filters cannot be null")); + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequest( + @Nonnull String subscriberId, + @Nonnull String filters) { + this(subscriberId, filters, null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * Array of filter objects (max 30) to count notifications by different criteria + */ + public String filters() { + return this.filters; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerGetSubscriberNotificationsCountRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * Array of filter objects (max 30) to count notifications by different criteria + */ + public SubscribersControllerGetSubscriberNotificationsCountRequest withFilters(@Nonnull String filters) { + this.filters = Utils.checkNotNull(filters, "filters"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerGetSubscriberNotificationsCountRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerGetSubscriberNotificationsCountRequest other = (SubscribersControllerGetSubscriberNotificationsCountRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.filters, other.filters) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, filters, idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerGetSubscriberNotificationsCountRequest.class, + "subscriberId", subscriberId, + "filters", filters, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String filters; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * Array of filter objects (max 30) to count notifications by different criteria + */ + public Builder filters(@Nonnull String filters) { + this.filters = Utils.checkNotNull(filters, "filters"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequest build() { + return new SubscribersControllerGetSubscriberNotificationsCountRequest( + subscriberId, filters, idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequestBuilder.java new file mode 100644 index 00000000..ff72525e --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountRequestBuilder.java @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerGetSubscriberNotificationsCount; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class SubscribersControllerGetSubscriberNotificationsCountRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerGetSubscriberNotificationsCountRequest.Builder pojoBuilder; + private SubscribersControllerGetSubscriberNotificationsCountRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerGetSubscriberNotificationsCountRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder filters(@Nonnull String filters) { + this.pojoBuilder.filters(filters); + this._setterCalled = true; + return this; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerGetSubscriberNotificationsCountRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerGetSubscriberNotificationsCount.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountResponse.java new file mode 100644 index 00000000..df218746 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsCountResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.GetSubscriberNotificationsCountResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerGetSubscriberNotificationsCountResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private List getSubscriberNotificationsCountResponseDtos; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerGetSubscriberNotificationsCountResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable List getSubscriberNotificationsCountResponseDtos, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.getSubscriberNotificationsCountResponseDtos = getSubscriberNotificationsCountResponseDtos; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerGetSubscriberNotificationsCountResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional> getSubscriberNotificationsCountResponseDtos() { + return Optional.ofNullable(this.getSubscriberNotificationsCountResponseDtos); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse withGetSubscriberNotificationsCountResponseDtos(@Nullable List getSubscriberNotificationsCountResponseDtos) { + this.getSubscriberNotificationsCountResponseDtos = getSubscriberNotificationsCountResponseDtos; + return this; + } + + + public SubscribersControllerGetSubscriberNotificationsCountResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerGetSubscriberNotificationsCountResponse other = (SubscribersControllerGetSubscriberNotificationsCountResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getSubscriberNotificationsCountResponseDtos, other.getSubscriberNotificationsCountResponseDtos) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getSubscriberNotificationsCountResponseDtos, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerGetSubscriberNotificationsCountResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getSubscriberNotificationsCountResponseDtos", getSubscriberNotificationsCountResponseDtos, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private List getSubscriberNotificationsCountResponseDtos; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder getSubscriberNotificationsCountResponseDtos(@Nullable List getSubscriberNotificationsCountResponseDtos) { + this.getSubscriberNotificationsCountResponseDtos = getSubscriberNotificationsCountResponseDtos; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerGetSubscriberNotificationsCountResponse build() { + return new SubscribersControllerGetSubscriberNotificationsCountResponse( + contentType, statusCode, rawResponse, + getSubscriberNotificationsCountResponseDtos, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsRequest.java new file mode 100644 index 00000000..26921e94 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsRequest.java @@ -0,0 +1,563 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.LazySingletonValue; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Boolean; +import java.lang.Double; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerGetSubscriberNotificationsRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=limit") + private Double limit; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=after") + private String after; + + + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=offset") + private Double offset; + + /** + * Filter by read/unread state + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=read") + private Boolean read; + + /** + * Filter by archived state + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=archived") + private Boolean archived; + + /** + * Filter by snoozed state + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=snoozed") + private Boolean snoozed; + + /** + * Filter by seen state + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=seen") + private Boolean seen; + + /** + * Filter by data attributes (JSON string) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=data") + private String data; + + /** + * Filter by severity levels + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=severity") + private List severity; + + /** + * Filter notifications created on or after this timestamp (Unix timestamp in milliseconds) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=createdGte") + private Double createdGte; + + /** + * Filter notifications created on or before this timestamp (Unix timestamp in milliseconds) + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=createdLte") + private Double createdLte; + + /** + * Context keys for filtering notifications in multi-context scenarios + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerGetSubscriberNotificationsRequest( + @Nonnull String subscriberId, + @Nullable Double limit, + @Nullable String after, + @Nullable Double offset, + @Nullable Boolean read, + @Nullable Boolean archived, + @Nullable Boolean snoozed, + @Nullable Boolean seen, + @Nullable String data, + @Nullable List severity, + @Nullable Double createdGte, + @Nullable Double createdLte, + @Nullable List contextKeys, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.limit = Optional.ofNullable(limit) + .orElse(Builder._SINGLETON_VALUE_Limit.value()); + this.after = after; + this.offset = offset; + this.read = read; + this.archived = archived; + this.snoozed = snoozed; + this.seen = seen; + this.data = data; + this.severity = severity; + this.createdGte = createdGte; + this.createdLte = createdLte; + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerGetSubscriberNotificationsRequest( + @Nonnull String subscriberId) { + this(subscriberId, null, null, + null, null, null, + null, null, null, + null, null, null, + null, null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + public Optional limit() { + return Optional.ofNullable(this.limit); + } + + public Optional after() { + return Optional.ofNullable(this.after); + } + + public Optional offset() { + return Optional.ofNullable(this.offset); + } + + /** + * Filter by read/unread state + */ + public Optional read() { + return Optional.ofNullable(this.read); + } + + /** + * Filter by archived state + */ + public Optional archived() { + return Optional.ofNullable(this.archived); + } + + /** + * Filter by snoozed state + */ + public Optional snoozed() { + return Optional.ofNullable(this.snoozed); + } + + /** + * Filter by seen state + */ + public Optional seen() { + return Optional.ofNullable(this.seen); + } + + /** + * Filter by data attributes (JSON string) + */ + public Optional data() { + return Optional.ofNullable(this.data); + } + + /** + * Filter by severity levels + */ + public Optional> severity() { + return Optional.ofNullable(this.severity); + } + + /** + * Filter notifications created on or after this timestamp (Unix timestamp in milliseconds) + */ + public Optional createdGte() { + return Optional.ofNullable(this.createdGte); + } + + /** + * Filter notifications created on or before this timestamp (Unix timestamp in milliseconds) + */ + public Optional createdLte() { + return Optional.ofNullable(this.createdLte); + } + + /** + * Context keys for filtering notifications in multi-context scenarios + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerGetSubscriberNotificationsRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + public SubscribersControllerGetSubscriberNotificationsRequest withLimit(@Nullable Double limit) { + this.limit = limit; + return this; + } + + + public SubscribersControllerGetSubscriberNotificationsRequest withAfter(@Nullable String after) { + this.after = after; + return this; + } + + + public SubscribersControllerGetSubscriberNotificationsRequest withOffset(@Nullable Double offset) { + this.offset = offset; + return this; + } + + + /** + * Filter by read/unread state + */ + public SubscribersControllerGetSubscriberNotificationsRequest withRead(@Nullable Boolean read) { + this.read = read; + return this; + } + + + /** + * Filter by archived state + */ + public SubscribersControllerGetSubscriberNotificationsRequest withArchived(@Nullable Boolean archived) { + this.archived = archived; + return this; + } + + + /** + * Filter by snoozed state + */ + public SubscribersControllerGetSubscriberNotificationsRequest withSnoozed(@Nullable Boolean snoozed) { + this.snoozed = snoozed; + return this; + } + + + /** + * Filter by seen state + */ + public SubscribersControllerGetSubscriberNotificationsRequest withSeen(@Nullable Boolean seen) { + this.seen = seen; + return this; + } + + + /** + * Filter by data attributes (JSON string) + */ + public SubscribersControllerGetSubscriberNotificationsRequest withData(@Nullable String data) { + this.data = data; + return this; + } + + + /** + * Filter by severity levels + */ + public SubscribersControllerGetSubscriberNotificationsRequest withSeverity(@Nullable List severity) { + this.severity = severity; + return this; + } + + + /** + * Filter notifications created on or after this timestamp (Unix timestamp in milliseconds) + */ + public SubscribersControllerGetSubscriberNotificationsRequest withCreatedGte(@Nullable Double createdGte) { + this.createdGte = createdGte; + return this; + } + + + /** + * Filter notifications created on or before this timestamp (Unix timestamp in milliseconds) + */ + public SubscribersControllerGetSubscriberNotificationsRequest withCreatedLte(@Nullable Double createdLte) { + this.createdLte = createdLte; + return this; + } + + + /** + * Context keys for filtering notifications in multi-context scenarios + */ + public SubscribersControllerGetSubscriberNotificationsRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerGetSubscriberNotificationsRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerGetSubscriberNotificationsRequest other = (SubscribersControllerGetSubscriberNotificationsRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.limit, other.limit) && + Utils.enhancedDeepEquals(this.after, other.after) && + Utils.enhancedDeepEquals(this.offset, other.offset) && + Utils.enhancedDeepEquals(this.read, other.read) && + Utils.enhancedDeepEquals(this.archived, other.archived) && + Utils.enhancedDeepEquals(this.snoozed, other.snoozed) && + Utils.enhancedDeepEquals(this.seen, other.seen) && + Utils.enhancedDeepEquals(this.data, other.data) && + Utils.enhancedDeepEquals(this.severity, other.severity) && + Utils.enhancedDeepEquals(this.createdGte, other.createdGte) && + Utils.enhancedDeepEquals(this.createdLte, other.createdLte) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, limit, after, + offset, read, archived, + snoozed, seen, data, + severity, createdGte, createdLte, + contextKeys, idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerGetSubscriberNotificationsRequest.class, + "subscriberId", subscriberId, + "limit", limit, + "after", after, + "offset", offset, + "read", read, + "archived", archived, + "snoozed", snoozed, + "seen", seen, + "data", data, + "severity", severity, + "createdGte", createdGte, + "createdLte", createdLte, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private Double limit; + + private String after; + + private Double offset; + + private Boolean read; + + private Boolean archived; + + private Boolean snoozed; + + private Boolean seen; + + private String data; + + private List severity; + + private Double createdGte; + + private Double createdLte; + + private List contextKeys; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + public Builder limit(@Nullable Double limit) { + this.limit = limit; + return this; + } + + public Builder after(@Nullable String after) { + this.after = after; + return this; + } + + public Builder offset(@Nullable Double offset) { + this.offset = offset; + return this; + } + + /** + * Filter by read/unread state + */ + public Builder read(@Nullable Boolean read) { + this.read = read; + return this; + } + + /** + * Filter by archived state + */ + public Builder archived(@Nullable Boolean archived) { + this.archived = archived; + return this; + } + + /** + * Filter by snoozed state + */ + public Builder snoozed(@Nullable Boolean snoozed) { + this.snoozed = snoozed; + return this; + } + + /** + * Filter by seen state + */ + public Builder seen(@Nullable Boolean seen) { + this.seen = seen; + return this; + } + + /** + * Filter by data attributes (JSON string) + */ + public Builder data(@Nullable String data) { + this.data = data; + return this; + } + + /** + * Filter by severity levels + */ + public Builder severity(@Nullable List severity) { + this.severity = severity; + return this; + } + + /** + * Filter notifications created on or after this timestamp (Unix timestamp in milliseconds) + */ + public Builder createdGte(@Nullable Double createdGte) { + this.createdGte = createdGte; + return this; + } + + /** + * Filter notifications created on or before this timestamp (Unix timestamp in milliseconds) + */ + public Builder createdLte(@Nullable Double createdLte) { + this.createdLte = createdLte; + return this; + } + + /** + * Context keys for filtering notifications in multi-context scenarios + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerGetSubscriberNotificationsRequest build() { + return new SubscribersControllerGetSubscriberNotificationsRequest( + subscriberId, limit, after, + offset, read, archived, + snoozed, seen, data, + severity, createdGte, createdLte, + contextKeys, idempotencyKey); + } + + + private static final LazySingletonValue _SINGLETON_VALUE_Limit = + new LazySingletonValue<>( + "limit", + "10", + new TypeReference() {}); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsRequestBuilder.java new file mode 100644 index 00000000..c35352f8 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerGetSubscriberNotifications; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; + +public class SubscribersControllerGetSubscriberNotificationsRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private SubscribersControllerGetSubscriberNotificationsRequest request; + private final Options.Builder optionsBuilder; + + public SubscribersControllerGetSubscriberNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerGetSubscriberNotificationsRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + public SubscribersControllerGetSubscriberNotificationsRequestBuilder request(@Nonnull SubscribersControllerGetSubscriberNotificationsRequest request) { + this.request = Utils.checkNotNull(request, "request"); + return this; + } + + private SubscribersControllerGetSubscriberNotificationsRequest _buildRequest() { + return this.request; + } + + public SubscribersControllerGetSubscriberNotificationsRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerGetSubscriberNotificationsResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerGetSubscriberNotifications.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsResponse.java new file mode 100644 index 00000000..30e4b1b2 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberNotificationsResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.GetSubscriberNotificationsResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerGetSubscriberNotificationsResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerGetSubscriberNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.getSubscriberNotificationsResponseDto = getSubscriberNotificationsResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerGetSubscriberNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional getSubscriberNotificationsResponseDto() { + return Optional.ofNullable(this.getSubscriberNotificationsResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerGetSubscriberNotificationsResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerGetSubscriberNotificationsResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerGetSubscriberNotificationsResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerGetSubscriberNotificationsResponse withGetSubscriberNotificationsResponseDto(@Nullable GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto) { + this.getSubscriberNotificationsResponseDto = getSubscriberNotificationsResponseDto; + return this; + } + + + public SubscribersControllerGetSubscriberNotificationsResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerGetSubscriberNotificationsResponse other = (SubscribersControllerGetSubscriberNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getSubscriberNotificationsResponseDto, other.getSubscriberNotificationsResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getSubscriberNotificationsResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerGetSubscriberNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getSubscriberNotificationsResponseDto", getSubscriberNotificationsResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder getSubscriberNotificationsResponseDto(@Nullable GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto) { + this.getSubscriberNotificationsResponseDto = getSubscriberNotificationsResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerGetSubscriberNotificationsResponse build() { + return new SubscribersControllerGetSubscriberNotificationsResponse( + contentType, statusCode, rawResponse, + getSubscriberNotificationsResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.java index cd22ba52..4f0638b7 100644 --- a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.java +++ b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberPreferencesRequest.java @@ -17,7 +17,9 @@ public class SubscribersControllerGetSubscriberPreferencesRequest { - + /** + * The identifier of the subscriber + */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") private String subscriberId; @@ -57,6 +59,9 @@ public SubscribersControllerGetSubscriberPreferencesRequest( null); } + /** + * The identifier of the subscriber + */ public String subscriberId() { return this.subscriberId; } @@ -84,6 +89,9 @@ public static Builder builder() { } + /** + * The identifier of the subscriber + */ public SubscribersControllerGetSubscriberPreferencesRequest withSubscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; @@ -161,6 +169,9 @@ private Builder() { // force use of static builder() method } + /** + * The identifier of the subscriber + */ public Builder subscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberRequest.java index be4c1fb5..64c2f9f0 100644 --- a/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberRequest.java +++ b/src/main/java/co/novu/models/operations/SubscribersControllerGetSubscriberRequest.java @@ -14,7 +14,9 @@ public class SubscribersControllerGetSubscriberRequest { - + /** + * The identifier of the subscriber + */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") private String subscriberId; @@ -38,6 +40,9 @@ public SubscribersControllerGetSubscriberRequest( this(subscriberId, null); } + /** + * The identifier of the subscriber + */ public String subscriberId() { return this.subscriberId; } @@ -54,6 +59,9 @@ public static Builder builder() { } + /** + * The identifier of the subscriber + */ public SubscribersControllerGetSubscriberRequest withSubscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; @@ -107,6 +115,9 @@ private Builder() { // force use of static builder() method } + /** + * The identifier of the subscriber + */ public Builder subscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequest.java new file mode 100644 index 00000000..583a6144 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequest.java @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class SubscribersControllerMarkAllNotificationsAsReadRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private UpdateAllSubscriberNotificationsDto body; + + @JsonCreator + public SubscribersControllerMarkAllNotificationsAsReadRequest( + @Nonnull String subscriberId, + @Nullable String idempotencyKey, + @Nonnull UpdateAllSubscriberNotificationsDto body) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public SubscribersControllerMarkAllNotificationsAsReadRequest( + @Nonnull String subscriberId, + @Nonnull UpdateAllSubscriberNotificationsDto body) { + this(subscriberId, null, body); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public UpdateAllSubscriberNotificationsDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerMarkAllNotificationsAsReadRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerMarkAllNotificationsAsReadRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + public SubscribersControllerMarkAllNotificationsAsReadRequest withBody(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkAllNotificationsAsReadRequest other = (SubscribersControllerMarkAllNotificationsAsReadRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkAllNotificationsAsReadRequest.class, + "subscriberId", subscriberId, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String idempotencyKey; + + private UpdateAllSubscriberNotificationsDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public SubscribersControllerMarkAllNotificationsAsReadRequest build() { + return new SubscribersControllerMarkAllNotificationsAsReadRequest( + subscriberId, idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequestBuilder.java new file mode 100644 index 00000000..74cf3502 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadRequestBuilder.java @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.operations.SubscribersControllerMarkAllNotificationsAsRead; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class SubscribersControllerMarkAllNotificationsAsReadRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerMarkAllNotificationsAsReadRequest.Builder pojoBuilder; + private SubscribersControllerMarkAllNotificationsAsReadRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerMarkAllNotificationsAsReadRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerMarkAllNotificationsAsReadRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerMarkAllNotificationsAsReadResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerMarkAllNotificationsAsRead.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadResponse.java new file mode 100644 index 00000000..760436c0 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkAllNotificationsAsReadResponse.java @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerMarkAllNotificationsAsReadResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerMarkAllNotificationsAsReadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerMarkAllNotificationsAsReadResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerMarkAllNotificationsAsReadResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerMarkAllNotificationsAsReadResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerMarkAllNotificationsAsReadResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkAllNotificationsAsReadResponse other = (SubscribersControllerMarkAllNotificationsAsReadResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkAllNotificationsAsReadResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerMarkAllNotificationsAsReadResponse build() { + return new SubscribersControllerMarkAllNotificationsAsReadResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadRequest.java new file mode 100644 index 00000000..631fbe95 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadRequest.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerMarkNotificationAsReadRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * The identifier of the notification + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=notificationId") + private String notificationId; + + /** + * Context keys for filtering + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerMarkNotificationAsReadRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nullable List contextKeys, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.notificationId = Optional.ofNullable(notificationId) + .orElseThrow(() -> new IllegalArgumentException("notificationId cannot be null")); + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerMarkNotificationAsReadRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId) { + this(subscriberId, notificationId, null, + null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * The identifier of the notification + */ + public String notificationId() { + return this.notificationId; + } + + /** + * Context keys for filtering + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerMarkNotificationAsReadRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * The identifier of the notification + */ + public SubscribersControllerMarkNotificationAsReadRequest withNotificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + + /** + * Context keys for filtering + */ + public SubscribersControllerMarkNotificationAsReadRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerMarkNotificationAsReadRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkNotificationAsReadRequest other = (SubscribersControllerMarkNotificationAsReadRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.notificationId, other.notificationId) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkNotificationAsReadRequest.class, + "subscriberId", subscriberId, + "notificationId", notificationId, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String notificationId; + + private List contextKeys; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * The identifier of the notification + */ + public Builder notificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + /** + * Context keys for filtering + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerMarkNotificationAsReadRequest build() { + return new SubscribersControllerMarkNotificationAsReadRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadRequestBuilder.java new file mode 100644 index 00000000..9555792b --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadRequestBuilder.java @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerMarkNotificationAsRead; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; + +public class SubscribersControllerMarkNotificationAsReadRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerMarkNotificationAsReadRequest.Builder pojoBuilder; + private SubscribersControllerMarkNotificationAsReadRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerMarkNotificationAsReadRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerMarkNotificationAsReadRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerMarkNotificationAsReadRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerMarkNotificationAsReadResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerMarkNotificationAsRead.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadResponse.java new file mode 100644 index 00000000..aba6bb6e --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsReadResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerMarkNotificationAsReadResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerMarkNotificationAsReadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerMarkNotificationAsReadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerMarkNotificationAsReadResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerMarkNotificationAsReadResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerMarkNotificationAsReadResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerMarkNotificationAsReadResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerMarkNotificationAsReadResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkNotificationAsReadResponse other = (SubscribersControllerMarkNotificationAsReadResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkNotificationAsReadResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerMarkNotificationAsReadResponse build() { + return new SubscribersControllerMarkNotificationAsReadResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadRequest.java new file mode 100644 index 00000000..94889e95 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadRequest.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerMarkNotificationAsUnreadRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * The identifier of the notification + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=notificationId") + private String notificationId; + + /** + * Context keys for filtering + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerMarkNotificationAsUnreadRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nullable List contextKeys, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.notificationId = Optional.ofNullable(notificationId) + .orElseThrow(() -> new IllegalArgumentException("notificationId cannot be null")); + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerMarkNotificationAsUnreadRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId) { + this(subscriberId, notificationId, null, + null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * The identifier of the notification + */ + public String notificationId() { + return this.notificationId; + } + + /** + * Context keys for filtering + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerMarkNotificationAsUnreadRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * The identifier of the notification + */ + public SubscribersControllerMarkNotificationAsUnreadRequest withNotificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + + /** + * Context keys for filtering + */ + public SubscribersControllerMarkNotificationAsUnreadRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerMarkNotificationAsUnreadRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkNotificationAsUnreadRequest other = (SubscribersControllerMarkNotificationAsUnreadRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.notificationId, other.notificationId) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkNotificationAsUnreadRequest.class, + "subscriberId", subscriberId, + "notificationId", notificationId, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String notificationId; + + private List contextKeys; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * The identifier of the notification + */ + public Builder notificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + /** + * Context keys for filtering + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadRequest build() { + return new SubscribersControllerMarkNotificationAsUnreadRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadRequestBuilder.java new file mode 100644 index 00000000..d7fd3747 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadRequestBuilder.java @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerMarkNotificationAsUnread; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; + +public class SubscribersControllerMarkNotificationAsUnreadRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerMarkNotificationAsUnreadRequest.Builder pojoBuilder; + private SubscribersControllerMarkNotificationAsUnreadRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerMarkNotificationAsUnreadRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerMarkNotificationAsUnreadRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerMarkNotificationAsUnreadResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerMarkNotificationAsUnread.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadResponse.java new file mode 100644 index 00000000..40946726 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationAsUnreadResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerMarkNotificationAsUnreadResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerMarkNotificationAsUnreadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerMarkNotificationAsUnreadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerMarkNotificationAsUnreadResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerMarkNotificationAsUnreadResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerMarkNotificationAsUnreadResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerMarkNotificationAsUnreadResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerMarkNotificationAsUnreadResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkNotificationAsUnreadResponse other = (SubscribersControllerMarkNotificationAsUnreadResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkNotificationAsUnreadResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadResponse build() { + return new SubscribersControllerMarkNotificationAsUnreadResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenRequest.java new file mode 100644 index 00000000..87a60739 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenRequest.java @@ -0,0 +1,168 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.MarkSubscriberNotificationsAsSeenDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class SubscribersControllerMarkNotificationsAsSeenRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private MarkSubscriberNotificationsAsSeenDto body; + + @JsonCreator + public SubscribersControllerMarkNotificationsAsSeenRequest( + @Nonnull String subscriberId, + @Nullable String idempotencyKey, + @Nonnull MarkSubscriberNotificationsAsSeenDto body) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public SubscribersControllerMarkNotificationsAsSeenRequest( + @Nonnull String subscriberId, + @Nonnull MarkSubscriberNotificationsAsSeenDto body) { + this(subscriberId, null, body); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public MarkSubscriberNotificationsAsSeenDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerMarkNotificationsAsSeenRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerMarkNotificationsAsSeenRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + public SubscribersControllerMarkNotificationsAsSeenRequest withBody(@Nonnull MarkSubscriberNotificationsAsSeenDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkNotificationsAsSeenRequest other = (SubscribersControllerMarkNotificationsAsSeenRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkNotificationsAsSeenRequest.class, + "subscriberId", subscriberId, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String idempotencyKey; + + private MarkSubscriberNotificationsAsSeenDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder body(@Nonnull MarkSubscriberNotificationsAsSeenDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public SubscribersControllerMarkNotificationsAsSeenRequest build() { + return new SubscribersControllerMarkNotificationsAsSeenRequest( + subscriberId, idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenRequestBuilder.java new file mode 100644 index 00000000..0c056af3 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenRequestBuilder.java @@ -0,0 +1,81 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.MarkSubscriberNotificationsAsSeenDto; +import co.novu.operations.SubscribersControllerMarkNotificationsAsSeen; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class SubscribersControllerMarkNotificationsAsSeenRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerMarkNotificationsAsSeenRequest.Builder pojoBuilder; + private SubscribersControllerMarkNotificationsAsSeenRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerMarkNotificationsAsSeenRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder body(@Nonnull MarkSubscriberNotificationsAsSeenDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerMarkNotificationsAsSeenRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerMarkNotificationsAsSeenResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerMarkNotificationsAsSeen.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenResponse.java new file mode 100644 index 00000000..cd538e52 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerMarkNotificationsAsSeenResponse.java @@ -0,0 +1,200 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerMarkNotificationsAsSeenResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerMarkNotificationsAsSeenResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerMarkNotificationsAsSeenResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerMarkNotificationsAsSeenResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerMarkNotificationsAsSeenResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerMarkNotificationsAsSeenResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkNotificationsAsSeenResponse other = (SubscribersControllerMarkNotificationsAsSeenResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkNotificationsAsSeenResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerMarkNotificationsAsSeenResponse build() { + return new SubscribersControllerMarkNotificationsAsSeenResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerPatchSubscriberRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerPatchSubscriberRequest.java index c7fecb6c..3666b41e 100644 --- a/src/main/java/co/novu/models/operations/SubscribersControllerPatchSubscriberRequest.java +++ b/src/main/java/co/novu/models/operations/SubscribersControllerPatchSubscriberRequest.java @@ -15,7 +15,9 @@ public class SubscribersControllerPatchSubscriberRequest { - + /** + * The identifier of the subscriber + */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") private String subscriberId; @@ -47,6 +49,9 @@ public SubscribersControllerPatchSubscriberRequest( this(subscriberId, null, body); } + /** + * The identifier of the subscriber + */ public String subscriberId() { return this.subscriberId; } @@ -67,6 +72,9 @@ public static Builder builder() { } + /** + * The identifier of the subscriber + */ public SubscribersControllerPatchSubscriberRequest withSubscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; @@ -130,6 +138,9 @@ private Builder() { // force use of static builder() method } + /** + * The identifier of the subscriber + */ public Builder subscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerRemoveSubscriberRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerRemoveSubscriberRequest.java index 19c49f78..7ed41df2 100644 --- a/src/main/java/co/novu/models/operations/SubscribersControllerRemoveSubscriberRequest.java +++ b/src/main/java/co/novu/models/operations/SubscribersControllerRemoveSubscriberRequest.java @@ -14,7 +14,9 @@ public class SubscribersControllerRemoveSubscriberRequest { - + /** + * The identifier of the subscriber + */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") private String subscriberId; @@ -38,6 +40,9 @@ public SubscribersControllerRemoveSubscriberRequest( this(subscriberId, null); } + /** + * The identifier of the subscriber + */ public String subscriberId() { return this.subscriberId; } @@ -54,6 +59,9 @@ public static Builder builder() { } + /** + * The identifier of the subscriber + */ public SubscribersControllerRemoveSubscriberRequest withSubscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; @@ -107,6 +115,9 @@ private Builder() { // force use of static builder() method } + /** + * The identifier of the subscriber + */ public Builder subscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionActionType.java b/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionActionType.java new file mode 100644 index 00000000..b4d49f04 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionActionType.java @@ -0,0 +1,40 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import com.fasterxml.jackson.annotation.JsonValue; +import java.lang.String; +import java.util.Objects; +import java.util.Optional; + +/** + * SubscribersControllerRevertNotificationActionActionType + * + *

The type of action (primary or secondary) + */ +public enum SubscribersControllerRevertNotificationActionActionType { + PRIMARY("primary"), + SECONDARY("secondary"); + + @JsonValue + private final String value; + + SubscribersControllerRevertNotificationActionActionType(String value) { + this.value = value; + } + + public String value() { + return value; + } + + public static Optional fromValue(String value) { + for (SubscribersControllerRevertNotificationActionActionType o: SubscribersControllerRevertNotificationActionActionType.values()) { + if (Objects.deepEquals(o.value, value)) { + return Optional.of(o); + } + } + return Optional.empty(); + } +} + diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionRequest.java new file mode 100644 index 00000000..49045e02 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionRequest.java @@ -0,0 +1,256 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerRevertNotificationActionRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * The identifier of the notification + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=notificationId") + private String notificationId; + + /** + * The type of action (primary or secondary) + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=actionType") + private SubscribersControllerRevertNotificationActionActionType actionType; + + /** + * Context keys for filtering + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerRevertNotificationActionRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nonnull SubscribersControllerRevertNotificationActionActionType actionType, + @Nullable List contextKeys, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.notificationId = Optional.ofNullable(notificationId) + .orElseThrow(() -> new IllegalArgumentException("notificationId cannot be null")); + this.actionType = Optional.ofNullable(actionType) + .orElseThrow(() -> new IllegalArgumentException("actionType cannot be null")); + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerRevertNotificationActionRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nonnull SubscribersControllerRevertNotificationActionActionType actionType) { + this(subscriberId, notificationId, actionType, + null, null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * The identifier of the notification + */ + public String notificationId() { + return this.notificationId; + } + + /** + * The type of action (primary or secondary) + */ + public SubscribersControllerRevertNotificationActionActionType actionType() { + return this.actionType; + } + + /** + * Context keys for filtering + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerRevertNotificationActionRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * The identifier of the notification + */ + public SubscribersControllerRevertNotificationActionRequest withNotificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + + /** + * The type of action (primary or secondary) + */ + public SubscribersControllerRevertNotificationActionRequest withActionType(@Nonnull SubscribersControllerRevertNotificationActionActionType actionType) { + this.actionType = Utils.checkNotNull(actionType, "actionType"); + return this; + } + + + /** + * Context keys for filtering + */ + public SubscribersControllerRevertNotificationActionRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerRevertNotificationActionRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerRevertNotificationActionRequest other = (SubscribersControllerRevertNotificationActionRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.notificationId, other.notificationId) && + Utils.enhancedDeepEquals(this.actionType, other.actionType) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, notificationId, actionType, + contextKeys, idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerRevertNotificationActionRequest.class, + "subscriberId", subscriberId, + "notificationId", notificationId, + "actionType", actionType, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String notificationId; + + private SubscribersControllerRevertNotificationActionActionType actionType; + + private List contextKeys; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * The identifier of the notification + */ + public Builder notificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + /** + * The type of action (primary or secondary) + */ + public Builder actionType(@Nonnull SubscribersControllerRevertNotificationActionActionType actionType) { + this.actionType = Utils.checkNotNull(actionType, "actionType"); + return this; + } + + /** + * Context keys for filtering + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerRevertNotificationActionRequest build() { + return new SubscribersControllerRevertNotificationActionRequest( + subscriberId, notificationId, actionType, + contextKeys, idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionRequestBuilder.java new file mode 100644 index 00000000..806d04fe --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerRevertNotificationAction; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; + +public class SubscribersControllerRevertNotificationActionRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private SubscribersControllerRevertNotificationActionRequest request; + private final Options.Builder optionsBuilder; + + public SubscribersControllerRevertNotificationActionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerRevertNotificationActionRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + public SubscribersControllerRevertNotificationActionRequestBuilder request(@Nonnull SubscribersControllerRevertNotificationActionRequest request) { + this.request = Utils.checkNotNull(request, "request"); + return this; + } + + private SubscribersControllerRevertNotificationActionRequest _buildRequest() { + return this.request; + } + + public SubscribersControllerRevertNotificationActionRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerRevertNotificationActionResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerRevertNotificationAction.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionResponse.java new file mode 100644 index 00000000..e6149ba2 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerRevertNotificationActionResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerRevertNotificationActionResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerRevertNotificationActionResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerRevertNotificationActionResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerRevertNotificationActionResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerRevertNotificationActionResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerRevertNotificationActionResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerRevertNotificationActionResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerRevertNotificationActionResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerRevertNotificationActionResponse other = (SubscribersControllerRevertNotificationActionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerRevertNotificationActionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerRevertNotificationActionResponse build() { + return new SubscribersControllerRevertNotificationActionResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationRequest.java new file mode 100644 index 00000000..baf865d4 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationRequest.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.SnoozeSubscriberNotificationDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerSnoozeNotificationRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * The identifier of the notification + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=notificationId") + private String notificationId; + + /** + * Context keys for filtering + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + + @SpeakeasyMetadata("request:mediaType=application/json") + private SnoozeSubscriberNotificationDto body; + + @JsonCreator + public SubscribersControllerSnoozeNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nullable List contextKeys, + @Nullable String idempotencyKey, + @Nonnull SnoozeSubscriberNotificationDto body) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.notificationId = Optional.ofNullable(notificationId) + .orElseThrow(() -> new IllegalArgumentException("notificationId cannot be null")); + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public SubscribersControllerSnoozeNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nonnull SnoozeSubscriberNotificationDto body) { + this(subscriberId, notificationId, null, + null, body); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * The identifier of the notification + */ + public String notificationId() { + return this.notificationId; + } + + /** + * Context keys for filtering + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public SnoozeSubscriberNotificationDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerSnoozeNotificationRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * The identifier of the notification + */ + public SubscribersControllerSnoozeNotificationRequest withNotificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + + /** + * Context keys for filtering + */ + public SubscribersControllerSnoozeNotificationRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerSnoozeNotificationRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + public SubscribersControllerSnoozeNotificationRequest withBody(@Nonnull SnoozeSubscriberNotificationDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerSnoozeNotificationRequest other = (SubscribersControllerSnoozeNotificationRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.notificationId, other.notificationId) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, notificationId, contextKeys, + idempotencyKey, body); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerSnoozeNotificationRequest.class, + "subscriberId", subscriberId, + "notificationId", notificationId, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String notificationId; + + private List contextKeys; + + private String idempotencyKey; + + private SnoozeSubscriberNotificationDto body; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * The identifier of the notification + */ + public Builder notificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + /** + * Context keys for filtering + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public Builder body(@Nonnull SnoozeSubscriberNotificationDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public SubscribersControllerSnoozeNotificationRequest build() { + return new SubscribersControllerSnoozeNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey, body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationRequestBuilder.java new file mode 100644 index 00000000..d7670690 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationRequestBuilder.java @@ -0,0 +1,60 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerSnoozeNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; + +public class SubscribersControllerSnoozeNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private SubscribersControllerSnoozeNotificationRequest request; + private final Options.Builder optionsBuilder; + + public SubscribersControllerSnoozeNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerSnoozeNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + public SubscribersControllerSnoozeNotificationRequestBuilder request(@Nonnull SubscribersControllerSnoozeNotificationRequest request) { + this.request = Utils.checkNotNull(request, "request"); + return this; + } + + private SubscribersControllerSnoozeNotificationRequest _buildRequest() { + return this.request; + } + + public SubscribersControllerSnoozeNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerSnoozeNotificationResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerSnoozeNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationResponse.java new file mode 100644 index 00000000..680e6b8d --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerSnoozeNotificationResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerSnoozeNotificationResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerSnoozeNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerSnoozeNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerSnoozeNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerSnoozeNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerSnoozeNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerSnoozeNotificationResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerSnoozeNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerSnoozeNotificationResponse other = (SubscribersControllerSnoozeNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerSnoozeNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerSnoozeNotificationResponse build() { + return new SubscribersControllerSnoozeNotificationResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationRequest.java new file mode 100644 index 00000000..73d8aa65 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationRequest.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerUnarchiveNotificationRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * The identifier of the notification + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=notificationId") + private String notificationId; + + /** + * Context keys for filtering + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerUnarchiveNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nullable List contextKeys, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.notificationId = Optional.ofNullable(notificationId) + .orElseThrow(() -> new IllegalArgumentException("notificationId cannot be null")); + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerUnarchiveNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId) { + this(subscriberId, notificationId, null, + null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * The identifier of the notification + */ + public String notificationId() { + return this.notificationId; + } + + /** + * Context keys for filtering + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerUnarchiveNotificationRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * The identifier of the notification + */ + public SubscribersControllerUnarchiveNotificationRequest withNotificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + + /** + * Context keys for filtering + */ + public SubscribersControllerUnarchiveNotificationRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerUnarchiveNotificationRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerUnarchiveNotificationRequest other = (SubscribersControllerUnarchiveNotificationRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.notificationId, other.notificationId) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerUnarchiveNotificationRequest.class, + "subscriberId", subscriberId, + "notificationId", notificationId, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String notificationId; + + private List contextKeys; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * The identifier of the notification + */ + public Builder notificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + /** + * Context keys for filtering + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerUnarchiveNotificationRequest build() { + return new SubscribersControllerUnarchiveNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationRequestBuilder.java new file mode 100644 index 00000000..a61c5269 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationRequestBuilder.java @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerUnarchiveNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; + +public class SubscribersControllerUnarchiveNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerUnarchiveNotificationRequest.Builder pojoBuilder; + private SubscribersControllerUnarchiveNotificationRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerUnarchiveNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerUnarchiveNotificationRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerUnarchiveNotificationRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerUnarchiveNotificationResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerUnarchiveNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationResponse.java new file mode 100644 index 00000000..45d9db1a --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerUnarchiveNotificationResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerUnarchiveNotificationResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerUnarchiveNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerUnarchiveNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerUnarchiveNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerUnarchiveNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerUnarchiveNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerUnarchiveNotificationResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerUnarchiveNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerUnarchiveNotificationResponse other = (SubscribersControllerUnarchiveNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerUnarchiveNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerUnarchiveNotificationResponse build() { + return new SubscribersControllerUnarchiveNotificationResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationRequest.java new file mode 100644 index 00000000..a04ac758 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationRequest.java @@ -0,0 +1,218 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.List; +import java.util.Optional; + + +public class SubscribersControllerUnsnoozeNotificationRequest { + /** + * The identifier of the subscriber + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") + private String subscriberId; + + /** + * The identifier of the notification + */ + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=notificationId") + private String notificationId; + + /** + * Context keys for filtering + */ + @SpeakeasyMetadata("queryParam:style=form,explode=true,name=contextKeys") + private List contextKeys; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + @JsonCreator + public SubscribersControllerUnsnoozeNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId, + @Nullable List contextKeys, + @Nullable String idempotencyKey) { + this.subscriberId = Optional.ofNullable(subscriberId) + .orElseThrow(() -> new IllegalArgumentException("subscriberId cannot be null")); + this.notificationId = Optional.ofNullable(notificationId) + .orElseThrow(() -> new IllegalArgumentException("notificationId cannot be null")); + this.contextKeys = contextKeys; + this.idempotencyKey = idempotencyKey; + } + + public SubscribersControllerUnsnoozeNotificationRequest( + @Nonnull String subscriberId, + @Nonnull String notificationId) { + this(subscriberId, notificationId, null, + null); + } + + /** + * The identifier of the subscriber + */ + public String subscriberId() { + return this.subscriberId; + } + + /** + * The identifier of the notification + */ + public String notificationId() { + return this.notificationId; + } + + /** + * Context keys for filtering + */ + public Optional> contextKeys() { + return Optional.ofNullable(this.contextKeys); + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * The identifier of the subscriber + */ + public SubscribersControllerUnsnoozeNotificationRequest withSubscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + + /** + * The identifier of the notification + */ + public SubscribersControllerUnsnoozeNotificationRequest withNotificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + + /** + * Context keys for filtering + */ + public SubscribersControllerUnsnoozeNotificationRequest withContextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + + /** + * A header for idempotency purposes + */ + public SubscribersControllerUnsnoozeNotificationRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerUnsnoozeNotificationRequest other = (SubscribersControllerUnsnoozeNotificationRequest) o; + return + Utils.enhancedDeepEquals(this.subscriberId, other.subscriberId) && + Utils.enhancedDeepEquals(this.notificationId, other.notificationId) && + Utils.enhancedDeepEquals(this.contextKeys, other.contextKeys) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerUnsnoozeNotificationRequest.class, + "subscriberId", subscriberId, + "notificationId", notificationId, + "contextKeys", contextKeys, + "idempotencyKey", idempotencyKey); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String subscriberId; + + private String notificationId; + + private List contextKeys; + + private String idempotencyKey; + + private Builder() { + // force use of static builder() method + } + + /** + * The identifier of the subscriber + */ + public Builder subscriberId(@Nonnull String subscriberId) { + this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); + return this; + } + + /** + * The identifier of the notification + */ + public Builder notificationId(@Nonnull String notificationId) { + this.notificationId = Utils.checkNotNull(notificationId, "notificationId"); + return this; + } + + /** + * Context keys for filtering + */ + public Builder contextKeys(@Nullable List contextKeys) { + this.contextKeys = contextKeys; + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + public SubscribersControllerUnsnoozeNotificationRequest build() { + return new SubscribersControllerUnsnoozeNotificationRequest( + subscriberId, notificationId, contextKeys, + idempotencyKey); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationRequestBuilder.java new file mode 100644 index 00000000..7e0d5ac2 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationRequestBuilder.java @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.operations.SubscribersControllerUnsnoozeNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; + +public class SubscribersControllerUnsnoozeNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerUnsnoozeNotificationRequest.Builder pojoBuilder; + private SubscribersControllerUnsnoozeNotificationRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerUnsnoozeNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerUnsnoozeNotificationRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerUnsnoozeNotificationRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public SubscribersControllerUnsnoozeNotificationResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new SubscribersControllerUnsnoozeNotification.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationResponse.java b/src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationResponse.java new file mode 100644 index 00000000..25706cb1 --- /dev/null +++ b/src/main/java/co/novu/models/operations/SubscribersControllerUnsnoozeNotificationResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerUnsnoozeNotificationResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerUnsnoozeNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerUnsnoozeNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerUnsnoozeNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerUnsnoozeNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerUnsnoozeNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerUnsnoozeNotificationResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerUnsnoozeNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerUnsnoozeNotificationResponse other = (SubscribersControllerUnsnoozeNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerUnsnoozeNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerUnsnoozeNotificationResponse build() { + return new SubscribersControllerUnsnoozeNotificationResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.java b/src/main/java/co/novu/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.java index 9c3f1587..7c939830 100644 --- a/src/main/java/co/novu/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.java +++ b/src/main/java/co/novu/models/operations/SubscribersControllerUpdateSubscriberPreferencesRequest.java @@ -15,7 +15,9 @@ public class SubscribersControllerUpdateSubscriberPreferencesRequest { - + /** + * The identifier of the subscriber + */ @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=subscriberId") private String subscriberId; @@ -47,6 +49,9 @@ public SubscribersControllerUpdateSubscriberPreferencesRequest( this(subscriberId, null, body); } + /** + * The identifier of the subscriber + */ public String subscriberId() { return this.subscriberId; } @@ -67,6 +72,9 @@ public static Builder builder() { } + /** + * The identifier of the subscriber + */ public SubscribersControllerUpdateSubscriberPreferencesRequest withSubscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; @@ -130,6 +138,9 @@ private Builder() { // force use of static builder() method } + /** + * The identifier of the subscriber + */ public Builder subscriberId(@Nonnull String subscriberId) { this.subscriberId = Utils.checkNotNull(subscriberId, "subscriberId"); return this; diff --git a/src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewRequest.java b/src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewRequest.java new file mode 100644 index 00000000..141c6a04 --- /dev/null +++ b/src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewRequest.java @@ -0,0 +1,198 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.GeneratePreviewRequestDto; +import co.novu.utils.SpeakeasyMetadata; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.Override; +import java.lang.String; +import java.util.Optional; + + +public class WorkflowControllerGeneratePreviewRequest { + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=workflowId") + private String workflowId; + + + @SpeakeasyMetadata("pathParam:style=simple,explode=false,name=stepId") + private String stepId; + + /** + * A header for idempotency purposes + */ + @SpeakeasyMetadata("header:style=simple,explode=false,name=idempotency-key") + private String idempotencyKey; + + /** + * Preview generation details + */ + @SpeakeasyMetadata("request:mediaType=application/json") + private GeneratePreviewRequestDto body; + + @JsonCreator + public WorkflowControllerGeneratePreviewRequest( + @Nonnull String workflowId, + @Nonnull String stepId, + @Nullable String idempotencyKey, + @Nonnull GeneratePreviewRequestDto body) { + this.workflowId = Optional.ofNullable(workflowId) + .orElseThrow(() -> new IllegalArgumentException("workflowId cannot be null")); + this.stepId = Optional.ofNullable(stepId) + .orElseThrow(() -> new IllegalArgumentException("stepId cannot be null")); + this.idempotencyKey = idempotencyKey; + this.body = Optional.ofNullable(body) + .orElseThrow(() -> new IllegalArgumentException("body cannot be null")); + } + + public WorkflowControllerGeneratePreviewRequest( + @Nonnull String workflowId, + @Nonnull String stepId, + @Nonnull GeneratePreviewRequestDto body) { + this(workflowId, stepId, null, + body); + } + + public String workflowId() { + return this.workflowId; + } + + public String stepId() { + return this.stepId; + } + + /** + * A header for idempotency purposes + */ + public Optional idempotencyKey() { + return Optional.ofNullable(this.idempotencyKey); + } + + /** + * Preview generation details + */ + public GeneratePreviewRequestDto body() { + return this.body; + } + + public static Builder builder() { + return new Builder(); + } + + + public WorkflowControllerGeneratePreviewRequest withWorkflowId(@Nonnull String workflowId) { + this.workflowId = Utils.checkNotNull(workflowId, "workflowId"); + return this; + } + + + public WorkflowControllerGeneratePreviewRequest withStepId(@Nonnull String stepId) { + this.stepId = Utils.checkNotNull(stepId, "stepId"); + return this; + } + + + /** + * A header for idempotency purposes + */ + public WorkflowControllerGeneratePreviewRequest withIdempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + + /** + * Preview generation details + */ + public WorkflowControllerGeneratePreviewRequest withBody(@Nonnull GeneratePreviewRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkflowControllerGeneratePreviewRequest other = (WorkflowControllerGeneratePreviewRequest) o; + return + Utils.enhancedDeepEquals(this.workflowId, other.workflowId) && + Utils.enhancedDeepEquals(this.stepId, other.stepId) && + Utils.enhancedDeepEquals(this.idempotencyKey, other.idempotencyKey) && + Utils.enhancedDeepEquals(this.body, other.body); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + workflowId, stepId, idempotencyKey, + body); + } + + @Override + public String toString() { + return Utils.toString(WorkflowControllerGeneratePreviewRequest.class, + "workflowId", workflowId, + "stepId", stepId, + "idempotencyKey", idempotencyKey, + "body", body); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String workflowId; + + private String stepId; + + private String idempotencyKey; + + private GeneratePreviewRequestDto body; + + private Builder() { + // force use of static builder() method + } + + public Builder workflowId(@Nonnull String workflowId) { + this.workflowId = Utils.checkNotNull(workflowId, "workflowId"); + return this; + } + + public Builder stepId(@Nonnull String stepId) { + this.stepId = Utils.checkNotNull(stepId, "stepId"); + return this; + } + + /** + * A header for idempotency purposes + */ + public Builder idempotencyKey(@Nullable String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + return this; + } + + /** + * Preview generation details + */ + public Builder body(@Nonnull GeneratePreviewRequestDto body) { + this.body = Utils.checkNotNull(body, "body"); + return this; + } + + public WorkflowControllerGeneratePreviewRequest build() { + return new WorkflowControllerGeneratePreviewRequest( + workflowId, stepId, idempotencyKey, + body); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewRequestBuilder.java b/src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewRequestBuilder.java new file mode 100644 index 00000000..6b4d33c2 --- /dev/null +++ b/src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewRequestBuilder.java @@ -0,0 +1,87 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import static co.novu.operations.Operations.RequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.GeneratePreviewRequestDto; +import co.novu.operations.WorkflowControllerGeneratePreview; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; + +public class WorkflowControllerGeneratePreviewRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final WorkflowControllerGeneratePreviewRequest.Builder pojoBuilder; + private WorkflowControllerGeneratePreviewRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public WorkflowControllerGeneratePreviewRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = WorkflowControllerGeneratePreviewRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public WorkflowControllerGeneratePreviewRequestBuilder workflowId(@Nonnull String workflowId) { + this.pojoBuilder.workflowId(workflowId); + this._setterCalled = true; + return this; + } + + public WorkflowControllerGeneratePreviewRequestBuilder stepId(@Nonnull String stepId) { + this.pojoBuilder.stepId(stepId); + this._setterCalled = true; + return this; + } + + public WorkflowControllerGeneratePreviewRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public WorkflowControllerGeneratePreviewRequestBuilder body(@Nonnull GeneratePreviewRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public WorkflowControllerGeneratePreviewRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private WorkflowControllerGeneratePreviewRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public WorkflowControllerGeneratePreviewRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public WorkflowControllerGeneratePreviewResponse call() { + Options options = optionsBuilder.build(); + RequestOperation operation + = new WorkflowControllerGeneratePreview.Sync(sdkConfiguration, options, _headers); + return operation.handleResponse(operation.doRequest(this._buildRequest())); + } +} diff --git a/src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewResponse.java b/src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewResponse.java new file mode 100644 index 00000000..d9d232fd --- /dev/null +++ b/src/main/java/co/novu/models/operations/WorkflowControllerGeneratePreviewResponse.java @@ -0,0 +1,246 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations; + +import co.novu.models.components.GeneratePreviewResponseDto; +import co.novu.utils.Response; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class WorkflowControllerGeneratePreviewResponse implements Response { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Created + */ + private GeneratePreviewResponseDto generatePreviewResponseDto; + + + private Map> headers; + + @JsonCreator + public WorkflowControllerGeneratePreviewResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable GeneratePreviewResponseDto generatePreviewResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.generatePreviewResponseDto = generatePreviewResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public WorkflowControllerGeneratePreviewResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * Created + */ + public Optional generatePreviewResponseDto() { + return Optional.ofNullable(this.generatePreviewResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public WorkflowControllerGeneratePreviewResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public WorkflowControllerGeneratePreviewResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public WorkflowControllerGeneratePreviewResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * Created + */ + public WorkflowControllerGeneratePreviewResponse withGeneratePreviewResponseDto(@Nullable GeneratePreviewResponseDto generatePreviewResponseDto) { + this.generatePreviewResponseDto = generatePreviewResponseDto; + return this; + } + + + public WorkflowControllerGeneratePreviewResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkflowControllerGeneratePreviewResponse other = (WorkflowControllerGeneratePreviewResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.generatePreviewResponseDto, other.generatePreviewResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + generatePreviewResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(WorkflowControllerGeneratePreviewResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "generatePreviewResponseDto", generatePreviewResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private GeneratePreviewResponseDto generatePreviewResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * Created + */ + public Builder generatePreviewResponseDto(@Nullable GeneratePreviewResponseDto generatePreviewResponseDto) { + this.generatePreviewResponseDto = generatePreviewResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public WorkflowControllerGeneratePreviewResponse build() { + return new WorkflowControllerGeneratePreviewResponse( + contentType, statusCode, rawResponse, + generatePreviewResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder.java new file mode 100644 index 00000000..79cce5e7 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder.java @@ -0,0 +1,80 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.CreateEnvironmentVariableRequestDto; +import co.novu.models.operations.EnvironmentVariablesControllerCreateEnvironmentVariableRequest; +import co.novu.operations.EnvironmentVariablesControllerCreateEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerCreateEnvironmentVariableRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerCreateEnvironmentVariableRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerCreateEnvironmentVariableRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder body(@Nonnull CreateEnvironmentVariableRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerCreateEnvironmentVariableRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerCreateEnvironmentVariable.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.java new file mode 100644 index 00000000..f74e701d --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerCreateEnvironmentVariableResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerCreateEnvironmentVariableResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable EnvironmentVariableResponseDto environmentVariableResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.environmentVariableResponseDto = environmentVariableResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional environmentVariableResponseDto() { + return Optional.ofNullable(this.environmentVariableResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withEnvironmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerCreateEnvironmentVariableResponse other = (EnvironmentVariablesControllerCreateEnvironmentVariableResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.environmentVariableResponseDto, other.environmentVariableResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerCreateEnvironmentVariableResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "environmentVariableResponseDto", environmentVariableResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder environmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse build() { + return new EnvironmentVariablesControllerCreateEnvironmentVariableResponse( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder.java new file mode 100644 index 00000000..7b9e0bc3 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder.java @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.EnvironmentVariablesControllerDeleteEnvironmentVariableRequest; +import co.novu.operations.EnvironmentVariablesControllerDeleteEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerDeleteEnvironmentVariableRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder variableKey(@Nonnull String variableKey) { + this.pojoBuilder.variableKey(variableKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerDeleteEnvironmentVariableRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerDeleteEnvironmentVariable.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.java new file mode 100644 index 00000000..8d5205db --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.java @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerDeleteEnvironmentVariableResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerDeleteEnvironmentVariableResponse other = (EnvironmentVariablesControllerDeleteEnvironmentVariableResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse build() { + return new EnvironmentVariablesControllerDeleteEnvironmentVariableResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder.java new file mode 100644 index 00000000..7ee02292 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder.java @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableRequest; +import co.novu.operations.EnvironmentVariablesControllerGetEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerGetEnvironmentVariableRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerGetEnvironmentVariableRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerGetEnvironmentVariableRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder variableKey(@Nonnull String variableKey) { + this.pojoBuilder.variableKey(variableKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerGetEnvironmentVariableRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerGetEnvironmentVariable.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableResponse.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableResponse.java new file mode 100644 index 00000000..3b5a2f73 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerGetEnvironmentVariableResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerGetEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable EnvironmentVariableResponseDto environmentVariableResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.environmentVariableResponseDto = environmentVariableResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerGetEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional environmentVariableResponseDto() { + return Optional.ofNullable(this.environmentVariableResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withEnvironmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + + public EnvironmentVariablesControllerGetEnvironmentVariableResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerGetEnvironmentVariableResponse other = (EnvironmentVariablesControllerGetEnvironmentVariableResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.environmentVariableResponseDto, other.environmentVariableResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerGetEnvironmentVariableResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "environmentVariableResponseDto", environmentVariableResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder environmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableResponse build() { + return new EnvironmentVariablesControllerGetEnvironmentVariableResponse( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder.java new file mode 100644 index 00000000..38ae2f3f --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder.java @@ -0,0 +1,79 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest; +import co.novu.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsage; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder variableKey(@Nonnull String variableKey) { + this.pojoBuilder.variableKey(variableKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerGetEnvironmentVariableUsage.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.java new file mode 100644 index 00000000..67bb9c80 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.GetEnvironmentVariableUsageResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.getEnvironmentVariableUsageResponseDto = getEnvironmentVariableUsageResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional getEnvironmentVariableUsageResponseDto() { + return Optional.ofNullable(this.getEnvironmentVariableUsageResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withGetEnvironmentVariableUsageResponseDto(@Nullable GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto) { + this.getEnvironmentVariableUsageResponseDto = getEnvironmentVariableUsageResponseDto; + return this; + } + + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse other = (EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getEnvironmentVariableUsageResponseDto, other.getEnvironmentVariableUsageResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getEnvironmentVariableUsageResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getEnvironmentVariableUsageResponseDto", getEnvironmentVariableUsageResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder getEnvironmentVariableUsageResponseDto(@Nullable GetEnvironmentVariableUsageResponseDto getEnvironmentVariableUsageResponseDto) { + this.getEnvironmentVariableUsageResponseDto = getEnvironmentVariableUsageResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse build() { + return new EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse( + contentType, statusCode, rawResponse, + getEnvironmentVariableUsageResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder.java new file mode 100644 index 00000000..dbca9dfa --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder.java @@ -0,0 +1,78 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.EnvironmentVariablesControllerListEnvironmentVariablesRequest; +import co.novu.operations.EnvironmentVariablesControllerListEnvironmentVariables; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerListEnvironmentVariablesRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerListEnvironmentVariablesRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerListEnvironmentVariablesRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder search(@Nullable String search) { + this.pojoBuilder.search(search); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerListEnvironmentVariablesRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerListEnvironmentVariables.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerListEnvironmentVariablesResponse.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerListEnvironmentVariablesResponse.java new file mode 100644 index 00000000..dc86ff6d --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerListEnvironmentVariablesResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerListEnvironmentVariablesResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private List environmentVariableResponseDtos; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerListEnvironmentVariablesResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable List environmentVariableResponseDtos, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.environmentVariableResponseDtos = environmentVariableResponseDtos; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerListEnvironmentVariablesResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional> environmentVariableResponseDtos() { + return Optional.ofNullable(this.environmentVariableResponseDtos); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withEnvironmentVariableResponseDtos(@Nullable List environmentVariableResponseDtos) { + this.environmentVariableResponseDtos = environmentVariableResponseDtos; + return this; + } + + + public EnvironmentVariablesControllerListEnvironmentVariablesResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerListEnvironmentVariablesResponse other = (EnvironmentVariablesControllerListEnvironmentVariablesResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.environmentVariableResponseDtos, other.environmentVariableResponseDtos) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + environmentVariableResponseDtos, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerListEnvironmentVariablesResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "environmentVariableResponseDtos", environmentVariableResponseDtos, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private List environmentVariableResponseDtos; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder environmentVariableResponseDtos(@Nullable List environmentVariableResponseDtos) { + this.environmentVariableResponseDtos = environmentVariableResponseDtos; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerListEnvironmentVariablesResponse build() { + return new EnvironmentVariablesControllerListEnvironmentVariablesResponse( + contentType, statusCode, rawResponse, + environmentVariableResponseDtos, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder.java new file mode 100644 index 00000000..10c5bb35 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder.java @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateEnvironmentVariableRequestDto; +import co.novu.models.operations.EnvironmentVariablesControllerUpdateEnvironmentVariableRequest; +import co.novu.operations.EnvironmentVariablesControllerUpdateEnvironmentVariable; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.Builder pojoBuilder; + private EnvironmentVariablesControllerUpdateEnvironmentVariableRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder variableKey(@Nonnull String variableKey) { + this.pojoBuilder.variableKey(variableKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder body(@Nonnull UpdateEnvironmentVariableRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentVariablesControllerUpdateEnvironmentVariableRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new EnvironmentVariablesControllerUpdateEnvironmentVariable.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.java b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.java new file mode 100644 index 00000000..de09018c --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentVariablesControllerUpdateEnvironmentVariableResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable EnvironmentVariableResponseDto environmentVariableResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.environmentVariableResponseDto = environmentVariableResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional environmentVariableResponseDto() { + return Optional.ofNullable(this.environmentVariableResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withEnvironmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentVariablesControllerUpdateEnvironmentVariableResponse other = (EnvironmentVariablesControllerUpdateEnvironmentVariableResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.environmentVariableResponseDto, other.environmentVariableResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "environmentVariableResponseDto", environmentVariableResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private EnvironmentVariableResponseDto environmentVariableResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder environmentVariableResponseDto(@Nullable EnvironmentVariableResponseDto environmentVariableResponseDto) { + this.environmentVariableResponseDto = environmentVariableResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse build() { + return new EnvironmentVariablesControllerUpdateEnvironmentVariableResponse( + contentType, statusCode, rawResponse, + environmentVariableResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentsControllerDiffEnvironmentRequestBuilder.java b/src/main/java/co/novu/models/operations/async/EnvironmentsControllerDiffEnvironmentRequestBuilder.java new file mode 100644 index 00000000..0fd48f0e --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentsControllerDiffEnvironmentRequestBuilder.java @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.DiffEnvironmentRequestDto; +import co.novu.models.operations.EnvironmentsControllerDiffEnvironmentRequest; +import co.novu.operations.EnvironmentsControllerDiffEnvironment; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class EnvironmentsControllerDiffEnvironmentRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentsControllerDiffEnvironmentRequest.Builder pojoBuilder; + private EnvironmentsControllerDiffEnvironmentRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentsControllerDiffEnvironmentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentsControllerDiffEnvironmentRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder targetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.pojoBuilder.targetEnvironmentId(targetEnvironmentId); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder body(@Nonnull DiffEnvironmentRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentsControllerDiffEnvironmentRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentsControllerDiffEnvironmentRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new EnvironmentsControllerDiffEnvironment.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentsControllerDiffEnvironmentResponse.java b/src/main/java/co/novu/models/operations/async/EnvironmentsControllerDiffEnvironmentResponse.java new file mode 100644 index 00000000..d8f3dd5d --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentsControllerDiffEnvironmentResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.DiffEnvironmentResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentsControllerDiffEnvironmentResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private DiffEnvironmentResponseDto diffEnvironmentResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentsControllerDiffEnvironmentResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable DiffEnvironmentResponseDto diffEnvironmentResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.diffEnvironmentResponseDto = diffEnvironmentResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentsControllerDiffEnvironmentResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional diffEnvironmentResponseDto() { + return Optional.ofNullable(this.diffEnvironmentResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentsControllerDiffEnvironmentResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentsControllerDiffEnvironmentResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentsControllerDiffEnvironmentResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentsControllerDiffEnvironmentResponse withDiffEnvironmentResponseDto(@Nullable DiffEnvironmentResponseDto diffEnvironmentResponseDto) { + this.diffEnvironmentResponseDto = diffEnvironmentResponseDto; + return this; + } + + + public EnvironmentsControllerDiffEnvironmentResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentsControllerDiffEnvironmentResponse other = (EnvironmentsControllerDiffEnvironmentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.diffEnvironmentResponseDto, other.diffEnvironmentResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + diffEnvironmentResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentsControllerDiffEnvironmentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "diffEnvironmentResponseDto", diffEnvironmentResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private DiffEnvironmentResponseDto diffEnvironmentResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder diffEnvironmentResponseDto(@Nullable DiffEnvironmentResponseDto diffEnvironmentResponseDto) { + this.diffEnvironmentResponseDto = diffEnvironmentResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentsControllerDiffEnvironmentResponse build() { + return new EnvironmentsControllerDiffEnvironmentResponse( + contentType, statusCode, rawResponse, + diffEnvironmentResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentsControllerPublishEnvironmentRequestBuilder.java b/src/main/java/co/novu/models/operations/async/EnvironmentsControllerPublishEnvironmentRequestBuilder.java new file mode 100644 index 00000000..d02a51c9 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentsControllerPublishEnvironmentRequestBuilder.java @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.PublishEnvironmentRequestDto; +import co.novu.models.operations.EnvironmentsControllerPublishEnvironmentRequest; +import co.novu.operations.EnvironmentsControllerPublishEnvironment; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class EnvironmentsControllerPublishEnvironmentRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final EnvironmentsControllerPublishEnvironmentRequest.Builder pojoBuilder; + private EnvironmentsControllerPublishEnvironmentRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public EnvironmentsControllerPublishEnvironmentRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = EnvironmentsControllerPublishEnvironmentRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder targetEnvironmentId(@Nonnull String targetEnvironmentId) { + this.pojoBuilder.targetEnvironmentId(targetEnvironmentId); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder body(@Nonnull PublishEnvironmentRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private EnvironmentsControllerPublishEnvironmentRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public EnvironmentsControllerPublishEnvironmentRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new EnvironmentsControllerPublishEnvironment.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/EnvironmentsControllerPublishEnvironmentResponse.java b/src/main/java/co/novu/models/operations/async/EnvironmentsControllerPublishEnvironmentResponse.java new file mode 100644 index 00000000..100fede9 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/EnvironmentsControllerPublishEnvironmentResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.PublishEnvironmentResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class EnvironmentsControllerPublishEnvironmentResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private PublishEnvironmentResponseDto publishEnvironmentResponseDto; + + + private Map> headers; + + @JsonCreator + public EnvironmentsControllerPublishEnvironmentResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable PublishEnvironmentResponseDto publishEnvironmentResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.publishEnvironmentResponseDto = publishEnvironmentResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public EnvironmentsControllerPublishEnvironmentResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional publishEnvironmentResponseDto() { + return Optional.ofNullable(this.publishEnvironmentResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public EnvironmentsControllerPublishEnvironmentResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public EnvironmentsControllerPublishEnvironmentResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public EnvironmentsControllerPublishEnvironmentResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public EnvironmentsControllerPublishEnvironmentResponse withPublishEnvironmentResponseDto(@Nullable PublishEnvironmentResponseDto publishEnvironmentResponseDto) { + this.publishEnvironmentResponseDto = publishEnvironmentResponseDto; + return this; + } + + + public EnvironmentsControllerPublishEnvironmentResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EnvironmentsControllerPublishEnvironmentResponse other = (EnvironmentsControllerPublishEnvironmentResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.publishEnvironmentResponseDto, other.publishEnvironmentResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + publishEnvironmentResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(EnvironmentsControllerPublishEnvironmentResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "publishEnvironmentResponseDto", publishEnvironmentResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private PublishEnvironmentResponseDto publishEnvironmentResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder publishEnvironmentResponseDto(@Nullable PublishEnvironmentResponseDto publishEnvironmentResponseDto) { + this.publishEnvironmentResponseDto = publishEnvironmentResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public EnvironmentsControllerPublishEnvironmentResponse build() { + return new EnvironmentsControllerPublishEnvironmentResponse( + contentType, statusCode, rawResponse, + publishEnvironmentResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllNotificationsRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllNotificationsRequestBuilder.java new file mode 100644 index 00000000..889f459e --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllNotificationsRequestBuilder.java @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.models.operations.SubscribersControllerArchiveAllNotificationsRequest; +import co.novu.operations.SubscribersControllerArchiveAllNotifications; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerArchiveAllNotificationsRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerArchiveAllNotificationsRequest.Builder pojoBuilder; + private SubscribersControllerArchiveAllNotificationsRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerArchiveAllNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerArchiveAllNotificationsRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerArchiveAllNotificationsRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerArchiveAllNotificationsRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerArchiveAllNotifications.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllNotificationsResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllNotificationsResponse.java new file mode 100644 index 00000000..f27dd6b8 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllNotificationsResponse.java @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerArchiveAllNotificationsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerArchiveAllNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerArchiveAllNotificationsResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerArchiveAllNotificationsResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerArchiveAllNotificationsResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerArchiveAllNotificationsResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerArchiveAllNotificationsResponse other = (SubscribersControllerArchiveAllNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerArchiveAllNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerArchiveAllNotificationsResponse build() { + return new SubscribersControllerArchiveAllNotificationsResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllReadNotificationsRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllReadNotificationsRequestBuilder.java new file mode 100644 index 00000000..fa88fcf9 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllReadNotificationsRequestBuilder.java @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.models.operations.SubscribersControllerArchiveAllReadNotificationsRequest; +import co.novu.operations.SubscribersControllerArchiveAllReadNotifications; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerArchiveAllReadNotificationsRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerArchiveAllReadNotificationsRequest.Builder pojoBuilder; + private SubscribersControllerArchiveAllReadNotificationsRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerArchiveAllReadNotificationsRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerArchiveAllReadNotificationsRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerArchiveAllReadNotificationsRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerArchiveAllReadNotifications.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllReadNotificationsResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllReadNotificationsResponse.java new file mode 100644 index 00000000..a3a99272 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveAllReadNotificationsResponse.java @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerArchiveAllReadNotificationsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerArchiveAllReadNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerArchiveAllReadNotificationsResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerArchiveAllReadNotificationsResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerArchiveAllReadNotificationsResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerArchiveAllReadNotificationsResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerArchiveAllReadNotificationsResponse other = (SubscribersControllerArchiveAllReadNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerArchiveAllReadNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerArchiveAllReadNotificationsResponse build() { + return new SubscribersControllerArchiveAllReadNotificationsResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveNotificationRequestBuilder.java new file mode 100644 index 00000000..94c9e194 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveNotificationRequestBuilder.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerArchiveNotificationRequest; +import co.novu.operations.SubscribersControllerArchiveNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerArchiveNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerArchiveNotificationRequest.Builder pojoBuilder; + private SubscribersControllerArchiveNotificationRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerArchiveNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerArchiveNotificationRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerArchiveNotificationRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveNotificationRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveNotificationRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveNotificationRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerArchiveNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerArchiveNotificationRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerArchiveNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerArchiveNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveNotificationResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveNotificationResponse.java new file mode 100644 index 00000000..eb2388ff --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerArchiveNotificationResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerArchiveNotificationResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerArchiveNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerArchiveNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerArchiveNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerArchiveNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerArchiveNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerArchiveNotificationResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerArchiveNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerArchiveNotificationResponse other = (SubscribersControllerArchiveNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerArchiveNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerArchiveNotificationResponse build() { + return new SubscribersControllerArchiveNotificationResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerCompleteNotificationActionRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerCompleteNotificationActionRequestBuilder.java new file mode 100644 index 00000000..16002535 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerCompleteNotificationActionRequestBuilder.java @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerCompleteNotificationActionRequest; +import co.novu.operations.SubscribersControllerCompleteNotificationAction; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerCompleteNotificationActionRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private SubscribersControllerCompleteNotificationActionRequest request; + private final Options.Builder optionsBuilder; + + public SubscribersControllerCompleteNotificationActionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerCompleteNotificationActionRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + public SubscribersControllerCompleteNotificationActionRequestBuilder request(@Nonnull SubscribersControllerCompleteNotificationActionRequest request) { + this.request = Utils.checkNotNull(request, "request"); + return this; + } + + private SubscribersControllerCompleteNotificationActionRequest _buildRequest() { + return this.request; + } + + public SubscribersControllerCompleteNotificationActionRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerCompleteNotificationAction.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerCompleteNotificationActionResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerCompleteNotificationActionResponse.java new file mode 100644 index 00000000..08ec61d5 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerCompleteNotificationActionResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerCompleteNotificationActionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerCompleteNotificationActionResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerCompleteNotificationActionResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerCompleteNotificationActionResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerCompleteNotificationActionResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerCompleteNotificationActionResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerCompleteNotificationActionResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerCompleteNotificationActionResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerCompleteNotificationActionResponse other = (SubscribersControllerCompleteNotificationActionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerCompleteNotificationActionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerCompleteNotificationActionResponse build() { + return new SubscribersControllerCompleteNotificationActionResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteAllNotificationsRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteAllNotificationsRequestBuilder.java new file mode 100644 index 00000000..ad94c819 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteAllNotificationsRequestBuilder.java @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.models.operations.SubscribersControllerDeleteAllNotificationsRequest; +import co.novu.operations.SubscribersControllerDeleteAllNotifications; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerDeleteAllNotificationsRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerDeleteAllNotificationsRequest.Builder pojoBuilder; + private SubscribersControllerDeleteAllNotificationsRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerDeleteAllNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerDeleteAllNotificationsRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerDeleteAllNotificationsRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerDeleteAllNotificationsRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerDeleteAllNotifications.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteAllNotificationsResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteAllNotificationsResponse.java new file mode 100644 index 00000000..69602efe --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteAllNotificationsResponse.java @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerDeleteAllNotificationsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerDeleteAllNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerDeleteAllNotificationsResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerDeleteAllNotificationsResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerDeleteAllNotificationsResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerDeleteAllNotificationsResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerDeleteAllNotificationsResponse other = (SubscribersControllerDeleteAllNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerDeleteAllNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerDeleteAllNotificationsResponse build() { + return new SubscribersControllerDeleteAllNotificationsResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteNotificationRequestBuilder.java new file mode 100644 index 00000000..629c3588 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteNotificationRequestBuilder.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerDeleteNotificationRequest; +import co.novu.operations.SubscribersControllerDeleteNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerDeleteNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerDeleteNotificationRequest.Builder pojoBuilder; + private SubscribersControllerDeleteNotificationRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerDeleteNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerDeleteNotificationRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerDeleteNotificationRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteNotificationRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteNotificationRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteNotificationRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerDeleteNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerDeleteNotificationRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerDeleteNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerDeleteNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteNotificationResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteNotificationResponse.java new file mode 100644 index 00000000..ceef4c60 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerDeleteNotificationResponse.java @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerDeleteNotificationResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerDeleteNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerDeleteNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerDeleteNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerDeleteNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerDeleteNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerDeleteNotificationResponse other = (SubscribersControllerDeleteNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerDeleteNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerDeleteNotificationResponse build() { + return new SubscribersControllerDeleteNotificationResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsCountRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsCountRequestBuilder.java new file mode 100644 index 00000000..c74274eb --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsCountRequestBuilder.java @@ -0,0 +1,85 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsCountRequest; +import co.novu.operations.SubscribersControllerGetSubscriberNotificationsCount; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerGetSubscriberNotificationsCountRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerGetSubscriberNotificationsCountRequest.Builder pojoBuilder; + private SubscribersControllerGetSubscriberNotificationsCountRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerGetSubscriberNotificationsCountRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder filters(@Nonnull String filters) { + this.pojoBuilder.filters(filters); + this._setterCalled = true; + return this; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerGetSubscriberNotificationsCountRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerGetSubscriberNotificationsCountRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerGetSubscriberNotificationsCount.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsCountResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsCountResponse.java new file mode 100644 index 00000000..9d3ab383 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsCountResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.GetSubscriberNotificationsCountResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerGetSubscriberNotificationsCountResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private List getSubscriberNotificationsCountResponseDtos; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerGetSubscriberNotificationsCountResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable List getSubscriberNotificationsCountResponseDtos, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.getSubscriberNotificationsCountResponseDtos = getSubscriberNotificationsCountResponseDtos; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerGetSubscriberNotificationsCountResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional> getSubscriberNotificationsCountResponseDtos() { + return Optional.ofNullable(this.getSubscriberNotificationsCountResponseDtos); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerGetSubscriberNotificationsCountResponse withGetSubscriberNotificationsCountResponseDtos(@Nullable List getSubscriberNotificationsCountResponseDtos) { + this.getSubscriberNotificationsCountResponseDtos = getSubscriberNotificationsCountResponseDtos; + return this; + } + + + public SubscribersControllerGetSubscriberNotificationsCountResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerGetSubscriberNotificationsCountResponse other = (SubscribersControllerGetSubscriberNotificationsCountResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getSubscriberNotificationsCountResponseDtos, other.getSubscriberNotificationsCountResponseDtos) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getSubscriberNotificationsCountResponseDtos, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerGetSubscriberNotificationsCountResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getSubscriberNotificationsCountResponseDtos", getSubscriberNotificationsCountResponseDtos, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private List getSubscriberNotificationsCountResponseDtos; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder getSubscriberNotificationsCountResponseDtos(@Nullable List getSubscriberNotificationsCountResponseDtos) { + this.getSubscriberNotificationsCountResponseDtos = getSubscriberNotificationsCountResponseDtos; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerGetSubscriberNotificationsCountResponse build() { + return new SubscribersControllerGetSubscriberNotificationsCountResponse( + contentType, statusCode, rawResponse, + getSubscriberNotificationsCountResponseDtos, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsRequestBuilder.java new file mode 100644 index 00000000..2cf05135 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsRequestBuilder.java @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsRequest; +import co.novu.operations.SubscribersControllerGetSubscriberNotifications; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerGetSubscriberNotificationsRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private SubscribersControllerGetSubscriberNotificationsRequest request; + private final Options.Builder optionsBuilder; + + public SubscribersControllerGetSubscriberNotificationsRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerGetSubscriberNotificationsRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + public SubscribersControllerGetSubscriberNotificationsRequestBuilder request(@Nonnull SubscribersControllerGetSubscriberNotificationsRequest request) { + this.request = Utils.checkNotNull(request, "request"); + return this; + } + + private SubscribersControllerGetSubscriberNotificationsRequest _buildRequest() { + return this.request; + } + + public SubscribersControllerGetSubscriberNotificationsRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerGetSubscriberNotifications.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsResponse.java new file mode 100644 index 00000000..e7d4b845 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerGetSubscriberNotificationsResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.GetSubscriberNotificationsResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerGetSubscriberNotificationsResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerGetSubscriberNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.getSubscriberNotificationsResponseDto = getSubscriberNotificationsResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerGetSubscriberNotificationsResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional getSubscriberNotificationsResponseDto() { + return Optional.ofNullable(this.getSubscriberNotificationsResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerGetSubscriberNotificationsResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerGetSubscriberNotificationsResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerGetSubscriberNotificationsResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerGetSubscriberNotificationsResponse withGetSubscriberNotificationsResponseDto(@Nullable GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto) { + this.getSubscriberNotificationsResponseDto = getSubscriberNotificationsResponseDto; + return this; + } + + + public SubscribersControllerGetSubscriberNotificationsResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerGetSubscriberNotificationsResponse other = (SubscribersControllerGetSubscriberNotificationsResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.getSubscriberNotificationsResponseDto, other.getSubscriberNotificationsResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + getSubscriberNotificationsResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerGetSubscriberNotificationsResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "getSubscriberNotificationsResponseDto", getSubscriberNotificationsResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder getSubscriberNotificationsResponseDto(@Nullable GetSubscriberNotificationsResponseDto getSubscriberNotificationsResponseDto) { + this.getSubscriberNotificationsResponseDto = getSubscriberNotificationsResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerGetSubscriberNotificationsResponse build() { + return new SubscribersControllerGetSubscriberNotificationsResponse( + contentType, statusCode, rawResponse, + getSubscriberNotificationsResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkAllNotificationsAsReadRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkAllNotificationsAsReadRequestBuilder.java new file mode 100644 index 00000000..78970ab0 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkAllNotificationsAsReadRequestBuilder.java @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.UpdateAllSubscriberNotificationsDto; +import co.novu.models.operations.SubscribersControllerMarkAllNotificationsAsReadRequest; +import co.novu.operations.SubscribersControllerMarkAllNotificationsAsRead; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerMarkAllNotificationsAsReadRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerMarkAllNotificationsAsReadRequest.Builder pojoBuilder; + private SubscribersControllerMarkAllNotificationsAsReadRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerMarkAllNotificationsAsReadRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder body(@Nonnull UpdateAllSubscriberNotificationsDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerMarkAllNotificationsAsReadRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerMarkAllNotificationsAsReadRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerMarkAllNotificationsAsRead.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkAllNotificationsAsReadResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkAllNotificationsAsReadResponse.java new file mode 100644 index 00000000..746a272a --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkAllNotificationsAsReadResponse.java @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerMarkAllNotificationsAsReadResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerMarkAllNotificationsAsReadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerMarkAllNotificationsAsReadResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerMarkAllNotificationsAsReadResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerMarkAllNotificationsAsReadResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerMarkAllNotificationsAsReadResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkAllNotificationsAsReadResponse other = (SubscribersControllerMarkAllNotificationsAsReadResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkAllNotificationsAsReadResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerMarkAllNotificationsAsReadResponse build() { + return new SubscribersControllerMarkAllNotificationsAsReadResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsReadRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsReadRequestBuilder.java new file mode 100644 index 00000000..0c1cf71a --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsReadRequestBuilder.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsReadRequest; +import co.novu.operations.SubscribersControllerMarkNotificationAsRead; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerMarkNotificationAsReadRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerMarkNotificationAsReadRequest.Builder pojoBuilder; + private SubscribersControllerMarkNotificationAsReadRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerMarkNotificationAsReadRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerMarkNotificationAsReadRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerMarkNotificationAsReadRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerMarkNotificationAsReadRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerMarkNotificationAsRead.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsReadResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsReadResponse.java new file mode 100644 index 00000000..2cb17966 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsReadResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerMarkNotificationAsReadResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerMarkNotificationAsReadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerMarkNotificationAsReadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerMarkNotificationAsReadResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerMarkNotificationAsReadResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerMarkNotificationAsReadResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerMarkNotificationAsReadResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerMarkNotificationAsReadResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkNotificationAsReadResponse other = (SubscribersControllerMarkNotificationAsReadResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkNotificationAsReadResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerMarkNotificationAsReadResponse build() { + return new SubscribersControllerMarkNotificationAsReadResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsUnreadRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsUnreadRequestBuilder.java new file mode 100644 index 00000000..a23830e9 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsUnreadRequestBuilder.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsUnreadRequest; +import co.novu.operations.SubscribersControllerMarkNotificationAsUnread; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerMarkNotificationAsUnreadRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerMarkNotificationAsUnreadRequest.Builder pojoBuilder; + private SubscribersControllerMarkNotificationAsUnreadRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerMarkNotificationAsUnreadRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerMarkNotificationAsUnreadRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerMarkNotificationAsUnreadRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerMarkNotificationAsUnread.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsUnreadResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsUnreadResponse.java new file mode 100644 index 00000000..4c1bf79f --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationAsUnreadResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerMarkNotificationAsUnreadResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerMarkNotificationAsUnreadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerMarkNotificationAsUnreadResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerMarkNotificationAsUnreadResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerMarkNotificationAsUnreadResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerMarkNotificationAsUnreadResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerMarkNotificationAsUnreadResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerMarkNotificationAsUnreadResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkNotificationAsUnreadResponse other = (SubscribersControllerMarkNotificationAsUnreadResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkNotificationAsUnreadResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerMarkNotificationAsUnreadResponse build() { + return new SubscribersControllerMarkNotificationAsUnreadResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationsAsSeenRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationsAsSeenRequestBuilder.java new file mode 100644 index 00000000..5c979b61 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationsAsSeenRequestBuilder.java @@ -0,0 +1,86 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.MarkSubscriberNotificationsAsSeenDto; +import co.novu.models.operations.SubscribersControllerMarkNotificationsAsSeenRequest; +import co.novu.operations.SubscribersControllerMarkNotificationsAsSeen; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerMarkNotificationsAsSeenRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerMarkNotificationsAsSeenRequest.Builder pojoBuilder; + private SubscribersControllerMarkNotificationsAsSeenRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerMarkNotificationsAsSeenRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder body(@Nonnull MarkSubscriberNotificationsAsSeenDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerMarkNotificationsAsSeenRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerMarkNotificationsAsSeenRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerMarkNotificationsAsSeen.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationsAsSeenResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationsAsSeenResponse.java new file mode 100644 index 00000000..9aecb8a8 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerMarkNotificationsAsSeenResponse.java @@ -0,0 +1,201 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerMarkNotificationsAsSeenResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerMarkNotificationsAsSeenResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerMarkNotificationsAsSeenResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerMarkNotificationsAsSeenResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerMarkNotificationsAsSeenResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + public SubscribersControllerMarkNotificationsAsSeenResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerMarkNotificationsAsSeenResponse other = (SubscribersControllerMarkNotificationsAsSeenResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerMarkNotificationsAsSeenResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerMarkNotificationsAsSeenResponse build() { + return new SubscribersControllerMarkNotificationsAsSeenResponse( + contentType, statusCode, rawResponse, + headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerRevertNotificationActionRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerRevertNotificationActionRequestBuilder.java new file mode 100644 index 00000000..e3601f40 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerRevertNotificationActionRequestBuilder.java @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerRevertNotificationActionRequest; +import co.novu.operations.SubscribersControllerRevertNotificationAction; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerRevertNotificationActionRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private SubscribersControllerRevertNotificationActionRequest request; + private final Options.Builder optionsBuilder; + + public SubscribersControllerRevertNotificationActionRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerRevertNotificationActionRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + public SubscribersControllerRevertNotificationActionRequestBuilder request(@Nonnull SubscribersControllerRevertNotificationActionRequest request) { + this.request = Utils.checkNotNull(request, "request"); + return this; + } + + private SubscribersControllerRevertNotificationActionRequest _buildRequest() { + return this.request; + } + + public SubscribersControllerRevertNotificationActionRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerRevertNotificationAction.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerRevertNotificationActionResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerRevertNotificationActionResponse.java new file mode 100644 index 00000000..08277b22 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerRevertNotificationActionResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerRevertNotificationActionResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerRevertNotificationActionResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerRevertNotificationActionResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerRevertNotificationActionResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerRevertNotificationActionResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerRevertNotificationActionResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerRevertNotificationActionResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerRevertNotificationActionResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerRevertNotificationActionResponse other = (SubscribersControllerRevertNotificationActionResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerRevertNotificationActionResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerRevertNotificationActionResponse build() { + return new SubscribersControllerRevertNotificationActionResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerSnoozeNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerSnoozeNotificationRequestBuilder.java new file mode 100644 index 00000000..66005526 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerSnoozeNotificationRequestBuilder.java @@ -0,0 +1,65 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerSnoozeNotificationRequest; +import co.novu.operations.SubscribersControllerSnoozeNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerSnoozeNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private SubscribersControllerSnoozeNotificationRequest request; + private final Options.Builder optionsBuilder; + + public SubscribersControllerSnoozeNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerSnoozeNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + public SubscribersControllerSnoozeNotificationRequestBuilder request(@Nonnull SubscribersControllerSnoozeNotificationRequest request) { + this.request = Utils.checkNotNull(request, "request"); + return this; + } + + private SubscribersControllerSnoozeNotificationRequest _buildRequest() { + return this.request; + } + + public SubscribersControllerSnoozeNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerSnoozeNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerSnoozeNotificationResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerSnoozeNotificationResponse.java new file mode 100644 index 00000000..ba2ccb16 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerSnoozeNotificationResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerSnoozeNotificationResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerSnoozeNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerSnoozeNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerSnoozeNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerSnoozeNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerSnoozeNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerSnoozeNotificationResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerSnoozeNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerSnoozeNotificationResponse other = (SubscribersControllerSnoozeNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerSnoozeNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerSnoozeNotificationResponse build() { + return new SubscribersControllerSnoozeNotificationResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerUnarchiveNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerUnarchiveNotificationRequestBuilder.java new file mode 100644 index 00000000..aad56153 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerUnarchiveNotificationRequestBuilder.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerUnarchiveNotificationRequest; +import co.novu.operations.SubscribersControllerUnarchiveNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerUnarchiveNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerUnarchiveNotificationRequest.Builder pojoBuilder; + private SubscribersControllerUnarchiveNotificationRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerUnarchiveNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerUnarchiveNotificationRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerUnarchiveNotificationRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerUnarchiveNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerUnarchiveNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerUnarchiveNotificationResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerUnarchiveNotificationResponse.java new file mode 100644 index 00000000..936c339f --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerUnarchiveNotificationResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerUnarchiveNotificationResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerUnarchiveNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerUnarchiveNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerUnarchiveNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerUnarchiveNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerUnarchiveNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerUnarchiveNotificationResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerUnarchiveNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerUnarchiveNotificationResponse other = (SubscribersControllerUnarchiveNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerUnarchiveNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerUnarchiveNotificationResponse build() { + return new SubscribersControllerUnarchiveNotificationResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerUnsnoozeNotificationRequestBuilder.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerUnsnoozeNotificationRequestBuilder.java new file mode 100644 index 00000000..dc3da9e3 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerUnsnoozeNotificationRequestBuilder.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.operations.SubscribersControllerUnsnoozeNotificationRequest; +import co.novu.operations.SubscribersControllerUnsnoozeNotification; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.List; +import java.util.concurrent.CompletableFuture; + +public class SubscribersControllerUnsnoozeNotificationRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final SubscribersControllerUnsnoozeNotificationRequest.Builder pojoBuilder; + private SubscribersControllerUnsnoozeNotificationRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public SubscribersControllerUnsnoozeNotificationRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = SubscribersControllerUnsnoozeNotificationRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder subscriberId(@Nonnull String subscriberId) { + this.pojoBuilder.subscriberId(subscriberId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder notificationId(@Nonnull String notificationId) { + this.pojoBuilder.notificationId(notificationId); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder contextKeys(@Nullable List contextKeys) { + this.pojoBuilder.contextKeys(contextKeys); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private SubscribersControllerUnsnoozeNotificationRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public SubscribersControllerUnsnoozeNotificationRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new SubscribersControllerUnsnoozeNotification.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/SubscribersControllerUnsnoozeNotificationResponse.java b/src/main/java/co/novu/models/operations/async/SubscribersControllerUnsnoozeNotificationResponse.java new file mode 100644 index 00000000..3cc2d918 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/SubscribersControllerUnsnoozeNotificationResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.InboxNotificationDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class SubscribersControllerUnsnoozeNotificationResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * OK + */ + private InboxNotificationDto inboxNotificationDto; + + + private Map> headers; + + @JsonCreator + public SubscribersControllerUnsnoozeNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable InboxNotificationDto inboxNotificationDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.inboxNotificationDto = inboxNotificationDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public SubscribersControllerUnsnoozeNotificationResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * OK + */ + public Optional inboxNotificationDto() { + return Optional.ofNullable(this.inboxNotificationDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public SubscribersControllerUnsnoozeNotificationResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public SubscribersControllerUnsnoozeNotificationResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public SubscribersControllerUnsnoozeNotificationResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * OK + */ + public SubscribersControllerUnsnoozeNotificationResponse withInboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + + public SubscribersControllerUnsnoozeNotificationResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + SubscribersControllerUnsnoozeNotificationResponse other = (SubscribersControllerUnsnoozeNotificationResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.inboxNotificationDto, other.inboxNotificationDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + @Override + public String toString() { + return Utils.toString(SubscribersControllerUnsnoozeNotificationResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "inboxNotificationDto", inboxNotificationDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private InboxNotificationDto inboxNotificationDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * OK + */ + public Builder inboxNotificationDto(@Nullable InboxNotificationDto inboxNotificationDto) { + this.inboxNotificationDto = inboxNotificationDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public SubscribersControllerUnsnoozeNotificationResponse build() { + return new SubscribersControllerUnsnoozeNotificationResponse( + contentType, statusCode, rawResponse, + inboxNotificationDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/models/operations/async/WorkflowControllerGeneratePreviewRequestBuilder.java b/src/main/java/co/novu/models/operations/async/WorkflowControllerGeneratePreviewRequestBuilder.java new file mode 100644 index 00000000..5897c8fd --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/WorkflowControllerGeneratePreviewRequestBuilder.java @@ -0,0 +1,92 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.models.components.GeneratePreviewRequestDto; +import co.novu.models.operations.WorkflowControllerGeneratePreviewRequest; +import co.novu.operations.WorkflowControllerGeneratePreview; +import co.novu.utils.Headers; +import co.novu.utils.Options; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.lang.String; +import java.util.concurrent.CompletableFuture; + +public class WorkflowControllerGeneratePreviewRequestBuilder { + private final SDKConfiguration sdkConfiguration; + private final Headers _headers = new Headers(); + private final WorkflowControllerGeneratePreviewRequest.Builder pojoBuilder; + private WorkflowControllerGeneratePreviewRequest request; + private final Options.Builder optionsBuilder; + private boolean _setterCalled; + + public WorkflowControllerGeneratePreviewRequestBuilder(SDKConfiguration sdkConfiguration) { + this.sdkConfiguration = sdkConfiguration; + this.pojoBuilder = WorkflowControllerGeneratePreviewRequest.builder(); + this.optionsBuilder = Options.builder(); + } + + public WorkflowControllerGeneratePreviewRequestBuilder workflowId(@Nonnull String workflowId) { + this.pojoBuilder.workflowId(workflowId); + this._setterCalled = true; + return this; + } + + public WorkflowControllerGeneratePreviewRequestBuilder stepId(@Nonnull String stepId) { + this.pojoBuilder.stepId(stepId); + this._setterCalled = true; + return this; + } + + public WorkflowControllerGeneratePreviewRequestBuilder idempotencyKey(@Nullable String idempotencyKey) { + this.pojoBuilder.idempotencyKey(idempotencyKey); + this._setterCalled = true; + return this; + } + + public WorkflowControllerGeneratePreviewRequestBuilder body(@Nonnull GeneratePreviewRequestDto body) { + this.pojoBuilder.body(body); + this._setterCalled = true; + return this; + } + + public WorkflowControllerGeneratePreviewRequestBuilder retryConfig(RetryConfig retryConfig) { + this.optionsBuilder.retryConfig(retryConfig); + return this; + } + + private WorkflowControllerGeneratePreviewRequest _buildRequest() { + if (this._setterCalled) { + this.request = this.pojoBuilder.build(); + } + return this.request; + } + + public WorkflowControllerGeneratePreviewRequestBuilder header(String name, String value) { + Utils.checkNotNull(name, "name"); + Utils.checkNotNull(value, "value"); + this._headers.add(name, value); + return this; + } + + /** + * Executes the request and returns the response. + * + * @return The response from the server. + */ + public CompletableFuture call() { + Options options = optionsBuilder.build(); + AsyncRequestOperation operation + = new WorkflowControllerGeneratePreview.Async( + sdkConfiguration, options, sdkConfiguration.retryScheduler(), + _headers); + return operation.doRequest(this._buildRequest()) + .thenCompose(operation::handleResponse); + } +} diff --git a/src/main/java/co/novu/models/operations/async/WorkflowControllerGeneratePreviewResponse.java b/src/main/java/co/novu/models/operations/async/WorkflowControllerGeneratePreviewResponse.java new file mode 100644 index 00000000..8aefbb14 --- /dev/null +++ b/src/main/java/co/novu/models/operations/async/WorkflowControllerGeneratePreviewResponse.java @@ -0,0 +1,247 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.models.operations.async; + +import co.novu.models.components.GeneratePreviewResponseDto; +import co.novu.utils.AsyncResponse; +import co.novu.utils.Blob; +import co.novu.utils.Utils; +import com.fasterxml.jackson.annotation.JsonCreator; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Override; +import java.lang.String; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Map; +import java.util.Optional; + + +public class WorkflowControllerGeneratePreviewResponse implements AsyncResponse { + /** + * HTTP response content type for this operation + */ + private String contentType; + + /** + * HTTP response status code for this operation + */ + private int statusCode; + + /** + * Raw HTTP response; suitable for custom response parsing + */ + private HttpResponse rawResponse; + + /** + * Created + */ + private GeneratePreviewResponseDto generatePreviewResponseDto; + + + private Map> headers; + + @JsonCreator + public WorkflowControllerGeneratePreviewResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nullable GeneratePreviewResponseDto generatePreviewResponseDto, + @Nonnull Map> headers) { + headers = Utils.emptyMapIfNull(headers); + this.contentType = Optional.ofNullable(contentType) + .orElseThrow(() -> new IllegalArgumentException("contentType cannot be null")); + this.statusCode = statusCode; + this.rawResponse = Optional.ofNullable(rawResponse) + .orElseThrow(() -> new IllegalArgumentException("rawResponse cannot be null")); + this.generatePreviewResponseDto = generatePreviewResponseDto; + this.headers = Optional.ofNullable(headers) + .orElseThrow(() -> new IllegalArgumentException("headers cannot be null")); + } + + public WorkflowControllerGeneratePreviewResponse( + @Nonnull String contentType, + int statusCode, + @Nonnull HttpResponse rawResponse, + @Nonnull Map> headers) { + this(contentType, statusCode, rawResponse, + null, headers); + } + + /** + * HTTP response content type for this operation + */ + public String contentType() { + return this.contentType; + } + + /** + * HTTP response status code for this operation + */ + public int statusCode() { + return this.statusCode; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public HttpResponse rawResponse() { + return this.rawResponse; + } + + /** + * Created + */ + public Optional generatePreviewResponseDto() { + return Optional.ofNullable(this.generatePreviewResponseDto); + } + + public Map> headers() { + return this.headers; + } + + public static Builder builder() { + return new Builder(); + } + + + /** + * HTTP response content type for this operation + */ + public WorkflowControllerGeneratePreviewResponse withContentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + + /** + * HTTP response status code for this operation + */ + public WorkflowControllerGeneratePreviewResponse withStatusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public WorkflowControllerGeneratePreviewResponse withRawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + + /** + * Created + */ + public WorkflowControllerGeneratePreviewResponse withGeneratePreviewResponseDto(@Nullable GeneratePreviewResponseDto generatePreviewResponseDto) { + this.generatePreviewResponseDto = generatePreviewResponseDto; + return this; + } + + + public WorkflowControllerGeneratePreviewResponse withHeaders(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + + @Override + public boolean equals(java.lang.Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + WorkflowControllerGeneratePreviewResponse other = (WorkflowControllerGeneratePreviewResponse) o; + return + Utils.enhancedDeepEquals(this.contentType, other.contentType) && + Utils.enhancedDeepEquals(this.statusCode, other.statusCode) && + Utils.enhancedDeepEquals(this.rawResponse, other.rawResponse) && + Utils.enhancedDeepEquals(this.generatePreviewResponseDto, other.generatePreviewResponseDto) && + Utils.enhancedDeepEquals(this.headers, other.headers); + } + + @Override + public int hashCode() { + return Utils.enhancedHash( + contentType, statusCode, rawResponse, + generatePreviewResponseDto, headers); + } + + @Override + public String toString() { + return Utils.toString(WorkflowControllerGeneratePreviewResponse.class, + "contentType", contentType, + "statusCode", statusCode, + "rawResponse", rawResponse, + "generatePreviewResponseDto", generatePreviewResponseDto, + "headers", headers); + } + + @SuppressWarnings("UnusedReturnValue") + public final static class Builder { + + private String contentType; + + private int statusCode; + + private HttpResponse rawResponse; + + private GeneratePreviewResponseDto generatePreviewResponseDto; + + private Map> headers; + + private Builder() { + // force use of static builder() method + } + + /** + * HTTP response content type for this operation + */ + public Builder contentType(@Nonnull String contentType) { + this.contentType = Utils.checkNotNull(contentType, "contentType"); + return this; + } + + /** + * HTTP response status code for this operation + */ + public Builder statusCode(int statusCode) { + this.statusCode = statusCode; + return this; + } + + /** + * Raw HTTP response; suitable for custom response parsing + */ + public Builder rawResponse(@Nonnull HttpResponse rawResponse) { + this.rawResponse = Utils.checkNotNull(rawResponse, "rawResponse"); + return this; + } + + /** + * Created + */ + public Builder generatePreviewResponseDto(@Nullable GeneratePreviewResponseDto generatePreviewResponseDto) { + this.generatePreviewResponseDto = generatePreviewResponseDto; + return this; + } + + public Builder headers(@Nonnull Map> headers) { + this.headers = Utils.checkNotNull(headers, "headers"); + return this; + } + + public WorkflowControllerGeneratePreviewResponse build() { + return new WorkflowControllerGeneratePreviewResponse( + contentType, statusCode, rawResponse, + generatePreviewResponseDto, headers); + } + + } +} diff --git a/src/main/java/co/novu/operations/ChannelEndpointsControllerCreateChannelEndpoint.java b/src/main/java/co/novu/operations/ChannelEndpointsControllerCreateChannelEndpoint.java index 09bebc9c..a6eb9209 100644 --- a/src/main/java/co/novu/operations/ChannelEndpointsControllerCreateChannelEndpoint.java +++ b/src/main/java/co/novu/operations/ChannelEndpointsControllerCreateChannelEndpoint.java @@ -137,7 +137,7 @@ HttpRequest buildRequest(T request, TypeReference typeReference) throws .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/ChannelEndpointsControllerDeleteChannelEndpoint.java b/src/main/java/co/novu/operations/ChannelEndpointsControllerDeleteChannelEndpoint.java index 90c3fc7e..7eee416c 100644 --- a/src/main/java/co/novu/operations/ChannelEndpointsControllerDeleteChannelEndpoint.java +++ b/src/main/java/co/novu/operations/ChannelEndpointsControllerDeleteChannelEndpoint.java @@ -120,7 +120,7 @@ HttpRequest buildRequest(T request, Class klass) throws Exception { .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/ChannelEndpointsControllerGetChannelEndpoint.java b/src/main/java/co/novu/operations/ChannelEndpointsControllerGetChannelEndpoint.java index 84a4171b..eba570ba 100644 --- a/src/main/java/co/novu/operations/ChannelEndpointsControllerGetChannelEndpoint.java +++ b/src/main/java/co/novu/operations/ChannelEndpointsControllerGetChannelEndpoint.java @@ -122,7 +122,7 @@ HttpRequest buildRequest(T request, Class klass) throws Exception { .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/ChannelEndpointsControllerListChannelEndpoints.java b/src/main/java/co/novu/operations/ChannelEndpointsControllerListChannelEndpoints.java index d257fac5..0aece13e 100644 --- a/src/main/java/co/novu/operations/ChannelEndpointsControllerListChannelEndpoints.java +++ b/src/main/java/co/novu/operations/ChannelEndpointsControllerListChannelEndpoints.java @@ -125,7 +125,7 @@ HttpRequest buildRequest(T request, Class klass) throws Exception { request, null)); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/ChannelEndpointsControllerUpdateChannelEndpoint.java b/src/main/java/co/novu/operations/ChannelEndpointsControllerUpdateChannelEndpoint.java index b1d74fb0..d4e9f19b 100644 --- a/src/main/java/co/novu/operations/ChannelEndpointsControllerUpdateChannelEndpoint.java +++ b/src/main/java/co/novu/operations/ChannelEndpointsControllerUpdateChannelEndpoint.java @@ -139,7 +139,7 @@ HttpRequest buildRequest(T request, Class klass, TypeReference typeR .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/EnvironmentVariablesControllerCreateEnvironmentVariable.java b/src/main/java/co/novu/operations/EnvironmentVariablesControllerCreateEnvironmentVariable.java new file mode 100644 index 00000000..7d93c518 --- /dev/null +++ b/src/main/java/co/novu/operations/EnvironmentVariablesControllerCreateEnvironmentVariable.java @@ -0,0 +1,402 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerCreateEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerCreateEnvironmentVariableResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class EnvironmentVariablesControllerCreateEnvironmentVariable { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_createEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_createEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_createEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/v1/environment-variables"); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(EnvironmentVariablesControllerCreateEnvironmentVariableRequest request) throws Exception { + HttpRequest req = buildRequest(request, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EnvironmentVariablesControllerCreateEnvironmentVariableRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public EnvironmentVariablesControllerCreateEnvironmentVariableResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EnvironmentVariablesControllerCreateEnvironmentVariableResponse.Builder resBuilder = + EnvironmentVariablesControllerCreateEnvironmentVariableResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EnvironmentVariablesControllerCreateEnvironmentVariableResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withEnvironmentVariableResponseDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "409", "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(EnvironmentVariablesControllerCreateEnvironmentVariableRequest request) throws Exception { + HttpRequest req = buildRequest(request, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EnvironmentVariablesControllerCreateEnvironmentVariableRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.EnvironmentVariablesControllerCreateEnvironmentVariableResponse.Builder resBuilder = + co.novu.models.operations.async.EnvironmentVariablesControllerCreateEnvironmentVariableResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.EnvironmentVariablesControllerCreateEnvironmentVariableResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withEnvironmentVariableResponseDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "409", "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/EnvironmentVariablesControllerDeleteEnvironmentVariable.java b/src/main/java/co/novu/operations/EnvironmentVariablesControllerDeleteEnvironmentVariable.java new file mode 100644 index 00000000..a744ba31 --- /dev/null +++ b/src/main/java/co/novu/operations/EnvironmentVariablesControllerDeleteEnvironmentVariable.java @@ -0,0 +1,378 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerDeleteEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerDeleteEnvironmentVariableResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class EnvironmentVariablesControllerDeleteEnvironmentVariable { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_deleteEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_deleteEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_deleteEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v1/environment-variables/{variableKey}", + request, null); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(EnvironmentVariablesControllerDeleteEnvironmentVariableRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EnvironmentVariablesControllerDeleteEnvironmentVariableRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public EnvironmentVariablesControllerDeleteEnvironmentVariableResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.Builder resBuilder = + EnvironmentVariablesControllerDeleteEnvironmentVariableResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EnvironmentVariablesControllerDeleteEnvironmentVariableResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + res.withHeaders(response.headers().map()); + // no content + return res; + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404", "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(EnvironmentVariablesControllerDeleteEnvironmentVariableRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerDeleteEnvironmentVariableRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EnvironmentVariablesControllerDeleteEnvironmentVariableRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.EnvironmentVariablesControllerDeleteEnvironmentVariableResponse.Builder resBuilder = + co.novu.models.operations.async.EnvironmentVariablesControllerDeleteEnvironmentVariableResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.EnvironmentVariablesControllerDeleteEnvironmentVariableResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + res.withHeaders(response.headers().map()); + // no content + return CompletableFuture.completedFuture(res); + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404", "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/EnvironmentVariablesControllerGetEnvironmentVariable.java b/src/main/java/co/novu/operations/EnvironmentVariablesControllerGetEnvironmentVariable.java new file mode 100644 index 00000000..830d3970 --- /dev/null +++ b/src/main/java/co/novu/operations/EnvironmentVariablesControllerGetEnvironmentVariable.java @@ -0,0 +1,387 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class EnvironmentVariablesControllerGetEnvironmentVariable { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_getEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_getEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_getEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v1/environment-variables/{variableKey}", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(EnvironmentVariablesControllerGetEnvironmentVariableRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerGetEnvironmentVariableRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EnvironmentVariablesControllerGetEnvironmentVariableRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public EnvironmentVariablesControllerGetEnvironmentVariableResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EnvironmentVariablesControllerGetEnvironmentVariableResponse.Builder resBuilder = + EnvironmentVariablesControllerGetEnvironmentVariableResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EnvironmentVariablesControllerGetEnvironmentVariableResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withEnvironmentVariableResponseDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404", "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(EnvironmentVariablesControllerGetEnvironmentVariableRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerGetEnvironmentVariableRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EnvironmentVariablesControllerGetEnvironmentVariableRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableResponse.Builder resBuilder = + co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withEnvironmentVariableResponseDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404", "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsage.java b/src/main/java/co/novu/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsage.java new file mode 100644 index 00000000..7a62f573 --- /dev/null +++ b/src/main/java/co/novu/operations/EnvironmentVariablesControllerGetEnvironmentVariableUsage.java @@ -0,0 +1,387 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.GetEnvironmentVariableUsageResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest; +import co.novu.models.operations.EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class EnvironmentVariablesControllerGetEnvironmentVariableUsage { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_getEnvironmentVariableUsage", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_getEnvironmentVariableUsage", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_getEnvironmentVariableUsage", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v1/environment-variables/{variableKey}/usage", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.Builder resBuilder = + EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withGetEnvironmentVariableUsageResponseDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404", "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EnvironmentVariablesControllerGetEnvironmentVariableUsageRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse.Builder resBuilder = + co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.EnvironmentVariablesControllerGetEnvironmentVariableUsageResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withGetEnvironmentVariableUsageResponseDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404", "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/EnvironmentVariablesControllerListEnvironmentVariables.java b/src/main/java/co/novu/operations/EnvironmentVariablesControllerListEnvironmentVariables.java new file mode 100644 index 00000000..4c0c9b51 --- /dev/null +++ b/src/main/java/co/novu/operations/EnvironmentVariablesControllerListEnvironmentVariables.java @@ -0,0 +1,390 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerListEnvironmentVariablesRequest; +import co.novu.models.operations.EnvironmentVariablesControllerListEnvironmentVariablesResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class EnvironmentVariablesControllerListEnvironmentVariables { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_listEnvironmentVariables", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_listEnvironmentVariables", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_listEnvironmentVariables", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + this.baseUrl, + "/v1/environment-variables"); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(EnvironmentVariablesControllerListEnvironmentVariablesRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerListEnvironmentVariablesRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EnvironmentVariablesControllerListEnvironmentVariablesRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public EnvironmentVariablesControllerListEnvironmentVariablesResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EnvironmentVariablesControllerListEnvironmentVariablesResponse.Builder resBuilder = + EnvironmentVariablesControllerListEnvironmentVariablesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EnvironmentVariablesControllerListEnvironmentVariablesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withEnvironmentVariableResponseDtos(Utils.unmarshal(response, new TypeReference>() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(EnvironmentVariablesControllerListEnvironmentVariablesRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerListEnvironmentVariablesRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EnvironmentVariablesControllerListEnvironmentVariablesRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.EnvironmentVariablesControllerListEnvironmentVariablesResponse.Builder resBuilder = + co.novu.models.operations.async.EnvironmentVariablesControllerListEnvironmentVariablesResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.EnvironmentVariablesControllerListEnvironmentVariablesResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference>() {}) + .thenApply(res::withEnvironmentVariableResponseDtos); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/EnvironmentVariablesControllerUpdateEnvironmentVariable.java b/src/main/java/co/novu/operations/EnvironmentVariablesControllerUpdateEnvironmentVariable.java new file mode 100644 index 00000000..17a9b2b6 --- /dev/null +++ b/src/main/java/co/novu/operations/EnvironmentVariablesControllerUpdateEnvironmentVariable.java @@ -0,0 +1,404 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.EnvironmentVariableResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentVariablesControllerUpdateEnvironmentVariableRequest; +import co.novu.models.operations.EnvironmentVariablesControllerUpdateEnvironmentVariableResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class EnvironmentVariablesControllerUpdateEnvironmentVariable { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_updateEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_updateEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentVariablesController_updateEnvironmentVariable", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v1/environment-variables/{variableKey}", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(EnvironmentVariablesControllerUpdateEnvironmentVariableRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EnvironmentVariablesControllerUpdateEnvironmentVariableRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public EnvironmentVariablesControllerUpdateEnvironmentVariableResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.Builder resBuilder = + EnvironmentVariablesControllerUpdateEnvironmentVariableResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EnvironmentVariablesControllerUpdateEnvironmentVariableResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withEnvironmentVariableResponseDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404", "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(EnvironmentVariablesControllerUpdateEnvironmentVariableRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentVariablesControllerUpdateEnvironmentVariableRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EnvironmentVariablesControllerUpdateEnvironmentVariableRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.EnvironmentVariablesControllerUpdateEnvironmentVariableResponse.Builder resBuilder = + co.novu.models.operations.async.EnvironmentVariablesControllerUpdateEnvironmentVariableResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.EnvironmentVariablesControllerUpdateEnvironmentVariableResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withEnvironmentVariableResponseDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "404", "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/EnvironmentsControllerDiffEnvironment.java b/src/main/java/co/novu/operations/EnvironmentsControllerDiffEnvironment.java new file mode 100644 index 00000000..72f73aed --- /dev/null +++ b/src/main/java/co/novu/operations/EnvironmentsControllerDiffEnvironment.java @@ -0,0 +1,404 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.DiffEnvironmentResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentsControllerDiffEnvironmentRequest; +import co.novu.models.operations.EnvironmentsControllerDiffEnvironmentResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class EnvironmentsControllerDiffEnvironment { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentsController_diffEnvironment", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentsController_diffEnvironment", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentsController_diffEnvironment", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/environments/{targetEnvironmentId}/diff", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(EnvironmentsControllerDiffEnvironmentRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentsControllerDiffEnvironmentRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EnvironmentsControllerDiffEnvironmentRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public EnvironmentsControllerDiffEnvironmentResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EnvironmentsControllerDiffEnvironmentResponse.Builder resBuilder = + EnvironmentsControllerDiffEnvironmentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EnvironmentsControllerDiffEnvironmentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withDiffEnvironmentResponseDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(EnvironmentsControllerDiffEnvironmentRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentsControllerDiffEnvironmentRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EnvironmentsControllerDiffEnvironmentRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.EnvironmentsControllerDiffEnvironmentResponse.Builder resBuilder = + co.novu.models.operations.async.EnvironmentsControllerDiffEnvironmentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.EnvironmentsControllerDiffEnvironmentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withDiffEnvironmentResponseDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/EnvironmentsControllerPublishEnvironment.java b/src/main/java/co/novu/operations/EnvironmentsControllerPublishEnvironment.java new file mode 100644 index 00000000..467d0140 --- /dev/null +++ b/src/main/java/co/novu/operations/EnvironmentsControllerPublishEnvironment.java @@ -0,0 +1,404 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.PublishEnvironmentResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.EnvironmentsControllerPublishEnvironmentRequest; +import co.novu.models.operations.EnvironmentsControllerPublishEnvironmentResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class EnvironmentsControllerPublishEnvironment { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentsController_publishEnvironment", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentsController_publishEnvironment", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "EnvironmentsController_publishEnvironment", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/environments/{targetEnvironmentId}/publish", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(EnvironmentsControllerPublishEnvironmentRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentsControllerPublishEnvironmentRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(EnvironmentsControllerPublishEnvironmentRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public EnvironmentsControllerPublishEnvironmentResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + EnvironmentsControllerPublishEnvironmentResponse.Builder resBuilder = + EnvironmentsControllerPublishEnvironmentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + EnvironmentsControllerPublishEnvironmentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withPublishEnvironmentResponseDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(EnvironmentsControllerPublishEnvironmentRequest request) throws Exception { + HttpRequest req = buildRequest(request, EnvironmentsControllerPublishEnvironmentRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(EnvironmentsControllerPublishEnvironmentRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.EnvironmentsControllerPublishEnvironmentResponse.Builder resBuilder = + co.novu.models.operations.async.EnvironmentsControllerPublishEnvironmentResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.EnvironmentsControllerPublishEnvironmentResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withPublishEnvironmentResponseDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerArchiveAllNotifications.java b/src/main/java/co/novu/operations/SubscribersControllerArchiveAllNotifications.java new file mode 100644 index 00000000..5797abd9 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerArchiveAllNotifications.java @@ -0,0 +1,394 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerArchiveAllNotificationsRequest; +import co.novu.models.operations.SubscribersControllerArchiveAllNotificationsResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerArchiveAllNotifications { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_archiveAllNotifications", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_archiveAllNotifications", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_archiveAllNotifications", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/archive", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerArchiveAllNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerArchiveAllNotificationsRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerArchiveAllNotificationsRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerArchiveAllNotificationsResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerArchiveAllNotificationsResponse.Builder resBuilder = + SubscribersControllerArchiveAllNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerArchiveAllNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return res; + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerArchiveAllNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerArchiveAllNotificationsRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerArchiveAllNotificationsRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerArchiveAllNotificationsResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerArchiveAllNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerArchiveAllNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return CompletableFuture.completedFuture(res); + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerArchiveAllReadNotifications.java b/src/main/java/co/novu/operations/SubscribersControllerArchiveAllReadNotifications.java new file mode 100644 index 00000000..37a06ccb --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerArchiveAllReadNotifications.java @@ -0,0 +1,394 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerArchiveAllReadNotificationsRequest; +import co.novu.models.operations.SubscribersControllerArchiveAllReadNotificationsResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerArchiveAllReadNotifications { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_archiveAllReadNotifications", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_archiveAllReadNotifications", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_archiveAllReadNotifications", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/read-archive", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerArchiveAllReadNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerArchiveAllReadNotificationsRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerArchiveAllReadNotificationsRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerArchiveAllReadNotificationsResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerArchiveAllReadNotificationsResponse.Builder resBuilder = + SubscribersControllerArchiveAllReadNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerArchiveAllReadNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return res; + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerArchiveAllReadNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerArchiveAllReadNotificationsRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerArchiveAllReadNotificationsRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerArchiveAllReadNotificationsResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerArchiveAllReadNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerArchiveAllReadNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return CompletableFuture.completedFuture(res); + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerArchiveNotification.java b/src/main/java/co/novu/operations/SubscribersControllerArchiveNotification.java new file mode 100644 index 00000000..8537a5ac --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerArchiveNotification.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.InboxNotificationDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerArchiveNotificationRequest; +import co.novu.models.operations.SubscribersControllerArchiveNotificationResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerArchiveNotification { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_archiveNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_archiveNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_archiveNotification", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/{notificationId}/archive", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerArchiveNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerArchiveNotificationRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerArchiveNotificationRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerArchiveNotificationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerArchiveNotificationResponse.Builder resBuilder = + SubscribersControllerArchiveNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerArchiveNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInboxNotificationDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerArchiveNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerArchiveNotificationRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerArchiveNotificationRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerArchiveNotificationResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerArchiveNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerArchiveNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withInboxNotificationDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerCompleteNotificationAction.java b/src/main/java/co/novu/operations/SubscribersControllerCompleteNotificationAction.java new file mode 100644 index 00000000..d69908de --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerCompleteNotificationAction.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.InboxNotificationDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerCompleteNotificationActionRequest; +import co.novu.models.operations.SubscribersControllerCompleteNotificationActionResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerCompleteNotificationAction { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_completeNotificationAction", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_completeNotificationAction", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_completeNotificationAction", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/{notificationId}/actions/{actionType}/complete", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerCompleteNotificationActionRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerCompleteNotificationActionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerCompleteNotificationActionRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerCompleteNotificationActionResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerCompleteNotificationActionResponse.Builder resBuilder = + SubscribersControllerCompleteNotificationActionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerCompleteNotificationActionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInboxNotificationDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerCompleteNotificationActionRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerCompleteNotificationActionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerCompleteNotificationActionRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerCompleteNotificationActionResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerCompleteNotificationActionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerCompleteNotificationActionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withInboxNotificationDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerDeleteAllNotifications.java b/src/main/java/co/novu/operations/SubscribersControllerDeleteAllNotifications.java new file mode 100644 index 00000000..4517846f --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerDeleteAllNotifications.java @@ -0,0 +1,394 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerDeleteAllNotificationsRequest; +import co.novu.models.operations.SubscribersControllerDeleteAllNotificationsResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerDeleteAllNotifications { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_deleteAllNotifications", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_deleteAllNotifications", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_deleteAllNotifications", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/delete", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerDeleteAllNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerDeleteAllNotificationsRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerDeleteAllNotificationsRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerDeleteAllNotificationsResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerDeleteAllNotificationsResponse.Builder resBuilder = + SubscribersControllerDeleteAllNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerDeleteAllNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return res; + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerDeleteAllNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerDeleteAllNotificationsRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerDeleteAllNotificationsRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerDeleteAllNotificationsResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerDeleteAllNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerDeleteAllNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return CompletableFuture.completedFuture(res); + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerDeleteNotification.java b/src/main/java/co/novu/operations/SubscribersControllerDeleteNotification.java new file mode 100644 index 00000000..a46ee386 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerDeleteNotification.java @@ -0,0 +1,381 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerDeleteNotificationRequest; +import co.novu.models.operations.SubscribersControllerDeleteNotificationResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerDeleteNotification { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_deleteNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_deleteNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_deleteNotification", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/{notificationId}", + request, null); + HTTPRequest req = new HTTPRequest(url, "DELETE"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerDeleteNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerDeleteNotificationRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerDeleteNotificationRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerDeleteNotificationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerDeleteNotificationResponse.Builder resBuilder = + SubscribersControllerDeleteNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerDeleteNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return res; + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerDeleteNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerDeleteNotificationRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerDeleteNotificationRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerDeleteNotificationResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerDeleteNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerDeleteNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return CompletableFuture.completedFuture(res); + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerGetSubscriberNotifications.java b/src/main/java/co/novu/operations/SubscribersControllerGetSubscriberNotifications.java new file mode 100644 index 00000000..a402e677 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerGetSubscriberNotifications.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.GetSubscriberNotificationsResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsRequest; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerGetSubscriberNotifications { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_getSubscriberNotifications", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_getSubscriberNotifications", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_getSubscriberNotifications", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerGetSubscriberNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerGetSubscriberNotificationsRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerGetSubscriberNotificationsRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerGetSubscriberNotificationsResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerGetSubscriberNotificationsResponse.Builder resBuilder = + SubscribersControllerGetSubscriberNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerGetSubscriberNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withGetSubscriberNotificationsResponseDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerGetSubscriberNotificationsRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerGetSubscriberNotificationsRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerGetSubscriberNotificationsRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerGetSubscriberNotificationsResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerGetSubscriberNotificationsResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerGetSubscriberNotificationsResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withGetSubscriberNotificationsResponseDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerGetSubscriberNotificationsCount.java b/src/main/java/co/novu/operations/SubscribersControllerGetSubscriberNotificationsCount.java new file mode 100644 index 00000000..901b2689 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerGetSubscriberNotificationsCount.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.GetSubscriberNotificationsCountResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsCountRequest; +import co.novu.models.operations.SubscribersControllerGetSubscriberNotificationsCountResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerGetSubscriberNotificationsCount { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_getSubscriberNotificationsCount", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_getSubscriberNotificationsCount", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_getSubscriberNotificationsCount", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/count", + request, null); + HTTPRequest req = new HTTPRequest(url, "GET"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerGetSubscriberNotificationsCountRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerGetSubscriberNotificationsCountRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerGetSubscriberNotificationsCountRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerGetSubscriberNotificationsCountResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerGetSubscriberNotificationsCountResponse.Builder resBuilder = + SubscribersControllerGetSubscriberNotificationsCountResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerGetSubscriberNotificationsCountResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withGetSubscriberNotificationsCountResponseDtos(Utils.unmarshal(response, new TypeReference>() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerGetSubscriberNotificationsCountRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerGetSubscriberNotificationsCountRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerGetSubscriberNotificationsCountRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerGetSubscriberNotificationsCountResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerGetSubscriberNotificationsCountResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerGetSubscriberNotificationsCountResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference>() {}) + .thenApply(res::withGetSubscriberNotificationsCountResponseDtos); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerMarkAllNotificationsAsRead.java b/src/main/java/co/novu/operations/SubscribersControllerMarkAllNotificationsAsRead.java new file mode 100644 index 00000000..dc15ff2d --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerMarkAllNotificationsAsRead.java @@ -0,0 +1,394 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerMarkAllNotificationsAsReadRequest; +import co.novu.models.operations.SubscribersControllerMarkAllNotificationsAsReadResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerMarkAllNotificationsAsRead { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markAllNotificationsAsRead", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markAllNotificationsAsRead", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markAllNotificationsAsRead", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/read", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerMarkAllNotificationsAsReadRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerMarkAllNotificationsAsReadRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerMarkAllNotificationsAsReadRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerMarkAllNotificationsAsReadResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerMarkAllNotificationsAsReadResponse.Builder resBuilder = + SubscribersControllerMarkAllNotificationsAsReadResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerMarkAllNotificationsAsReadResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return res; + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerMarkAllNotificationsAsReadRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerMarkAllNotificationsAsReadRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerMarkAllNotificationsAsReadRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerMarkAllNotificationsAsReadResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerMarkAllNotificationsAsReadResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerMarkAllNotificationsAsReadResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return CompletableFuture.completedFuture(res); + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerMarkNotificationAsRead.java b/src/main/java/co/novu/operations/SubscribersControllerMarkNotificationAsRead.java new file mode 100644 index 00000000..e138cc95 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerMarkNotificationAsRead.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.InboxNotificationDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsReadRequest; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsReadResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerMarkNotificationAsRead { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markNotificationAsRead", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markNotificationAsRead", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markNotificationAsRead", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/{notificationId}/read", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerMarkNotificationAsReadRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerMarkNotificationAsReadRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerMarkNotificationAsReadRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerMarkNotificationAsReadResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerMarkNotificationAsReadResponse.Builder resBuilder = + SubscribersControllerMarkNotificationAsReadResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerMarkNotificationAsReadResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInboxNotificationDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerMarkNotificationAsReadRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerMarkNotificationAsReadRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerMarkNotificationAsReadRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerMarkNotificationAsReadResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerMarkNotificationAsReadResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerMarkNotificationAsReadResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withInboxNotificationDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerMarkNotificationAsUnread.java b/src/main/java/co/novu/operations/SubscribersControllerMarkNotificationAsUnread.java new file mode 100644 index 00000000..343c8e90 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerMarkNotificationAsUnread.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.InboxNotificationDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsUnreadRequest; +import co.novu.models.operations.SubscribersControllerMarkNotificationAsUnreadResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerMarkNotificationAsUnread { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markNotificationAsUnread", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markNotificationAsUnread", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markNotificationAsUnread", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/{notificationId}/unread", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerMarkNotificationAsUnreadRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerMarkNotificationAsUnreadRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerMarkNotificationAsUnreadRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerMarkNotificationAsUnreadResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerMarkNotificationAsUnreadResponse.Builder resBuilder = + SubscribersControllerMarkNotificationAsUnreadResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerMarkNotificationAsUnreadResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInboxNotificationDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerMarkNotificationAsUnreadRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerMarkNotificationAsUnreadRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerMarkNotificationAsUnreadRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerMarkNotificationAsUnreadResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerMarkNotificationAsUnreadResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerMarkNotificationAsUnreadResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withInboxNotificationDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerMarkNotificationsAsSeen.java b/src/main/java/co/novu/operations/SubscribersControllerMarkNotificationsAsSeen.java new file mode 100644 index 00000000..1e564215 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerMarkNotificationsAsSeen.java @@ -0,0 +1,394 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerMarkNotificationsAsSeenRequest; +import co.novu.models.operations.SubscribersControllerMarkNotificationsAsSeenResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerMarkNotificationsAsSeen { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markNotificationsAsSeen", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markNotificationsAsSeen", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_markNotificationsAsSeen", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/seen", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerMarkNotificationsAsSeenRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerMarkNotificationsAsSeenRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerMarkNotificationsAsSeenRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerMarkNotificationsAsSeenResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerMarkNotificationsAsSeenResponse.Builder resBuilder = + SubscribersControllerMarkNotificationsAsSeenResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerMarkNotificationsAsSeenResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return res; + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerMarkNotificationsAsSeenRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerMarkNotificationsAsSeenRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerMarkNotificationsAsSeenRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerMarkNotificationsAsSeenResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerMarkNotificationsAsSeenResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerMarkNotificationsAsSeenResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "204")) { + // no content + return CompletableFuture.completedFuture(res); + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerRevertNotificationAction.java b/src/main/java/co/novu/operations/SubscribersControllerRevertNotificationAction.java new file mode 100644 index 00000000..dd7b3a76 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerRevertNotificationAction.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.InboxNotificationDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerRevertNotificationActionRequest; +import co.novu.models.operations.SubscribersControllerRevertNotificationActionResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerRevertNotificationAction { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_revertNotificationAction", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_revertNotificationAction", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_revertNotificationAction", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/{notificationId}/actions/{actionType}/revert", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerRevertNotificationActionRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerRevertNotificationActionRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerRevertNotificationActionRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerRevertNotificationActionResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerRevertNotificationActionResponse.Builder resBuilder = + SubscribersControllerRevertNotificationActionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerRevertNotificationActionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInboxNotificationDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerRevertNotificationActionRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerRevertNotificationActionRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerRevertNotificationActionRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerRevertNotificationActionResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerRevertNotificationActionResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerRevertNotificationActionResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withInboxNotificationDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerSnoozeNotification.java b/src/main/java/co/novu/operations/SubscribersControllerSnoozeNotification.java new file mode 100644 index 00000000..ce77c477 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerSnoozeNotification.java @@ -0,0 +1,409 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.InboxNotificationDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerSnoozeNotificationRequest; +import co.novu.models.operations.SubscribersControllerSnoozeNotificationResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerSnoozeNotification { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_snoozeNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_snoozeNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_snoozeNotification", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/{notificationId}/snooze", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerSnoozeNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerSnoozeNotificationRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerSnoozeNotificationRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerSnoozeNotificationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerSnoozeNotificationResponse.Builder resBuilder = + SubscribersControllerSnoozeNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerSnoozeNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInboxNotificationDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerSnoozeNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerSnoozeNotificationRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerSnoozeNotificationRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerSnoozeNotificationResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerSnoozeNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerSnoozeNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withInboxNotificationDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerUnarchiveNotification.java b/src/main/java/co/novu/operations/SubscribersControllerUnarchiveNotification.java new file mode 100644 index 00000000..63edef24 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerUnarchiveNotification.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.InboxNotificationDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerUnarchiveNotificationRequest; +import co.novu.models.operations.SubscribersControllerUnarchiveNotificationResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerUnarchiveNotification { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_unarchiveNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_unarchiveNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_unarchiveNotification", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/{notificationId}/unarchive", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerUnarchiveNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerUnarchiveNotificationRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerUnarchiveNotificationRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerUnarchiveNotificationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerUnarchiveNotificationResponse.Builder resBuilder = + SubscribersControllerUnarchiveNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerUnarchiveNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInboxNotificationDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerUnarchiveNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerUnarchiveNotificationRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerUnarchiveNotificationRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerUnarchiveNotificationResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerUnarchiveNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerUnarchiveNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withInboxNotificationDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/SubscribersControllerUnsnoozeNotification.java b/src/main/java/co/novu/operations/SubscribersControllerUnsnoozeNotification.java new file mode 100644 index 00000000..8dca2872 --- /dev/null +++ b/src/main/java/co/novu/operations/SubscribersControllerUnsnoozeNotification.java @@ -0,0 +1,392 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.InboxNotificationDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.SubscribersControllerUnsnoozeNotificationRequest; +import co.novu.models.operations.SubscribersControllerUnsnoozeNotificationResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class SubscribersControllerUnsnoozeNotification { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_unsnoozeNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_unsnoozeNotification", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "SubscribersController_unsnoozeNotification", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/subscribers/{subscriberId}/notifications/{notificationId}/unsnooze", + request, null); + HTTPRequest req = new HTTPRequest(url, "PATCH"); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + + req.addQueryParams(Utils.getQueryParams( + klass, + request, + null)); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(SubscribersControllerUnsnoozeNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerUnsnoozeNotificationRequest.class); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(SubscribersControllerUnsnoozeNotificationRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public SubscribersControllerUnsnoozeNotificationResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + SubscribersControllerUnsnoozeNotificationResponse.Builder resBuilder = + SubscribersControllerUnsnoozeNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + SubscribersControllerUnsnoozeNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withInboxNotificationDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(SubscribersControllerUnsnoozeNotificationRequest request) throws Exception { + HttpRequest req = buildRequest(request, SubscribersControllerUnsnoozeNotificationRequest.class); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(SubscribersControllerUnsnoozeNotificationRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.SubscribersControllerUnsnoozeNotificationResponse.Builder resBuilder = + co.novu.models.operations.async.SubscribersControllerUnsnoozeNotificationResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.SubscribersControllerUnsnoozeNotificationResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "200")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withInboxNotificationDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/operations/TranslationControllerCreateTranslationEndpoint.java b/src/main/java/co/novu/operations/TranslationControllerCreateTranslationEndpoint.java index def14a05..c3efd66b 100644 --- a/src/main/java/co/novu/operations/TranslationControllerCreateTranslationEndpoint.java +++ b/src/main/java/co/novu/operations/TranslationControllerCreateTranslationEndpoint.java @@ -135,7 +135,7 @@ HttpRequest buildRequest(T request, TypeReference typeReference) throws .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/TranslationControllerDeleteTranslationEndpoint.java b/src/main/java/co/novu/operations/TranslationControllerDeleteTranslationEndpoint.java index ab2d3142..edbd9585 100644 --- a/src/main/java/co/novu/operations/TranslationControllerDeleteTranslationEndpoint.java +++ b/src/main/java/co/novu/operations/TranslationControllerDeleteTranslationEndpoint.java @@ -118,7 +118,7 @@ HttpRequest buildRequest(T request, Class klass) throws Exception { .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/TranslationControllerDeleteTranslationGroupEndpoint.java b/src/main/java/co/novu/operations/TranslationControllerDeleteTranslationGroupEndpoint.java index 704b8296..90665f5b 100644 --- a/src/main/java/co/novu/operations/TranslationControllerDeleteTranslationGroupEndpoint.java +++ b/src/main/java/co/novu/operations/TranslationControllerDeleteTranslationGroupEndpoint.java @@ -118,7 +118,7 @@ HttpRequest buildRequest(T request, Class klass) throws Exception { .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/TranslationControllerGetMasterJsonEndpoint.java b/src/main/java/co/novu/operations/TranslationControllerGetMasterJsonEndpoint.java index ba8348ee..82646731 100644 --- a/src/main/java/co/novu/operations/TranslationControllerGetMasterJsonEndpoint.java +++ b/src/main/java/co/novu/operations/TranslationControllerGetMasterJsonEndpoint.java @@ -123,7 +123,7 @@ HttpRequest buildRequest(T request, Class klass) throws Exception { request, null)); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/TranslationControllerGetSingleTranslation.java b/src/main/java/co/novu/operations/TranslationControllerGetSingleTranslation.java index 6d86e6d7..2813c5ca 100644 --- a/src/main/java/co/novu/operations/TranslationControllerGetSingleTranslation.java +++ b/src/main/java/co/novu/operations/TranslationControllerGetSingleTranslation.java @@ -120,7 +120,7 @@ HttpRequest buildRequest(T request, Class klass) throws Exception { .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/TranslationControllerGetTranslationGroupEndpoint.java b/src/main/java/co/novu/operations/TranslationControllerGetTranslationGroupEndpoint.java index c794be93..615a7782 100644 --- a/src/main/java/co/novu/operations/TranslationControllerGetTranslationGroupEndpoint.java +++ b/src/main/java/co/novu/operations/TranslationControllerGetTranslationGroupEndpoint.java @@ -120,7 +120,7 @@ HttpRequest buildRequest(T request, Class klass) throws Exception { .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/TranslationControllerImportMasterJsonEndpoint.java b/src/main/java/co/novu/operations/TranslationControllerImportMasterJsonEndpoint.java index 04258f00..e5da86a1 100644 --- a/src/main/java/co/novu/operations/TranslationControllerImportMasterJsonEndpoint.java +++ b/src/main/java/co/novu/operations/TranslationControllerImportMasterJsonEndpoint.java @@ -135,7 +135,7 @@ HttpRequest buildRequest(T request, TypeReference typeReference) throws .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/TranslationControllerUploadMasterJsonEndpoint.java b/src/main/java/co/novu/operations/TranslationControllerUploadMasterJsonEndpoint.java index ed247f7f..cbc63b0a 100644 --- a/src/main/java/co/novu/operations/TranslationControllerUploadMasterJsonEndpoint.java +++ b/src/main/java/co/novu/operations/TranslationControllerUploadMasterJsonEndpoint.java @@ -135,7 +135,7 @@ HttpRequest buildRequest(T request, TypeReference typeReference) throws .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/TranslationControllerUploadTranslationFiles.java b/src/main/java/co/novu/operations/TranslationControllerUploadTranslationFiles.java index d3a9397a..b57b5be0 100644 --- a/src/main/java/co/novu/operations/TranslationControllerUploadTranslationFiles.java +++ b/src/main/java/co/novu/operations/TranslationControllerUploadTranslationFiles.java @@ -135,7 +135,7 @@ HttpRequest buildRequest(T request, TypeReference typeReference) throws .addHeader("user-agent", SDKConfiguration.USER_AGENT); _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); req.addHeaders(Utils.getHeadersFromMetadata(request, null)); - Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity(), "secretKey", "secretKey"); return req.build(); } diff --git a/src/main/java/co/novu/operations/WorkflowControllerGeneratePreview.java b/src/main/java/co/novu/operations/WorkflowControllerGeneratePreview.java new file mode 100644 index 00000000..f56ace56 --- /dev/null +++ b/src/main/java/co/novu/operations/WorkflowControllerGeneratePreview.java @@ -0,0 +1,404 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.operations; + +import static co.novu.operations.Operations.RequestOperation; +import static co.novu.utils.Exceptions.unchecked; +import static co.novu.operations.Operations.AsyncRequestOperation; + +import co.novu.SDKConfiguration; +import co.novu.SecuritySource; +import co.novu.models.components.GeneratePreviewResponseDto; +import co.novu.models.errors.APIException; +import co.novu.models.errors.ErrorDto; +import co.novu.models.errors.ValidationErrorDto; +import co.novu.models.operations.WorkflowControllerGeneratePreviewRequest; +import co.novu.models.operations.WorkflowControllerGeneratePreviewResponse; +import co.novu.utils.AsyncRetries; +import co.novu.utils.BackoffStrategy; +import co.novu.utils.Blob; +import co.novu.utils.HTTPClient; +import co.novu.utils.HTTPRequest; +import co.novu.utils.Headers; +import co.novu.utils.Hook.AfterErrorContextImpl; +import co.novu.utils.Hook.AfterSuccessContextImpl; +import co.novu.utils.Hook.BeforeRequestContextImpl; +import co.novu.utils.NonRetryableException; +import co.novu.utils.Options; +import co.novu.utils.Retries; +import co.novu.utils.RetryConfig; +import co.novu.utils.SerializedBody; +import co.novu.utils.Utils.JsonShape; +import co.novu.utils.Utils; +import com.fasterxml.jackson.core.type.TypeReference; +import jakarta.annotation.Nonnull; +import jakarta.annotation.Nullable; +import java.io.InputStream; +import java.lang.Exception; +import java.lang.IllegalArgumentException; +import java.lang.Object; +import java.lang.String; +import java.lang.Throwable; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.util.List; +import java.util.Optional; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; +import java.util.function.Function; + + +public class WorkflowControllerGeneratePreview { + + static abstract class Base { + final SDKConfiguration sdkConfiguration; + final String baseUrl; + final SecuritySource securitySource; + final List retryStatusCodes; + final RetryConfig retryConfig; + final HTTPClient client; + final Headers _headers; + + public Base( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + this.sdkConfiguration = sdkConfiguration; + this._headers =_headers; + this.baseUrl = this.sdkConfiguration.serverUrl(); + this.securitySource = this.sdkConfiguration.securitySource(); + Optional.ofNullable(options) + .ifPresent(o -> o.validate(List.of(Options.Option.RETRY_CONFIG))); + this.retryStatusCodes = List.of("408", "409", "429", "5XX"); + this.retryConfig = Optional.ofNullable(options) + .flatMap(Options::retryConfig) + .or(sdkConfiguration::retryConfig) + .orElse(RetryConfig.builder().backoff(BackoffStrategy.builder() + .initialInterval(1000, TimeUnit.MILLISECONDS) + .maxInterval(30000, TimeUnit.MILLISECONDS) + .baseFactor((double) (1.5)) + .maxElapsedTime(3600000, TimeUnit.MILLISECONDS) + .retryConnectError(true) + .build()) + .build()); + this.client = this.sdkConfiguration.client(); + } + + Optional securitySource() { + return Optional.ofNullable(this.securitySource); + } + + BeforeRequestContextImpl createBeforeRequestContext() { + return new BeforeRequestContextImpl( + this.sdkConfiguration, + this.baseUrl, + "WorkflowController_generatePreview", + java.util.Optional.empty(), + securitySource()); + } + + AfterSuccessContextImpl createAfterSuccessContext() { + return new AfterSuccessContextImpl( + this.sdkConfiguration, + this.baseUrl, + "WorkflowController_generatePreview", + java.util.Optional.empty(), + securitySource()); + } + + AfterErrorContextImpl createAfterErrorContext() { + return new AfterErrorContextImpl( + this.sdkConfiguration, + this.baseUrl, + "WorkflowController_generatePreview", + java.util.Optional.empty(), + securitySource()); + } + HttpRequest buildRequest(T request, Class klass, TypeReference typeReference) throws Exception { + String url = Utils.generateURL( + klass, + this.baseUrl, + "/v2/workflows/{workflowId}/step/{stepId}/preview", + request, null); + HTTPRequest req = new HTTPRequest(url, "POST"); + Object convertedRequest = Utils.convertToShape( + request, + JsonShape.DEFAULT, + typeReference); + SerializedBody serializedRequestBody = Utils.serializeRequestBody( + convertedRequest, + "body", + "json", + false); + if (serializedRequestBody == null) { + throw new IllegalArgumentException("Request body is required"); + } + req.setBody(Optional.ofNullable(serializedRequestBody)); + req.addHeader("Accept", "application/json") + .addHeader("user-agent", SDKConfiguration.USER_AGENT); + _headers.forEach((k, list) -> list.forEach(v -> req.addHeader(k, v))); + req.addHeaders(Utils.getHeadersFromMetadata(request, null)); + Utils.configureSecurity(req, this.sdkConfiguration.securitySource().getSecurity()); + + return req.build(); + } + } + + public static class Sync extends Base + implements RequestOperation { + public Sync( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + Headers _headers) { + super( + sdkConfiguration, options, + _headers); + } + + private HttpRequest onBuildRequest(WorkflowControllerGeneratePreviewRequest request) throws Exception { + HttpRequest req = buildRequest(request, WorkflowControllerGeneratePreviewRequest.class, new TypeReference() {}); + return sdkConfiguration.hooks().beforeRequest(createBeforeRequestContext(), req); + } + + private HttpResponse onError(HttpResponse response, Exception error) throws Exception { + return sdkConfiguration.hooks().afterError( + createAfterErrorContext(), + Optional.ofNullable(response), + Optional.ofNullable(error)); + } + + private HttpResponse onSuccess(HttpResponse response) throws Exception { + return sdkConfiguration.hooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public HttpResponse doRequest(WorkflowControllerGeneratePreviewRequest request) { + Retries retries = Retries.builder() + .action(() -> { + HttpRequest r; + try { + r = onBuildRequest(request); + } catch (Exception e) { + throw new NonRetryableException(e); + } + try { + HttpResponse httpRes = client.send(r); + if (Utils.statusCodeMatches(httpRes.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(httpRes, null); + } + return httpRes; + } catch (Exception e) { + return onError(null, e); + } + }) + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .build(); + return unchecked(() -> onSuccess(retries.run())).get(); + } + + + @Override + public WorkflowControllerGeneratePreviewResponse handleResponse(HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + WorkflowControllerGeneratePreviewResponse.Builder resBuilder = + WorkflowControllerGeneratePreviewResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + WorkflowControllerGeneratePreviewResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "201")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return res.withGeneratePreviewResponseDto(Utils.unmarshal(response, new TypeReference() {})); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ValidationErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + throw ErrorDto.from(response); + } else { + throw APIException.from("Unexpected content-type received: " + contentType, response); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + throw APIException.from("API error occurred", response); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + throw APIException.from("API error occurred", response); + } + throw APIException.from("Unexpected status code received: " + response.statusCode(), response); + } + } + public static class Async extends Base + implements AsyncRequestOperation { + private final ScheduledExecutorService retryScheduler; + + public Async( + @Nonnull SDKConfiguration sdkConfiguration, @Nullable Options options, + @Nullable ScheduledExecutorService retryScheduler, Headers _headers) { + super( + sdkConfiguration, options, + _headers); + this.retryScheduler = retryScheduler; + } + + private CompletableFuture onBuildRequest(WorkflowControllerGeneratePreviewRequest request) throws Exception { + HttpRequest req = buildRequest(request, WorkflowControllerGeneratePreviewRequest.class, new TypeReference() {}); + return this.sdkConfiguration.asyncHooks().beforeRequest(createBeforeRequestContext(), req); + } + + private CompletableFuture> onError(HttpResponse response, Throwable error) { + return this.sdkConfiguration.asyncHooks().afterError(createAfterErrorContext(), response, error); + } + + private CompletableFuture> onSuccess(HttpResponse response) { + return this.sdkConfiguration.asyncHooks().afterSuccess(createAfterSuccessContext(), response); + } + + @Override + public CompletableFuture> doRequest(WorkflowControllerGeneratePreviewRequest request) { + AsyncRetries retries = AsyncRetries.builder() + .retryConfig(retryConfig) + .statusCodes(retryStatusCodes) + .scheduler(retryScheduler) + .build(); + return retries.retry(() -> unchecked(() -> onBuildRequest(request)).get().thenCompose(client::sendAsync) + .handle((resp, err) -> { + if (err != null) { + return onError(null, err); + } + if (Utils.statusCodeMatches(resp.statusCode(), "400", "401", "403", "404", "405", "409", "413", "414", "415", "422", "429", "4XX", "500", "503", "5XX")) { + return onError(resp, null); + } + return CompletableFuture.completedFuture(resp); + }) + .thenCompose(Function.identity())) + .thenCompose(this::onSuccess); + } + + @Override + public CompletableFuture handleResponse( + HttpResponse response) { + String contentType = response + .headers() + .firstValue("Content-Type") + .orElse("application/octet-stream"); + co.novu.models.operations.async.WorkflowControllerGeneratePreviewResponse.Builder resBuilder = + co.novu.models.operations.async.WorkflowControllerGeneratePreviewResponse + .builder() + .contentType(contentType) + .statusCode(response.statusCode()) + .rawResponse(response); + + co.novu.models.operations.async.WorkflowControllerGeneratePreviewResponse res = resBuilder.build(); + + if (Utils.statusCodeMatches(response.statusCode(), "201")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return Utils.unmarshalAsync(response, new TypeReference() {}) + .thenApply(res::withGeneratePreviewResponseDto); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "414")) { + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "400", "401", "403", "404", "405", "409", "413", "415")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "422")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ValidationErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "429")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "500")) { + res.withHeaders(response.headers().map()); + if (Utils.contentTypeMatches(contentType, "application/json")) { + return ErrorDto.fromAsync(response) + .thenCompose(CompletableFuture::failedFuture); + } else { + return Utils.createAsyncApiError(response, "Unexpected content-type received: " + contentType); + } + } + if (Utils.statusCodeMatches(response.statusCode(), "503")) { + res.withHeaders(response.headers().map()); + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "4XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + if (Utils.statusCodeMatches(response.statusCode(), "5XX")) { + // no content + return Utils.createAsyncApiError(response, "API error occurred"); + } + return Utils.createAsyncApiError(response, "Unexpected status code received: " + response.statusCode()); + } + } +} diff --git a/src/main/java/co/novu/utils/AsyncRetries.java b/src/main/java/co/novu/utils/AsyncRetries.java index f14f8a48..8d49a25b 100644 --- a/src/main/java/co/novu/utils/AsyncRetries.java +++ b/src/main/java/co/novu/utils/AsyncRetries.java @@ -8,6 +8,8 @@ import java.net.http.HttpResponse; import java.time.Duration; import java.time.Instant; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import java.util.List; import java.util.concurrent.*; import java.util.function.Supplier; @@ -95,6 +97,25 @@ private boolean shouldRetryIOException(Throwable e, BackoffStrategy backoff) { || (message.contains("Read timed out") && backoff.retryReadTimeoutError()); } + private static long retryAfterMs(HttpResponse response) { + String retryAfter = response.headers().firstValue("retry-after").orElse(null); + if (retryAfter == null || retryAfter.isEmpty()) { + return 0; + } + try { + long seconds = Long.parseLong(retryAfter); + return seconds < 0 ? 0 : seconds * 1000; + } catch (NumberFormatException ignored) { + } + try { + ZonedDateTime retryDate = ZonedDateTime.parse(retryAfter, DateTimeFormatter.RFC_1123_DATE_TIME); + long deltaMs = retryDate.toInstant().toEpochMilli() - System.currentTimeMillis(); + return deltaMs > 0 ? deltaMs : 0; + } catch (Exception ignored) { + } + return 0; + } + private void maybeRetry(Supplier>> task, CompletableFuture> result, BackoffStrategy backoff, @@ -112,21 +133,31 @@ private void maybeRetry(Supplier>> task, return; } - double intervalMs = backoff.initialIntervalMs() * Math.pow(backoff.baseFactor(), state.count()); - double jitterMs = backoff.jitterFactor() * intervalMs; - intervalMs = intervalMs - jitterMs + Math.random() * (2 * jitterMs + 1); - intervalMs = Math.min(intervalMs, backoff.maxIntervalMs()); + long intervalMs; + if (e instanceof AsyncRetryableException) { + intervalMs = retryAfterMs(((AsyncRetryableException) e).response()); + } else { + intervalMs = 0; + } + + if (intervalMs <= 0) { + double computed = backoff.initialIntervalMs() * Math.pow(backoff.baseFactor(), state.count()); + double jitterMs = backoff.jitterFactor() * computed; + computed = computed - jitterMs + Math.random() * (2 * jitterMs + 1); + computed = Math.min(computed, backoff.maxIntervalMs()); + intervalMs = (long) computed; + } if (logger.isTraceEnabled()) { String reason = e instanceof AsyncRetryableException ? "status " + ((AsyncRetryableException) e).response().statusCode() : e.getClass().getSimpleName(); - logger.trace("Async retrying due to {} - waiting {}ms before attempt {}", reason, (long) intervalMs, state.count() + 1); + logger.trace("Async retrying due to {} - waiting {}ms before attempt {}", intervalMs, state.count() + 1); } scheduler.schedule( () -> attempt(task, result, backoff, state.countAttempt()), - (long) intervalMs, + intervalMs, TimeUnit.MILLISECONDS); } diff --git a/src/main/java/co/novu/utils/EventStream.java b/src/main/java/co/novu/utils/EventStream.java index 64a83bcd..4d54f775 100644 --- a/src/main/java/co/novu/utils/EventStream.java +++ b/src/main/java/co/novu/utils/EventStream.java @@ -74,16 +74,23 @@ public final class EventStream implements Iterable, AutoCloseable { private final TypeReference typeReference; private final ObjectMapper mapper; private final Optional terminalMessage; + private final boolean dataRequired; private boolean terminated = false; private boolean closed = false; // Internal use only public EventStream(InputStream in, TypeReference typeReference, ObjectMapper mapper, Optional terminalMessage) { + this(in, typeReference, mapper, terminalMessage, true); + } + + // Internal use only + public EventStream(InputStream in, TypeReference typeReference, ObjectMapper mapper, Optional terminalMessage, boolean dataRequired) { BufferedReader reader = new BufferedReader(new InputStreamReader(in, StandardCharsets.UTF_8), 8192); this.parser = BlockingParser.forSSE(reader); this.typeReference = typeReference; this.mapper = mapper; this.terminalMessage = terminalMessage; + this.dataRequired = dataRequired; logger.debug("EventStream initialized for type: {}", typeReference.getType().getTypeName()); } @@ -95,28 +102,35 @@ public EventStream(InputStream in, TypeReference typeReference, ObjectMapper * @throws IOException when parsing the next message. */ public Optional next() throws IOException { - if (terminated) { - return Optional.empty(); - } - Optional message = parser.next(); - if (message.isEmpty()) { - terminated = true; - return Optional.empty(); - } - EventStreamMessage msg = message.get(); - boolean isTerminal = terminalMessage.flatMap(sentinel -> msg.data().map(sentinel::equals)).orElse(false); - if (isTerminal) { - terminated = true; + while (!terminated) { + Optional message = parser.next(); + if (message.isEmpty()) { + terminated = true; + return Optional.empty(); + } + EventStreamMessage msg = message.get(); + boolean isTerminal = terminalMessage.flatMap(sentinel -> msg.data().map(sentinel::equals)).orElse(false); + if (isTerminal) { + terminated = true; + if (logger.isTraceEnabled()) { + logger.trace("Terminal message encountered in EventStream"); + } + return Optional.empty(); + } + // Skip events without data when data is required + if (dataRequired && msg.data().isEmpty()) { + if (logger.isTraceEnabled()) { + logger.trace("Skipping SSE event with no data field"); + } + continue; + } + Optional result = Optional.of(Utils.asType(msg, mapper, typeReference)); if (logger.isTraceEnabled()) { - logger.trace("Terminal message encountered in EventStream"); + logger.trace("EventStream item processed"); } - return Optional.empty(); - } - Optional result = Optional.of(Utils.asType(msg, mapper, typeReference)); - if (logger.isTraceEnabled()) { - logger.trace("EventStream item processed"); + return result; } - return result; + return Optional.empty(); } /** @@ -214,4 +228,4 @@ private void load() { } } } -} +} \ No newline at end of file diff --git a/src/main/java/co/novu/utils/NovuJavaJacksonModule.java b/src/main/java/co/novu/utils/NovuJavaJacksonModule.java new file mode 100644 index 00000000..8010e0d4 --- /dev/null +++ b/src/main/java/co/novu/utils/NovuJavaJacksonModule.java @@ -0,0 +1,67 @@ +/* + * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. + */ +package co.novu.utils; + +import com.fasterxml.jackson.annotation.JsonAutoDetect; +import com.fasterxml.jackson.annotation.PropertyAccessor; +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.Module; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import org.openapitools.jackson.nullable.JsonNullableModule; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule; + +/** + * A composite Jackson {@link Module} that registers all SDK-required Jackson customizations. + * + *

Register this with a custom {@link ObjectMapper} to enable full serialization support + * for SDK types. Bundles {@code JavaTimeModule}, {@code Jdk8Module}, {@code JsonNullableModule}, + * and SDK strict deserializers, and applies the same feature flags used by + * {@link JSON#getMapper()}: + *

    + *
  • Disables {@code WRITE_DATES_AS_TIMESTAMPS} (ISO-8601 date strings)
  • + *
  • Disables {@code FAIL_ON_UNKNOWN_PROPERTIES}
  • + *
  • Disables {@code FAIL_ON_EMPTY_BEANS}
  • + *
  • Enables {@code FAIL_ON_NULL_FOR_PRIMITIVES}
  • + *
  • Restricts field visibility to annotated fields only
  • + *
+ * + *
{@code
+ * ObjectMapper myMapper = new ObjectMapper()
+ *     .registerModule(new NovuJavaJacksonModule());
+ * String json = myMapper.writeValueAsString(response);
+ * }
+ * + *

Alternatively, use {@link JSON#getMapper()} to access the pre-configured SDK mapper directly. + */ +public class NovuJavaJacksonModule extends Module { + + @Override + public String getModuleName() { + return "NovuJavaJacksonModule"; + } + + @Override + public Version version() { + return Version.unknownVersion(); + } + + @Override + public void setupModule(SetupContext context) { + new JavaTimeModule().setupModule(context); + new Jdk8Module().setupModule(context); + new JsonNullableModule().setupModule(context); + Deserializers.STRICT_DESERIALIZERS.setupModule(context); + if (context.getOwner() instanceof ObjectMapper) { + ObjectMapper mapper = (ObjectMapper) context.getOwner(); + mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false) + .configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false) + .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) + .enable(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES) + .setVisibility(PropertyAccessor.ALL, JsonAutoDetect.Visibility.NONE); + } + } +} diff --git a/src/main/java/co/novu/utils/Retries.java b/src/main/java/co/novu/utils/Retries.java index a22635d1..ee9a1b50 100644 --- a/src/main/java/co/novu/utils/Retries.java +++ b/src/main/java/co/novu/utils/Retries.java @@ -7,6 +7,8 @@ import java.io.InputStream; import java.net.http.HttpResponse; import java.net.ConnectException; +import java.time.ZonedDateTime; +import java.time.format.DateTimeFormatter; import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; import java.util.List; @@ -96,6 +98,25 @@ private HttpResponse getResponse(boolean retryConnectError, boolean } } + private static long retryAfterMs(HttpResponse response) { + String retryAfter = response.headers().firstValue("retry-after").orElse(null); + if (retryAfter == null || retryAfter.isEmpty()) { + return 0; + } + try { + long seconds = Long.parseLong(retryAfter); + return seconds < 0 ? 0 : seconds * 1000; + } catch (NumberFormatException ignored) { + } + try { + ZonedDateTime retryDate = ZonedDateTime.parse(retryAfter, DateTimeFormatter.RFC_1123_DATE_TIME); + long deltaMs = retryDate.toInstant().toEpochMilli() - System.currentTimeMillis(); + return deltaMs > 0 ? deltaMs : 0; + } catch (Exception ignored) { + } + return 0; + } + private HttpResponse retryWithBackoff(boolean retryConnectError, boolean retryReadTimeoutError) throws Exception { BackoffStrategy backoff = retryConfig.backoff().get(); long initialIntervalMs = backoff.initialIntervalMs(); @@ -121,16 +142,25 @@ private HttpResponse retryWithBackoff(boolean retryConnectError, bo throw e; } - double intervalMs = initialIntervalMs * Math.pow(backoff.baseFactor(), numAttempts); - double jitterMs = backoff.jitterFactor() * intervalMs; - intervalMs = intervalMs - jitterMs + Math.random()*(2*jitterMs + 1); + long sleepMs; + if (e instanceof RetryableException) { + sleepMs = retryAfterMs(((RetryableException) e).response()); + } else { + sleepMs = 0; + } - double maxIntervalMs = backoff.maxIntervalMs(); - if (intervalMs > maxIntervalMs) { - intervalMs = maxIntervalMs; + if (sleepMs <= 0) { + double intervalMs = initialIntervalMs * Math.pow(backoff.baseFactor(), numAttempts); + double jitterMs = backoff.jitterFactor() * intervalMs; + intervalMs = intervalMs - jitterMs + Math.random()*(2*jitterMs + 1); + + double maxIntervalMs = backoff.maxIntervalMs(); + if (intervalMs > maxIntervalMs) { + intervalMs = maxIntervalMs; + } + sleepMs = (long) intervalMs; } - long sleepMs = (long) intervalMs; if (logger.isTraceEnabled()) { String reason = e instanceof RetryableException ? "status " + ((RetryableException)e).response().statusCode() diff --git a/src/main/java/co/novu/utils/Security.java b/src/main/java/co/novu/utils/Security.java index b701675d..e6246c60 100644 --- a/src/main/java/co/novu/utils/Security.java +++ b/src/main/java/co/novu/utils/Security.java @@ -5,6 +5,7 @@ import java.lang.reflect.Field; import java.nio.charset.StandardCharsets; +import java.util.ArrayList; import java.util.Arrays; import java.util.Base64; import java.util.Deque; @@ -23,9 +24,22 @@ private Security() { // prevent instantiation } - public static HTTPRequest configureSecurity(HTTPRequest request, Object security) throws Exception { + public static HTTPRequest configureSecurity(HTTPRequest request, Object security, String... allowedFields) throws Exception { if (security != null) { - Field[] fields = security.getClass().getDeclaredFields(); + Field[] fields; + if (allowedFields.length > 0) { + List ordered = new ArrayList<>(); + for (String name : allowedFields) { + try { + ordered.add(security.getClass().getDeclaredField(name)); + } catch (NoSuchFieldException e) { + // skip unknown fields + } + } + fields = ordered.toArray(new Field[0]); + } else { + fields = security.getClass().getDeclaredFields(); + } for (Field field : fields) { field.setAccessible(true); @@ -41,6 +55,9 @@ public static HTTPRequest configureSecurity(HTTPRequest request, Object security if (securityMetadata.option) { parseSecurityOption(request, value); + if (!securityMetadata.composite) { + return request; + } } else if (securityMetadata.scheme) { if ((securityMetadata.subtype != null && securityMetadata.subtype.equals("basic")) && Types.getType(value.getClass()) != Types.OBJECT) { @@ -48,6 +65,9 @@ public static HTTPRequest configureSecurity(HTTPRequest request, Object security } else { parseSecurityScheme(request, securityMetadata, value); } + if (!securityMetadata.composite) { + return request; + } } } } @@ -71,7 +91,12 @@ private static void parseSecurityOption(HTTPRequest request, Object option) continue; } - parseSecurityScheme(request, securityMetadata, value); + if (securityMetadata.subtype != null && securityMetadata.subtype.equals("basic") + && Types.getType(value.getClass()) != Types.OBJECT) { + parseSecurityScheme(request, securityMetadata, option); + } else { + parseSecurityScheme(request, securityMetadata, value); + } } } diff --git a/src/main/java/co/novu/utils/SecurityMetadata.java b/src/main/java/co/novu/utils/SecurityMetadata.java index 79ab4008..7e9568b4 100644 --- a/src/main/java/co/novu/utils/SecurityMetadata.java +++ b/src/main/java/co/novu/utils/SecurityMetadata.java @@ -11,6 +11,7 @@ class SecurityMetadata { String subtype; boolean option; boolean scheme; + boolean composite; String name; private SecurityMetadata() { diff --git a/src/main/java/co/novu/utils/Utils.java b/src/main/java/co/novu/utils/Utils.java index 30d53d28..f7ce1b9b 100644 --- a/src/main/java/co/novu/utils/Utils.java +++ b/src/main/java/co/novu/utils/Utils.java @@ -308,8 +308,8 @@ public static List getQueryParams(Class ty return QueryParameters.parseQueryParams(type, params, globals); } - public static HTTPRequest configureSecurity(HTTPRequest request, Object security) throws Exception { - return Security.configureSecurity(request, security); + public static HTTPRequest configureSecurity(HTTPRequest request, Object security, String... allowedFields) throws Exception { + return Security.configureSecurity(request, security, allowedFields); } private static final String DOLLAR_MARKER = "D9qPtyhOYzkHGu3c"; diff --git a/src/main/java/co/novu/utils/reactive/EventStream.java b/src/main/java/co/novu/utils/reactive/EventStream.java index 838c5d30..17052a3e 100644 --- a/src/main/java/co/novu/utils/reactive/EventStream.java +++ b/src/main/java/co/novu/utils/reactive/EventStream.java @@ -84,8 +84,17 @@ public static EventStream typeReference, ObjectMapper objectMapper, String terminalMessage) { - return new EventStream<>(asyncResponseFuture, typeReference, objectMapper, - new SSEProtocol<>(terminalMessage)); + return forSSE(asyncResponseFuture, typeReference, objectMapper, terminalMessage, true); + } + + public static EventStream forSSE( + CompletableFuture asyncResponseFuture, + TypeReference typeReference, + ObjectMapper objectMapper, + String terminalMessage, + boolean dataRequired) { + return new EventStream<>(asyncResponseFuture, typeReference, objectMapper, + new SSEProtocol<>(terminalMessage, dataRequired)); } /** @@ -322,9 +331,11 @@ private void signalComplete() { */ private static class SSEProtocol implements Protocol { private final String terminalMessage; + private final boolean dataRequired; - public SSEProtocol(String terminalMessage) { + public SSEProtocol(String terminalMessage, boolean dataRequired) { this.terminalMessage = terminalMessage; + this.dataRequired = dataRequired; } @Override @@ -334,6 +345,10 @@ public StreamingParser createParser() { @Override public ItemT processItem(EventStreamMessage message, ObjectMapper objectMapper, TypeReference typeReference) { + // Skip events without data when data is required + if (dataRequired && message.data().isEmpty()) { + return null; + } return Utils.asType(message, objectMapper, typeReference); }